From jonny_xiong at 163.com Fri Sep 1 01:33:04 2017 From: jonny_xiong at 163.com (jonny) Date: Thu, 31 Aug 2017 22:33:04 -0700 (MST) Subject: [vtkusers] Rendering volume on wxWidget, why there is a 2d cross on the viewport Message-ID: <1504243984699-0.post@n5.nabble.com> Hi, all: I am rendering a volume on the wxWidget, everything is ok but there is a 2d cross (dash line, may be the axes) appears under some view direction. I am sure it is not in the volume because it does not move when I move the volume in the viewport. Can anyone tell me what the problem is? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From richard.j.brown at live.co.uk Fri Sep 1 02:31:32 2017 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Thu, 31 Aug 2017 23:31:32 -0700 (MST) Subject: [vtkusers] Change vtkScalarBarActor label text In-Reply-To: <1504013297086-5744620.post@n5.nabble.com> References: <1504013297086-5744620.post@n5.nabble.com> Message-ID: <1504247492292-0.post@n5.nabble.com> Nobody? Is this not doable? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From flaviu2 at yahoo.com Fri Sep 1 06:40:42 2017 From: flaviu2 at yahoo.com (Flaviu2) Date: Fri, 1 Sep 2017 10:40:42 +0000 (UTC) Subject: [vtkusers] vtkDataArrayTemplate.txx 64 bit error References: <86561834.182425.1504262442299.ref@mail.yahoo.com> Message-ID: <86561834.182425.1504262442299@mail.yahoo.com> Hi VTK users. I encountered an strange error, willing to compile my MFC project which have VTK inside. I am using VTK 6.1, in an VS2008 project, on Win10. The project work fine compiled on 32 bit, with VTK 6.1 compiled on 32 bit. Soon as I have compiled?my project?on 64 bit (and also VTK on 64), I get the following errors: 1>MainFrm.cpp 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error C2589: '(' : illegal token on right side of '::' 1>??????? c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454) : while compiling class template member function 'void vtkDataArrayTemplate::InsertTuples(vtkIdList *,vtkIdList *,vtkAbstractArray *)' 1>??????? with 1>??????? [ 1>??????????? T=unsigned char 1>??????? ] 1>??????? c:\program files\vtk\include\vtk-6.1\vtkUnsignedCharArray.h(41) : see reference to class template instantiation 'vtkDataArrayTemplate' being compiled 1>??????? with 1>??????? [ 1>??????????? T=unsigned char 1>??????? ] 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error C2059: syntax error : '::' 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error C2589: '(' : illegal token on right side of '::' 1>??????? c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454) : while compiling class template member function 'void vtkDataArrayTemplate::InsertTuples(vtkIdList *,vtkIdList *,vtkAbstractArray *)' 1>??????? with 1>??????? [ 1>??????????? T=int 1>??????? ] 1>??????? c:\program files\vtk\include\vtk-6.1\vtkIntArray.h(41) : see reference to class template instantiation 'vtkDataArrayTemplate' being compiled 1>??????? with 1>??????? [ 1>??????????? T=int 1>??????? ] 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error C2059: syntax error : '::' Do you experienced with this error ? Or, can you tell me what if the cause of this strange error ? And how can I solve this ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From da178 at hw.ac.uk Fri Sep 1 07:10:41 2017 From: da178 at hw.ac.uk (Anagnostakis, Dimitrios) Date: Fri, 1 Sep 2017 11:10:41 +0000 Subject: [vtkusers] Question on OBBTreeExtractCells example Message-ID: Hi all, In the OBBTreeExtractCells example there is an argument tol in the function IntersectWithLine. I was trying to understand what actually this does. Any help please? Cheers, Jim ________________________________ Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With campuses and students across the entire globe we span the world, delivering innovation and educational excellence in business, engineering, design and the physical, social and life sciences. This email is generated from the Heriot-Watt University Group, which includes: 1. Heriot-Watt University, a Scottish charity registered under number SC000278 2. Edinburgh Business School a Charity Registered in Scotland, SC026900. Edinburgh Business School is a company limited by guarantee, registered in Scotland with registered number SC173556 and registered office at Heriot-Watt University Finance Office, Riccarton, Currie, Midlothian, EH14 4AS 3. Heriot- Watt Services Limited (Oriam), Scotland's national performance centre for sport. Heriot-Watt Services Limited is a private limited company registered is Scotland with registered number SC271030 and registered office at Research & Enterprise Services Heriot-Watt University, Riccarton, Edinburgh, EH14 4AS. The contents (including any attachments) are confidential. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Fri Sep 1 07:14:50 2017 From: flaviu2 at yahoo.com (Flaviu2) Date: Fri, 1 Sep 2017 11:14:50 +0000 (UTC) Subject: [vtkusers] vtkDataArrayTemplate.txx 64 bit error In-Reply-To: <86561834.182425.1504262442299@mail.yahoo.com> References: <86561834.182425.1504262442299.ref@mail.yahoo.com> <86561834.182425.1504262442299@mail.yahoo.com> Message-ID: <438595899.1050592.1504264490211@mail.yahoo.com> Maybe is not so big deal, maybe it is just a stroke through some option?... which I didn't founded ... On ?Friday?, ?September? ?01?, ?2017? ?01?:?41?:?17? ?PM? ?EEST, Flaviu2 via vtkusers wrote: Hi VTK users. I encountered an strange error, willing to compile my MFC project which have VTK inside. I am using VTK 6.1, in an VS2008 project, on Win10. The project work fine compiled on 32 bit, with VTK 6.1 compiled on 32 bit. Soon as I have compiled?my project?on 64 bit (and also VTK on 64), I get the following errors: 1>MainFrm.cpp 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error C2589: '(' : illegal token on right side of '::' 1>??????? c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454) : while compiling class template member function 'void vtkDataArrayTemplate::InsertTuples(vtkIdList *,vtkIdList *,vtkAbstractArray *)' 1>??????? with 1>??????? [ 1>??????????? T=unsigned char 1>??????? ] 1>??????? c:\program files\vtk\include\vtk-6.1\vtkUnsignedCharArray.h(41) : see reference to class template instantiation 'vtkDataArrayTemplate' being compiled 1>??????? with 1>??????? [ 1>??????????? T=unsigned char 1>??????? ] 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error C2059: syntax error : '::' 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error C2589: '(' : illegal token on right side of '::' 1>??????? c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454) : while compiling class template member function 'void vtkDataArrayTemplate::InsertTuples(vtkIdList *,vtkIdList *,vtkAbstractArray *)' 1>??????? with 1>??????? [ 1>??????????? T=int 1>??????? ] 1>??????? c:\program files\vtk\include\vtk-6.1\vtkIntArray.h(41) : see reference to class template instantiation 'vtkDataArrayTemplate' being compiled 1>??????? with 1>??????? [ 1>??????????? T=int 1>??????? ] 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error C2059: syntax error : '::' Do you experienced with this error ? Or, can you tell me what if the cause of this strange error ? And how can I solve this ? Thank you. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From allison.vacanti at kitware.com Fri Sep 1 12:05:05 2017 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Fri, 1 Sep 2017 12:05:05 -0400 Subject: [vtkusers] vtkDataArrayTemplate.txx 64 bit error In-Reply-To: <438595899.1050592.1504264490211@mail.yahoo.com> References: <86561834.182425.1504262442299.ref@mail.yahoo.com> <86561834.182425.1504262442299@mail.yahoo.com> <438595899.1050592.1504264490211@mail.yahoo.com> Message-ID: The line it's failing on is maxDstId = std::max(maxDstId, dstIds->GetId(idIndex)); I suspect the error is due to MSVC's decision to define macros that use the identifiers 'min' and 'max'. Try adding "-DNOMINMAX" to your compiler flags. See https://stackoverflow.com/questions/5004858/stdmin-gives-error for more info. HTH, Allie On Fri, Sep 1, 2017 at 7:14 AM, Flaviu2 via vtkusers wrote: > Maybe is not so big deal, maybe it is just a stroke through some option ... > which I didn't founded ... > > On ?Friday?, ?September? ?01?, ?2017? ?01?:?41?:?17? ?PM? ?EEST, Flaviu2 via > vtkusers wrote: > > > Hi VTK users. I encountered an strange error, willing to compile my MFC > project which have VTK inside. > > I am using VTK 6.1, in an VS2008 project, on Win10. > > The project work fine compiled on 32 bit, with VTK 6.1 compiled on 32 bit. > Soon as I have compiled my project on 64 bit (and also VTK on 64), I get the > following errors: > > 1>MainFrm.cpp > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2589: '(' : illegal token on right side of '::' > 1> c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454) > : while compiling class template member function 'void > vtkDataArrayTemplate::InsertTuples(vtkIdList *,vtkIdList > *,vtkAbstractArray *)' > 1> with > 1> [ > 1> T=unsigned char > 1> ] > 1> c:\program files\vtk\include\vtk-6.1\vtkUnsignedCharArray.h(41) : > see reference to class template instantiation 'vtkDataArrayTemplate' > being compiled > 1> with > 1> [ > 1> T=unsigned char > 1> ] > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2059: syntax error : '::' > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2589: '(' : illegal token on right side of '::' > 1> c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454) > : while compiling class template member function 'void > vtkDataArrayTemplate::InsertTuples(vtkIdList *,vtkIdList > *,vtkAbstractArray *)' > 1> with > 1> [ > 1> T=int > 1> ] > 1> c:\program files\vtk\include\vtk-6.1\vtkIntArray.h(41) : see > reference to class template instantiation 'vtkDataArrayTemplate' being > compiled > 1> with > 1> [ > 1> T=int > 1> ] > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2059: syntax error : '::' > > Do you experienced with this error ? Or, can you tell me what if the cause > of this strange error ? And how can I solve this ? > > Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From ken.martin at kitware.com Fri Sep 1 14:17:25 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 1 Sep 2017 14:17:25 -0400 Subject: [vtkusers] Does anyone use vtkMapper - ScalarMaterialMode Message-ID: I am curious if anyone uses the ScalarMaterialMode feature in vtkMapper. When using scalar coloring it allows you to control what material property the scalar color will set, ambient color, diffuse color, or both. I think that people would want their scalar colors to set both the ambient and diffuse material colors. But maybe I am missing a use case where people are using this specifically to only set ambient or diffuse but not both. If you have a case where you are using this feature let me know please :-) Thanks Ken -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jayavardhanravi at outlook.com Fri Sep 1 17:01:27 2017 From: jayavardhanravi at outlook.com (Jay) Date: Fri, 1 Sep 2017 14:01:27 -0700 (MST) Subject: [vtkusers] Is it possible to create a flexible cylinder In-Reply-To: References: <1504214067543-0.post@n5.nabble.com> Message-ID: <1504299687066-0.post@n5.nabble.com> Thanks for you time. I think this is very nice example for what I am looking with which we would be able to bend the solid objects. Regards, Jay -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From vianamp at gmail.com Fri Sep 1 17:52:17 2017 From: vianamp at gmail.com (Matheus Viana) Date: Fri, 1 Sep 2017 18:52:17 -0300 Subject: [vtkusers] 'register' storage class specifier is deprecated Message-ID: Hi guys. I compiled VTK8 with no problem on Mac OS 10.12. However, when I try to compile one of my codes that was working on VTK7, I got the following error. Any advice? [ 25%] Building CXX object CMakeFiles/MitoGraph.dir/MitoGraph.cxx.o /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:576:19: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register] vtkIdType register id; ^~~~~~~~~ /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1129:9: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register] int register j, i; ^~~~~~~~~ /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1129:9: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register] int register j, i; ^~~~~~~~~ /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1339:41: error: non-constant-expression cannot be narrowed from type 'long' to 'double' in initializer list [-Wc++11-narrowing] attribute newAtt_1 = {"#End points",ne}; ^~ /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1339:41: note: insert an explicit cast to silence this issue attribute newAtt_1 = {"#End points",ne}; ^~ static_cast( ) /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1341:43: error: non-constant-expression cannot be narrowed from type 'long' to 'double' in initializer list [-Wc++11-narrowing] attribute newAtt_2 = {"#Bifurcations",nb}; ^~ /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1341:43: note: insert an explicit cast to silence this issue attribute newAtt_2 = {"#Bifurcations",nb}; ^~ static_cast( ) Matheus Viana IBM Research | Brazil -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 1 18:16:13 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 1 Sep 2017 16:16:13 -0600 Subject: [vtkusers] 'register' storage class specifier is deprecated In-Reply-To: References: Message-ID: Hi Matheus, These are just warnings, not errors, so you can ignore them. You are seeing them because your code uses C++ features that are deprecated in C++11, and VTK now requires C++11. Fixing the "register" problem is easy. Just remove it from your code. As for the -Wc++11-narrowing warnings, you can fix them as the compiler suggests: add a static_cast. attribute newAtt_1 = {"#End points", static_cast(ne)}; There is already lots of info about these C++11 deprecations on stackoverflow and similar places. - David On Fri, Sep 1, 2017 at 3:52 PM, Matheus Viana wrote: > Hi guys. I compiled VTK8 with no problem on Mac OS 10.12. However, when I > try to compile one of my codes that was working on VTK7, I got the > following error. > > Any advice? > > [ 25%] Building CXX object CMakeFiles/MitoGraph.dir/MitoGraph.cxx.o > /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:576:19: warning: 'register' > storage class specifier is deprecated and > incompatible with C++1z [-Wdeprecated-register] > vtkIdType register id; > ^~~~~~~~~ > /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1129:9: warning: 'register' > storage class specifier is deprecated and > incompatible with C++1z [-Wdeprecated-register] > int register j, i; > ^~~~~~~~~ > /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1129:9: warning: 'register' > storage class specifier is deprecated and > incompatible with C++1z [-Wdeprecated-register] > int register j, i; > ^~~~~~~~~ > /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1339:41: error: > non-constant-expression cannot be narrowed from type > 'long' to 'double' in initializer list [-Wc++11-narrowing] > attribute newAtt_1 = {"#End points",ne}; > ^~ > /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1339:41: note: insert an > explicit cast to silence this issue > attribute newAtt_1 = {"#End points",ne}; > ^~ > static_cast( ) > /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1341:43: error: > non-constant-expression cannot be narrowed from type > 'long' to 'double' in initializer list [-Wc++11-narrowing] > attribute newAtt_2 = {"#Bifurcations",nb}; > ^~ > /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1341:43: note: insert an > explicit cast to silence this issue > attribute newAtt_2 = {"#Bifurcations",nb}; > ^~ > static_cast( ) > > > > Matheus Viana > IBM Research | Brazil > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vianamp at gmail.com Fri Sep 1 18:19:10 2017 From: vianamp at gmail.com (Matheus Viana) Date: Fri, 1 Sep 2017 19:19:10 -0300 Subject: [vtkusers] 'register' storage class specifier is deprecated In-Reply-To: References: Message-ID: Hi David. It worked! Thank you. -m Matheus Viana IBM Research | Brazil 2017-09-01 19:16 GMT-03:00 David Gobbi : > Hi Matheus, > > These are just warnings, not errors, so you can ignore them. You are > seeing them because your code uses C++ features that are deprecated in > C++11, and VTK now requires C++11. > > Fixing the "register" problem is easy. Just remove it from your code. > > As for the -Wc++11-narrowing warnings, you can fix them as the compiler > suggests: add a static_cast. > > attribute newAtt_1 = {"#End points", static_cast(ne)}; > > There is already lots of info about these C++11 deprecations on > stackoverflow and similar places. > > - David > > > On Fri, Sep 1, 2017 at 3:52 PM, Matheus Viana wrote: > >> Hi guys. I compiled VTK8 with no problem on Mac OS 10.12. However, when I >> try to compile one of my codes that was working on VTK7, I got the >> following error. >> >> Any advice? >> >> [ 25%] Building CXX object CMakeFiles/MitoGraph.dir/MitoGraph.cxx.o >> /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:576:19: warning: >> 'register' storage class specifier is deprecated and >> incompatible with C++1z [-Wdeprecated-register] >> vtkIdType register id; >> ^~~~~~~~~ >> /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1129:9: warning: >> 'register' storage class specifier is deprecated and >> incompatible with C++1z [-Wdeprecated-register] >> int register j, i; >> ^~~~~~~~~ >> /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1129:9: warning: >> 'register' storage class specifier is deprecated and >> incompatible with C++1z [-Wdeprecated-register] >> int register j, i; >> ^~~~~~~~~ >> /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1339:41: error: >> non-constant-expression cannot be narrowed from type >> 'long' to 'double' in initializer list [-Wc++11-narrowing] >> attribute newAtt_1 = {"#End points",ne}; >> ^~ >> /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1339:41: note: insert an >> explicit cast to silence this issue >> attribute newAtt_1 = {"#End points",ne}; >> ^~ >> static_cast( ) >> /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1341:43: error: >> non-constant-expression cannot be narrowed from type >> 'long' to 'double' in initializer list [-Wc++11-narrowing] >> attribute newAtt_2 = {"#Bifurcations",nb}; >> ^~ >> /Users/mviana/Desktop/MitoGraph/MitoGraph.cxx:1341:43: note: insert an >> explicit cast to silence this issue >> attribute newAtt_2 = {"#Bifurcations",nb}; >> ^~ >> static_cast( ) >> >> >> >> Matheus Viana >> IBM Research | Brazil >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iamdpak at gmail.com Mon Sep 4 01:03:15 2017 From: iamdpak at gmail.com (vinmean) Date: Sun, 3 Sep 2017 22:03:15 -0700 (MST) Subject: [vtkusers] Creating actor copy did not copy the texture information Message-ID: <1504501395790-0.post@n5.nabble.com> Following is the code I wrote to copy a group of actors (assembly) to another. Earler, I had imported the actors using the vtkObjImporter class. So these actors have textures. But while copying only the polyData is being copied. Can some one tell me how to copy the texture information too? void deep_copy_assembly(vtkSmartPointer src_asm, vtkSmartPointer dst_asm) { vtkSmartPointer actors = vtkSmartPointer::New(); src_asm->GetActors(actors); actors->InitTraversal(); for(vtkIdType i = 0; i < actors->GetNumberOfItems(); i++) { vtkSmartPointer actor = actors->GetNextActor(); vtkSmartPointer new_actor = vtkSmartPointer::New(); vtkPolyData* pd = vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput()); vtkSmartPointer new_pd = vtkSmartPointer::New(); new_pd->DeepCopy(pd); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputData(new_pd); new_actor->SetMapper(mapper); dst_asm->AddPart(new_actor); } } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From coe14b041 at iiitdm.ac.in Mon Sep 4 04:36:40 2017 From: coe14b041 at iiitdm.ac.in (gvvardhan) Date: Mon, 4 Sep 2017 01:36:40 -0700 (MST) Subject: [vtkusers] how can i clip the vtkImageData using the vtkPolyData? thank you in advance~ In-Reply-To: <9ddb27260703110952o1ef34b5bn166aaca375e876d9@mail.gmail.com> References: <9ddb27260703110952o1ef34b5bn166aaca375e876d9@mail.gmail.com> Message-ID: <1504514200093-0.post@n5.nabble.com> what is "imagedata" that is given as input to imagestencil? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From xabivtk at gmail.com Mon Sep 4 05:12:02 2017 From: xabivtk at gmail.com (Xabi Riobe) Date: Mon, 4 Sep 2017 11:12:02 +0200 Subject: [vtkusers] Is -8.1 libraries naming correct for 8.0.1 release ? Message-ID: Hi, When building static libraries with 8.0.1 release, the suffix is 8.1 : vtkCommonCore-8.1.lib Is it the expected name ? shouldn't be vtkCommonCore-8.0.1.lib instead? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From xabivtk at gmail.com Mon Sep 4 05:16:24 2017 From: xabivtk at gmail.com (Xabi Riobe) Date: Mon, 4 Sep 2017 11:16:24 +0200 Subject: [vtkusers] Is -8.1 libraries naming correct for 8.0.1 release ? In-Reply-To: References: Message-ID: Sorry, -8.1 is master, but for 8.0.1 the name is -8.0 Is there a reason to have only one subversion number and not 2 in this case? 2017-09-04 11:12 GMT+02:00 Xabi Riobe : > Hi, > > When building static libraries with 8.0.1 release, the suffix is 8.1 > : vtkCommonCore-8.1.lib > > Is it the expected name ? shouldn't be vtkCommonCore-8.0.1.lib instead? > > Thanks > -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Mon Sep 4 05:28:46 2017 From: flaviu2 at yahoo.com (Flaviu2) Date: Mon, 4 Sep 2017 09:28:46 +0000 (UTC) Subject: [vtkusers] vtkDataArrayTemplate.txx 64 bit error In-Reply-To: References: <86561834.182425.1504262442299.ref@mail.yahoo.com> <86561834.182425.1504262442299@mail.yahoo.com> <438595899.1050592.1504264490211@mail.yahoo.com> Message-ID: <1101665223.2353499.1504517326590@mail.yahoo.com> Kindly thank you for your hint. Yes, I have tried what you said, and now I have another errors, but I am sure that I am not far to solve my problem: 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(470) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(471) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(472) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(473) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(494) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(495) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(496) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(497) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(658) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(659) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(660) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(661) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(682) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(683) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(684) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(685) : error C3861: 'min': identifier not found 1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxtoolbar.h(166) : error C3861: 'max': identifier not found 1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxmenubar.h(160) : error C3861: 'max': identifier not found 1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxdesktopalertwnd.h(81) : error C3861: 'max': identifier not found if I will get rid of these errors, I am sure that my app will run ... can you tell me what could be the problem ? On ?Friday?, ?September? ?01?, ?2017? ?07?:?05?:?28? ?PM? ?EEST, Allie Vacanti wrote: The line it's failing on is maxDstId = std::max(maxDstId, dstIds->GetId(idIndex)); I suspect the error is due to MSVC's decision to define macros that use the identifiers 'min' and 'max'. Try adding "-DNOMINMAX" to your compiler flags. See https://stackoverflow.com/questions/5004858/stdmin-gives-error for more info. HTH, Allie On Fri, Sep 1, 2017 at 7:14 AM, Flaviu2 via vtkusers wrote: > Maybe is not so big deal, maybe it is just a stroke through some option ... > which I didn't founded ... > > On ?Friday?, ?September? ?01?, ?2017? ?01?:?41?:?17? ?PM? ?EEST, Flaviu2 via > vtkusers wrote: > > > Hi VTK users. I encountered an strange error, willing to compile my MFC > project which have VTK inside. > > I am using VTK 6.1, in an VS2008 project, on Win10. > > The project work fine compiled on 32 bit, with VTK 6.1 compiled on 32 bit. > Soon as I have compiled my project on 64 bit (and also VTK on 64), I get the > following errors: > > 1>MainFrm.cpp > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2589: '(' : illegal token on right side of '::' > 1>? ? ? ? c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454) > : while compiling class template member function 'void > vtkDataArrayTemplate::InsertTuples(vtkIdList *,vtkIdList > *,vtkAbstractArray *)' > 1>? ? ? ? with > 1>? ? ? ? [ > 1>? ? ? ? ? ? T=unsigned char > 1>? ? ? ? ] > 1>? ? ? ? c:\program files\vtk\include\vtk-6.1\vtkUnsignedCharArray.h(41) : > see reference to class template instantiation 'vtkDataArrayTemplate' > being compiled > 1>? ? ? ? with > 1>? ? ? ? [ > 1>? ? ? ? ? ? T=unsigned char > 1>? ? ? ? ] > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2059: syntax error : '::' > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2589: '(' : illegal token on right side of '::' > 1>? ? ? ? c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454) > : while compiling class template member function 'void > vtkDataArrayTemplate::InsertTuples(vtkIdList *,vtkIdList > *,vtkAbstractArray *)' > 1>? ? ? ? with > 1>? ? ? ? [ > 1>? ? ? ? ? ? T=int > 1>? ? ? ? ] > 1>? ? ? ? c:\program files\vtk\include\vtk-6.1\vtkIntArray.h(41) : see > reference to class template instantiation 'vtkDataArrayTemplate' being > compiled > 1>? ? ? ? with > 1>? ? ? ? [ > 1>? ? ? ? ? ? T=int > 1>? ? ? ? ] > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2059: syntax error : '::' > > Do you experienced with this error ? Or, can you tell me what if the cause > of this strange error ? And how can I solve this ? > > Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Mon Sep 4 06:27:24 2017 From: flaviu2 at yahoo.com (Flaviu2) Date: Mon, 4 Sep 2017 10:27:24 +0000 (UTC) Subject: [vtkusers] vtkDataArrayTemplate.txx 64 bit error In-Reply-To: <1101665223.2353499.1504517326590@mail.yahoo.com> References: <86561834.182425.1504262442299.ref@mail.yahoo.com> <86561834.182425.1504262442299@mail.yahoo.com> <438595899.1050592.1504264490211@mail.yahoo.com> <1101665223.2353499.1504517326590@mail.yahoo.com> Message-ID: <1426580255.2361857.1504520844457@mail.yahoo.com> Hi again. I think I have found a solution: to not use #define NOMINMAX but #undef min#undef max after all MFC including headers, inside stdafx.h file; ... in case that somebody encounter this problem ... On ?Monday?, ?September? ?04?, ?2017? ?12?:?28?:?58? ?PM? ?EEST, Flaviu2 via vtkusers wrote: Kindly thank you for your hint. Yes, I have tried what you said, and now I have another errors, but I am sure that I am not far to solve my problem: 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(470) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(471) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(472) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(473) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(494) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(495) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(496) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(497) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(658) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(659) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(660) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(661) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(682) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(683) : error C3861: 'max': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(684) : error C3861: 'min': identifier not found 1>c:\program files\microsoft sdks\windows\v6.0a\include\GdiplusTypes.h(685) : error C3861: 'min': identifier not found 1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxtoolbar.h(166) : error C3861: 'max': identifier not found 1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxmenubar.h(160) : error C3861: 'max': identifier not found 1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxdesktopalertwnd.h(81) : error C3861: 'max': identifier not found if I will get rid of these errors, I am sure that my app will run ... can you tell me what could be the problem ? On ?Friday?, ?September? ?01?, ?2017? ?07?:?05?:?28? ?PM? ?EEST, Allie Vacanti wrote: The line it's failing on is maxDstId = std::max(maxDstId, dstIds->GetId(idIndex)); I suspect the error is due to MSVC's decision to define macros that use the identifiers 'min' and 'max'. Try adding "-DNOMINMAX" to your compiler flags. See https://stackoverflow.com/questions/5004858/stdmin-gives-error for more info. HTH, Allie On Fri, Sep 1, 2017 at 7:14 AM, Flaviu2 via vtkusers wrote: > Maybe is not so big deal, maybe it is just a stroke through some option ... > which I didn't founded ... > > On ?Friday?, ?September? ?01?, ?2017? ?01?:?41?:?17? ?PM? ?EEST, Flaviu2 via > vtkusers wrote: > > > Hi VTK users. I encountered an strange error, willing to compile my MFC > project which have VTK inside. > > I am using VTK 6.1, in an VS2008 project, on Win10. > > The project work fine compiled on 32 bit, with VTK 6.1 compiled on 32 bit. > Soon as I have compiled my project on 64 bit (and also VTK on 64), I get the > following errors: > > 1>MainFrm.cpp > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2589: '(' : illegal token on right side of '::' > 1>? ? ? ? c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454) > : while compiling class template member function 'void > vtkDataArrayTemplate::InsertTuples(vtkIdList *,vtkIdList > *,vtkAbstractArray *)' > 1>? ? ? ? with > 1>? ? ? ? [ > 1>? ? ? ? ? ? T=unsigned char > 1>? ? ? ? ] > 1>? ? ? ? c:\program files\vtk\include\vtk-6.1\vtkUnsignedCharArray.h(41) : > see reference to class template instantiation 'vtkDataArrayTemplate' > being compiled > 1>? ? ? ? with > 1>? ? ? ? [ > 1>? ? ? ? ? ? T=unsigned char > 1>? ? ? ? ] > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2059: syntax error : '::' > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2589: '(' : illegal token on right side of '::' > 1>? ? ? ? c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(454) > : while compiling class template member function 'void > vtkDataArrayTemplate::InsertTuples(vtkIdList *,vtkIdList > *,vtkAbstractArray *)' > 1>? ? ? ? with > 1>? ? ? ? [ > 1>? ? ? ? ? ? T=int > 1>? ? ? ? ] > 1>? ? ? ? c:\program files\vtk\include\vtk-6.1\vtkIntArray.h(41) : see > reference to class template instantiation 'vtkDataArrayTemplate' being > compiled > 1>? ? ? ? with > 1>? ? ? ? [ > 1>? ? ? ? ? ? T=int > 1>? ? ? ? ] > 1>c:\program files\vtk\include\vtk-6.1\vtkDataArrayTemplate.txx(478) : error > C2059: syntax error : '::' > > Do you experienced with this error ? Or, can you tell me what if the cause > of this strange error ? And how can I solve this ? > > Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers >_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Mon Sep 4 10:18:24 2017 From: tjlp at netease.com (Liu_tj) Date: Mon, 4 Sep 2017 22:18:24 +0800 (CST) Subject: [vtkusers] why the DICOM image is completely white when I use lung color level and window? Message-ID: <5c61fa8d.11.15e4d41afab.Coremail.tjlp@netease.com> Hi, I use vtkImageViewer2 to display DICOM series. If I set the lung color level and window, which is -600 and 1200, to the vtkImageViewer2, the image is completely white. If I use other DICOM browser tool, with the same level and window, the DICOM is displayed correclty. What's wrong with the level and window setting to vtkImageViewer2? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Sep 4 13:28:07 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 4 Sep 2017 11:28:07 -0600 Subject: [vtkusers] why the DICOM image is completely white when I use lung color level and window? In-Reply-To: <5c61fa8d.11.15e4d41afab.Coremail.tjlp@netease.com> References: <5c61fa8d.11.15e4d41afab.Coremail.tjlp@netease.com> Message-ID: Hi Liu Peng, Use the reader's GetRescaleSlope() and GetRescaleIntercept(). See http://dgobbi.github.io/vtk-dicom/doc/api/image_display.html and scroll down to the "Grayscale image display" section. For a run-down on some of the complications of Window/Level in DICOM, see the following: http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.11.html http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.11.2.html - David On Mon, Sep 4, 2017 at 8:18 AM, Liu_tj wrote: > Hi, > > I use vtkImageViewer2 to display DICOM series. If I set the lung color > level and window, which is -600 and 1200, to the vtkImageViewer2, the image > is completely white. > > If I use other DICOM browser tool, with the same level and window, the > DICOM is displayed correclty. > > What's wrong with the level and window setting to vtkImageViewer2? > > Thanks > > Liu Peng > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcwang17 at hotmail.com Mon Sep 4 16:01:48 2017 From: marcwang17 at hotmail.com (WackoWanderer) Date: Mon, 4 Sep 2017 13:01:48 -0700 (MST) Subject: [vtkusers] how to subclass vtkActor Message-ID: <1504555308297-0.post@n5.nabble.com> I am trying to subclass the vtkActor class. But my class keeps getting the error "undefined reference to `vtkIntraLatticeObject::New()". When I try to instantiate it in a vtksmartpointer. I found this link . I tried it but I get "undefined reference to vtkIntraLatticeObject::vtkIntraLatticeObject()". I am also not 100% convinced this is the way to go. It seems a bit complicated especially compared to the next example I found. So I have difficulty understanding what's so different with my code or what I am missing. So here's my class files vtkIntraLatticeObject.h vtkIntraLatticeObject.cc -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From 419655660 at qq.com Mon Sep 4 23:14:29 2017 From: 419655660 at qq.com (louiskoo) Date: Mon, 4 Sep 2017 20:14:29 -0700 (MST) Subject: [vtkusers] An application has made and attempt to load the C runtime library incorrectly Message-ID: <1504581269104-0.post@n5.nabble.com> -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tjlp at netease.com Tue Sep 5 00:11:24 2017 From: tjlp at netease.com (Liu_tj) Date: Tue, 5 Sep 2017 12:11:24 +0800 (CST) Subject: [vtkusers] why the DICOM image is completely white when I use lung color level and window? In-Reply-To: References: <5c61fa8d.11.15e4d41afab.Coremail.tjlp@netease.com> Message-ID: <4e0677e9.d.15e503c5519.Coremail.tjlp@netease.com> Hi, David, So I need to convert the window and level value, 1200 and -600, by this mapping "ModalityValue = RescaleSlope * StoredValue + RescaleIntercept" before I call the vtkImageViewer2->SetColorLevel() and SetColorWindow() function, right? Thanks Liu Peng ?2017-09-05?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?09?5? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: [vtkusers] why the DICOM image is completely white when I use lung color level and window? Hi Liu Peng, Use the reader's GetRescaleSlope() and GetRescaleIntercept(). See http://dgobbi.github.io/vtk-dicom/doc/api/image_display.html and scroll down to the "Grayscale image display" section. For a run-down on some of the complications of Window/Level in DICOM, see the following: http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.11.html http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.11.2.html - David On Mon, Sep 4, 2017 at 8:18 AM, Liu_tj wrote: Hi, I use vtkImageViewer2 to display DICOM series. If I set the lung color level and window, which is -600 and 1200, to the vtkImageViewer2, the image is completely white. If I use other DICOM browser tool, with the same level and window, the DICOM is displayed correclty. What's wrong with the level and window setting to vtkImageViewer2? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From iamdpak at gmail.com Tue Sep 5 04:54:38 2017 From: iamdpak at gmail.com (vinmean) Date: Tue, 5 Sep 2017 01:54:38 -0700 (MST) Subject: [vtkusers] Creating actor copy did not copy the texture information In-Reply-To: <1504501395790-0.post@n5.nabble.com> References: <1504501395790-0.post@n5.nabble.com> Message-ID: <1504601678232-0.post@n5.nabble.com> I am now able to copy the texture using the below lines vtkSmartPointer texture = actor->GetTexture(); new_actor->SetTexture(texture); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From coe14b041 at iiitdm.ac.in Tue Sep 5 06:42:56 2017 From: coe14b041 at iiitdm.ac.in (gvvardhan) Date: Tue, 5 Sep 2017 03:42:56 -0700 (MST) Subject: [vtkusers] how can i clip the vtkImageData using the vtkPolyData? thank you in advance~ In-Reply-To: <1504514200093-0.post@n5.nabble.com> References: <9ddb27260703110952o1ef34b5bn166aaca375e876d9@mail.gmail.com> <1504514200093-0.post@n5.nabble.com> Message-ID: <1504608176875-0.post@n5.nabble.com> I did clipping part using vtkClipVolume. I'm iterating the clipping part with vtkImplicitCylinderWidget and vtkTICWCallback. Is there a way to save the clipped output after every iteration? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ben.boeckel at kitware.com Tue Sep 5 08:30:04 2017 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 5 Sep 2017 08:30:04 -0400 Subject: [vtkusers] [vtk-developers] Is -8.1 libraries naming correct for 8.0.1 release ? In-Reply-To: References: Message-ID: <20170905123004.GA6849@megas.kitware.com> On Mon, Sep 04, 2017 at 11:16:24 +0200, Xabi Riobe wrote: > Sorry, -8.1 is master, but for 8.0.1 the name is -8.0 > Is there a reason to have only one subversion number and not 2 in this case? Patch versions should be ABI-compatible and therefore directly replaceable. --Ben From pkorir at ebi.ac.uk Tue Sep 5 09:23:51 2017 From: pkorir at ebi.ac.uk (Paul Korir) Date: Tue, 5 Sep 2017 14:23:51 +0100 Subject: [vtkusers] Crust Algorithm in VTK? Message-ID: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> Dear All, I recently came across the crust algorithm for computing a surface along a set of points. It seems to be a relatively powerful algorithm but is not implemented in VTK. VTK has the VTKRuledSurfaceFilter but this has major limitations in various topologies. The alternative is to use some plugins implemented for 3D Slicer but it seems like overkill to have to install 3D Slicer plus an additional plugin just to solve this problem. Obviously the better option would to implement the plugin functionality directly into VTK but obviously I cannot dictate someone's development schedule. My question is: is there something wrong with the crust algorithm that has prevented its implementation in VTK? Are there any plans for this? Is there anything better that can then be included. Thanks for shedding light on this most important of problems. -- Paul K. Korir, PhD Scientific Programmer EMBL-EBI 01223494422 From jimi_vtk at foxmail.com Tue Sep 5 09:48:25 2017 From: jimi_vtk at foxmail.com (=?ISO-8859-1?B?cHA=?=) Date: Tue, 5 Sep 2017 21:48:25 +0800 Subject: [vtkusers] how to get 3D rending together dicom image with drawing contous Message-ID: Hi, I have get 3D display using vtkFixedPointVolumeRayCastMapper for CT dicom images. I also have several drawing contours from CT dicom images. I use vtkVoxelContoursToSurfaceFilter to get 3D display about drawing contours. I want to get 3D display together dicom image with drawing contours in the same vtkRenderer. But the 3D display of drawing contours is not in the correct position in 3D display of ct dicom images. Is there some examples to do this ? Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Sep 5 10:26:09 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 5 Sep 2017 10:26:09 -0400 Subject: [vtkusers] Crust Algorithm in VTK? In-Reply-To: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> References: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> Message-ID: Here is an implementation that uses vtk, but is gpl'ed and cannot be distributed with vtk. https://github.com/timhutton/vtkpowercrust On Tue, Sep 5, 2017 at 9:23 AM, Paul Korir wrote: > Dear All, > > I recently came across the crust algorithm for computing a surface along a > set of points. It seems to be a relatively powerful algorithm but is not > implemented in VTK. VTK has the VTKRuledSurfaceFilter but this has major > limitations in various topologies. The alternative is to use some plugins > implemented for 3D Slicer but it seems like overkill to have to install 3D > Slicer plus an additional plugin just to solve this problem. Obviously the > better option would to implement the plugin functionality directly into VTK > but obviously I cannot dictate someone's development schedule. > > My question is: is there something wrong with the crust algorithm that has > prevented its implementation in VTK? Are there any plans for this? Is there > anything better that can then be included. > > Thanks for shedding light on this most important of problems. > > -- > Paul K. Korir, PhD > Scientific Programmer > EMBL-EBI > 01223494422 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From simon.esneault at gmail.com Tue Sep 5 10:25:52 2017 From: simon.esneault at gmail.com (Simon Esneault) Date: Tue, 5 Sep 2017 16:25:52 +0200 Subject: [vtkusers] Crust Algorithm in VTK? In-Reply-To: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> References: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> Message-ID: Hello, Maybe this can help ? https://github.com/krm15/Powercrust Simon 2017-09-05 15:23 GMT+02:00 Paul Korir : > Dear All, > > I recently came across the crust algorithm for computing a surface along a > set of points. It seems to be a relatively powerful algorithm but is not > implemented in VTK. VTK has the VTKRuledSurfaceFilter but this has major > limitations in various topologies. The alternative is to use some plugins > implemented for 3D Slicer but it seems like overkill to have to install 3D > Slicer plus an additional plugin just to solve this problem. Obviously the > better option would to implement the plugin functionality directly into VTK > but obviously I cannot dictate someone's development schedule. > > My question is: is there something wrong with the crust algorithm that has > prevented its implementation in VTK? Are there any plans for this? Is there > anything better that can then be included. > > Thanks for shedding light on this most important of problems. > > -- > Paul K. Korir, PhD > Scientific Programmer > EMBL-EBI > 01223494422 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfavre at cscs.ch Tue Sep 5 10:36:29 2017 From: jfavre at cscs.ch (Favre Jean) Date: Tue, 5 Sep 2017 14:36:29 +0000 Subject: [vtkusers] Crust Algorithm in VTK? In-Reply-To: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> References: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> Message-ID: <0EB9B6375711A04B820E6B6F5CCA9F684A290831@MBX211.d.ethz.ch> I have had good results using vtkPCANormalEstimation, vtkSignedDistance, and vtkExtractSurface Jean From bill.lorensen at gmail.com Tue Sep 5 10:53:00 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 5 Sep 2017 10:53:00 -0400 Subject: [vtkusers] Crust Algorithm in VTK? In-Reply-To: References: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> Message-ID: Unfortunately that code does not build with the current VTK... On Tue, Sep 5, 2017 at 10:25 AM, Simon Esneault wrote: > Hello, > > Maybe this can help ? > https://github.com/krm15/Powercrust > > Simon > > 2017-09-05 15:23 GMT+02:00 Paul Korir : >> >> Dear All, >> >> I recently came across the crust algorithm for computing a surface along a >> set of points. It seems to be a relatively powerful algorithm but is not >> implemented in VTK. VTK has the VTKRuledSurfaceFilter but this has major >> limitations in various topologies. The alternative is to use some plugins >> implemented for 3D Slicer but it seems like overkill to have to install 3D >> Slicer plus an additional plugin just to solve this problem. Obviously the >> better option would to implement the plugin functionality directly into VTK >> but obviously I cannot dictate someone's development schedule. >> >> My question is: is there something wrong with the crust algorithm that has >> prevented its implementation in VTK? Are there any plans for this? Is there >> anything better that can then be included. >> >> Thanks for shedding light on this most important of problems. >> >> -- >> Paul K. Korir, PhD >> Scientific Programmer >> EMBL-EBI >> 01223494422 >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From ramamurr at research.ge.com Tue Sep 5 10:58:37 2017 From: ramamurr at research.ge.com (Ramamurthy, Rajesh (GE Global Research, US)) Date: Tue, 5 Sep 2017 14:58:37 +0000 Subject: [vtkusers] canny edge detection help In-Reply-To: References: <7656909F4F8F7F44B138D3B65F7F9C8468BA7E20@ALPMBAPA01.e2k.ad.ge.com> Message-ID: <7656909F4F8F7F44B138D3B65F7F9C8468BB1B55@ALPMBAPA01.e2k.ad.ge.com> This worked and I have been using the canny edge detection code. Today I noticed a crash in the algorithim coming from vtkSubPixelPositionEdgels::Move where there is a divide by zero at c = -0.5*b/a; I noticed that when I increase the Gradient and threshold values for the algorithm, the crash goes away - so it appears that some remote pixels are being picked up as edges. Not sure what to do here - I would hope that there is at least a way to fail gracefully , but there are no exception handing in there. Any ideas? - cant share the image unfortunately. Regards Rajesh -----Original Message----- From: Bill Lorensen [mailto:bill.lorensen at gmail.com] Sent: Thursday, August 24, 2017 1:45 PM To: Ramamurthy, Rajesh (GE Global Research, US) Cc: vtkusers at vtk.org Subject: EXT: Re: [vtkusers] canny edge detection help Remove the vtkImageLuminance from the pipeline. On Thu, Aug 24, 2017 at 12:17 PM, Ramamurthy, Rajesh (GE Global Research, US) wrote: > Hi All, > > > > I am new to using VTK and hence I am trying to work with the toolkit > using the online examples for canny edge detection and reading DICOM images. > > > > My need is to do sub-pixel canny edge detection of a DICOM image and > then write out the results to a file. I found examples for both and > combined it together into a test app code as below. > > > > The code builds, and runs but I am always getting no edges written to > my output edges.txt file. I tried playing with different canny > parameters but it did not seem to change the situation. I want the > edges of the attached DCM file to be found, I have a sample edge > detection shown in the attached text file here. > > > > Thanks! > > Rajesh > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From david.gobbi at gmail.com Tue Sep 5 11:08:03 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 5 Sep 2017 09:08:03 -0600 Subject: [vtkusers] why the DICOM image is completely white when I use lung color level and window? In-Reply-To: <4e0677e9.d.15e503c5519.Coremail.tjlp@netease.com> References: <5c61fa8d.11.15e4d41afab.Coremail.tjlp@netease.com> <4e0677e9.d.15e503c5519.Coremail.tjlp@netease.com> Message-ID: Hi Liu Peng, It would be something like this: ColorWindow = 1200/RescaleSlope ColorLevel = (-600 - RescaleIntercept)/RescaleSlope - David On Mon, Sep 4, 2017 at 10:11 PM, Liu_tj wrote: > Hi, David, > > So I need to convert the window and level value, 1200 and -600, by this > mapping "ModalityValue = RescaleSlope * StoredValue + RescaleIntercept" > before I call the vtkImageViewer2->SetColorLevel() and SetColorWindow() > function, right? > > Thanks > Liu Peng > > > > ?2017-09-05?"David Gobbi" ??? > > -----????----- > *???:*"David Gobbi" > *????:*2017?09?5? ??? > *???:*"Liu_tj" > *??:*"vtkusers" > *??:*Re: [vtkusers] why the DICOM image is completely white when I use > lung color level and window? > > > Hi Liu Peng, > > Use the reader's GetRescaleSlope() and GetRescaleIntercept(). See > http://dgobbi.github.io/vtk-dicom/doc/api/image_display.html and scroll > down to the "Grayscale image display" section. > > For a run-down on some of the complications of Window/Level in DICOM, see > the following: > http://dicom.nema.org/medical/dicom/current/output/chtml/ > part03/sect_C.11.html > http://dicom.nema.org/medical/dicom/current/output/chtml/ > part03/sect_C.11.2.html > > - David > > On Mon, Sep 4, 2017 at 8:18 AM, Liu_tj wrote: > >> Hi, >> >> I use vtkImageViewer2 to display DICOM series. If I set the lung color >> level and window, which is -600 and 1200, to the vtkImageViewer2, the image >> is completely white. >> >> If I use other DICOM browser tool, with the same level and window, the >> DICOM is displayed correclty. >> >> What's wrong with the level and window setting to vtkImageViewer2? >> >> Thanks >> >> Liu Peng >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Sep 5 12:06:09 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 5 Sep 2017 12:06:09 -0400 Subject: [vtkusers] Crust Algorithm in VTK? In-Reply-To: References: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> Message-ID: I got it to build with minor changes... I'll see if I can add it as a remote module. On Tue, Sep 5, 2017 at 10:53 AM, Bill Lorensen wrote: > Unfortunately that code does not build with the current VTK... > > > On Tue, Sep 5, 2017 at 10:25 AM, Simon Esneault > wrote: >> Hello, >> >> Maybe this can help ? >> https://github.com/krm15/Powercrust >> >> Simon >> >> 2017-09-05 15:23 GMT+02:00 Paul Korir : >>> >>> Dear All, >>> >>> I recently came across the crust algorithm for computing a surface along a >>> set of points. It seems to be a relatively powerful algorithm but is not >>> implemented in VTK. VTK has the VTKRuledSurfaceFilter but this has major >>> limitations in various topologies. The alternative is to use some plugins >>> implemented for 3D Slicer but it seems like overkill to have to install 3D >>> Slicer plus an additional plugin just to solve this problem. Obviously the >>> better option would to implement the plugin functionality directly into VTK >>> but obviously I cannot dictate someone's development schedule. >>> >>> My question is: is there something wrong with the crust algorithm that has >>> prevented its implementation in VTK? Are there any plans for this? Is there >>> anything better that can then be included. >>> >>> Thanks for shedding light on this most important of problems. >>> >>> -- >>> Paul K. Korir, PhD >>> Scientific Programmer >>> EMBL-EBI >>> 01223494422 >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From simakov.w at gmail.com Tue Sep 5 13:12:54 2017 From: simakov.w at gmail.com (Met@ll) Date: Tue, 5 Sep 2017 10:12:54 -0700 (MST) Subject: [vtkusers] vtkArrowSource - build a vector on the plot. Message-ID: <1504631574531-0.post@n5.nabble.com> Hello! It is necessary to construct vectors on the graph. Just create a vector. but how to make sure that they all have certain meanings? I build all the construction in 3D. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Tue Sep 5 15:22:17 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 5 Sep 2017 15:22:17 -0400 Subject: [vtkusers] Crust Algorithm in VTK? In-Reply-To: References: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> Message-ID: I'm almost done making the Powercrust algorithm a VTK remote module. The results look good, but it is VERY slow. In the next couple of days, I publish details on how to use it. I need to find a test dataset that runs quickly... Bill On Tue, Sep 5, 2017 at 12:06 PM, Bill Lorensen wrote: > I got it to build with minor changes... I'll see if I can add it as a > remote module. > > > On Tue, Sep 5, 2017 at 10:53 AM, Bill Lorensen wrote: >> Unfortunately that code does not build with the current VTK... >> >> >> On Tue, Sep 5, 2017 at 10:25 AM, Simon Esneault >> wrote: >>> Hello, >>> >>> Maybe this can help ? >>> https://github.com/krm15/Powercrust >>> >>> Simon >>> >>> 2017-09-05 15:23 GMT+02:00 Paul Korir : >>>> >>>> Dear All, >>>> >>>> I recently came across the crust algorithm for computing a surface along a >>>> set of points. It seems to be a relatively powerful algorithm but is not >>>> implemented in VTK. VTK has the VTKRuledSurfaceFilter but this has major >>>> limitations in various topologies. The alternative is to use some plugins >>>> implemented for 3D Slicer but it seems like overkill to have to install 3D >>>> Slicer plus an additional plugin just to solve this problem. Obviously the >>>> better option would to implement the plugin functionality directly into VTK >>>> but obviously I cannot dictate someone's development schedule. >>>> >>>> My question is: is there something wrong with the crust algorithm that has >>>> prevented its implementation in VTK? Are there any plans for this? Is there >>>> anything better that can then be included. >>>> >>>> Thanks for shedding light on this most important of problems. >>>> >>>> -- >>>> Paul K. Korir, PhD >>>> Scientific Programmer >>>> EMBL-EBI >>>> 01223494422 >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From simakov.w at gmail.com Tue Sep 5 15:44:45 2017 From: simakov.w at gmail.com (Met@ll) Date: Tue, 5 Sep 2017 12:44:45 -0700 (MST) Subject: [vtkusers] vtkArrowSource - build a vector on the plot. In-Reply-To: <1504631574531-0.post@n5.nabble.com> References: <1504631574531-0.post@n5.nabble.com> Message-ID: <1504640685138-0.post@n5.nabble.com> A little understood ... You must scale each vtkArrowSource element. But I do not know how to do this ... -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tjlp at netease.com Tue Sep 5 21:14:23 2017 From: tjlp at netease.com (Liu_tj) Date: Wed, 6 Sep 2017 09:14:23 +0800 (CST) Subject: [vtkusers] why the DICOM image is completely white when I use lung color level and window? In-Reply-To: References: <5c61fa8d.11.15e4d41afab.Coremail.tjlp@netease.com> <4e0677e9.d.15e503c5519.Coremail.tjlp@netease.com> Message-ID: <20e0e87d.0.15e54c09fab.Coremail.tjlp@netease.com> Hi,David, Thanks. That works. Liu Peng ?2017-09-05?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?09?5? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: [vtkusers] why the DICOM image is completely white when I use lung color level and window? Hi Liu Peng, It would be something like this: ColorWindow = 1200/RescaleSlope ColorLevel = (-600 - RescaleIntercept)/RescaleSlope - David On Mon, Sep 4, 2017 at 10:11 PM, Liu_tj wrote: Hi, David, So I need to convert the window and level value, 1200 and -600, by this mapping "ModalityValue = RescaleSlope * StoredValue + RescaleIntercept" before I call the vtkImageViewer2->SetColorLevel() and SetColorWindow() function, right? Thanks Liu Peng ?2017-09-05?"David Gobbi" ??? -----????----- ???:"David Gobbi" ????:2017?09?5? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: [vtkusers] why the DICOM image is completely white when I use lung color level and window? Hi Liu Peng, Use the reader's GetRescaleSlope() and GetRescaleIntercept(). See http://dgobbi.github.io/vtk-dicom/doc/api/image_display.html and scroll down to the "Grayscale image display" section. For a run-down on some of the complications of Window/Level in DICOM, see the following: http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.11.html http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.11.2.html - David On Mon, Sep 4, 2017 at 8:18 AM, Liu_tj wrote: Hi, I use vtkImageViewer2 to display DICOM series. If I set the lung color level and window, which is -600 and 1200, to the vtkImageViewer2, the image is completely white. If I use other DICOM browser tool, with the same level and window, the DICOM is displayed correclty. What's wrong with the level and window setting to vtkImageViewer2? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From cjwant at gmail.com Wed Sep 6 00:31:31 2017 From: cjwant at gmail.com (Chris Want) Date: Tue, 5 Sep 2017 22:31:31 -0600 Subject: [vtkusers] VTKBlender Message-ID: Hi all, Many years ago I released a script to help use VTK library routines in Blender's python interpreter. When Blender 2.5 came out and Blender moved to Python 3.x, the script broke because VTK stayed on Python 2.x (so the script only worked with the Blender 2.4x series). Since VTK moved to Python 3.x fairly recently, I updated my script to work with recent VTK and Blender versions. I also moved the project to GitHub. If you are interested, you can find it here: https://github.com/cwant/VTKBlender I hope you find it useful! Regards, Chris Want From tjlp at netease.com Wed Sep 6 03:11:26 2017 From: tjlp at netease.com (Liu_tj) Date: Wed, 6 Sep 2017 15:11:26 +0800 (CST) Subject: [vtkusers] How to draw a vtkBorderWidget object by mouse clicking the points Message-ID: <32f70474.7.15e56078231.Coremail.tjlp@netease.com> Hi, Usually when we use the vtkBorderWidget, we will set the two point postions. Now I want to generate the vtkBorderWidget when mouse selects the point on the rendering window, how to do that? I call AddObserver() for vtkCommand::StartInteractionEvent and it doesn't work. This event will be triggered when the borderwidget is selected. But now for me, the widget is not generated yet. Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From kornicki.entwicklung at chello.at Wed Sep 6 05:21:38 2017 From: kornicki.entwicklung at chello.at (Entwicklung Kornicki) Date: Wed, 6 Sep 2017 11:21:38 +0200 Subject: [vtkusers] Fwd: Windows 10 does not support Microsoft Video 1 In-Reply-To: <599FE3AD.4060803@chello.at> References: <599FE3AD.4060803@chello.at> Message-ID: <715c6476-575d-8f8a-0afb-ebdd6337693b@chello.at> Dear fellows, Unfortunately I have not received any answer to this request yet. If there is anything unclear about my question, please tell me so. Best regards, Claus Volko Dear fellows, With Kitware VTK 5.8, when using the functionality to save the action that is going on in the window as an AVI file and prompting compressor options, the default codec is "Microsoft Video 1". Unfortunately, I noticed that when you save an AVI file with this codec, the default video player of Windows 10 will not be able to play the video. That's a bad thing. However, if I choose another codec from the list, such as "Intel IYUV Codec", playback works. That's the good news. Is there some way to make Kitware VTK 5.8 show only such codecs that work with the default video player of Windows 10? Best regards, Claus Volko --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr?ft. https://www.avast.com/antivirus From bill.lorensen at gmail.com Wed Sep 6 08:13:09 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 6 Sep 2017 08:13:09 -0400 Subject: [vtkusers] Crust Algorithm in VTK? In-Reply-To: <2a537988-ed7a-3728-4b92-9f9e90d89e8d@ebi.ac.uk> References: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> <2a537988-ed7a-3728-4b92-9f9e90d89e8d@ebi.ac.uk> Message-ID: I have made the Powercrust algorithm a vtk remote module. See this example that illustrates the technique and describes how to use it as a remote module. NOTE: Powercrust is covered by the GPL license which IS NOT compatible with VTK's license. Hence, we cannot distribute it with VTK. Also, commercial users should understand the implications of including this software in their products. Enjoy, Bill On Wed, Sep 6, 2017 at 5:29 AM, Paul Korir wrote: > Thanks for this. I'm looking into this. > > Any reason for not including crust? > > P > > > > On 05/09/2017 14:40, Bill Lorensen wrote: >> >> Have you tried vtkExtractSurface, >> >> Here is an example: >> https://lorensen.github.io/VTKExamples/site/Cxx/Points/ExtractSurface/ >> >> >> On Tue, Sep 5, 2017 at 9:23 AM, Paul Korir wrote: >>> >>> Dear All, >>> >>> I recently came across the crust algorithm for computing a surface along >>> a >>> set of points. It seems to be a relatively powerful algorithm but is not >>> implemented in VTK. VTK has the VTKRuledSurfaceFilter but this has major >>> limitations in various topologies. The alternative is to use some plugins >>> implemented for 3D Slicer but it seems like overkill to have to install >>> 3D >>> Slicer plus an additional plugin just to solve this problem. Obviously >>> the >>> better option would to implement the plugin functionality directly into >>> VTK >>> but obviously I cannot dictate someone's development schedule. >>> >>> My question is: is there something wrong with the crust algorithm that >>> has >>> prevented its implementation in VTK? Are there any plans for this? Is >>> there >>> anything better that can then be included. >>> >>> Thanks for shedding light on this most important of problems. >>> >>> -- >>> Paul K. Korir, PhD >>> Scientific Programmer >>> EMBL-EBI >>> 01223494422 >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > > -- > Paul K. Korir, PhD > Scientific Programmer > EMBL-EBI > 01223494422 > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Wed Sep 6 10:37:36 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 6 Sep 2017 10:37:36 -0400 Subject: [vtkusers] Crust Algorithm in VTK? In-Reply-To: References: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> <2a537988-ed7a-3728-4b92-9f9e90d89e8d@ebi.ac.uk> Message-ID: Sorry, here is a link to the example: https://lorensen.github.io/VTKExamples/site/Cxx/Points/PowercrustExtractSurface/ On Wed, Sep 6, 2017 at 8:13 AM, Bill Lorensen wrote: > I have made the Powercrust algorithm a vtk remote module. See this > example that illustrates the technique and describes how to use it as > a remote module. > > NOTE: Powercrust is covered by the GPL license which IS NOT compatible > with VTK's license. Hence, we cannot distribute it with VTK. Also, > commercial users should understand the implications of including this > software in their products. > > Enjoy, > > Bill > > > On Wed, Sep 6, 2017 at 5:29 AM, Paul Korir wrote: >> Thanks for this. I'm looking into this. >> >> Any reason for not including crust? >> >> P >> >> >> >> On 05/09/2017 14:40, Bill Lorensen wrote: >>> >>> Have you tried vtkExtractSurface, >>> >>> Here is an example: >>> https://lorensen.github.io/VTKExamples/site/Cxx/Points/ExtractSurface/ >>> >>> >>> On Tue, Sep 5, 2017 at 9:23 AM, Paul Korir wrote: >>>> >>>> Dear All, >>>> >>>> I recently came across the crust algorithm for computing a surface along >>>> a >>>> set of points. It seems to be a relatively powerful algorithm but is not >>>> implemented in VTK. VTK has the VTKRuledSurfaceFilter but this has major >>>> limitations in various topologies. The alternative is to use some plugins >>>> implemented for 3D Slicer but it seems like overkill to have to install >>>> 3D >>>> Slicer plus an additional plugin just to solve this problem. Obviously >>>> the >>>> better option would to implement the plugin functionality directly into >>>> VTK >>>> but obviously I cannot dictate someone's development schedule. >>>> >>>> My question is: is there something wrong with the crust algorithm that >>>> has >>>> prevented its implementation in VTK? Are there any plans for this? Is >>>> there >>>> anything better that can then be included. >>>> >>>> Thanks for shedding light on this most important of problems. >>>> >>>> -- >>>> Paul K. Korir, PhD >>>> Scientific Programmer >>>> EMBL-EBI >>>> 01223494422 >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >> >> -- >> Paul K. Korir, PhD >> Scientific Programmer >> EMBL-EBI >> 01223494422 >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From onatt at gmx.de Wed Sep 6 14:17:23 2017 From: onatt at gmx.de (Oliver Natt) Date: Wed, 6 Sep 2017 20:17:23 +0200 Subject: [vtkusers] Adding two lightsources to a renderer Message-ID: <97346388-611b-66ba-6320-9bc00b51b90a@gmx.de> Dear vtkusers, I encountered a weird problem when using more than one positional light source in vtk. I am pretty sure that it worked with vtk 7.1 but it stopped working with vtk 8.0.0 and 8.0.1. An example in python is given below. The scene contains a plane which should be illuminated by two spot lights. However, only one spotlight is rendered. It seems that this is always the first spotlight that is added to the renderer. Is there any workaround for this problem? Many thanks Oliver import vtk # create a rendering window and renderer renderer = vtk.vtkRenderer() render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) # create a renderwindowinteractor iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(render_window) # create a plane and add it to the renderer rectangle_source = vtk.vtkPlaneSource() rectangle_source.SetOrigin(-5.0,0.0,5.0) rectangle_source.SetPoint1(5.0,0.0,5.0) rectangle_source.SetPoint2(-5.0,0.0, -5.0) rectangle_source.SetResolution(100,100) mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(rectangle_source.GetOutputPort()) actor = vtk.vtkActor() actor.SetMapper(mapper) renderer.AddActor(actor) # set camera view renderer.ResetCamera() camera = renderer.GetActiveCamera() camera.Azimuth(40.0) camera.Elevation(30.0) # create a green light light_green = vtk.vtkLight() light_green.SetPositional(1) light_green.SetPosition(-4.0,4.0, -1.0) light_green.SetColor(0.0,1.0,0.0) light_green.SetIntensity(0.5) # create a pink ligh light_pink = vtk.vtkLight() light_pink.SetPositional(1) light_pink.SetPosition(4.0,5.0,1.0) light_pink.SetColor(1.0,0.0,1.0) light_pink.SetIntensity(0.6) # add lights to the renderer # # This is interesting in vtk 8.0.0 and 8.0.1: # Only the pink light spot is visible. If the two statements are swapped, # only the green light is visible. It seems that always only the first # light can be active. renderer.AddLight(light_pink) renderer.AddLight(light_green) # define a background for better visibility renderer.SetBackground(0.2,0.2,0.5) renderer.SetBackground2(0.4,0.4,1.0) renderer.SetGradientBackground(True) # enable interactor iren.Initialize() render_window.Render() iren.Start() -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Wed Sep 6 14:16:13 2017 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Wed, 6 Sep 2017 18:16:13 +0000 Subject: [vtkusers] Parallel Projection to Perspective Mode calculation Message-ID: <46CB11F12B9DC24D860D4082451B318A777D5135@exchange3.microbrightfield.com> Hey all, What is the calculation between parallel projection and perspective mode? I have a situation where the user is in Parallel Projection Mode and then zooms in on the object in my scene. When he switches to Perspective Mode, he would like the scene to look the same (i.e. move the camera to that location). Dougie -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 6 15:05:26 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 6 Sep 2017 13:05:26 -0600 Subject: [vtkusers] Parallel Projection to Perspective Mode calculation In-Reply-To: <46CB11F12B9DC24D860D4082451B318A777D5135@exchange3.microbrightfield.com> References: <46CB11F12B9DC24D860D4082451B318A777D5135@exchange3.microbrightfield.com> Message-ID: Basic trigonometry. Imagine a right triangle with its pointy end at the camera and its "foot" at the focal point. If the angle at the foot is "phi", then the height at the foot is d*tan(phi) where "d" is the camera distance. Perspective view angle is 2*phi. Parallel height is 2*d*tan(phi). - David On Wed, Sep 6, 2017 at 12:16 PM, Doug Hoppes wrote: > Hey all, > > > > What is the calculation between parallel projection and > perspective mode? I have a situation where the user is in Parallel > Projection Mode and then zooms in on the object in my scene. When he > switches to Perspective Mode, he would like the scene to look the same > (i.e. move the camera to that location). > > > > Dougie > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From p3tr.matousek at gmail.com Thu Sep 7 10:08:36 2017 From: p3tr.matousek at gmail.com (=?UTF-8?Q?Petr_Matou=c5=a1ek?=) Date: Thu, 7 Sep 2017 16:08:36 +0200 Subject: [vtkusers] custom vtkAbstractWidget + vtkWidgetRepresentation in Java In-Reply-To: References: Message-ID: Hello, can anybody suggest how to implement custom vtkAbstractWidget and vtkWidgetRepresentation in Java? Is it even possible? I tried it but failed. 1. The first problem I encountered was that vtkAbstractWidget uses its protected field WidgetRep, but there is no way how to set it from Java code. Only public methods are accessible from Java. So I introduced my own field in the Java class and overrided the GetRepresentation() method to return it. So far so good: public class CoordRangeVtkLineWidget extends vtkAbstractWidget { private final vtkLineRepresentation representation; public CoordRangeVtkLineWidget(final CoordRange coordRange) { super(); this.representation = new vtkLineRepresentation(); } @Override public vtkWidgetRepresentation GetRepresentation() { return this.representation; } } 2. But then the SetInteractor() method started to fail for my widget with SIGSEGV crash. I guess this is due to the fact that the observer mechanism is implemented a bit differently in Java. So it is not possible to call the original AddObserver() methods with Java object instances. So I skipped the interactor for the moment: @Override public void SetInteractor(final vtkRenderWindowInteractor interactor) { // TODO } 3. Then vtkAbstractWidget::SetEnabled() started to fail with SIGSEGV of course. So I stopped and start to think: this would be quite difficult. In fact I will probably have to reimplement the whole vtkAbstractWidget in Java to make it work. So does anybody any experience with this. Any suggestions? Am I going wrong direction? Please. Best regards, Petr Matousek From sebastien.jourdain at kitware.com Thu Sep 7 10:54:28 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 7 Sep 2017 08:54:28 -0600 Subject: [vtkusers] custom vtkAbstractWidget + vtkWidgetRepresentation in Java In-Reply-To: References: Message-ID: Hi Petr, I think you have to implement your code in C++ and then use it within Java. Seb On Thu, Sep 7, 2017 at 8:08 AM, Petr Matou?ek wrote: > Hello, > > can anybody suggest how to implement custom vtkAbstractWidget and > vtkWidgetRepresentation in Java? Is it even possible? > > I tried it but failed. > > 1. The first problem I encountered was that vtkAbstractWidget uses its > protected field WidgetRep, but there is no way how to set it from Java > code. Only public methods are accessible from Java. So I introduced my own > field in the Java class and overrided the GetRepresentation() method to > return it. So far so good: > > public class CoordRangeVtkLineWidget extends vtkAbstractWidget { > > private final vtkLineRepresentation representation; > > public CoordRangeVtkLineWidget(final CoordRange coordRange) { > super(); > this.representation = new vtkLineRepresentation(); > } > > @Override > public vtkWidgetRepresentation GetRepresentation() { > return this.representation; > } > } > > 2. But then the SetInteractor() method started to fail for my widget with > SIGSEGV crash. I guess this is due to the fact that the observer mechanism > is implemented a bit differently in Java. So it is not possible to call the > original AddObserver() methods with Java object instances. > > So I skipped the interactor for the moment: > > @Override > public void SetInteractor(final vtkRenderWindowInteractor interactor) { > // TODO > } > > 3. Then vtkAbstractWidget::SetEnabled() started to fail with SIGSEGV of > course. > > So I stopped and start to think: this would be quite difficult. In fact I > will probably have to reimplement the whole vtkAbstractWidget in Java to > make it work. > > So does anybody any experience with this. Any suggestions? Am I going > wrong direction? Please. > > Best regards, Petr Matousek > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Sep 7 11:03:16 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 7 Sep 2017 11:03:16 -0400 Subject: [vtkusers] VTKBlender In-Reply-To: References: Message-ID: Really cool! Thanks for the update, Chris! Cory On Wed, Sep 6, 2017 at 12:31 AM, Chris Want wrote: > Hi all, > > Many years ago I released a script to help use VTK library routines in > Blender's python interpreter. When Blender 2.5 came out and Blender > moved to Python 3.x, the script broke because VTK stayed on > Python 2.x (so the script only worked with the Blender 2.4x series). > > Since VTK moved to Python 3.x fairly recently, I updated my script to work > with recent VTK and Blender versions. I also moved the project to GitHub. > If you are interested, you can find it here: > > https://github.com/cwant/VTKBlender > > I hope you find it useful! > > Regards, > Chris Want > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From cory.quammen at kitware.com Thu Sep 7 11:08:09 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 7 Sep 2017 11:08:09 -0400 Subject: [vtkusers] Windows 10 does not support Microsoft Video 1 In-Reply-To: <599FE3AD.4060803@chello.at> References: <599FE3AD.4060803@chello.at> Message-ID: > With Kitware VTK 5.8, when using the functionality to save the action that > is going on in the window as an AVI file and prompting compressor options, > the default codec is "Microsoft Video 1". Unfortunately, I noticed that when > you save an AVI file with this codec, the default video player of Windows 10 > will not be able to play the video. That's a bad thing. However, if I choose > another codec from the list, such as "Intel IYUV Codec", playback works. > That's the good news. > > Is there some way to make Kitware VTK 5.8 show only such codecs that work > with the default video player of Windows 10? I'm not sure what you mean by the "functionality to save the action". Could you describe what you are doing? Are you running an example? Thanks, Cory > Best regards, > Claus Volko > > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From dave.demarle at kitware.com Thu Sep 7 12:02:49 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 7 Sep 2017 12:02:49 -0400 Subject: [vtkusers] Do you have data that I might show off OSPRay rendering with? Message-ID: Hi lists, We've been working lately to expose OSPRay's path traced lights and materials inside VTK and ParaView. I'd like to make some snazzy photorealistic images and movies now and post them on the website, at conferences and in press releases. Unsurprisingly the images I can make out of vtkSphereSource and the like, are not all that compelling. That's why I'm reaching out to see if anyone has some great looking, real world, data that I might work with. I am thinking something like a car with lots of glass and metal and rubber would be ideal - especially if the data also had some interesting attribute data on it that I could colormap at the same time. I'm more than happy to attribute the data however you like. Feel free to contact me off-list if you like. thanks David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Sep 7 12:22:18 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 7 Sep 2017 12:22:18 -0400 Subject: [vtkusers] Do you have data that I might show off OSPRay rendering with? In-Reply-To: References: Message-ID: How about these insects. Here is an example: https://lorensen.github.io/VTKExamples/site/Cxx/IO/VRMLImporterDemo/ There is a link on the example page. Also, https://free3d.com/ has lots of free models in various formats. I got the model shown in this example from that site: https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/ The data is here: https://github.com/lorensen/VTKExamples/tree/master/src/Testing/Data/doorman Also, lots of interesting biological stuff at: https://3dprint.nih.gov/discover On Thu, Sep 7, 2017 at 12:02 PM, David E DeMarle wrote: > Hi lists, > > We've been working lately to expose OSPRay's path traced lights and > materials inside VTK and ParaView. I'd like to make some snazzy > photorealistic images and movies now and post them on the website, at > conferences and in press releases. > > Unsurprisingly the images I can make out of vtkSphereSource and the like, > are not all that compelling. That's why I'm reaching out to see if anyone > has some great looking, real world, data that I might work with. > > I am thinking something like a car with lots of glass and metal and rubber > would be ideal - especially if the data also had some interesting attribute > data on it that I could colormap at the same time. I'm more than happy to > attribute the data however you like. > > Feel free to contact me off-list if you like. > > thanks > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From ken.martin at kitware.com Thu Sep 7 12:27:40 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 7 Sep 2017 12:27:40 -0400 Subject: [vtkusers] Adding two lightsources to a renderer In-Reply-To: <97346388-611b-66ba-6320-9bc00b51b90a@gmx.de> References: <97346388-611b-66ba-6320-9bc00b51b90a@gmx.de> Message-ID: I just tested this and it seems to work on master. This is the image I get. Maybe this is an issue that has been fixed since 8.0 was cut? [image: Inline image 1] On Wed, Sep 6, 2017 at 2:17 PM, Oliver Natt wrote: > Dear vtkusers, > > I encountered a weird problem when using more than one positional light > source in vtk. I am pretty sure that it worked with vtk 7.1 but it stopped > working with vtk 8.0.0 and 8.0.1. An example in python is given below. The > scene contains a plane which should be illuminated by two spot lights. > However, only one spotlight is rendered. It seems that this is always the > first spotlight that is added to the renderer. Is there any workaround for > this problem? > > Many thanks > Oliver > > > import vtk > # create a rendering window and rendererrenderer = vtk.vtkRenderer() > render_window = vtk.vtkRenderWindow() > render_window.AddRenderer(renderer) > # create a renderwindowinteractoriren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(render_window) > # create a plane and add it to the rendererrectangle_source = vtk.vtkPlaneSource() > rectangle_source.SetOrigin(-5.0, 0.0, 5.0) > rectangle_source.SetPoint1(5.0, 0.0, 5.0) > rectangle_source.SetPoint2(-5.0, 0.0, -5.0) > rectangle_source.SetResolution(100, 100) > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputConnection(rectangle_source.GetOutputPort()) > actor = vtk.vtkActor() > actor.SetMapper(mapper) > renderer.AddActor(actor) > # set camera viewrenderer.ResetCamera() > camera = renderer.GetActiveCamera() > camera.Azimuth(40.0) > camera.Elevation(30.0) > # create a green lightlight_green = vtk.vtkLight() > light_green.SetPositional(1) > light_green.SetPosition(-4.0, 4.0, -1.0) > light_green.SetColor(0.0, 1.0, 0.0) > light_green.SetIntensity(0.5) > # create a pink lighlight_pink = vtk.vtkLight() > light_pink.SetPositional(1) > light_pink.SetPosition(4.0, 5.0, 1.0) > light_pink.SetColor(1.0, 0.0, 1.0) > light_pink.SetIntensity(0.6) > # add lights to the renderer## This is interesting in vtk 8.0.0 and 8.0.1:# Only the pink light spot is visible. If the two statements are swapped,# only the green light is visible. It seems that always only the first# light can be active.renderer.AddLight(light_pink) > renderer.AddLight(light_green) > # define a background for better visibilityrenderer.SetBackground(0.2, 0.2, 0.5) > renderer.SetBackground2(0.4, 0.4, 1.0) > renderer.SetGradientBackground(True) > # enable interactoriren.Initialize() > render_window.Render() > iren.Start() > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 18129 bytes Desc: not available URL: From dave.demarle at kitware.com Thu Sep 7 12:29:08 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 7 Sep 2017 12:29:08 -0400 Subject: [vtkusers] Do you have data that I might show off OSPRay rendering with? In-Reply-To: References: Message-ID: Thanks for the references Bill. My backup plan is to find a suitably licensed model of a car from one of the sites like free3d, but I'm hoping for something more "real world" from someone's day to day work out there. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Sep 7, 2017 at 12:22 PM, Bill Lorensen wrote: > How about these insects. Here is an example: > https://lorensen.github.io/VTKExamples/site/Cxx/IO/VRMLImporterDemo/ > > There is a link on the example page. > > Also, https://free3d.com/ has lots of free models in various formats. > I got the model shown in this example from that site: > https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/ > The data is here: > https://github.com/lorensen/VTKExamples/tree/master/src/ > Testing/Data/doorman > > Also, lots of interesting biological stuff at: > https://3dprint.nih.gov/discover > > On Thu, Sep 7, 2017 at 12:02 PM, David E DeMarle > wrote: > > Hi lists, > > > > We've been working lately to expose OSPRay's path traced lights and > > materials inside VTK and ParaView. I'd like to make some snazzy > > photorealistic images and movies now and post them on the website, at > > conferences and in press releases. > > > > Unsurprisingly the images I can make out of vtkSphereSource and the like, > > are not all that compelling. That's why I'm reaching out to see if anyone > > has some great looking, real world, data that I might work with. > > > > I am thinking something like a car with lots of glass and metal and > rubber > > would be ideal - especially if the data also had some interesting > attribute > > data on it that I could colormap at the same time. I'm more than happy to > > attribute the data however you like. > > > > Feel free to contact me off-list if you like. > > > > thanks > > > > David E DeMarle > > Kitware, Inc. > > Principal Engineer > > 21 Corporate Drive > > Clifton Park, NY 12065-8662 > > Phone: 518-881-4909 > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Sep 7 12:36:31 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 7 Sep 2017 12:36:31 -0400 Subject: [vtkusers] Do you have data that I might show off OSPRay rendering with? In-Reply-To: References: Message-ID: The NIH models are "real world", but thee are not cars... On Thu, Sep 7, 2017 at 12:29 PM, David E DeMarle wrote: > Thanks for the references Bill. > > My backup plan is to find a suitably licensed model of a car from one of the > sites like free3d, but I'm hoping for something more "real world" from > someone's day to day work out there. > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Sep 7, 2017 at 12:22 PM, Bill Lorensen > wrote: >> >> How about these insects. Here is an example: >> https://lorensen.github.io/VTKExamples/site/Cxx/IO/VRMLImporterDemo/ >> >> There is a link on the example page. >> >> Also, https://free3d.com/ has lots of free models in various formats. >> I got the model shown in this example from that site: >> https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/ >> The data is here: >> >> https://github.com/lorensen/VTKExamples/tree/master/src/Testing/Data/doorman >> >> Also, lots of interesting biological stuff at: >> https://3dprint.nih.gov/discover >> >> On Thu, Sep 7, 2017 at 12:02 PM, David E DeMarle >> wrote: >> > Hi lists, >> > >> > We've been working lately to expose OSPRay's path traced lights and >> > materials inside VTK and ParaView. I'd like to make some snazzy >> > photorealistic images and movies now and post them on the website, at >> > conferences and in press releases. >> > >> > Unsurprisingly the images I can make out of vtkSphereSource and the >> > like, >> > are not all that compelling. That's why I'm reaching out to see if >> > anyone >> > has some great looking, real world, data that I might work with. >> > >> > I am thinking something like a car with lots of glass and metal and >> > rubber >> > would be ideal - especially if the data also had some interesting >> > attribute >> > data on it that I could colormap at the same time. I'm more than happy >> > to >> > attribute the data however you like. >> > >> > Feel free to contact me off-list if you like. >> > >> > thanks >> > >> > David E DeMarle >> > Kitware, Inc. >> > Principal Engineer >> > 21 Corporate Drive >> > Clifton Park, NY 12065-8662 >> > Phone: 518-881-4909 >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Thu Sep 7 12:37:21 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 7 Sep 2017 12:37:21 -0400 Subject: [vtkusers] Adding two lightsources to a renderer In-Reply-To: References: <97346388-611b-66ba-6320-9bc00b51b90a@gmx.de> Message-ID: Ken, Can you send me the code? I'll make a VTKExample... On Thu, Sep 7, 2017 at 12:27 PM, Ken Martin wrote: > I just tested this and it seems to work on master. This is the image I > get. Maybe this is an issue that has been fixed since 8.0 was cut? > > > > [image: Inline image 1] > > On Wed, Sep 6, 2017 at 2:17 PM, Oliver Natt wrote: > >> Dear vtkusers, >> >> I encountered a weird problem when using more than one positional light >> source in vtk. I am pretty sure that it worked with vtk 7.1 but it stopped >> working with vtk 8.0.0 and 8.0.1. An example in python is given below. The >> scene contains a plane which should be illuminated by two spot lights. >> However, only one spotlight is rendered. It seems that this is always the >> first spotlight that is added to the renderer. Is there any workaround for >> this problem? >> >> Many thanks >> Oliver >> >> >> import vtk >> # create a rendering window and rendererrenderer = vtk.vtkRenderer() >> render_window = vtk.vtkRenderWindow() >> render_window.AddRenderer(renderer) >> # create a renderwindowinteractoriren = vtk.vtkRenderWindowInteractor() >> iren.SetRenderWindow(render_window) >> # create a plane and add it to the rendererrectangle_source = vtk.vtkPlaneSource() >> rectangle_source.SetOrigin(-5.0, 0.0, 5.0) >> rectangle_source.SetPoint1(5.0, 0.0, 5.0) >> rectangle_source.SetPoint2(-5.0, 0.0, -5.0) >> rectangle_source.SetResolution(100, 100) >> mapper = vtk.vtkPolyDataMapper() >> mapper.SetInputConnection(rectangle_source.GetOutputPort()) >> actor = vtk.vtkActor() >> actor.SetMapper(mapper) >> renderer.AddActor(actor) >> # set camera viewrenderer.ResetCamera() >> camera = renderer.GetActiveCamera() >> camera.Azimuth(40.0) >> camera.Elevation(30.0) >> # create a green lightlight_green = vtk.vtkLight() >> light_green.SetPositional(1) >> light_green.SetPosition(-4.0, 4.0, -1.0) >> light_green.SetColor(0.0, 1.0, 0.0) >> light_green.SetIntensity(0.5) >> # create a pink lighlight_pink = vtk.vtkLight() >> light_pink.SetPositional(1) >> light_pink.SetPosition(4.0, 5.0, 1.0) >> light_pink.SetColor(1.0, 0.0, 1.0) >> light_pink.SetIntensity(0.6) >> # add lights to the renderer## This is interesting in vtk 8.0.0 and 8.0.1:# Only the pink light spot is visible. If the two statements are swapped,# only the green light is visible. It seems that always only the first# light can be active.renderer.AddLight(light_pink) >> renderer.AddLight(light_green) >> # define a background for better visibilityrenderer.SetBackground(0.2, 0.2, 0.5) >> renderer.SetBackground2(0.4, 0.4, 1.0) >> renderer.SetGradientBackground(True) >> # enable interactoriren.Initialize() >> render_window.Render() >> iren.Start() >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 18129 bytes Desc: not available URL: From ken.martin at kitware.com Thu Sep 7 12:40:22 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 7 Sep 2017 12:40:22 -0400 Subject: [vtkusers] Adding two lightsources to a renderer In-Reply-To: References: <97346388-611b-66ba-6320-9bc00b51b90a@gmx.de> Message-ID: I used the example provided by Oliver (in his email) On Thu, Sep 7, 2017 at 12:37 PM, Bill Lorensen wrote: > Ken, > > Can you send me the code? I'll make a VTKExample... > > On Thu, Sep 7, 2017 at 12:27 PM, Ken Martin > wrote: > >> I just tested this and it seems to work on master. This is the image I >> get. Maybe this is an issue that has been fixed since 8.0 was cut? >> >> >> >> [image: Inline image 1] >> >> On Wed, Sep 6, 2017 at 2:17 PM, Oliver Natt wrote: >> >>> Dear vtkusers, >>> >>> I encountered a weird problem when using more than one positional light >>> source in vtk. I am pretty sure that it worked with vtk 7.1 but it stopped >>> working with vtk 8.0.0 and 8.0.1. An example in python is given below. The >>> scene contains a plane which should be illuminated by two spot lights. >>> However, only one spotlight is rendered. It seems that this is always the >>> first spotlight that is added to the renderer. Is there any workaround for >>> this problem? >>> >>> Many thanks >>> Oliver >>> >>> >>> import vtk >>> # create a rendering window and rendererrenderer = vtk.vtkRenderer() >>> render_window = vtk.vtkRenderWindow() >>> render_window.AddRenderer(renderer) >>> # create a renderwindowinteractoriren = vtk.vtkRenderWindowInteractor() >>> iren.SetRenderWindow(render_window) >>> # create a plane and add it to the rendererrectangle_source = vtk.vtkPlaneSource() >>> rectangle_source.SetOrigin(-5.0, 0.0, 5.0) >>> rectangle_source.SetPoint1(5.0, 0.0, 5.0) >>> rectangle_source.SetPoint2(-5.0, 0.0, -5.0) >>> rectangle_source.SetResolution(100, 100) >>> mapper = vtk.vtkPolyDataMapper() >>> mapper.SetInputConnection(rectangle_source.GetOutputPort()) >>> actor = vtk.vtkActor() >>> actor.SetMapper(mapper) >>> renderer.AddActor(actor) >>> # set camera viewrenderer.ResetCamera() >>> camera = renderer.GetActiveCamera() >>> camera.Azimuth(40.0) >>> camera.Elevation(30.0) >>> # create a green lightlight_green = vtk.vtkLight() >>> light_green.SetPositional(1) >>> light_green.SetPosition(-4.0, 4.0, -1.0) >>> light_green.SetColor(0.0, 1.0, 0.0) >>> light_green.SetIntensity(0.5) >>> # create a pink lighlight_pink = vtk.vtkLight() >>> light_pink.SetPositional(1) >>> light_pink.SetPosition(4.0, 5.0, 1.0) >>> light_pink.SetColor(1.0, 0.0, 1.0) >>> light_pink.SetIntensity(0.6) >>> # add lights to the renderer## This is interesting in vtk 8.0.0 and 8.0.1:# Only the pink light spot is visible. If the two statements are swapped,# only the green light is visible. It seems that always only the first# light can be active.renderer.AddLight(light_pink) >>> renderer.AddLight(light_green) >>> # define a background for better visibilityrenderer.SetBackground(0.2, 0.2, 0.5) >>> renderer.SetBackground2(0.4, 0.4, 1.0) >>> renderer.SetGradientBackground(True) >>> # enable interactoriren.Initialize() >>> render_window.Render() >>> iren.Start() >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Ken Martin PhD >> Distinguished Engineer >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Unpaid intern in BillsBasement at noware dot com > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 18129 bytes Desc: not available URL: From simakov.w at gmail.com Thu Sep 7 14:15:11 2017 From: simakov.w at gmail.com (Met@ll) Date: Thu, 7 Sep 2017 11:15:11 -0700 (MST) Subject: [vtkusers] vtkArrowSource - rotate vectors Message-ID: <1504808111851-0.post@n5.nabble.com> Good day. How can I rotate a vector? already the third day I can not understand ... what parameter in vtkPolyData is responsible for this? Thank you =) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From onatt at gmx.de Thu Sep 7 14:35:27 2017 From: onatt at gmx.de (Oliver Natt) Date: Thu, 7 Sep 2017 20:35:27 +0200 Subject: [vtkusers] Adding two lightsources to a renderer In-Reply-To: References: <97346388-611b-66ba-6320-9bc00b51b90a@gmx.de> Message-ID: Dear Ken, thanks a lot for testing my example. Your rendering result is exactly what I expected. I will try to compile the master on my computer. Best regards, Oliver Am 07.09.2017 um 18:27 schrieb Ken Martin: > I just tested this and it seems to work on master. This is the image I > get. Maybe this is an issue that has been fixed since 8.0 was cut? From bill.lorensen at gmail.com Thu Sep 7 15:02:15 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 7 Sep 2017 15:02:15 -0400 Subject: [vtkusers] vtkArrowSource - rotate vectors In-Reply-To: <1504808111851-0.post@n5.nabble.com> References: <1504808111851-0.post@n5.nabble.com> Message-ID: Perhaps this example will help, https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/OrientedArrow/ On Thu, Sep 7, 2017 at 2:15 PM, Met at ll wrote: > Good day. > How can I rotate a vector? > already the third day I can not understand ... > what parameter in vtkPolyData is responsible for this? > Thank you =) > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From pkorir at ebi.ac.uk Fri Sep 8 08:32:55 2017 From: pkorir at ebi.ac.uk (Paul Korir) Date: Fri, 8 Sep 2017 13:32:55 +0100 Subject: [vtkusers] Crust Algorithm in VTK? In-Reply-To: References: <249bdf5c-0f73-884d-ae70-493681e5eb2d@ebi.ac.uk> <2a537988-ed7a-3728-4b92-9f9e90d89e8d@ebi.ac.uk> Message-ID: <521be8d7-f1c4-fa9c-0441-0bc3e98f3695@ebi.ac.uk> Thanks for the very useful replies. Paul On 06/09/2017 15:37, Bill Lorensen wrote: > Sorry, > > here is a link to the example: > https://lorensen.github.io/VTKExamples/site/Cxx/Points/PowercrustExtractSurface/ > > > On Wed, Sep 6, 2017 at 8:13 AM, Bill Lorensen wrote: >> I have made the Powercrust algorithm a vtk remote module. See this >> example that illustrates the technique and describes how to use it as >> a remote module. >> >> NOTE: Powercrust is covered by the GPL license which IS NOT compatible >> with VTK's license. Hence, we cannot distribute it with VTK. Also, >> commercial users should understand the implications of including this >> software in their products. >> >> Enjoy, >> >> Bill >> >> >> On Wed, Sep 6, 2017 at 5:29 AM, Paul Korir wrote: >>> Thanks for this. I'm looking into this. >>> >>> Any reason for not including crust? >>> >>> P >>> >>> >>> >>> On 05/09/2017 14:40, Bill Lorensen wrote: >>>> Have you tried vtkExtractSurface, >>>> >>>> Here is an example: >>>> https://lorensen.github.io/VTKExamples/site/Cxx/Points/ExtractSurface/ >>>> >>>> >>>> On Tue, Sep 5, 2017 at 9:23 AM, Paul Korir wrote: >>>>> Dear All, >>>>> >>>>> I recently came across the crust algorithm for computing a surface along >>>>> a >>>>> set of points. It seems to be a relatively powerful algorithm but is not >>>>> implemented in VTK. VTK has the VTKRuledSurfaceFilter but this has major >>>>> limitations in various topologies. The alternative is to use some plugins >>>>> implemented for 3D Slicer but it seems like overkill to have to install >>>>> 3D >>>>> Slicer plus an additional plugin just to solve this problem. Obviously >>>>> the >>>>> better option would to implement the plugin functionality directly into >>>>> VTK >>>>> but obviously I cannot dictate someone's development schedule. >>>>> >>>>> My question is: is there something wrong with the crust algorithm that >>>>> has >>>>> prevented its implementation in VTK? Are there any plans for this? Is >>>>> there >>>>> anything better that can then be included. >>>>> >>>>> Thanks for shedding light on this most important of problems. >>>>> >>>>> -- >>>>> Paul K. Korir, PhD >>>>> Scientific Programmer >>>>> EMBL-EBI >>>>> 01223494422 >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> -- >>> Paul K. Korir, PhD >>> Scientific Programmer >>> EMBL-EBI >>> 01223494422 >>> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > -- Paul K. Korir, PhD Scientific Programmer EMBL-EBI 01223494422 From jayavardhanravi at outlook.com Fri Sep 8 18:38:01 2017 From: jayavardhanravi at outlook.com (Jay) Date: Fri, 8 Sep 2017 15:38:01 -0700 (MST) Subject: [vtkusers] VTK Render Window Crashes after 6 hours of running Message-ID: <1504910281887-0.post@n5.nabble.com> I created a simple project to render the sphere to render window. The rendering works fine with no issues. vtkTransform is used to rotate the sphere. The rendering is left to run for a long time. After 6 hours 40 minutes the VTK application crashes with error message shown below: ERROR :/ *Exception thrown at 0xeqwewqeqwe (nvoglv32.dll) in XXXX.exe: 0xC0000005: Access violation reading location 0x00000020.*/ My system uses the NVIDIA Graphic card. And my memory usage is low at the time of crashing. NVIDIA Memory usage : / 4096 MiB 387 MiB 3709 MiB 256 MiB 4 MiB 252 MiB / Code used: /#include #include #include #include #include #include #include #include int main() { vtkSmartPointer src = vtkSmartPointer::New(); src->SetRadius(5); src->Update(); vtkSmartPointer tran = vtkSmartPointer::New(); vtkSmartPointer maper = vtkSmartPointer::New(); maper->SetInputConnection(src->GetOutputPort()); vtkSmartPointer act = vtkSmartPointer::New(); act->SetMapper(maper); act->SetUserTransform(tran); vtkSmartPointer rer = vtkSmartPointer::New(); vtkSmartPointer rew = vtkSmartPointer::New(); vtkSmartPointer rei = vtkSmartPointer::New(); rer->AddActor(act); rew->AddRenderer(rer); rew->SetInteractor(rei); rei->Initialize(); while (true) { tran->RotateX(90); rer->Modified(); rew->Render(); } }/ -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Fri Sep 8 19:47:29 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 8 Sep 2017 19:47:29 -0400 Subject: [vtkusers] VTK Render Window Crashes after 6 hours of running In-Reply-To: <1504910281887-0.post@n5.nabble.com> References: <1504910281887-0.post@n5.nabble.com> Message-ID: Normally we don't create OpenGL classes. Try using vtkPolyDataMapper and vtkActor. On Fri, Sep 8, 2017 at 6:38 PM, Jay wrote: > I created a simple project to render the sphere to render window. The > rendering works fine with no issues. vtkTransform is used to rotate the > sphere. The rendering is left to run for a long time. After 6 hours 40 > minutes the VTK application crashes with error message shown below: > > ERROR :/ *Exception thrown at 0xeqwewqeqwe (nvoglv32.dll) in XXXX.exe: > 0xC0000005: Access violation reading location 0x00000020.*/ > > My system uses the NVIDIA Graphic card. And my memory usage is low at the > time of crashing. > NVIDIA Memory usage : > / > 4096 MiB > 387 MiB > 3709 MiB > > > 256 MiB > 4 MiB > 252 MiB > / > > Code used: > > /#include > #include > #include > #include > #include > #include > #include > #include > > int main() > { > vtkSmartPointer src = > vtkSmartPointer::New(); > src->SetRadius(5); > src->Update(); > vtkSmartPointer tran = vtkSmartPointer::New(); > vtkSmartPointer maper = > vtkSmartPointer::New(); > maper->SetInputConnection(src->GetOutputPort()); > vtkSmartPointer act = > vtkSmartPointer::New(); > act->SetMapper(maper); > act->SetUserTransform(tran); > vtkSmartPointer rer = vtkSmartPointer::New(); > vtkSmartPointer rew = > vtkSmartPointer::New(); > vtkSmartPointer rei = > vtkSmartPointer::New(); > rer->AddActor(act); > rew->AddRenderer(rer); > rew->SetInteractor(rei); > rei->Initialize(); > while (true) > { > tran->RotateX(90); > rer->Modified(); > rew->Render(); > } > }/ > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From lee_jennifer_82 at yahoo.com Fri Sep 8 21:00:22 2017 From: lee_jennifer_82 at yahoo.com (Jennifer Lee) Date: Sat, 9 Sep 2017 01:00:22 +0000 (UTC) Subject: [vtkusers] Problem with VTK installation References: <1681507777.5788788.1504918822335.ref@mail.yahoo.com> Message-ID: <1681507777.5788788.1504918822335@mail.yahoo.com> Hello,???? I've downloaded the latest version of CMake 3.9.2. After installation, whenever I'm trying to configure? VTK 8.0.1 with Visual Studio 2015, I'm getting the following errors: "Error in configuration process, project files may be invalid." ?? Could anyone help me with fixing this? Any help will be highly appreciated.?? Thanks in advance! Regards,Jennifer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at cascadeacoustic.com Sat Sep 9 01:23:07 2017 From: mark at cascadeacoustic.com (Mark DeArman) Date: Sat, 9 Sep 2017 00:23:07 -0500 Subject: [vtkusers] Activiz 7.1.1 Binary Build Message-ID: Since people were asking, I have uploaded the binaries for people to test out. I am building with Intel C++ 16, an I have not yet sorted out the redist issues with the standard Activiz installer. Seems to be working fine with my standard Wix template. I updated the VTK repo with a minor change to check for GCCXML during preprocessing. I added CMakeCache.sample to each repo, to illustrate a typical configuration. https://github.com/dearman/activizdotnet Visual Studio 2013 / Intel C++ 2016 / CSC .NET 4.0 (x86) Debug http://www.cascadeacoustic.com/files/downloads/General/ActiViz_711d.zip When I get a little more free time I'll add a x64 build and update the README. Mark DeArman Cascade Acoustic Research http://www.cascadeacoustic.com (253) 200-5353 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Sat Sep 9 07:52:44 2017 From: lasso at queensu.ca (Andras Lasso) Date: Sat, 9 Sep 2017 11:52:44 +0000 Subject: [vtkusers] VTK Render Window Crashes after 6 hours of running In-Reply-To: References: <1504910281887-0.post@n5.nabble.com> Message-ID: Jay, could you please test this with the latest VTK master version, OpenGL2 backend, latest graphics card drivers, GPU threaded optimization disabled, on at least 3-4 different computers, and let us know what you find? Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Bill Lorensen Sent: Friday, September 8, 2017 7:47 PM To: Jay Cc: VTK Users Subject: Re: [vtkusers] VTK Render Window Crashes after 6 hours of running Normally we don't create OpenGL classes. Try using vtkPolyDataMapper and vtkActor. On Fri, Sep 8, 2017 at 6:38 PM, Jay wrote: > I created a simple project to render the sphere to render window. The > rendering works fine with no issues. vtkTransform is used to rotate > the sphere. The rendering is left to run for a long time. After 6 > hours 40 minutes the VTK application crashes with error message shown below: > > ERROR :/ *Exception thrown at 0xeqwewqeqwe (nvoglv32.dll) in XXXX.exe: > 0xC0000005: Access violation reading location 0x00000020.*/ > > My system uses the NVIDIA Graphic card. And my memory usage is low at > the time of crashing. > NVIDIA Memory usage : > / > 4096 MiB > 387 MiB > 3709 MiB > > > 256 MiB > 4 MiB > 252 MiB > / > > Code used: > > /#include #include > #include #include > #include #include #include > #include > > int main() > { > vtkSmartPointer src = > vtkSmartPointer::New(); > src->SetRadius(5); > src->Update(); > vtkSmartPointer tran = vtkSmartPointer::New(); > vtkSmartPointer maper = > vtkSmartPointer::New(); > maper->SetInputConnection(src->GetOutputPort()); > vtkSmartPointer act = > vtkSmartPointer::New(); > act->SetMapper(maper); > act->SetUserTransform(tran); > vtkSmartPointer rer = vtkSmartPointer::New(); > vtkSmartPointer rew = > vtkSmartPointer::New(); > vtkSmartPointer rei = > vtkSmartPointer::New(); > rer->AddActor(act); > rew->AddRenderer(rer); > rew->SetInteractor(rei); > rei->Initialize(); > while (true) > { > tran->RotateX(90); > rer->Modified(); > rew->Render(); > } > }/ > > > > -- > Sent from: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.10 > 45678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40q > ueensu.ca%7Cf118edbc4b864378c1d108d4f713faf3%7Cd61ecb3b38b142d582c4efb > 2838b925c%7C1%7C0%7C636405112563407632&sdata=sXA4F1S0SwlogOiI8Vq3jb3I% > 2BFgNZzvCzFw5818cVbc%3D&reserved=0 > _______________________________________________ > Powered by > https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&dat > a=02%7C01%7Classo%40queensu.ca%7Cf118edbc4b864378c1d108d4f713faf3%7Cd6 > 1ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636405112563407632&sdata=Y%2F > AdOsYG5yTpedbydlqYNqBy3BCe%2B4VYSaqHXDUnhYE%3D&reserved=0 > > Visit other Kitware open-source projects at > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ki > tware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queens > u.ca%7Cf118edbc4b864378c1d108d4f713faf3%7Cd61ecb3b38b142d582c4efb2838b > 925c%7C1%7C0%7C636405112563407632&sdata=aNNwwpayx8a1lbfJtZrXZ6wzgxuaUB > aEHRtbOJyfAZw%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vt > k.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Cf118edbc4b8 > 64378c1d108d4f713faf3%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636 > 405112563407632&sdata=13phBQMsH%2BgCX7xDfUImboWQihKwEOqXtOz7fAKeku4%3D > &reserved=0 > > Search the list archives at: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkma > il.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C > f118edbc4b864378c1d108d4f713faf3%7Cd61ecb3b38b142d582c4efb2838b925c%7C > 1%7C0%7C636405112563407632&sdata=ht3rFrGBPrvFT%2FI6B4lqJLb1ll5qBXvaH3i > MUPUw2fo%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic > .kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40qu > eensu.ca%7Cf118edbc4b864378c1d108d4f713faf3%7Cd61ecb3b38b142d582c4efb2 > 838b925c%7C1%7C0%7C636405112563407632&sdata=mk67BvOrAjURO9xSipkCEWdgK% > 2BYcDlmuxyDMZ2LttQo%3D&reserved=0 -- Unpaid intern in BillsBasement at noware dot com _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Cf118edbc4b864378c1d108d4f713faf3%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636405112563407632&sdata=Y%2FAdOsYG5yTpedbydlqYNqBy3BCe%2B4VYSaqHXDUnhYE%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Cf118edbc4b864378c1d108d4f713faf3%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636405112563407632&sdata=aNNwwpayx8a1lbfJtZrXZ6wzgxuaUBaEHRtbOJyfAZw%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Cf118edbc4b864378c1d108d4f713faf3%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636405112563407632&sdata=13phBQMsH%2BgCX7xDfUImboWQihKwEOqXtOz7fAKeku4%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Cf118edbc4b864378c1d108d4f713faf3%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636405112563407632&sdata=ht3rFrGBPrvFT%2FI6B4lqJLb1ll5qBXvaH3iMUPUw2fo%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Cf118edbc4b864378c1d108d4f713faf3%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636405112563407632&sdata=mk67BvOrAjURO9xSipkCEWdgK%2BYcDlmuxyDMZ2LttQo%3D&reserved=0 From jayavardhanravi at outlook.com Sat Sep 9 08:50:11 2017 From: jayavardhanravi at outlook.com (Jay) Date: Sat, 9 Sep 2017 05:50:11 -0700 (MST) Subject: [vtkusers] VTK Render Window Crashes after 6 hours of running In-Reply-To: References: <1504910281887-0.post@n5.nabble.com> Message-ID: <1504961411704-0.post@n5.nabble.com> I would try changing the OpenGL classes to regular VTK classes and will update with what I find. I was wondering what would be the difference in using OpenGL classes and VTK classes. Are there any memory handling related differences. It would be very helpful if you explain more in details for changing the OpenGL class to regular VTK classes. Regards, Jay -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jayavardhanravi at outlook.com Sat Sep 9 09:05:33 2017 From: jayavardhanravi at outlook.com (Jay) Date: Sat, 9 Sep 2017 06:05:33 -0700 (MST) Subject: [vtkusers] VTK Render Window Crashes after 6 hours of running In-Reply-To: References: <1504910281887-0.post@n5.nabble.com> Message-ID: <1504962333969-0.post@n5.nabble.com> Before posting the issue I tried to replicate the issue on different computers/environment to make sure it is not the hardware issue. The issue is replicable and repeats in different computers/environment. Yes, I tested it with VTK 8, OpenGL2 backend, latest graphic card drivers but GPU threaded optimization enabled. If I disable the GPU thread optimization, I expect there may be decrease in the performance like drop in frame rate... not sure but that's just my guess. Could you elaborate further about the idea of this test setup and which direction it takes to solve the current issue. Regards, Jay -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From landinghere at 163.com Sat Sep 9 09:57:33 2017 From: landinghere at 163.com (landings) Date: Sat, 9 Sep 2017 06:57:33 -0700 (MST) Subject: [vtkusers] Relationship between PointData::AddArray() and PointData::SetVectors()? Message-ID: <1504965453259-0.post@n5.nabble.com> Do methods like SetScalars(), SetVectors() and SetNormals() mean I can only have one set of scalars, one set of vectors and one set of normals each? AddArray() seems to add arbitrary arrays without asking for their usage, does it have any relationship with the former methods? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From landinghere at 163.com Sat Sep 9 10:00:00 2017 From: landinghere at 163.com (landings) Date: Sat, 9 Sep 2017 07:00:00 -0700 (MST) Subject: [vtkusers] Relationship between PointData::AddArray() and PointData::SetVectors()? Message-ID: <1504965600578-0.post@n5.nabble.com> Do methods like SetScalars(), SetVectors() and SetNormals() mean I can only have one set of scalars, one set of vectors and one set of normals each? AddArray() seems to add arbitrary arrays without asking for their usage, does it have any relationship with the former methods? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From landinghere at 163.com Sat Sep 9 10:01:15 2017 From: landinghere at 163.com (landings) Date: Sat, 9 Sep 2017 07:01:15 -0700 (MST) Subject: [vtkusers] Relationship between PointData::AddArray() and PointData::SetVectors()? Message-ID: <1504965675085-0.post@n5.nabble.com> Do methods like SetScalars(), SetVectors() and SetNormals() mean I can only have one set of scalars, one set of vectors and one set of normals each? AddArray() seems to add arbitrary arrays without asking for their usage, does it have any relationship with the former methods? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Sat Sep 9 11:00:36 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 9 Sep 2017 11:00:36 -0400 Subject: [vtkusers] Relationship between PointData::AddArray() and PointData::SetVectors()? In-Reply-To: <1504965453259-0.post@n5.nabble.com> References: <1504965453259-0.post@n5.nabble.com> Message-ID: You can add as many arrays as you like. Give them a name, and then use SetActiveScalars or SetActiveVectors to use them in GetScalars or GetVectors. These search results at: https://lorensen.github.io/VTKExamples/site/ yield lots of examples: https://cse.google.com/cse?cx=015419652359195128492:0lkxso1wcym&q=setactivescalars&oq=setactivescalars&gs_l=partner.3...2338.12615.0.13087.22.19.3.0.0.0.92.1404.19.19.0.gsnos%2Cn%3D13...0.10351j8388625j22j3..1ac.1.25.partner..22.0.0.60OVm-LcjiE#gsc.tab=0&gsc.q=setactivescalars&gsc.page=1 https://cse.google.com/cse?cx=015419652359195128492:0lkxso1wcym&q=setactivescalars&oq=setactivescalars&gs_l=partner.3...2338.12615.0.13087.22.19.3.0.0.0.92.1404.19.19.0.gsnos%2Cn%3D13...0.10351j8388625j22j3..1ac.1.25.partner..22.0.0.60OVm-LcjiE#gsc.tab=0&gsc.q=setactivevectors&gsc.sort=date On Sat, Sep 9, 2017 at 9:57 AM, landings wrote: > Do methods like SetScalars(), SetVectors() and SetNormals() mean I can only > have one set of scalars, one set of vectors and one set of normals each? > > AddArray() seems to add arbitrary arrays without asking for their usage, > does it have any relationship with the former methods? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From lee_jennifer_82 at yahoo.com Sat Sep 9 19:43:06 2017 From: lee_jennifer_82 at yahoo.com (Jennifer Lee) Date: Sat, 9 Sep 2017 23:43:06 +0000 (UTC) Subject: [vtkusers] Problem with Data in VTK References: <676951311.6149494.1505000586316.ref@mail.yahoo.com> Message-ID: <676951311.6149494.1505000586316@mail.yahoo.com> ? Hello,???? I used VTK in 2013. After that, I installed VTK after more than 4 years. I found some changes in Data in the latest version. How to make those MD5 files work? Please let me know. I didn't find much documentation.?I'm really having problem with this.???? Thanks in advance! Regards,Jennifer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Sat Sep 9 21:17:02 2017 From: tjlp at netease.com (Liu_tj) Date: Sun, 10 Sep 2017 09:17:02 +0800 (CST) Subject: [vtkusers] Activiz 7.1.1 Binary Build In-Reply-To: References: Message-ID: <24e49792.2.15e695c7e3e.Coremail.tjlp@netease.com> Hi, Mark, Thanks for your sharing. Liu Peng ?2017-09-09?"Mark DeArman" ??? -----????----- ???:"Mark DeArman" ????:2017?09?9? ??? ???:"vtkusers" ??:[vtkusers] Activiz 7.1.1 Binary Build Since people were asking, I have uploaded the binaries for people to test out. I am building with Intel C++ 16, an I have not yet sorted out the redist issues with the standard Activiz installer. Seems to be working fine with my standard Wix template. I updated the VTK repo with a minor change to check for GCCXML during preprocessing. I added CMakeCache.sample to each repo, to illustrate a typical configuration. https://github.com/dearman/activizdotnet Visual Studio 2013 / Intel C++ 2016 / CSC .NET 4.0 (x86) Debug http://www.cascadeacoustic.com/files/downloads/General/ActiViz_711d.zip When I get a little more free time I'll add a x64 build and update the README. Mark DeArman Cascade Acoustic Research http://www.cascadeacoustic.com (253) 200-5353 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kornicki.entwicklung at chello.at Mon Sep 11 03:20:35 2017 From: kornicki.entwicklung at chello.at (Entwicklung Kornicki) Date: Mon, 11 Sep 2017 09:20:35 +0200 Subject: [vtkusers] Windows 10 does not support Microsoft Video 1 In-Reply-To: References: <599FE3AD.4060803@chello.at> Message-ID: There is a class called vtkAVIWriter. We use this class to record the video. https://www.vtk.org/doc/nightly/html/classvtkAVIWriter.html This class has a couple of methods such as PromptCompressionOptionsOn which allow to set whether the compressor options should be displayed, but I do not see any possibility to modify in detail which compressor options should be selectable. My problem is that when I run our program and start capturing the video, it displays "Micosoft Video 1" as the first item of possible codecs to be used, but videos created using "Microsoft Video 1" apparently cannot be played by the standard video player of Windows 10. That is why I would like to remove this option but don't know how to do that. Best regards, Claus Volko Am 07.09.2017 um 17:08 schrieb Cory Quammen: >> With Kitware VTK 5.8, when using the functionality to save the action that >> is going on in the window as an AVI file and prompting compressor options, >> the default codec is "Microsoft Video 1". Unfortunately, I noticed that when >> you save an AVI file with this codec, the default video player of Windows 10 >> will not be able to play the video. That's a bad thing. However, if I choose >> another codec from the list, such as "Intel IYUV Codec", playback works. >> That's the good news. >> >> Is there some way to make Kitware VTK 5.8 show only such codecs that work >> with the default video player of Windows 10? > I'm not sure what you mean by the "functionality to save the action". > Could you describe what you are doing? Are you running an example? > > Thanks, > Cory > >> Best regards, >> Claus Volko >> >> >> --- >> This email has been checked for viruses by Avast antivirus software. >> https://www.avast.com/antivirus >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr?ft. https://www.avast.com/antivirus From gdeee at web.de Mon Sep 11 06:55:04 2017 From: gdeee at web.de (gde23) Date: Mon, 11 Sep 2017 03:55:04 -0700 (MST) Subject: [vtkusers] QVTKWidget not updating when interacting Message-ID: <1505127304968-0.post@n5.nabble.com> Hello, i have a qvtkwidget that displays a vtkcontextview. When i zoom (scrollwheel) or move the plot nothing seems to happen, however when i click on another windwo and then back to the QMainwindow the plot is in, it applies the zoom/interaction that was made before, so it seems there is an update call missing. void Plot::show() { // Set up a 2D scene, add an XY chart to it vtkSmartPointer view = vtkSmartPointer::New(); view->GetRenderer()->SetBackground(1.0, 1.0, 1.0); view->GetRenderWindow()->SetSize(400, 400); // set up chart vtkSmartPointer chart = vtkSmartPointer::New(); view->GetScene()->AddItem(chart); chart->SetShowLegend(true); int seq = m_spin_seqence->value(); int source = m_spin_source->value(); int surf = m_spin_surface->value(); vtkSmartPointer table = m_core->getPoints(); // Add scatter plots vtkPlot *points = chart->AddPlot(vtkChart::POINTS); #if VTK_MAJOR_VERSION <= 5 points->SetInput(table, 0, 1); #else points->SetInputData(table, 0, 1); #endif points->SetColor(0, 0, 0, 255); points->SetWidth(1.0); vtkPlotPoints::SafeDownCast(points)->SetMarkerStyle(vtkPlotPoints::CROSS); // For Qt integration this->qvtkWidget->SetRenderWindow(view->GetRenderWindow()); view->SetInteractor(this->qvtkWidget->GetInteractor()); this->qvtkWidget->GetRenderWindow()->GetInteractor()->Initialize(); this->qvtkWidget->GetRenderWindow()->GetInteractor()->Start(); } what am i missing? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jhlegarreta at vicomtech.org Mon Sep 11 11:04:53 2017 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Mon, 11 Sep 2017 17:04:53 +0200 Subject: [vtkusers] Do you have data that I might show off OSPRay rendering with? In-Reply-To: References: Message-ID: Hi Dave, may be a little bit late, but just in case: https://www.turbosquid.com/Search/3D-Models/free/vehicle/car If I'm not wrong, MAX is the format of some legacy Autodesk product. 3Ds Max may be supports it. HTH, JON HAITZ -- On 7 September 2017 at 18:36, Bill Lorensen wrote: > The NIH models are "real world", but thee are not cars... > > > On Thu, Sep 7, 2017 at 12:29 PM, David E DeMarle > wrote: > > Thanks for the references Bill. > > > > My backup plan is to find a suitably licensed model of a car from one of > the > > sites like free3d, but I'm hoping for something more "real world" from > > someone's day to day work out there. > > > > > > > > > > David E DeMarle > > Kitware, Inc. > > Principal Engineer > > 21 Corporate Drive > > Clifton Park, NY 12065-8662 > > Phone: 518-881-4909 > > > > On Thu, Sep 7, 2017 at 12:22 PM, Bill Lorensen > > wrote: > >> > >> How about these insects. Here is an example: > >> https://lorensen.github.io/VTKExamples/site/Cxx/IO/VRMLImporterDemo/ > >> > >> There is a link on the example page. > >> > >> Also, https://free3d.com/ has lots of free models in various formats. > >> I got the model shown in this example from that site: > >> https://lorensen.github.io/VTKExamples/site/Cxx/IO/OBJImporter/ > >> The data is here: > >> > >> https://github.com/lorensen/VTKExamples/tree/master/src/ > Testing/Data/doorman > >> > >> Also, lots of interesting biological stuff at: > >> https://3dprint.nih.gov/discover > >> > >> On Thu, Sep 7, 2017 at 12:02 PM, David E DeMarle > >> wrote: > >> > Hi lists, > >> > > >> > We've been working lately to expose OSPRay's path traced lights and > >> > materials inside VTK and ParaView. I'd like to make some snazzy > >> > photorealistic images and movies now and post them on the website, at > >> > conferences and in press releases. > >> > > >> > Unsurprisingly the images I can make out of vtkSphereSource and the > >> > like, > >> > are not all that compelling. That's why I'm reaching out to see if > >> > anyone > >> > has some great looking, real world, data that I might work with. > >> > > >> > I am thinking something like a car with lots of glass and metal and > >> > rubber > >> > would be ideal - especially if the data also had some interesting > >> > attribute > >> > data on it that I could colormap at the same time. I'm more than happy > >> > to > >> > attribute the data however you like. > >> > > >> > Feel free to contact me off-list if you like. > >> > > >> > thanks > >> > > >> > David E DeMarle > >> > Kitware, Inc. > >> > Principal Engineer > >> > 21 Corporate Drive > >> > Clifton Park, NY 12065-8662 > >> > Phone: 518-881-4909 > >> > > >> > _______________________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Please keep messages on-topic and check the VTK FAQ at: > >> > http://www.vtk.org/Wiki/VTK_FAQ > >> > > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/vtkusers > >> > > >> > >> > >> > >> -- > >> Unpaid intern in BillsBasement at noware dot com > > > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From albertia at oregonstate.edu Mon Sep 11 13:59:13 2017 From: albertia at oregonstate.edu (Alberti, Anthony Lewis) Date: Mon, 11 Sep 2017 10:59:13 -0700 Subject: [vtkusers] VTK Python Wrapper - Exporting Surface Plot Message-ID: Hello all, I'm using VTK 8.0.1 and python 3.5 and am brand new to VTK. I am trying to export a surface plot using vtkPlotSurface. By referencing VTK-8.0.1/Charts/Core/Testing/Cxx/TestSurfacePlot.cxx I have successfully created a surface plot and have been able to render it in python (even though it doesn't really look like a surface plot) - see attached script. In order to better visualize what I've made, I wanted to try and export it and then visualize using Paraview/Visit. However, I'm struggling to find any concrete examples where this type of vtk object is exported... I have tried running the following: out = vtk.vtkOBJExporter() out.SetFilePrefix("test") out.SetInput(chart) out.Write() But end up with the following type error: TypeError: SetInput argument 1: method requires a vtkRenderWindow, a vtkContextView was provided. Can anyone provide assistance? Thanks in advance. -- Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PyVTK_Test.py Type: text/x-python-script Size: 898 bytes Desc: not available URL: From siming.bayer at gmail.com Mon Sep 11 16:58:47 2017 From: siming.bayer at gmail.com (Siming Bayer) Date: Mon, 11 Sep 2017 22:58:47 +0200 Subject: [vtkusers] Insert a target point on a volumetric mesh Message-ID: <1B5A794D-F508-4033-B868-A884998D2E4A@gmail.com> Dear all, I have two volumetric meshes, one is before the deformation via finite element analysis and one is after. And I used PolyData2ImageStencil to convert both meshes to binary images. And now, I am interested in the displacement of some certain points/nodes/targets. Can I calculate the displacement field based on those 2 meshes (before and after deformation) directly via VTK and transform the result into a image volume? Another possibility it to some how ?mark? those certain points/nodes/targets (e.g. via index node on the .vtk file). The question is how can I find the image coordinate of a node on a image, which is generated based on the mesh? best, Siming From agatakrason at gmail.com Mon Sep 11 17:04:31 2017 From: agatakrason at gmail.com (agatte) Date: Mon, 11 Sep 2017 14:04:31 -0700 (MST) Subject: [vtkusers] Reduce number of points in triangle mesh Message-ID: <1505163871027-0.post@n5.nabble.com> Hello VTK users, How can I reduce number of points in triangle mesh ? My problem is that I have set of meshes with different size (number of points). I have already used vtkDecimatePro and I reduced number of polygons but number of points is still different. I would like to have all meshed with fixed number of points. I would be appreciate for any help/advice. Best, Agatte -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ilindsay at insigniamedical.co.uk Tue Sep 12 06:53:22 2017 From: ilindsay at insigniamedical.co.uk (ianl) Date: Tue, 12 Sep 2017 03:53:22 -0700 (MST) Subject: [vtkusers] Problems while rendering of large volumes Message-ID: <1505213602466-0.post@n5.nabble.com> Hi all, Our software uses vtkSmartVolumeMapper to render 3D volumes. I am looking at a problem with rendering a relatively large, although not uncommon (~2000 slice) CT set. This used to work before the OpenGL2 improvements, but now fails during the vtkTextureObject::Bind call, leading to a black image. Smaller volumes render fine. I am using VTK 8.0.1, built with Visual Studio 2017. The graphics card is an AMD R7 200 with 2GB of VRAM. The vtkSmartVolume mapper is running in its auto selection mode, and I can see it choosing the GPU volume mapper when I step into the code. What no longer seems to be happening is the reduction resampling when the texture is determined to be too large for the card (using GPULowResMapper, LowResGPUNecessary, etc). This seems to be due to the GetReductionRatio() function on the GPU mapper returning a hard coded scale of 1 (in vtkOpenGLGPUVolumeRayCastMapper.h, VolumeOpenGL2 variant). Is this expected behaviour, or am I missing something? As an aside, I have attempted to use the SetPartitions() function on vtkOpenGLGPUVolumeRayCastMapper to partition the volume so it will fit on the card which does seem to work, but kills performance, so I would probably prefer the original behaviour, i.e. resampling, while interacting with the volume. I seem to remember reading somewhere that this was an area that was being looked at at some point. Can anyone shed any light on how to proceed with solving this? The only way I can see currently is to implement our own version of smart volume mapper which does the reduction, and perhaps uses the partition technique when not interacting. Thanks in advance, Ian Lindsay -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Tue Sep 12 08:58:21 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 12 Sep 2017 08:58:21 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> <20151015131251.GA32585@megas.khq.kitware.com> <20151021161313.1685649885@mail.rogue-research.com> Message-ID: Hi folks, Following up on this now almost 2-year-old thread, I have a merge request in VTK that adds on the fly triangulation of arbitrary polygons into triangles in vtkSTLWriter. https://gitlab.kitware.com/vtk/vtk/merge_requests/3260 I welcome your reviews. Thanks! Cory On Wed, Oct 21, 2015 at 12:47 PM, Bill Lorensen wrote: > I believe that PLY and VTK can handle non-triangles. > > > On Wed, Oct 21, 2015 at 12:13 PM, Sean McBride wrote: >> On Thu, 15 Oct 2015 13:17:42 -0400, Bill Lorensen said: >> >>>I looked at the STLWriter code: >>> >>>1) It reports an error if a polygon is not a triangle. >>>2) It reports nothing if there are triangle strips. >>> >>>At a minimum I think it should handle triangle strips. No need to run >>>triangle filter, I'll decompose the strips on the fly. >> >> Does this cause any inconsistency wrt other similar writers? For example, I just looked at our exporter code and it basically does: >> >> - create vtkTriangleFilter >> - switch on file type (ply, stl, vtk) >> - create vtkPLYWriter/vtkSTLWriter/vtkPolyDataWriter >> >> I imagine others have similar code. I admittedly didn't check, but it would be nice if I could remove this vtkTriangleFilter for all cases, and not need it for some but not others... >> >> Cheers, >> >> -- >> ____________________________________________________________ >> Sean McBride, B. Eng sean at rogue-research.com >> Rogue Research www.rogue-research.com >> Mac Software Developer Montr?al, Qu?bec, Canada >> >> > > > > -- > Unpaid intern in BillsBasement at noware dot com > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From david.gobbi at gmail.com Tue Sep 12 09:11:47 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 12 Sep 2017 07:11:47 -0600 Subject: [vtkusers] Recent additions to Python wrappers Message-ID: Hi All, The VTK master branch has some new features in the Python wrappers. First, pass-by-reference is now done with a special "vtk.reference()" object. Some of you might have used vtk.mutable() in the past. Well, vtk.reference() is the same except that it also allows references to pointers. For example, consider this previously unwrapped method in vtkCellArray: void GetCell(vtkIdType loc, vtkIdType &npts, vtkIdType* &pts) This returns a pointer in the third parameter. To call this method from Python, use the following code: npts = vtk.reference(0) # create a proxy to a Python int object pts = vtk.reference((0,)) # create a proxy to a Python tuple cellarray.GetCell(0, npts, pts) The "reference" is simply a container with set()/get() methods that the wrappers can use to return values. So when GetCell() returns a pointer by reference, the wrappers convert the pointer to a tuple (since they know how values are pointed to) and then they assign the reference to that tuple. A "vtk.reference()" object also acts as a proxy to whatever object it references. So vtk.reference(0.0) can be used as a number, and vtk.reference((1,2,3)) can be used anywhere you would use a tuple. Also, parameter checks (method preconditions) were added to the array methods a couple weeks ago. This means that if you write code like this in Python, you will no longer get a segfault: a = vtk.vtkFloatArray() a.SetNumberOfValues(3) a.SetValue(10, 1.0) In this case, the wrappers will raise a ValueError because the index is out of range. This is nice, because you can catch the exception and respond appropriately. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Sep 12 10:18:49 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 12 Sep 2017 10:18:49 -0400 Subject: [vtkusers] VTK Python Wrapper - Exporting Surface Plot In-Reply-To: References: Message-ID: Hi Anthony, To my knowledge, exporting plots is not supported, especially exporting to an OBJ file, which is a geometry format. What do you hope to achieve by importing into ParaView/VisIt? Could you do your visualization in those tools to begin with? - Cory On Mon, Sep 11, 2017 at 1:59 PM, Alberti, Anthony Lewis wrote: > Hello all, > > I'm using VTK 8.0.1 and python 3.5 and am brand new to VTK. I am trying to > export a surface plot using vtkPlotSurface. > > By referencing VTK-8.0.1/Charts/Core/Testing/Cxx/TestSurfacePlot.cxx I have > successfully created a surface plot and have been able to render it in > python (even though it doesn't really look like a surface plot) - see > attached script. > > In order to better visualize what I've made, I wanted to try and export it > and then visualize using Paraview/Visit. However, I'm struggling to find any > concrete examples where this type of vtk object is exported... > > I have tried running the following: > out = vtk.vtkOBJExporter() > out.SetFilePrefix("test") > out.SetInput(chart) > out.Write() > > But end up with the following type error: > TypeError: SetInput argument 1: method requires a vtkRenderWindow, a > vtkContextView was provided. > > Can anyone provide assistance? Thanks in advance. > -- Tony > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From albertia at oregonstate.edu Tue Sep 12 11:56:03 2017 From: albertia at oregonstate.edu (Alberti, Anthony Lewis) Date: Tue, 12 Sep 2017 08:56:03 -0700 Subject: [vtkusers] VTK Python Wrapper - Exporting Surface Plot In-Reply-To: References: Message-ID: Cory, Thanks for your response. The data I am trying to visualize is from a 2D time dependent simulation so there is a good amount of data. I am using finite elements but the specific method in which I am using doesn't have a 2D mesh in the traditional sense - so typical visualization methods for finite elements are kind of moot. I was hoping that I would be able to directly output the data into some form of vtk object that I could then use to visualize in a surface plot in Paraview/Visit. That way I could adjust camera angles, color schemes, etc and make everything into a movie to show the time dependent behavior. The reason I was hoping to avoid to have to process raw data (e.g. through csv files) is that the simulation simply outputs a lot of data (on the order of 10s of gigabytes) and post processing it directly in Paraview could be expensive. What do you think? -- Tony On Tue, Sep 12, 2017 at 7:18 AM, Cory Quammen wrote: > Hi Anthony, > > To my knowledge, exporting plots is not supported, especially > exporting to an OBJ file, which is a geometry format. > > What do you hope to achieve by importing into ParaView/VisIt? Could > you do your visualization in those tools to begin with? > > - Cory > > On Mon, Sep 11, 2017 at 1:59 PM, Alberti, Anthony Lewis > wrote: > > Hello all, > > > > I'm using VTK 8.0.1 and python 3.5 and am brand new to VTK. I am trying > to > > export a surface plot using vtkPlotSurface. > > > > By referencing VTK-8.0.1/Charts/Core/Testing/Cxx/TestSurfacePlot.cxx I > have > > successfully created a surface plot and have been able to render it in > > python (even though it doesn't really look like a surface plot) - see > > attached script. > > > > In order to better visualize what I've made, I wanted to try and export > it > > and then visualize using Paraview/Visit. However, I'm struggling to find > any > > concrete examples where this type of vtk object is exported... > > > > I have tried running the following: > > out = vtk.vtkOBJExporter() > > out.SetFilePrefix("test") > > out.SetInput(chart) > > out.Write() > > > > But end up with the following type error: > > TypeError: SetInput argument 1: method requires a vtkRenderWindow, a > > vtkContextView was provided. > > > > Can anyone provide assistance? Thanks in advance. > > -- Tony > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Sep 12 12:31:39 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 12 Sep 2017 12:31:39 -0400 Subject: [vtkusers] Problem with Data in VTK In-Reply-To: <676951311.6149494.1505000586316@mail.yahoo.com> References: <676951311.6149494.1505000586316.ref@mail.yahoo.com> <676951311.6149494.1505000586316@mail.yahoo.com> Message-ID: We changed the structure of regression test data in 6.1 to allow developers to make proposed changes to code and data concurrently and ensure that the continuous integration test machines do not fail when they run new tests on old data. The net result is that a VTK build tree has test data files that are actually symbolic links to the md5 files which live elsewhere. You can generally open and use the symbolic links exactly as you would a normal data file. If you turn on testing in your build, cmake will try to download each one of the files. Alternatively you can untar the source and data packages for a release in the same directory and the default build setup will use them and avoid downloading anything else. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers wrote: > Hello, > I used VTK in 2013. After that, I installed VTK after more than 4 > years. I found some changes in Data in the latest version. How to make > those MD5 files work? Please let me know. I didn't find much > documentation. I'm really having problem with this. > Thanks in advance! > > Regards, > Jennifer. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Tue Sep 12 15:04:22 2017 From: sean at rogue-research.com (Sean McBride) Date: Tue, 12 Sep 2017 15:04:22 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> <20151015131251.GA32585@megas.khq.kitware.com> <20151021161313.1685649885@mail.rogue-research.com> Message-ID: <20170912190422.1549140296@mail.rogue-research.com> Cory, Thanks for this. So, for the benefit of the archives, does this mean one doesn't need to invoke vtkTriangleFilter before any of: vtkPLYWriter, vtkSTLWriter, vtkPolyDataWriter? Sean On Tue, 12 Sep 2017 08:58:21 -0400, Cory Quammen said: >Hi folks, > >Following up on this now almost 2-year-old thread, I have a merge >request in VTK that adds on the fly triangulation of arbitrary >polygons into triangles in vtkSTLWriter. >https://gitlab.kitware.com/vtk/vtk/merge_requests/3260 > >I welcome your reviews. > >Thanks! >Cory > >On Wed, Oct 21, 2015 at 12:47 PM, Bill Lorensen > wrote: >> I believe that PLY and VTK can handle non-triangles. >> >> >> On Wed, Oct 21, 2015 at 12:13 PM, Sean McBride research.com> wrote: >>> On Thu, 15 Oct 2015 13:17:42 -0400, Bill Lorensen said: >>> >>>>I looked at the STLWriter code: >>>> >>>>1) It reports an error if a polygon is not a triangle. >>>>2) It reports nothing if there are triangle strips. >>>> >>>>At a minimum I think it should handle triangle strips. No need to run >>>>triangle filter, I'll decompose the strips on the fly. >>> >>> Does this cause any inconsistency wrt other similar writers? For >example, I just looked at our exporter code and it basically does: >>> >>> - create vtkTriangleFilter >>> - switch on file type (ply, stl, vtk) >>> - create vtkPLYWriter/vtkSTLWriter/vtkPolyDataWriter >>> >>> I imagine others have similar code. I admittedly didn't check, but >it would be nice if I could remove this vtkTriangleFilter for all cases, >and not need it for some but not others... From cory.quammen at kitware.com Tue Sep 12 15:16:50 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 12 Sep 2017 15:16:50 -0400 Subject: [vtkusers] vtkTriangleStrip and empty vtkSTLWriter output In-Reply-To: <20170912190422.1549140296@mail.rogue-research.com> References: <20d09502558e7b158b91956de6cf36f1@logicmonkey.co.uk> <879638bf91854bb0a3e9785e7b0749ff@logicmonkey.co.uk> <20151015131251.GA32585@megas.khq.kitware.com> <20151021161313.1685649885@mail.rogue-research.com> <20170912190422.1549140296@mail.rogue-research.com> Message-ID: PLY supports up to 256-point polygons and vtkPolyDataWriter has no restriction on cell type, so you are right, no vtkTriangleFilter should be needed in front of any of those writers. Cory On Tue, Sep 12, 2017 at 3:04 PM, Sean McBride wrote: > Cory, > > Thanks for this. > > So, for the benefit of the archives, does this mean one doesn't need to invoke vtkTriangleFilter before any of: vtkPLYWriter, vtkSTLWriter, vtkPolyDataWriter? > > Sean > > > > On Tue, 12 Sep 2017 08:58:21 -0400, Cory Quammen said: > >>Hi folks, >> >>Following up on this now almost 2-year-old thread, I have a merge >>request in VTK that adds on the fly triangulation of arbitrary >>polygons into triangles in vtkSTLWriter. >>https://gitlab.kitware.com/vtk/vtk/merge_requests/3260 >> >>I welcome your reviews. >> >>Thanks! >>Cory >> >>On Wed, Oct 21, 2015 at 12:47 PM, Bill Lorensen >> wrote: >>> I believe that PLY and VTK can handle non-triangles. >>> >>> >>> On Wed, Oct 21, 2015 at 12:13 PM, Sean McBride >research.com> wrote: >>>> On Thu, 15 Oct 2015 13:17:42 -0400, Bill Lorensen said: >>>> >>>>>I looked at the STLWriter code: >>>>> >>>>>1) It reports an error if a polygon is not a triangle. >>>>>2) It reports nothing if there are triangle strips. >>>>> >>>>>At a minimum I think it should handle triangle strips. No need to run >>>>>triangle filter, I'll decompose the strips on the fly. >>>> >>>> Does this cause any inconsistency wrt other similar writers? For >>example, I just looked at our exporter code and it basically does: >>>> >>>> - create vtkTriangleFilter >>>> - switch on file type (ply, stl, vtk) >>>> - create vtkPLYWriter/vtkSTLWriter/vtkPolyDataWriter >>>> >>>> I imagine others have similar code. I admittedly didn't check, but >>it would be nice if I could remove this vtkTriangleFilter for all cases, >>and not need it for some but not others... > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From dhoppes at mbfbioscience.com Tue Sep 12 15:56:51 2017 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Tue, 12 Sep 2017 19:56:51 +0000 Subject: [vtkusers] Image Shifts between Parallel Projection mode and Perspective mode Message-ID: <46CB11F12B9DC24D860D4082451B318A777D58B8@exchange3.microbrightfield.com> Hi all, Got a question. I'm using the function, SetParallelProjection(true/false) to set the display between projection mode and perspective mode. I'm noticing that there is a shift in the image. I was hoping that the image would stay the same. I thought that it was in our code but was able to reproduce this effect with a vtk example code. Any idea what's going on? The closer that I'm zoomed in on my objects, the more the shift happens. Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 12 16:38:29 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 12 Sep 2017 14:38:29 -0600 Subject: [vtkusers] Image Shifts between Parallel Projection mode and Perspective mode In-Reply-To: <46CB11F12B9DC24D860D4082451B318A777D58B8@exchange3.microbrightfield.com> References: <46CB11F12B9DC24D860D4082451B318A777D58B8@exchange3.microbrightfield.com> Message-ID: Hi Doug, Is the image exactly at the focal plane? What is the direction of the shift? What example did you use as a test? - David On Tue, Sep 12, 2017 at 1:56 PM, Doug Hoppes wrote: > Hi all, > > > > Got a question. I?m using the function, > SetParallelProjection(true/false) to set the display between projection > mode and perspective mode. I?m noticing that there is a shift in the > image. I was hoping that the image would stay the same. I thought that it > was in our code but was able to reproduce this effect with a vtk example > code. > > > > Any idea what?s going on? The closer that I?m zoomed in > on my objects, the more the shift happens. > > > > Doug > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Tue Sep 12 16:50:29 2017 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 12 Sep 2017 16:50:29 -0400 Subject: [vtkusers] Image Shifts between Parallel Projection mode and Perspective mode In-Reply-To: <46CB11F12B9DC24D860D4082451B318A777D58B8@exchange3.microbrightfield.com> References: <46CB11F12B9DC24D860D4082451B318A777D58B8@exchange3.microbrightfield.com> Message-ID: Doug, We've seen this in ParaView too. The reason is that zoom is implemented totally differently when in perspective or parallel projection mode [1]. Thus the effect of zooming in one mode doesn't follow through to the other mode. Utkarsh [1] https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/Core/vtkCamera.cxx#L878 On Tue, Sep 12, 2017 at 3:56 PM, Doug Hoppes wrote: > Hi all, > > > > Got a question. I?m using the function, > SetParallelProjection(true/false) to set the display between projection mode > and perspective mode. I?m noticing that there is a shift in the image. I > was hoping that the image would stay the same. I thought that it was in our > code but was able to reproduce this effect with a vtk example code. > > > > Any idea what?s going on? The closer that I?m zoomed in on > my objects, the more the shift happens. > > > > Doug > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From maguire7 at llnl.gov Tue Sep 12 17:48:16 2017 From: maguire7 at llnl.gov (Maguire, Alister Owen) Date: Tue, 12 Sep 2017 21:48:16 +0000 Subject: [vtkusers] Avoid rendering values outside of range In-Reply-To: <11B4BEC6-7E20-4B63-AC18-2FC25A56F7EE@llnl.gov> References: <11B4BEC6-7E20-4B63-AC18-2FC25A56F7EE@llnl.gov> Message-ID: <64D37CFE-5D15-4987-8061-637998CB5B16@llnl.gov> Sorry, I meant the vtkColorTransferFunction, not the vtkVolumeProperty. -Alister From: "Maguire, Alister Owen" Date: Tuesday, September 12, 2017 at 2:45 PM To: "vtkusers at vtk.org" Subject: Avoid rendering values outside of range Hello, I?m using vtkSmartVolumeMapper for volume rendering within VisIt, and I?m wondering if there is a way to ?ignore? particular scalar values (either anything that exists outside of a range, or even ignoring a specific value). When resampling unstructured data into structured grids, there is often empty space in the grid that is populated with a default value that exists outside of the datasets range, and I?d like for this default value to be ignored while rendering. I see that vtkVolumeProperty has the option to set the color for values that exists outside of the range, but I don?t see an equivalent for opacity, which would be one way to handle this? Any ideas? Best, Alister -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 12 17:52:09 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 12 Sep 2017 15:52:09 -0600 Subject: [vtkusers] Image Shifts between Parallel Projection mode and Perspective mode In-Reply-To: References: <46CB11F12B9DC24D860D4082451B318A777D58B8@exchange3.microbrightfield.com> Message-ID: If you're looking at a 2D slice that is positioned at the focal plane, there should be no shift. I tested this with the ImageSlicing.py example (in Examples/ImageProcessing). I used the following code when switching to parallel projection: d = camera.GetDistance() a = camera.GetViewAngle() camera.SetParallelScale(d*math.tan(0.5*(a*math.pi/180))) camera.ParallelProjectionOn() window.Render() And the following code when switching to perspective: d = camera.GetDistance() h = camera.GetParallelScale() camera.SetViewAngle(2.0*math.atan(h/d)*180/math.pi) camera.ParallelProjectionOff() window.Render() There was no perceptible shift when switching, even with a full-screen window zoomed way in. IMHO if there is a shift, then either (a) the image is not at the focal plane, or (b) there is a math error in your code, or (c) there is a bug in VTK. Volume rendering or any other rendering where objects aren't at the focal plane is another matter, of course. - David On Tue, Sep 12, 2017 at 2:50 PM, Utkarsh Ayachit < utkarsh.ayachit at kitware.com> wrote: > Doug, > > We've seen this in ParaView too. The reason is that zoom is > implemented totally differently when in perspective or parallel > projection mode [1]. Thus the effect of zooming in one mode doesn't > follow through to the other mode. > > Utkarsh > > > [1] https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/ > Core/vtkCamera.cxx#L878 > > On Tue, Sep 12, 2017 at 3:56 PM, Doug Hoppes > wrote: > > Hi all, > > > > > > > > Got a question. I?m using the function, > > SetParallelProjection(true/false) to set the display between projection > mode > > and perspective mode. I?m noticing that there is a shift in the image. > I > > was hoping that the image would stay the same. I thought that it was in > our > > code but was able to reproduce this effect with a vtk example code. > > > > > > > > Any idea what?s going on? The closer that I?m zoomed in > on > > my objects, the more the shift happens. > > > > > > > > Doug > -------------- next part -------------- An HTML attachment was scrubbed... URL: From maguire7 at llnl.gov Tue Sep 12 17:45:53 2017 From: maguire7 at llnl.gov (Maguire, Alister Owen) Date: Tue, 12 Sep 2017 21:45:53 +0000 Subject: [vtkusers] Avoid rendering values outside of range Message-ID: <11B4BEC6-7E20-4B63-AC18-2FC25A56F7EE@llnl.gov> Hello, I?m using vtkSmartVolumeMapper for volume rendering within VisIt, and I?m wondering if there is a way to ?ignore? particular scalar values (either anything that exists outside of a range, or even ignoring a specific value). When resampling unstructured data into structured grids, there is often empty space in the grid that is populated with a default value that exists outside of the datasets range, and I?d like for this default value to be ignored while rendering. I see that vtkVolumeProperty has the option to set the color for values that exists outside of the range, but I don?t see an equivalent for opacity, which would be one way to handle this? Any ideas? Best, Alister -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Sep 12 18:55:32 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 12 Sep 2017 18:55:32 -0400 Subject: [vtkusers] Please vote for ParaView in the 2017 HPC Reader's choice awards! Message-ID: We would like to thank everyone who has used and contributed to version 5.4 of ParaView this year. To acknowledge the growth of ParaView, please join us in nominating the fruit of our combined efforts for a 2017 HPCwire Readers? Award in the ?Best HPC Visualization Product or Technology? category. Nominations can be made at https://www.hpcwire.com/2017-annual-hpcwire-readers-choice-awards/. Thank you for your support! For reference, the best of the new features in 5.4 are described here: https://blog.kitware.com/paraview-5-4-0-release-notes/ David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From iamdpak at gmail.com Wed Sep 13 01:12:09 2017 From: iamdpak at gmail.com (vinmean) Date: Tue, 12 Sep 2017 22:12:09 -0700 (MST) Subject: [vtkusers] how to convert AppendFilter output to polyData? Message-ID: <1505279529879-0.post@n5.nabble.com> Below is an c++ code I wrote for combining two polygon source. I tweaked an existing example so my code is at the end. Problem is, after combining two polygon data (using appendFilter), I am not able to access the polyData of the combined actor. It throws a segmentation fault when I access the polyData points using GetPoints() function #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void merge_polyData_in_viz(int actor_strt_ID,vtkSmartPointer renderer, vtkSmartPointer appendFilter ,vtkSmartPointer assembly) { vtkSmartPointer actors = vtkSmartPointer::New(); actors = renderer->GetActors(); actors->InitTraversal(); //skip the first actor_strt_ID actors for (vtkIdType a = 0; a < actor_strt_ID; ++a) { vtkActor * actor = actors->GetNextActor(); } for (vtkIdType a = actor_strt_ID; a < actors->GetNumberOfItems(); ++a) { vtkActor * actor = actors->GetNextActor(); assembly->AddPart(actor); vtkSmartPointer pd = vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput()); vtkSmartPointer ug = vtkSmartPointer::New(); ug->SetPoints(pd->GetPoints()); appendFilter->AddInputData(pd); appendFilter->AddInputData(ug); appendFilter->Update(); } } int main(int, char *[]) { // Create the polydata geometry vtkSmartPointer sphereSource = vtkSmartPointer::New(); sphereSource->Update(); // Set up the actor to display the untransformed polydata vtkSmartPointer originalMapper = vtkSmartPointer::New(); originalMapper->SetInputConnection(sphereSource->GetOutputPort()); vtkSmartPointer originalActor = vtkSmartPointer::New(); originalActor->SetMapper(originalMapper); originalActor->GetProperty()->SetColor(1,0,0); // Set up the transform filter vtkSmartPointer translation = vtkSmartPointer::New(); translation->Translate(1.0, 2.0, 3.0); vtkSmartPointer transformFilter = vtkSmartPointer::New(); transformFilter->SetInputConnection(sphereSource->GetOutputPort()); transformFilter->SetTransform(translation); transformFilter->Update(); // Set up the actor to display the transformed polydata vtkSmartPointer transformedMapper = vtkSmartPointer::New(); transformedMapper->SetInputConnection(transformFilter->GetOutputPort()); vtkSmartPointer transformedActor = vtkSmartPointer::New(); transformedActor->SetMapper(transformedMapper); transformedActor->GetProperty()->SetColor(0,1,0); // Set up the rest of the visualization pipeline vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(originalActor); renderer->AddActor(transformedActor); renderer->SetBackground(.3, .6, .3); // Set renderer's background color to green vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderWindowInteractor->Start(); /////////////////////////////////////////addional code ///////////////////////////////////////////////// //merge two actors to create a new actor vtkSmartPointer merged_actor = vtkSmartPointer::New(); vtkSmartPointer appendFilter = vtkSmartPointer::New(); vtkSmartPointer asmbly = vtkSmartPointer::New(); merge_polyData_in_viz(0,renderer, appendFilter,asmbly); //new actor and mapper vtkSmartPointer merged_mapper = vtkSmartPointer::New(); merged_mapper->SetInputConnection(appendFilter->GetOutputPort()); merged_actor->SetMapper(merged_mapper); //trying to get points of new polyData vtkSmartPointer pd = vtkPolyData::SafeDownCast(merged_actor->GetMapper()->GetInput()); pd->GetPoints(); return EXIT_SUCCESS; } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lee_jennifer_82 at yahoo.com Wed Sep 13 02:12:40 2017 From: lee_jennifer_82 at yahoo.com (Jennifer Lee) Date: Wed, 13 Sep 2017 06:12:40 +0000 (UTC) Subject: [vtkusers] Problem with Data in VTK In-Reply-To: References: <676951311.6149494.1505000586316.ref@mail.yahoo.com> <676951311.6149494.1505000586316@mail.yahoo.com> Message-ID: <1432712258.948605.1505283160662@mail.yahoo.com> Hello,?? Thanks so much for the reply. Please ignore my poor knowledge. I?m really having troublein understanding. I?ve data in the following directory: C:\VTK\VTKData-8.0.1\VTK-8.0.1\.ExternalData\MD5. Now, thefiles look like something below: 00b6935d399b80e4f9edc1414a4c363f00ba7d9399c914edb4a6faa0b10ae7e500d2efba0581fb7d436bcc45a9acedcb00d49b1746f315992fac476892c681ae::::I really don?t understand what they mean. It seems tome? these are some encrypted names whichneed to be decrypted. I don?t know how to do that.I built with TESTING_ON, now data are available in the ?Testing?directory too. Suppose I?d like to run the Medical examples. Now, data isavailable in the following directory: C:\VTK\VTK-8.0.1\Testing\Data\headsq With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing But these are all MD5 files. So the following line of thecode does not find the data: v16 SetFilePrefix?"$VTK_DATA_ROOT/Data/headsq/quarter". Please help me how to make things work. If I've missed any step, please let me know.Thanks in advance. Regards,Jennifer On Tuesday, September 12, 2017 9:32 AM, David E DeMarle wrote: We changed the structure of regression test data in 6.1 to allow developers to make proposed changes to code and data concurrently and ensure that the continuous integration test machines do not fail when they run new tests on old data. The net result is that a VTK build tree has test data files that are actually symbolic links to the md5 files which live elsewhere. You can generally open and use the symbolic links exactly as you would a normal data file. If you turn on testing in your build, cmake will try to download each one of the files. Alternatively you can untar the source and data packages for a release in the same directory and the default build setup will use them and avoid downloading anything else. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers wrote: ? Hello,???? I used VTK in 2013. After that, I installed VTK after more than 4 years. I found some changes in Data in the latest version. How to make those MD5 files work? Please let me know. I didn't find much documentation.?I'm really having problem with this.???? Thanks in advance! Regards,Jennifer. ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Wed Sep 13 04:24:51 2017 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 13 Sep 2017 01:24:51 -0700 (MST) Subject: [vtkusers] Change vtkScalarBarActor label text In-Reply-To: <1504247492292-0.post@n5.nabble.com> References: <1504013297086-5744620.post@n5.nabble.com> <1504247492292-0.post@n5.nabble.com> Message-ID: <1505291091010-0.post@n5.nabble.com> OK I give up, from the lack of response I guess it's not possible. It seems so simple though... -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dave.demarle at kitware.com Wed Sep 13 06:41:37 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 13 Sep 2017 06:41:37 -0400 Subject: [vtkusers] how to convert AppendFilter output to polyData? In-Reply-To: <1505279529879-0.post@n5.nabble.com> References: <1505279529879-0.post@n5.nabble.com> Message-ID: Use vtkappendpolydata instead of vtkappendfilter. Alternatively you could extract surface on the unstructured grid you have now yo convert to polydata but that would be less direct. On Sep 13, 2017 1:12 AM, "vinmean" wrote: > Below is an c++ code I wrote for combining two polygon source. I tweaked an > existing example so my code is at the end. Problem is, after combining two > polygon data (using appendFilter), I am not able to access the polyData of > the combined actor. It throws a segmentation fault when I access the > polyData points using GetPoints() function > > > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > > > > void merge_polyData_in_viz(int actor_strt_ID,vtkSmartPointer > renderer, vtkSmartPointer appendFilter > ,vtkSmartPointer assembly) > { > vtkSmartPointer actors = > vtkSmartPointer::New(); > actors = renderer->GetActors(); > actors->InitTraversal(); > > //skip the first actor_strt_ID actors > for (vtkIdType a = 0; a < actor_strt_ID; ++a) > { > vtkActor * actor = actors->GetNextActor(); > } > > for (vtkIdType a = actor_strt_ID; a < actors->GetNumberOfItems(); > ++a) > { > vtkActor * actor = actors->GetNextActor(); > assembly->AddPart(actor); > vtkSmartPointer pd = > vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput()); > vtkSmartPointer ug = > vtkSmartPointer::New(); > ug->SetPoints(pd->GetPoints()); > appendFilter->AddInputData(pd); > appendFilter->AddInputData(ug); > appendFilter->Update(); > } > > > } > > > int main(int, char *[]) > { > > // Create the polydata geometry > > vtkSmartPointer sphereSource = > vtkSmartPointer::New(); > sphereSource->Update(); > > // Set up the actor to display the untransformed polydata > > vtkSmartPointer originalMapper = > vtkSmartPointer::New(); > originalMapper->SetInputConnection(sphereSource->GetOutputPort()); > > vtkSmartPointer originalActor = > vtkSmartPointer::New(); > originalActor->SetMapper(originalMapper); > originalActor->GetProperty()->SetColor(1,0,0); > > // Set up the transform filter > > vtkSmartPointer translation = > vtkSmartPointer::New(); > translation->Translate(1.0, 2.0, 3.0); > > vtkSmartPointer transformFilter = > vtkSmartPointer::New(); > transformFilter->SetInputConnection(sphereSource->GetOutputPort()); > transformFilter->SetTransform(translation); > transformFilter->Update(); > > // Set up the actor to display the transformed polydata > > vtkSmartPointer transformedMapper = > vtkSmartPointer::New(); > transformedMapper->SetInputConnection(transformFilter->GetOutputPort()); > > vtkSmartPointer transformedActor = > vtkSmartPointer::New(); > transformedActor->SetMapper(transformedMapper); > transformedActor->GetProperty()->SetColor(0,1,0); > > > // Set up the rest of the visualization pipeline > vtkSmartPointer renderer = > vtkSmartPointer::New(); > renderer->AddActor(originalActor); > renderer->AddActor(transformedActor); > renderer->SetBackground(.3, .6, .3); // Set renderer's background color > to green > > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > renderWindowInteractor->Start(); > > /////////////////////////////////////////addional code > ///////////////////////////////////////////////// > > //merge two actors to create a new actor > vtkSmartPointer merged_actor = > vtkSmartPointer::New(); > vtkSmartPointer appendFilter = > vtkSmartPointer::New(); > vtkSmartPointer asmbly = > vtkSmartPointer::New(); > merge_polyData_in_viz(0,renderer, appendFilter,asmbly); > > //new actor and mapper > vtkSmartPointer merged_mapper = > vtkSmartPointer::New(); > merged_mapper->SetInputConnection(appendFilter->GetOutputPort()); > merged_actor->SetMapper(merged_mapper); > > //trying to get points of new polyData > vtkSmartPointer pd = > vtkPolyData::SafeDownCast(merged_actor->GetMapper()->GetInput()); > pd->GetPoints(); > > > > > return EXIT_SUCCESS; > > } > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Sep 13 10:58:24 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 13 Sep 2017 10:58:24 -0400 Subject: [vtkusers] Problem with Data in VTK In-Reply-To: <1432712258.948605.1505283160662@mail.yahoo.com> References: <676951311.6149494.1505000586316.ref@mail.yahoo.com> <676951311.6149494.1505000586316@mail.yahoo.com> <1432712258.948605.1505283160662@mail.yahoo.com> Message-ID: On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee wrote: > Hello, > Thanks so much for the reply. > > Please ignore my poor knowledge. I?m really having trouble in > understanding. > No worries, this confuses lots of people including me. > I?ve data in the following directory: > > C:\VTK\VTKData-8.0.1\VTK-8.0.1\.ExternalData\MD5. Now, the files look > like something below: > > 00b6935d399b80e4f9edc1414a4c363f > 00ba7d9399c914edb4a6faa0b10ae7e5 > 00d2efba0581fb7d436bcc45a9acedcb > 00d49b1746f315992fac476892c681ae > : > : > : > : > I really don?t understand what they mean. It seems to me these are some > encrypted names which need to be decrypted. I don?t know how to do that. > These are checksums of the real data files. Cmake and git know that they have to download a different file whenever the data file's checksum doesn't agree with the above. > I built with TESTING_ON, now data are available in the ?Testing? directory > too. Suppose I?d like to run the Medical examples. Now, data is available > in the following directory: > > *C:\VTK\VTK-8.0.1\Testing\Data\headsq* > > With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing > > But these are all MD5 files. So the following line of the code does not > find the data: > > *v16 SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/quarter".* > > Please help me how to make things work. If I've missed any step, please > let me know. > Thanks in advance. > > Where is you build directory? I highly recommend always keeping your VTK source directory and your VTK build directory separate. Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT to C:\VTK\VTK-8.0.1\ExternalData\Testing. This is where the data file links are. The real data files are elsewhere in files with MD5 names, but for all intents and purposes the data link files that refer to them work as if they were the read data files. > Regards, > Jennifer > > > > > On Tuesday, September 12, 2017 9:32 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > We changed the structure of regression test data in 6.1 to allow > developers to make proposed changes to code and data concurrently and > ensure that the continuous integration test machines do not fail when they > run new tests on old data. > > The net result is that a VTK build tree has test data files that are > actually symbolic links to the md5 files which live elsewhere. You can > generally open and use the symbolic links exactly as you would a normal > data file. If you turn on testing in your build, cmake will try to download > each one of the files. Alternatively you can untar the source and data > packages for a release in the same directory and the default build setup > will use them and avoid downloading anything else. > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 <(518)%20881-4909> > > On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers < > vtkusers at vtk.org> wrote: > > Hello, > I used VTK in 2013. After that, I installed VTK after more than 4 > years. I found some changes in Data in the latest version. How to make > those MD5 files work? Please let me know. I didn't find much > documentation. I'm really having problem with this. > Thanks in advance! > > Regards, > Jennifer. > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amit112amit at yahoo.co.in Wed Sep 13 13:57:25 2017 From: amit112amit at yahoo.co.in (Amit) Date: Wed, 13 Sep 2017 10:57:25 -0700 Subject: [vtkusers] Convex hull of spherical point cloud has holes In-Reply-To: References: <74af6337-1906-3c2e-9dba-f23a787bdede@yahoo.co.in> Message-ID: <43bd20b3-d3e9-cc2a-751a-06d237a93e22@yahoo.co.in> Hi everyone. I finally found a working solution to my problem which I would like to share in case it may help someone else. I had a curious observation that the point clouds (generated as a vector of doubles through some optimization) for which I was not able to programatically generate a convex hull using VTK C++ functions, if I wrote the point coordinates to a VTK file and opened it in Paraview and applied vtkDelaunay3D filter, I was getting a proper convex hull. Thus, I guessed that the issue may be due to some floating point corner cases because my point co-ordinates were stored as double in my original program but in the course of writing to file and reading back there might be some loss of precision which seems to fix the issue. With this as an hypothesis, in my original program, I rounded off all the point coordinates to just 2 decimal places and now I get proper convex hull without using Paraview! If you noticed my original use case scenario, I am simply interested in the topology of the cells and this loss of precision is not a deal-breaker. So this solution works well enough for me. Thanks and regards, Amit On 08/10/2017 07:22 PM, Amit wrote: > I am sorry. I think I spoke too soon that my problem is solved. My > code is part of a larger C++ project. I am generate several point > clouds based on an optimization criteria. I triangulate every point > cloud. But the issue of missing triangles does not happen for all the > point clouds consistently. It happens only for a few of them. Changing > the alpha value to something non-zero helped resolve the issue in one > of the point-clouds but it started happening in some other ones. I > tried multiple alpha-values but I am not able to figure out one that > works for all. Sometimes, if I print out the point cloud data for > which I get missing triangles to a VTK file and open it in Paraview, > when I apply my triangulation algorithm using a programmable filter, > it works there. So I suspect there may also be some floating point > corner case which gets resolved when writing to a file and re-reading > in paraview. I am only guessing. It was hard to generate a minimum > working example. > > Finally, I think I have a minimum working Python code. Please find > attached two files: > 1. Sample.vtk -- contains a culprit point cloud > 2. MinWorkingEx.py -- a Python code to triangulate the point cloud by > projecting them to a unit sphere first > > Repeating my question: Since I am trying to generate a convex hull on > points located on a unit sphere, why should there be any missing > triangles ever? > > Regards, > Amit > > > On 08/09/2017 08:34 PM, Amit wrote: >> Thank you Bill and David for your replies. >> >> David: I did not use vtkCleanPolyData. I had read the doc multiple >> times but I did not have the patience to understand the significance >> of alpha. >> >> Bill: You are right. I was using the default value of alpha=0.0. Just >> out of trial and error I set alpha=1.0 and the issue got resolved. I >> think that as I am working with unit spheres, alpha_radius=1.0 is >> sufficiently large value so that all faces of all tetrahedron get >> included in the output convex hull. >> >> Thanks once again for the pointers. >> >> Regards, >> Amit >> >> >> On 08/09/2017 04:03 PM, Bill Lorensen wrote: >>> If you save your polydata in a .vtp file you can try this example: >>> https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/Delaunay3D/ >>> >>> It reports the # of verts, lines, triangles and tets. >>> >>> >>> On Wed, Aug 9, 2017 at 4:56 PM, Bill Lorensen >>> wrote: >>>> I assume Alpha=0.0 for the Delaunay filter? >>>> >>>> Can you post a small, standalone compilable program that produces >>>> this output? >>>> >>>> Bill >>>> >>>> >>>> On Wed, Aug 9, 2017 at 2:18 PM, Amit via vtkusers >>>> wrote: >>>>> Dear all. >>>>> I have a point cloud made up of points lying on surface of a unit >>>>> sphere >>>>> stored in a vtkPolyData. I want to get the convex hull of this >>>>> point cloud >>>>> using the vtkDelaunay3D filter. Then using vtkDataSetSurfaceFilter >>>>> I want to >>>>> extract the surface of the convex hull. This way, I can get a >>>>> triangulation >>>>> of the point cloud as a hollow spherical shell. Kindly open the >>>>> attached >>>>> UnstructuredGrid file in Paraview. It represents the output of >>>>> vtkDelaunay3D >>>>> filter made up of tetrahedrons. But the surface of the convex-hull >>>>> has some >>>>> missing triangles. Using the SpreadSheet View, I can see that >>>>> cells with Ids >>>>> 60, 61, 64 have triangular faces in the missing region. Hence, I >>>>> would not >>>>> have expected these "hole" in the surface. Can somebody explain >>>>> why the >>>>> triangles are not being rendered? When I extract surface from this >>>>> unstructured grid I get a spherical shell with missing triangles >>>>> as holes. >>>>> Regards, >>>>> Amit >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lee_jennifer_82 at yahoo.com Thu Sep 14 01:58:17 2017 From: lee_jennifer_82 at yahoo.com (Jennifer Lee) Date: Thu, 14 Sep 2017 05:58:17 +0000 (UTC) Subject: [vtkusers] Problem with Data in VTK In-Reply-To: References: <676951311.6149494.1505000586316.ref@mail.yahoo.com> <676951311.6149494.1505000586316@mail.yahoo.com> <1432712258.948605.1505283160662@mail.yahoo.com> Message-ID: <1348777421.1746712.1505368697394@mail.yahoo.com> Hello,???? Still I could notmake it work. Setting VTK_DATA_ROOT to ?C:\VTK\VTK-8.0.1\ExternalData\Testing?didn?t work for me. It can?t find the data. ?I have separate source and build: Source is : C:\VTK\VTK-8.0.1Build is: C:\VTK\VTK-binData is: C:\VTK\VTKData ?As I also built with TESTING_ON; so, I?ve MD5 files underTesting directory. C:\VTK\VTK-8.0.1\Testing.?I tried to run the tcl script Medical1.tcl. If I set the ?data root to ?C:\VTK\VTK-8.0.1\Testing?, itcan?t find the data (I think because these are MD5 files). If I set the dataroot to C:\VTK\VTKData, it also does not work.?I need help?to fix the problem.Thanks!?Regards,Jennifer On Wednesday, September 13, 2017 7:58 AM, David E DeMarle wrote: On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee wrote: Hello,?? Thanks so much for the reply. Please ignore my poor knowledge. I?m really having troublein understanding. No worries, this confuses lots of people including me.? I?ve data in the following directory: C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, thefiles look like something below: 00b6935d399b80e4f9edc1414a4c36 3f00ba7d9399c914edb4a6faa0b10ae7 e500d2efba0581fb7d436bcc45a9aced cb00d49b1746f315992fac476892c681 ae::::I really don?t understand what they mean. It seems tome? these are some encrypted names whichneed to be decrypted. I don?t know how to do that. These are checksums of the real data files. Cmake and git know that they have to download a different file whenever the data file's checksum doesn't agree with the above.? I built with TESTING_ON, now data are available in the ?Testing?directory too. Suppose I?d like to run the Medical examples. Now, data isavailable in the following directory: C:\VTK\VTK-8.0.1\Testing\Data\ headsq With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing But these are all MD5 files. So the following line of thecode does not find the data: v16 SetFilePrefix?"$VTK_DATA_ROOT/Data/headsq/ quarter". Please help me how to make things work. If I've missed any step, please let me know.Thanks in advance. Where is you build directory? I highly recommend always keeping your VTK source directory and your VTK build directory separate. Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT to C:\VTK\VTK-8.0.1\ExternalData\Testing. This is where the data file links are. The real data files are elsewhere in files with MD5 names, but for all intents and purposes the data link files that refer to them work as if they were the read data files. ? Regards,Jennifer On Tuesday, September 12, 2017 9:32 AM, David E DeMarle wrote: We changed the structure of regression test data in 6.1 to allow developers to make proposed changes to code and data concurrently and ensure that the continuous integration test machines do not fail when they run new tests on old data. The net result is that a VTK build tree has test data files that are actually symbolic links to the md5 files which live elsewhere. You can generally open and use the symbolic links exactly as you would a normal data file. If you turn on testing in your build, cmake will try to download each one of the files. Alternatively you can untar the source and data packages for a release in the same directory and the default build setup will use them and avoid downloading anything else. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers wrote: ? Hello,???? I used VTK in 2013. After that, I installed VTK after more than 4 years. I found some changes in Data in the latest version. How to make those MD5 files work? Please let me know. I didn't find much documentation.?I'm really having problem with this.???? Thanks in advance! Regards,Jennifer. ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Thu Sep 14 02:15:06 2017 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Thu, 14 Sep 2017 08:15:06 +0200 Subject: [vtkusers] Problem with Data in VTK In-Reply-To: <1348777421.1746712.1505368697394@mail.yahoo.com> References: <676951311.6149494.1505000586316.ref@mail.yahoo.com> <676951311.6149494.1505000586316@mail.yahoo.com> <1432712258.948605.1505283160662@mail.yahoo.com> <1348777421.1746712.1505368697394@mail.yahoo.com> Message-ID: Hi Jennifer, what does your C:\VTK\VTKData directory contain? Have you built the VTKData project? You must build that project so that the actual testing data files are retrieved. HTH, JON HAITZ -- On 14 September 2017 at 07:58, Jennifer Lee via vtkusers wrote: > Hello, > Still I could not make it work. Setting VTK_DATA_ROOT to > ?C:\VTK\VTK-8.0.1\ExternalData\Testing? didn?t work for me. It can?t find > the data. > > I have separate source and build: > Source is : C:\VTK\VTK-8.0.1 > Build is: C:\VTK\VTK-bin > Data is: C:\VTK\VTKData > > As I also built with TESTING_ON; so, I?ve MD5 files under Testing > directory. *C:\VTK\VTK-8.0.1\Testing.* > > I tried to run the tcl script Medical1.tcl. If I set the data root to ? > *C:\VTK\VTK-8.0.1\Testing?*, it can?t find the data (I think because > these are MD5 files). If I set the data root to *C:\VTK\VTKData*, it also > does not work. > > I need help to fix the problem. > Thanks! > > Regards, > Jennifer > > > On Wednesday, September 13, 2017 7:58 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee > wrote: > > Hello, > Thanks so much for the reply. > > Please ignore my poor knowledge. I?m really having trouble in > understanding. > > > No worries, this confuses lots of people including me. > > > I?ve data in the following directory: > > C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, the files look > like something below: > > 00b6935d399b80e4f9edc1414a4c36 3f > 00ba7d9399c914edb4a6faa0b10ae7 e5 > 00d2efba0581fb7d436bcc45a9aced cb > 00d49b1746f315992fac476892c681 ae > : > : > : > : > I really don?t understand what they mean. It seems to me these are some > encrypted names which need to be decrypted. I don?t know how to do that. > > > These are checksums of the real data files. Cmake and git know that they > have to download a different file whenever the data file's checksum doesn't > agree with the above. > > > I built with TESTING_ON, now data are available in the ?Testing? directory > too. Suppose I?d like to run the Medical examples. Now, data is available > in the following directory: > > > *C:\VTK\VTK-8.0.1\Testing\Data\ headsq* > > With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing > > But these are all MD5 files. So the following line of the code does not > find the data: > > *v16 SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/ quarter".* > > Please help me how to make things work. If I've missed any step, please > let me know. > Thanks in advance. > > Where is you build directory? I highly recommend always keeping your VTK > source directory and your VTK build directory separate. > > Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT > to C:\VTK\VTK-8.0.1\ExternalData\Testing. This is where the data file > links are. The real data files are elsewhere in files with MD5 names, but > for all intents and purposes the data link files that refer to them work as > if they were the read data files. > > > > Regards, > Jennifer > > > > > On Tuesday, September 12, 2017 9:32 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > We changed the structure of regression test data in 6.1 to allow > developers to make proposed changes to code and data concurrently and > ensure that the continuous integration test machines do not fail when they > run new tests on old data. > > The net result is that a VTK build tree has test data files that are > actually symbolic links to the md5 files which live elsewhere. You can > generally open and use the symbolic links exactly as you would a normal > data file. If you turn on testing in your build, cmake will try to download > each one of the files. Alternatively you can untar the source and data > packages for a release in the same directory and the default build setup > will use them and avoid downloading anything else. > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers < > vtkusers at vtk.org> wrote: > > Hello, > I used VTK in 2013. After that, I installed VTK after more than 4 > years. I found some changes in Data in the latest version. How to make > those MD5 files work? Please let me know. I didn't find much > documentation. I'm really having problem with this. > Thanks in advance! > > Regards, > Jennifer. > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From romain.leguay at gmail.com Thu Sep 14 05:25:42 2017 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Thu, 14 Sep 2017 11:25:42 +0200 Subject: [vtkusers] Combination of HighlightSelection example and ExtractVisibleCells Message-ID: <273C3631-78EF-4FC5-9C69-9E09F83AC154@gmail.com> Hello everyone, I try to do some area cell picking. My object is a sphere. I started from the HighlightSelection example but the selection is done on the whole volume so not visible cells are also picked. I was thinking to use vtkHardwareSelector like in ExtractVisibleCells example then apply the picking on the output object obtain from the vtkExtractSelection filter but I saw that vtkHardwareSelector doesn?t work with antialiasing (that my application use). I wanted to know if there is a way to test if a cell is visible or not for an unstructured grid. (I saw that the structured grid provide a method to do this but not unstructured grid). Thank you! Romain From 224252 at via.dk Thu Sep 14 05:37:04 2017 From: 224252 at via.dk (Doina Gumeniuc (224252 MAHS)) Date: Thu, 14 Sep 2017 09:37:04 +0000 Subject: [vtkusers] Connect points in paraview Message-ID: Hi dear vtkusers. I would really appreciate if you could guide me on how to connect points in paraview with beam elements, FEM style. Thnak you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Thu Sep 14 05:46:16 2017 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Thu, 14 Sep 2017 11:46:16 +0200 Subject: [vtkusers] Connect points in paraview In-Reply-To: References: Message-ID: Hello I would suggest sending a mail to the ParaView mailing list. Best regards, Mathieu Westphal On Thu, Sep 14, 2017 at 11:37 AM, Doina Gumeniuc (224252 MAHS) < 224252 at via.dk> wrote: > Hi dear vtkusers. > > I would really appreciate if you could guide me on how to connect points > in paraview with beam elements, FEM style. > > Thnak you! > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincentrivola at hotmail.com Thu Sep 14 06:01:24 2017 From: vincentrivola at hotmail.com (vincentrivola) Date: Thu, 14 Sep 2017 03:01:24 -0700 (MST) Subject: [vtkusers] Combination of HighlightSelection example and ExtractVisibleCells In-Reply-To: <273C3631-78EF-4FC5-9C69-9E09F83AC154@gmail.com> References: <273C3631-78EF-4FC5-9C69-9E09F83AC154@gmail.com> Message-ID: <1505383284874-0.post@n5.nabble.com> Hello, I did work on something similar few month ago. The only way I found to make it work was to combine a vtkHarwareSelector with vtkExtractSelection. The problem is that the result depends on the resolution of your screen and the resolution (density of triangles) of the surface you work on. If the surface is descretized finer than your screen resolution the selector does not work properly. At least that was the behavior I got at that time. But I'm still interested in the topic and if there is a better way to do this I would love to know it. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aralol2015 at gmail.com Thu Sep 14 07:17:20 2017 From: aralol2015 at gmail.com (Duster U) Date: Thu, 14 Sep 2017 16:47:20 +0530 Subject: [vtkusers] Picking in DICOM series Message-ID: Hi, I've been trying to implement a Picker in the OnMouseMove of a custom vtkinteractorstyleImage,so that i can get the pixel coordinates of an image while hovering over an image.Now I've tried both the Point Picker and the Prop Picker to do so,,both gives the coordinates but the problem is that the values are not correct.So am i missing anything? and i am new to vtk,So please help me out Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Thu Sep 14 08:20:43 2017 From: tjlp at netease.com (Liu_tj) Date: Thu, 14 Sep 2017 20:20:43 +0800 (CST) Subject: [vtkusers] Picking in DICOM series In-Reply-To: References: Message-ID: <399fced.5.15e80558c5d.Coremail.tjlp@netease.com> How do you know the values are wrong? ?2017-09-14?"Duster U" ??? -----????----- ???:"Duster U" ????:2017?09?14? ??? ???:"vtkusers" ??:[vtkusers] Picking in DICOM series Hi, I've been trying to implement a Picker in the OnMouseMove of a custom vtkinteractorstyleImage,so that i can get the pixel coordinates of an image while hovering over an image.Now I've tried both the Point Picker and the Prop Picker to do so,,both gives the coordinates but the problem is that the values are not correct.So am i missing anything? and i am new to vtk,So please help me out Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Sep 14 09:07:52 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 14 Sep 2017 09:07:52 -0400 Subject: [vtkusers] Deprecate VTK_RENDERING_BACKEND=OpenGL Message-ID: Hi all, We are working to deprecate the legacy rendering backend in VTK. https://gitlab.kitware.com/vtk/vtk/merge_requests/3262 After this merge request is in, you'll get warnings if you compile using VTK_RENDERING_BACKEND=OpenGL. As with other legacy features, you can silence the warnings by setting VTK_LEGACY_SILENT=ON You can remove legacy features by defining VTK_LEGACY_REMOVE=ON In this case, you'll get an error and will be automatically switch to VTK_RENDERING_BACKEND:STRING=OpenGL2 Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Sep 14 09:47:52 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 14 Sep 2017 09:47:52 -0400 Subject: [vtkusers] [vtk-developers] Deprecate VTK_RENDERING_BACKEND=OpenGL In-Reply-To: References: Message-ID: Does the standard ubuntu OSMesa work with opengl2 On Sep 14, 2017 9:07 AM, "Dan Lipsa" wrote: > Hi all, > > We are working to deprecate the legacy rendering backend in VTK. > > https://gitlab.kitware.com/vtk/vtk/merge_requests/3262 > > After this merge request is in, you'll get warnings if you compile > using VTK_RENDERING_BACKEND=OpenGL. > > As with other legacy features, you can silence the warnings by setting > VTK_LEGACY_SILENT=ON > > You can remove legacy features by defining > VTK_LEGACY_REMOVE=ON > In this case, you'll get an error and will be automatically switch to > VTK_RENDERING_BACKEND:STRING=OpenGL2 > > > Thanks, > Dan > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lplavorante at gmail.com Thu Sep 14 10:12:12 2017 From: lplavorante at gmail.com (Luca Pallozzi Lavorante) Date: Thu, 14 Sep 2017 11:12:12 -0300 Subject: [vtkusers] Is interaction between Polygon Offset and Line Offset parameters allowed? Message-ID: Hi vtkusers, I am trying to visualize several (almost) coincident surfaces and wireframe objects using VTK 8.0 and OpenGL2 on Linux. I am providing a code snippet in Python, in which I have created two Mappers from the same object and then the corresponding Actors. One of the two actors is slighty shifted in order to simulate geometries which are not exactly coincident. Also note that I had to perform a relatively high Z scaling because the objects are geologic regional surfaces, which would appear nearly flat without proper scaling. # Surface 1 (Red) surf1Mapper = vtk.vtkPolyDataMapper() surf1Mapper.SetInputData(surf) surf1Mapper.SetResolveCoincidentTopologyToPolygonOffset() surf1Mapper.SetRelativeCoincidentTopologyPolygonOffsetParameters(-2.0, -2.0) surf1Actor = vtk.vtkActor() surf1Actor.SetMapper(surf1Mapper) surf1Actor.GetProperty().SetColor(1, 0, 0) surf1Actor.SetScale(1, 1, 100) # Not necessary. Only used to clarify things. surf1Actor.SetPosition(0, 0, 0) # Surface 2 (Blue) surf2Mapper = vtk.vtkPolyDataMapper() surf2Mapper.SetInputData(surf) surf2Mapper.SetResolveCoincidentTopologyToPolygonOffset() surf2Mapper.SetRelativeCoincidentTopologyPolygonOffsetParameters(-4.0, -9.0) surf2Actor = vtk.vtkActor() surf2Actor.SetMapper(surf2Mapper) surf2Actor.GetProperty().SetColor(0, 0, 1) surf2Actor.SetScale(1, 1, 100) # Perform small shift in order to simulate interaction between non-coincident geometries. surf2Actor.SetPosition(0, 0, 10) # Edges from surface 1. Observe that this object is not translated, so that its geometry is coincident with surface1's (which has a lower polygon offset priority compared to surface2). edges = vtk.vtkExtractEdges() edges.SetInputData(surf) edges.Update() edgesMapper = vtk.vtkPolyDataMapper() edgesMapper.SetInputData(edges.GetOutput()) edgesMapper.SetResolveCoincidentTopologyToPolygonOffset() edgesMapper.SetRelativeCoincidentTopologyLineOffsetParameters(-20.0, -20.0) edgesActor = vtk.vtkActor() edgesActor.SetMapper(edgesMapper) edgesActor.GetProperty().SetColor(0, 0, 0) edgesActor.SetScale(1, 1, 100) # Again, this is not necessary. edgesActor.SetPosition(0, 0, 0) To avoid Z-fighting between the surfaces' faces, I used vtkMapper:: SetResolveCoincidentTopologyToPolygonOffset() and then provided different values for the parameters factor and units, using each mapper's SetRelativeCoincidentTopology PolygonOffset Parameters() method. Surface 1 has (factor, units) = (-2, -2), whereas Surface 2 (which has drawing priority) uses (-4, -9). I had to use units = -9 because lower values would end up showing some polygons from surface 1. Then I tried to add a wireframe object, whose geometry is the same as surface1's. You can see in the code that I had to use high values (-20, -20) for factor and units (via the SetRelativeCoincidentTopology LineOffset Parameters() method). This was necessary because I wasn't able to see all the edges on surface2. I have read Ken Martin's post explaining the difference between the factor and units parameters: http://markmail.org/search/?q=vtkusers+polygonoffset#query:vtkusers%20polygonoffset+page:1+mid:lpucqjdjbjz3hy53+state:results I verified that to avoid Z-fighting issues between polygons, the factor and units parameters must have the same order of magnitude (e.g. -2, -2). Also, I have tried, whenever possible, to follow Ken's advice not to use values with magnitudes higher than (minus or plus) 10. But in the case of the wireframe object, my parameters had to be higher. And even so, I couldn't assure the visualization of all the edges, as you can see in the attached image. Moreover, the problem persists even when I use exactly coincident surfaces (e.g., removing the vtkActor::SetPosition() methods. If you have had the patience of following me until this point, I'd like to ask these questions: 1. Is is possible to specify priorities between polygon/polygon and line/polygon parameters? For example, surface 1 used (factor, units) = (-2, -2), surface 2 used (-4, -9) (PolygonOffset parameters), whereas edges used (-20, -20), the highes priority among the three objects, set using LineOffset parameters. Is this consistent? In my application, I have Z-fighting issues among 3-4 coincident surfaces (each with its own geologic meaning provided by different CellData values) and also among 8-9 coincident lines. And the two groups interact, in the sense that lines must always be drawn correctly on any surface. Can I achieve this using VTK's Polygon Offset approach? 2. Would it be possible to do what I am trying to achieve using different approaches? I have tried using vtkMapper::SetResolveCoincidentTopologyZShift(), but with little success. I know this is a very long post and apologize for that, but I have been struggling with this issue for the last two weeks. So I tried to add as much information as possible. Thank you very much for any advice. Luca -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LineOffset.jpg Type: image/jpeg Size: 116520 bytes Desc: not available URL: From dan.lipsa at kitware.com Thu Sep 14 10:22:22 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 14 Sep 2017 10:22:22 -0400 Subject: [vtkusers] [vtk-developers] Deprecate VTK_RENDERING_BACKEND=OpenGL In-Reply-To: References: Message-ID: Hi Bill, I have Ubuntu 16.04 (latest LTS) which has mesa 12.0. That should work fine with OpenGL2. The following blog mentions that OpenGL2 works with Mesa 11.1 (with a workaround) and with 11.2. https://blog.kitware.com/messing-with-mesa-for-paraview-5-0vtk-7-0/ On Thu, Sep 14, 2017 at 9:47 AM, Bill Lorensen wrote: > Does the standard ubuntu OSMesa work with opengl2 > > > On Sep 14, 2017 9:07 AM, "Dan Lipsa" wrote: > >> Hi all, >> >> We are working to deprecate the legacy rendering backend in VTK. >> >> https://gitlab.kitware.com/vtk/vtk/merge_requests/3262 >> >> After this merge request is in, you'll get warnings if you compile >> using VTK_RENDERING_BACKEND=OpenGL. >> >> As with other legacy features, you can silence the warnings by setting >> VTK_LEGACY_SILENT=ON >> >> You can remove legacy features by defining >> VTK_LEGACY_REMOVE=ON >> In this case, you'll get an error and will be automatically switch to >> VTK_RENDERING_BACKEND:STRING=OpenGL2 >> >> >> Thanks, >> Dan >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From siming.bayer at gmail.com Thu Sep 14 10:28:03 2017 From: siming.bayer at gmail.com (Siming Bayer) Date: Thu, 14 Sep 2017 16:28:03 +0200 Subject: [vtkusers] Convert Binary Image to vtkPolyData Message-ID: Dear all, I know that vtkPolyDataToImageStencil can be used to convert vtkPolyData to a binary image. Is there any possibility to do it in the inverse way? I would like to use a binary image to generate a mesh via VTK. best, Siming From bill.lorensen at gmail.com Thu Sep 14 10:32:41 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 14 Sep 2017 10:32:41 -0400 Subject: [vtkusers] [vtk-developers] Deprecate VTK_RENDERING_BACKEND=OpenGL In-Reply-To: References: Message-ID: Thanks! On Thu, Sep 14, 2017 at 10:22 AM, Dan Lipsa wrote: > Hi Bill, > I have Ubuntu 16.04 (latest LTS) which has mesa 12.0. That should work fine > with OpenGL2. > > The following blog mentions that OpenGL2 works with Mesa 11.1 (with a > workaround) and with 11.2. > https://blog.kitware.com/messing-with-mesa-for-paraview-5-0vtk-7-0/ > > > On Thu, Sep 14, 2017 at 9:47 AM, Bill Lorensen > wrote: >> >> Does the standard ubuntu OSMesa work with opengl2 >> >> >> On Sep 14, 2017 9:07 AM, "Dan Lipsa" wrote: >>> >>> Hi all, >>> >>> We are working to deprecate the legacy rendering backend in VTK. >>> >>> https://gitlab.kitware.com/vtk/vtk/merge_requests/3262 >>> >>> After this merge request is in, you'll get warnings if you compile using >>> VTK_RENDERING_BACKEND=OpenGL. >>> >>> As with other legacy features, you can silence the warnings by setting >>> VTK_LEGACY_SILENT=ON >>> >>> You can remove legacy features by defining >>> VTK_LEGACY_REMOVE=ON >>> In this case, you'll get an error and will be automatically switch to >>> VTK_RENDERING_BACKEND:STRING=OpenGL2 >>> >>> >>> Thanks, >>> Dan >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Search the list archives at: http://markmail.org/search/?q=vtk-developers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtk-developers >>> >>> > -- Unpaid intern in BillsBasement at noware dot com From sean at rogue-research.com Thu Sep 14 10:34:01 2017 From: sean at rogue-research.com (Sean McBride) Date: Thu, 14 Sep 2017 10:34:01 -0400 Subject: [vtkusers] VTK 7.1 vtkDataArray changes, current best way to copy vtkPolyData data? In-Reply-To: References: <20170608161455.629604336@mail.rogue-research.com> Message-ID: <20170914143401.524896729@mail.rogue-research.com> Following-up on an older thread... First, thanks! Now I'm interested in the opposite. That is, I have an existing raw buffer of say doubles that comes from somewhere else. I want to create a vtkDoubleArray that *copies* the data. Is there any API that takes a raw buffer and does a memcpy? Otherwise is it best to call InsertNextTuple() in a loop? Cheers, Sean On Fri, 9 Jun 2017 09:42:12 -0400, David Lonie said: >If you just want to dump the data from any vtkDataArray into a memory >buffer using AOS ordering (e.g. typical VTK memory layout with >coherent tuples), something like: > >vtkDataArray *array = ...; >int bufSize = array->GetNumberOfValues() * array->GetDataTypeSize(); >void *buffer = malloc(bufSize); >array->ExportToVoidPointer(buffer); > >will be the most efficient way to do this. > >HTH, >Dave > >On Thu, Jun 8, 2017 at 12:14 PM, Sean McBride wrote: >> Hi all, >> >> Since the vtkDataArray changes in VTK 7.1, what is the current best/ >fastest way to extract the points, strips, and normals from a >vtkPolyData into another memory buffer? >> >> I'm always working with the same kind of data, so I'm hoping to >preflight the sizes/types and then basically memcpy() the data out. From andy.bauer at kitware.com Thu Sep 14 10:38:54 2017 From: andy.bauer at kitware.com (Andy Bauer) Date: Thu, 14 Sep 2017 10:38:54 -0400 Subject: [vtkusers] VTK 7.1 vtkDataArray changes, current best way to copy vtkPolyData data? In-Reply-To: <20170914143401.524896729@mail.rogue-research.com> References: <20170608161455.629604336@mail.rogue-research.com> <20170914143401.524896729@mail.rogue-research.com> Message-ID: Hi Sean, You'd have to do the copy yourself in this case. Also, in this case I think it's valid to use the GetVoidPointer() after you've set the number of tuples and components and do a memcpy yourself as you know that it will be in the "legacy" VTK ordering style because you're manually creating it. With the alternate memory layouts of vtkDataArray derived classes it's very bad practice to use the GetVoidPointer() method for arrays of unknown origin since if it is in the SOA layout it will have to do a deep copy to get it into the AOS layout. Cheers, Andy On Thu, Sep 14, 2017 at 10:34 AM, Sean McBride wrote: > Following-up on an older thread... > > First, thanks! > > Now I'm interested in the opposite. That is, I have an existing raw > buffer of say doubles that comes from somewhere else. I want to create a > vtkDoubleArray that *copies* the data. Is there any API that takes a raw > buffer and does a memcpy? Otherwise is it best to call InsertNextTuple() > in a loop? > > Cheers, > > Sean > > > On Fri, 9 Jun 2017 09:42:12 -0400, David Lonie said: > > >If you just want to dump the data from any vtkDataArray into a memory > >buffer using AOS ordering (e.g. typical VTK memory layout with > >coherent tuples), something like: > > > >vtkDataArray *array = ...; > >int bufSize = array->GetNumberOfValues() * array->GetDataTypeSize(); > >void *buffer = malloc(bufSize); > >array->ExportToVoidPointer(buffer); > > > >will be the most efficient way to do this. > > > >HTH, > >Dave > > > >On Thu, Jun 8, 2017 at 12:14 PM, Sean McBride > wrote: > >> Hi all, > >> > >> Since the vtkDataArray changes in VTK 7.1, what is the current best/ > >fastest way to extract the points, strips, and normals from a > >vtkPolyData into another memory buffer? > >> > >> I'm always working with the same kind of data, so I'm hoping to > >preflight the sizes/types and then basically memcpy() the data out. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Sep 14 10:43:22 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 14 Sep 2017 10:43:22 -0400 Subject: [vtkusers] Is interaction between Polygon Offset and Line Offset parameters allowed? In-Reply-To: References: Message-ID: In this example Surf1 and Surf2 are NOT (just emphasizing not yelling :-) coincident as you have shifted surf2 by 10 world units in Z. So depending on the geometry of surf and the viewing direction surf2 may be in front of or behind surf1 by up to 10 world coordinates. The relation between world coordinates and polygon offset is complex and non-linear so it will be hard to pick values for surf2 that ALWAYS place it in front of surf1 given that they are NOT coincident and the user can rotate the camera etc. But if you go with a large enough set of values you can probably force it to be in front for most all viewpoints. If surf1 and surf2 are really supposed to be coincident then leave them at the same position and just use the Polygon offsets to do what you want. And yes with different sets of factor/unit values you should be able to have many sets of surfaces/lines, all coincident, but yet shown with the order you desire. Just leave them all coincident and adjust the factor offset by say -3, -3 for each layer would be my guess. On Thu, Sep 14, 2017 at 10:12 AM, Luca Pallozzi Lavorante < lplavorante at gmail.com> wrote: > Hi vtkusers, > > I am trying to visualize several (almost) coincident surfaces and > wireframe objects using VTK 8.0 and OpenGL2 on Linux. I am providing a code > snippet in Python, in which I have created two Mappers from the same object > and then the corresponding Actors. One of the two actors is slighty shifted > in order to simulate geometries which are not exactly coincident. Also note > that I had to perform a relatively high Z scaling because the objects are > geologic regional surfaces, which would appear nearly flat without proper > scaling. > > # Surface 1 (Red) > surf1Mapper = vtk.vtkPolyDataMapper() > surf1Mapper.SetInputData(surf) > surf1Mapper.SetResolveCoincidentTopologyToPolygonOffset() > surf1Mapper.SetRelativeCoincidentTopologyPolygonOffsetParameters(-2.0, > -2.0) > > surf1Actor = vtk.vtkActor() > surf1Actor.SetMapper(surf1Mapper) > surf1Actor.GetProperty().SetColor(1, 0, 0) > surf1Actor.SetScale(1, 1, 100) > > # Not necessary. Only used to clarify things. > surf1Actor.SetPosition(0, 0, 0) > > # Surface 2 (Blue) > surf2Mapper = vtk.vtkPolyDataMapper() > surf2Mapper.SetInputData(surf) > surf2Mapper.SetResolveCoincidentTopologyToPolygonOffset() > surf2Mapper.SetRelativeCoincidentTopologyPolygonOffsetParameters(-4.0, > -9.0) > > surf2Actor = vtk.vtkActor() > surf2Actor.SetMapper(surf2Mapper) > surf2Actor.GetProperty().SetColor(0, 0, 1) > surf2Actor.SetScale(1, 1, 100) > # Perform small shift in order to simulate interaction between > non-coincident geometries. > surf2Actor.SetPosition(0, 0, 10) > > # Edges from surface 1. Observe that this object is not translated, so > that its geometry is coincident with surface1's (which has a lower polygon > offset priority compared to surface2). > edges = vtk.vtkExtractEdges() > edges.SetInputData(surf) > edges.Update() > > edgesMapper = vtk.vtkPolyDataMapper() > edgesMapper.SetInputData(edges.GetOutput()) > edgesMapper.SetResolveCoincidentTopologyToPolygonOffset() > edgesMapper.SetRelativeCoincidentTopologyLineOffsetParameters(-20.0, > -20.0) > > edgesActor = vtk.vtkActor() > edgesActor.SetMapper(edgesMapper) > edgesActor.GetProperty().SetColor(0, 0, 0) > edgesActor.SetScale(1, 1, 100) > > # Again, this is not necessary. > edgesActor.SetPosition(0, 0, 0) > > To avoid Z-fighting between the surfaces' faces, I used vtkMapper:: > SetResolveCoincidentTopologyToPolygonOffset() and then provided different > values for the parameters factor and units, using each mapper's > SetRelativeCoincidentTopology PolygonOffset Parameters() method. Surface 1 > has (factor, units) = (-2, -2), whereas Surface 2 (which has drawing > priority) uses (-4, -9). I had to use units = -9 because lower values would > end up showing some polygons from surface 1. > Then I tried to add a wireframe object, whose geometry is the same as > surface1's. > You can see in the code that I had to use high values (-20, -20) for > factor and units (via the SetRelativeCoincidentTopology LineOffset > Parameters() method). This was necessary because I wasn't able to see all > the edges on surface2. > > I have read Ken Martin's post explaining the difference between the factor > and units parameters: > http://markmail.org/search/?q=vtkusers+polygonoffset#query: > vtkusers%20polygonoffset+page:1+mid:lpucqjdjbjz3hy53+state:results > > I verified that to avoid Z-fighting issues between polygons, the factor > and units parameters must have the same order of magnitude (e.g. -2, -2). > Also, I have tried, whenever possible, to follow Ken's advice not to use > values with magnitudes higher than (minus or plus) 10. But in the case of > the wireframe object, my parameters had to be higher. And even so, I > couldn't assure the visualization of all the edges, as you can see in the > attached image. > Moreover, the problem persists even when I use exactly coincident surfaces > (e.g., removing the vtkActor::SetPosition() methods. > > If you have had the patience of following me until this point, I'd like to > ask these questions: > > 1. Is is possible to specify priorities between polygon/polygon and > line/polygon parameters? For example, surface 1 used (factor, units) = (-2, > -2), surface 2 used (-4, -9) (PolygonOffset parameters), whereas edges used > (-20, -20), the highes priority among the three objects, set using > LineOffset parameters. Is this consistent? > In my application, I have Z-fighting issues among 3-4 coincident surfaces > (each with its own geologic meaning provided by different CellData values) > and also among 8-9 coincident lines. And the two groups interact, in the > sense that lines must always be drawn correctly on any surface. Can I > achieve this using VTK's Polygon Offset approach? > > 2. Would it be possible to do what I am trying to achieve using different > approaches? I have tried using vtkMapper::SetResolveCoincidentTopologyZShift(), > but with little success. > > I know this is a very long post and apologize for that, but I have been > struggling with this issue for the last two weeks. So I tried to add as > much information as possible. > > Thank you very much for any advice. > > Luca > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From inglis.dl at gmail.com Thu Sep 14 10:43:23 2017 From: inglis.dl at gmail.com (Dean Inglis) Date: Thu, 14 Sep 2017 10:43:23 -0400 Subject: [vtkusers] Convert Binary Image to vtkPolyData In-Reply-To: References: Message-ID: Hi Siming, you could use vtkImageMarchingCubes to extract an isosurface. - Dean On Thu, Sep 14, 2017 at 10:28 AM, Siming Bayer wrote: > Dear all, > > I know that vtkPolyDataToImageStencil can be used to convert vtkPolyData > to a binary image. Is there any possibility to do it in the inverse way? I > would like to use a binary image to generate a mesh via VTK. > > best, > Siming > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Sep 14 10:47:19 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 14 Sep 2017 08:47:19 -0600 Subject: [vtkusers] Convert Binary Image to vtkPolyData In-Reply-To: References: Message-ID: And, of course, vtkMarchingSquares for 2D images. On Thu, Sep 14, 2017 at 8:43 AM, Dean Inglis wrote: > Hi Siming, > > you could use vtkImageMarchingCubes to extract an isosurface. > > - Dean > > On Thu, Sep 14, 2017 at 10:28 AM, Siming Bayer > wrote: > >> Dear all, >> >> I know that vtkPolyDataToImageStencil can be used to convert vtkPolyData >> to a binary image. Is there any possibility to do it in the inverse way? I >> would like to use a binary image to generate a mesh via VTK. >> >> best, >> Siming >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From allison.vacanti at kitware.com Thu Sep 14 11:10:20 2017 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Thu, 14 Sep 2017 11:10:20 -0400 Subject: [vtkusers] VTK 7.1 vtkDataArray changes, current best way to copy vtkPolyData data? In-Reply-To: References: <20170608161455.629604336@mail.rogue-research.com> <20170914143401.524896729@mail.rogue-research.com> Message-ID: I think the best way to handle this would be to use a temporary vtkDataArray that uses your buffer in-situ and then DeepCopy() it into the target array. vtkDataArray::DeepCopy is optimized to copy AoS->AoS and SoA->SoA efficiently, while falling back to a slower path for other copy types. For example: double *aosArrayData = ...; vtkNew output; { // Limit tmp's scope vtkNew tmp; tmp->SetArray(aosArrayData, ...); output->DeepCopy(tmp); } is an AoS --> AoS same-type copy, and is implemented as a simple std::copy call (which the STL will resolve to a memcpy). HTH, Allie On Thu, Sep 14, 2017 at 10:38 AM, Andy Bauer wrote: > Hi Sean, > > You'd have to do the copy yourself in this case. Also, in this case I think > it's valid to use the GetVoidPointer() after you've set the number of tuples > and components and do a memcpy yourself as you know that it will be in the > "legacy" VTK ordering style because you're manually creating it. With the > alternate memory layouts of vtkDataArray derived classes it's very bad > practice to use the GetVoidPointer() method for arrays of unknown origin > since if it is in the SOA layout it will have to do a deep copy to get it > into the AOS layout. > > Cheers, > Andy > > On Thu, Sep 14, 2017 at 10:34 AM, Sean McBride > wrote: >> >> Following-up on an older thread... >> >> First, thanks! >> >> Now I'm interested in the opposite. That is, I have an existing raw >> buffer of say doubles that comes from somewhere else. I want to create a >> vtkDoubleArray that *copies* the data. Is there any API that takes a raw >> buffer and does a memcpy? Otherwise is it best to call InsertNextTuple() in >> a loop? >> >> Cheers, >> >> Sean >> >> >> On Fri, 9 Jun 2017 09:42:12 -0400, David Lonie said: >> >> >If you just want to dump the data from any vtkDataArray into a memory >> >buffer using AOS ordering (e.g. typical VTK memory layout with >> >coherent tuples), something like: >> > >> >vtkDataArray *array = ...; >> >int bufSize = array->GetNumberOfValues() * array->GetDataTypeSize(); >> >void *buffer = malloc(bufSize); >> >array->ExportToVoidPointer(buffer); >> > >> >will be the most efficient way to do this. >> > >> >HTH, >> >Dave >> > >> >On Thu, Jun 8, 2017 at 12:14 PM, Sean McBride >> > wrote: >> >> Hi all, >> >> >> >> Since the vtkDataArray changes in VTK 7.1, what is the current best/ >> >fastest way to extract the points, strips, and normals from a >> >vtkPolyData into another memory buffer? >> >> >> >> I'm always working with the same kind of data, so I'm hoping to >> >preflight the sizes/types and then basically memcpy() the data out. >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > From lplavorante at gmail.com Thu Sep 14 12:55:29 2017 From: lplavorante at gmail.com (Luca Pallozzi Lavorante) Date: Thu, 14 Sep 2017 13:55:29 -0300 Subject: [vtkusers] Is interaction between Polygon Offset and Line Offset parameters allowed? In-Reply-To: References: Message-ID: Hi Ken, thank you very much for your reply. In my application, some of the surfaces are not exactly coincident, due to their build process, so I'll have to test the best set of factor/units values. These values will have to be high. Best regards Luca On Thu, Sep 14, 2017 at 11:43 AM, Ken Martin wrote: > In this example Surf1 and Surf2 are NOT (just emphasizing not yelling :-) > coincident as you have shifted surf2 by 10 world units in Z. So depending > on the geometry of surf and the viewing direction surf2 may be in front of > or behind surf1 by up to 10 world coordinates. The relation between world > coordinates and polygon offset is complex and non-linear so it will be hard > to pick values for surf2 that ALWAYS place it in front of surf1 given that > they are NOT coincident and the user can rotate the camera etc. > > But if you go with a large enough set of values you can probably force it > to be in front for most all viewpoints. > > If surf1 and surf2 are really supposed to be coincident then leave them at > the same position and just use the Polygon offsets to do what you want. And > yes with different sets of factor/unit values you should be able to have > many sets of surfaces/lines, all coincident, but yet shown with the order > you desire. Just leave them all coincident and adjust the factor offset by > say -3, -3 for each layer would be my guess. > > > > > > > On Thu, Sep 14, 2017 at 10:12 AM, Luca Pallozzi Lavorante < > lplavorante at gmail.com> wrote: > >> Hi vtkusers, >> >> I am trying to visualize several (almost) coincident surfaces and >> wireframe objects using VTK 8.0 and OpenGL2 on Linux. I am providing a code >> snippet in Python, in which I have created two Mappers from the same object >> and then the corresponding Actors. One of the two actors is slighty shifted >> in order to simulate geometries which are not exactly coincident. Also note >> that I had to perform a relatively high Z scaling because the objects are >> geologic regional surfaces, which would appear nearly flat without proper >> scaling. >> >> # Surface 1 (Red) >> surf1Mapper = vtk.vtkPolyDataMapper() >> surf1Mapper.SetInputData(surf) >> surf1Mapper.SetResolveCoincidentTopologyToPolygonOffset() >> surf1Mapper.SetRelativeCoincidentTopologyPolygonOffsetParameters(-2.0, >> -2.0) >> >> surf1Actor = vtk.vtkActor() >> surf1Actor.SetMapper(surf1Mapper) >> surf1Actor.GetProperty().SetColor(1, 0, 0) >> surf1Actor.SetScale(1, 1, 100) >> >> # Not necessary. Only used to clarify things. >> surf1Actor.SetPosition(0, 0, 0) >> >> # Surface 2 (Blue) >> surf2Mapper = vtk.vtkPolyDataMapper() >> surf2Mapper.SetInputData(surf) >> surf2Mapper.SetResolveCoincidentTopologyToPolygonOffset() >> surf2Mapper.SetRelativeCoincidentTopologyPolygonOffsetParameters(-4.0, >> -9.0) >> >> surf2Actor = vtk.vtkActor() >> surf2Actor.SetMapper(surf2Mapper) >> surf2Actor.GetProperty().SetColor(0, 0, 1) >> surf2Actor.SetScale(1, 1, 100) >> # Perform small shift in order to simulate interaction between >> non-coincident geometries. >> surf2Actor.SetPosition(0, 0, 10) >> >> # Edges from surface 1. Observe that this object is not translated, so >> that its geometry is coincident with surface1's (which has a lower polygon >> offset priority compared to surface2). >> edges = vtk.vtkExtractEdges() >> edges.SetInputData(surf) >> edges.Update() >> >> edgesMapper = vtk.vtkPolyDataMapper() >> edgesMapper.SetInputData(edges.GetOutput()) >> edgesMapper.SetResolveCoincidentTopologyToPolygonOffset() >> edgesMapper.SetRelativeCoincidentTopologyLineOffsetParameters(-20.0, >> -20.0) >> >> edgesActor = vtk.vtkActor() >> edgesActor.SetMapper(edgesMapper) >> edgesActor.GetProperty().SetColor(0, 0, 0) >> edgesActor.SetScale(1, 1, 100) >> >> # Again, this is not necessary. >> edgesActor.SetPosition(0, 0, 0) >> >> To avoid Z-fighting between the surfaces' faces, I used vtkMapper:: >> SetResolveCoincidentTopologyToPolygonOffset() and then provided >> different values for the parameters factor and units, using each mapper's >> SetRelativeCoincidentTopology PolygonOffset Parameters() method. Surface 1 >> has (factor, units) = (-2, -2), whereas Surface 2 (which has drawing >> priority) uses (-4, -9). I had to use units = -9 because lower values would >> end up showing some polygons from surface 1. >> Then I tried to add a wireframe object, whose geometry is the same as >> surface1's. >> You can see in the code that I had to use high values (-20, -20) for >> factor and units (via the SetRelativeCoincidentTopology LineOffset >> Parameters() method). This was necessary because I wasn't able to see all >> the edges on surface2. >> >> I have read Ken Martin's post explaining the difference between the >> factor and units parameters: >> http://markmail.org/search/?q=vtkusers+polygonoffset#query:v >> tkusers%20polygonoffset+page:1+mid:lpucqjdjbjz3hy53+state:results >> >> I verified that to avoid Z-fighting issues between polygons, the factor >> and units parameters must have the same order of magnitude (e.g. -2, -2). >> Also, I have tried, whenever possible, to follow Ken's advice not to use >> values with magnitudes higher than (minus or plus) 10. But in the case of >> the wireframe object, my parameters had to be higher. And even so, I >> couldn't assure the visualization of all the edges, as you can see in the >> attached image. >> Moreover, the problem persists even when I use exactly coincident >> surfaces (e.g., removing the vtkActor::SetPosition() methods. >> >> If you have had the patience of following me until this point, I'd like >> to ask these questions: >> >> 1. Is is possible to specify priorities between polygon/polygon and >> line/polygon parameters? For example, surface 1 used (factor, units) = (-2, >> -2), surface 2 used (-4, -9) (PolygonOffset parameters), whereas edges used >> (-20, -20), the highes priority among the three objects, set using >> LineOffset parameters. Is this consistent? >> In my application, I have Z-fighting issues among 3-4 coincident surfaces >> (each with its own geologic meaning provided by different CellData values) >> and also among 8-9 coincident lines. And the two groups interact, in the >> sense that lines must always be drawn correctly on any surface. Can I >> achieve this using VTK's Polygon Offset approach? >> >> 2. Would it be possible to do what I am trying to achieve using different >> approaches? I have tried using vtkMapper::SetResolveCoincidentTopologyZShift(), >> but with little success. >> >> I know this is a very long post and apologize for that, but I have been >> struggling with this issue for the last two weeks. So I tried to add as >> much information as possible. >> >> Thank you very much for any advice. >> >> Luca >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > > Clifton Park NY 12065 > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Sep 14 13:34:14 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 14 Sep 2017 13:34:14 -0400 Subject: [vtkusers] Is interaction between Polygon Offset and Line Offset parameters allowed? In-Reply-To: References: Message-ID: Yes, if they are not coincident then it does get a bit tricky. If it helps, the range of values for the units can go all the way up to +-65000 which would be enough to pull something from the far clipping plane all the way up to the front clipping plane. So while we normally talk about small values such as +-2 for coincident topology the actual range can be quite a bit larger if needed. On Thu, Sep 14, 2017 at 12:55 PM, Luca Pallozzi Lavorante < lplavorante at gmail.com> wrote: > Hi Ken, thank you very much for your reply. > In my application, some of the surfaces are not exactly coincident, due to > their build process, so I'll have to test the best set of factor/units > values. These values will have to be high. > > Best regards > > Luca > > On Thu, Sep 14, 2017 at 11:43 AM, Ken Martin > wrote: > >> In this example Surf1 and Surf2 are NOT (just emphasizing not yelling :-) >> coincident as you have shifted surf2 by 10 world units in Z. So depending >> on the geometry of surf and the viewing direction surf2 may be in front of >> or behind surf1 by up to 10 world coordinates. The relation between world >> coordinates and polygon offset is complex and non-linear so it will be hard >> to pick values for surf2 that ALWAYS place it in front of surf1 given that >> they are NOT coincident and the user can rotate the camera etc. >> >> But if you go with a large enough set of values you can probably force it >> to be in front for most all viewpoints. >> >> If surf1 and surf2 are really supposed to be coincident then leave them >> at the same position and just use the Polygon offsets to do what you want. >> And yes with different sets of factor/unit values you should be able to >> have many sets of surfaces/lines, all coincident, but yet shown with the >> order you desire. Just leave them all coincident and adjust the factor >> offset by say -3, -3 for each layer would be my guess. >> >> >> >> >> >> >> On Thu, Sep 14, 2017 at 10:12 AM, Luca Pallozzi Lavorante < >> lplavorante at gmail.com> wrote: >> >>> Hi vtkusers, >>> >>> I am trying to visualize several (almost) coincident surfaces and >>> wireframe objects using VTK 8.0 and OpenGL2 on Linux. I am providing a code >>> snippet in Python, in which I have created two Mappers from the same object >>> and then the corresponding Actors. One of the two actors is slighty shifted >>> in order to simulate geometries which are not exactly coincident. Also note >>> that I had to perform a relatively high Z scaling because the objects are >>> geologic regional surfaces, which would appear nearly flat without proper >>> scaling. >>> >>> # Surface 1 (Red) >>> surf1Mapper = vtk.vtkPolyDataMapper() >>> surf1Mapper.SetInputData(surf) >>> surf1Mapper.SetResolveCoincidentTopologyToPolygonOffset() >>> surf1Mapper.SetRelativeCoincidentTopologyPolygonOffsetParameters(-2.0, >>> -2.0) >>> >>> surf1Actor = vtk.vtkActor() >>> surf1Actor.SetMapper(surf1Mapper) >>> surf1Actor.GetProperty().SetColor(1, 0, 0) >>> surf1Actor.SetScale(1, 1, 100) >>> >>> # Not necessary. Only used to clarify things. >>> surf1Actor.SetPosition(0, 0, 0) >>> >>> # Surface 2 (Blue) >>> surf2Mapper = vtk.vtkPolyDataMapper() >>> surf2Mapper.SetInputData(surf) >>> surf2Mapper.SetResolveCoincidentTopologyToPolygonOffset() >>> surf2Mapper.SetRelativeCoincidentTopologyPolygonOffsetParameters(-4.0, >>> -9.0) >>> >>> surf2Actor = vtk.vtkActor() >>> surf2Actor.SetMapper(surf2Mapper) >>> surf2Actor.GetProperty().SetColor(0, 0, 1) >>> surf2Actor.SetScale(1, 1, 100) >>> # Perform small shift in order to simulate interaction between >>> non-coincident geometries. >>> surf2Actor.SetPosition(0, 0, 10) >>> >>> # Edges from surface 1. Observe that this object is not translated, so >>> that its geometry is coincident with surface1's (which has a lower polygon >>> offset priority compared to surface2). >>> edges = vtk.vtkExtractEdges() >>> edges.SetInputData(surf) >>> edges.Update() >>> >>> edgesMapper = vtk.vtkPolyDataMapper() >>> edgesMapper.SetInputData(edges.GetOutput()) >>> edgesMapper.SetResolveCoincidentTopologyToPolygonOffset() >>> edgesMapper.SetRelativeCoincidentTopologyLineOffsetParameters(-20.0, >>> -20.0) >>> >>> edgesActor = vtk.vtkActor() >>> edgesActor.SetMapper(edgesMapper) >>> edgesActor.GetProperty().SetColor(0, 0, 0) >>> edgesActor.SetScale(1, 1, 100) >>> >>> # Again, this is not necessary. >>> edgesActor.SetPosition(0, 0, 0) >>> >>> To avoid Z-fighting between the surfaces' faces, I used vtkMapper:: >>> SetResolveCoincidentTopologyToPolygonOffset() and then provided >>> different values for the parameters factor and units, using each mapper's >>> SetRelativeCoincidentTopology PolygonOffset Parameters() method. Surface 1 >>> has (factor, units) = (-2, -2), whereas Surface 2 (which has drawing >>> priority) uses (-4, -9). I had to use units = -9 because lower values would >>> end up showing some polygons from surface 1. >>> Then I tried to add a wireframe object, whose geometry is the same as >>> surface1's. >>> You can see in the code that I had to use high values (-20, -20) for >>> factor and units (via the SetRelativeCoincidentTopology LineOffset >>> Parameters() method). This was necessary because I wasn't able to see all >>> the edges on surface2. >>> >>> I have read Ken Martin's post explaining the difference between the >>> factor and units parameters: >>> http://markmail.org/search/?q=vtkusers+polygonoffset#query:v >>> tkusers%20polygonoffset+page:1+mid:lpucqjdjbjz3hy53+state:results >>> >>> I verified that to avoid Z-fighting issues between polygons, the factor >>> and units parameters must have the same order of magnitude (e.g. -2, -2). >>> Also, I have tried, whenever possible, to follow Ken's advice not to use >>> values with magnitudes higher than (minus or plus) 10. But in the case of >>> the wireframe object, my parameters had to be higher. And even so, I >>> couldn't assure the visualization of all the edges, as you can see in the >>> attached image. >>> Moreover, the problem persists even when I use exactly coincident >>> surfaces (e.g., removing the vtkActor::SetPosition() methods. >>> >>> If you have had the patience of following me until this point, I'd like >>> to ask these questions: >>> >>> 1. Is is possible to specify priorities between polygon/polygon and >>> line/polygon parameters? For example, surface 1 used (factor, units) = (-2, >>> -2), surface 2 used (-4, -9) (PolygonOffset parameters), whereas edges used >>> (-20, -20), the highes priority among the three objects, set using >>> LineOffset parameters. Is this consistent? >>> In my application, I have Z-fighting issues among 3-4 coincident >>> surfaces (each with its own geologic meaning provided by different CellData >>> values) and also among 8-9 coincident lines. And the two groups interact, >>> in the sense that lines must always be drawn correctly on any surface. Can >>> I achieve this using VTK's Polygon Offset approach? >>> >>> 2. Would it be possible to do what I am trying to achieve using >>> different approaches? I have tried using vtkMapper::SetResolveCoincidentTopologyZShift(), >>> but with little success. >>> >>> I know this is a very long post and apologize for that, but I have been >>> struggling with this issue for the last two weeks. So I tried to add as >>> much information as possible. >>> >>> Thank you very much for any advice. >>> >>> Luca >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Ken Martin PhD >> Distinguished Engineer >> Kitware Inc. >> 28 Corporate Drive >> >> Clifton Park NY 12065 >> >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Sep 14 14:05:11 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 14 Sep 2017 14:05:11 -0400 Subject: [vtkusers] Convert Binary Image to vtkPolyData In-Reply-To: References: Message-ID: This example might help. https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/ContourTriangulator/ On Thu, Sep 14, 2017 at 10:47 AM, David Gobbi wrote: > And, of course, vtkMarchingSquares for 2D images. > > > On Thu, Sep 14, 2017 at 8:43 AM, Dean Inglis wrote: >> >> Hi Siming, >> >> you could use vtkImageMarchingCubes to extract an isosurface. >> >> - Dean >> >> On Thu, Sep 14, 2017 at 10:28 AM, Siming Bayer >> wrote: >>> >>> Dear all, >>> >>> I know that vtkPolyDataToImageStencil can be used to convert vtkPolyData >>> to a binary image. Is there any possibility to do it in the inverse way? I >>> would like to use a binary image to generate a mesh via VTK. >>> >>> best, >>> Siming > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From lee_jennifer_82 at yahoo.com Thu Sep 14 17:22:40 2017 From: lee_jennifer_82 at yahoo.com (Jennifer Lee) Date: Thu, 14 Sep 2017 21:22:40 +0000 (UTC) Subject: [vtkusers] Problem with Data in VTK In-Reply-To: References: <676951311.6149494.1505000586316.ref@mail.yahoo.com> <676951311.6149494.1505000586316@mail.yahoo.com> <1432712258.948605.1505283160662@mail.yahoo.com> <1348777421.1746712.1505368697394@mail.yahoo.com> Message-ID: <1214731803.2276933.1505424160433@mail.yahoo.com> Hi,?? Thanks for the reply. I downloaded the data and set the VTK_DATA_ROOT to C:\VTK\VTKData.??? Actually that's what I used to do before. I never built VTKData project. How to do that? I believe the source will be C:\VTK\VTKData; but which one will be the build directory??? Please let? me know.?? I've built the VTK project with BUILD_TESTING on. This generated data to the following directory:? ? C:\VTK\VTK-8.0.1\Testing\Data\headsq. But these are all MD5 files and if VTK_DATA_ROOT is pointed there, it can't find these files. ?? Any clarification will be highly appreciated. Regards,Jennifer On Wednesday, September 13, 2017 11:15 PM, Jon Haitz Legarreta wrote: Hi Jennifer, what does your C:\VTK\VTKData directory contain? Have you built the VTKData project? You must build that project so that the actual testing data files are retrieved. HTH, JON HAITZ | | -- On 14 September 2017 at 07:58, Jennifer Lee via vtkusers wrote: Hello,???? Still I could notmake it work. Setting VTK_DATA_ROOT to ?C:\VTK\VTK-8.0.1\ ExternalData\Testing?didn?t work for me. It can?t find the data. ?I have separate source and build: Source is : C:\VTK\VTK-8.0.1Build is: C:\VTK\VTK-binData is: C:\VTK\VTKData ?As I also built with TESTING_ON; so, I?ve MD5 files underTesting directory. C:\VTK\VTK-8.0.1\Testing.?I tried to run the tcl script Medical1.tcl. If I set the ?data root to ?C:\VTK\VTK-8.0.1\Testing?, itcan?t find the data (I think because these are MD5 files). If I set the dataroot to C:\VTK\VTKData, it also does not work.?I need help?to fix the problem.Thanks!?Regards,Jennifer On Wednesday, September 13, 2017 7:58 AM, David E DeMarle wrote: On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee wrote: Hello,?? Thanks so much for the reply. Please ignore my poor knowledge. I?m really having troublein understanding. No worries, this confuses lots of people including me.? I?ve data in the following directory: C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, thefiles look like something below: 00b6935d399b80e4f9edc1414a4c36 3f00ba7d9399c914edb4a6faa0b10ae7 e500d2efba0581fb7d436bcc45a9aced cb00d49b1746f315992fac476892c681 ae::::I really don?t understand what they mean. It seems tome? these are some encrypted names whichneed to be decrypted. I don?t know how to do that. These are checksums of the real data files. Cmake and git know that they have to download a different file whenever the data file's checksum doesn't agree with the above.? I built with TESTING_ON, now data are available in the ?Testing?directory too. Suppose I?d like to run the Medical examples. Now, data isavailable in the following directory: C:\VTK\VTK-8.0.1\Testing\Data\ headsq With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing But these are all MD5 files. So the following line of thecode does not find the data: v16 SetFilePrefix?"$VTK_DATA_ROOT/Data/headsq/ quarter". Please help me how to make things work. If I've missed any step, please let me know.Thanks in advance. Where is you build directory? I highly recommend always keeping your VTK source directory and your VTK build directory separate. Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT to C:\VTK\VTK-8.0.1\ExternalData\ Testing. This is where the data file links are. The real data files are elsewhere in files with MD5 names, but for all intents and purposes the data link files that refer to them work as if they were the read data files. ? Regards,Jennifer On Tuesday, September 12, 2017 9:32 AM, David E DeMarle wrote: We changed the structure of regression test data in 6.1 to allow developers to make proposed changes to code and data concurrently and ensure that the continuous integration test machines do not fail when they run new tests on old data. The net result is that a VTK build tree has test data files that are actually symbolic links to the md5 files which live elsewhere. You can generally open and use the symbolic links exactly as you would a normal data file. If you turn on testing in your build, cmake will try to download each one of the files. Alternatively you can untar the source and data packages for a release in the same directory and the default build setup will use them and avoid downloading anything else. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers wrote: ? Hello,???? I used VTK in 2013. After that, I installed VTK after more than 4 years. I found some changes in Data in the latest version. How to make those MD5 files work? Please let me know. I didn't find much documentation.?I'm really having problem with this.???? Thanks in advance! Regards,Jennifer. ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Sep 14 18:20:21 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 14 Sep 2017 18:20:21 -0400 Subject: [vtkusers] Problem with Data in VTK In-Reply-To: <1214731803.2276933.1505424160433@mail.yahoo.com> References: <676951311.6149494.1505000586316.ref@mail.yahoo.com> <676951311.6149494.1505000586316@mail.yahoo.com> <1432712258.948605.1505283160662@mail.yahoo.com> <1348777421.1746712.1505368697394@mail.yahoo.com> <1214731803.2276933.1505424160433@mail.yahoo.com> Message-ID: What is in C:\VTK\VTK-8.0.1\ExternalData\Testing? David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Sep 14, 2017 at 5:22 PM, Jennifer Lee wrote: > Hi, > Thanks for the reply. I downloaded the data and set the VTK_DATA_ROOT > to *C:\VTK\VTKData.* > * Actually that's what I used to do before. I never built VTKData > project. How to do that? I believe the source will be **C:\VTK\VTKData; > but which one will be the build directory?* > * Please let me know.* > * I've built the VTK project with BUILD_TESTING on. This generated data > to the following directory: * > > * C:\VTK\VTK-8.0.1\Testing\Data\headsq. But these are all MD5 files and > if VTK_DATA_ROOT is pointed there, it can't find these files.* > > * Any clarification will be highly appreciated. * > > *Regards,* > > *Jennifer* > > > On Wednesday, September 13, 2017 11:15 PM, Jon Haitz Legarreta < > jhlegarreta at vicomtech.org> wrote: > > > Hi Jennifer, > what does your C:\VTK\VTKData directory contain? Have you built the > VTKData project? You must build that project so that the actual testing > data files are retrieved. > > HTH, > JON HAITZ > > > -- > > > On 14 September 2017 at 07:58, Jennifer Lee via vtkusers > wrote: > > Hello, > Still I could not make it work. Setting VTK_DATA_ROOT to > ?C:\VTK\VTK-8.0.1\ ExternalData\Testing? didn?t work for me. It can?t find > the data. > > I have separate source and build: > Source is : C:\VTK\VTK-8.0.1 > Build is: C:\VTK\VTK-bin > Data is: C:\VTK\VTKData > > As I also built with TESTING_ON; so, I?ve MD5 files under Testing > directory. *C:\VTK\VTK-8.0.1\Testing.* > > I tried to run the tcl script Medical1.tcl. If I set the data root to ? > *C:\VTK\VTK-8.0.1\Testing?*, it can?t find the data (I think because > these are MD5 files). If I set the data root to *C:\VTK\VTKData*, it also > does not work. > > I need help to fix the problem. > Thanks! > > Regards, > Jennifer > > > On Wednesday, September 13, 2017 7:58 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee > wrote: > > Hello, > Thanks so much for the reply. > > Please ignore my poor knowledge. I?m really having trouble in > understanding. > > > No worries, this confuses lots of people including me. > > > I?ve data in the following directory: > > C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, the files look > like something below: > > 00b6935d399b80e4f9edc1414a4c36 3f > 00ba7d9399c914edb4a6faa0b10ae7 e5 > 00d2efba0581fb7d436bcc45a9aced cb > 00d49b1746f315992fac476892c681 ae > : > : > : > : > I really don?t understand what they mean. It seems to me these are some > encrypted names which need to be decrypted. I don?t know how to do that. > > > These are checksums of the real data files. Cmake and git know that they > have to download a different file whenever the data file's checksum doesn't > agree with the above. > > > I built with TESTING_ON, now data are available in the ?Testing? directory > too. Suppose I?d like to run the Medical examples. Now, data is available > in the following directory: > > > *C:\VTK\VTK-8.0.1\Testing\Data\ headsq* > > With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing > > But these are all MD5 files. So the following line of the code does not > find the data: > > *v16 SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/ quarter".* > > Please help me how to make things work. If I've missed any step, please > let me know. > Thanks in advance. > > Where is you build directory? I highly recommend always keeping your VTK > source directory and your VTK build directory separate. > > Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT > to C:\VTK\VTK-8.0.1\ExternalData\ Testing. This is where the data file > links are. The real data files are elsewhere in files with MD5 names, but > for all intents and purposes the data link files that refer to them work as > if they were the read data files. > > > > Regards, > Jennifer > > > > > On Tuesday, September 12, 2017 9:32 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > We changed the structure of regression test data in 6.1 to allow > developers to make proposed changes to code and data concurrently and > ensure that the continuous integration test machines do not fail when they > run new tests on old data. > > The net result is that a VTK build tree has test data files that are > actually symbolic links to the md5 files which live elsewhere. You can > generally open and use the symbolic links exactly as you would a normal > data file. If you turn on testing in your build, cmake will try to download > each one of the files. Alternatively you can untar the source and data > packages for a release in the same directory and the default build setup > will use them and avoid downloading anything else. > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers < > vtkusers at vtk.org> wrote: > > Hello, > I used VTK in 2013. After that, I installed VTK after more than 4 > years. I found some changes in Data in the latest version. How to make > those MD5 files work? Please let me know. I didn't find much > documentation. I'm really having problem with this. > Thanks in advance! > > Regards, > Jennifer. > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > > > > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aralol2015 at gmail.com Fri Sep 15 01:11:49 2017 From: aralol2015 at gmail.com (Duster U) Date: Fri, 15 Sep 2017 10:41:49 +0530 Subject: [vtkusers] Picking in DICOM series In-Reply-To: <399fced.5.15e80558c5d.Coremail.tjlp@netease.com> References: <399fced.5.15e80558c5d.Coremail.tjlp@netease.com> Message-ID: Hi Liu Peng, I have tried different dicom samples of different resolutions.When i use a sample of 320*320,the max value that i get from the picker is 150*150,and this too varies with samples.when i tried with another 320*320 sample max value that i got was 160*160. Thanks On Thu, Sep 14, 2017 at 5:50 PM, Liu_tj wrote: > How do you know the values are wrong? > > > > ?2017-09-14?"Duster U" ??? > > -----????----- > *???:*"Duster U" > *????:*2017?09?14? ??? > *???:*"vtkusers" > *??:*[vtkusers] Picking in DICOM series > > > > Hi, > > I've been trying to implement a Picker in the OnMouseMove of a custom > vtkinteractorstyleImage,so that i can get the pixel coordinates of an image > while hovering over an image.Now I've tried both the Point Picker and the > Prop Picker to do so,,both gives the coordinates but the problem is that > the values are not correct.So am i missing anything? > and i am new to vtk,So please help me out > > Thanks in Advance > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From iamdpak at gmail.com Fri Sep 15 01:44:07 2017 From: iamdpak at gmail.com (vinmean) Date: Thu, 14 Sep 2017 22:44:07 -0700 (MST) Subject: [vtkusers] Merge two actors with texture Message-ID: <1505454247929-0.post@n5.nabble.com> I want to merge two actors, each with individual textures applied on them (different .mtl files). Please suggest me an example or sample code to do it. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From siming.bayer at gmail.com Fri Sep 15 04:09:45 2017 From: siming.bayer at gmail.com (Siming Bayer) Date: Fri, 15 Sep 2017 10:09:45 +0200 Subject: [vtkusers] Convert Binary Image to vtkPolyData In-Reply-To: References: Message-ID: Dear all, I still have another question according to this isseue: I just tried the vtkMarchingCubes. This works fine. I got a isosurface of type vtkMarchingCubes. But since I would like to use the vtkProbeFilter to interpolate the values on the nodes of a volumetric mesh to a dicom image volume, I need to convert the vtkMarchingCubes to vtkPolyData, where the cell centers are the center of each voxel. Is there any filter which provides this function? best, Siming 2017-09-14 22:10 GMT+02:00 Siming Bayer : > Thank you guys! > > best, > Siming > > Am 14.09.2017 um 20:05 schrieb Bill Lorensen : > > > > This example might help. > > https://lorensen.github.io/VTKExamples/site/Cxx/ > Modelling/ContourTriangulator/ > > > > > > On Thu, Sep 14, 2017 at 10:47 AM, David Gobbi > wrote: > >> And, of course, vtkMarchingSquares for 2D images. > >> > >> > >> On Thu, Sep 14, 2017 at 8:43 AM, Dean Inglis > wrote: > >>> > >>> Hi Siming, > >>> > >>> you could use vtkImageMarchingCubes to extract an isosurface. > >>> > >>> - Dean > >>> > >>> On Thu, Sep 14, 2017 at 10:28 AM, Siming Bayer > > >>> wrote: > >>>> > >>>> Dear all, > >>>> > >>>> I know that vtkPolyDataToImageStencil can be used to convert > vtkPolyData > >>>> to a binary image. Is there any possibility to do it in the inverse > way? I > >>>> would like to use a binary image to generate a mesh via VTK. > >>>> > >>>> best, > >>>> Siming > >> > >> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/vtkusers > >> > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amizuk at uni-osnabrueck.de Fri Sep 15 04:45:12 2017 From: amizuk at uni-osnabrueck.de (Alexander Mizuk) Date: Fri, 15 Sep 2017 10:45:12 +0200 Subject: [vtkusers] 3D pointcloud visualisation of DICOM Images with VTK in C# Message-ID: <5d2615da-0aa0-5de3-d231-60c09e76a968@uni-osnabrueck.de> Hello, my task is to visualize a grayscale pointcloud which I can found in a DICOM series. I found this tutorial https://pyscience.wordpress.com/2014/09/11/surface-extraction-creating-a-mesh-from-pixel-data-using-python-and-vtk/ which shows how to visualize bones in 3D by meching them. I could transfer it to c# and it work, but I need just a 3D point cloud where I can define the object by thresholding the grayscale. Hope u understand what I mean. So I tried this: |// read filestringpathDicom =@"...\dicomDirectory";vtkDICOMImageReader reader =newKitware.VTK.vtkDICOMImageReader();reader.SetDirectoryName(pathDicom);reader.Update();// convert HU valuevtkImageShiftScale shiftScale =vtkImageShiftScale.New();shiftScale.SetScale(reader.GetRescaleSlope());shiftScale.SetShift(reader.GetRescaleOffset());shiftScale.SetInputConnection(reader.GetOutputPort());shiftScale.Update();// VisualizevtkPolyDataMapper mapper =vtkPolyDataMapper.New();mapper.SetInputConnection(shiftScale.GetOutputPort());vtkActor actor =vtkActor.New();actor.SetMapper(mapper);actor.GetProperty().SetPointSize(4);vtkRenderWindow renderWindow =renderWindowControl1.RenderWindow;vtkRenderer renderer =renderWindow.GetRenderers().GetFirstRenderer();renderer.SetBackground(0.2,0.3,0.4);renderer.AddActor(actor);| When I start this I alwas get the same error |vtkStreamingDemandDrivenPipline (09366B85)| and Visual Studio tell me |System.AccessViolationException| It's kind of memory error. So my question is where is my mistake? During debugging I found out that the error begun when I set the mapper for the actor. But I now that this code is the normal way to display everything in vtk. I think the problem is that I don't really get the points out of the array but the imageData should contain all pixels of the series. Hope u can help me. Beste Regards Alexander -------------- next part -------------- An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Fri Sep 15 07:19:21 2017 From: kor1581 at gmail.com (K O ranjith) Date: Fri, 15 Sep 2017 16:49:21 +0530 Subject: [vtkusers] Draw line with vtk Message-ID: Hello, I need to draw a couple of lines in an image viewer (vtkImageViewer2) for MRI slice planning application. Also should have to perform few operations (move, roatate)on the lines with mouse interactions and need to retrieve line properties (new coordinates after movement, width etc). I have found examples with two methods while searching with vtkLineWidget2 and with vtkLine which approach will be more suitable? what is the difference?have any difficulties for manipulation operations if use vtkLineWidget2? Please help -------------- next part -------------- An HTML attachment was scrubbed... URL: From amizuk at uni-osnabrueck.de Fri Sep 15 07:35:54 2017 From: amizuk at uni-osnabrueck.de (Alexander Mizuk) Date: Fri, 15 Sep 2017 13:35:54 +0200 Subject: [vtkusers] Has csharp a different library as c++? Message-ID: <86be38a2-125f-a07c-cb65-6ba3f35d5103@uni-osnabrueck.de> Short Question: Has got the C# library Kitware.VTK; other or less methods then c++ which I could find at https://www.vtk.org/doc/nightly/html/annotated.html? If so, where I could find the API for c#? Best regards Alexander From sankhesh.jhaveri at kitware.com Fri Sep 15 08:45:34 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Fri, 15 Sep 2017 12:45:34 +0000 Subject: [vtkusers] Draw line with vtk In-Reply-To: References: Message-ID: Hi, You should use the widget if you think you would like to *interactively* place/draw and edit the line. If your goal is to just display a line given a set of parameters and update it without interaction, a simple cell based approach should work. See https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/LongLine/ Hope that helps. Sankhesh ? On Fri, Sep 15, 2017 at 7:19 AM K O ranjith wrote: > Hello, > I need to draw a couple of lines in an image viewer (vtkImageViewer2) for > MRI slice planning application. Also should have to perform few operations > (move, roatate)on the lines with mouse interactions and need to retrieve > line properties (new coordinates after movement, width etc). > I have found examples with two methods while searching > with vtkLineWidget2 and with vtkLine > which approach will be more suitable? > what is the difference?have any difficulties for manipulation operations > if use vtkLineWidget2? > Please help > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Sep 15 10:17:51 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 15 Sep 2017 10:17:51 -0400 Subject: [vtkusers] Project voxel/pixel value onto surface mesh In-Reply-To: References: Message-ID: These examples may help: https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/IsosurfaceSampling/ https://lorensen.github.io/VTKExamples/site/Cxx/Medical/TissueLens/ On Mon, Jun 5, 2017 at 7:33 PM, Kurt Sansom wrote: > Hi, > I am trying to come up with an efficient way to project voxel values from > an image volume to a surface mesh. > > Basically I have a triangle surface mesh with normal information, and I want > to create a new cell array that is the voxel intensity value closest to the > surface mesh in the normal direction. > > I am thinking it's kind of like doing an iso-surface but I want image > intensities from the image volume based on the location of the surface mesh > and then I want to be able to view the image as projected on the surface > mesh. > > Another way I was thinking of this is texturing the surface with the image > intensities based on the closest voxel/pixel to the surface. > > Another way I thinking of doing it is using two image volumes vol_1 is the > image stack and vol_2 is a signed distance field where I want the pixel > intensity of vol_1 at the zero level set of vol_2. > > Does anyone have an example or can think a good way to do this? > > Regards, > ~Kurt > -- > Kurt Sansom > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From jayavardhanravi at outlook.com Fri Sep 15 11:31:15 2017 From: jayavardhanravi at outlook.com (Jay) Date: Fri, 15 Sep 2017 08:31:15 -0700 (MST) Subject: [vtkusers] Edges of Actors are not smooth Message-ID: <1505489475071-0.post@n5.nabble.com> When rendering an actor to the screen after applying the transforms the edges of the actor are not smooth, the edges are blinking or rough. When I tried to click the render window with the mouse the blinking disappears and the edges are smooth. Is there any function/property in VTK that does this smoothing when clicked on the render window Regards, Jay -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From da178 at hw.ac.uk Fri Sep 15 12:36:56 2017 From: da178 at hw.ac.uk (Anagnostakis, Dimitrios) Date: Fri, 15 Sep 2017 16:36:56 +0000 Subject: [vtkusers] Edit properties of LabelPlacementMapper Message-ID: Hi all, I'm trying to edit the properties of the labels in the LabelPlacementMapper example such as changing the size of label's font or the colour. Any suggestions please? Regards, Dimitrios ________________________________ Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With campuses and students across the entire globe we span the world, delivering innovation and educational excellence in business, engineering, design and the physical, social and life sciences. This email is generated from the Heriot-Watt University Group, which includes: 1. Heriot-Watt University, a Scottish charity registered under number SC000278 2. Edinburgh Business School a Charity Registered in Scotland, SC026900. Edinburgh Business School is a company limited by guarantee, registered in Scotland with registered number SC173556 and registered office at Heriot-Watt University Finance Office, Riccarton, Currie, Midlothian, EH14 4AS 3. Heriot- Watt Services Limited (Oriam), Scotland's national performance centre for sport. Heriot-Watt Services Limited is a private limited company registered is Scotland with registered number SC271030 and registered office at Research & Enterprise Services Heriot-Watt University, Riccarton, Edinburgh, EH14 4AS. The contents (including any attachments) are confidential. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Sep 15 13:20:32 2017 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 15 Sep 2017 17:20:32 +0000 Subject: [vtkusers] Problems while rendering of large volumes In-Reply-To: <1505213602466-0.post@n5.nabble.com> References: <1505213602466-0.post@n5.nabble.com> Message-ID: Hi Ian, I am writing this as I remembered when I wrote the code a while back so I apologize if I mis-stated something but I did look at the current code and I think my point (below) is still valid. The reason we had hard-coded number in there because that feature required querying GPU capabilities using vtkGPUInfo class which in the newer backend did not support. There was some plan to update the vtkGPUInfo (and I believe you have contacted the mailing list in the past on this matter) class in the OpenGL2 backend and once that happens, we could replace the hard-coded values with the code that actually works. We will see if we can discuss this internally but in the meantime if you want to help out / look into it, we could probably provide assistance one way or another. Thanks, On Tue, Sep 12, 2017 at 6:53 AM ianl wrote: > Hi all, > > Our software uses vtkSmartVolumeMapper to render 3D volumes. I am looking > at > a problem with rendering a relatively large, although not uncommon (~2000 > slice) CT set. This used to work before the OpenGL2 improvements, but now > fails during the vtkTextureObject::Bind call, leading to a black image. > Smaller volumes render fine. > > I am using VTK 8.0.1, built with Visual Studio 2017. The graphics card is > an > AMD R7 200 with 2GB of VRAM. The vtkSmartVolume mapper is running in its > auto selection mode, and I can see it choosing the GPU volume mapper when I > step into the code. > > What no longer seems to be happening is the reduction resampling when the > texture is determined to be too large for the card (using GPULowResMapper, > LowResGPUNecessary, etc). This seems to be due to the GetReductionRatio() > function on the GPU mapper returning a hard coded scale of 1 (in > vtkOpenGLGPUVolumeRayCastMapper.h, VolumeOpenGL2 variant). > > Is this expected behaviour, or am I missing something? As an aside, I have > attempted to use the SetPartitions() function on > vtkOpenGLGPUVolumeRayCastMapper to partition the volume so it will fit on > the card which does seem to work, but kills performance, so I would > probably > prefer the original behaviour, i.e. resampling, while interacting with the > volume. I seem to remember reading somewhere that this was an area that was > being looked at at some point. > > Can anyone shed any light on how to proceed with solving this? The only way > I can see currently is to implement our own version of smart volume mapper > which does the reduction, and perhaps uses the partition technique when not > interacting. > > Thanks in advance, > Ian Lindsay > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Sep 15 13:39:01 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 15 Sep 2017 11:39:01 -0600 Subject: [vtkusers] Convert Binary Image to vtkPolyData In-Reply-To: References: Message-ID: Hi Siming, Is your goal to to use vtkProbeFilter on the volume? If so, then converting to vtkPolyData is going in the wrong direction. A vtkPolyData is just a surface, it isn't volumetric (i.e. it isn't possible to have a vtkPolyData that has a node at each voxel). Also, interpolating data from vtkImageData is, in general, much more efficient than interpolating data from vtkPolyData or from a vtkUnstructuredGrid. Can you give us the big picture of what kind of result you are aiming for? - David On Fri, Sep 15, 2017 at 2:09 AM, Siming Bayer wrote: > Dear all, > > I still have another question according to this isseue: > > I just tried the vtkMarchingCubes. This works fine. I got a isosurface of > type vtkMarchingCubes. But since I would like to use the vtkProbeFilter to > interpolate the values on the nodes of a volumetric mesh to a dicom image > volume, I need to convert the vtkMarchingCubes to vtkPolyData, where the > cell centers are the center of each voxel. Is there any filter which > provides this function? > > best, > Siming > > 2017-09-14 22:10 GMT+02:00 Siming Bayer : > >> Thank you guys! >> >> best, >> Siming >> > Am 14.09.2017 um 20:05 schrieb Bill Lorensen : >> > >> > This example might help. >> > https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/ >> ContourTriangulator/ >> > >> > >> > On Thu, Sep 14, 2017 at 10:47 AM, David Gobbi >> wrote: >> >> And, of course, vtkMarchingSquares for 2D images. >> >> >> >> >> >> On Thu, Sep 14, 2017 at 8:43 AM, Dean Inglis >> wrote: >> >>> >> >>> Hi Siming, >> >>> >> >>> you could use vtkImageMarchingCubes to extract an isosurface. >> >>> >> >>> - Dean >> >>> >> >>> On Thu, Sep 14, 2017 at 10:28 AM, Siming Bayer < >> siming.bayer at gmail.com> >> >>> wrote: >> >>>> >> >>>> Dear all, >> >>>> >> >>>> I know that vtkPolyDataToImageStencil can be used to convert >> vtkPolyData >> >>>> to a binary image. Is there any possibility to do it in the inverse >> way? I >> >>>> would like to use a binary image to generate a mesh via VTK. >> >>>> >> >>>> best, >> >>>> Siming >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lee_jennifer_82 at yahoo.com Fri Sep 15 13:47:50 2017 From: lee_jennifer_82 at yahoo.com (Jennifer Lee) Date: Fri, 15 Sep 2017 17:47:50 +0000 (UTC) Subject: [vtkusers] Problem with Data in VTK References: <1855612015.339072.1505497670459.ref@mail.yahoo.com> Message-ID: <1855612015.339072.1505497670459@mail.yahoo.com> Hi,?? I've the following directory: C:\VTK\VTK-8.0.1\Testing\External;? This contains the following two files: CMakeLists and CMakeConfig.cmake. ?? I don't have any C:\VTK\VTK-8.0.1\ExternalData\Testing. ?? I've also attached some screenshots of some directories just if you need for further clarification. ?? I really don't understand? what I'm missing and why it should be so complication to work with current data. Any help will be highly appreciated. Regards,Jennifer On Thursday, September 14, 2017 3:20 PM, David E DeMarle wrote: What is in?C:\VTK\VTK-8.0.1\ExternalData\Testing? David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Sep 14, 2017 at 5:22 PM, Jennifer Lee wrote: Hi,?? Thanks for the reply. I downloaded the data and set the VTK_DATA_ROOT to C:\VTK\VTKData.??? Actually that's what I used to do before. I never built VTKData project. How to do that? I believe the source will be C:\VTK\VTKData; but which one will be the build directory??? Please let? me know.?? I've built the VTK project with BUILD_TESTING on. This generated data to the following directory:? ? C:\VTK\VTK-8.0.1\Testing\Data\ headsq. But these are all MD5 files and if VTK_DATA_ROOT is pointed there, it can't find these files. ?? Any clarification will be highly appreciated. Regards,Jennifer On Wednesday, September 13, 2017 11:15 PM, Jon Haitz Legarreta wrote: Hi Jennifer, what does your C:\VTK\VTKData directory contain? Have you built the VTKData project? You must build that project so that the actual testing data files are retrieved. HTH, JON HAITZ | | -- On 14 September 2017 at 07:58, Jennifer Lee via vtkusers wrote: Hello,???? Still I could notmake it work. Setting VTK_DATA_ROOT to ?C:\VTK\VTK-8.0.1\ ExternalData\Testing?didn?t work for me. It can?t find the data. ?I have separate source and build: Source is : C:\VTK\VTK-8.0.1Build is: C:\VTK\VTK-binData is: C:\VTK\VTKData ?As I also built with TESTING_ON; so, I?ve MD5 files underTesting directory. C:\VTK\VTK-8.0.1\Testing.?I tried to run the tcl script Medical1.tcl. If I set the ?data root to ?C:\VTK\VTK-8.0.1\Testing?, itcan?t find the data (I think because these are MD5 files). If I set the dataroot to C:\VTK\VTKData, it also does not work.?I need help?to fix the problem.Thanks!?Regards,Jennifer On Wednesday, September 13, 2017 7:58 AM, David E DeMarle wrote: On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee wrote: Hello,?? Thanks so much for the reply. Please ignore my poor knowledge. I?m really having troublein understanding. No worries, this confuses lots of people including me.? I?ve data in the following directory: C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, thefiles look like something below: 00b6935d399b80e4f9edc1414a4c36 3f00ba7d9399c914edb4a6faa0b10ae7 e500d2efba0581fb7d436bcc45a9aced cb00d49b1746f315992fac476892c681 ae::::I really don?t understand what they mean. It seems tome? these are some encrypted names whichneed to be decrypted. I don?t know how to do that. These are checksums of the real data files. Cmake and git know that they have to download a different file whenever the data file's checksum doesn't agree with the above.? I built with TESTING_ON, now data are available in the ?Testing?directory too. Suppose I?d like to run the Medical examples. Now, data isavailable in the following directory: C:\VTK\VTK-8.0.1\Testing\Data\ headsq With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing But these are all MD5 files. So the following line of thecode does not find the data: v16 SetFilePrefix?"$VTK_DATA_ROOT/Data/headsq/ quarter". Please help me how to make things work. If I've missed any step, please let me know.Thanks in advance. Where is you build directory? I highly recommend always keeping your VTK source directory and your VTK build directory separate. Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT to C:\VTK\VTK-8.0.1\ExternalData\ Testing. This is where the data file links are. The real data files are elsewhere in files with MD5 names, but for all intents and purposes the data link files that refer to them work as if they were the read data files. ? Regards,Jennifer On Tuesday, September 12, 2017 9:32 AM, David E DeMarle wrote: We changed the structure of regression test data in 6.1 to allow developers to make proposed changes to code and data concurrently and ensure that the continuous integration test machines do not fail when they run new tests on old data. The net result is that a VTK build tree has test data files that are actually symbolic links to the md5 files which live elsewhere. You can generally open and use the symbolic links exactly as you would a normal data file. If you turn on testing in your build, cmake will try to download each one of the files. Alternatively you can untar the source and data packages for a release in the same directory and the default build setup will use them and avoid downloading anything else. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers wrote: ? Hello,???? I used VTK in 2013. After that, I installed VTK after more than 4 years. I found some changes in Data in the latest version. How to make those MD5 files work? Please let me know. I didn't find much documentation.?I'm really having problem with this.???? Thanks in advance! Regards,Jennifer. ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ExternalTesting.png Type: image/png Size: 31772 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MD5DATA_Testing.png Type: image/png Size: 105833 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VTKData.png Type: image/png Size: 84118 bytes Desc: not available URL: From shawn.waldon at kitware.com Fri Sep 15 14:03:26 2017 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Fri, 15 Sep 2017 14:03:26 -0400 Subject: [vtkusers] Problem with Data in VTK In-Reply-To: <1855612015.339072.1505497670459@mail.yahoo.com> References: <1855612015.339072.1505497670459.ref@mail.yahoo.com> <1855612015.339072.1505497670459@mail.yahoo.com> Message-ID: Hi Jennifer, Try looking inside ExternalData/Testing inside your ParaView build directory. This folder should contain the data files with their original filenames rather than the MD5s (or symlinks/shortcuts to the data to save disk space but should work the same). HTH, Shawn On Fri, Sep 15, 2017 at 1:47 PM, Jennifer Lee via vtkusers wrote: > Hi, > I've the following directory: C:\VTK\VTK-8.0.1\Testing\External; This > contains the following two files: CMakeLists and CMakeConfig.cmake. > > > I don't have any C:\VTK\VTK-8.0.1\ExternalData\Testing. > I've also attached some screenshots of some directories just if you > need for further clarification. > > I really don't understand what I'm missing and why it should be so > complication to work with current data. Any help will be highly appreciated. > > Regards, > Jennifer > > > > > On Thursday, September 14, 2017 3:20 PM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > What is in C:\VTK\VTK-8.0.1\ExternalData\Testing? > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 <(518)%20881-4909> > > On Thu, Sep 14, 2017 at 5:22 PM, Jennifer Lee > wrote: > > Hi, > Thanks for the reply. I downloaded the data and set the VTK_DATA_ROOT > to *C:\VTK\VTKData.* > * Actually that's what I used to do before. I never built VTKData > project. How to do that? I believe the source will be **C:\VTK\VTKData; > but which one will be the build directory?* > * Please let me know.* > * I've built the VTK project with BUILD_TESTING on. This generated data > to the following directory: * > > * C:\VTK\VTK-8.0.1\Testing\Data\ headsq. But these are all MD5 files and > if VTK_DATA_ROOT is pointed there, it can't find these files.* > > * Any clarification will be highly appreciated. * > > *Regards,* > > *Jennifer* > > > On Wednesday, September 13, 2017 11:15 PM, Jon Haitz Legarreta < > jhlegarreta at vicomtech.org> wrote: > > > Hi Jennifer, > what does your C:\VTK\VTKData directory contain? Have you built the > VTKData project? You must build that project so that the actual testing > data files are retrieved. > > HTH, > JON HAITZ > > > -- > > > On 14 September 2017 at 07:58, Jennifer Lee via vtkusers > wrote: > > Hello, > Still I could not make it work. Setting VTK_DATA_ROOT to > ?C:\VTK\VTK-8.0.1\ ExternalData\Testing? didn?t work for me. It can?t find > the data. > > I have separate source and build: > Source is : C:\VTK\VTK-8.0.1 > Build is: C:\VTK\VTK-bin > Data is: C:\VTK\VTKData > > As I also built with TESTING_ON; so, I?ve MD5 files under Testing > directory. *C:\VTK\VTK-8.0.1\Testing.* > > I tried to run the tcl script Medical1.tcl. If I set the data root to ? > *C:\VTK\VTK-8.0.1\Testing?*, it can?t find the data (I think because > these are MD5 files). If I set the data root to *C:\VTK\VTKData*, it also > does not work. > > I need help to fix the problem. > Thanks! > > Regards, > Jennifer > > > On Wednesday, September 13, 2017 7:58 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee > wrote: > > Hello, > Thanks so much for the reply. > > Please ignore my poor knowledge. I?m really having trouble in > understanding. > > > No worries, this confuses lots of people including me. > > > I?ve data in the following directory: > > C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, the files look > like something below: > > 00b6935d399b80e4f9edc1414a4c36 3f > 00ba7d9399c914edb4a6faa0b10ae7 e5 > 00d2efba0581fb7d436bcc45a9aced cb > 00d49b1746f315992fac476892c681 ae > : > : > : > : > I really don?t understand what they mean. It seems to me these are some > encrypted names which need to be decrypted. I don?t know how to do that. > > > These are checksums of the real data files. Cmake and git know that they > have to download a different file whenever the data file's checksum doesn't > agree with the above. > > > I built with TESTING_ON, now data are available in the ?Testing? directory > too. Suppose I?d like to run the Medical examples. Now, data is available > in the following directory: > > > *C:\VTK\VTK-8.0.1\Testing\Data\ headsq* > > With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing > > But these are all MD5 files. So the following line of the code does not > find the data: > > *v16 SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/ quarter".* > > Please help me how to make things work. If I've missed any step, please > let me know. > Thanks in advance. > > Where is you build directory? I highly recommend always keeping your VTK > source directory and your VTK build directory separate. > > Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT > to C:\VTK\VTK-8.0.1\ExternalData\ Testing. This is where the data file > links are. The real data files are elsewhere in files with MD5 names, but > for all intents and purposes the data link files that refer to them work as > if they were the read data files. > > > > Regards, > Jennifer > > > > > On Tuesday, September 12, 2017 9:32 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > We changed the structure of regression test data in 6.1 to allow > developers to make proposed changes to code and data concurrently and > ensure that the continuous integration test machines do not fail when they > run new tests on old data. > > The net result is that a VTK build tree has test data files that are > actually symbolic links to the md5 files which live elsewhere. You can > generally open and use the symbolic links exactly as you would a normal > data file. If you turn on testing in your build, cmake will try to download > each one of the files. Alternatively you can untar the source and data > packages for a release in the same directory and the default build setup > will use them and avoid downloading anything else. > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers < > vtkusers at vtk.org> wrote: > > Hello, > I used VTK in 2013. After that, I installed VTK after more than 4 > years. I found some changes in Data in the latest version. How to make > those MD5 files work? Please let me know. I didn't find much > documentation. I'm really having problem with this. > Thanks in advance! > > Regards, > Jennifer. > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > > > > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Fri Sep 15 15:55:54 2017 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Fri, 15 Sep 2017 12:55:54 -0700 (MST) Subject: [vtkusers] PowerCrust and PoissonReconstruction compile problems Message-ID: <1505505354230-0.post@n5.nabble.com> Hi there, I tried to add PowerCrust and PoissonReconstruction in VTK 7.1.1. Here I use the following procedure (as Bill Lorensen describes) 1. Download Powercrust.remote.cmake (or PoissonReconstruction.remote.cmake ) and place it in the VTK/Remote directory. 2. Reconfigure the VTK build with cmake 3. Enable the remote module by setting Module_Powercrust:BOOL=ON. (or Module_PoissonReconstruction:BOOL=ON) 4. make The creation by cmake ran without problems. But then in Visual Studio 11 2012 I got the following error: Can someone please tell me what is wrong here? Thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Fri Sep 15 16:20:07 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 15 Sep 2017 16:20:07 -0400 Subject: [vtkusers] PowerCrust and PoissonReconstruction compile problems In-Reply-To: <1505505354230-0.post@n5.nabble.com> References: <1505505354230-0.post@n5.nabble.com> Message-ID: Sorry, I don't have a windows machine. Hopefully someone can help. What is the contents of the file: Remote/PoissonReconstruction.remote.cmake Try this cd Remote/PoissonReconstruction git checkout master git pull and run cmake and build again. The remote.cmake file may be out of date. Bill On Fri, Sep 15, 2017 at 3:55 PM, -Daniel- wrote: > Hi there, > > I tried to add PowerCrust and PoissonReconstruction in VTK 7.1.1. > Here I use the following procedure (as Bill Lorensen describes) > 1. Download Powercrust.remote.cmake (or > PoissonReconstruction.remote.cmake ) and place it in the VTK/Remote > directory. > 2. Reconfigure the VTK build with cmake > 3. Enable the remote module by setting Module_Powercrust:BOOL=ON. (or > Module_PoissonReconstruction:BOOL=ON) > 4. make > > The creation by cmake ran without problems. But then in Visual Studio 11 > 2012 I got the following error: > > > Can someone please tell me what is wrong here? > Thanks! > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Fri Sep 15 16:26:46 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 15 Sep 2017 16:26:46 -0400 Subject: [vtkusers] PowerCrust and PoissonReconstruction compile problems In-Reply-To: References: <1505505354230-0.post@n5.nabble.com> Message-ID: The powercrust error seems like the code is not portable to windows. If you can fix it please let me know... Need a proper random number location. On Fri, Sep 15, 2017 at 4:20 PM, Bill Lorensen wrote: > Sorry, I don't have a windows machine. Hopefully someone can help. > > What is the contents of the file: > Remote/PoissonReconstruction.remote.cmake > > Try this > cd Remote/PoissonReconstruction > git checkout master > git pull > > and run cmake and build again. > > The remote.cmake file may be out of date. > > > > > Bill > > On Fri, Sep 15, 2017 at 3:55 PM, -Daniel- wrote: >> Hi there, >> >> I tried to add PowerCrust and PoissonReconstruction in VTK 7.1.1. >> Here I use the following procedure (as Bill Lorensen describes) >> 1. Download Powercrust.remote.cmake (or >> PoissonReconstruction.remote.cmake ) and place it in the VTK/Remote >> directory. >> 2. Reconfigure the VTK build with cmake >> 3. Enable the remote module by setting Module_Powercrust:BOOL=ON. (or >> Module_PoissonReconstruction:BOOL=ON) >> 4. make >> >> The creation by cmake ran without problems. But then in Visual Studio 11 >> 2012 I got the following error: >> >> >> Can someone please tell me what is wrong here? >> Thanks! >> >> >> >> >> >> -- >> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From tjlp at netease.com Sat Sep 16 00:23:18 2017 From: tjlp at netease.com (Liu_tj) Date: Sat, 16 Sep 2017 12:23:18 +0800 (CST) Subject: [vtkusers] Picking in DICOM series In-Reply-To: References: <399fced.5.15e80558c5d.Coremail.tjlp@netease.com> Message-ID: <450bf5aa.0.15e88ed2e6a.Coremail.tjlp@netease.com> As there are several kind of coordinate system in VTK, you need to check the check values are world, viewport, normalized viewport coordinate. Perhaps you can post your code here and the forum guys can help you. Thanks ?2017-09-15?"Duster U" ??? -----????----- ???:"Duster U" ????:2017?09?15? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: [vtkusers] Picking in DICOM series Hi Liu Peng, I have tried different dicom samples of different resolutions.When i use a sample of 320*320,the max value that i get from the picker is 150*150,and this too varies with samples.when i tried with another 320*320 sample max value that i got was 160*160. Thanks On Thu, Sep 14, 2017 at 5:50 PM, Liu_tj wrote: How do you know the values are wrong? ?2017-09-14?"Duster U" ??? -----????----- ???:"Duster U" ????:2017?09?14? ??? ???:"vtkusers" ??:[vtkusers] Picking in DICOM series Hi, I've been trying to implement a Picker in the OnMouseMove of a custom vtkinteractorstyleImage,so that i can get the pixel coordinates of an image while hovering over an image.Now I've tried both the Point Picker and the Prop Picker to do so,,both gives the coordinates but the problem is that the values are not correct.So am i missing anything? and i am new to vtk,So please help me out Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Sat Sep 16 06:42:11 2017 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Sat, 16 Sep 2017 03:42:11 -0700 (MST) Subject: [vtkusers] PowerCrust and PoissonReconstruction compile problems In-Reply-To: References: <1505505354230-0.post@n5.nabble.com> Message-ID: <1505558531576-0.post@n5.nabble.com> Thanks Bill, your hint for PoissonReconstruction was helpful. But I have not yet found a solution for Powercrust... -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mnolde at gmx.net Sat Sep 16 09:04:27 2017 From: mnolde at gmx.net (Michael Nolde) Date: Sat, 16 Sep 2017 15:04:27 +0200 Subject: [vtkusers] Color lookup table for unstructured grid (XML) file Message-ID: Hello, I'm trying to realize a color lookup table in combination with an unstructured grid (XML) .vtu file. I want to avoid having to define one color over and over for different points. The lookup table can well exist in an external file (.json or .xml preset), or, preferably, is realized through some XML notation inside the .vtu file. Is that even possible and, if so, could someone send me an example of an according XML file section? Thank you very much, Michael From mnolde at gmx.net Sat Sep 16 10:48:30 2017 From: mnolde at gmx.net (Michael Nolde) Date: Sat, 16 Sep 2017 16:48:30 +0200 Subject: [vtkusers] Color lookup table for unstructured grid (XML) file In-Reply-To: References: Message-ID: <60fa3969-ebfc-2251-0909-20833c342507@gmx.net> Hello again, I solved the problem by defining scalars in the XML (id numbers for each unique color), and creating an appropriate JSON color preset. Now the visualization works fine in ParaView. Regards, Michael Am 16.09.2017 um 15:04 schrieb Michael Nolde: > Hello, > > I'm trying to realize a color lookup table in combination with an > unstructured grid (XML) .vtu file. I want to avoid having to define > one color over and over for different points. > > The lookup table can well exist in an external file (.json or .xml > preset), or, preferably, is realized through some XML notation inside > the .vtu file. > Is that even possible and, if so, could someone send me an example of > an according XML file section? > > Thank you very much, > Michael > From lee_jennifer_82 at yahoo.com Sat Sep 16 12:43:07 2017 From: lee_jennifer_82 at yahoo.com (Jennifer Lee) Date: Sat, 16 Sep 2017 16:43:07 +0000 (UTC) Subject: [vtkusers] Problem with Data in VTK In-Reply-To: References: <1855612015.339072.1505497670459.ref@mail.yahoo.com> <1855612015.339072.1505497670459@mail.yahoo.com> Message-ID: <2062885293.783548.1505580187721@mail.yahoo.com> Hi,?? I don't have any ExternalData/Testing file. I'm using VTK. Could you let me know what I'm missing? All I've is some MD5 data under the following directory:C:\VTK\VTK-8.0.1\Testing\Data.? When I downloaded VTKData, it looks all encrypted as follows: ? 00b6935d399b80e4f9edc1414a4c363f00ba7d9399c914edb4a6faa0b10ae7e500d2efba0581fb7d436bcc45a9acedcb ?? I really don't understand what I am missing and how to solve the problem.? Any help will be highly appreciated. I used VTK in 2013. I never encountered this problem. That time I could use the data directly. And I just needed to set VTK_DATA_ROOT. I'm confused with MD5 files and encrypted VTKData. I just need to know how I can find the original data.? Any clarification will be highly appreciated. Regards,Jennifer On Friday, September 15, 2017 11:03 AM, Shawn Waldon wrote: Hi Jennifer, Try looking inside ExternalData/Testing inside your ParaView build directory.? This folder should contain the data files with their original filenames rather than the MD5s (or symlinks/shortcuts to the data to save disk space but should work the same). HTH, Shawn On Fri, Sep 15, 2017 at 1:47 PM, Jennifer Lee via vtkusers wrote: Hi,?? I've the following directory: C:\VTK\VTK-8.0.1\Testing\ External;? This contains the following two files: CMakeLists and CMakeConfig.cmake. ?? I don't have any C:\VTK\VTK-8.0.1\ExternalData\ Testing. ?? I've also attached some screenshots of some directories just if you need for further clarification. ?? I really don't understand? what I'm missing and why it should be so complication to work with current data. Any help will be highly appreciated. Regards,Jennifer On Thursday, September 14, 2017 3:20 PM, David E DeMarle wrote: What is in?C:\VTK\VTK-8.0.1\ ExternalData\Testing? David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Sep 14, 2017 at 5:22 PM, Jennifer Lee wrote: Hi,?? Thanks for the reply. I downloaded the data and set the VTK_DATA_ROOT to C:\VTK\VTKData.??? Actually that's what I used to do before. I never built VTKData project. How to do that? I believe the source will be C:\VTK\VTKData; but which one will be the build directory??? Please let? me know.?? I've built the VTK project with BUILD_TESTING on. This generated data to the following directory:? ? C:\VTK\VTK-8.0.1\Testing\Data\ headsq. But these are all MD5 files and if VTK_DATA_ROOT is pointed there, it can't find these files. ?? Any clarification will be highly appreciated. Regards,Jennifer On Wednesday, September 13, 2017 11:15 PM, Jon Haitz Legarreta wrote: Hi Jennifer, what does your C:\VTK\VTKData directory contain? Have you built the VTKData project? You must build that project so that the actual testing data files are retrieved. HTH, JON HAITZ | | -- On 14 September 2017 at 07:58, Jennifer Lee via vtkusers wrote: Hello,???? Still I could notmake it work. Setting VTK_DATA_ROOT to ?C:\VTK\VTK-8.0.1\ ExternalData\Testing?didn?t work for me. It can?t find the data. ?I have separate source and build: Source is : C:\VTK\VTK-8.0.1Build is: C:\VTK\VTK-binData is: C:\VTK\VTKData ?As I also built with TESTING_ON; so, I?ve MD5 files underTesting directory. C:\VTK\VTK-8.0.1\Testing.?I tried to run the tcl script Medical1.tcl. If I set the ?data root to ?C:\VTK\VTK-8.0.1\Testing?, itcan?t find the data (I think because these are MD5 files). If I set the dataroot to C:\VTK\VTKData, it also does not work.?I need help?to fix the problem.Thanks!?Regards,Jennifer On Wednesday, September 13, 2017 7:58 AM, David E DeMarle wrote: On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee wrote: Hello,?? Thanks so much for the reply. Please ignore my poor knowledge. I?m really having troublein understanding. No worries, this confuses lots of people including me.? I?ve data in the following directory: C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, thefiles look like something below: 00b6935d399b80e4f9edc1414a4c36 3f00ba7d9399c914edb4a6faa0b10ae7 e500d2efba0581fb7d436bcc45a9aced cb00d49b1746f315992fac476892c681 ae::::I really don?t understand what they mean. It seems tome? these are some encrypted names whichneed to be decrypted. I don?t know how to do that. These are checksums of the real data files. Cmake and git know that they have to download a different file whenever the data file's checksum doesn't agree with the above.? I built with TESTING_ON, now data are available in the ?Testing?directory too. Suppose I?d like to run the Medical examples. Now, data isavailable in the following directory: C:\VTK\VTK-8.0.1\Testing\Data\ headsq With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing But these are all MD5 files. So the following line of thecode does not find the data: v16 SetFilePrefix?"$VTK_DATA_ROOT/Data/headsq/ quarter". Please help me how to make things work. If I've missed any step, please let me know.Thanks in advance. Where is you build directory? I highly recommend always keeping your VTK source directory and your VTK build directory separate. Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT to C:\VTK\VTK-8.0.1\ExternalData\ Testing. This is where the data file links are. The real data files are elsewhere in files with MD5 names, but for all intents and purposes the data link files that refer to them work as if they were the read data files. ? Regards,Jennifer On Tuesday, September 12, 2017 9:32 AM, David E DeMarle wrote: We changed the structure of regression test data in 6.1 to allow developers to make proposed changes to code and data concurrently and ensure that the continuous integration test machines do not fail when they run new tests on old data. The net result is that a VTK build tree has test data files that are actually symbolic links to the md5 files which live elsewhere. You can generally open and use the symbolic links exactly as you would a normal data file. If you turn on testing in your build, cmake will try to download each one of the files. Alternatively you can untar the source and data packages for a release in the same directory and the default build setup will use them and avoid downloading anything else. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers wrote: ? Hello,???? I used VTK in 2013. After that, I installed VTK after more than 4 years. I found some changes in Data in the latest version. How to make those MD5 files work? Please let me know. I didn't find much documentation.?I'm really having problem with this.???? Thanks in advance! Regards,Jennifer. ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From chandrasekhar at waveaxis.com Sun Sep 17 22:49:41 2017 From: chandrasekhar at waveaxis.com (Chandrasekhar B) Date: Mon, 18 Sep 2017 08:19:41 +0530 Subject: [vtkusers] Using VTK 7.1 with GL 3.0 version crashing the application Message-ID: I have a crash when importing stl file in the virtual machine. I am using VTK 7.1 version. The crash is because of the GLSL version supported by the VM. The GL version supported by VM is 3.0. I have fixed this issue in the following function by adding the following code. unsigned int vtkOpenGLShaderCache::ReplaceShaderValues( std::string &VSSource, std::string &FSSource, std::string &GSSource) { if (glMajorVersion >= 3) { version = "#version 150\n"; if (glMajorVersion == 3 && glMinorVersion == 0) { version = "#version 130\n"; } } Just wanted to check, is this right fix? How do I support GL 3.0 using VTK 7.1? or do I need to upgrade to later version of VTK? Currently, all the VMs we have use GL 1.3. Regards Shekar -------------- next part -------------- An HTML attachment was scrubbed... URL: From trshash at gmail.com Mon Sep 18 04:06:38 2017 From: trshash at gmail.com (Shashwath T.R.) Date: Mon, 18 Sep 2017 13:36:38 +0530 Subject: [vtkusers] Avoid rendering values outside of range In-Reply-To: <64D37CFE-5D15-4987-8061-637998CB5B16@llnl.gov> References: <11B4BEC6-7E20-4B63-AC18-2FC25A56F7EE@llnl.gov> <64D37CFE-5D15-4987-8061-637998CB5B16@llnl.gov> Message-ID: If I'm not mistaken, you can just set the opacity of that value to zero in the opacity transfer function, right? On Wed, Sep 13, 2017 at 3:18 AM, Maguire, Alister Owen wrote: > Sorry, I meant the vtkColorTransferFunction, not the vtkVolumeProperty. > > > > -Alister > > > > > > *From: *"Maguire, Alister Owen" > *Date: *Tuesday, September 12, 2017 at 2:45 PM > *To: *"vtkusers at vtk.org" > *Subject: *Avoid rendering values outside of range > > > > Hello, > > > > I?m using vtkSmartVolumeMapper for volume rendering within VisIt, and I?m > wondering if there is a way to ?ignore? particular scalar values (either > anything that exists outside of a range, or even ignoring a specific > value). When resampling unstructured data into structured grids, there is > often empty space in the grid that is populated with a default value that > exists outside of the datasets range, and I?d like for this default value > to be ignored while rendering. > > > > I see that vtkVolumeProperty has the option to set the color for values > that exists outside of the range, but I don?t see an equivalent for > opacity, which would be one way to handle this? Any ideas? > > > > Best, > > Alister > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amizuk at uni-osnabrueck.de Mon Sep 18 04:22:21 2017 From: amizuk at uni-osnabrueck.de (Alexander Mizuk) Date: Mon, 18 Sep 2017 10:22:21 +0200 Subject: [vtkusers] Change visibilty of datasets with zero value Message-ID: <1b8d7ec9-7dc1-5854-6d11-a3eb71a6a123@uni-osnabrueck.de> Hi there, I want to display a 3D point-cloud. If read a DICOM series with vtkDICOMImageReader, set a threshold and change the value range from HU to 255 bit grayscale. Now I can display the hole dataset with: ???? ??? ??? // Visualize ??????????? vtkDataSetMapper mapper = vtkDataSetMapper.New(); mapper.SetInputConnection(shiftScaleFilter.GetOutputPort()); ??????????? //mapper.ScalarVisibilityOff(); ??????????? vtkActor actor = vtkActor.New(); ??????????? actor.SetMapper(mapper); ??????????? actor.GetProperty().SetPointSize(4); ??????????? vtkRenderWindow renderWindow = renderWindowControl1.RenderWindow; ??????????? vtkRenderer renderer = renderWindow.GetRenderers().GetFirstRenderer(); ??????????? renderer.SetBackground(0.2, 0.3, 0.4); ??????????? renderer.AddActor(actor); ??????????? renderer.ResetCamera(); With mapper.ScalarVisibilityOff(); I can set the visibility of the hole dataset of, but I only want to set the visibiliy for voxels with a value under a specific threshold for example all voxel with the value of zero. How can I realize it? best regards Alexander From weiherer.maximilian at gmx.de Mon Sep 18 05:08:49 2017 From: weiherer.maximilian at gmx.de (Maximilian Weiherer) Date: Mon, 18 Sep 2017 11:08:49 +0200 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold Message-ID: An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Mon Sep 18 06:36:52 2017 From: kor1581 at gmail.com (K O ranjith) Date: Mon, 18 Sep 2017 16:06:52 +0530 Subject: [vtkusers] Draw line with vtk In-Reply-To: References: Message-ID: Hello, Thanks very much for the help. What is the difference between vtk line widgets "vtkLineWidget" and "vtkLineWidget2 "? I have to draw the lines above a dicom image displayed in an vtkImageViewer2 On Fri, Sep 15, 2017 at 6:15 PM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > Hi, > > You should use the widget if you think you would like to *interactively* > place/draw and edit the line. If your goal is to just display a line given > a set of parameters and update it without interaction, a simple cell based > approach should work. See https://lorensen.github.io/VTKExamples/site/Cxx/ > GeometricObjects/LongLine/ > > Hope that helps. > Sankhesh > ? > > On Fri, Sep 15, 2017 at 7:19 AM K O ranjith wrote: > >> Hello, >> I need to draw a couple of lines in an image viewer (vtkImageViewer2) for >> MRI slice planning application. Also should have to perform few operations >> (move, roatate)on the lines with mouse interactions and need to retrieve >> line properties (new coordinates after movement, width etc). >> I have found examples with two methods while searching >> with vtkLineWidget2 and with vtkLine >> which approach will be more suitable? >> what is the difference?have any difficulties for manipulation operations >> if use vtkLineWidget2? >> Please help >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/ >> opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aralol2015 at gmail.com Mon Sep 18 07:46:52 2017 From: aralol2015 at gmail.com (Duster U) Date: Mon, 18 Sep 2017 17:16:52 +0530 Subject: [vtkusers] Picking in DICOM series In-Reply-To: <450bf5aa.0.15e88ed2e6a.Coremail.tjlp@netease.com> References: <399fced.5.15e80558c5d.Coremail.tjlp@netease.com> <450bf5aa.0.15e88ed2e6a.Coremail.tjlp@netease.com> Message-ID: Hi Liu Peng,, Thanks for the reply.Let me try the different coordinate system and will let u know if it works. Thanks On Sat, Sep 16, 2017 at 9:53 AM, Liu_tj wrote: > As there are several kind of coordinate system in VTK, you need to check > the check values are world, viewport, normalized viewport coordinate. > > Perhaps you can post your code here and the forum guys can help you. > > Thanks > > ?2017-09-15?"Duster U" ??? > > -----????----- > *???:*"Duster U" > *????:*2017?09?15? ??? > *???:*"Liu_tj" > *??:*"vtkusers" > *??:*Re: [vtkusers] Picking in DICOM series > > > Hi Liu Peng, > > I have tried different dicom samples of different resolutions.When i use a sample of 320*320,the max value that i get from the picker is 150*150,and this too varies with samples.when i tried with another 320*320 sample max value that i got was 160*160. > > > Thanks > > > On Thu, Sep 14, 2017 at 5:50 PM, Liu_tj wrote: > >> How do you know the values are wrong? >> >> >> >> ?2017-09-14?"Duster U" ??? >> >> -----????----- >> *???:*"Duster U" >> *????:*2017?09?14? ??? >> *???:*"vtkusers" >> *??:*[vtkusers] Picking in DICOM series >> >> >> >> Hi, >> >> I've been trying to implement a Picker in the OnMouseMove of a custom >> vtkinteractorstyleImage,so that i can get the pixel coordinates of an image >> while hovering over an image.Now I've tried both the Point Picker and the >> Prop Picker to do so,,both gives the coordinates but the problem is that >> the values are not correct.So am i missing anything? >> and i am new to vtk,So please help me out >> >> Thanks in Advance >> >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Sep 18 07:47:18 2017 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 18 Sep 2017 07:47:18 -0400 Subject: [vtkusers] PowerCrust and PoissonReconstruction compile problems In-Reply-To: <1505505354230-0.post@n5.nabble.com> References: <1505505354230-0.post@n5.nabble.com> Message-ID: <20170918114718.GB19877@megas.kitware.com> On Fri, Sep 15, 2017 at 12:55:54 -0700, -Daniel- wrote: > I tried to add PowerCrust and PoissonReconstruction in VTK 7.1.1. > Here I use the following procedure (as Bill Lorensen describes) > 1. Download Powercrust.remote.cmake (or > PoissonReconstruction.remote.cmake ) and place it in the VTK/Remote > directory. > 2. Reconfigure the VTK build with cmake > 3. Enable the remote module by setting Module_Powercrust:BOOL=ON. (or > Module_PoissonReconstruction:BOOL=ON) > 4. make > > The creation by cmake ran without problems. But then in Visual Studio 11 > 2012 I got the following error: > > > Can someone please tell me what is wrong here? The M_PI error is probably a missing header (`#include `). The erand48 function isn't available on Windows directly, but it looks like it could be replaced: https://social.msdn.microsoft.com/Forums/vstudio/en-US/0e974452-a292-4dca-8ab8-b61530577cdb/erand48-windows-equivalent?forum=vcgeneral --Ben From sankhesh.jhaveri at kitware.com Mon Sep 18 08:20:34 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 18 Sep 2017 12:20:34 +0000 Subject: [vtkusers] Draw line with vtk In-Reply-To: References: Message-ID: Hi, vtkLineWidget2 follows the new widget <-> representation model of widgets in VTK; where the representation determines how the widget is drawn on screen and the widget is responsible for interactions with the representation. Hope that helps. Sankhesh ? On Mon, Sep 18, 2017 at 6:36 AM K O ranjith wrote: > Hello, > Thanks very much for the help. > What is the difference between vtk line widgets "vtkLineWidget" and > "vtkLineWidget2 "? > I have to draw the lines above a dicom image displayed in an > vtkImageViewer2 > > > > On Fri, Sep 15, 2017 at 6:15 PM, Sankhesh Jhaveri < > sankhesh.jhaveri at kitware.com> wrote: > >> Hi, >> >> You should use the widget if you think you would like to *interactively* >> place/draw and edit the line. If your goal is to just display a line given >> a set of parameters and update it without interaction, a simple cell based >> approach should work. See >> https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/LongLine/ >> >> Hope that helps. >> Sankhesh >> ? >> >> On Fri, Sep 15, 2017 at 7:19 AM K O ranjith wrote: >> >>> Hello, >>> I need to draw a couple of lines in an image viewer (vtkImageViewer2) >>> for MRI slice planning application. Also should have to perform few >>> operations (move, roatate)on the lines with mouse interactions and need to >>> retrieve line properties (new coordinates after movement, width etc). >>> I have found examples with two methods while searching >>> with vtkLineWidget2 and with vtkLine >>> which approach will be more suitable? >>> what is the difference?have any difficulties for manipulation >>> operations if use vtkLineWidget2? >>> Please help >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> -- >> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >> | (518) 881-4417 >> ? >> > > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From tj.corona at kitware.com Mon Sep 18 09:00:55 2017 From: tj.corona at kitware.com (TJ Corona) Date: Mon, 18 Sep 2017 09:00:55 -0400 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold In-Reply-To: References: Message-ID: <2C422EA0-C6A5-4BE7-A17B-D8E8B1DC91A2@kitware.com> Hi Maximilian, I have just recently worked on making the output from vtkBooleanOperationPolyDataFilter more robust to numerical errors implicit in the Delaunay2D algorithm. Would you mind trying this branch and seeing if it helps? Sincerely, T.J. Thomas J. Corona, Ph.D. Kitware, Inc. Senior R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4443 > On Sep 18, 2017, at 5:08 AM, Maximilian Weiherer wrote: > > Hi everyone, > > I'm struggling with the vtkBooleanOperationPolyDataFilter. First, I'm computing the difference D between two vtkPolyData objects, say A and B (this is D := {A\B}). After that, I want to append the resulting difference D to B, i.e. make the union of these two meshes. Therefore, I'm using the vtkAppendPolyData filter. However, the final result is not manifold (which is necessary in order to print the mesh). I also tried the vtkBooleanOperationPolyDataFilter with the union operation but the problem still remains - the final result is not manifold and therefore not printable. How can I append these two meshes so that these are manifold and thus watertight (and printable)? > Any help would be appreciated. Thanks! > > Best regards > Maximilian > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Sep 18 09:24:01 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 18 Sep 2017 07:24:01 -0600 Subject: [vtkusers] Change visibilty of datasets with zero value In-Reply-To: <1b8d7ec9-7dc1-5854-6d11-a3eb71a6a123@uni-osnabrueck.de> References: <1b8d7ec9-7dc1-5854-6d11-a3eb71a6a123@uni-osnabrueck.de> Message-ID: Hi Alexander, You can use vtkThreshold to set the threshold, or perhaps you can use a lookup table that sets the opacity of those scalars to zero, i.e. use table->SetTableValue(0, 0.0, 0.0, 0.0, 0.0). - David On Mon, Sep 18, 2017 at 2:22 AM, Alexander Mizuk wrote: > Hi there, > > I want to display a 3D point-cloud. If read a DICOM series with > vtkDICOMImageReader, set a threshold and change the value range from HU to > 255 bit grayscale. > Now I can display the hole dataset with: > > // Visualize > vtkDataSetMapper mapper = vtkDataSetMapper.New(); > mapper.SetInputConnection(shiftScaleFilter.GetOutputPort()); > //mapper.ScalarVisibilityOff(); > > vtkActor actor = vtkActor.New(); > actor.SetMapper(mapper); > > actor.GetProperty().SetPointSize(4); > vtkRenderWindow renderWindow = renderWindowControl1.RenderWin > dow; > > vtkRenderer renderer = renderWindow.GetRenderers().Ge > tFirstRenderer(); > > renderer.SetBackground(0.2, 0.3, 0.4); > renderer.AddActor(actor); > > renderer.ResetCamera(); > > With mapper.ScalarVisibilityOff(); I can set the visibility of the hole > dataset of, but I only want to set the visibiliy for voxels with a value > under a specific threshold for example all voxel with the value of zero. > How can I realize it? > > best regards > > Alexander > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Sep 18 09:27:21 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 18 Sep 2017 09:27:21 -0400 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold In-Reply-To: References: Message-ID: Maximimilan, Have you tried to use vtkMergePoints after vtkAppendPolyData or vtkBooleanOperationPolyDataFilter? This filter merges duplicate points, which I suspect is the step that you are missing to produce a watertight mesh. HTH, Cory On Mon, Sep 18, 2017 at 5:08 AM, Maximilian Weiherer wrote: > Hi everyone, > > I'm struggling with the vtkBooleanOperationPolyDataFilter. First, I'm > computing the difference D between two vtkPolyData objects, say A and B > (this is D := {A\B}). After that, I want to append the resulting difference > D to B, i.e. make the union of these two meshes. Therefore, I'm using the > vtkAppendPolyData filter. However, the final result is not manifold (which > is necessary in order to print the mesh). I also tried the > vtkBooleanOperationPolyDataFilter with the union operation but the problem > still remains - the final result is not manifold and therefore not > printable. How can I append these two meshes so that these are manifold and > thus watertight (and printable)? > > Any help would be appreciated. Thanks! > > Best regards > Maximilian > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From katrin_hartwig at gmx.de Mon Sep 18 09:31:07 2017 From: katrin_hartwig at gmx.de (Katrin Hartwig) Date: Mon, 18 Sep 2017 15:31:07 +0200 Subject: [vtkusers] VTK-JS: How to get Position of actor Message-ID: An HTML attachment was scrubbed... URL: From agatakrason at gmail.com Mon Sep 18 10:37:59 2017 From: agatakrason at gmail.com (=?UTF-8?Q?Agata_Kraso=C5=84?=) Date: Mon, 18 Sep 2017 16:37:59 +0200 Subject: [vtkusers] decimate a mesh Message-ID: Hello vtk users, I would like to decimate mesh (triangle meshes) polydata to contant number of points. I have already tried vtkDecimationPro filter but I could only decimate to fix number of triangle. I don't know how can I decimate a mesh to fix number of points ? I would appreciate for any help/advice. Best regards, Agatte -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Mon Sep 18 10:38:26 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 18 Sep 2017 08:38:26 -0600 Subject: [vtkusers] VTK-JS: How to get Position of actor In-Reply-To: References: Message-ID: Hi Katrin, The actor position only describe the relative position to the data, that's why by default they are always (0,0,0). Which means its your source or dataset that has the information about the position that you are looking for. For example to find the bounds of a rendered dataset you can do as follow. dataset = mapper.getInputData(); bounds = dataset.getBounds(); // bounds is an array as follow: // [ minX, maxX, minY, maxY, minZ, maxZ] Hope that helps, Otherwise you can learn more on the basic concepts behind VTK here: https://www.vtk.org/vtk-users-guide/ Seb On Mon, Sep 18, 2017 at 7:31 AM, Katrin Hartwig wrote: > Dear all, > > I am using a visualization of several actors with VTK-js. Unfortunately, > when using *actor.getPosition() *I always get [0,0,0] as a result, no > matter which actor I checked, although they appear on different positions > in my rendering window. > How can I get the real positions or centers of the different actors? > > As I am completely new to VTK-js and I could not find any solutions to my > problem, any help would be great! > > Thank you > Katrin > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amizuk at uni-osnabrueck.de Mon Sep 18 10:40:46 2017 From: amizuk at uni-osnabrueck.de (Alexander Mizuk) Date: Mon, 18 Sep 2017 16:40:46 +0200 Subject: [vtkusers] Change visibilty of datasets with zero value In-Reply-To: References: <1b8d7ec9-7dc1-5854-6d11-a3eb71a6a123@uni-osnabrueck.de> Message-ID: <4c907fbd-b733-b4d3-6d1a-50bdde4da8a6@uni-osnabrueck.de> Hi David, thank you for your fast respond. I used the following code: ??????????? vtkImageThreshold threshold = vtkImageThreshold.New(); ??????????? threshold.SetInputConnection(reader.GetOutputPort()); ??????????? threshold.ThresholdByLower(500); ??????????? threshold.ReplaceInOn(); ??????????? threshold.SetInValue(0); ??????????? threshold.ReplaceOutOn(); ??????????? threshold.SetOutValue(1); ??????????? threshold.Update(); ??????????? vtkLookupTable lookupTable = vtkLookupTable.New(); ??????????? lookupTable.SetTableValue(0, 0.0, 0.0, 0.0, 0.0); ??????????? lookupTable.Build(); ??????????? vtkImageMapToColors mapTransparency = vtkImageMapToColors.New(); ??????????? mapTransparency.SetLookupTable(lookupTable); ??????????? mapTransparency.SetInput(threshold.GetOutput()); and send then the mapTransparency to the mapper. My result is still a black cube with a white contour in it. But I just want to display the white contour. Is it possible to display only a specific part of a dataset or have I always to render everything? Thank you for your help Alexander Am 18.09.2017 um 15:24 schrieb David Gobbi: > Hi Alexander, > > You can use vtkThreshold to set the threshold, or perhaps you can use > a lookup table that sets the opacity of those scalars to zero, i.e. > use table->SetTableValue(0, 0.0, 0.0, 0.0, 0.0). > > ?- David > > On Mon, Sep 18, 2017 at 2:22 AM, Alexander Mizuk > > wrote: > > Hi there, > > I want to display a 3D point-cloud. If read a DICOM series with > vtkDICOMImageReader, set a threshold and change the value range > from HU to 255 bit grayscale. > Now I can display the hole dataset with: > > ???? ??? ??? // Visualize > ??????????? vtkDataSetMapper mapper = vtkDataSetMapper.New(); > mapper.SetInputConnection(shiftScaleFilter.GetOutputPort()); > ??????????? //mapper.ScalarVisibilityOff(); > > ??????????? vtkActor actor = vtkActor.New(); > ??????????? actor.SetMapper(mapper); > > ??????????? actor.GetProperty().SetPointSize(4); > ??????????? vtkRenderWindow renderWindow = > renderWindowControl1.RenderWindow; > > ??????????? vtkRenderer renderer = > renderWindow.GetRenderers().GetFirstRenderer(); > > ??????????? renderer.SetBackground(0.2, 0.3, 0.4); > ??????????? renderer.AddActor(actor); > > ??????????? renderer.ResetCamera(); > > With mapper.ScalarVisibilityOff(); I can set the visibility of the > hole dataset of, but I only want to set the visibiliy for voxels > with a value under a specific threshold for example all voxel with > the value of zero. > How can I realize it? > > best regards > > Alexander > -------------- next part -------------- An HTML attachment was scrubbed... URL: From agatakrason at gmail.com Mon Sep 18 10:44:28 2017 From: agatakrason at gmail.com (agatte) Date: Mon, 18 Sep 2017 07:44:28 -0700 (MST) Subject: [vtkusers] mesh decimation Message-ID: <1505745868468-0.post@n5.nabble.com> Hello vtk users, I would like to decimate mesh (triangle meshes) polydata to constant number of points. I have already tried vtkDecimationPro filter but I could only decimate to fix number of triangles. I don't know how can I decimate a mesh to fix number of points ? I would appreciate for any help/advice. Best :) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Mon Sep 18 11:47:16 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 18 Sep 2017 11:47:16 -0400 Subject: [vtkusers] mesh decimation In-Reply-To: <1505745868468-0.post@n5.nabble.com> References: <1505745868468-0.post@n5.nabble.com> Message-ID: I do not think you can do that. What is are your goals? On Mon, Sep 18, 2017 at 10:44 AM, agatte wrote: > Hello vtk users, > > I would like to decimate mesh (triangle meshes) polydata to constant number > of points. > I have already tried vtkDecimationPro filter but I could only decimate to > fix number of triangles. > I don't know how can I decimate a mesh to fix number of points ? > > I would appreciate for any help/advice. > > > Best :) > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From llangholz89 at gmail.com Mon Sep 18 11:47:42 2017 From: llangholz89 at gmail.com (Logan Langholz) Date: Mon, 18 Sep 2017 09:47:42 -0600 Subject: [vtkusers] VTK-JS: How to get Position of actor In-Reply-To: References: Message-ID: Hi Katrin, In addition, as far as I?m aware calling actor.getCenter() should return that object's center with respect to its bounds. It seems to work alright for me with multiple actors in the window. Cheers, -Logan > On Sep 18, 2017, at 7:31 AM, Katrin Hartwig wrote: > > Dear all, > > I am using a visualization of several actors with VTK-js. Unfortunately, when using actor.getPosition() I always get [0,0,0] as a result, no matter which actor I checked, although they appear on different positions in my rendering window. > How can I get the real positions or centers of the different actors? > > As I am completely new to VTK-js and I could not find any solutions to my problem, any help would be great! > > Thank you > Katrin > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Sep 18 12:40:31 2017 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 18 Sep 2017 12:40:31 -0400 Subject: [vtkusers] Using VTK 7.1 with GL 3.0 version crashing the application In-Reply-To: References: Message-ID: VTK needs OpenGL 3.2 so if your VM has an option for that, that would be the best route. If not you can use Mesa to provide an OpenGL 3.2 implementation for your VM. While parts of VTK may work with OpenGL 3.0 others may crash because they rely on 3.2 features. On Sun, Sep 17, 2017 at 10:49 PM, Chandrasekhar B < chandrasekhar at waveaxis.com> wrote: > I have a crash when importing stl file in the virtual machine. > I am using VTK 7.1 version. The crash is because of the GLSL version > supported by the VM. > The GL version supported by VM is 3.0. > > I have fixed this issue in the following function by adding the following > code. > > unsigned int vtkOpenGLShaderCache::ReplaceShaderValues( > std::string &VSSource, > std::string &FSSource, > std::string &GSSource) > { > > if (glMajorVersion >= 3) > { > version = "#version 150\n"; > if (glMajorVersion == 3 && glMinorVersion == 0) > { > version = "#version 130\n"; > } > } > > Just wanted to check, is this right fix? > How do I support GL 3.0 using VTK 7.1? > or do I need to upgrade to later version of VTK? > Currently, all the VMs we have use GL 1.3. > > Regards > Shekar > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From weiherer.maximilian at gmx.de Mon Sep 18 14:16:08 2017 From: weiherer.maximilian at gmx.de (Maximilian Weiherer) Date: Mon, 18 Sep 2017 20:16:08 +0200 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold In-Reply-To: References: Message-ID: <000601d330aa$33dd48b0$9b97da10$@gmx.de> Hi Cory, thank you very much for your reply. I tested the vtkCleanPolyData filter (as it merges duplicate points, and/or removes unused points and/or removes degenerate cells). It still get a mesh that is not manifold. I visualized that with help of Meshlab and attached it. The red cells are not manifold (selected via Meshlab's Filters > Cleaning and Repairing > Select non Manifold Edges). Thanks again! Best regards, Maximilian -----Urspr?ngliche Nachricht----- Von: Cory Quammen [mailto:cory.quammen at kitware.com] Gesendet: Montag, 18. September 2017 15:27 An: Maximilian Weiherer Cc: vtkusers at vtk.org Betreff: Re: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold Maximimilan, Have you tried to use vtkMergePoints after vtkAppendPolyData or vtkBooleanOperationPolyDataFilter? This filter merges duplicate points, which I suspect is the step that you are missing to produce a watertight mesh. HTH, Cory On Mon, Sep 18, 2017 at 5:08 AM, Maximilian Weiherer wrote: > Hi everyone, > > I'm struggling with the vtkBooleanOperationPolyDataFilter. First, I'm > computing the difference D between two vtkPolyData objects, say A and > B (this is D := {A\B}). After that, I want to append the resulting > difference D to B, i.e. make the union of these two meshes. Therefore, > I'm using the vtkAppendPolyData filter. However, the final result is > not manifold (which is necessary in order to print the mesh). I also > tried the vtkBooleanOperationPolyDataFilter with the union operation > but the problem still remains - the final result is not manifold and > therefore not printable. How can I append these two meshes so that > these are manifold and thus watertight (and printable)? > > Any help would be appreciated. Thanks! > > Best regards > Maximilian > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr?ft. https://www.avast.com/antivirus -------------- next part -------------- A non-text attachment was scrubbed... Name: vis_manifoldEdges.jpg Type: image/jpeg Size: 28872 bytes Desc: not available URL: From simakov.w at gmail.com Mon Sep 18 14:41:39 2017 From: simakov.w at gmail.com (Met@ll) Date: Mon, 18 Sep 2017 11:41:39 -0700 (MST) Subject: [vtkusers] Display the coordinates of the point on which the cursor is hovered Message-ID: <1505760099416-0.post@n5.nabble.com> Good day Faced with the need to display the coordinates of the point where the cursor was pointed. I draw a graph and when I hover over it I would like to display the coordinates of the selected point ... Can someone do this? Thank you! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Mon Sep 18 16:13:34 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 18 Sep 2017 14:13:34 -0600 Subject: [vtkusers] Change visibilty of datasets with zero value In-Reply-To: <4c907fbd-b733-b4d3-6d1a-50bdde4da8a6@uni-osnabrueck.de> References: <1b8d7ec9-7dc1-5854-6d11-a3eb71a6a123@uni-osnabrueck.de> <4c907fbd-b733-b4d3-6d1a-50bdde4da8a6@uni-osnabrueck.de> Message-ID: Hi Alexander, I meant just vtkThreshold, by itself, before vtkDataSetMapper. This will show only the points that are within the threshold. In comparison, vtkImageThreshold does not remove points. All it can do is change the color of the points. However, what you do with vtkImageThreshold can also work, but you must always set a range for the lookup table, e.g. lookupTable.SetRange(0, 1000). - David On Mon, Sep 18, 2017 at 8:40 AM, Alexander Mizuk wrote: > Hi David, > > thank you for your fast respond. > I used the following code: > > vtkImageThreshold threshold = vtkImageThreshold.New(); > threshold.SetInputConnection(reader.GetOutputPort()); > threshold.ThresholdByLower(500); > threshold.ReplaceInOn(); > threshold.SetInValue(0); > threshold.ReplaceOutOn(); > threshold.SetOutValue(1); > threshold.Update(); > > vtkLookupTable lookupTable = vtkLookupTable.New(); > lookupTable.SetTableValue(0, 0.0, 0.0, 0.0, 0.0); > lookupTable.Build(); > > vtkImageMapToColors mapTransparency = > vtkImageMapToColors.New(); > mapTransparency.SetLookupTable(lookupTable); > mapTransparency.SetInput(threshold.GetOutput()); > > and send then the mapTransparency to the mapper. My result is still a > black cube with a white contour in it. But I just want to display the white > contour. > > Is it possible to display only a specific part of a dataset or have I > always to render everything? > > Thank you for your help > > Alexander > > Am 18.09.2017 um 15:24 schrieb David Gobbi: > > Hi Alexander, > > You can use vtkThreshold to set the threshold, or perhaps you can use a > lookup table that sets the opacity of those scalars to zero, i.e. use > table->SetTableValue(0, 0.0, 0.0, 0.0, 0.0). > > - David > > On Mon, Sep 18, 2017 at 2:22 AM, Alexander Mizuk > wrote: > >> Hi there, >> >> I want to display a 3D point-cloud. If read a DICOM series with >> vtkDICOMImageReader, set a threshold and change the value range from HU to >> 255 bit grayscale. >> Now I can display the hole dataset with: >> >> // Visualize >> vtkDataSetMapper mapper = vtkDataSetMapper.New(); >> mapper.SetInputConnection(shiftScaleFilter.GetOutputPort()); >> //mapper.ScalarVisibilityOff(); >> >> vtkActor actor = vtkActor.New(); >> actor.SetMapper(mapper); >> >> actor.GetProperty().SetPointSize(4); >> vtkRenderWindow renderWindow = renderWindowControl1.RenderWin >> dow; >> >> vtkRenderer renderer = renderWindow.GetRenderers().Ge >> tFirstRenderer(); >> >> renderer.SetBackground(0.2, 0.3, 0.4); >> renderer.AddActor(actor); >> >> renderer.ResetCamera(); >> >> With mapper.ScalarVisibilityOff(); I can set the visibility of the hole >> dataset of, but I only want to set the visibiliy for voxels with a value >> under a specific threshold for example all voxel with the value of zero. >> How can I realize it? >> >> best regards >> >> Alexander >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Sep 18 22:30:32 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 18 Sep 2017 22:30:32 -0400 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold In-Reply-To: <000601d330aa$33dd48b0$9b97da10$@gmx.de> References: <000601d330aa$33dd48b0$9b97da10$@gmx.de> Message-ID: Your input meshes should also be cleaned. Also you could try vtkLoopBooleanPolyDataFilter. Here are examples that use each method: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/LoopBooleanPolyDataFilter/ https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/BooleanOperationPolyDataFilter/ On Mon, Sep 18, 2017 at 2:16 PM, Maximilian Weiherer wrote: > Hi Cory, > > thank you very much for your reply. I tested the vtkCleanPolyData filter (as it merges duplicate points, and/or removes unused points and/or removes degenerate cells). It still get a mesh that is not manifold. I visualized that with help of Meshlab and attached it. The red cells are not manifold (selected via Meshlab's Filters > Cleaning and Repairing > Select non Manifold Edges). > > Thanks again! > > Best regards, > Maximilian > > -----Urspr?ngliche Nachricht----- > Von: Cory Quammen [mailto:cory.quammen at kitware.com] > Gesendet: Montag, 18. September 2017 15:27 > An: Maximilian Weiherer > Cc: vtkusers at vtk.org > Betreff: Re: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold > > Maximimilan, > > Have you tried to use vtkMergePoints after vtkAppendPolyData or vtkBooleanOperationPolyDataFilter? This filter merges duplicate points, which I suspect is the step that you are missing to produce a watertight mesh. > > HTH, > Cory > > > On Mon, Sep 18, 2017 at 5:08 AM, Maximilian Weiherer wrote: >> Hi everyone, >> >> I'm struggling with the vtkBooleanOperationPolyDataFilter. First, I'm >> computing the difference D between two vtkPolyData objects, say A and >> B (this is D := {A\B}). After that, I want to append the resulting >> difference D to B, i.e. make the union of these two meshes. Therefore, >> I'm using the vtkAppendPolyData filter. However, the final result is >> not manifold (which is necessary in order to print the mesh). I also >> tried the vtkBooleanOperationPolyDataFilter with the union operation >> but the problem still remains - the final result is not manifold and >> therefore not printable. How can I append these two meshes so that >> these are manifold and thus watertight (and printable)? >> >> Any help would be appreciated. Thanks! >> >> Best regards >> Maximilian >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > > > --- > Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr?ft. > https://www.avast.com/antivirus > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From ich_daniel at habmalnefrage.de Tue Sep 19 02:32:29 2017 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Mon, 18 Sep 2017 23:32:29 -0700 (MST) Subject: [vtkusers] PowerCrust and PoissonReconstruction compile problems In-Reply-To: <20170918114718.GB19877@megas.kitware.com> References: <1505505354230-0.post@n5.nabble.com> <20170918114718.GB19877@megas.kitware.com> Message-ID: <1505802749909-0.post@n5.nabble.com> Before the header #include I must set #define _USE_MATH_DEFINES . (in Factor.cpp) Thats all! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Tue Sep 19 06:40:06 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 19 Sep 2017 06:40:06 -0400 Subject: [vtkusers] PowerCrust and PoissonReconstruction compile problems In-Reply-To: <1505802749909-0.post@n5.nabble.com> References: <1505505354230-0.post@n5.nabble.com> <20170918114718.GB19877@megas.kitware.com> <1505802749909-0.post@n5.nabble.com> Message-ID: So can you build both powercrust and poisson? On Sep 19, 2017 2:32 AM, "-Daniel-" wrote: > Before the header #include I must set #define _USE_MATH_DEFINES > . > (in Factor.cpp) > Thats all! > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aralol2015 at gmail.com Tue Sep 19 07:17:20 2017 From: aralol2015 at gmail.com (Duster U) Date: Tue, 19 Sep 2017 16:47:20 +0530 Subject: [vtkusers] Picking in DICOM series In-Reply-To: References: <399fced.5.15e80558c5d.Coremail.tjlp@netease.com> <450bf5aa.0.15e88ed2e6a.Coremail.tjlp@netease.com> Message-ID: Hi, Below my code that i tried to pick the coordinates has been given.Please reply if any modifications needs to be done,or if my approach is wrong Thanks in Advance void MyVtkInteractorStyleImage::OnMouseMove() { //std::cout << "Picking pixel: " << this->Interactor->GetEventPosition()[0]<< " " << this->Interactor->GetEventPosition()[1] << std::endl; this->Interactor->GetPicker()->Pick(this->Interactor->GetEventPosition()[0], this->Interactor->GetEventPosition()[1], 0, // always zero. this->Interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer()); double pos[3]; this->Interactor->GetPicker()->GetPickPosition(pos); //std::cout << "Picked value: " << pos[0] << " " << pos[1] << " " << pos[2] << std::endl; int x = pos[0]; int y = pos[1]; std::cout << "(x,y) = (" << x << "," << y << ")" << std::endl; vtkSmartPointer coordinate = vtkSmartPointer::New(); coordinate->SetCoordinateSystemToWorld(); coordinate->SetValue(x,y,0); double* world = coordinate->GetValue(); std::cout << "World coordinate: " << world[0] << ", " << world[1] << ", " << world[2] << std::endl; // Forward events vtkInteractorStyleImage::OnMouseMove(); } On Mon, Sep 18, 2017 at 5:16 PM, Duster U wrote: > Hi Liu Peng,, > > Thanks for the reply.Let me try the different coordinate system and will > let u know if it works. > > Thanks > > On Sat, Sep 16, 2017 at 9:53 AM, Liu_tj wrote: > >> As there are several kind of coordinate system in VTK, you need to check >> the check values are world, viewport, normalized viewport coordinate. >> >> Perhaps you can post your code here and the forum guys can help you. >> >> Thanks >> >> ?2017-09-15?"Duster U" ??? >> >> -----????----- >> *???:*"Duster U" >> *????:*2017?09?15? ??? >> *???:*"Liu_tj" >> *??:*"vtkusers" >> *??:*Re: [vtkusers] Picking in DICOM series >> >> >> Hi Liu Peng, >> >> I have tried different dicom samples of different resolutions.When i use a sample of 320*320,the max value that i get from the picker is 150*150,and this too varies with samples.when i tried with another 320*320 sample max value that i got was 160*160. >> >> >> Thanks >> >> >> On Thu, Sep 14, 2017 at 5:50 PM, Liu_tj wrote: >> >>> How do you know the values are wrong? >>> >>> >>> >>> ?2017-09-14?"Duster U" ??? >>> >>> -----????----- >>> *???:*"Duster U" >>> *????:*2017?09?14? ??? >>> *???:*"vtkusers" >>> *??:*[vtkusers] Picking in DICOM series >>> >>> >>> >>> Hi, >>> >>> I've been trying to implement a Picker in the OnMouseMove of a custom >>> vtkinteractorstyleImage,so that i can get the pixel coordinates of an image >>> while hovering over an image.Now I've tried both the Point Picker and the >>> Prop Picker to do so,,both gives the coordinates but the problem is that >>> the values are not correct.So am i missing anything? >>> and i am new to vtk,So please help me out >>> >>> Thanks in Advance >>> >>> >>> >>> >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Tue Sep 19 08:35:24 2017 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Tue, 19 Sep 2017 05:35:24 -0700 (MST) Subject: [vtkusers] PowerCrust and PoissonReconstruction compile problems In-Reply-To: References: <1505505354230-0.post@n5.nabble.com> <20170918114718.GB19877@megas.kitware.com> <1505802749909-0.post@n5.nabble.com> Message-ID: <1505824524919-0.post@n5.nabble.com> So far only with PoissonReconstruction. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From amizuk at uni-osnabrueck.de Tue Sep 19 08:48:16 2017 From: amizuk at uni-osnabrueck.de (Alexander Mizuk) Date: Tue, 19 Sep 2017 14:48:16 +0200 Subject: [vtkusers] Change visibilty of datasets with zero value In-Reply-To: References: <1b8d7ec9-7dc1-5854-6d11-a3eb71a6a123@uni-osnabrueck.de> <4c907fbd-b733-b4d3-6d1a-50bdde4da8a6@uni-osnabrueck.de> Message-ID: <34d84b73-f510-3d45-9ab4-793caa210014@uni-osnabrueck.de> Hi David, Thank you for the information about vtkImageThreshold. If I use vtkThreshold then I get always the following error: vtkFloatArray (09B0E400): Unable to allocate 348585984 elements of size 4 bytes. I think this happens cause of my dataset is to big? ??? ??? ??? vtkThreshold th = vtkThreshold.New(); ??????????? th.SetInputConnection(reader.GetOutputPort()); ??????????? th.ThresholdByUpper(500); ??????????? th.Update(); This is how you recommend it, right? And when I use lookupTable.SetRange(0, 1000) without using vtkImageThreshold then it change my view and I can display different parts but I still get for my result a big black cube with some details in it. But I don't need this cube, just the contours in it. Maybe I use the wrong type for this. My Input looks like this ?vtkDICOMImageReader reader = new Kitware.VTK.vtkDICOMImageReader(); Is vtkDatasetMapper the right mapper for displaying the points? Cause I think this render just the outer contours and left the inside empty. Because of this the lookupTable is not able to set the visibilty of the back area off. Is that possible? best regards Alexander Am 18.09.2017 um 22:13 schrieb David Gobbi: > Hi Alexander, > > I meant just vtkThreshold, by itself, before vtkDataSetMapper.? This > will show only the points that are within the threshold.? In > comparison, vtkImageThreshold does not remove points.? All it can do > is change the color of the points. > > However, what you do with vtkImageThreshold can also work, but you > must always set a range for the lookup table, e.g. > lookupTable.SetRange(0, 1000). > > ?- David > > > On Mon, Sep 18, 2017 at 8:40 AM, Alexander Mizuk > > wrote: > > Hi David, > > thank you for your fast respond. > I used the following code: > > ??????????? vtkImageThreshold threshold = vtkImageThreshold.New(); > ??????????? threshold.SetInputConnection(reader.GetOutputPort()); > ??????????? threshold.ThresholdByLower(500); > ??????????? threshold.ReplaceInOn(); > ??????????? threshold.SetInValue(0); > ??????????? threshold.ReplaceOutOn(); > ??????????? threshold.SetOutValue(1); > ??????????? threshold.Update(); > > ??????????? vtkLookupTable lookupTable = vtkLookupTable.New(); > ??????????? lookupTable.SetTableValue(0, 0.0, 0.0, 0.0, 0.0); > ??????????? lookupTable.Build(); > > ??????????? vtkImageMapToColors mapTransparency = > vtkImageMapToColors.New(); > ??????????? mapTransparency.SetLookupTable(lookupTable); > ??????????? mapTransparency.SetInput(threshold.GetOutput()); > > and send then the mapTransparency to the mapper. My result is > still a black cube with a white contour in it. But I just want to > display the white contour. > > Is it possible to display only a specific part of a dataset or > have I always to render everything? > > Thank you for your help > > Alexander > > > Am 18.09.2017 um 15:24 schrieb David Gobbi: >> Hi Alexander, >> >> You can use vtkThreshold to set the threshold, or perhaps you can >> use a lookup table that sets the opacity of those scalars to >> zero, i.e. use table->SetTableValue(0, 0.0, 0.0, 0.0, 0.0). >> >> ?- David >> >> On Mon, Sep 18, 2017 at 2:22 AM, Alexander Mizuk >> > wrote: >> >> Hi there, >> >> I want to display a 3D point-cloud. If read a DICOM series >> with vtkDICOMImageReader, set a threshold and change the >> value range from HU to 255 bit grayscale. >> Now I can display the hole dataset with: >> >> ???? ??? ??? // Visualize >> ??????????? vtkDataSetMapper mapper = vtkDataSetMapper.New(); >> mapper.SetInputConnection(shiftScaleFilter.GetOutputPort()); >> ??????????? //mapper.ScalarVisibilityOff(); >> >> ??????????? vtkActor actor = vtkActor.New(); >> ??????????? actor.SetMapper(mapper); >> >> ??????????? actor.GetProperty().SetPointSize(4); >> ??????????? vtkRenderWindow renderWindow = >> renderWindowControl1.RenderWindow; >> >> ??????????? vtkRenderer renderer = >> renderWindow.GetRenderers().GetFirstRenderer(); >> >> ??????????? renderer.SetBackground(0.2, 0.3, 0.4); >> ??????????? renderer.AddActor(actor); >> >> ??????????? renderer.ResetCamera(); >> >> With mapper.ScalarVisibilityOff(); I can set the visibility >> of the hole dataset of, but I only want to set the visibiliy >> for voxels with a value under a specific threshold for >> example all voxel with the value of zero. >> How can I realize it? >> >> best regards >> >> Alexander >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Tue Sep 19 09:11:17 2017 From: kor1581 at gmail.com (K O ranjith) Date: Tue, 19 Sep 2017 18:41:17 +0530 Subject: [vtkusers] issue with vtkLineWidget2 displaying in vtkImageViewer2 Message-ID: Hello, I'm using a vtkImageViewer2 for displaying dicom images. I need to draw lines over the images and have interactively change its properties (position, size etc), so used vtkLineWidget2 to draw lines. But the lines are rendering below the image displayed in the vtkImageViewer2. I need to render the lines over the image, have any solution for this? I also using vtkAngleWidget and vtkDistanceWidget, but these are displaying above the image, only vtkLineWidget2 have the issue. please help.... (attached screenshot of the viewer, line rendered is marked inside the red circle) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.png Type: image/png Size: 185787 bytes Desc: not available URL: From edo.paskino at gmail.com Tue Sep 19 11:36:19 2017 From: edo.paskino at gmail.com (Edoardo Pasca) Date: Tue, 19 Sep 2017 16:36:19 +0100 Subject: [vtkusers] Display the coordinates of the point on which the cursor is hovered In-Reply-To: <1505760099416-0.post@n5.nabble.com> References: <1505760099416-0.post@n5.nabble.com> Message-ID: Hi, you will need a vtkPropPicker. to retrieve the image coordinate from the viewport coordinate I use (in Python) this code https://github.com/vais-ral/CILViewer/blob/master/ccpi/viewer/CILViewer2D.py#L608 as position = interactor.GetEventPosition() voxel = self.viewport2imageCoordinate(position) I hope it helps a bit. Edo On Mon, Sep 18, 2017 at 7:41 PM, Met at ll wrote: > Good day > Faced with the need to display the coordinates of the point where the > cursor > was pointed. > I draw a graph and when I hover over it I would like to display the > coordinates of the selected point ... > Can someone do this? > Thank you! > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Edo I know you think you understand what you thought I said, but I'm not sure you realize that what you heard is not what I meant (prob. Alan Greenspan) :wq -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Tue Sep 19 12:10:04 2017 From: sean at rogue-research.com (Sean McBride) Date: Tue, 19 Sep 2017 12:10:04 -0400 Subject: [vtkusers] How to set macOS RPATH or install_name (VTK 8.x) In-Reply-To: <3C38315A-3A68-4E99-82FB-F19B62B5AF41@bluequartz.net> References: <3C38315A-3A68-4E99-82FB-F19B62B5AF41@bluequartz.net> Message-ID: <20170919161004.1384913607@mail.rogue-research.com> On Fri, 25 Aug 2017 08:01:14 -0400, Michael Jackson said: >What is the recommended way to work with VTK during development? I can >run from the command line by export'ing DYLD_LIBRARY_PATH but I'm sure I >should have to do this. Or is the recommended way of developing against >VTK to have my project use the VTK build directory versus an install >directory? I always build static libraries, and use a 'source tree' in Xcode to point to the vtk libs. (As per our old SimpleCocoaVTK example.) Welcome back to VTK! Cheers, Sean From sur.chiranjib at gmail.com Tue Sep 19 13:35:41 2017 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Tue, 19 Sep 2017 23:05:41 +0530 Subject: [vtkusers] mesh decimation In-Reply-To: References: <1505745868468-0.post@n5.nabble.com> Message-ID: Could you please share your sample code in this thread? Thanks, Chiranjib On Tue, Sep 19, 2017 at 2:25 PM, Agata Kraso? wrote: > Hello, > > Thanks for your reply. > Hmmm ... Yes, I know about that filter. I have already done this example. > I got the same number of triangle in each mesh. But the same number of > triangle doesn't equal the same number of points. That's my main problem : > ( > > Best regards, > Agata > > 2017-09-18 19:55 GMT+02:00 Chiranjib Sur : > >> Hi, >> The decimation filter works on percentage of the mesh that you need to >> decimate >> >> Look at this line of the example @ wiki (https://www.vtk.org/Wiki/VTK/ >> Examples/Cxx/Meshes/Decimation) >> >> decimate->SetTargetReduction(.10); //10% reduction (if there was 100 triangles, now there will be 90) >> >> >> Hope that answers your query. >> Thanks, >> Chiranjib >> >> On Mon, Sep 18, 2017 at 8:14 PM, agatte wrote: >> >>> Hello vtk users, >>> >>> I would like to decimate mesh (triangle meshes) polydata to constant >>> number >>> of points. >>> I have already tried vtkDecimationPro filter but I could only decimate to >>> fix number of triangles. >>> I don't know how can I decimate a mesh to fix number of points ? >>> >>> I would appreciate for any help/advice. >>> >>> >>> Best :) >>> >>> >>> >>> >>> -- >>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Sep 19 13:58:59 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 19 Sep 2017 11:58:59 -0600 Subject: [vtkusers] Change visibilty of datasets with zero value In-Reply-To: <34d84b73-f510-3d45-9ab4-793caa210014@uni-osnabrueck.de> References: <1b8d7ec9-7dc1-5854-6d11-a3eb71a6a123@uni-osnabrueck.de> <4c907fbd-b733-b4d3-6d1a-50bdde4da8a6@uni-osnabrueck.de> <34d84b73-f510-3d45-9ab4-793caa210014@uni-osnabrueck.de> Message-ID: Hi Alexander, If you want to display the data as points, then vtkDataSetMapper is the right mapper to use. But if your data is too large, then maybe other visualization methods would be better? For example, volume rendering will probably use less than one third as much memory: https://lorensen.github.io/VTKExamples/site/Cxx/VolumeRendering/SmartVolumeMapper/ Or, if you just need to view surfaces, then you can use vtkMarchingCubes to create surfaces from the volumes. The number of points in the surface is far less than the number of points in the volume: https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/MarchingCubes/ - David On Tue, Sep 19, 2017 at 6:48 AM, Alexander Mizuk wrote: > Hi David, > > Thank you for the information about vtkImageThreshold. > If I use vtkThreshold then I get always the following error: > vtkFloatArray (09B0E400): Unable to allocate 348585984 elements of size 4 > bytes. > I think this happens cause of my dataset is to big? > > vtkThreshold th = vtkThreshold.New(); > th.SetInputConnection(reader.GetOutputPort()); > th.ThresholdByUpper(500); > th.Update(); > > This is how you recommend it, right? > > And when I use lookupTable.SetRange(0, 1000) without using > vtkImageThreshold then it change my view and I can display different parts > but I still get for my result a big black cube with some details in it. But > I don't need this cube, just the contours in it. > > Maybe I use the wrong type for this. My Input looks like this > vtkDICOMImageReader reader = new Kitware.VTK.vtkDICOMImageReader(); > > Is vtkDatasetMapper the right mapper for displaying the points? Cause I > think this render just the outer contours and left the inside empty. > Because of this the lookupTable is not able to set the visibilty of the > back area off. > Is that possible? > > best regards > Alexander > > Am 18.09.2017 um 22:13 schrieb David Gobbi: > > Hi Alexander, > > I meant just vtkThreshold, by itself, before vtkDataSetMapper. This will > show only the points that are within the threshold. In comparison, > vtkImageThreshold does not remove points. All it can do is change the > color of the points. > > However, what you do with vtkImageThreshold can also work, but you must > always set a range for the lookup table, e.g. lookupTable.SetRange(0, 1000). > > - David > > > On Mon, Sep 18, 2017 at 8:40 AM, Alexander Mizuk > wrote: > >> Hi David, >> >> thank you for your fast respond. >> I used the following code: >> >> vtkImageThreshold threshold = vtkImageThreshold.New(); >> threshold.SetInputConnection(reader.GetOutputPort()); >> threshold.ThresholdByLower(500); >> threshold.ReplaceInOn(); >> threshold.SetInValue(0); >> threshold.ReplaceOutOn(); >> threshold.SetOutValue(1); >> threshold.Update(); >> >> vtkLookupTable lookupTable = vtkLookupTable.New(); >> lookupTable.SetTableValue(0, 0.0, 0.0, 0.0, 0.0); >> lookupTable.Build(); >> >> vtkImageMapToColors mapTransparency = >> vtkImageMapToColors.New(); >> mapTransparency.SetLookupTable(lookupTable); >> mapTransparency.SetInput(threshold.GetOutput()); >> >> and send then the mapTransparency to the mapper. My result is still a >> black cube with a white contour in it. But I just want to display the white >> contour. >> >> Is it possible to display only a specific part of a dataset or have I >> always to render everything? >> >> Thank you for your help >> >> Alexander >> >> Am 18.09.2017 um 15:24 schrieb David Gobbi: >> >> Hi Alexander, >> >> You can use vtkThreshold to set the threshold, or perhaps you can use a >> lookup table that sets the opacity of those scalars to zero, i.e. use >> table->SetTableValue(0, 0.0, 0.0, 0.0, 0.0). >> >> - David >> >> On Mon, Sep 18, 2017 at 2:22 AM, Alexander Mizuk < >> amizuk at uni-osnabrueck.de> wrote: >> >>> Hi there, >>> >>> I want to display a 3D point-cloud. If read a DICOM series with >>> vtkDICOMImageReader, set a threshold and change the value range from HU to >>> 255 bit grayscale. >>> Now I can display the hole dataset with: >>> >>> // Visualize >>> vtkDataSetMapper mapper = vtkDataSetMapper.New(); >>> mapper.SetInputConnection(shiftScaleFilter.GetOutputPort()); >>> //mapper.ScalarVisibilityOff(); >>> >>> vtkActor actor = vtkActor.New(); >>> actor.SetMapper(mapper); >>> >>> actor.GetProperty().SetPointSize(4); >>> vtkRenderWindow renderWindow = renderWindowControl1.RenderWin >>> dow; >>> >>> vtkRenderer renderer = renderWindow.GetRenderers().Ge >>> tFirstRenderer(); >>> >>> renderer.SetBackground(0.2, 0.3, 0.4); >>> renderer.AddActor(actor); >>> >>> renderer.ResetCamera(); >>> >>> With mapper.ScalarVisibilityOff(); I can set the visibility of the hole >>> dataset of, but I only want to set the visibiliy for voxels with a value >>> under a specific threshold for example all voxel with the value of zero. >>> How can I realize it? >>> >>> best regards >>> >>> Alexander >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From agatakrason at gmail.com Tue Sep 19 15:11:34 2017 From: agatakrason at gmail.com (=?UTF-8?Q?Agata_Kraso=C5=84?=) Date: Tue, 19 Sep 2017 21:11:34 +0200 Subject: [vtkusers] mesh decimation In-Reply-To: References: <1505745868468-0.post@n5.nabble.com> Message-ID: Yes, I attached a file with source code. Agata 2017-09-19 19:35 GMT+02:00 Chiranjib Sur : > Could you please share your sample code in this thread? > > Thanks, > Chiranjib > > On Tue, Sep 19, 2017 at 2:25 PM, Agata Kraso? > wrote: > >> Hello, >> >> Thanks for your reply. >> Hmmm ... Yes, I know about that filter. I have already done this example. >> I got the same number of triangle in each mesh. But the same number of >> triangle doesn't equal the same number of points. That's my main problem : >> ( >> >> Best regards, >> Agata >> >> 2017-09-18 19:55 GMT+02:00 Chiranjib Sur : >> >>> Hi, >>> The decimation filter works on percentage of the mesh that you need to >>> decimate >>> >>> Look at this line of the example @ wiki (https://www.vtk.org/Wiki/VTK/ >>> Examples/Cxx/Meshes/Decimation) >>> >>> decimate->SetTargetReduction(.10); //10% reduction (if there was 100 triangles, now there will be 90) >>> >>> >>> Hope that answers your query. >>> Thanks, >>> Chiranjib >>> >>> On Mon, Sep 18, 2017 at 8:14 PM, agatte wrote: >>> >>>> Hello vtk users, >>>> >>>> I would like to decimate mesh (triangle meshes) polydata to constant >>>> number >>>> of points. >>>> I have already tried vtkDecimationPro filter but I could only decimate >>>> to >>>> fix number of triangles. >>>> I don't know how can I decimate a mesh to fix number of points ? >>>> >>>> I would appreciate for any help/advice. >>>> >>>> >>>> Best :) >>>> >>>> >>>> >>>> >>>> -- >>>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- cmake_minimum_required(VERSION 2.8) PROJECT(Decimation) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(Decimation MACOSX_BUNDLE Decimation.cxx) if(VTK_LIBRARIES) target_link_libraries(Decimation ${VTK_LIBRARIES}) else() target_link_libraries(Decimation vtkHybrid vtkWidgets) endif() -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include int main(int, char *[]) { //vtkSmartPointer sphereSource = vtkSmartPointer::New(); //sphereSource->Update(); vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("2proj__005.vtk"); reader->Update(); vtkSmartPointer input = vtkSmartPointer::New(); input->ShallowCopy(reader->GetOutput()); std::cout << "Before decimation" << std::endl << "------------" << std::endl; std::cout << "There are " << input->GetNumberOfPoints() << " points." << std::endl; std::cout << "There are " << input->GetNumberOfPolys() << " polygons." << std::endl; vtkSmartPointer decimate = vtkSmartPointer::New(); #if VTK_MAJOR_VERSION <= 5 decimate->SetInputConnection(input->GetProducerPort()); #else decimate->SetInputData(input); #endif //decimate->SetTargetReduction(.9); //99% reduction (if there was 100 triangles, now there will be 1) decimate->SetTargetReduction(.20); //10% reduction (if there was 100 triangles, now there will be 90) //decimate-> decimate->Update(); vtkSmartPointer decimated = vtkSmartPointer::New(); decimated->ShallowCopy(decimate->GetOutput()); std::cout << "After decimation" << std::endl << "------------" << std::endl; std::cout << "There are " << decimated->GetNumberOfPoints() << " points." << std::endl; std::cout << "There are " << decimated->GetNumberOfPolys() << " polygons." << std::endl; vtkSmartPointer writer = vtkPolyDataWriter::New(); writer->SetFileName("dec_seg001test.vtk"); writer->SetInput(decimated); writer->Write(); vtkSmartPointer inputMapper = vtkSmartPointer::New(); #if VTK_MAJOR_VERSION <= 5 inputMapper->SetInputConnection(input->GetProducerPort()); #else inputMapper->SetInputData(input); #endif vtkSmartPointer inputActor = vtkSmartPointer::New(); inputActor->SetMapper(inputMapper); vtkSmartPointer decimatedMapper = vtkSmartPointer::New(); #if VTK_MAJOR_VERSION <= 5 decimatedMapper->SetInputConnection(decimated->GetProducerPort()); #else decimatedMapper->SetInputData(decimated); #endif vtkSmartPointer decimatedActor = vtkSmartPointer::New(); decimatedActor->SetMapper(decimatedMapper); // There will be one render window vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->SetSize(600, 300); // And one interactor vtkSmartPointer interactor = vtkSmartPointer::New(); interactor->SetRenderWindow(renderWindow); // Define viewport ranges // (xmin, ymin, xmax, ymax) double leftViewport[4] = {0.0, 0.0, 0.5, 1.0}; double rightViewport[4] = {0.5, 0.0, 1.0, 1.0}; // Setup both renderers vtkSmartPointer leftRenderer = vtkSmartPointer::New(); renderWindow->AddRenderer(leftRenderer); leftRenderer->SetViewport(leftViewport); leftRenderer->SetBackground(.6, .5, .4); vtkSmartPointer rightRenderer = vtkSmartPointer::New(); renderWindow->AddRenderer(rightRenderer); rightRenderer->SetViewport(rightViewport); rightRenderer->SetBackground(.4, .5, .6); // Add the sphere to the left and the cube to the right leftRenderer->AddActor(inputActor); rightRenderer->AddActor(decimatedActor); leftRenderer->ResetCamera(); rightRenderer->ResetCamera(); renderWindow->Render(); interactor->Start(); return EXIT_SUCCESS; } From bill.lorensen at gmail.com Tue Sep 19 15:35:44 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 19 Sep 2017 15:35:44 -0400 Subject: [vtkusers] [vtk-developers] mesh decimation In-Reply-To: References: <1505745868468-0.post@n5.nabble.com> Message-ID: Look here: https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/Decimation/ On Tue, Sep 19, 2017 at 1:35 PM, Chiranjib Sur wrote: > Could you please share your sample code in this thread? > > Thanks, > Chiranjib > > On Tue, Sep 19, 2017 at 2:25 PM, Agata Kraso? wrote: >> >> Hello, >> >> Thanks for your reply. >> Hmmm ... Yes, I know about that filter. I have already done this example. >> I got the same number of triangle in each mesh. But the same number of >> triangle doesn't equal the same number of points. That's my main problem : >> ( >> >> Best regards, >> Agata >> >> 2017-09-18 19:55 GMT+02:00 Chiranjib Sur : >>> >>> Hi, >>> The decimation filter works on percentage of the mesh that you need to >>> decimate >>> >>> Look at this line of the example @ wiki >>> (https://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/Decimation) >>> >>> decimate->SetTargetReduction(.10); //10% reduction (if there was 100 >>> triangles, now there will be 90) >>> >>> >>> Hope that answers your query. >>> Thanks, >>> Chiranjib >>> >>> On Mon, Sep 18, 2017 at 8:14 PM, agatte wrote: >>>> >>>> Hello vtk users, >>>> >>>> I would like to decimate mesh (triangle meshes) polydata to constant >>>> number >>>> of points. >>>> I have already tried vtkDecimationPro filter but I could only decimate >>>> to >>>> fix number of triangles. >>>> I don't know how can I decimate a mesh to fix number of points ? >>>> >>>> I would appreciate for any help/advice. >>>> >>>> >>>> Best :) >>>> >>>> >>>> >>>> >>>> -- >>>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > -- Unpaid intern in BillsBasement at noware dot com From dave.demarle at kitware.com Tue Sep 19 20:02:16 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 19 Sep 2017 20:02:16 -0400 Subject: [vtkusers] Problem with Data in VTK In-Reply-To: <2062885293.783548.1505580187721@mail.yahoo.com> References: <1855612015.339072.1505497670459.ref@mail.yahoo.com> <1855612015.339072.1505497670459@mail.yahoo.com> <2062885293.783548.1505580187721@mail.yahoo.com> Message-ID: Sorry for the frustration Jennifer. This is what I've done for demonstration. download VTK-8.0.1.zip to c:\tmp\foo download VTKData-8.0.1.zip into to c:\tmp\foo unzip both c:\tmp\foo now contains VTK-8.0.1 c:\tmp\foo\VTK-8.0.1 contains CMakeLists.txt, a bunch of other source code files, and a .ExternalData directory with all those md5's under it. In a vs2013 x64 native tools command prompt (from visual studio community) I: make a build directory "c:\tmp\foo\build" and cd into it I run cmake -G Ninja ..\VTK-8.0.1 and let cmake configure the build files. Then I run ninja to compile from the command line (presumably I could have skipped -G Ninja above and then used visual studio ide intead but that's slower). The build starts off with a whole bunch of lines like this: C:\tmp\foo\build>nmake [1/6225] Generating C:/tmp/foo/build/ExternalData/Testing/Data/ex-blow_5/ex-blow_5_1_2.vtu -- Found object: "C:/tmp/foo/VTK-8.0.1/.ExternalData/MD5/84001730339b29750bee19f1b4af52ef" [2/6225] Generating C:/tmp/foo/build/ExternalData/Testing/Data/ex-blow_5/ex-blow_5_0_6.vtu -- Found object: "C:/tmp/foo/VTK-8.0.1/.ExternalData/MD5/3a5df717510b2b8f59e5c16dc91ff067" [3/6225] Generating -- Found object: ... Meaning that it is making those links we spoke about to the md5 files. If I had skipped download unzip of VTKData-8.0.1.zip it would have instead downloaded each of the files instead of finding them. When it is done, VTK_DATA_ROOT should be c:/tmp/foo/build/ExternalData/Testing in my case as that is where the files end up. To make it simpleer I've pushed a zipped up copy of what I've made above to: https://data.kitware.com/api/v1/file/59c1aeec8d777f7d33e9d4f8/download David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 16, 2017 at 12:43 PM, Jennifer Lee wrote: > Hi, > I don't have any ExternalData/Testing file. I'm using VTK. Could you > let me know what I'm missing? All I've is some MD5 data under the following > directory:C:\VTK\VTK-8.0.1\Testing\Data. > When I downloaded VTKData, it looks all encrypted as follows: > > > 00b6935d399b80e4f9edc1414a4c363f > 00ba7d9399c914edb4a6faa0b10ae7e5 > 00d2efba0581fb7d436bcc45a9acedcb > > I really don't understand what I am missing and how to solve the > problem. > Any help will be highly appreciated. I used VTK in 2013. I never > encountered this problem. That time I could use the data directly. And I > just needed to set VTK_DATA_ROOT. I'm confused with MD5 files and encrypted > VTKData. I just need to know how I can find the original data. > Any clarification will be highly appreciated. > > Regards, > Jennifer > > > On Friday, September 15, 2017 11:03 AM, Shawn Waldon < > shawn.waldon at kitware.com> wrote: > > > Hi Jennifer, > > Try looking inside ExternalData/Testing inside your ParaView build > directory. This folder should contain the data files with their original > filenames rather than the MD5s (or symlinks/shortcuts to the data to save > disk space but should work the same). > > HTH, > Shawn > > On Fri, Sep 15, 2017 at 1:47 PM, Jennifer Lee via vtkusers < > vtkusers at vtk.org> wrote: > > Hi, > I've the following directory: C:\VTK\VTK-8.0.1\Testing\ External; This > contains the following two files: CMakeLists and CMakeConfig.cmake. > > > I don't have any C:\VTK\VTK-8.0.1\ExternalData\ Testing. > I've also attached some screenshots of some directories just if you > need for further clarification. > > I really don't understand what I'm missing and why it should be so > complication to work with current data. Any help will be highly appreciated. > > Regards, > Jennifer > > > > > On Thursday, September 14, 2017 3:20 PM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > What is in C:\VTK\VTK-8.0.1\ ExternalData\Testing? > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Sep 14, 2017 at 5:22 PM, Jennifer Lee > wrote: > > Hi, > Thanks for the reply. I downloaded the data and set the VTK_DATA_ROOT > to *C:\VTK\VTKData.* > * Actually that's what I used to do before. I never built VTKData > project. How to do that? I believe the source will be **C:\VTK\VTKData; > but which one will be the build directory?* > * Please let me know.* > * I've built the VTK project with BUILD_TESTING on. This generated data > to the following directory: * > > * C:\VTK\VTK-8.0.1\Testing\Data\ headsq. But these are all MD5 files and > if VTK_DATA_ROOT is pointed there, it can't find these files.* > > * Any clarification will be highly appreciated. * > > *Regards,* > > *Jennifer* > > > On Wednesday, September 13, 2017 11:15 PM, Jon Haitz Legarreta < > jhlegarreta at vicomtech.org> wrote: > > > Hi Jennifer, > what does your C:\VTK\VTKData directory contain? Have you built the > VTKData project? You must build that project so that the actual testing > data files are retrieved. > > HTH, > JON HAITZ > > > -- > > > On 14 September 2017 at 07:58, Jennifer Lee via vtkusers > wrote: > > Hello, > Still I could not make it work. Setting VTK_DATA_ROOT to > ?C:\VTK\VTK-8.0.1\ ExternalData\Testing? didn?t work for me. It can?t find > the data. > > I have separate source and build: > Source is : C:\VTK\VTK-8.0.1 > Build is: C:\VTK\VTK-bin > Data is: C:\VTK\VTKData > > As I also built with TESTING_ON; so, I?ve MD5 files under Testing > directory. *C:\VTK\VTK-8.0.1\Testing.* > > I tried to run the tcl script Medical1.tcl. If I set the data root to ? > *C:\VTK\VTK-8.0.1\Testing?*, it can?t find the data (I think because > these are MD5 files). If I set the data root to *C:\VTK\VTKData*, it also > does not work. > > I need help to fix the problem. > Thanks! > > Regards, > Jennifer > > > On Wednesday, September 13, 2017 7:58 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee > wrote: > > Hello, > Thanks so much for the reply. > > Please ignore my poor knowledge. I?m really having trouble in > understanding. > > > No worries, this confuses lots of people including me. > > > I?ve data in the following directory: > > C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, the files look > like something below: > > 00b6935d399b80e4f9edc1414a4c36 3f > 00ba7d9399c914edb4a6faa0b10ae7 e5 > 00d2efba0581fb7d436bcc45a9aced cb > 00d49b1746f315992fac476892c681 ae > : > : > : > : > I really don?t understand what they mean. It seems to me these are some > encrypted names which need to be decrypted. I don?t know how to do that. > > > These are checksums of the real data files. Cmake and git know that they > have to download a different file whenever the data file's checksum doesn't > agree with the above. > > > I built with TESTING_ON, now data are available in the ?Testing? directory > too. Suppose I?d like to run the Medical examples. Now, data is available > in the following directory: > > > *C:\VTK\VTK-8.0.1\Testing\Data\ headsq* > > With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing > > But these are all MD5 files. So the following line of the code does not > find the data: > > *v16 SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/ quarter".* > > Please help me how to make things work. If I've missed any step, please > let me know. > Thanks in advance. > > Where is you build directory? I highly recommend always keeping your VTK > source directory and your VTK build directory separate. > > Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT > to C:\VTK\VTK-8.0.1\ExternalData\ Testing. This is where the data file > links are. The real data files are elsewhere in files with MD5 names, but > for all intents and purposes the data link files that refer to them work as > if they were the read data files. > > > > Regards, > Jennifer > > > > > On Tuesday, September 12, 2017 9:32 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > We changed the structure of regression test data in 6.1 to allow > developers to make proposed changes to code and data concurrently and > ensure that the continuous integration test machines do not fail when they > run new tests on old data. > > The net result is that a VTK build tree has test data files that are > actually symbolic links to the md5 files which live elsewhere. You can > generally open and use the symbolic links exactly as you would a normal > data file. If you turn on testing in your build, cmake will try to download > each one of the files. Alternatively you can untar the source and data > packages for a release in the same directory and the default build setup > will use them and avoid downloading anything else. > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers < > vtkusers at vtk.org> wrote: > > Hello, > I used VTK in 2013. After that, I installed VTK after more than 4 > years. I found some changes in Data in the latest version. How to make > those MD5 files work? Please let me know. I didn't find much > documentation. I'm really having problem with this. > Thanks in advance! > > Regards, > Jennifer. > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > > > > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > > > > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lee_jennifer_82 at yahoo.com Tue Sep 19 23:08:45 2017 From: lee_jennifer_82 at yahoo.com (Jennifer Lee) Date: Wed, 20 Sep 2017 03:08:45 +0000 (UTC) Subject: [vtkusers] Problem with Data in VTK In-Reply-To: References: <1855612015.339072.1505497670459.ref@mail.yahoo.com> <1855612015.339072.1505497670459@mail.yahoo.com> <2062885293.783548.1505580187721@mail.yahoo.com> Message-ID: <913677972.2875107.1505876925682@mail.yahoo.com> Hello,??? Thanks so much for taking time to work on this.? I didn't build using VTK_DATA. I found that there are some MD5 files related to data files in the following directory: C:\VTK\VTK-8.0.1\Testing\Data. Suppose if I want to run Tcl files in Medical directory, I have MD5 files as follows: C:\VTK\VTK-8.0.1\Testing\Data\headsq\quarter.1.md5C:\VTK\VTK-8.0.1\Testing\Data\headsq\quarter.2.md5C:\VTK\VTK-8.0.1\Testing\Data\headsq\quarter.3.md5C:\VTK\VTK-8.0.1\Testing\Data\headsq\quarter.3.md5::: How to work with these MD5 files if I don't configure with VTK_DATA? in CMake.Thanks again in advance. Regards,Jennifer On Tuesday, September 19, 2017 5:02 PM, David E DeMarle wrote: Sorry for the frustration Jennifer. This is what I've done for demonstration.download VTK-8.0.1.zip to c:\tmp\foodownload VTKData-8.0.1.zip into to c:\tmp\foounzip bothc:\tmp\foo now contains VTK-8.0.1c:\tmp\foo\VTK-8.0.1 contains CMakeLists.txt, a bunch of other source code files, and a .ExternalData directory with all those md5's under it. In a vs2013 x64 native tools command prompt (from visual studio community) I: make a build directory "c:\tmp\foo\build" and cd into it I run cmake -G Ninja ..\VTK-8.0.1 and let cmake configure the build files.Then I run ninja to compile from the command line (presumably I could have skipped -G Ninja above and then used visual studio ide intead but that's slower). The build starts off with a whole bunch of lines like this:C:\tmp\foo\build>nmake [1/6225] Generating C:/tmp/foo/build/ExternalData/Testing/Data/ex-blow_5/ex-blow_5_1_2.vtu -- Found object: "C:/tmp/foo/VTK-8.0.1/.ExternalData/MD5/84001730339b29750bee19f1b4af52ef" [2/6225] Generating C:/tmp/foo/build/ExternalData/Testing/Data/ex-blow_5/ex-blow_5_0_6.vtu -- Found object: "C:/tmp/foo/VTK-8.0.1/.ExternalData/MD5/3a5df717510b2b8f59e5c16dc91ff067" [3/6225] Generating -- Found object: ... Meaning that it is making those links we spoke about to the md5 files. If I had skipped download unzip of VTKData-8.0.1.zip it would have instead downloaded each of the files instead of finding them. When it is done, VTK_DATA_ROOT should be c:/tmp/foo/build/ExternalData/Testing in my case as that is where the files end up. To make it simpleer I've pushed a zipped up copy of what I've made above to:https://data.kitware.com/api/v1/file/59c1aeec8d777f7d33e9d4f8/download David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 16, 2017 at 12:43 PM, Jennifer Lee wrote: Hi,?? I don't have any ExternalData/Testing file. I'm using VTK. Could you let me know what I'm missing? All I've is some MD5 data under the following directory:C:\VTK\VTK-8.0.1\ Testing\Data.? When I downloaded VTKData, it looks all encrypted as follows: ? 00b6935d399b80e4f9edc1414a4c36 3f00ba7d9399c914edb4a6faa0b10ae7 e500d2efba0581fb7d436bcc45a9aced cb ?? I really don't understand what I am missing and how to solve the problem.? Any help will be highly appreciated. I used VTK in 2013. I never encountered this problem. That time I could use the data directly. And I just needed to set VTK_DATA_ROOT. I'm confused with MD5 files and encrypted VTKData. I just need to know how I can find the original data.? Any clarification will be highly appreciated. Regards,Jennifer On Friday, September 15, 2017 11:03 AM, Shawn Waldon wrote: Hi Jennifer, Try looking inside ExternalData/Testing inside your ParaView build directory.? This folder should contain the data files with their original filenames rather than the MD5s (or symlinks/shortcuts to the data to save disk space but should work the same). HTH, Shawn On Fri, Sep 15, 2017 at 1:47 PM, Jennifer Lee via vtkusers wrote: Hi,?? I've the following directory: C:\VTK\VTK-8.0.1\Testing\ External;? This contains the following two files: CMakeLists and CMakeConfig.cmake. ?? I don't have any C:\VTK\VTK-8.0.1\ExternalData\ Testing. ?? I've also attached some screenshots of some directories just if you need for further clarification. ?? I really don't understand? what I'm missing and why it should be so complication to work with current data. Any help will be highly appreciated. Regards,Jennifer On Thursday, September 14, 2017 3:20 PM, David E DeMarle wrote: What is in?C:\VTK\VTK-8.0.1\ ExternalData\Testing? David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Sep 14, 2017 at 5:22 PM, Jennifer Lee wrote: Hi,?? Thanks for the reply. I downloaded the data and set the VTK_DATA_ROOT to C:\VTK\VTKData.??? Actually that's what I used to do before. I never built VTKData project. How to do that? I believe the source will be C:\VTK\VTKData; but which one will be the build directory??? Please let? me know.?? I've built the VTK project with BUILD_TESTING on. This generated data to the following directory:? ? C:\VTK\VTK-8.0.1\Testing\Data\ headsq. But these are all MD5 files and if VTK_DATA_ROOT is pointed there, it can't find these files. ?? Any clarification will be highly appreciated. Regards,Jennifer On Wednesday, September 13, 2017 11:15 PM, Jon Haitz Legarreta wrote: Hi Jennifer, what does your C:\VTK\VTKData directory contain? Have you built the VTKData project? You must build that project so that the actual testing data files are retrieved. HTH, JON HAITZ | | -- On 14 September 2017 at 07:58, Jennifer Lee via vtkusers wrote: Hello,???? Still I could notmake it work. Setting VTK_DATA_ROOT to ?C:\VTK\VTK-8.0.1\ ExternalData\Testing?didn?t work for me. It can?t find the data. ?I have separate source and build: Source is : C:\VTK\VTK-8.0.1Build is: C:\VTK\VTK-binData is: C:\VTK\VTKData ?As I also built with TESTING_ON; so, I?ve MD5 files underTesting directory. C:\VTK\VTK-8.0.1\Testing.?I tried to run the tcl script Medical1.tcl. If I set the ?data root to ?C:\VTK\VTK-8.0.1\Testing?, itcan?t find the data (I think because these are MD5 files). If I set the dataroot to C:\VTK\VTKData, it also does not work.?I need help?to fix the problem.Thanks!?Regards,Jennifer On Wednesday, September 13, 2017 7:58 AM, David E DeMarle wrote: On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee wrote: Hello,?? Thanks so much for the reply. Please ignore my poor knowledge. I?m really having troublein understanding. No worries, this confuses lots of people including me.? I?ve data in the following directory: C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, thefiles look like something below: 00b6935d399b80e4f9edc1414a4c36 3f00ba7d9399c914edb4a6faa0b10ae7 e500d2efba0581fb7d436bcc45a9aced cb00d49b1746f315992fac476892c681 ae::::I really don?t understand what they mean. It seems tome? these are some encrypted names whichneed to be decrypted. I don?t know how to do that. These are checksums of the real data files. Cmake and git know that they have to download a different file whenever the data file's checksum doesn't agree with the above.? I built with TESTING_ON, now data are available in the ?Testing?directory too. Suppose I?d like to run the Medical examples. Now, data isavailable in the following directory: C:\VTK\VTK-8.0.1\Testing\Data\ headsq With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing But these are all MD5 files. So the following line of thecode does not find the data: v16 SetFilePrefix?"$VTK_DATA_ROOT/Data/headsq/ quarter". Please help me how to make things work. If I've missed any step, please let me know.Thanks in advance. Where is you build directory? I highly recommend always keeping your VTK source directory and your VTK build directory separate. Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT to C:\VTK\VTK-8.0.1\ExternalData\ Testing. This is where the data file links are. The real data files are elsewhere in files with MD5 names, but for all intents and purposes the data link files that refer to them work as if they were the read data files. ? Regards,Jennifer On Tuesday, September 12, 2017 9:32 AM, David E DeMarle wrote: We changed the structure of regression test data in 6.1 to allow developers to make proposed changes to code and data concurrently and ensure that the continuous integration test machines do not fail when they run new tests on old data. The net result is that a VTK build tree has test data files that are actually symbolic links to the md5 files which live elsewhere. You can generally open and use the symbolic links exactly as you would a normal data file. If you turn on testing in your build, cmake will try to download each one of the files. Alternatively you can untar the source and data packages for a release in the same directory and the default build setup will use them and avoid downloading anything else. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers wrote: ? Hello,???? I used VTK in 2013. After that, I installed VTK after more than 4 years. I found some changes in Data in the latest version. How to make those MD5 files work? Please let me know. I didn't find much documentation.?I'm really having problem with this.???? Thanks in advance! Regards,Jennifer. ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Wed Sep 20 00:18:33 2017 From: kor1581 at gmail.com (K O ranjith) Date: Wed, 20 Sep 2017 09:48:33 +0530 Subject: [vtkusers] Draw line with vtk In-Reply-To: References: Message-ID: Hello, I used vtkLineWidget2 to draw the lines. I'm using a vtkImageViewer2 for displaying dicom images and the lines should be rendered over the images . But vtkLineWidget2 lines are rendering below the image displayed in the vtkImageViewer2. I need to render the lines over the displayed image, have any solution for this?, have any method to control the rendering order(like bottom to top)? I also using vtkAngleWidget and vtkDistanceWidget, but these are displaying above the image, only vtkLineWidget2 (and vtkLineWidget) have the issue. please help.... (attached screenshot of the viewer, line rendered is marked inside the red circle) On Mon, Sep 18, 2017 at 5:50 PM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > Hi, > > vtkLineWidget2 follows the new widget <-> representation model of widgets > in VTK; where the representation determines how the widget is drawn on > screen and the widget is responsible for interactions with the > representation. > > Hope that helps. > Sankhesh > ? > > On Mon, Sep 18, 2017 at 6:36 AM K O ranjith wrote: > >> Hello, >> Thanks very much for the help. >> What is the difference between vtk line widgets "vtkLineWidget" and >> "vtkLineWidget2 "? >> I have to draw the lines above a dicom image displayed in an >> vtkImageViewer2 >> >> >> >> On Fri, Sep 15, 2017 at 6:15 PM, Sankhesh Jhaveri < >> sankhesh.jhaveri at kitware.com> wrote: >> >>> Hi, >>> >>> You should use the widget if you think you would like to *interactively* >>> place/draw and edit the line. If your goal is to just display a line given >>> a set of parameters and update it without interaction, a simple cell based >>> approach should work. See https://lorensen.github.io/ >>> VTKExamples/site/Cxx/GeometricObjects/LongLine/ >>> >>> Hope that helps. >>> Sankhesh >>> ? >>> >>> On Fri, Sep 15, 2017 at 7:19 AM K O ranjith wrote: >>> >>>> Hello, >>>> I need to draw a couple of lines in an image viewer (vtkImageViewer2) >>>> for MRI slice planning application. Also should have to perform few >>>> operations (move, roatate)on the lines with mouse interactions and need to >>>> retrieve line properties (new coordinates after movement, width etc). >>>> I have found examples with two methods while searching >>>> with vtkLineWidget2 and with vtkLine >>>> which approach will be more suitable? >>>> what is the difference?have any difficulties for manipulation >>>> operations if use vtkLineWidget2? >>>> Please help >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at http://www.kitware.com/ >>>> opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> -- >>> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >>> | (518) 881-4417 >>> ? >>> >> >> -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.png Type: image/png Size: 185787 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled1.png Type: image/png Size: 248254 bytes Desc: not available URL: From da178 at hw.ac.uk Wed Sep 20 06:19:51 2017 From: da178 at hw.ac.uk (Anagnostakis, Dimitrios) Date: Wed, 20 Sep 2017 10:19:51 +0000 Subject: [vtkusers] Sending to vtk mailist Message-ID: Hi all, I've sent one or two messages to the vtk users mail list but I haven't got any response. I can't understand if you get the mails or not so please could you someone reply to this so I can understand if I'm doing something wrong? Many thanks, Dimitris ________________________________ Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With campuses and students across the entire globe we span the world, delivering innovation and educational excellence in business, engineering, design and the physical, social and life sciences. This email is generated from the Heriot-Watt University Group, which includes: 1. Heriot-Watt University, a Scottish charity registered under number SC000278 2. Edinburgh Business School a Charity Registered in Scotland, SC026900. Edinburgh Business School is a company limited by guarantee, registered in Scotland with registered number SC173556 and registered office at Heriot-Watt University Finance Office, Riccarton, Currie, Midlothian, EH14 4AS 3. Heriot- Watt Services Limited (Oriam), Scotland's national performance centre for sport. Heriot-Watt Services Limited is a private limited company registered is Scotland with registered number SC271030 and registered office at Research & Enterprise Services Heriot-Watt University, Riccarton, Edinburgh, EH14 4AS. The contents (including any attachments) are confidential. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. -------------- next part -------------- An HTML attachment was scrubbed... URL: From danagnostak at gmail.com Wed Sep 20 06:33:14 2017 From: danagnostak at gmail.com (Dimitrios Anagnostakis) Date: Wed, 20 Sep 2017 11:33:14 +0100 Subject: [vtkusers] Attempt to send to users mail list Message-ID: <027701d331fb$ddaef760$990ce620$@gmail.com> Hi all, I've sent one or two messages to the vtk users mail list but I haven't got any response. I can't understand if you get the mails or not so please could you someone reply to this so I can understand if I'm doing something wrong? Many thanks, Dimitris --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Wed Sep 20 07:36:42 2017 From: kor1581 at gmail.com (K O ranjith) Date: Wed, 20 Sep 2017 17:06:42 +0530 Subject: [vtkusers] Difference in images displayed in vtkImageViewer2 and vtkResliceImageViewer Message-ID: Hello, While displaying same dicom images in vtkResliceImageViewer and vtkImageViewer2, it showing images with a different window level and window width. I also tried to get the window level and window width values from dicom metadata and set in both the viewers. Then the vtkImageViewer2 giving same result as like other dicom viewer applications(like RadiAnt), but vtkResliceImageViewer showing a differnt result from others. I need to use vtkResliceImageViewer in my application. why images displaying in different manner in vtkResliceImageViewer and vtkImageViewer2? Can get the same result with vtkResliceImageViewer as like vtkImageViewer2? Do need to perform any configuration in vtkResliceImageViewer? (Attached the screenshot of screens displayed same dicom image with vtkResliceImageViewer and vtkImageViewer2) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Imagewith_vtkImageViewer2.png Type: image/png Size: 920092 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkResliceImageViewerScreenshot.png Type: image/png Size: 95235 bytes Desc: not available URL: From cory.quammen at kitware.com Wed Sep 20 07:59:46 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 20 Sep 2017 07:59:46 -0400 Subject: [vtkusers] Attempt to send to users mail list In-Reply-To: <027701d331fb$ddaef760$990ce620$@gmail.com> References: <027701d331fb$ddaef760$990ce620$@gmail.com> Message-ID: Dimitrios, This message came through the mailing list. Thanks, Cory On Wed, Sep 20, 2017 at 6:33 AM, Dimitrios Anagnostakis < danagnostak at gmail.com> wrote: > Hi all, > > > > I?ve sent one or two messages to the vtk users mail list but I haven?t got > any response. > > I can?t understand if you get the mails or not so please could you someone > reply to this so I can understand if I?m doing something wrong? > > > > Many thanks, > > Dimitris > > > > > Virus-free. > www.avast.com > > <#m_-5899414677912380314_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From danagnostak at gmail.com Wed Sep 20 08:02:43 2017 From: danagnostak at gmail.com (Dimitrios Anagnostakis) Date: Wed, 20 Sep 2017 13:02:43 +0100 Subject: [vtkusers] Attempt to send to users mail list In-Reply-To: References: <027701d331fb$ddaef760$990ce620$@gmail.com> Message-ID: <003b01d33208$5dfe4b30$19fae190$@gmail.com> Hi Cory, Many thanks for this. Regards, Dimitrios From: Cory Quammen [mailto:cory.quammen at kitware.com] Sent: Wednesday, September 20, 2017 13:00 To: Dimitrios Anagnostakis Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Attempt to send to users mail list Dimitrios, This message came through the mailing list. Thanks, Cory On Wed, Sep 20, 2017 at 6:33 AM, Dimitrios Anagnostakis > wrote: Hi all, I?ve sent one or two messages to the vtk users mail list but I haven?t got any response. I can?t understand if you get the mails or not so please could you someone reply to this so I can understand if I?m doing something wrong? Many thanks, Dimitris Virus-free. www.avast.com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 350 bytes Desc: not available URL: From sankhesh.jhaveri at kitware.com Wed Sep 20 08:51:06 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 20 Sep 2017 12:51:06 +0000 Subject: [vtkusers] Draw line with vtk In-Reply-To: References: Message-ID: Hi, The issue is that vtkLineRepresentation is a 3D representation; whereas vtkDistanceWidget and vtkAngleWidget have 2D counterparts. A workaround would be to add an observer to the InteractionEvent and explicitly set the display position Z coordinate to 0. Hope that helps. Thanks, Sankhesh ? On Wed, Sep 20, 2017 at 12:18 AM K O ranjith wrote: > Hello, > I used vtkLineWidget2 to draw the lines. > I'm using a vtkImageViewer2 for displaying dicom images and the lines > should be rendered over the images . > But vtkLineWidget2 lines are rendering below the image displayed in the > vtkImageViewer2. > I need to render the lines over the displayed image, have any solution for > this?, have any method to control the rendering order(like bottom to top)? > I also using vtkAngleWidget and vtkDistanceWidget, but these are > displaying above the image, only vtkLineWidget2 (and vtkLineWidget) have > the issue. > please help.... > (attached screenshot of the viewer, line rendered is marked inside the red > circle) > > On Mon, Sep 18, 2017 at 5:50 PM, Sankhesh Jhaveri < > sankhesh.jhaveri at kitware.com> wrote: > >> Hi, >> >> vtkLineWidget2 follows the new widget <-> representation model of >> widgets in VTK; where the representation determines how the widget is drawn >> on screen and the widget is responsible for interactions with the >> representation. >> >> Hope that helps. >> Sankhesh >> ? >> >> On Mon, Sep 18, 2017 at 6:36 AM K O ranjith wrote: >> >>> Hello, >>> Thanks very much for the help. >>> What is the difference between vtk line widgets "vtkLineWidget" and >>> "vtkLineWidget2 "? >>> I have to draw the lines above a dicom image displayed in an >>> vtkImageViewer2 >>> >>> >>> >>> On Fri, Sep 15, 2017 at 6:15 PM, Sankhesh Jhaveri < >>> sankhesh.jhaveri at kitware.com> wrote: >>> >>>> Hi, >>>> >>>> You should use the widget if you think you would like to >>>> *interactively* place/draw and edit the line. If your goal is to just >>>> display a line given a set of parameters and update it without interaction, >>>> a simple cell based approach should work. See >>>> https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/LongLine/ >>>> >>>> Hope that helps. >>>> Sankhesh >>>> ? >>>> >>>> On Fri, Sep 15, 2017 at 7:19 AM K O ranjith wrote: >>>> >>>>> Hello, >>>>> I need to draw a couple of lines in an image viewer (vtkImageViewer2) >>>>> for MRI slice planning application. Also should have to perform few >>>>> operations (move, roatate)on the lines with mouse interactions and need to >>>>> retrieve line properties (new coordinates after movement, width etc). >>>>> I have found examples with two methods while searching >>>>> with vtkLineWidget2 and with vtkLine >>>>> which approach will be more suitable? >>>>> what is the difference?have any difficulties for manipulation >>>>> operations if use vtkLineWidget2? >>>>> Please help >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> -- >>>> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >>>> | (518) 881-4417 >>>> ? >>>> >>> >>> -- >> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >> | (518) 881-4417 >> ? >> > > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Wed Sep 20 08:53:40 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 20 Sep 2017 12:53:40 +0000 Subject: [vtkusers] Difference in images displayed in vtkImageViewer2 and vtkResliceImageViewer In-Reply-To: References: Message-ID: The difference in the two images seems to be window width and level. Ensure that the values are same in the vtkImageResliceViewer. ? On Wed, Sep 20, 2017 at 7:37 AM K O ranjith wrote: > Hello, > While displaying same dicom images in vtkResliceImageViewer and > vtkImageViewer2, it showing images with a different window level and window > width. > I also tried to get the window level and window width values from dicom > metadata and set in both the viewers. Then the vtkImageViewer2 giving same > result as like other dicom viewer applications(like RadiAnt), but > vtkResliceImageViewer showing a differnt result from others. > I need to use vtkResliceImageViewer in my application. > why images displaying in different manner in vtkResliceImageViewer and > vtkImageViewer2? > Can get the same result with vtkResliceImageViewer as like > vtkImageViewer2? > Do need to perform any configuration in vtkResliceImageViewer? > > (Attached the screenshot of screens displayed same dicom image with > vtkResliceImageViewer and vtkImageViewer2) > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Wed Sep 20 09:09:25 2017 From: kor1581 at gmail.com (ram) Date: Wed, 20 Sep 2017 06:09:25 -0700 (MST) Subject: [vtkusers] Difference in images displayed in vtkImageViewer2 and vtkResliceImageViewer In-Reply-To: References: Message-ID: <1505912965980-0.post@n5.nabble.com> Hi, More adetails about the question In case of the vtkResliceImageViewer, while connecting the dicom reader with vtkResliceImageViewer with the api vtkResliceImageViewer ->SetInputData(m_vtkDcmRdr->GetOutput()); getting the distorted image display. while connecting with vtkResliceImageViewer ->SetInputConnection(vtkDICOMReader ->GetOutputPort()); vtk showing error message "Use SetInputData instead.", but the images displaying properly as like as vtkImageViewer2 In case of vtkImageViewer2, both connections with the api vtkImageViewer2 ->SetInputData(m_vtkDcmRdr->GetOutput()); and vtkImageViewer2 ->SetInputConnection(vtkDICOMReader ->GetOutputPort()); giving same result and no error message. Now, vtkResliceImageViewer displaying properly as like as vtkImageViewer2 while using SetInputConnection, but the vtk error message "Use SetInputData instead." is there. Can avoid this by down casting vtkResliceImageViewer? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From weiherer.maximilian at gmx.de Wed Sep 20 09:47:03 2017 From: weiherer.maximilian at gmx.de (Maximilian Weiherer) Date: Wed, 20 Sep 2017 15:47:03 +0200 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold In-Reply-To: References: <000601d330aa$33dd48b0$9b97da10$@gmx.de> Message-ID: An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Sep 20 09:47:37 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 20 Sep 2017 09:47:37 -0400 Subject: [vtkusers] Problem with Data in VTK In-Reply-To: <913677972.2875107.1505876925682@mail.yahoo.com> References: <1855612015.339072.1505497670459.ref@mail.yahoo.com> <1855612015.339072.1505497670459@mail.yahoo.com> <2062885293.783548.1505580187721@mail.yahoo.com> <913677972.2875107.1505876925682@mail.yahoo.com> Message-ID: Your options are: 1) manually move/rename the md5 files one by one (I don't recommend this) 2) build vtk and let cmake rename/move the files automatically (not too hard) 3) download and use the zipped up package of 8.0.1 data files I created with 1 and posted in my last email (very very easy): https://data.kitware.com/api/v1/file/59c1aeec8d777f7d33e9d4f8/download David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Sep 19, 2017 at 11:08 PM, Jennifer Lee wrote: > Hello, > Thanks so much for taking time to work on this. I didn't build using > VTK_DATA. I found that there are some MD5 files related to data files in > the following directory: C:\VTK\VTK-8.0.1\Testing\Data. > > Suppose if I want to run Tcl files in Medical directory, I have MD5 files > as follows: > > C:\VTK\VTK-8.0.1\Testing\Data\headsq\quarter.1.md5 > C:\VTK\VTK-8.0.1\Testing\Data\headsq\quarter.2.md5 > C:\VTK\VTK-8.0.1\Testing\Data\headsq\quarter.3.md5 > C:\VTK\VTK-8.0.1\Testing\Data\headsq\quarter.3.md5 > : > : > : > > How to work with these MD5 files if I don't configure with VTK_DATA in > CMake. > Thanks again in advance. > > Regards, > Jennifer > > > > > On Tuesday, September 19, 2017 5:02 PM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > Sorry for the frustration Jennifer. > > This is what I've done for demonstration. > download VTK-8.0.1.zip to c:\tmp\foo > download VTKData-8.0.1.zip into to c:\tmp\foo > unzip both > c:\tmp\foo now contains VTK-8.0.1 > c:\tmp\foo\VTK-8.0.1 contains CMakeLists.txt, a bunch of other source code > files, and a .ExternalData directory with all those md5's under it. > > In a vs2013 x64 native tools command prompt (from visual studio community) > I: > > make a build directory "c:\tmp\foo\build" and cd into it > > I run cmake -G Ninja ..\VTK-8.0.1 and let cmake configure the build files. > Then I run ninja to compile from the command line (presumably I could have > skipped -G Ninja above and then used visual studio ide intead but that's > slower). > > The build starts off with a whole bunch of lines like this: > C:\tmp\foo\build>nmake > [1/6225] Generating C:/tmp/foo/build/ExternalData/ > Testing/Data/ex-blow_5/ex-blow_5_1_2.vtu > -- Found object: "C:/tmp/foo/VTK-8.0.1/.ExternalData/MD5/ > 84001730339b29750bee19f1b4af52ef" > [2/6225] Generating C:/tmp/foo/build/ExternalData/ > Testing/Data/ex-blow_5/ex-blow_5_0_6.vtu > -- Found object: "C:/tmp/foo/VTK-8.0.1/.ExternalData/MD5/ > 3a5df717510b2b8f59e5c16dc91ff067" > [3/6225] Generating -- Found object: > ... > > Meaning that it is making those links we spoke about to the md5 files. If > I had skipped download unzip of VTKData-8.0.1.zip it would have instead > downloaded each of the files instead of finding them. > > When it is done, VTK_DATA_ROOT should be c:/tmp/foo/build/ExternalData/Testing > in my case as that is where the files end up. > > To make it simpleer I've pushed a zipped up copy of what I've made above > to: > https://data.kitware.com/api/v1/file/59c1aeec8d777f7d33e9d4f8/download > > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > > Clifton Park, NY 12065 > > -8662 > Phone: 518-881-4909 <(518)%20881-4909> > > On Sat, Sep 16, 2017 at 12:43 PM, Jennifer Lee > wrote: > > Hi, > I don't have any ExternalData/Testing file. I'm using VTK. Could you > let me know what I'm missing? All I've is some MD5 data under the following > directory:C:\VTK\VTK-8.0.1\ Testing\Data. > When I downloaded VTKData, it looks all encrypted as follows: > > > 00b6935d399b80e4f9edc1414a4c36 3f > 00ba7d9399c914edb4a6faa0b10ae7 e5 > 00d2efba0581fb7d436bcc45a9aced cb > > I really don't understand what I am missing and how to solve the > problem. > Any help will be highly appreciated. I used VTK in 2013. I never > encountered this problem. That time I could use the data directly. And I > just needed to set VTK_DATA_ROOT. I'm confused with MD5 files and encrypted > VTKData. I just need to know how I can find the original data. > Any clarification will be highly appreciated. > > Regards, > Jennifer > > > On Friday, September 15, 2017 11:03 AM, Shawn Waldon < > shawn.waldon at kitware.com> wrote: > > > Hi Jennifer, > > Try looking inside ExternalData/Testing inside your ParaView build > directory. This folder should contain the data files with their original > filenames rather than the MD5s (or symlinks/shortcuts to the data to save > disk space but should work the same). > > HTH, > Shawn > > On Fri, Sep 15, 2017 at 1:47 PM, Jennifer Lee via vtkusers < > vtkusers at vtk.org> wrote: > > Hi, > I've the following directory: C:\VTK\VTK-8.0.1\Testing\ External; This > contains the following two files: CMakeLists and CMakeConfig.cmake. > > > I don't have any C:\VTK\VTK-8.0.1\ExternalData\ Testing. > I've also attached some screenshots of some directories just if you > need for further clarification. > > I really don't understand what I'm missing and why it should be so > complication to work with current data. Any help will be highly appreciated. > > Regards, > Jennifer > > > > > On Thursday, September 14, 2017 3:20 PM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > What is in C:\VTK\VTK-8.0.1\ ExternalData\Testing? > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > > Clifton Park, NY 12065 > > -8662 > Phone: 518-881-4909 > > On Thu, Sep 14, 2017 at 5:22 PM, Jennifer Lee > wrote: > > Hi, > Thanks for the reply. I downloaded the data and set the VTK_DATA_ROOT > to *C:\VTK\VTKData.* > * Actually that's what I used to do before. I never built VTKData > project. How to do that? I believe the source will be **C:\VTK\VTKData; > but which one will be the build directory?* > * Please let me know.* > * I've built the VTK project with BUILD_TESTING on. This generated data > to the following directory: * > > * C:\VTK\VTK-8.0.1\Testing\Data\ headsq. But these are all MD5 files and > if VTK_DATA_ROOT is pointed there, it can't find these files.* > > * Any clarification will be highly appreciated. * > > *Regards,* > > *Jennifer* > > > On Wednesday, September 13, 2017 11:15 PM, Jon Haitz Legarreta < > jhlegarreta at vicomtech.org> wrote: > > > Hi Jennifer, > what does your C:\VTK\VTKData directory contain? Have you built the > VTKData project? You must build that project so that the actual testing > data files are retrieved. > > HTH, > JON HAITZ > > > -- > > > On 14 September 2017 at 07:58, Jennifer Lee via vtkusers > wrote: > > Hello, > Still I could not make it work. Setting VTK_DATA_ROOT to > ?C:\VTK\VTK-8.0.1\ ExternalData\Testing? didn?t work for me. It can?t find > the data. > > I have separate source and build: > Source is : C:\VTK\VTK-8.0.1 > Build is: C:\VTK\VTK-bin > Data is: C:\VTK\VTKData > > As I also built with TESTING_ON; so, I?ve MD5 files under Testing > directory. *C:\VTK\VTK-8.0.1\Testing.* > > I tried to run the tcl script Medical1.tcl. If I set the data root to ? > *C:\VTK\VTK-8.0.1\Testing?*, it can?t find the data (I think because > these are MD5 files). If I set the data root to *C:\VTK\VTKData*, it also > does not work. > > I need help to fix the problem. > Thanks! > > Regards, > Jennifer > > > On Wednesday, September 13, 2017 7:58 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee > wrote: > > Hello, > Thanks so much for the reply. > > Please ignore my poor knowledge. I?m really having trouble in > understanding. > > > No worries, this confuses lots of people including me. > > > I?ve data in the following directory: > > C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, the files look > like something below: > > 00b6935d399b80e4f9edc1414a4c36 3f > 00ba7d9399c914edb4a6faa0b10ae7 e5 > 00d2efba0581fb7d436bcc45a9aced cb > 00d49b1746f315992fac476892c681 ae > : > : > : > : > I really don?t understand what they mean. It seems to me these are some > encrypted names which need to be decrypted. I don?t know how to do that. > > > These are checksums of the real data files. Cmake and git know that they > have to download a different file whenever the data file's checksum doesn't > agree with the above. > > > I built with TESTING_ON, now data are available in the ?Testing? directory > too. Suppose I?d like to run the Medical examples. Now, data is available > in the following directory: > > > *C:\VTK\VTK-8.0.1\Testing\Data\ headsq* > > With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing > > But these are all MD5 files. So the following line of the code does not > find the data: > > *v16 SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/ quarter".* > > Please help me how to make things work. If I've missed any step, please > let me know. > Thanks in advance. > > Where is you build directory? I highly recommend always keeping your VTK > source directory and your VTK build directory separate. > > Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT > to C:\VTK\VTK-8.0.1\ExternalData\ Testing. This is where the data file > links are. The real data files are elsewhere in files with MD5 names, but > for all intents and purposes the data link files that refer to them work as > if they were the read data files. > > > > Regards, > Jennifer > > > > > On Tuesday, September 12, 2017 9:32 AM, David E DeMarle < > dave.demarle at kitware.com> wrote: > > > We changed the structure of regression test data in 6.1 to allow > developers to make proposed changes to code and data concurrently and > ensure that the continuous integration test machines do not fail when they > run new tests on old data. > > The net result is that a VTK build tree has test data files that are > actually symbolic links to the md5 files which live elsewhere. You can > generally open and use the symbolic links exactly as you would a normal > data file. If you turn on testing in your build, cmake will try to download > each one of the files. Alternatively you can untar the source and data > packages for a release in the same directory and the default build setup > will use them and avoid downloading anything else. > > > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > > Clifton Park, NY 12065 > > -8662 > Phone: 518-881-4909 > > On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers < > vtkusers at vtk.org> wrote: > > Hello, > I used VTK in 2013. After that, I installed VTK after more than 4 > years. I found some changes in Data in the latest version. How to make > those MD5 files work? Please let me know. I didn't find much > documentation. I'm really having problem with this. > Thanks in advance! > > Regards, > Jennifer. > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > > > > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > > > > > ______________________________ _________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ > FAQ > > Search the list archives at: http://markmail.org/search/?q= vtkusers > > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/ mailman/listinfo/vtkusers > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From weiherer.maximilian at gmx.de Wed Sep 20 09:55:42 2017 From: weiherer.maximilian at gmx.de (Maximilian Weiherer) Date: Wed, 20 Sep 2017 15:55:42 +0200 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold In-Reply-To: <2C422EA0-C6A5-4BE7-A17B-D8E8B1DC91A2@kitware.com> References: <2C422EA0-C6A5-4BE7-A17B-D8E8B1DC91A2@kitware.com> Message-ID: An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Sep 20 10:03:01 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 20 Sep 2017 10:03:01 -0400 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold In-Reply-To: References: <2C422EA0-C6A5-4BE7-A17B-D8E8B1DC91A2@kitware.com> Message-ID: Instead of using Append, can you use one of the booleans and use the UNION operator? On Wed, Sep 20, 2017 at 9:55 AM, Maximilian Weiherer wrote: > Hi T.J., > > I have just tested your branch - unfortunally it still doesn't work. Before > appending the two meshes, both are manifold and everything seems perfect but > after appending a lot of cells are not manifold anymore... . I still don't > have a suitable solution... > > Best regards > Maximilian > > Gesendet: Montag, 18. September 2017 um 15:00 Uhr > Von: "TJ Corona" > An: "Maximilian Weiherer" > Cc: vtkusers at vtk.org > Betreff: Re: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is > not manifold > Hi Maximilian, > > I have just recently worked on making the output from > vtkBooleanOperationPolyDataFilter more robust to numerical errors implicit > in the Delaunay2D algorithm. Would you mind trying this branch and seeing if > it helps? > > Sincerely, > T.J. > > Thomas J. Corona, Ph.D. > Kitware, Inc. > Senior R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4443 > > > On Sep 18, 2017, at 5:08 AM, Maximilian Weiherer > wrote: > > Hi everyone, > > I'm struggling with the vtkBooleanOperationPolyDataFilter. First, I'm > computing the difference D between two vtkPolyData objects, say A and B > (this is D := {A\B}). After that, I want to append the resulting difference > D to B, i.e. make the union of these two meshes. Therefore, I'm using the > vtkAppendPolyData filter. However, the final result is not manifold (which > is necessary in order to print the mesh). I also tried the > vtkBooleanOperationPolyDataFilter with the union operation but the problem > still remains - the final result is not manifold and therefore not > printable. How can I append these two meshes so that these are manifold and > thus watertight (and printable)? > > Any help would be appreciated. Thanks! > > Best regards > Maximilian > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Wed Sep 20 10:05:59 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 20 Sep 2017 10:05:59 -0400 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold In-Reply-To: References: <2C422EA0-C6A5-4BE7-A17B-D8E8B1DC91A2@kitware.com> Message-ID: Oops, I just read your original email and you have already tried UNION. Can you share your data? Bill On Wed, Sep 20, 2017 at 10:03 AM, Bill Lorensen wrote: > Instead of using Append, can you use one of the booleans and use the > UNION operator? > > > On Wed, Sep 20, 2017 at 9:55 AM, Maximilian Weiherer > wrote: >> Hi T.J., >> >> I have just tested your branch - unfortunally it still doesn't work. Before >> appending the two meshes, both are manifold and everything seems perfect but >> after appending a lot of cells are not manifold anymore... . I still don't >> have a suitable solution... >> >> Best regards >> Maximilian >> >> Gesendet: Montag, 18. September 2017 um 15:00 Uhr >> Von: "TJ Corona" >> An: "Maximilian Weiherer" >> Cc: vtkusers at vtk.org >> Betreff: Re: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is >> not manifold >> Hi Maximilian, >> >> I have just recently worked on making the output from >> vtkBooleanOperationPolyDataFilter more robust to numerical errors implicit >> in the Delaunay2D algorithm. Would you mind trying this branch and seeing if >> it helps? >> >> Sincerely, >> T.J. >> >> Thomas J. Corona, Ph.D. >> Kitware, Inc. >> Senior R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4443 >> >> >> On Sep 18, 2017, at 5:08 AM, Maximilian Weiherer >> wrote: >> >> Hi everyone, >> >> I'm struggling with the vtkBooleanOperationPolyDataFilter. First, I'm >> computing the difference D between two vtkPolyData objects, say A and B >> (this is D := {A\B}). After that, I want to append the resulting difference >> D to B, i.e. make the union of these two meshes. Therefore, I'm using the >> vtkAppendPolyData filter. However, the final result is not manifold (which >> is necessary in order to print the mesh). I also tried the >> vtkBooleanOperationPolyDataFilter with the union operation but the problem >> still remains - the final result is not manifold and therefore not >> printable. How can I append these two meshes so that these are manifold and >> thus watertight (and printable)? >> >> Any help would be appreciated. Thanks! >> >> Best regards >> Maximilian >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From m.nunes at fratoria.com Wed Sep 20 10:09:18 2017 From: m.nunes at fratoria.com (Miguel Nunes) Date: Wed, 20 Sep 2017 16:09:18 +0200 Subject: [vtkusers] A simple and efficient histogram class? In-Reply-To: References: Message-ID: <7e557fa8-acdc-b730-1312-57f537d57bd1@fratoria.com> Hello, I would like to ask this list about histograms in VTK c++. I have been a vtk user for several years, but never had the need to use histograms through vtk as I was using pure c++ and openGL. Now, I would like to simply plot a basic histogram of a float 3d image. I have taken a look at the examples provided but I find myself quite confused. Honestly, for an advanced visualization toolkit I am quite surprised to find it so complicated. There are classes such as vtkPlot that allow bars, then there is vtkBarChartActor, vtkImageAccumulate, vtkXYPlotActor, vtkImageHistogramStatistics and vtkImageHistogram. It all needs to be remixed, connected and many properties have to be set manually. Maybe I am missing a class (or the point), but in general terms I would like to easily plot and render a simple histogram, like: myHistogram->setData( vtkImagaData *) myHistogram->setXRange(range[2]) // clips values under and above the range specified myHistogram->setNumberOfBins(15) // calculates the bin width and each bins' Y myHistogram->update() //generate the whole thing renderer->getActor()->setData(myHistogram) ...and then its done. Any chance this actually exist? Thank you very much! From weiherer.maximilian at gmx.de Wed Sep 20 10:20:49 2017 From: weiherer.maximilian at gmx.de (Maximilian Weiherer) Date: Wed, 20 Sep 2017 16:20:49 +0200 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter - final result is not manifold In-Reply-To: References: <2C422EA0-C6A5-4BE7-A17B-D8E8B1DC91A2@kitware.com> Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: boolOp.stl Type: application/octet-stream Size: 43544 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vtkExperimentBooleanOperations.cxx URL: From david.gobbi at gmail.com Wed Sep 20 11:14:47 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 20 Sep 2017 09:14:47 -0600 Subject: [vtkusers] A simple and efficient histogram class? In-Reply-To: <7e557fa8-acdc-b730-1312-57f537d57bd1@fratoria.com> References: <7e557fa8-acdc-b730-1312-57f537d57bd1@fratoria.com> Message-ID: Hi Miguel, I think you listed all the histogram classes. The simplest is vtkImageHistogram, e.g. https://gitlab.kitware.com/vtk/vtk/blob/master/Imaging/Core/Testing/Cxx/ ImageHistogram.cxx Rather than producing a plot, per se, it produces the histogram as an image. It's basic interface is: SetNumberOfBins(15) SetBinSpacing(1.0) SetBinOrigin(0.0) So you would need to compute the "BinSpacing" from your desired range. The "BinOrigin" is simply the lower end of the range. As well as producing an image of the histogram, it has a GetHistogram() method for getting the histogram as an array. - David On Wed, Sep 20, 2017 at 8:09 AM, Miguel Nunes wrote: > Hello, > I would like to ask this list about histograms in VTK c++. I have been a > vtk > user for several years, but never had the need to use histograms through > vtk > as I was using pure c++ and openGL. > Now, I would like to simply plot a basic histogram of a float 3d image. I > have taken a look at the examples provided but I find myself quite > confused. > Honestly, for an advanced visualization toolkit I am quite surprised to > find > it so complicated. There are classes such as vtkPlot that allow bars, then > there is vtkBarChartActor, vtkImageAccumulate, vtkXYPlotActor, > vtkImageHistogramStatistics and vtkImageHistogram. > > It all needs to be remixed, connected and many properties have to be set > manually. > > Maybe I am missing a class (or the point), but in general terms I would > like > to easily plot and render a simple histogram, like: > > myHistogram->setData( vtkImagaData *) > myHistogram->setXRange(range[2]) // clips values under and above the > range specified > myHistogram->setNumberOfBins(15) // calculates the bin width and each > bins' Y > myHistogram->update() //generate the whole thing > renderer->getActor()->setData(myHistogram) > > ...and then its done. > > Any chance this actually exist? Thank you very much! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Wed Sep 20 11:43:46 2017 From: lasso at queensu.ca (Andras Lasso) Date: Wed, 20 Sep 2017 15:43:46 +0000 Subject: [vtkusers] A simple and efficient histogram class? In-Reply-To: References: <7e557fa8-acdc-b730-1312-57f537d57bd1@fratoria.com> Message-ID: You can find higher-level widgets like this in CTK. For example, http://www.commontk.org/index.php/Documentation/ctkTransferFunctionWidget. Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of David Gobbi Sent: Wednesday, September 20, 2017 11:15 AM To: Miguel Nunes Cc: VTK Users Subject: Re: [vtkusers] A simple and efficient histogram class? Hi Miguel, I think you listed all the histogram classes. The simplest is vtkImageHistogram, e.g. https://gitlab.kitware.com/vtk/vtk/blob/master/Imaging/Core/Testing/Cxx/ImageHistogram.cxx Rather than producing a plot, per se, it produces the histogram as an image. It's basic interface is: SetNumberOfBins(15) SetBinSpacing(1.0) SetBinOrigin(0.0) So you would need to compute the "BinSpacing" from your desired range. The "BinOrigin" is simply the lower end of the range. As well as producing an image of the histogram, it has a GetHistogram() method for getting the histogram as an array. - David On Wed, Sep 20, 2017 at 8:09 AM, Miguel Nunes > wrote: Hello, I would like to ask this list about histograms in VTK c++. I have been a vtk user for several years, but never had the need to use histograms through vtk as I was using pure c++ and openGL. Now, I would like to simply plot a basic histogram of a float 3d image. I have taken a look at the examples provided but I find myself quite confused. Honestly, for an advanced visualization toolkit I am quite surprised to find it so complicated. There are classes such as vtkPlot that allow bars, then there is vtkBarChartActor, vtkImageAccumulate, vtkXYPlotActor, vtkImageHistogramStatistics and vtkImageHistogram. It all needs to be remixed, connected and many properties have to be set manually. Maybe I am missing a class (or the point), but in general terms I would like to easily plot and render a simple histogram, like: myHistogram->setData( vtkImagaData *) myHistogram->setXRange(range[2]) // clips values under and above the range specified myHistogram->setNumberOfBins(15) // calculates the bin width and each bins' Y myHistogram->update() //generate the whole thing renderer->getActor()->setData(myHistogram) ...and then its done. Any chance this actually exist? Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Wed Sep 20 11:44:31 2017 From: kor1581 at gmail.com (K O ranjith) Date: Wed, 20 Sep 2017 21:14:31 +0530 Subject: [vtkusers] Difference in images displayed in vtkImageViewer2 and vtkResliceImageViewer In-Reply-To: References: Message-ID: Hello, Thanks for the support. As I mentioned in my question I have tried to set the window level and width from the dicom metadata to both the viewer?s using the api s m_vtkImViewer->SetColorLevel(dDefaultWinWidth); m_vtkImViewer->SetColorWindow(dDefaultWinLevel); but the result from vtkResliceImageViewer is different than other viewers, ie vtkImageViewer2 and other dicom viewer applications. While connecting the vtkResliceImageViewer with vtkDICOMReader with api ?SetInputData??, have . So I tried with the method vtkResliceImageViewer->SetInputConnection(vtkDICOMReader ->GetOutputPort());, then vtk showing error message "Use SetInputData instead.", but the images are displaying image almost same as (but not exact )other viewers. But then also, while setting the window level and width from to the default value in the dicom metadata, the image display again getting distorted. But the vtkImageViewer2 have same proper result all the time. I used 2d dicom images for testing. Why this happening? What are the basic difference in both vtk viewers in displaying images and setting window level and width? On Wed, Sep 20, 2017 at 6:23 PM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > The difference in the two images seems to be window width and level. > Ensure that the values are same in the vtkImageResliceViewer. > ? > > On Wed, Sep 20, 2017 at 7:37 AM K O ranjith wrote: > >> Hello, >> While displaying same dicom images in vtkResliceImageViewer and >> vtkImageViewer2, it showing images with a different window level and window >> width. >> I also tried to get the window level and window width values from dicom >> metadata and set in both the viewers. Then the vtkImageViewer2 giving same >> result as like other dicom viewer applications(like RadiAnt), but >> vtkResliceImageViewer showing a differnt result from others. >> I need to use vtkResliceImageViewer in my application. >> why images displaying in different manner in vtkResliceImageViewer and >> vtkImageViewer2? >> Can get the same result with vtkResliceImageViewer as like >> vtkImageViewer2? >> Do need to perform any configuration in vtkResliceImageViewer? >> >> (Attached the screenshot of screens displayed same dicom image with >> vtkResliceImageViewer and vtkImageViewer2) >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/ >> opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Wed Sep 20 11:50:06 2017 From: kor1581 at gmail.com (K O ranjith) Date: Wed, 20 Sep 2017 21:20:06 +0530 Subject: [vtkusers] Draw line with vtk In-Reply-To: References: Message-ID: Hi, I'm using vtkImageViewer2 for rendering both image and line and custom vtkInteractorStyleImage for event handling. In this case how o set the set the display position Z coordinate to 0. Actually I don?t know in which vtk object need to set display position Z coordinate. In renderer or in vtkLineRepresentation? Thanks On Wed, Sep 20, 2017 at 6:21 PM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > Hi, > > The issue is that vtkLineRepresentation is a 3D representation; whereas > vtkDistanceWidget and vtkAngleWidget have 2D counterparts. > A workaround would be to add an observer to the InteractionEvent and > explicitly set the display position Z coordinate to 0. > > Hope that helps. > > Thanks, > Sankhesh > ? > > On Wed, Sep 20, 2017 at 12:18 AM K O ranjith wrote: > >> Hello, >> I used vtkLineWidget2 to draw the lines. >> I'm using a vtkImageViewer2 for displaying dicom images and the lines >> should be rendered over the images . >> But vtkLineWidget2 lines are rendering below the image displayed in the >> vtkImageViewer2. >> I need to render the lines over the displayed image, have any solution >> for this?, have any method to control the rendering order(like bottom to >> top)? >> I also using vtkAngleWidget and vtkDistanceWidget, but these are >> displaying above the image, only vtkLineWidget2 (and vtkLineWidget) >> have the issue. >> please help.... >> (attached screenshot of the viewer, line rendered is marked inside the >> red circle) >> >> On Mon, Sep 18, 2017 at 5:50 PM, Sankhesh Jhaveri < >> sankhesh.jhaveri at kitware.com> wrote: >> >>> Hi, >>> >>> vtkLineWidget2 follows the new widget <-> representation model of >>> widgets in VTK; where the representation determines how the widget is drawn >>> on screen and the widget is responsible for interactions with the >>> representation. >>> >>> Hope that helps. >>> Sankhesh >>> ? >>> >>> On Mon, Sep 18, 2017 at 6:36 AM K O ranjith wrote: >>> >>>> Hello, >>>> Thanks very much for the help. >>>> What is the difference between vtk line widgets "vtkLineWidget" and >>>> "vtkLineWidget2 "? >>>> I have to draw the lines above a dicom image displayed in an >>>> vtkImageViewer2 >>>> >>>> >>>> >>>> On Fri, Sep 15, 2017 at 6:15 PM, Sankhesh Jhaveri < >>>> sankhesh.jhaveri at kitware.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> You should use the widget if you think you would like to >>>>> *interactively* place/draw and edit the line. If your goal is to just >>>>> display a line given a set of parameters and update it without interaction, >>>>> a simple cell based approach should work. See >>>>> https://lorensen.github.io/VTKExamples/site/Cxx/ >>>>> GeometricObjects/LongLine/ >>>>> >>>>> Hope that helps. >>>>> Sankhesh >>>>> ? >>>>> >>>>> On Fri, Sep 15, 2017 at 7:19 AM K O ranjith wrote: >>>>> >>>>>> Hello, >>>>>> I need to draw a couple of lines in an image viewer (vtkImageViewer2) >>>>>> for MRI slice planning application. Also should have to perform few >>>>>> operations (move, roatate)on the lines with mouse interactions and need to >>>>>> retrieve line properties (new coordinates after movement, width etc). >>>>>> I have found examples with two methods while searching >>>>>> with vtkLineWidget2 and with vtkLine >>>>>> which approach will be more suitable? >>>>>> what is the difference?have any difficulties for manipulation >>>>>> operations if use vtkLineWidget2? >>>>>> Please help >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at http://www.kitware.com/ >>>>>> opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>> -- >>>>> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >>>>> | (518) 881-4417 >>>>> ? >>>>> >>>> >>>> -- >>> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >>> | (518) 881-4417 >>> ? >>> >> >> -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Wed Sep 20 15:34:33 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 20 Sep 2017 15:34:33 -0400 Subject: [vtkusers] Deprecate VTK_RENDERING_BACKEND=OpenGL In-Reply-To: References: Message-ID: Hi all, This branch has been merged into master as of this morning. Thanks, Dan On Thu, Sep 14, 2017 at 9:07 AM, Dan Lipsa wrote: > Hi all, > > We are working to deprecate the legacy rendering backend in VTK. > > https://gitlab.kitware.com/vtk/vtk/merge_requests/3262 > > After this merge request is in, you'll get warnings if you compile > using VTK_RENDERING_BACKEND=OpenGL. > > As with other legacy features, you can silence the warnings by setting > VTK_LEGACY_SILENT=ON > > You can remove legacy features by defining > VTK_LEGACY_REMOVE=ON > In this case, you'll get an error and will be automatically switch to > VTK_RENDERING_BACKEND:STRING=OpenGL2 > > > Thanks, > Dan > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Sep 20 17:06:02 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 20 Sep 2017 17:06:02 -0400 Subject: [vtkusers] A simple and efficient histogram class? In-Reply-To: <7e557fa8-acdc-b730-1312-57f537d57bd1@fratoria.com> References: <7e557fa8-acdc-b730-1312-57f537d57bd1@fratoria.com> Message-ID: Here an example that uses vtkImageHistogram: https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageHistogram/ On Wed, Sep 20, 2017 at 10:09 AM, Miguel Nunes wrote: > Hello, > I would like to ask this list about histograms in VTK c++. I have been a vtk > user for several years, but never had the need to use histograms through vtk > as I was using pure c++ and openGL. > Now, I would like to simply plot a basic histogram of a float 3d image. I > have taken a look at the examples provided but I find myself quite confused. > Honestly, for an advanced visualization toolkit I am quite surprised to > find > it so complicated. There are classes such as vtkPlot that allow bars, then > there is vtkBarChartActor, vtkImageAccumulate, vtkXYPlotActor, > vtkImageHistogramStatistics and vtkImageHistogram. > > It all needs to be remixed, connected and many properties have to be set > manually. > > Maybe I am missing a class (or the point), but in general terms I would like > to easily plot and render a simple histogram, like: > > myHistogram->setData( vtkImagaData *) > myHistogram->setXRange(range[2]) // clips values under and above the range > specified > myHistogram->setNumberOfBins(15) // calculates the bin width and each bins' > Y > myHistogram->update() //generate the whole thing > renderer->getActor()->setData(myHistogram) > > ...and then its done. > > Any chance this actually exist? Thank you very much! > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Wed Sep 20 18:01:19 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 20 Sep 2017 18:01:19 -0400 Subject: [vtkusers] A simple and efficient histogram class? In-Reply-To: References: <7e557fa8-acdc-b730-1312-57f537d57bd1@fratoria.com> Message-ID: And here is an example that uses ImageAccumulate and produces a bar chart. https://lorensen.github.io/VTKExamples/site//Cxx/Images/ImageAccumulateGreyscale/ On Wed, Sep 20, 2017 at 5:06 PM, Bill Lorensen wrote: > Here an example that uses vtkImageHistogram: > > https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageHistogram/ > > > On Wed, Sep 20, 2017 at 10:09 AM, Miguel Nunes wrote: >> Hello, >> I would like to ask this list about histograms in VTK c++. I have been a vtk >> user for several years, but never had the need to use histograms through vtk >> as I was using pure c++ and openGL. >> Now, I would like to simply plot a basic histogram of a float 3d image. I >> have taken a look at the examples provided but I find myself quite confused. >> Honestly, for an advanced visualization toolkit I am quite surprised to >> find >> it so complicated. There are classes such as vtkPlot that allow bars, then >> there is vtkBarChartActor, vtkImageAccumulate, vtkXYPlotActor, >> vtkImageHistogramStatistics and vtkImageHistogram. >> >> It all needs to be remixed, connected and many properties have to be set >> manually. >> >> Maybe I am missing a class (or the point), but in general terms I would like >> to easily plot and render a simple histogram, like: >> >> myHistogram->setData( vtkImagaData *) >> myHistogram->setXRange(range[2]) // clips values under and above the range >> specified >> myHistogram->setNumberOfBins(15) // calculates the bin width and each bins' >> Y >> myHistogram->update() //generate the whole thing >> renderer->getActor()->setData(myHistogram) >> >> ...and then its done. >> >> Any chance this actually exist? Thank you very much! >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From sumit.gtalk at gmail.com Thu Sep 21 01:46:35 2017 From: sumit.gtalk at gmail.com (SumitShukla) Date: Wed, 20 Sep 2017 22:46:35 -0700 (MST) Subject: [vtkusers] Interaction issue with vtkBorderWidget Message-ID: <1505972795412-0.post@n5.nabble.com> I am using vtkBorderWidget with world coordinate system to enable the zoom/pan of border widget with the image, but after setting the coordinates in world coordinate system, I am no longer able to interact with the widget. I saw some other threads also where people reported similar issue, but didn't get any clear idea. Please let me know if someone has any idea of the solution or any workaround. Regards. Sumit -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From m.nunes at fratoria.com Thu Sep 21 03:45:14 2017 From: m.nunes at fratoria.com (Miguel) Date: Thu, 21 Sep 2017 00:45:14 -0700 (MST) Subject: [vtkusers] A simple and efficient histogram class? In-Reply-To: References: <7e557fa8-acdc-b730-1312-57f537d57bd1@fratoria.com> Message-ID: <1505979914315-0.post@n5.nabble.com> Dear David, Andras and Bill, thank you so much for your valuable input! Those examples were good. Some how I missed them. Best regards, Miguel -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From kor1581 at gmail.com Thu Sep 21 04:55:30 2017 From: kor1581 at gmail.com (K O ranjith) Date: Thu, 21 Sep 2017 14:25:30 +0530 Subject: [vtkusers] Difference in images displayed in vtkImageViewer2 and vtkResliceImageViewer In-Reply-To: References: Message-ID: Hi, This is the code i used for image viewer with vtkResliceImageViewer, is this ok? as per vtk class reference doc, the vtkResliceImageViewer will behave like vtkImageViewer2 , if the Reslice mode is set to RESLICE_AXIS_ALIGNED, but the setting not affecting in image display. viewwidget::viewwidget(QWidget *parent) : QWidget(parent) { QPointer m_vtkWgt = new QVTKWidget(this); vtkSmartPointer m_vtkImViewer = vtkSmartPointer::New(); QPointer m_loSinWin = new QHBoxLayout(this); vtkSmartPointer m_vtkDcmRdr m_vtkDcmRdr = vtkSmartPointer::New(); m_MetaData = vtkSmartPointer::New(); m_loSinWin->addWidget(m_vtkWgt); this->setLayout(m_loSinWin); vtkSmartPointer vtkDcmDir = vtkSmartPointer::New(); vtkSmartPointer aVtkStrFNames; QString imgFolder = QDir::currentPath()+"/sampledicom/MRIX_LUMBAR/Lumbar/3-PlaneLoc1"; vtkDcmDir->SetDirectoryName(imgFolder.toStdString().c_str()); vtkDcmDir->RequirePixelDataOn(); vtkDcmDir->Update(); // Iterate through all of the studies that are present. int iNoStudies = vtkDcmDir ->GetNumberOfStudies(); for(int i = 0; i < iNoStudies; i++) { // Get information related to the patient study //vtkDICOMItem patient = dicomdir ->GetPatientRecordForStudy(i); //vtkDICOMItem study = dicomdir ->GetStudyRecord(i); // Iterate through all of the series in this study. int j1 = vtkDcmDir ->GetFirstSeriesForStudy(i); int j2 = vtkDcmDir ->GetLastSeriesForStudy(i); for (int j = j1; j <= j2; j++) { aVtkStrFNames = vtkDcmDir->GetFileNamesForSeries(j); // do something with the files m_vtkDcmRdr ->SetFileNames(aVtkStrFNames); m_vtkDcmRdr->UpdateInformation(); m_vtkDcmRdr ->Update(); } } //m_vtkDcmRdr->SetMemoryRowOrderToFileNative(); m_vtkImViewer->SetSliceOrientationToXY(); m_vtkImViewer->SetResliceModeToAxisAligned(); m_vtkDcmRdr->Update(); m_MetaData = m_vtkDcmRdr->GetMetaData(); //m_vtkImViewer->SetInputConnection(m_vtkDcmRdr->GetOutputPort()); m_vtkImViewer->SetInputData(m_vtkDcmRdr->GetOutput()); m_vtkImViewer->SetRenderWindow(m_vtkWgt->GetRenderWindow()); double dDefaultWinWidth = m_MetaData->GetAttributeValue (0 , DC :: WindowWidth ). AsDouble () ; double dDefaultWinLevel = m_MetaData-> GetAttributeValue(0 , DC :: WindowCenter ). AsDouble () ; m_vtkImViewer->SetColorLevel(dDefaultWinWidth); m_vtkImViewer->SetColorWindow(dDefaultWinLevel); m_vtkImViewer->SetupInteractor(m_vtkWgt->GetInteractor()); m_vtkImViewer->GetRenderer()->ResetCamera(); m_vtkImViewer->Render(); m_vtkWgt->GetInteractor()->Initialize(); m_vtkWgt->show(); } On Wed, Sep 20, 2017 at 9:14 PM, K O ranjith wrote: > Hello, > > Thanks for the support. > > As I mentioned in my question I have tried to set the window level and > width from the dicom metadata to both the viewer?s using the api s > > m_vtkImViewer->SetColorLevel(dDefaultWinWidth); > > m_vtkImViewer->SetColorWindow(dDefaultWinLevel); > > but the result from vtkResliceImageViewer is different than other viewers, > ie vtkImageViewer2 and other dicom viewer applications. > > > > While connecting the vtkResliceImageViewer with vtkDICOMReader with api > ?SetInputData??, have . > > > > So I tried with the method vtkResliceImageViewer-> > SetInputConnection(vtkDICOMReader ->GetOutputPort());, then vtk showing > error message "Use SetInputData instead.", but the images are displaying > image almost same as (but not exact )other viewers. But then also, while > setting the window level and width from to the default value in the dicom > metadata, the image display again getting distorted. But the > vtkImageViewer2 have same proper result all the time. > > I used 2d dicom images for testing. > > Why this happening? What are the basic difference in both vtk viewers in > displaying images and setting window level and width? > > > > > On Wed, Sep 20, 2017 at 6:23 PM, Sankhesh Jhaveri < > sankhesh.jhaveri at kitware.com> wrote: > >> The difference in the two images seems to be window width and level. >> Ensure that the values are same in the vtkImageResliceViewer. >> ? >> >> On Wed, Sep 20, 2017 at 7:37 AM K O ranjith wrote: >> >>> Hello, >>> While displaying same dicom images in vtkResliceImageViewer and >>> vtkImageViewer2, it showing images with a different window level and window >>> width. >>> I also tried to get the window level and window width values from dicom >>> metadata and set in both the viewers. Then the vtkImageViewer2 giving same >>> result as like other dicom viewer applications(like RadiAnt), but >>> vtkResliceImageViewer showing a differnt result from others. >>> I need to use vtkResliceImageViewer in my application. >>> why images displaying in different manner in vtkResliceImageViewer and >>> vtkImageViewer2? >>> Can get the same result with vtkResliceImageViewer as like >>> vtkImageViewer2? >>> Do need to perform any configuration in vtkResliceImageViewer? >>> >>> (Attached the screenshot of screens displayed same dicom image with >>> vtkResliceImageViewer and vtkImageViewer2) >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> -- >> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >> | (518) 881-4417 >> ? >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From seb.an at icloud.com Thu Sep 21 05:45:22 2017 From: seb.an at icloud.com (Sebastian) Date: Thu, 21 Sep 2017 11:45:22 +0200 Subject: [vtkusers] Remeshing using Octree Filter Message-ID: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> Hello, I found this great article by Vincent Rivola about remeshing by using an octree filter combination, but I don?t get the right combination. He wrote: ?One of them is taking a triangulated surface as input, it creates a volume octree grid around it in a few seconds. Then I can simply compute the distance field on each point of the volume mesh in order to finaly make an iso-surface and get my remeshed shaped." https://www.linkedin.com/pulse/remeshing-using-octree-volume-mesh-vincent-rivola Unfortunately I?m didn?t get a response from him yet, so I?m trying to ask you now? Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: AAEAAQAAAAAAAAhaAAAAJGZhNDAyZmE0LTk3MTctNGRmZS05NDk3LTg2MjgzZDZmNTEyNA.png Type: image/png Size: 606149 bytes Desc: not available URL: From vincentrivola at hotmail.com Thu Sep 21 07:36:47 2017 From: vincentrivola at hotmail.com (vincentrivola) Date: Thu, 21 Sep 2017 04:36:47 -0700 (MST) Subject: [vtkusers] Remeshing using Octree Filter In-Reply-To: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> References: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> Message-ID: <1505993807683-0.post@n5.nabble.com> Hi, Thanks for your interest in this work. Where did you try to contact me? What would you like to know? Regards, -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sankhesh.jhaveri at kitware.com Thu Sep 21 08:24:32 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Thu, 21 Sep 2017 12:24:32 +0000 Subject: [vtkusers] Difference in images displayed in vtkImageViewer2 and vtkResliceImageViewer In-Reply-To: References: Message-ID: Hi, Based on the screenshots, it doesn?t seem like there is a distortion in the slice (IMO). Try setting the interactor style to vtkInteractorStyleImage and hold and drag left mouse button. This would change the window width and level. Hopefully, you?ll be able to match the display at some point and compare window values. Thanks, Sankhesh ? On Thu, Sep 21, 2017 at 4:55 AM K O ranjith wrote: > Hi, > This is the code i used for image viewer with vtkResliceImageViewer, is > this ok? > as per vtk class reference doc, the vtkResliceImageViewer will behave like > vtkImageViewer2 > , if the > Reslice mode is set to RESLICE_AXIS_ALIGNED, > but the setting not affecting in image display. > > viewwidget::viewwidget(QWidget *parent) : QWidget(parent) > { > > QPointer m_vtkWgt = new QVTKWidget(this); > > vtkSmartPointer m_vtkImViewer = > vtkSmartPointer::New(); > > QPointer m_loSinWin = new QHBoxLayout(this); > > vtkSmartPointer m_vtkDcmRdr m_vtkDcmRdr = > vtkSmartPointer::New(); > > m_MetaData = vtkSmartPointer::New(); > > m_loSinWin->addWidget(m_vtkWgt); > this->setLayout(m_loSinWin); > > vtkSmartPointer vtkDcmDir = > vtkSmartPointer::New(); > > vtkSmartPointer aVtkStrFNames; > > QString imgFolder = > QDir::currentPath()+"/sampledicom/MRIX_LUMBAR/Lumbar/3-PlaneLoc1"; > vtkDcmDir->SetDirectoryName(imgFolder.toStdString().c_str()); > vtkDcmDir->RequirePixelDataOn(); > vtkDcmDir->Update(); > // Iterate through all of the studies that are present. > int iNoStudies = vtkDcmDir ->GetNumberOfStudies(); > for(int i = 0; i < iNoStudies; i++) > { > // Get information related to the patient study > //vtkDICOMItem patient = dicomdir ->GetPatientRecordForStudy(i); > //vtkDICOMItem study = dicomdir ->GetStudyRecord(i); > // Iterate through all of the series in this study. > int j1 = vtkDcmDir ->GetFirstSeriesForStudy(i); > int j2 = vtkDcmDir ->GetLastSeriesForStudy(i); > for (int j = j1; j <= j2; j++) > { > aVtkStrFNames = vtkDcmDir->GetFileNamesForSeries(j); > // do something with the files > m_vtkDcmRdr ->SetFileNames(aVtkStrFNames); > m_vtkDcmRdr->UpdateInformation(); > m_vtkDcmRdr ->Update(); > } > } > //m_vtkDcmRdr->SetMemoryRowOrderToFileNative(); > m_vtkImViewer->SetSliceOrientationToXY(); > m_vtkImViewer->SetResliceModeToAxisAligned(); > m_vtkDcmRdr->Update(); > m_MetaData = m_vtkDcmRdr->GetMetaData(); > //m_vtkImViewer->SetInputConnection(m_vtkDcmRdr->GetOutputPort()); > > m_vtkImViewer->SetInputData(m_vtkDcmRdr->GetOutput()); > > > m_vtkImViewer->SetRenderWindow(m_vtkWgt->GetRenderWindow()); > > > double dDefaultWinWidth = m_MetaData->GetAttributeValue (0 , DC :: > WindowWidth ). AsDouble () ; > > double dDefaultWinLevel = m_MetaData-> GetAttributeValue(0 , DC :: > WindowCenter ). AsDouble () ; > > m_vtkImViewer->SetColorLevel(dDefaultWinWidth); > m_vtkImViewer->SetColorWindow(dDefaultWinLevel); > > > m_vtkImViewer->SetupInteractor(m_vtkWgt->GetInteractor()); > > m_vtkImViewer->GetRenderer()->ResetCamera(); > m_vtkImViewer->Render(); > m_vtkWgt->GetInteractor()->Initialize(); > m_vtkWgt->show(); > } > > > On Wed, Sep 20, 2017 at 9:14 PM, K O ranjith wrote: > >> Hello, >> >> Thanks for the support. >> >> As I mentioned in my question I have tried to set the window level and >> width from the dicom metadata to both the viewer?s using the api s >> >> m_vtkImViewer->SetColorLevel(dDefaultWinWidth); >> >> m_vtkImViewer->SetColorWindow(dDefaultWinLevel); >> >> but the result from vtkResliceImageViewer is different than other >> viewers, ie vtkImageViewer2 and other dicom viewer applications. >> >> >> >> While connecting the vtkResliceImageViewer with vtkDICOMReader with api >> ?SetInputData??, have . >> >> >> >> So I tried with the method vtkResliceImageViewer->SetInputConnection(vtkDICOMReader >> ->GetOutputPort());, then vtk showing error message "Use SetInputData >> instead.", but the images are displaying image almost same as (but not >> exact )other viewers. But then also, while setting the window level and >> width from to the default value in the dicom metadata, the image display >> again getting distorted. But the vtkImageViewer2 have same proper result >> all the time. >> >> I used 2d dicom images for testing. >> >> Why this happening? What are the basic difference in both vtk viewers in >> displaying images and setting window level and width? >> >> >> >> >> On Wed, Sep 20, 2017 at 6:23 PM, Sankhesh Jhaveri < >> sankhesh.jhaveri at kitware.com> wrote: >> >>> The difference in the two images seems to be window width and level. >>> Ensure that the values are same in the vtkImageResliceViewer. >>> ? >>> >>> On Wed, Sep 20, 2017 at 7:37 AM K O ranjith wrote: >>> >>>> Hello, >>>> While displaying same dicom images in vtkResliceImageViewer and >>>> vtkImageViewer2, it showing images with a different window level and window >>>> width. >>>> I also tried to get the window level and window width values from dicom >>>> metadata and set in both the viewers. Then the vtkImageViewer2 giving same >>>> result as like other dicom viewer applications(like RadiAnt), but >>>> vtkResliceImageViewer showing a differnt result from others. >>>> I need to use vtkResliceImageViewer in my application. >>>> why images displaying in different manner in vtkResliceImageViewer and >>>> vtkImageViewer2? >>>> Can get the same result with vtkResliceImageViewer as like >>>> vtkImageViewer2? >>>> Do need to perform any configuration in vtkResliceImageViewer? >>>> >>>> (Attached the screenshot of screens displayed same dicom image with >>>> vtkResliceImageViewer and vtkImageViewer2) >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>> -- >>> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >>> | (518) 881-4417 >>> ? >>> >> >> > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From seb.an at icloud.com Thu Sep 21 08:27:51 2017 From: seb.an at icloud.com (sebastianandress) Date: Thu, 21 Sep 2017 05:27:51 -0700 (MST) Subject: [vtkusers] Remeshing using Octree Filter In-Reply-To: <1505993807683-0.post@n5.nabble.com> References: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> <1505993807683-0.post@n5.nabble.com> Message-ID: <1505996871499-0.post@n5.nabble.com> Hello, thank you very much for your answer! I unconventionally contacted you via facebook, because I don't have a linkedin account :/ but now I'm glad I could reach you here! Can you maybe tell me which filter combination you used? I guess you started with the vtkTriangleFilter, followed by the vtkHyperOctree to create the distance field. But then I don't know how you created the iso-surface out of that. Thank you so much! Sebastian -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From inglis.dl at gmail.com Thu Sep 21 08:34:43 2017 From: inglis.dl at gmail.com (Dean Inglis) Date: Thu, 21 Sep 2017 08:34:43 -0400 Subject: [vtkusers] Remeshing using Octree Filter In-Reply-To: <1505993807683-0.post@n5.nabble.com> References: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> <1505993807683-0.post@n5.nabble.com> Message-ID: Hi Vincent, I am also interested in your approach to smoothing with VTK. Nice work you have posted on linked in: the rocket firing simulation was very impressive! Would you be able to post a simple example of your smoothing pipeline that could be made into an entry for the the vtk wiki examples? best regards, Dean On Thu, Sep 21, 2017 at 7:36 AM, vincentrivola wrote: > Hi, > > Thanks for your interest in this work. > Where did you try to contact me? What would you like to know? > > Regards, > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincentrivola at hotmail.com Thu Sep 21 09:01:35 2017 From: vincentrivola at hotmail.com (vincentrivola) Date: Thu, 21 Sep 2017 06:01:35 -0700 (MST) Subject: [vtkusers] Remeshing using Octree Filter In-Reply-To: References: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> <1505993807683-0.post@n5.nabble.com> Message-ID: <1505998895513-0.post@n5.nabble.com> Hi again, I don't have much time for the wiki right now since it is a very busy period. But basically here is the pipeline (as a side note I use the java wrapper for all these applications): - create an octree mesh around your surface. For this I use my own octree generator not vtkHyperOctree. If someone know how to get it directly in vtk I'm interested. - once I get my octree grid as a vtkUnstructuredGrid I loop over all the points of the mesh and use a vtkImplicitPolyDataDistance filter initialized with my original surface to get the distance between each point of the unstructured grid and the vtkPolyData. - then I can use this distance in a vtkContourFilter to get the iso-surface of distance=0. - eventually use a vtkSmoothPolyDataFilter on the output of vtkContourFilter to smooth a bit the results. That's it! pretty simple actually. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From kor1581 at gmail.com Thu Sep 21 11:03:30 2017 From: kor1581 at gmail.com (K O ranjith) Date: Thu, 21 Sep 2017 20:33:30 +0530 Subject: [vtkusers] Difference in images displayed in vtkImageViewer2 and vtkResliceImageViewer In-Reply-To: References: Message-ID: Hello, Thanks for the support, While setting vtkScalarsToColors* -> SetRange(0,1); and then set it to vtkResliceImageViewer* ->* SetLookupTable, the *vtkResliceImageViewer* giving result as other viewer. While evaluating *vtkResliceImageViewer* I noticed this api because, it?s something related to color and it is not available with vtkImageviewer2.* *Is this the correct way? what is the purpose of *vtkScalarsToColors in vtkResliceImageViewer? Thanks On Thu, Sep 21, 2017 at 5:54 PM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > Hi, > > Based on the screenshots, it doesn?t seem like there is a distortion in > the slice (IMO). > Try setting the interactor style to vtkInteractorStyleImage and hold and > drag left mouse button. This would change the window width and > level. Hopefully, you?ll be able to match the display at some point and > compare window values. > > Thanks, > Sankhesh > ? > > On Thu, Sep 21, 2017 at 4:55 AM K O ranjith wrote: > >> Hi, >> This is the code i used for image viewer with vtkResliceImageViewer, is >> this ok? >> as per vtk class reference doc, the vtkResliceImageViewer will behave >> like vtkImageViewer2 >> , if >> the Reslice mode is set to RESLICE_AXIS_ALIGNED, >> but the setting not affecting in image display. >> >> viewwidget::viewwidget(QWidget *parent) : QWidget(parent) >> { >> >> QPointer m_vtkWgt = new QVTKWidget(this); >> >> vtkSmartPointer m_vtkImViewer = >> vtkSmartPointer::New(); >> >> QPointer m_loSinWin = new QHBoxLayout(this); >> >> vtkSmartPointer m_vtkDcmRdr m_vtkDcmRdr = >> vtkSmartPointer::New(); >> >> m_MetaData = vtkSmartPointer::New(); >> >> m_loSinWin->addWidget(m_vtkWgt); >> this->setLayout(m_loSinWin); >> >> vtkSmartPointer vtkDcmDir = vtkSmartPointer< >> vtkDICOMDirectory>::New(); >> >> vtkSmartPointer aVtkStrFNames; >> >> QString imgFolder = QDir::currentPath()+"/sampledicom/MRIX_LUMBAR/ >> Lumbar/3-PlaneLoc1"; >> vtkDcmDir->SetDirectoryName(imgFolder.toStdString().c_str()); >> vtkDcmDir->RequirePixelDataOn(); >> vtkDcmDir->Update(); >> // Iterate through all of the studies that are present. >> int iNoStudies = vtkDcmDir ->GetNumberOfStudies(); >> for(int i = 0; i < iNoStudies; i++) >> { >> // Get information related to the patient study >> //vtkDICOMItem patient = dicomdir ->GetPatientRecordForStudy(i); >> //vtkDICOMItem study = dicomdir ->GetStudyRecord(i); >> // Iterate through all of the series in this study. >> int j1 = vtkDcmDir ->GetFirstSeriesForStudy(i); >> int j2 = vtkDcmDir ->GetLastSeriesForStudy(i); >> for (int j = j1; j <= j2; j++) >> { >> aVtkStrFNames = vtkDcmDir->GetFileNamesForSeries(j); >> // do something with the files >> m_vtkDcmRdr ->SetFileNames(aVtkStrFNames); >> m_vtkDcmRdr->UpdateInformation(); >> m_vtkDcmRdr ->Update(); >> } >> } >> //m_vtkDcmRdr->SetMemoryRowOrderToFileNative(); >> m_vtkImViewer->SetSliceOrientationToXY(); >> m_vtkImViewer->SetResliceModeToAxisAligned(); >> m_vtkDcmRdr->Update(); >> m_MetaData = m_vtkDcmRdr->GetMetaData(); >> //m_vtkImViewer->SetInputConnection(m_vtkDcmRdr->GetOutputPort()); >> >> m_vtkImViewer->SetInputData(m_vtkDcmRdr->GetOutput()); >> >> >> m_vtkImViewer->SetRenderWindow(m_vtkWgt->GetRenderWindow()); >> >> >> double dDefaultWinWidth = m_MetaData->GetAttributeValue (0 , DC :: >> WindowWidth ). AsDouble () ; >> >> double dDefaultWinLevel = m_MetaData-> GetAttributeValue(0 , DC :: >> WindowCenter ). AsDouble () ; >> >> m_vtkImViewer->SetColorLevel(dDefaultWinWidth); >> m_vtkImViewer->SetColorWindow(dDefaultWinLevel); >> >> >> m_vtkImViewer->SetupInteractor(m_vtkWgt->GetInteractor()); >> >> m_vtkImViewer->GetRenderer()->ResetCamera(); >> m_vtkImViewer->Render(); >> m_vtkWgt->GetInteractor()->Initialize(); >> m_vtkWgt->show(); >> } >> >> >> On Wed, Sep 20, 2017 at 9:14 PM, K O ranjith wrote: >> >>> Hello, >>> >>> Thanks for the support. >>> >>> As I mentioned in my question I have tried to set the window level and >>> width from the dicom metadata to both the viewer?s using the api s >>> >>> m_vtkImViewer->SetColorLevel(dDefaultWinWidth); >>> >>> m_vtkImViewer->SetColorWindow(dDefaultWinLevel); >>> >>> but the result from vtkResliceImageViewer is different than other >>> viewers, ie vtkImageViewer2 and other dicom viewer applications. >>> >>> >>> >>> While connecting the vtkResliceImageViewer with vtkDICOMReader with api >>> ?SetInputData??, have . >>> >>> >>> >>> So I tried with the method vtkResliceImageViewer->SetInputConnection(vtkDICOMReader >>> ->GetOutputPort());, then vtk showing error message "Use SetInputData >>> instead.", but the images are displaying image almost same as (but not >>> exact )other viewers. But then also, while setting the window level and >>> width from to the default value in the dicom metadata, the image display >>> again getting distorted. But the vtkImageViewer2 have same proper result >>> all the time. >>> >>> I used 2d dicom images for testing. >>> >>> Why this happening? What are the basic difference in both vtk viewers in >>> displaying images and setting window level and width? >>> >>> >>> >>> >>> On Wed, Sep 20, 2017 at 6:23 PM, Sankhesh Jhaveri < >>> sankhesh.jhaveri at kitware.com> wrote: >>> >>>> The difference in the two images seems to be window width and level. >>>> Ensure that the values are same in the vtkImageResliceViewer. >>>> ? >>>> >>>> On Wed, Sep 20, 2017 at 7:37 AM K O ranjith wrote: >>>> >>>>> Hello, >>>>> While displaying same dicom images in vtkResliceImageViewer and >>>>> vtkImageViewer2, it showing images with a different window level and window >>>>> width. >>>>> I also tried to get the window level and window width values from >>>>> dicom metadata and set in both the viewers. Then the vtkImageViewer2 giving >>>>> same result as like other dicom viewer applications(like RadiAnt), but >>>>> vtkResliceImageViewer showing a differnt result from others. >>>>> I need to use vtkResliceImageViewer in my application. >>>>> why images displaying in different manner in vtkResliceImageViewer and >>>>> vtkImageViewer2? >>>>> Can get the same result with vtkResliceImageViewer as like >>>>> vtkImageViewer2? >>>>> Do need to perform any configuration in vtkResliceImageViewer? >>>>> >>>>> (Attached the screenshot of screens displayed same dicom image with >>>>> vtkResliceImageViewer and vtkImageViewer2) >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at http://www.kitware.com/ >>>>> opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> -- >>>> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >>>> | (518) 881-4417 >>>> ? >>>> >>> >>> >> -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From denivyruck1 at gmail.com Thu Sep 21 13:01:01 2017 From: denivyruck1 at gmail.com (Denivy Ruck) Date: Thu, 21 Sep 2017 14:01:01 -0300 Subject: [vtkusers] Hiding some Glyph vectors within a vtkStructuredGrid ghost array Message-ID: Hi there! I'm currently working with vtkStructuredGrids while hiding some regions with a ghost array. However, when I set the grid's vectors and plot them with a Glyph, even the vectors belonging to the (supposedly) hidden area are shown. I tried to remove the vectors that belong to this dummy area, but the vtkDoubleArray shifts the vectors, therefore the final result (after SetVectors) will not be consistent with what I was expecting. Attached are the pictures of what I'm expecting and what I'm getting (I just changed the color of the gradients). Is there something else I need to do to hide those vectors? Thanks in advance! Denivy R?ck. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: expected.png Type: image/png Size: 78640 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: obtained.png Type: image/png Size: 76697 bytes Desc: not available URL: From bill.lorensen at gmail.com Thu Sep 21 20:04:29 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 21 Sep 2017 20:04:29 -0400 Subject: [vtkusers] Remeshing using Octree Filter In-Reply-To: <1505998895513-0.post@n5.nabble.com> References: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> <1505993807683-0.post@n5.nabble.com> <1505998895513-0.post@n5.nabble.com> Message-ID: Here are other ways to remesh. Look at these examples: https://lorensen.github.io/VTKExamples/site/Cxx/Points/ExtractSurface/ https://lorensen.github.io/VTKExamples/site/Cxx/Points/PowercrustExtractSurface/ https://lorensen.github.io/VTKExamples/site/Cxx/Points/PoissonExtractSurface/ and a compariison https://lorensen.github.io/VTKExamples/site/Cxx/Points/CompareExtractSurface/ On Thu, Sep 21, 2017 at 9:01 AM, vincentrivola wrote: > Hi again, > > I don't have much time for the wiki right now since it is a very busy > period. > But basically here is the pipeline (as a side note I use the java wrapper > for all these applications): > - create an octree mesh around your surface. For this I use my own octree > generator not vtkHyperOctree. If someone know how to get it directly in vtk > I'm interested. > > - once I get my octree grid as a vtkUnstructuredGrid I loop over all the > points of the mesh and use a vtkImplicitPolyDataDistance filter initialized > with my original surface to get the distance between each point of the > unstructured grid and the vtkPolyData. > > - then I can use this distance in a vtkContourFilter to get the iso-surface > of distance=0. > > - eventually use a vtkSmoothPolyDataFilter on the output of vtkContourFilter > to smooth a bit the results. > > That's it! pretty simple actually. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From tjlp at netease.com Thu Sep 21 22:50:12 2017 From: tjlp at netease.com (Liu_tj) Date: Fri, 22 Sep 2017 10:50:12 +0800 (CST) Subject: [vtkusers] Picking in DICOM series In-Reply-To: References: <399fced.5.15e80558c5d.Coremail.tjlp@netease.com> <450bf5aa.0.15e88ed2e6a.Coremail.tjlp@netease.com> Message-ID: <3352a264.2.15ea77e16f1.Coremail.tjlp@netease.com> Hi, Duster, Below is my code (I use a vtkpoitwidget). Not sure whether it is helpful to you. int clickpoint[2]; double pickpoint[3]; _widget->GetInteractor()->GetEventPosition(clickpoint); vtkCellPicker* picker = vtkCellPicker::New(); picker->SetTolerance(0.0005); picker->Pick(clickpoint[0], clickpoint[1], 0, _widget->GetCurrentRenderer()); picker->GetPickPosition(pickpoint); Thanks. ?2017-09-19?"Duster U" ??? -----????----- ???:"Duster U" ????:2017?09?19? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: Re: [vtkusers] Picking in DICOM series Hi, Below my code that i tried to pick the coordinates has been given.Please reply if any modifications needs to be done,or if my approach is wrong Thanks in Advance void MyVtkInteractorStyleImage::OnMouseMove() { //std::cout << "Picking pixel: " << this->Interactor->GetEventPosition()[0]<< " " << this->Interactor->GetEventPosition()[1] << std::endl; this->Interactor->GetPicker()->Pick(this->Interactor->GetEventPosition()[0], this->Interactor->GetEventPosition()[1], 0, // always zero. this->Interactor->GetRenderWindow()->GetRenderers()->GetFirstRenderer()); double pos[3]; this->Interactor->GetPicker()->GetPickPosition(pos); //std::cout << "Picked value: " << pos[0] << " " << pos[1] << " " << pos[2] << std::endl; int x = pos[0]; int y = pos[1]; std::cout << "(x,y) = (" << x << "," << y << ")" << std::endl; vtkSmartPointer coordinate = vtkSmartPointer::New(); coordinate->SetCoordinateSystemToWorld(); coordinate->SetValue(x,y,0); double* world = coordinate->GetValue(); std::cout << "World coordinate: " << world[0] << ", " << world[1] << ", " << world[2] << std::endl; // Forward events vtkInteractorStyleImage::OnMouseMove(); } On Mon, Sep 18, 2017 at 5:16 PM, Duster U wrote: Hi Liu Peng,, Thanks for the reply.Let me try the different coordinate system and will let u know if it works. Thanks On Sat, Sep 16, 2017 at 9:53 AM, Liu_tj wrote: As there are several kind of coordinate system in VTK, you need to check the check values are world, viewport, normalized viewport coordinate. Perhaps you can post your code here and the forum guys can help you. Thanks ?2017-09-15?"Duster U" ??? -----????----- ???:"Duster U" ????:2017?09?15? ??? ???:"Liu_tj" ??:"vtkusers" ??:Re: [vtkusers] Picking in DICOM series Hi Liu Peng, I have tried different dicom samples of different resolutions.When i use a sample of 320*320,the max value that i get from the picker is 150*150,and this too varies with samples.when i tried with another 320*320 sample max value that i got was 160*160. Thanks On Thu, Sep 14, 2017 at 5:50 PM, Liu_tj wrote: How do you know the values are wrong? ?2017-09-14?"Duster U" ??? -----????----- ???:"Duster U" ????:2017?09?14? ??? ???:"vtkusers" ??:[vtkusers] Picking in DICOM series Hi, I've been trying to implement a Picker in the OnMouseMove of a custom vtkinteractorstyleImage,so that i can get the pixel coordinates of an image while hovering over an image.Now I've tried both the Point Picker and the Prop Picker to do so,,both gives the coordinates but the problem is that the values are not correct.So am i missing anything? and i am new to vtk,So please help me out Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From aralol2015 at gmail.com Fri Sep 22 02:09:54 2017 From: aralol2015 at gmail.com (Duster U) Date: Fri, 22 Sep 2017 11:39:54 +0530 Subject: [vtkusers] Picking in DICOM series In-Reply-To: <3352a264.2.15ea77e16f1.Coremail.tjlp@netease.com> References: <399fced.5.15e80558c5d.Coremail.tjlp@netease.com> <450bf5aa.0.15e88ed2e6a.Coremail.tjlp@netease.com> <3352a264.2.15ea77e16f1.Coremail.tjlp@netease.com> Message-ID: Hi Liu Peng, Thanks for your support.My picker worked.The problem was that i didn't consider the pixel spacing while Picking,that's why it returned wrong values.In addition to the x-y co-ordinates is it possible to get the pixel value from the image,If so please let me know. Thanks. On Fri, Sep 22, 2017 at 8:20 AM, Liu_tj wrote: > Hi, Duster, > > Below is my code (I use a vtkpoitwidget). Not sure whether it is helpful > to you. > > int clickpoint[2]; > double pickpoint[3]; > _widget->GetInteractor()->GetEventPosition(clickpoint); > vtkCellPicker* picker = vtkCellPicker::New(); > picker->SetTolerance(0.0005); > picker->Pick(clickpoint[0], clickpoint[1], 0, > _widget->GetCurrentRenderer()); > picker->GetPickPosition(pickpoint); > > Thanks. > > ?2017-09-19?"Duster U" ??? > > -----????----- > *???:*"Duster U" > *????:*2017?09?19? ??? > *???:*"Liu_tj" > *??:*"vtkusers" > *??:*Re: Re: [vtkusers] Picking in DICOM series > > > Hi, > Below my code that i tried to pick the coordinates has been given.Please > reply if any modifications needs to be done,or if my approach is wrong > > Thanks in Advance > > > void MyVtkInteractorStyleImage::OnMouseMove() > { > //std::cout << "Picking pixel: " << this->Interactor->GetEventPosition()[0]<< > " " << this->Interactor->GetEventPosition()[1] << std::endl; > this->Interactor->GetPicker()->Pick(this->Interactor-> > GetEventPosition()[0], > this->Interactor->GetEventPosition()[1], > 0, // always zero. > this->Interactor->GetRenderWindow()-> > GetRenderers()->GetFirstRenderer()); > > double pos[3]; > this->Interactor->GetPicker()->GetPickPosition(pos); > //std::cout << "Picked value: " << pos[0] << " " << pos[1] << " " << > pos[2] << std::endl; > > int x = pos[0]; > int y = pos[1]; > std::cout << "(x,y) = (" << x << "," << y << ")" << std::endl; > vtkSmartPointer coordinate = > vtkSmartPointer::New(); > coordinate->SetCoordinateSystemToWorld(); > coordinate->SetValue(x,y,0); > double* world = coordinate->GetValue(); > std::cout << "World coordinate: " << world[0] << ", " << world[1] << > ", " << world[2] << std::endl; > > > > // Forward events > vtkInteractorStyleImage::OnMouseMove(); > > } > > > On Mon, Sep 18, 2017 at 5:16 PM, Duster U wrote: > >> Hi Liu Peng,, >> >> Thanks for the reply.Let me try the different coordinate system and will >> let u know if it works. >> >> Thanks >> >> On Sat, Sep 16, 2017 at 9:53 AM, Liu_tj wrote: >> >>> As there are several kind of coordinate system in VTK, you need to check >>> the check values are world, viewport, normalized viewport coordinate. >>> >>> Perhaps you can post your code here and the forum guys can help you. >>> >>> Thanks >>> >>> ?2017-09-15?"Duster U" ??? >>> >>> -----????----- >>> *???:*"Duster U" >>> *????:*2017?09?15? ??? >>> *???:*"Liu_tj" >>> *??:*"vtkusers" >>> *??:*Re: [vtkusers] Picking in DICOM series >>> >>> >>> Hi Liu Peng, >>> >>> I have tried different dicom samples of different resolutions.When i use a sample of 320*320,the max value that i get from the picker is 150*150,and this too varies with samples.when i tried with another 320*320 sample max value that i got was 160*160. >>> >>> >>> Thanks >>> >>> >>> On Thu, Sep 14, 2017 at 5:50 PM, Liu_tj wrote: >>> >>>> How do you know the values are wrong? >>>> >>>> >>>> >>>> ?2017-09-14?"Duster U" ??? >>>> >>>> -----????----- >>>> *???:*"Duster U" >>>> *????:*2017?09?14? ??? >>>> *???:*"vtkusers" >>>> *??:*[vtkusers] Picking in DICOM series >>>> >>>> >>>> >>>> Hi, >>>> >>>> I've been trying to implement a Picker in the OnMouseMove of a custom >>>> vtkinteractorstyleImage,so that i can get the pixel coordinates of an image >>>> while hovering over an image.Now I've tried both the Point Picker and the >>>> Prop Picker to do so,,both gives the coordinates but the problem is that >>>> the values are not correct.So am i missing anything? >>>> and i am new to vtk,So please help me out >>>> >>>> Thanks in Advance >>>> >>>> >>>> >>>> >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincentrivola at hotmail.com Fri Sep 22 04:36:57 2017 From: vincentrivola at hotmail.com (vincentrivola) Date: Fri, 22 Sep 2017 01:36:57 -0700 (MST) Subject: [vtkusers] Remeshing using Octree Filter In-Reply-To: References: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> <1505993807683-0.post@n5.nabble.com> <1505998895513-0.post@n5.nabble.com> Message-ID: <1506069417666-0.post@n5.nabble.com> Dear Bill, Indeed, these are very good examples as well. Could you tell me where did you find the horse you use in the examples? I would like to try it on my side in order to see the result I get. Regards -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From m.sambin at gmail.com Fri Sep 22 05:02:27 2017 From: m.sambin at gmail.com (Marco Sambin) Date: Fri, 22 Sep 2017 11:02:27 +0200 Subject: [vtkusers] vtkImagePlaneWidget in a web browser Message-ID: Dear VTK experts, currently I have a VTK-based Java application where I use vtkImagePlaneWidget (actually, 3 of them) to interactively reslice a volume represented by a vtkImageData instance. Everything works fine within my Java application. Now, the question is, which options do I have if I wanted to obtain the same view and interactive reslicing functionalities within a web browser? Will the ParaViewWeb library be a starting point to implement this requirement, or it is designed for a different purpose? Of course, it will be acceptable for my needs to have a VTK-based back-end (represented for instance by a VTK-based, Java-based, server-side application), making some work on behalf of the web client, and then presenting its results to the web client. However, the browser-based GUI will need to be interactive, in a very similar way as my Java application: user should be able to interactively move and rotate the reslice planes (i.e., the vtkImagePlaneWidgets) in a 3D scene, and the views (resliced images) shall update accordingly. Any hint about the feasibility of this requirement, and any pointer about a starting point will be greatly appreciated. Thanks in advance and best regards, Marco Sambin -------------- next part -------------- An HTML attachment was scrubbed... URL: From seb.an at icloud.com Fri Sep 22 05:08:01 2017 From: seb.an at icloud.com (sebastian_a) Date: Fri, 22 Sep 2017 02:08:01 -0700 (MST) Subject: [vtkusers] Remeshing using Octree Filter In-Reply-To: References: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> <1505993807683-0.post@n5.nabble.com> <1505998895513-0.post@n5.nabble.com> Message-ID: <1506071281173-0.post@n5.nabble.com> Thank you very much! Indeed I'm trying to remesh a vtkPolyData. My problem is the following: My polydata contains both, very small AND very large triangular faces. I'm trying to get a mesh with faces of equal size. Possible solutions would be: - Subdivision filter which divides till a set face size. Is there any filter out there? - Any kind of remeshing. I once wrote this , but it is slow and the result isn't really good. Is there any better approach? Thanks, Sebastian -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From seb.an at icloud.com Fri Sep 22 06:13:07 2017 From: seb.an at icloud.com (sebastian_a) Date: Fri, 22 Sep 2017 03:13:07 -0700 (MST) Subject: [vtkusers] Remeshing using Octree Filter In-Reply-To: <1506071281173-0.post@n5.nabble.com> References: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> <1505993807683-0.post@n5.nabble.com> <1505998895513-0.post@n5.nabble.com> <1506071281173-0.post@n5.nabble.com> Message-ID: <1506075187823-0.post@n5.nabble.com> I quickly wrote this handy script to iterate through a vtkPolyData and subdivide the cells till they are smaller than a given boundary. It's not very fast but maybe it could be an inspiration for a new vtk filter: def extractPolyData(polydata, idsArrayOfPoints, FieldType, inverse): #FieldType: cell = 0, point = 1 selectionNode = vtk.vtkSelectionNode() selectionNode.SetFieldType(FieldType) selectionNode.SetContentType(4) selectionNode.SetSelectionList(idsArrayOfPoints) selectionNode.GetProperties().Set(vtk.vtkSelectionNode.CONTAINING_CELLS(), 1) if inverse == True: selectionNode.GetProperties().Set(vtk.vtkSelectionNode.INVERSE(),1) selection = vtk.vtkSelection() selection.AddNode(selectionNode) extractSelection = vtk.vtkExtractSelection() extractSelection.SetInputData(0, polydata); extractSelection.SetInputData(1, selection) extractSelection.Update() selected = vtk.vtkUnstructuredGrid() selected.ShallowCopy(extractSelection.GetOutput()) extractionPolydata = vtk.vtkPolyData() extractionPolydata.SetPoints(selected.GetPoints()) extractionPolydata.SetPolys(selected.GetCells()) return extractionPolydata def remesh(polyData, boundary): # Find Large Faces largeFacePolyData = polyData smallFacePolyData = vtk.vtkPolyData() while largeFacePolyData.GetNumberOfCells() > 0: ids = vtk.vtkIdTypeArray() # IDs of cells ids.SetNumberOfComponents(1) for i in xrange(largeFacePolyData.GetNumberOfCells()): if getBoundaryOfCell(largeFacePolyData.GetCell(i)) > boundary: ids.InsertNextValue(i) smallFaces = extractPolyData(largeFacePolyData, ids, 0, True) if smallFacePolyData.GetNumberOfCells() > 0: appendFilter = vtk.vtkAppendPolyData() appendFilter.AddInputData(smallFaces) appendFilter.AddInputData(smallFacePolyData) appendFilter.Update() smallFacePolyData = appendFilter.GetOutput() else: smallFacePolyData = smallFaces # subdivide largeFaces = extractPolyData(largeFacePolyData, ids, 0, False) subdivisionFilter = vtk.vtkLinearSubdivisionFilter() subdivisionFilter.SetNumberOfSubdivisions(1) subdivisionFilter.SetInputData(largeFaces) subdivisionFilter.Update() largeFacePolyData = subdivisionFilter.GetOutput() return smallFacePolyData -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ilindsay at insigniamedical.co.uk Fri Sep 22 07:16:49 2017 From: ilindsay at insigniamedical.co.uk (ianl) Date: Fri, 22 Sep 2017 04:16:49 -0700 (MST) Subject: [vtkusers] Problems while rendering of large volumes In-Reply-To: References: <1505213602466-0.post@n5.nabble.com> Message-ID: <1506079009238-0.post@n5.nabble.com> Hi Aashish, I have managed to 'fix' this by cutting and pasting the vtkOpenGLGPUVolumeRayCastMapper::GetReductionRatio code from the old OpenGL branch, and deleting the code in the header that returns 1 for each dimension. This does not compile as-is, but the only change that is needed is to pass GL_MAX_TEXTURE_SIZE to glGetIntegerv() rather than vtkgl::MAX_3D_TEXTURE_SIZE. This seems to work fine, but is probably not the 'correct' way to sort this out. It does seem, however that the code is independent of the vtkGPUInfo class, so may be easier to fix properly than it first appears. As an aside, it looks like someone on the slicer mailing list had a similar issue, so we are not alone in having this problem. See: https://discourse.slicer.org/t/dicom-volume-rendering-max-3d-texture-size-error/1066 Hope this helps someone, Ian Lindsay. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Fri Sep 22 07:27:24 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 22 Sep 2017 07:27:24 -0400 Subject: [vtkusers] Remeshing using Octree Filter In-Reply-To: <1506069417666-0.post@n5.nabble.com> References: <00B22B68-A9CF-4A2A-9561-E305D5860EA9@icloud.com> <1505993807683-0.post@n5.nabble.com> <1505998895513-0.post@n5.nabble.com> <1506069417666-0.post@n5.nabble.com> Message-ID: The horse is here: https://github.com/lorensen/VTKExamples/blob/master/src/Testing/Data/horse.ply On Fri, Sep 22, 2017 at 4:36 AM, vincentrivola wrote: > Dear Bill, > > Indeed, these are very good examples as well. > Could you tell me where did you find the horse you use in the examples? I > would like to try it on my side in order to see the result I get. > > Regards > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From ilindsay at insigniamedical.co.uk Fri Sep 22 07:36:03 2017 From: ilindsay at insigniamedical.co.uk (ianl) Date: Fri, 22 Sep 2017 04:36:03 -0700 (MST) Subject: [vtkusers] Problems while rendering of large volumes In-Reply-To: <1506079009238-0.post@n5.nabble.com> References: <1505213602466-0.post@n5.nabble.com> <1506079009238-0.post@n5.nabble.com> Message-ID: <1506080163285-0.post@n5.nabble.com> Slight update, the constant needed is GL_MAX_3D_TEXTURE_SIZE not GL_MAX_TEXTURE_SIZE. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ilindsay at insigniamedical.co.uk Fri Sep 22 12:21:22 2017 From: ilindsay at insigniamedical.co.uk (ianl) Date: Fri, 22 Sep 2017 09:21:22 -0700 (MST) Subject: [vtkusers] Problems while rendering of large volumes In-Reply-To: <1506080163285-0.post@n5.nabble.com> References: <1505213602466-0.post@n5.nabble.com> <1506079009238-0.post@n5.nabble.com> <1506080163285-0.post@n5.nabble.com> Message-ID: <1506097282805-0.post@n5.nabble.com> Addendum number 2: it seems that I was wrong about the code being independent of vtkGPUInfo - it needs it to calculate MaxMemoryInBytes. I have solved this for now by calculating this separately and setting MaxMemoryInBytes to the correct value rather than the default of 128MB. All seems to work nicely now. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aashish.chaudhary at kitware.com Fri Sep 22 12:27:43 2017 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 22 Sep 2017 16:27:43 +0000 Subject: [vtkusers] Problems while rendering of large volumes In-Reply-To: <1506097282805-0.post@n5.nabble.com> References: <1505213602466-0.post@n5.nabble.com> <1506079009238-0.post@n5.nabble.com> <1506080163285-0.post@n5.nabble.com> <1506097282805-0.post@n5.nabble.com> Message-ID: This is good to hear. Thanks for the update. Do you want to push a patch - I would be happy to review it. - aashish On Fri, Sep 22, 2017 at 12:21 PM ianl wrote: > Addendum number 2: it seems that I was wrong about the code being > independent > of vtkGPUInfo - it needs it to calculate MaxMemoryInBytes. I have solved > this for now by calculating this separately and setting MaxMemoryInBytes to > the correct value rather than the default of 128MB. All seems to work > nicely > now. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cedilnik at inria.fr Fri Sep 22 12:39:20 2017 From: nicolas.cedilnik at inria.fr (Nicolas Cedilnik) Date: Fri, 22 Sep 2017 18:39:20 +0200 Subject: [vtkusers] Cannot import python bindings anymore: module 'dl' has no attribute 'RTLD_NOW' Message-ID: Hello, Following a reboot after some system updates, I cannot "import vtk" anymore: $ python Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:51:32) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import vtk Traceback (most recent call last): File "", line 1, in ? File "/opt/ncedilni/miniconda3.6/envs/vtscan/lib/python3.6/site-packages/vtk/__init__.py", line 38, in ??? sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) AttributeError: module 'dl' has no attribute 'RTLD_NOW' Google wasn't very helpful, so I'm posting here? I'm running Fedora 26, python 3.6 binaries with miniconda and vtk 7.1.1 installed from the conda-forge repository. How did I break my VTK install? Should I file a bug report somewhere? Thanks for your help, -- Nicolas From david.gobbi at gmail.com Fri Sep 22 13:16:33 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 22 Sep 2017 11:16:33 -0600 Subject: [vtkusers] Cannot import python bindings anymore: module 'dl' has no attribute 'RTLD_NOW' In-Reply-To: References: Message-ID: Hi Nicolas, Thanks for reporting this. The code that is raising the exception should never be executed under Python 3, since Python 3 doesn't have a "dl" module. Can you try importing the "dl" and "DLFCN" modules? Under Python 3, both should fail to load, and if they do load, then something is wrong and have to find out where Python is finding them. For example, under Python 2.7: python Python 2.7.13 (default, Feb 20 2017, 20:23:30) [GCC 4.4.7] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import dl >>> print dl.__file__ /usr/local/lib/python2.7/lib-dynload/dl.so >>> import DLFCN >>> print DLFCN.__file__ /usr/local/lib/python2.7/plat-linux2/DLFCN.pyc But under Python 3, you should see this: python3 Python 3.5.1 (v3.5.1:37a07cee5969, Dec 5 2015, 21:12:44) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import dl Traceback (most recent call last): File "", line 1, in ImportError: No module named 'dl' >>> import DLFCN Traceback (most recent call last): File "", line 1, in ImportError: No module named 'DLFCN' Let me know what the results are. - David On Fri, Sep 22, 2017 at 10:39 AM, Nicolas Cedilnik < nicolas.cedilnik at inria.fr> wrote: > Hello, > > Following a reboot after some system updates, I cannot "import vtk" > anymore: > > $ python > > Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:51:32) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux > Type "help", "copyright", "credits" or "license" for more information. > >> import vtk >>>> >>> Traceback (most recent call last): > File "", line 1, in > File "/opt/ncedilni/miniconda3.6/envs/vtscan/lib/python3.6/site-packages/vtk/__init__.py", > line 38, in > sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) > AttributeError: module 'dl' has no attribute 'RTLD_NOW' > > Google wasn't very helpful, so I'm posting here? I'm running Fedora 26, > python 3.6 binaries with miniconda and vtk 7.1.1 installed from the > conda-forge repository. > > How did I break my VTK install? > > Should I file a bug report somewhere? > > Thanks for your help, > > -- Nicolas > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rphellan2210 at gmail.com Fri Sep 22 17:04:00 2017 From: rphellan2210 at gmail.com (Renzo) Date: Fri, 22 Sep 2017 14:04:00 -0700 (MST) Subject: [vtkusers] Rotating planes Message-ID: <1506114240543-0.post@n5.nabble.com> Dear all, I want to implement rotating planes views with VTK. This means, I want to let the user choose which slice in which plane will be shown, but not only in the traditional axial, coronal, and sagittal orientations (in a 3D volume), but also in any random orientation. I am thinking about letting the user control the normal vector to the slicing plane and then also letting the user visualize 2D slices perpendicular to that normal vector. Any suggestions on how to implement this with VTK? I am thinking about constantly applying rotation transformations to the 3D volume, and then extracting the usual axial, coronal, and sagittal slices, but I was wondering if there is a faster method. Applying a transformation to the 3D volume can be quite time-consuming. Thanks, Renzo -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lee_jennifer_82 at yahoo.com Fri Sep 22 23:46:37 2017 From: lee_jennifer_82 at yahoo.com (Jennifer Lee) Date: Sat, 23 Sep 2017 03:46:37 +0000 (UTC) Subject: [vtkusers] Problem with Data in VTK In-Reply-To: References: <1855612015.339072.1505497670459.ref@mail.yahoo.com> <1855612015.339072.1505497670459@mail.yahoo.com> <2062885293.783548.1505580187721@mail.yahoo.com> <913677972.2875107.1505876925682@mail.yahoo.com> Message-ID: <1127351670.689465.1506138397854@mail.yahoo.com> Hi,?? Thanks so much again for the reply. But manually removing MD5 does not work. That's actually I just wanted to clarify. It helps me to know which files I should use. Like for the medical program, I tried to do that just by removing MD5 name?from the file. But I get the following errors: ERROR: In C:\VTK\VTK-8.0.1\IO\Image\vtkVolume16Reader.cxx, line 400 vtkVolume16Reader (0393A228): Error reading raw pgm data! My question just how to get the clean data as we used to get in the early versions of VTK. Any suggestion will be highly appreciated. Regards,Shamima On Wednesday, September 20, 2017 6:47 AM, David E DeMarle wrote: Your options are:1) manually move/rename the md5 files one by one (I don't recommend this)2) build vtk and let cmake rename/move the files automatically (not too hard)3) download and use the zipped up package of 8.0.1 data files I created with 1 and posted in my last email (very very easy): ? ?https://data.kitware.com/api/ v1/file/ 59c1aeec8d777f7d33e9d4f8/ download David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Sep 19, 2017 at 11:08 PM, Jennifer Lee wrote: Hello,??? Thanks so much for taking time to work on this.? I didn't build using VTK_DATA. I found that there are some MD5 files related to data files in the following directory: C:\VTK\VTK-8.0.1\Testing\Data. Suppose if I want to run Tcl files in Medical directory, I have MD5 files as follows: C:\VTK\VTK-8.0.1\Testing\Data\ headsq\quarter.1.md5C:\VTK\VTK-8.0.1\Testing\Data\ headsq\quarter.2.md5C:\VTK\VTK-8.0.1\Testing\Data\ headsq\quarter.3.md5C:\VTK\VTK-8.0.1\Testing\Data\ headsq\quarter.3.md5::: How to work with these MD5 files if I don't configure with VTK_DATA? in CMake.Thanks again in advance. Regards,Jennifer On Tuesday, September 19, 2017 5:02 PM, David E DeMarle wrote: Sorry for the frustration Jennifer. This is what I've done for demonstration.download VTK-8.0.1.zip to c:\tmp\foodownload VTKData-8.0.1.zip into to c:\tmp\foounzip bothc:\tmp\foo now contains VTK-8.0.1c:\tmp\foo\VTK-8.0.1 contains CMakeLists.txt, a bunch of other source code files, and a .ExternalData directory with all those md5's under it. In a vs2013 x64 native tools command prompt (from visual studio community) I: make a build directory "c:\tmp\foo\build" and cd into it I run cmake -G Ninja ..\VTK-8.0.1 and let cmake configure the build files.Then I run ninja to compile from the command line (presumably I could have skipped -G Ninja above and then used visual studio ide intead but that's slower). The build starts off with a whole bunch of lines like this:C:\tmp\foo\build>nmake [1/6225] Generating C:/tmp/foo/build/ExternalData/ Testing/Data/ex-blow_5/ex- blow_5_1_2.vtu -- Found object: "C:/tmp/foo/VTK-8.0.1/. ExternalData/MD5/ 84001730339b29750bee19f1b4af52 ef" [2/6225] Generating C:/tmp/foo/build/ExternalData/ Testing/Data/ex-blow_5/ex- blow_5_0_6.vtu -- Found object: "C:/tmp/foo/VTK-8.0.1/. ExternalData/MD5/ 3a5df717510b2b8f59e5c16dc91ff0 67" [3/6225] Generating -- Found object: ... Meaning that it is making those links we spoke about to the md5 files. If I had skipped download unzip of VTKData-8.0.1.zip it would have instead downloaded each of the files instead of finding them. When it is done, VTK_DATA_ROOT should be c:/tmp/foo/build/ExternalData/ Testing in my case as that is where the files end up. To make it simpleer I've pushed a zipped up copy of what I've made above to:https://data.kitware.com/api/ v1/file/ 59c1aeec8d777f7d33e9d4f8/ download David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 16, 2017 at 12:43 PM, Jennifer Lee wrote: Hi,?? I don't have any ExternalData/Testing file. I'm using VTK. Could you let me know what I'm missing? All I've is some MD5 data under the following directory:C:\VTK\VTK-8.0.1\ Testing\Data.? When I downloaded VTKData, it looks all encrypted as follows: ? 00b6935d399b80e4f9edc1414a4c36 3f00ba7d9399c914edb4a6faa0b10ae7 e500d2efba0581fb7d436bcc45a9aced cb ?? I really don't understand what I am missing and how to solve the problem.? Any help will be highly appreciated. I used VTK in 2013. I never encountered this problem. That time I could use the data directly. And I just needed to set VTK_DATA_ROOT. I'm confused with MD5 files and encrypted VTKData. I just need to know how I can find the original data.? Any clarification will be highly appreciated. Regards,Jennifer On Friday, September 15, 2017 11:03 AM, Shawn Waldon wrote: Hi Jennifer, Try looking inside ExternalData/Testing inside your ParaView build directory.? This folder should contain the data files with their original filenames rather than the MD5s (or symlinks/shortcuts to the data to save disk space but should work the same). HTH, Shawn On Fri, Sep 15, 2017 at 1:47 PM, Jennifer Lee via vtkusers wrote: Hi,?? I've the following directory: C:\VTK\VTK-8.0.1\Testing\ External;? This contains the following two files: CMakeLists and CMakeConfig.cmake. ?? I don't have any C:\VTK\VTK-8.0.1\ExternalData\ Testing. ?? I've also attached some screenshots of some directories just if you need for further clarification. ?? I really don't understand? what I'm missing and why it should be so complication to work with current data. Any help will be highly appreciated. Regards,Jennifer On Thursday, September 14, 2017 3:20 PM, David E DeMarle wrote: What is in?C:\VTK\VTK-8.0.1\ ExternalData\Testing? David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Sep 14, 2017 at 5:22 PM, Jennifer Lee wrote: Hi,?? Thanks for the reply. I downloaded the data and set the VTK_DATA_ROOT to C:\VTK\VTKData.??? Actually that's what I used to do before. I never built VTKData project. How to do that? I believe the source will be C:\VTK\VTKData; but which one will be the build directory??? Please let? me know.?? I've built the VTK project with BUILD_TESTING on. This generated data to the following directory:? ? C:\VTK\VTK-8.0.1\Testing\Data\ headsq. But these are all MD5 files and if VTK_DATA_ROOT is pointed there, it can't find these files. ?? Any clarification will be highly appreciated. Regards,Jennifer On Wednesday, September 13, 2017 11:15 PM, Jon Haitz Legarreta wrote: Hi Jennifer, what does your C:\VTK\VTKData directory contain? Have you built the VTKData project? You must build that project so that the actual testing data files are retrieved. HTH, JON HAITZ | | -- On 14 September 2017 at 07:58, Jennifer Lee via vtkusers wrote: Hello,???? Still I could notmake it work. Setting VTK_DATA_ROOT to ?C:\VTK\VTK-8.0.1\ ExternalData\Testing?didn?t work for me. It can?t find the data. ?I have separate source and build: Source is : C:\VTK\VTK-8.0.1Build is: C:\VTK\VTK-binData is: C:\VTK\VTKData ?As I also built with TESTING_ON; so, I?ve MD5 files underTesting directory. C:\VTK\VTK-8.0.1\Testing.?I tried to run the tcl script Medical1.tcl. If I set the ?data root to ?C:\VTK\VTK-8.0.1\Testing?, itcan?t find the data (I think because these are MD5 files). If I set the dataroot to C:\VTK\VTKData, it also does not work.?I need help?to fix the problem.Thanks!?Regards,Jennifer On Wednesday, September 13, 2017 7:58 AM, David E DeMarle wrote: On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee wrote: Hello,?? Thanks so much for the reply. Please ignore my poor knowledge. I?m really having troublein understanding. No worries, this confuses lots of people including me.? I?ve data in the following directory: C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, thefiles look like something below: 00b6935d399b80e4f9edc1414a4c36 3f00ba7d9399c914edb4a6faa0b10ae7 e500d2efba0581fb7d436bcc45a9aced cb00d49b1746f315992fac476892c681 ae::::I really don?t understand what they mean. It seems tome? these are some encrypted names whichneed to be decrypted. I don?t know how to do that. These are checksums of the real data files. Cmake and git know that they have to download a different file whenever the data file's checksum doesn't agree with the above.? I built with TESTING_ON, now data are available in the ?Testing?directory too. Suppose I?d like to run the Medical examples. Now, data isavailable in the following directory: C:\VTK\VTK-8.0.1\Testing\Data\ headsq With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing But these are all MD5 files. So the following line of thecode does not find the data: v16 SetFilePrefix?"$VTK_DATA_ROOT/Data/headsq/ quarter". Please help me how to make things work. If I've missed any step, please let me know.Thanks in advance. Where is you build directory? I highly recommend always keeping your VTK source directory and your VTK build directory separate. Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT to C:\VTK\VTK-8.0.1\ExternalData\ Testing. This is where the data file links are. The real data files are elsewhere in files with MD5 names, but for all intents and purposes the data link files that refer to them work as if they were the read data files. ? Regards,Jennifer On Tuesday, September 12, 2017 9:32 AM, David E DeMarle wrote: We changed the structure of regression test data in 6.1 to allow developers to make proposed changes to code and data concurrently and ensure that the continuous integration test machines do not fail when they run new tests on old data. The net result is that a VTK build tree has test data files that are actually symbolic links to the md5 files which live elsewhere. You can generally open and use the symbolic links exactly as you would a normal data file. If you turn on testing in your build, cmake will try to download each one of the files. Alternatively you can untar the source and data packages for a release in the same directory and the default build setup will use them and avoid downloading anything else. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers wrote: ? Hello,???? I used VTK in 2013. After that, I installed VTK after more than 4 years. I found some changes in Data in the latest version. How to make those MD5 files work? Please let me know. I didn't find much documentation.?I'm really having problem with this.???? Thanks in advance! Regards,Jennifer. ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From lee_jennifer_82 at yahoo.com Fri Sep 22 23:54:11 2017 From: lee_jennifer_82 at yahoo.com (Jennifer Lee) Date: Sat, 23 Sep 2017 03:54:11 +0000 (UTC) Subject: [vtkusers] Problem with Data in VTK In-Reply-To: References: <1855612015.339072.1505497670459.ref@mail.yahoo.com> <1855612015.339072.1505497670459@mail.yahoo.com> <2062885293.783548.1505580187721@mail.yahoo.com> <913677972.2875107.1505876925682@mail.yahoo.com> Message-ID: <1899680972.680419.1506138851995@mail.yahoo.com> Hi,?? Thanks so much again for the reply. But manually removing MD5 does not work. That's actually I just wanted to clarify. It helps me to know which files I should use. Like for the medical program, I tried to do that just by removing MD5 name?from the file. But I get the following errors: ERROR: In C:\VTK\VTK-8.0.1\IO\Image\vtkVolume16Reader.cxx, line 400 vtkVolume16Reader (0393A228): Error reading raw pgm data! My question just how to get the clean data as we used to get in the early versions of VTK. Any suggestion will be highly appreciated On Wednesday, September 20, 2017 6:47 AM, David E DeMarle wrote: Your options are:1) manually move/rename the md5 files one by one (I don't recommend this)2) build vtk and let cmake rename/move the files automatically (not too hard)3) download and use the zipped up package of 8.0.1 data files I created with 1 and posted in my last email (very very easy): ? ?https://data.kitware.com/api/ v1/file/ 59c1aeec8d777f7d33e9d4f8/ download David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Sep 19, 2017 at 11:08 PM, Jennifer Lee wrote: Hello,??? Thanks so much for taking time to work on this.? I didn't build using VTK_DATA. I found that there are some MD5 files related to data files in the following directory: C:\VTK\VTK-8.0.1\Testing\Data. Suppose if I want to run Tcl files in Medical directory, I have MD5 files as follows: C:\VTK\VTK-8.0.1\Testing\Data\ headsq\quarter.1.md5C:\VTK\VTK-8.0.1\Testing\Data\ headsq\quarter.2.md5C:\VTK\VTK-8.0.1\Testing\Data\ headsq\quarter.3.md5C:\VTK\VTK-8.0.1\Testing\Data\ headsq\quarter.3.md5::: How to work with these MD5 files if I don't configure with VTK_DATA? in CMake.Thanks again in advance. Regards,Jennifer On Tuesday, September 19, 2017 5:02 PM, David E DeMarle wrote: Sorry for the frustration Jennifer. This is what I've done for demonstration.download VTK-8.0.1.zip to c:\tmp\foodownload VTKData-8.0.1.zip into to c:\tmp\foounzip bothc:\tmp\foo now contains VTK-8.0.1c:\tmp\foo\VTK-8.0.1 contains CMakeLists.txt, a bunch of other source code files, and a .ExternalData directory with all those md5's under it. In a vs2013 x64 native tools command prompt (from visual studio community) I: make a build directory "c:\tmp\foo\build" and cd into it I run cmake -G Ninja ..\VTK-8.0.1 and let cmake configure the build files.Then I run ninja to compile from the command line (presumably I could have skipped -G Ninja above and then used visual studio ide intead but that's slower). The build starts off with a whole bunch of lines like this:C:\tmp\foo\build>nmake [1/6225] Generating C:/tmp/foo/build/ExternalData/ Testing/Data/ex-blow_5/ex- blow_5_1_2.vtu -- Found object: "C:/tmp/foo/VTK-8.0.1/. ExternalData/MD5/ 84001730339b29750bee19f1b4af52 ef" [2/6225] Generating C:/tmp/foo/build/ExternalData/ Testing/Data/ex-blow_5/ex- blow_5_0_6.vtu -- Found object: "C:/tmp/foo/VTK-8.0.1/. ExternalData/MD5/ 3a5df717510b2b8f59e5c16dc91ff0 67" [3/6225] Generating -- Found object: ... Meaning that it is making those links we spoke about to the md5 files. If I had skipped download unzip of VTKData-8.0.1.zip it would have instead downloaded each of the files instead of finding them. When it is done, VTK_DATA_ROOT should be c:/tmp/foo/build/ExternalData/ Testing in my case as that is where the files end up. To make it simpleer I've pushed a zipped up copy of what I've made above to:https://data.kitware.com/api/ v1/file/ 59c1aeec8d777f7d33e9d4f8/ download David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 16, 2017 at 12:43 PM, Jennifer Lee wrote: Hi,?? I don't have any ExternalData/Testing file. I'm using VTK. Could you let me know what I'm missing? All I've is some MD5 data under the following directory:C:\VTK\VTK-8.0.1\ Testing\Data.? When I downloaded VTKData, it looks all encrypted as follows: ? 00b6935d399b80e4f9edc1414a4c36 3f00ba7d9399c914edb4a6faa0b10ae7 e500d2efba0581fb7d436bcc45a9aced cb ?? I really don't understand what I am missing and how to solve the problem.? Any help will be highly appreciated. I used VTK in 2013. I never encountered this problem. That time I could use the data directly. And I just needed to set VTK_DATA_ROOT. I'm confused with MD5 files and encrypted VTKData. I just need to know how I can find the original data.? Any clarification will be highly appreciated. Regards,Jennifer On Friday, September 15, 2017 11:03 AM, Shawn Waldon wrote: Hi Jennifer, Try looking inside ExternalData/Testing inside your ParaView build directory.? This folder should contain the data files with their original filenames rather than the MD5s (or symlinks/shortcuts to the data to save disk space but should work the same). HTH, Shawn On Fri, Sep 15, 2017 at 1:47 PM, Jennifer Lee via vtkusers wrote: Hi,?? I've the following directory: C:\VTK\VTK-8.0.1\Testing\ External;? This contains the following two files: CMakeLists and CMakeConfig.cmake. ?? I don't have any C:\VTK\VTK-8.0.1\ExternalData\ Testing. ?? I've also attached some screenshots of some directories just if you need for further clarification. ?? I really don't understand? what I'm missing and why it should be so complication to work with current data. Any help will be highly appreciated. Regards,Jennifer On Thursday, September 14, 2017 3:20 PM, David E DeMarle wrote: What is in?C:\VTK\VTK-8.0.1\ ExternalData\Testing? David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Sep 14, 2017 at 5:22 PM, Jennifer Lee wrote: Hi,?? Thanks for the reply. I downloaded the data and set the VTK_DATA_ROOT to C:\VTK\VTKData.??? Actually that's what I used to do before. I never built VTKData project. How to do that? I believe the source will be C:\VTK\VTKData; but which one will be the build directory??? Please let? me know.?? I've built the VTK project with BUILD_TESTING on. This generated data to the following directory:? ? C:\VTK\VTK-8.0.1\Testing\Data\ headsq. But these are all MD5 files and if VTK_DATA_ROOT is pointed there, it can't find these files. ?? Any clarification will be highly appreciated. Regards,Jennifer On Wednesday, September 13, 2017 11:15 PM, Jon Haitz Legarreta wrote: Hi Jennifer, what does your C:\VTK\VTKData directory contain? Have you built the VTKData project? You must build that project so that the actual testing data files are retrieved. HTH, JON HAITZ | | -- On 14 September 2017 at 07:58, Jennifer Lee via vtkusers wrote: Hello,???? Still I could notmake it work. Setting VTK_DATA_ROOT to ?C:\VTK\VTK-8.0.1\ ExternalData\Testing?didn?t work for me. It can?t find the data. ?I have separate source and build: Source is : C:\VTK\VTK-8.0.1Build is: C:\VTK\VTK-binData is: C:\VTK\VTKData ?As I also built with TESTING_ON; so, I?ve MD5 files underTesting directory. C:\VTK\VTK-8.0.1\Testing.?I tried to run the tcl script Medical1.tcl. If I set the ?data root to ?C:\VTK\VTK-8.0.1\Testing?, itcan?t find the data (I think because these are MD5 files). If I set the dataroot to C:\VTK\VTKData, it also does not work.?I need help?to fix the problem.Thanks!?Regards,Jennifer On Wednesday, September 13, 2017 7:58 AM, David E DeMarle wrote: On Wed, Sep 13, 2017 at 2:12 AM, Jennifer Lee wrote: Hello,?? Thanks so much for the reply. Please ignore my poor knowledge. I?m really having troublein understanding. No worries, this confuses lots of people including me.? I?ve data in the following directory: C:\VTK\VTKData-8.0.1\VTK-8.0. 1\.ExternalData\MD5. Now, thefiles look like something below: 00b6935d399b80e4f9edc1414a4c36 3f00ba7d9399c914edb4a6faa0b10ae7 e500d2efba0581fb7d436bcc45a9aced cb00d49b1746f315992fac476892c681 ae::::I really don?t understand what they mean. It seems tome? these are some encrypted names whichneed to be decrypted. I don?t know how to do that. These are checksums of the real data files. Cmake and git know that they have to download a different file whenever the data file's checksum doesn't agree with the above.? I built with TESTING_ON, now data are available in the ?Testing?directory too. Suppose I?d like to run the Medical examples. Now, data isavailable in the following directory: C:\VTK\VTK-8.0.1\Testing\Data\ headsq With VTK_DATA_ROOT set to C:\VTK\VTK-8.0.1\Testing But these are all MD5 files. So the following line of thecode does not find the data: v16 SetFilePrefix?"$VTK_DATA_ROOT/Data/headsq/ quarter". Please help me how to make things work. If I've missed any step, please let me know.Thanks in advance. Where is you build directory? I highly recommend always keeping your VTK source directory and your VTK build directory separate. Assuming you've built VTK in C:\VTK\VTK-8.0.1, try setting VTK_DATA_ROOT to C:\VTK\VTK-8.0.1\ExternalData\ Testing. This is where the data file links are. The real data files are elsewhere in files with MD5 names, but for all intents and purposes the data link files that refer to them work as if they were the read data files. ? Regards,Jennifer On Tuesday, September 12, 2017 9:32 AM, David E DeMarle wrote: We changed the structure of regression test data in 6.1 to allow developers to make proposed changes to code and data concurrently and ensure that the continuous integration test machines do not fail when they run new tests on old data. The net result is that a VTK build tree has test data files that are actually symbolic links to the md5 files which live elsewhere. You can generally open and use the symbolic links exactly as you would a normal data file. If you turn on testing in your build, cmake will try to download each one of the files. Alternatively you can untar the source and data packages for a release in the same directory and the default build setup will use them and avoid downloading anything else. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Sep 9, 2017 at 7:43 PM, Jennifer Lee via vtkusers wrote: ? Hello,???? I used VTK in 2013. After that, I installed VTK after more than 4 years. I found some changes in Data in the latest version. How to make those MD5 files work? Please let me know. I didn't find much documentation.?I'm really having problem with this.???? Thanks in advance! Regards,Jennifer. ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/ mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cedilnik at inria.fr Sat Sep 23 04:03:04 2017 From: nicolas.cedilnik at inria.fr (Nicolas Cedilnik) Date: Sat, 23 Sep 2017 10:03:04 +0200 Subject: [vtkusers] Cannot import python bindings anymore: module 'dl' has no attribute 'RTLD_NOW' In-Reply-To: References: Message-ID: <19b9c110-9859-1edd-a9ac-97e4930e107c@inria.fr> Hello, Thanks for helping. > Can you try importing the "dl" and "DLFCN" modules?? Under Python 3, > both should fail to load, and if they do load, then something is wrong > and have to find out where Python is finding them. The first one imports but I can't figure out where from, and the second one doesn't import. $ ipython Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:51:32) Type 'copyright', 'credits' or 'license' for more information IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import dl In [2]: dl.__file__ --------------------------------------------------------------------------- AttributeError??????????????????????????? Traceback (most recent call last) in () ----> 1 dl.__file__ AttributeError: module 'dl' has no attribute '__file__' In [3]: import DLFCN --------------------------------------------------------------------------- ModuleNotFoundError?????????????????????? Traceback (most recent call last) in () ----> 1 import DLFCN ModuleNotFoundError: No module named 'DLFCN' I've checked if something named dl was in my variable $PYTHONPATH folders, but it isn't the case. I do have a ~/dl folder though, and the problem disappears if I rename it or don't launch the interpreter from the ~ folder. This is weird because there's not ~/dl/__init__.py or ~/dl.py I'm not sure whether this is VTK or python bug, but I've found a workaround: launch the interpreter from somewhere else than my homedir. Cheers, -- Nicolas From simakov.w at gmail.com Sat Sep 23 08:58:45 2017 From: simakov.w at gmail.com (Met@ll) Date: Sat, 23 Sep 2017 05:58:45 -0700 (MST) Subject: [vtkusers] Names of the axes of the graph Message-ID: <1506171525125-0.post@n5.nabble.com> Hi! ?an I somehow make the names of the axes of the graph as shown in the figure? Thank you! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Sat Sep 23 09:11:01 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 23 Sep 2017 07:11:01 -0600 Subject: [vtkusers] Cannot import python bindings anymore: module 'dl' has no attribute 'RTLD_NOW' In-Reply-To: <19b9c110-9859-1edd-a9ac-97e4930e107c@inria.fr> References: <19b9c110-9859-1edd-a9ac-97e4930e107c@inria.fr> Message-ID: Hi Nicholas, >From Python 3.3 onward, the __init__.py isn't needed in order for a directory to be considered a module, see PEP 420 -- Implicit Namespace Packages: https://www.python.org/dev/peps/pep-0420/ So it isn't really a bug, maybe it's more of an unwanted feature? As far as VTK is concerned, we can remove the use of "dl" from our __init__.py since it's irrelevant for Python 2.7 and Python 3.x. - David On Sat, Sep 23, 2017 at 2:03 AM, Nicolas Cedilnik wrote: > Hello, > > Thanks for helping. > > Can you try importing the "dl" and "DLFCN" modules? Under Python 3, both >> should fail to load, and if they do load, then something is wrong and have >> to find out where Python is finding them. >> > The first one imports but I can't figure out where from, and the second > one doesn't import. > > $ ipython > Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:51:32) > Type 'copyright', 'credits' or 'license' for more information > IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help. > > In [1]: import dl > > In [2]: dl.__file__ > ------------------------------------------------------------ > --------------- > AttributeError Traceback (most recent call > last) > in () > ----> 1 dl.__file__ > > AttributeError: module 'dl' has no attribute '__file__' > > In [3]: import DLFCN > ------------------------------------------------------------ > --------------- > ModuleNotFoundError Traceback (most recent call > last) > in () > ----> 1 import DLFCN > > ModuleNotFoundError: No module named 'DLFCN' > > I've checked if something named dl was in my variable $PYTHONPATH folders, > but it isn't the case. > > I do have a ~/dl folder though, and the problem disappears if I rename it > or don't launch the interpreter from the ~ folder. This is weird because > there's not ~/dl/__init__.py or ~/dl.py > > I'm not sure whether this is VTK or python bug, but I've found a > workaround: launch the interpreter from somewhere else than my homedir. > > Cheers, > > > -- Nicolas > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Sat Sep 23 15:51:13 2017 From: doug at beachmailing.com (scotsman60) Date: Sat, 23 Sep 2017 12:51:13 -0700 (MST) Subject: [vtkusers] How to extract cells and points from unstructuredGrid based on integer cell data? Message-ID: <1506196273067-0.post@n5.nabble.com> Hello. I'm a vtk newbie......and I have an unstructureGrid consisting of many different cell types and each cell has some associated integer cell data. >From the unstructureGrid I want to create a new unstructuredGrid (Cells and points) consisting of only those cells that have a particular cellData value What is the recommended strategy for achiving this goal? I'm currently pursuing a solution based on vtkThreshold - is this the right approach or is there a better onw? Thanx in advance, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Sat Sep 23 17:14:48 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 23 Sep 2017 17:14:48 -0400 Subject: [vtkusers] How to extract cells and points from unstructuredGrid based on integer cell data? In-Reply-To: <1506196273067-0.post@n5.nabble.com> References: <1506196273067-0.post@n5.nabble.com> Message-ID: These examples use vtkCellIterator. Take a look. https://cse.google.com/cse?cx=015419652359195128492:0lkxso1wcym&q=vtkcelliterator&oq=vtkcelliterator&gs_l=partner.3...1609.4638.0.7481.15.13.0.2.2.0.153.1228.8j5.13.0.gsnos%2Cn%3D13...0.3028j801764j15..1ac.1.25.partner..12.3.92.NUApzKEds0o#gsc.tab=0&gsc.q=vtkcelliterator&gsc.page=1 On Sat, Sep 23, 2017 at 3:51 PM, scotsman60 wrote: > Hello. > > I'm a vtk newbie......and I have an unstructureGrid consisting of many > different cell types and each cell has some associated integer cell data. > > From the unstructureGrid I want to create a new unstructuredGrid (Cells and > points) consisting of only those cells that have a particular cellData value > > What is the recommended strategy for achiving this goal? > > I'm currently pursuing a solution based on vtkThreshold - is this the right > approach or is there a better onw? > > > Thanx in advance, > > > Doug > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Sat Sep 23 17:16:11 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sat, 23 Sep 2017 17:16:11 -0400 Subject: [vtkusers] How to extract cells and points from unstructuredGrid based on integer cell data? In-Reply-To: References: <1506196273067-0.post@n5.nabble.com> Message-ID: This one in particular checks cell types... https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/Delaunay3DDemo/ On Sat, Sep 23, 2017 at 5:14 PM, Bill Lorensen wrote: > These examples use vtkCellIterator. Take a look. > > https://cse.google.com/cse?cx=015419652359195128492:0lkxso1wcym&q=vtkcelliterator&oq=vtkcelliterator&gs_l=partner.3...1609.4638.0.7481.15.13.0.2.2.0.153.1228.8j5.13.0.gsnos%2Cn%3D13...0.3028j801764j15..1ac.1.25.partner..12.3.92.NUApzKEds0o#gsc.tab=0&gsc.q=vtkcelliterator&gsc.page=1 > > On Sat, Sep 23, 2017 at 3:51 PM, scotsman60 wrote: >> Hello. >> >> I'm a vtk newbie......and I have an unstructureGrid consisting of many >> different cell types and each cell has some associated integer cell data. >> >> From the unstructureGrid I want to create a new unstructuredGrid (Cells and >> points) consisting of only those cells that have a particular cellData value >> >> What is the recommended strategy for achiving this goal? >> >> I'm currently pursuing a solution based on vtkThreshold - is this the right >> approach or is there a better onw? >> >> >> Thanx in advance, >> >> >> Doug >> >> >> >> -- >> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From rccm.kyoshimi at gmail.com Sun Sep 24 06:30:51 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sun, 24 Sep 2017 19:30:51 +0900 Subject: [vtkusers] Names of the axes of the graph In-Reply-To: <1506171525125-0.post@n5.nabble.com> References: <1506171525125-0.post@n5.nabble.com> Message-ID: Hi Simakov, For equation rendering as shown in attached figure, you need to introduce MathText markup, which is a subset of LaTeX. To compile VTK with support for MathText, you must turn on VTK_WRAP_PYTHON and Module_vtkRenderingMatplotlib during configuration with CMake. In coding, a pair of "$" symbols surrounding a MathType expression gives the results you desire. For example: ----- vtkSmartPointer chart = vtkSmartPointer::New(); vtkAxis *axis = chart->GetAxis(vtkAxis::BOTTOM); axis->SetTitle("$\\omega_X$"); ----- Thanks 2017-09-23 21:58 GMT+09:00 Met at ll : > Hi! > ?an I somehow make the names of the axes of the graph as shown in the > figure? > Thank you! > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From simakov.w at gmail.com Sun Sep 24 10:29:17 2017 From: simakov.w at gmail.com (Met@ll) Date: Sun, 24 Sep 2017 07:29:17 -0700 (MST) Subject: [vtkusers] Names of the axes of the graph In-Reply-To: References: <1506171525125-0.post@n5.nabble.com> Message-ID: <1506263357422-0.post@n5.nabble.com> kenichiro yoshimi, thanks for the help! I recompile VTK with VTK_WRAP_PYTHON and Module_vtkRenderingMatplotlib. But, calling the axis since you said displays "$ \ omega_X $". Maybe some other flags need to be put up? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jonathan.borduas at caboma.com Sun Sep 24 11:26:08 2017 From: jonathan.borduas at caboma.com (Jonathan Borduas) Date: Sun, 24 Sep 2017 15:26:08 +0000 Subject: [vtkusers] vtk reeb graph memory access bugs and crashes ( Gitlab Issue #16935 ) Message-ID: Hi everybody, I have been trying to use vtkReebGraph, but the frequent crash due to a corruption of the heap makes it too unstable to use. This bug might have been reported since 2013: * https://www.paraview.org/Bug/bug_relationship_graph.php?bug_id=14025&graph=relation * http://vtk.1045678.n5.nabble.com/crash-in-vtkReebGraphSimplificationFilter-td5725757.html * https://gitlab.kitware.com/vtk/vtk/issues/16935 I also read about TTK: https://topology-tool-kit.github.io/installation.html Maybe the vtkReebGraph should have a deprecated status in favor of TTK ? Best regards, Jonathan Borduas -------------- next part -------------- An HTML attachment was scrubbed... URL: From laurent.berger at univ-lemans.fr Sun Sep 24 14:59:49 2017 From: laurent.berger at univ-lemans.fr (LBerger) Date: Sun, 24 Sep 2017 11:59:49 -0700 (MST) Subject: [vtkusers] Install vtk 8.1 on raspberry pi 3 model B Message-ID: <1506279589530-0.post@n5.nabble.com> Hi, First I must sya my english is not very good and I use to work on windows. I build vtk on rapsberry (2017-09-07-raspbian-stretch). First I built vtk : cmake --build vtk [ 0%] Built target VTKData ..... [100%] Built target vtkRenderingVolumeOpenGL2 [100%] Built target vtkViewsContext2D [100%] Built target vtkViewsInfovis I want to install now : sudo cmake --build vtk --target install [ 0%] Built target VTKData [ 1%] Built target vtksys ... Linking CXX shared library CMakeFiles/CMakeRelink.dir/libvtkFiltersCore-8.1.so /usr/bin/ld: error: CMakeFiles/vtkFiltersCore.dir/vtkMassProperties.cxx.o: file too short collect2: error: ld returned 1 exit status Filters/Core/CMakeFiles/vtkFiltersCore.dir/build.make:2538?: la recette pour la cible ??Filters/Core/CMakeFiles/CMakeRelink.dir/libvtkFiltersCore-8.1.so.1?? a ?chou?e make[2]: *** [Filters/Core/CMakeFiles/CMakeRelink.dir/libvtkFiltersCore-8.1.so.1] Erreur 1 CMakeFiles/Makefile2:926?: la recette pour la cible ??Filters/Core/CMakeFiles/vtkFiltersCore.dir/preinstall?? a ?chou?e make[1]: *** [Filters/Core/CMakeFiles/vtkFiltersCore.dir/preinstall] Erreur 2 Makefile:133?: la recette pour la cible ??preinstall?? a ?chou?e make: *** [preinstall] Erreur 2 I don't understand what happens. Any help would be appreciate Thanks in advance -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From fromseattle at gmail.com Sun Sep 24 16:03:57 2017 From: fromseattle at gmail.com (fromseattle) Date: Sun, 24 Sep 2017 13:03:57 -0700 (MST) Subject: [vtkusers] Align 2D slices from vtkImageReslice and vtkCutter Message-ID: <1506283437258-0.post@n5.nabble.com> Hi, I have a volume (vtkImageData) and surface (polydata) that's extracted from the volume, so they are the same size and position in 3D space. I need to cut the volume and the surface in oblique slice and display the 2D image and contours on the same 2D view. To cut the volume, I use vtkImageReslice and call the setResliceAxis(), providing a vtkMatrix4x4 to get the 2d image slice. To cut the surface, I use vtkCutter and call the setCutFunction(), providing a vtkPlane. The problem I have is that the 2d image can be rotated in plane, but the 2d contours from vtkCutter can not handle in plane rotation, since vtkPlane only needs a normal and a point. What is the best to produce the 2d image slice and 2d contours and display them aligned in the same 2d view? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Sun Sep 24 19:31:30 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Mon, 25 Sep 2017 08:31:30 +0900 Subject: [vtkusers] Names of the axes of the graph In-Reply-To: <1506263357422-0.post@n5.nabble.com> References: <1506171525125-0.post@n5.nabble.com> <1506263357422-0.post@n5.nabble.com> Message-ID: Hi, Could you please confirm that the matplotlib module is installed for Python you use? VTK will try to find the matplotlib packages at runtime, and will disable MathText rendering if it is not installed. Regards 2017-09-24 23:29 GMT+09:00 Met at ll : > kenichiro yoshimi, thanks for the help! > I recompile VTK with VTK_WRAP_PYTHON and Module_vtkRenderingMatplotlib. > But, calling the axis since you said displays "$ \ omega_X $". > Maybe some other flags need to be put up? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From elainejiang8 at gmail.com Sun Sep 24 23:00:21 2017 From: elainejiang8 at gmail.com (elainejiang8) Date: Sun, 24 Sep 2017 20:00:21 -0700 (MST) Subject: [vtkusers] Finding world coordinates of an actor Message-ID: <1506308421508-0.post@n5.nabble.com> Hi all, I'm integrating VTK with VR software, and I am trying to use vtkPropPicker to select actors in my scene. Since I cannot use vtkRenderWindowInteractor::GetEventPosition() to retrieve the current position of my wand (VR equivalent of a mouse) because I am using an external render loop, I am not too sure how to go about getting the current position of my wand. When I print out the wand's position (I have an actor following the wand, acting as a laser), the position is always (0,0,0). I guess my specific question is: How can I retrieve the 3D world coordinates of an actor? Thanks, Elaine -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Mon Sep 25 03:27:17 2017 From: doug at beachmailing.com (scotsman60) Date: Mon, 25 Sep 2017 00:27:17 -0700 (MST) Subject: [vtkusers] How to extract cells and points from unstructuredGrid based on integer cell data? In-Reply-To: <1506196273067-0.post@n5.nabble.com> References: <1506196273067-0.post@n5.nabble.com> Message-ID: <1506324437053-0.post@n5.nabble.com> Thanks Bill!!!! I got sidetracked by another issues - I'll give this a try tomorrow. Thank-you, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Mon Sep 25 03:47:50 2017 From: doug at beachmailing.com (scotsman60) Date: Mon, 25 Sep 2017 00:47:50 -0700 (MST) Subject: [vtkusers] Problems using vtkExtractEdges with vykUnstructuredGrid, quadratic solid cell types Message-ID: <1506325670545-0.post@n5.nabble.com> Hello!!! I've been trying to render the edges of higher order tets, wedges and hexas for a few hours now and I can't seem to get it to work. If I render the grid directly or extract the free faces and render I get all of the internal edges of the higher order cells displayed - this is expected. So I did some reading and looked at some examples and came up with the following - which unfortunately draws absolutely nothing. Note that self.mesh is a vtkUnstructuredGrid, If I write this grid out and import to Paraview I can see the higher order solids drawn correctly with the internal edges hidden for all cells. meshEdges = vtk.vtkExtractEdges() meshEdges.SetInputData(self.mesh) meshEdgesAlgorithm = meshEdges.GetOutputPort() meshEdgePolyData = meshEdges.GetOutput() meshEdgeMapper = vtk.vtkDataSetMapper() #meshEdgeMapper.SetInputConnection(meshEdgesAlgorithm) meshEdgeMapper.SetInputData(meshEdgePolyData) meshEdgeMapper.Update() self.freeEdgeActor = vtk.vtkActor() self.freeEdgeActor.SetMapper(meshEdgeMapper) self.freeEdgeActor.GetProperty().SetRepresentationToWireframe() self.freeEdgeActor.GetProperty().BackfaceCullingOn() self.freeEdgeActor.GetProperty().SetDiffuseColor(0, 0.5, 0) self.freeEdgeActor.GetProperty().SetEdgeVisibility(1) self.freeEdgeActor.GetProperty().SetEdgeColor(1, 0, 0) Any input will be gratefully receeived, Thanx, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jcplatt at dsl.pipex.com Mon Sep 25 04:46:30 2017 From: jcplatt at dsl.pipex.com (John Platt) Date: Mon, 25 Sep 2017 09:46:30 +0100 Subject: [vtkusers] Problems using vtkExtractEdges with vykUnstructuredGrid, quadratic solid cell types In-Reply-To: <1506325670545-0.post@n5.nabble.com> References: <1506325670545-0.post@n5.nabble.com> Message-ID: Hi, Have you tried using vtkUnstructuredGridGeometryFilter to extract the free faces without triangulation of the higher order cells? HTH John. On 9/25/2017 8:47 AM, scotsman60 wrote: > Hello!!! > > I've been trying to render the edges of higher order tets, wedges and hexas > for a few hours now and I can't seem to get it to work. > > If I render the grid directly or extract the free faces and render I get all > of the internal edges of the higher order cells displayed - this is > expected. > > So I did some reading and looked at some examples and came up with the > following - which unfortunately draws absolutely nothing. Note that > self.mesh is a vtkUnstructuredGrid, If I write this grid out and import to > Paraview I can see the higher order solids drawn correctly with the internal > edges hidden for all cells. > > meshEdges = vtk.vtkExtractEdges() > meshEdges.SetInputData(self.mesh) > meshEdgesAlgorithm = meshEdges.GetOutputPort() > meshEdgePolyData = meshEdges.GetOutput() > > meshEdgeMapper = vtk.vtkDataSetMapper() > #meshEdgeMapper.SetInputConnection(meshEdgesAlgorithm) > meshEdgeMapper.SetInputData(meshEdgePolyData) > meshEdgeMapper.Update() > > self.freeEdgeActor = vtk.vtkActor() > self.freeEdgeActor.SetMapper(meshEdgeMapper) > self.freeEdgeActor.GetProperty().SetRepresentationToWireframe() > self.freeEdgeActor.GetProperty().BackfaceCullingOn() > self.freeEdgeActor.GetProperty().SetDiffuseColor(0, 0.5, 0) > self.freeEdgeActor.GetProperty().SetEdgeVisibility(1) > self.freeEdgeActor.GetProperty().SetEdgeColor(1, 0, 0) > > > Any input will be gratefully receeived, > > Thanx, > > > Doug > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From cory.quammen at kitware.com Mon Sep 25 08:41:35 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 25 Sep 2017 08:41:35 -0400 Subject: [vtkusers] How to extract cells and points from unstructuredGrid based on integer cell data? In-Reply-To: <1506196273067-0.post@n5.nabble.com> References: <1506196273067-0.post@n5.nabble.com> Message-ID: > I'm currently pursuing a solution based on vtkThreshold - is this the right > approach or is there a better onw? vtkThreshold should work fine. - Cory > > Thanx in advance, > > > Doug > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From alessandro.volz at gmail.com Mon Sep 25 10:07:14 2017 From: alessandro.volz at gmail.com (Alessandro Volz) Date: Mon, 25 Sep 2017 16:07:14 +0200 Subject: [vtkusers] Rotating planes In-Reply-To: <1506114240543-0.post@n5.nabble.com> References: <1506114240543-0.post@n5.nabble.com> Message-ID: <575CC2B8-D06D-4F45-BC7C-57174B9894C9@gmail.com> What are you currently using to get the axial/coronal/sagittal slices? The vtkImageReslice class lets you generate "plane views" for any orientation. You'd provide rotated X and Y axes while keeping the Z axis to obtain your desired results. Best, Alessandro > On Sep 22, 2017, at 11:04 PM, Renzo wrote: > > Dear all, > > I want to implement rotating planes views with VTK. This means, I want to > let the user choose which slice in which plane will be shown, but not only > in the traditional axial, coronal, and sagittal orientations (in a 3D > volume), but also in any random orientation. I am thinking about letting the > user control the normal vector to the slicing plane and then also letting > the user visualize 2D slices perpendicular to that normal vector. > > Any suggestions on how to implement this with VTK? > > I am thinking about constantly applying rotation transformations to the 3D > volume, and then extracting the usual axial, coronal, and sagittal slices, > but I was wondering if there is a faster method. Applying a transformation > to the 3D volume can be quite time-consuming. > > Thanks, > > Renzo > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From aron.helser at kitware.com Mon Sep 25 11:50:25 2017 From: aron.helser at kitware.com (Aron Helser) Date: Mon, 25 Sep 2017 11:50:25 -0400 Subject: [vtkusers] Install vtk 8.1 on raspberry pi 3 model B In-Reply-To: <1506279589530-0.post@n5.nabble.com> References: <1506279589530-0.post@n5.nabble.com> Message-ID: Hi Laurent, This error: "file too short" looks very suspicious - you might be out of disk space. Please check your file system to see if you have available space! Aron On Sun, Sep 24, 2017 at 2:59 PM, LBerger wrote: > Hi, > > First I must sya my english is not very good and I use to work on windows. > I build vtk on rapsberry (2017-09-07-raspbian-stretch). > > First I built vtk : cmake --build vtk > [ 0%] Built target VTKData > ..... > [100%] Built target vtkRenderingVolumeOpenGL2 > [100%] Built target vtkViewsContext2D > [100%] Built target vtkViewsInfovis > > I want to install now : > sudo cmake --build vtk --target install > [ 0%] Built target VTKData > [ 1%] Built target vtksys > ... > Linking CXX shared library > CMakeFiles/CMakeRelink.dir/libvtkFiltersCore-8.1.so > /usr/bin/ld: error: CMakeFiles/vtkFiltersCore.dir/vtkMassProperties.cxx.o: > file too short > collect2: error: ld returned 1 exit status > Filters/Core/CMakeFiles/vtkFiltersCore.dir/build.make:2538 : la recette > pour > la cible > ? Filters/Core/CMakeFiles/CMakeRelink.dir/libvtkFiltersCore-8.1.so.1 ? a > ?chou?e > make[2]: *** > [Filters/Core/CMakeFiles/CMakeRelink.dir/libvtkFiltersCore-8.1.so.1] > Erreur > 1 > CMakeFiles/Makefile2:926 : la recette pour la cible > ? Filters/Core/CMakeFiles/vtkFiltersCore.dir/preinstall ? a ?chou?e > make[1]: *** [Filters/Core/CMakeFiles/vtkFiltersCore.dir/preinstall] > Erreur > 2 > Makefile:133 : la recette pour la cible ? preinstall ? a ?chou?e > make: *** [preinstall] Erreur 2 > > I don't understand what happens. > > Any help would be appreciate > Thanks in advance > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From laurent.berger at univ-lemans.fr Mon Sep 25 14:54:38 2017 From: laurent.berger at univ-lemans.fr (LBerger) Date: Mon, 25 Sep 2017 11:54:38 -0700 (MST) Subject: [vtkusers] Install vtk 8.1 on raspberry pi 3 model B In-Reply-To: References: <1506279589530-0.post@n5.nabble.com> Message-ID: <1506365678008-0.post@n5.nabble.com> Thanks for your answer. You are right there is a problem with my sdcard. It is not full but many files are filled with NULL character... I change my my sdcard. Thanks again -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Mon Sep 25 15:37:44 2017 From: doug at beachmailing.com (scotsman60) Date: Mon, 25 Sep 2017 12:37:44 -0700 (MST) Subject: [vtkusers] Problems using vtkExtractEdges with vtkUnstructuredGrid, quadratic solid cell types In-Reply-To: <1506325670545-0.post@n5.nabble.com> References: <1506325670545-0.post@n5.nabble.com> Message-ID: <1506368264294-0.post@n5.nabble.com> Hello!! OK - I've figured out this has nothing to do with vtkExtractEdges. If I write the unstructuredGrid to disk and create a new one by reading it back in, everything works as documented. So I'm assuming I must have a problem with my UnstructuredGrid. I am creating the points and cells for this grid "in bulk" using numpy arrays instead of looping over points and cells and adding them one by one since the data sets are very large. I suspect that something must be amiss in tat process - although I am able to save the grid correctly and I can render it many ways without a problem. Is there any known issues related to the use of numpy arrays and the extractEdge class? Thanx, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Tue Sep 26 12:04:11 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 26 Sep 2017 12:04:11 -0400 Subject: [vtkusers] VTK Python Wrapper - Exporting Surface Plot In-Reply-To: References: Message-ID: Conversation moved to https://stackoverflow.com/questions/46162129/vtk-python-wrapper-exporting-surface-plot On Tue, Sep 12, 2017 at 11:56 AM, Alberti, Anthony Lewis wrote: > Cory, > > Thanks for your response. The data I am trying to visualize is from a 2D > time dependent simulation so there is a good amount of data. I am using > finite elements but the specific method in which I am using doesn't have a > 2D mesh in the traditional sense - so typical visualization methods for > finite elements are kind of moot. > > I was hoping that I would be able to directly output the data into some form > of vtk object that I could then use to visualize in a surface plot in > Paraview/Visit. That way I could adjust camera angles, color schemes, etc > and make everything into a movie to show the time dependent behavior. The > reason I was hoping to avoid to have to process raw data (e.g. through csv > files) is that the simulation simply outputs a lot of data (on the order of > 10s of gigabytes) and post processing it directly in Paraview could be > expensive. > > What do you think? > > -- Tony > > On Tue, Sep 12, 2017 at 7:18 AM, Cory Quammen > wrote: >> >> Hi Anthony, >> >> To my knowledge, exporting plots is not supported, especially >> exporting to an OBJ file, which is a geometry format. >> >> What do you hope to achieve by importing into ParaView/VisIt? Could >> you do your visualization in those tools to begin with? >> >> - Cory >> >> On Mon, Sep 11, 2017 at 1:59 PM, Alberti, Anthony Lewis >> wrote: >> > Hello all, >> > >> > I'm using VTK 8.0.1 and python 3.5 and am brand new to VTK. I am trying >> > to >> > export a surface plot using vtkPlotSurface. >> > >> > By referencing VTK-8.0.1/Charts/Core/Testing/Cxx/TestSurfacePlot.cxx I >> > have >> > successfully created a surface plot and have been able to render it in >> > python (even though it doesn't really look like a surface plot) - see >> > attached script. >> > >> > In order to better visualize what I've made, I wanted to try and export >> > it >> > and then visualize using Paraview/Visit. However, I'm struggling to find >> > any >> > concrete examples where this type of vtk object is exported... >> > >> > I have tried running the following: >> > out = vtk.vtkOBJExporter() >> > out.SetFilePrefix("test") >> > out.SetInput(chart) >> > out.Write() >> > >> > But end up with the following type error: >> > TypeError: SetInput argument 1: method requires a vtkRenderWindow, a >> > vtkContextView was provided. >> > >> > Can anyone provide assistance? Thanks in advance. >> > -- Tony >> > >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From seb.an at icloud.com Tue Sep 26 12:12:53 2017 From: seb.an at icloud.com (sebastian_a) Date: Tue, 26 Sep 2017 09:12:53 -0700 (MST) Subject: [vtkusers] Iterative subdivision causes holes Message-ID: <1506442373179-0.post@n5.nabble.com> Hello, I created this python script to subdivide each cell of a polydata depending on its size. Unfortunately, if the input polydata is more complex, the output polydata has holes in it like shown on the picture. Do you know what could be the reason? def extractCells(polydata, ids, inverse): selectionNode = vtk.vtkSelectionNode() selectionNode.SetFieldType(vtk.vtkSelectionNode.CELL) selectionNode.SetContentType(vtk.vtkSelectionNode.INDICES) selectionNode.SetSelectionList(ids) if inverse == True: selectionNode.GetProperties().Set(vtk.vtkSelectionNode.INVERSE(),1) else: selectionNode.GetProperties().Set(vtk.vtkSelectionNode.INVERSE(),0) selection = vtk.vtkSelection() selection.AddNode(selectionNode) extractSelection = vtk.vtkExtractSelection() extractSelection.SetInputData(0, polydata) extractSelection.SetInputData(1, selection) extractSelection.Update() selected = vtk.vtkUnstructuredGrid() selected.ShallowCopy(extractSelection.GetOutput()) geometryFilter = vtk.vtkGeometryFilter() geometryFilter.SetInputData(selected) geometryFilter.Update() return geometryFilter.GetOutput() def subdivide(polyData, edgeLength): # Find Large Faces largeFacePolyData = polyData smallFacePolyData = vtk.vtkPolyData() while largeFacePolyData.GetNumberOfPoints() > 0: idsLarge = vtk.vtkIdTypeArray() # IDs of cells idsLarge.SetNumberOfComponents(1) idsSmall = vtk.vtkIdTypeArray() # IDs of cells idsSmall.SetNumberOfComponents(1) idsname = "Ids" ids = vtk.vtkIdFilter() ids.SetInputData(largeFacePolyData) ids.PointIdsOff() ids.CellIdsOn() ids.FieldDataOff() ids.SetIdsArrayName(idsname) ids.Update() cellIds = ids.GetOutput().GetCellData().GetArray(idsname) for i in xrange(cellIds.GetNumberOfValues()): cell = largeFacePolyData.GetCell(cellIds.GetValue(i)) if getCircumferenceOfCell(cell) > edgeLength: idsLarge.InsertNextValue(cellIds.GetValue(i)) else: idsSmall.InsertNextValue(cellIds.GetValue(i)) smallFaces = extractCells(largeFacePolyData, idsSmall, False) largeFaces = extractCells(largeFacePolyData, idsLarge, False) if smallFacePolyData.GetNumberOfPoints() > 0: appendFilter = vtk.vtkAppendPolyData() appendFilter.AddInputData(smallFacePolyData) appendFilter.AddInputData(smallFaces) appendFilter.Update() # clean clean = vtk.vtkCleanPolyData() clean.SetInputConnection(appendFilter.GetOutputPort()) clean.Update() smallFacePolyData = clean.GetOutput() else: smallFacePolyData = smallFaces # subdivide if largeFaces.GetNumberOfPoints() > 0: subdivisionFilter = vtk.vtkLinearSubdivisionFilter() subdivisionFilter.SetNumberOfSubdivisions(1) subdivisionFilter.SetInputData(largeFaces) subdivisionFilter.Update() largeFacePolyData = subdivisionFilter.GetOutput() else: largeFacePolyData = largeFaces return smallFacePolyData Thank you very much, Sebastian -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From milefn at rpi.edu Tue Sep 26 12:12:13 2017 From: milefn at rpi.edu (Milef, Nicholas Boris) Date: Tue, 26 Sep 2017 16:12:13 +0000 Subject: [vtkusers] Creating billboard particle effects (e.g., smoke, fire) Message-ID: What would be the best way to create billboard particle effects such as smoke or fire? Should I use the vtkMoleculeMapper? Example: http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/particles-instancing/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From elhassan.abdou at gmail.com Tue Sep 26 12:21:49 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Tue, 26 Sep 2017 18:21:49 +0200 Subject: [vtkusers] ANGLE for VTK Message-ID: Hi all, I want to force VTK to use ANGLE gles implementation instead of using opengl in windows environment without using QT. Any idea how can I do so? Regards Elhassan Abdou -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Sep 26 12:37:06 2017 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 26 Sep 2017 12:37:06 -0400 Subject: [vtkusers] Creating billboard particle effects (e.g., smoke, fire) In-Reply-To: References: Message-ID: It depends on the specifics of the implementation but as a start 1) vtkPointGaussianMapper will draw billboard triangles and execute a possibly user defined sharer on them. This can be used to draw translucent splats/discs/squares/etc. based on the shader provided. 2) if you are thinking more as point sprites (fixed pixel size as opposed to world coord size) you can use the regular polydata mapper with a point size and then shade it/texture it 3) If you have 3D elements (as opposed to billboards) then you could use vtkGlyph3DMapper which under the hood uses opengl instancing to replicate geometry. 4) if you mostly want spheres or cylinders then there are dedicated mappers for those which is what the molecule mapper uses under the hood. Those mappers have the code to properly compute z values based on sphere/cylinder equations so they are not exactly billboards but more impostors. On Tue, Sep 26, 2017 at 12:12 PM, Milef, Nicholas Boris wrote: > What would be the best way to create billboard particle effects such as > smoke or fire? Should I use the vtkMoleculeMapper? > > Example: > http://www.opengl-tutorial.org/intermediate-tutorials/ > billboards-particles/particles-instancing/ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Sep 26 13:16:48 2017 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 26 Sep 2017 13:16:48 -0400 Subject: [vtkusers] ANGLE for VTK In-Reply-To: References: Message-ID: VTK supports gles 3.0 as part of its iOS/Android support. But you would need to make some cmakelist and maybe header file changes to build the ES code paths while on windows. I've never tried it but it seems reasonable. On Tue, Sep 26, 2017 at 12:21 PM, Elhassan Abdou wrote: > Hi all, > > I want to force VTK to use ANGLE gles implementation instead of using > opengl in windows environment without using QT. > Any idea how can I do so? > > > Regards > Elhassan Abdou > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From milefn at rpi.edu Tue Sep 26 16:53:32 2017 From: milefn at rpi.edu (Milef, Nicholas Boris) Date: Tue, 26 Sep 2017 20:53:32 +0000 Subject: [vtkusers] Creating billboard particle effects (e.g., smoke, fire) In-Reply-To: References: , Message-ID: Thanks Ken! I'll give vtkPointGaussianMapper a try. It seems to be closest to what I want to do. ________________________________ From: Ken Martin [ken.martin at kitware.com] Sent: Tuesday, September 26, 2017 12:37 PM To: Milef, Nicholas Boris Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Creating billboard particle effects (e.g., smoke, fire) It depends on the specifics of the implementation but as a start 1) vtkPointGaussianMapper will draw billboard triangles and execute a possibly user defined sharer on them. This can be used to draw translucent splats/discs/squares/etc. based on the shader provided. 2) if you are thinking more as point sprites (fixed pixel size as opposed to world coord size) you can use the regular polydata mapper with a point size and then shade it/texture it 3) If you have 3D elements (as opposed to billboards) then you could use vtkGlyph3DMapper which under the hood uses opengl instancing to replicate geometry. 4) if you mostly want spheres or cylinders then there are dedicated mappers for those which is what the molecule mapper uses under the hood. Those mappers have the code to properly compute z values based on sphere/cylinder equations so they are not exactly billboards but more impostors. On Tue, Sep 26, 2017 at 12:12 PM, Milef, Nicholas Boris > wrote: What would be the best way to create billboard particle effects such as smoke or fire? Should I use the vtkMoleculeMapper? Example: http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/particles-instancing/ _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Tue Sep 26 21:32:23 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Tue, 26 Sep 2017 21:32:23 -0400 Subject: [vtkusers] Python and VTK Message-ID: Hi, I'm running ubuntu 16.04 with python3. After compiling and installing vtk8 the following occurs. 1- I have an issue with doxygen / docs during vtk make install After make install 1- I fire up a python 3 window and can import vtk, but cannot call any of the vtk functions except for those beginning with __ 2- I fire up my python2 window and cannot import vtk at all 3- I fire up vtkpython, which looks to be p3.5 and cannot import vtk at all I feel like I'm missing a major step hooking the wrappers up into the python environment. My desired functionality is to have vtk in python 3.5, optimally in a venv if possible. Any ideas? Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From elhassan.abdou at gmail.com Wed Sep 27 03:26:17 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Wed, 27 Sep 2017 09:26:17 +0200 Subject: [vtkusers] ANGLE for VTK In-Reply-To: References: Message-ID: Hi , I am wondering if there is a tutorial or a whitepaper that explains the CMake files of VTK. I understand CMake but I am afraid to lose my way in the CMake files in the VTK subprojects . Regards Elhassan On Tue, Sep 26, 2017 at 7:16 PM, Ken Martin wrote: > VTK supports gles 3.0 as part of its iOS/Android support. But you would > need to make some cmakelist and maybe header file changes to build the ES > code paths while on windows. I've never tried it but it seems reasonable. > > On Tue, Sep 26, 2017 at 12:21 PM, Elhassan Abdou > wrote: > >> Hi all, >> >> I want to force VTK to use ANGLE gles implementation instead of using >> opengl in windows environment without using QT. >> Any idea how can I do so? >> >> >> Regards >> Elhassan Abdou >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > > Clifton Park NY 12065 > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug at beachmailing.com Wed Sep 27 04:30:32 2017 From: doug at beachmailing.com (scotsman60) Date: Wed, 27 Sep 2017 01:30:32 -0700 (MST) Subject: [vtkusers] Problems using vtkExtractEdges with vtkUnstructuredGrid, quadratic solid cell types In-Reply-To: <1506325670545-0.post@n5.nabble.com> References: <1506325670545-0.post@n5.nabble.com> Message-ID: <1506501032601-0.post@n5.nabble.com> Hello, For completeness, and to help anyone else who runs into problems trying to get correct free edges on higher order cells, here is what I implemented and find to be working nicely uggFilter = vtk.vtkUnstructuredGridGeometryFilter() uggFilter.SetInputData(self.mesh) edges = vtk.vtkExtractEdges() edges.SetInputConnection(uggFilter.GetOutputPort()) edgeMapper = vtk.vtkDataSetMapper() edgeMapper.SetInputConnection(edges.GetOutputPort()) self.freeEdgeActor = vtk.vtkActor() self.freeEdgeActor.SetMapper(edgeMapper) self.freeEdgeActor.GetProperty().BackfaceCullingOn() self.freeEdgeActor.GetProperty().SetDiffuseColor(0, 0.5, 0) self.freeEdgeActor.GetProperty().SetEdgeVisibility(1) self.freeEdgeActor.GetProperty().SetEdgeColor(1, 0, 0) I have another actor that actually draws the Faces so that I get a shaded with edges style plot meshFreeSurfaceFilter = vtk.vtkDataSetSurfaceFilter() meshFreeSurfaceFilter.SetInputData(self.mesh) meshFreeSurfaceFilter.Update() meshFreeSurfaceMeshMapper = vtk.vtkDataSetMapper() meshFreeSurfaceMeshMapper.SetInputDataObject(meshFreeSurfaceFilter.GetOutput()) self.freeFaceActor = vtk.vtkActor() self.freeFaceActor.SetMapper(meshFreeSurfaceMeshMapper) #self.freeFaceActor.GetProperty().SetRepresentationToWireframe() self.freeFaceActor.GetProperty().BackfaceCullingOn() self.freeFaceActor.GetProperty().SetDiffuseColor(0, 0.5, 0) self.freeFaceActor.GetProperty().SetEdgeVisibility(0) self.freeFaceActor.GetProperty().SetEdgeColor(1, 0, 0) self.freeFaceActor.GetProperty().SetOpacity(0.5) Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From doug at beachmailing.com Wed Sep 27 04:35:05 2017 From: doug at beachmailing.com (scotsman60) Date: Wed, 27 Sep 2017 01:35:05 -0700 (MST) Subject: [vtkusers] How to use scalar data from unstructured grid cells to color code the free faces of the cells? Message-ID: <1506501305336-0.post@n5.nabble.com> Hello!!! I have a vtkUnstruturedGrid containing many cells of different topologies. The grid has some scalar data associated to the cells To improve performance I filter the grid to get the free faces using a vtkDataSetSurfaceFilter. My question is how do I go about setting the colors of the faces in the Surface to match the scalar values associated with the cells that they come from? Thanks in advance for any guidance, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From siming.bayer at gmail.com Wed Sep 27 05:56:58 2017 From: siming.bayer at gmail.com (Siming Bayer) Date: Wed, 27 Sep 2017 11:56:58 +0200 Subject: [vtkusers] GPU acceleration for vtkProbeFilter Message-ID: Dear all, I am currently using vtkProbeFilter to interpolate the value of a volumetric mesh onto a 256x256x256 image volume. vtkProbeFilter works fine here, however it takes a very long time. Is there any GPU acceleration for this calculation (vtkProbeFilter)? best, Siming -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Sep 27 07:25:37 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 27 Sep 2017 07:25:37 -0400 Subject: [vtkusers] GPU acceleration for vtkProbeFilter In-Reply-To: References: Message-ID: On Wed, Sep 27, 2017 at 5:56 AM, Siming Bayer wrote: > Dear all, > > I am currently using vtkProbeFilter to interpolate the value of a volumetric > mesh onto a 256x256x256 image volume. How long does it take? > vtkProbeFilter works fine here, > however it takes a very long time. Is there any GPU acceleration for this > calculation (vtkProbeFilter)? There is no GPU acceleration for this filter, but it is multithreaded. Do you see all your cores being used when the filter is run? Thanks, Cory > best, > Siming > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From bill.lorensen at gmail.com Wed Sep 27 08:21:29 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 27 Sep 2017 08:21:29 -0400 Subject: [vtkusers] GPU acceleration for vtkProbeFilter In-Reply-To: References: Message-ID: Also, have is your VTK built as Release or Debug? On Wed, Sep 27, 2017 at 7:25 AM, Cory Quammen wrote: > On Wed, Sep 27, 2017 at 5:56 AM, Siming Bayer wrote: >> Dear all, >> >> I am currently using vtkProbeFilter to interpolate the value of a volumetric >> mesh onto a 256x256x256 image volume. > > How long does it take? > >> vtkProbeFilter works fine here, >> however it takes a very long time. Is there any GPU acceleration for this >> calculation (vtkProbeFilter)? > > There is no GPU acceleration for this filter, but it is multithreaded. > Do you see all your cores being used when the filter is run? > > Thanks, > Cory > >> best, >> Siming >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From romain.leguay at gmail.com Wed Sep 27 08:48:15 2017 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Wed, 27 Sep 2017 05:48:15 -0700 (MST) Subject: [vtkusers] Combination of HighlightSelection example and ExtractVisibleCells In-Reply-To: <1505383284874-0.post@n5.nabble.com> References: <273C3631-78EF-4FC5-9C69-9E09F83AC154@gmail.com> <1505383284874-0.post@n5.nabble.com> Message-ID: <1506516495251-0.post@n5.nabble.com> Hello, I didn't found any other way to pick the cells than using vtkHardwareSelector and vtkExtractSelection. It's working great on object with "big" triangles. However, I try to do some picking on a vtkUnstructuredGrid and there is no picking done if I display the vtkUnstructuredGrid with a combination of a vtkDataSetMapper/vtkActor. I attached you my example code that permits to pick sphere cells. The problem here is when I use the vtkDataSetMapper instead of a vtkPolyDataSetMapper, the picking is not working (no cell is colored). Does anyone know the reason of this behavior? Thanks again. CMakeLists.txt TestPicking.cpp -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From siming.bayer at gmail.com Wed Sep 27 08:50:51 2017 From: siming.bayer at gmail.com (Siming Bayer) Date: Wed, 27 Sep 2017 14:50:51 +0200 Subject: [vtkusers] Paraview Error while reading .vts file Message-ID: Dear all, I got the following error while reading a .vts file with ParaView: ERROR: In C:\bbd\7cc78367\build\superbuild\paraview\src\VTK\IO\XML\vtkXMLStructuredDataReader.cxx, line 360 vtkXMLStructuredGridReader (000000000B791F40): Error reading extent 0 255 0 255 0 255 from piece 0 What does it mean? What could be the reason? best, Siming -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Sep 27 09:15:49 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 27 Sep 2017 09:15:49 -0400 Subject: [vtkusers] GPU acceleration for vtkProbeFilter In-Reply-To: References: Message-ID: On Wed, Sep 27, 2017 at 8:06 AM, Siming Bayer wrote: > Thank you Cory. > > Yes, I built it myself. However on a windows 7 machine, where the MSVC only > has a openMP 2.0 support. VTK 7.1 requires openMP 3.1. Does it still work? > Or I should use TBB? I don't know about the OpenMP requirements. TBB is definitely a good option, though, so I would try that. Thanks, Cory > best, > Siming > > 2017-09-27 13:41 GMT+02:00 Cory Quammen : >> >> If you have built VTK yourself, set the VTK_SMP_IMPLEMENTATION_TYPE >> option to OpenMP or TBB. That will enable multithreading. >> >> On Wed, Sep 27, 2017 at 7:33 AM, Siming Bayer >> wrote: >> > No it isn?t. How can I active the multithread? >> > >> > best, >> > Siming >> > >> > 2017-09-27 13:25 GMT+02:00 Cory Quammen : >> >> >> >> On Wed, Sep 27, 2017 at 5:56 AM, Siming Bayer >> >> wrote: >> >> > Dear all, >> >> > >> >> > I am currently using vtkProbeFilter to interpolate the value of a >> >> > volumetric >> >> > mesh onto a 256x256x256 image volume. >> >> >> >> How long does it take? >> >> >> >> > vtkProbeFilter works fine here, >> >> > however it takes a very long time. Is there any GPU acceleration for >> >> > this >> >> > calculation (vtkProbeFilter)? >> >> >> >> There is no GPU acceleration for this filter, but it is multithreaded. >> >> Do you see all your cores being used when the filter is run? >> >> >> >> Thanks, >> >> Cory >> >> >> >> > best, >> >> > Siming >> >> > >> >> > _______________________________________________ >> >> > Powered by www.kitware.com >> >> > >> >> > Visit other Kitware open-source projects at >> >> > http://www.kitware.com/opensource/opensource.html >> >> > >> >> > Please keep messages on-topic and check the VTK FAQ at: >> >> > http://www.vtk.org/Wiki/VTK_FAQ >> >> > >> >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> > >> >> > Follow this link to subscribe/unsubscribe: >> >> > http://public.kitware.com/mailman/listinfo/vtkusers >> >> > >> >> >> >> >> >> >> >> -- >> >> Cory Quammen >> >> Staff R&D Engineer >> >> Kitware, Inc. >> > >> > >> >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From siming.bayer at gmail.com Wed Sep 27 09:17:00 2017 From: siming.bayer at gmail.com (Siming Bayer) Date: Wed, 27 Sep 2017 15:17:00 +0200 Subject: [vtkusers] GPU acceleration for vtkProbeFilter In-Reply-To: References: Message-ID: All right! 2017-09-27 15:15 GMT+02:00 Cory Quammen : > On Wed, Sep 27, 2017 at 8:06 AM, Siming Bayer > wrote: > > Thank you Cory. > > > > Yes, I built it myself. However on a windows 7 machine, where the MSVC > only > > has a openMP 2.0 support. VTK 7.1 requires openMP 3.1. Does it still > work? > > Or I should use TBB? > > I don't know about the OpenMP requirements. TBB is definitely a good > option, though, so I would try that. > > Thanks, > Cory > > > best, > > Siming > > > > 2017-09-27 13:41 GMT+02:00 Cory Quammen : > >> > >> If you have built VTK yourself, set the VTK_SMP_IMPLEMENTATION_TYPE > >> option to OpenMP or TBB. That will enable multithreading. > >> > >> On Wed, Sep 27, 2017 at 7:33 AM, Siming Bayer > >> wrote: > >> > No it isn?t. How can I active the multithread? > >> > > >> > best, > >> > Siming > >> > > >> > 2017-09-27 13:25 GMT+02:00 Cory Quammen : > >> >> > >> >> On Wed, Sep 27, 2017 at 5:56 AM, Siming Bayer < > siming.bayer at gmail.com> > >> >> wrote: > >> >> > Dear all, > >> >> > > >> >> > I am currently using vtkProbeFilter to interpolate the value of a > >> >> > volumetric > >> >> > mesh onto a 256x256x256 image volume. > >> >> > >> >> How long does it take? > >> >> > >> >> > vtkProbeFilter works fine here, > >> >> > however it takes a very long time. Is there any GPU acceleration > for > >> >> > this > >> >> > calculation (vtkProbeFilter)? > >> >> > >> >> There is no GPU acceleration for this filter, but it is > multithreaded. > >> >> Do you see all your cores being used when the filter is run? > >> >> > >> >> Thanks, > >> >> Cory > >> >> > >> >> > best, > >> >> > Siming > >> >> > > >> >> > _______________________________________________ > >> >> > Powered by www.kitware.com > >> >> > > >> >> > Visit other Kitware open-source projects at > >> >> > http://www.kitware.com/opensource/opensource.html > >> >> > > >> >> > Please keep messages on-topic and check the VTK FAQ at: > >> >> > http://www.vtk.org/Wiki/VTK_FAQ > >> >> > > >> >> > Search the list archives at: http://markmail.org/search/?q= > vtkusers > >> >> > > >> >> > Follow this link to subscribe/unsubscribe: > >> >> > http://public.kitware.com/mailman/listinfo/vtkusers > >> >> > > >> >> > >> >> > >> >> > >> >> -- > >> >> Cory Quammen > >> >> Staff R&D Engineer > >> >> Kitware, Inc. > >> > > >> > > >> > >> > >> > >> -- > >> Cory Quammen > >> Staff R&D Engineer > >> Kitware, Inc. > > > > > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Sep 27 09:21:25 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 27 Sep 2017 09:21:25 -0400 Subject: [vtkusers] Paraview Error while reading .vts file In-Reply-To: References: Message-ID: On Wed, Sep 27, 2017 at 8:50 AM, Siming Bayer wrote: > Dear all, > > I got the following error while reading a .vts file with ParaView: > > > > ERROR: In > C:\bbd\7cc78367\build\superbuild\paraview\src\VTK\IO\XML\vtkXMLStructuredDataReader.cxx, > line 360 > > vtkXMLStructuredGridReader (000000000B791F40): Error reading extent 0 255 0 > 255 0 255 from piece 0 > > > What does it mean? What could be the reason? > Perhaps there is something wrong with the file. Can you share it, or ideally a smaller data set that exhibits the same problem? Thanks, Cory > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From dan.lipsa at kitware.com Wed Sep 27 09:26:06 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 27 Sep 2017 09:26:06 -0400 Subject: [vtkusers] Python and VTK In-Reply-To: References: Message-ID: Nick, You should have VTK_PYTHON_VERSION=3 and VTK_WRAP_PYTHON=ON You should use vtkpython. This has all the right paths to see the VTK library. Take a look in your CMakeCache.txt and search for python to see your python related variables. If some point to python2 paths delete them and reconfigure and rebuild your VTK. Hope this helps, Dan On Tue, Sep 26, 2017 at 9:32 PM, Nick Torenvliet wrote: > Hi, > > I'm running ubuntu 16.04 with python3. > > After compiling and installing vtk8 the following occurs. > > 1- I have an issue with doxygen / docs during vtk make install > > After make install > > 1- I fire up a python 3 window and can import vtk, but cannot call any of > the vtk functions except for those beginning with __ > 2- I fire up my python2 window and cannot import vtk at all > 3- I fire up vtkpython, which looks to be p3.5 and cannot import vtk at all > > I feel like I'm missing a major step hooking the wrappers up into the > python environment. > > My desired functionality is to have vtk in python 3.5, optimally in a venv > if possible. > > Any ideas? > > Nick > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From siming.bayer at gmail.com Wed Sep 27 09:47:11 2017 From: siming.bayer at gmail.com (Siming Bayer) Date: Wed, 27 Sep 2017 15:47:11 +0200 Subject: [vtkusers] Fwd: Paraview Error while reading .vts file In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Siming Bayer Date: 2017-09-27 15:42 GMT+02:00 Subject: Re: [vtkusers] Paraview Error while reading .vts file To: Cory Quammen I used the vtkProbeFilter to interpolate the value on the edges of a volumetric mesh onto a image volume with dimension of 256x256x256. And save the output of vtkProbeFilter to a .vts file use the following code: vtkSmartPointer volume = vtkSmartPointer::New(); volume->DeepCopy(reader->GetOutput()); //find the cell centers, store as polydata vtkSmartPointer probePoints = vtkSmartPointer::New(); double center[3] = { 0,0,0 }; for (vtkIdType cellId = 0; cellId < volume->GetNumberOfCells(); ++cellId) { double pcoords[3] = { 0,0,0 }; double *weights = new double[volume->GetMaxCellSize()]; vtkCell* cell = volume->GetCell(cellId); int subId = cell->GetParametricCenter(pcoords); cell->EvaluateLocation(subId, pcoords, center, weights); probePoints->InsertNextPoint(center[0], center[1], center[2]); } vtkSmartPointer probePolyData = vtkSmartPointer:: New(); probePolyData->SetPoints(probePoints); //read the .vtu mesh file as untructured grid vtkSmartPointer meshReader = vtkSmartPointer< vtkXMLUnstructuredGridReader>::New(); meshReader->SetFileName(argv[2]); meshReader->Update(); vtkUnstructuredGrid* ugrid = meshReader->GetOutput(); std::cout << "Interpolating...." << std::endl; //Probe filter vtkSmartPointer probe = vtkSmartPointer::New(); probe->SetValidPointMaskArrayName("mesh"); probe->SetSourceData(ugrid); probe->SetInputData(probePolyData); probe->Update(); //save the output of probefileter as .vtu file vtkSmartPointer sgrid = vtkSmartPointer::New(); sgrid->SetDimensions(256, 256, 256); sgrid->SetPoints(probePoints); unsigned int numberOfArrays = probe->GetOutput()->GetPointData()-> GetNumberOfArrays(); std::cout << "Copying arrays:" << std::endl; for (unsigned int i = 0; i < numberOfArrays; i++) { std::cout << "\t" << probe->GetOutput()->GetPointData()->GetArray(i)->GetName() << std::endl; sgrid->GetCellData()->AddArray(probe->GetOutput()-> GetPointData()->GetArray(i)); } std::cout << "Writing .vts output" << std::endl; vtkSmartPointer sWriter = vtkSmartPointer< vtkXMLStructuredGridWriter>::New(); sWriter->SetFileName("test.vts"); sWriter->SetInputData(sgrid); sWriter->Write(); } Maybe something wrong here? best, Siming 2017-09-27 15:29 GMT+02:00 Cory Quammen : > [Moving this discussion over to the ParaView list serve as it has to > do with ParaView.] > > Unfortunately, there's not enough information in the header file. What > wrote this .vts file? > > Thanks, > Cory > > On Wed, Sep 27, 2017 at 9:25 AM, Siming Bayer > wrote: > > Yes, > > > > the whole file is quite large. The header part is the following: > > > > > > > header_type="UInt32" compressor="vtkZLibDataCompressor"> > > > > >> > > > > > > > > > format="appended" RangeMin="0" RangeMax="0" > > offset="0" /> > > > format="appended" RangeMin="0" RangeMax="0" > > offset="906832" /> > > > NumberOfComponents="3" format="appended" RangeMin="0" > > RangeMax="0" offset="1813664" /> > > > RangeMax="0" offset="2720496" /> > > > > > > > format="appended" RangeMin="0.86602540378" RangeMax="440.80693053" > > offset="2758320" /> > > > > > > > > > > > > _........................................................... > ............(here > > is the data) > > > > > > > > Thank you! > > > > best, > > Siming > > > > 2017-09-27 15:21 GMT+02:00 Cory Quammen : > >> > >> On Wed, Sep 27, 2017 at 8:50 AM, Siming Bayer > >> wrote: > >> > Dear all, > >> > > >> > I got the following error while reading a .vts file with ParaView: > >> > > >> > > >> > > >> > ERROR: In > >> > > >> > C:\bbd\7cc78367\build\superbuild\paraview\src\VTK\IO\XML\vtk > XMLStructuredDataReader.cxx, > >> > line 360 > >> > > >> > vtkXMLStructuredGridReader (000000000B791F40): Error reading extent 0 > >> > 255 0 > >> > 255 0 255 from piece 0 > >> > > >> > > >> > What does it mean? What could be the reason? > >> > > >> > >> Perhaps there is something wrong with the file. Can you share it, or > >> ideally a smaller data set that exhibits the same problem? > >> > >> Thanks, > >> Cory > >> > >> > > >> > > >> > > >> > _______________________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Please keep messages on-topic and check the VTK FAQ at: > >> > http://www.vtk.org/Wiki/VTK_FAQ > >> > > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/vtkusers > >> > > >> > >> > >> > >> -- > >> Cory Quammen > >> Staff R&D Engineer > >> Kitware, Inc. > > > > > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Wed Sep 27 10:04:38 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Wed, 27 Sep 2017 10:04:38 -0400 Subject: [vtkusers] Python and VTK In-Reply-To: References: Message-ID: Ooops! Hey Dan, thanks! It is now working fine - guess I need to bone up on my ccmake skills. Another question then, A couple of the examples are coughing with: _tkinter.TclError: couldn't load file "libvtkRenderingPythonTkWidgets-8.0.so": libvtkRenderingPythonTkWidgets-8.0.so: cannot open shared object file: No such file or directory So to address this I am attempting to rebuild with GROUP_TK set on. Now I get the following compile error: [ 87%] Linking CXX executable ../../../../bin/vtkInteractionWidgetsCxxTests [ 87%] Built target vtkInteractionWidgetsCxxTests Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 I'm going to hunt around and probably install twenty or so random packages that look anything like what I find @ 138 but if anyone knows what I need to do, please let me know. Thanks, Nick On Wed, Sep 27, 2017 at 9:26 AM, Dan Lipsa wrote: > Nick, > > You should have VTK_PYTHON_VERSION=3 and VTK_WRAP_PYTHON=ON > You should use vtkpython. This has all the right paths to see the VTK > library. > > Take a look in your CMakeCache.txt and search for python to see your > python related variables. If some point to python2 paths delete them and > reconfigure and rebuild your VTK. > > Hope this helps, > Dan > > > On Tue, Sep 26, 2017 at 9:32 PM, Nick Torenvliet > wrote: > >> Hi, >> >> I'm running ubuntu 16.04 with python3. >> >> After compiling and installing vtk8 the following occurs. >> >> 1- I have an issue with doxygen / docs during vtk make install >> >> After make install >> >> 1- I fire up a python 3 window and can import vtk, but cannot call any of >> the vtk functions except for those beginning with __ >> 2- I fire up my python2 window and cannot import vtk at all >> 3- I fire up vtkpython, which looks to be p3.5 and cannot import vtk at >> all >> >> I feel like I'm missing a major step hooking the wrappers up into the >> python environment. >> >> My desired functionality is to have vtk in python 3.5, optimally in a >> venv if possible. >> >> Any ideas? >> >> Nick >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Wed Sep 27 10:36:53 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 27 Sep 2017 10:36:53 -0400 Subject: [vtkusers] Python and VTK In-Reply-To: References: Message-ID: Indeed, that's what you probably need to do. Look at the symbols not found and search on the web to see what packages they are part of. On Wed, Sep 27, 2017 at 10:04 AM, Nick Torenvliet wrote: > Ooops! > > Hey Dan, thanks! It is now working fine - guess I need to bone up on my > ccmake skills. > > Another question then, > > A couple of the examples are coughing with: > > _tkinter.TclError: couldn't load file "libvtkRenderingPythonTkWidget > s-8.0.so": libvtkRenderingPythonTkWidgets-8.0.so: cannot open shared > object file: No such file or directory > > So to address this I am attempting to rebuild with GROUP_TK set on. > > Now I get the following compile error: > [ 87%] Linking CXX executable ../../../../bin/ > vtkInteractionWidgetsCxxTests > [ 87%] Built target vtkInteractionWidgetsCxxTests > Makefile:138: recipe for target 'all' failed > make: *** [all] Error 2 > > I'm going to hunt around and probably install twenty or so random packages > that look anything like what I find @ 138 but if anyone knows what I need > to do, please let me know. > > Thanks, > > Nick > > > > > > > On Wed, Sep 27, 2017 at 9:26 AM, Dan Lipsa wrote: > >> Nick, >> >> You should have VTK_PYTHON_VERSION=3 and VTK_WRAP_PYTHON=ON >> You should use vtkpython. This has all the right paths to see the VTK >> library. >> >> Take a look in your CMakeCache.txt and search for python to see your >> python related variables. If some point to python2 paths delete them and >> reconfigure and rebuild your VTK. >> >> Hope this helps, >> Dan >> >> >> On Tue, Sep 26, 2017 at 9:32 PM, Nick Torenvliet >> wrote: >> >>> Hi, >>> >>> I'm running ubuntu 16.04 with python3. >>> >>> After compiling and installing vtk8 the following occurs. >>> >>> 1- I have an issue with doxygen / docs during vtk make install >>> >>> After make install >>> >>> 1- I fire up a python 3 window and can import vtk, but cannot call any >>> of the vtk functions except for those beginning with __ >>> 2- I fire up my python2 window and cannot import vtk at all >>> 3- I fire up vtkpython, which looks to be p3.5 and cannot import vtk at >>> all >>> >>> I feel like I'm missing a major step hooking the wrappers up into the >>> python environment. >>> >>> My desired functionality is to have vtk in python 3.5, optimally in a >>> venv if possible. >>> >>> Any ideas? >>> >>> Nick >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From siming.bayer at gmail.com Wed Sep 27 10:58:56 2017 From: siming.bayer at gmail.com (Siming Bayer) Date: Wed, 27 Sep 2017 16:58:56 +0200 Subject: [vtkusers] Paraview Error while reading .vts file In-Reply-To: References: Message-ID: I have change this line. sgrid->GetCellData()->AddArray(probe->GetOutput()-> GetPointData()->GetArray(i)); to sgrid->GetPointData()->AddArray(probe-> GetOutput()->GetPointData()->GetArray(i)); And I still get this error: ERROR: In C:\bbd\7cc78367\build\superbuild\paraview\src\VTK\IO\XML\vtkXMLStructuredDataReader.cxx, line 360 vtkXMLStructuredGridReader (000000000BA5C060): Error reading extent 0 255 0 255 0 255 from piece 0 in addition with ERROR: In C:\bbd\7cc78367\build\superbuild\paraview\src\VTK\IO\XML\vtkXMLDataReader.cxx, line 443 vtkXMLStructuredGridReader (000000000BA5C060): Cannot read point data array "position" from PointData in piece 0. The data array in the element may be too short. Could someone provide some idea or an example how to correctly write the output of a vtkProbeFilter to any vtk file? Thanks! best, Siming 2017-09-27 15:47 GMT+02:00 Siming Bayer : > Thank you, Cory! > > best, > Siming > > 2017-09-27 15:46 GMT+02:00 Cory Quammen : > >> Hi Siming, >> >> Please reply-all to keep the discussion on the list so others may >> participate and benefit. >> >> This line in your export code is a problem: >> >> sgrid->GetCellData()->AddArray(probe->GetOutput()->GetPointD >> ata()->GetArray(i)); >> >> Point and cell data arrays have different lengths for structured >> grids. The writer is apparently not catching this, but the reader is. >> >> Cory >> >> On Wed, Sep 27, 2017 at 9:42 AM, Siming Bayer >> wrote: >> > I used the vtkProbeFilter to interpolate the value on the edges of a >> > volumetric mesh onto a image volume with dimension of 256x256x256. And >> save >> > the output of vtkProbeFilter to a .vts file use the following code: >> > >> > vtkSmartPointer volume = vtkSmartPointer: >> :New(); >> > >> > volume->DeepCopy(reader->GetOutput()); >> > >> > //find the cell centers, store as polydata >> > >> > vtkSmartPointer probePoints = vtkSmartPointer::Ne >> w(); >> > >> > double center[3] = { 0,0,0 }; >> > >> > for (vtkIdType cellId = 0; cellId < volume->GetNumberOfCells(); >> ++cellId) >> > >> > { >> > >> > double pcoords[3] = { 0,0,0 }; >> > >> > double *weights = new double[volume->GetMaxCellSize()]; >> > >> > vtkCell* cell = volume->GetCell(cellId); >> > >> > int subId = cell->GetParametricCenter(pcoords); >> > >> > cell->EvaluateLocation(subId, pcoords, center, weights); >> > >> > probePoints->InsertNextPoint(center[0], center[1], center[2]); >> > >> > } >> > >> > vtkSmartPointer probePolyData = >> > vtkSmartPointer::New(); >> > >> > probePolyData->SetPoints(probePoints); >> > >> > //read the .vtu mesh file as untructured grid >> > >> > vtkSmartPointer meshReader = >> > vtkSmartPointer::New(); >> > >> > meshReader->SetFileName(argv[2]); >> > >> > meshReader->Update(); >> > >> > vtkUnstructuredGrid* ugrid = meshReader->GetOutput(); >> > >> > std::cout << "Interpolating...." << std::endl; >> > >> > //Probe filter >> > >> > vtkSmartPointer probe = >> > vtkSmartPointer::New(); >> > >> > probe->SetValidPointMaskArrayName("mesh"); >> > >> > probe->SetSourceData(ugrid); >> > >> > probe->SetInputData(probePolyData); >> > >> > probe->Update(); >> > >> > //save the output of probefileter as .vtu file >> > >> > vtkSmartPointer sgrid = >> > vtkSmartPointer::New(); >> > >> > sgrid->SetDimensions(256, 256, 256); >> > >> > sgrid->SetPoints(probePoints); >> > >> > unsigned int numberOfArrays = >> > probe->GetOutput()->GetPointData()->GetNumberOfArrays(); >> > >> > std::cout << "Copying arrays:" << std::endl; >> > >> > for (unsigned int i = 0; i < numberOfArrays; i++) >> > >> > { >> > >> > std::cout << "\t" << >> > probe->GetOutput()->GetPointData()->GetArray(i)->GetName() << >> std::endl; >> > >> > sgrid->GetCellData()->AddArray(probe->GetOutput()->GetPointD >> ata()->GetArray(i)); >> > >> > } >> > >> > std::cout << "Writing .vts output" << std::endl; >> > >> > vtkSmartPointer sWriter = >> > vtkSmartPointer::New(); >> > >> > sWriter->SetFileName("test.vts"); >> > >> > sWriter->SetInputData(sgrid); >> > >> > sWriter->Write(); >> > >> > } >> > >> > >> > Maybe something wrong here? >> > >> > >> > best, >> > >> > Siming >> > >> > >> > 2017-09-27 15:29 GMT+02:00 Cory Quammen : >> >> >> >> [Moving this discussion over to the ParaView list serve as it has to >> >> do with ParaView.] >> >> >> >> Unfortunately, there's not enough information in the header file. What >> >> wrote this .vts file? >> >> >> >> Thanks, >> >> Cory >> >> >> >> On Wed, Sep 27, 2017 at 9:25 AM, Siming Bayer >> >> wrote: >> >> > Yes, >> >> > >> >> > the whole file is quite large. The header part is the following: >> >> > >> >> > >> >> > > byte_order="LittleEndian" >> >> > header_type="UInt32" compressor="vtkZLibDataCompressor"> >> >> > >> >> > > >> >> >> >> > >> >> > >> >> > >> >> > > NumberOfComponents="3" >> >> > format="appended" RangeMin="0" RangeMax="0" >> >> > offset="0" /> >> >> > > NumberOfComponents="3" >> >> > format="appended" RangeMin="0" RangeMax="0" >> >> > offset="906832" /> >> >> > > >> > NumberOfComponents="3" format="appended" RangeMin="0" >> >> > RangeMax="0" offset="1813664" /> >> >> > > >> > RangeMin="0" >> >> > RangeMax="0" offset="2720496" /> >> >> > >> >> > >> >> > > NumberOfComponents="3" >> >> > format="appended" RangeMin="0.86602540378" >> >> > RangeMax="440.80693053" >> >> > offset="2758320" /> >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > _........................................................... >> ............(here >> >> > is the data) >> >> > >> >> > >> >> > >> >> > Thank you! >> >> > >> >> > best, >> >> > Siming >> >> > >> >> > 2017-09-27 15:21 GMT+02:00 Cory Quammen : >> >> >> >> >> >> On Wed, Sep 27, 2017 at 8:50 AM, Siming Bayer < >> siming.bayer at gmail.com> >> >> >> wrote: >> >> >> > Dear all, >> >> >> > >> >> >> > I got the following error while reading a .vts file with ParaView: >> >> >> > >> >> >> > >> >> >> > >> >> >> > ERROR: In >> >> >> > >> >> >> > >> >> >> > C:\bbd\7cc78367\build\superbuild\paraview\src\VTK\IO\XML\vtk >> XMLStructuredDataReader.cxx, >> >> >> > line 360 >> >> >> > >> >> >> > vtkXMLStructuredGridReader (000000000B791F40): Error reading >> extent 0 >> >> >> > 255 0 >> >> >> > 255 0 255 from piece 0 >> >> >> > >> >> >> > >> >> >> > What does it mean? What could be the reason? >> >> >> > >> >> >> >> >> >> Perhaps there is something wrong with the file. Can you share it, or >> >> >> ideally a smaller data set that exhibits the same problem? >> >> >> >> >> >> Thanks, >> >> >> Cory >> >> >> >> >> >> > >> >> >> > >> >> >> > >> >> >> > _______________________________________________ >> >> >> > Powered by www.kitware.com >> >> >> > >> >> >> > Visit other Kitware open-source projects at >> >> >> > http://www.kitware.com/opensource/opensource.html >> >> >> > >> >> >> > Please keep messages on-topic and check the VTK FAQ at: >> >> >> > http://www.vtk.org/Wiki/VTK_FAQ >> >> >> > >> >> >> > Search the list archives at: http://markmail.org/search/?q= >> vtkusers >> >> >> > >> >> >> > Follow this link to subscribe/unsubscribe: >> >> >> > http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> Cory Quammen >> >> >> Staff R&D Engineer >> >> >> Kitware, Inc. >> >> > >> >> > >> >> >> >> >> >> >> >> -- >> >> Cory Quammen >> >> Staff R&D Engineer >> >> Kitware, Inc. >> > >> > >> >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Wed Sep 27 11:03:52 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Wed, 27 Sep 2017 11:03:52 -0400 Subject: [vtkusers] Python and VTK In-Reply-To: References: Message-ID: Hey Dan, It looks like it worked. On my second last pass, I was compiling "without shared libraries" and got some error in the make output indicating something like "I don't want to do that because it requires shared libraries." I had "shared libraries" as negative in the config step. On my last ccmake I configured for "with shared libraries" and my last compile just finished with no errors. It looks like somewhere in the ccmake process, a dependency on "shared libraries" exists, and config passes with no errors even if "shared libraries" is off - this leads to a fail at compile time. Seems like a hard to reproduce error, let me know if you want any of my local files to document a possible bug in the compile process. Regards, Nick On Wed, Sep 27, 2017 at 10:36 AM, Dan Lipsa wrote: > Indeed, that's what you probably need to do. Look at the symbols not found > and search on the web to see what packages they are part of. > > On Wed, Sep 27, 2017 at 10:04 AM, Nick Torenvliet > wrote: > >> Ooops! >> >> Hey Dan, thanks! It is now working fine - guess I need to bone up on my >> ccmake skills. >> >> Another question then, >> >> A couple of the examples are coughing with: >> >> _tkinter.TclError: couldn't load file "libvtkRenderingPythonTkWidget >> s-8.0.so": libvtkRenderingPythonTkWidgets-8.0.so: cannot open shared >> object file: No such file or directory >> >> So to address this I am attempting to rebuild with GROUP_TK set on. >> >> Now I get the following compile error: >> [ 87%] Linking CXX executable ../../../../bin/vtkInteraction >> WidgetsCxxTests >> [ 87%] Built target vtkInteractionWidgetsCxxTests >> Makefile:138: recipe for target 'all' failed >> make: *** [all] Error 2 >> >> I'm going to hunt around and probably install twenty or so random >> packages that look anything like what I find @ 138 but if anyone knows what >> I need to do, please let me know. >> >> Thanks, >> >> Nick >> >> >> >> >> >> >> On Wed, Sep 27, 2017 at 9:26 AM, Dan Lipsa wrote: >> >>> Nick, >>> >>> You should have VTK_PYTHON_VERSION=3 and VTK_WRAP_PYTHON=ON >>> You should use vtkpython. This has all the right paths to see the VTK >>> library. >>> >>> Take a look in your CMakeCache.txt and search for python to see your >>> python related variables. If some point to python2 paths delete them and >>> reconfigure and rebuild your VTK. >>> >>> Hope this helps, >>> Dan >>> >>> >>> On Tue, Sep 26, 2017 at 9:32 PM, Nick Torenvliet >> > wrote: >>> >>>> Hi, >>>> >>>> I'm running ubuntu 16.04 with python3. >>>> >>>> After compiling and installing vtk8 the following occurs. >>>> >>>> 1- I have an issue with doxygen / docs during vtk make install >>>> >>>> After make install >>>> >>>> 1- I fire up a python 3 window and can import vtk, but cannot call any >>>> of the vtk functions except for those beginning with __ >>>> 2- I fire up my python2 window and cannot import vtk at all >>>> 3- I fire up vtkpython, which looks to be p3.5 and cannot import vtk at >>>> all >>>> >>>> I feel like I'm missing a major step hooking the wrappers up into the >>>> python environment. >>>> >>>> My desired functionality is to have vtk in python 3.5, optimally in a >>>> venv if possible. >>>> >>>> Any ideas? >>>> >>>> Nick >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 27 11:52:03 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 27 Sep 2017 09:52:03 -0600 Subject: [vtkusers] Python and VTK In-Reply-To: References: Message-ID: Hi Nick, Also check CMAKE_BUILD_TYPE. If it is set like the following, then your compile was done with no optimization and the resulting VTK will be rather slow: CMAKE_BUILD_TYPE:STRING= You should make sure that this is set to "Release" or "RelWithDebInfo" (unless you specifically want a debug build, in which case you should set it to "Debug"). Building VTK with the Python wrappers requires BUILD_SHARED_LIBS=ON in the general case. This is known by everyone who builds the VTK Python wrappers on a regular basis, but perhaps it isn't documented as well as it should be. However, cmake does not force shared libraries when VTK_WRAP_PYTHON is on because there are some situations where static libraries make sense with Python, e.g. when someone wants to build their very own Python executable with all the libraries built-in. - David On Wed, Sep 27, 2017 at 9:03 AM, Nick Torenvliet wrote: > Hey Dan, > > It looks like it worked. > > On my second last pass, I was compiling "without shared libraries" and got > some error in the make output indicating something like "I don't want to do > that because it requires shared libraries." I had "shared libraries" as > negative in the config step. > > On my last ccmake I configured for "with shared libraries" and my last > compile just finished with no errors. > > It looks like somewhere in the ccmake process, a dependency on "shared > libraries" exists, and config passes with no errors even if "shared > libraries" is off - this leads to a fail at compile time. > > Seems like a hard to reproduce error, let me know if you want any of my > local files to document a possible bug in the compile process. > > Regards, > > Nick > > On Wed, Sep 27, 2017 at 10:36 AM, Dan Lipsa wrote: > >> Indeed, that's what you probably need to do. Look at the symbols not >> found and search on the web to see what packages they are part of. >> >> On Wed, Sep 27, 2017 at 10:04 AM, Nick Torenvliet > > wrote: >> >>> Ooops! >>> >>> Hey Dan, thanks! It is now working fine - guess I need to bone up on my >>> ccmake skills. >>> >>> Another question then, >>> >>> A couple of the examples are coughing with: >>> >>> _tkinter.TclError: couldn't load file "libvtkRenderingPythonTkWidget >>> s-8.0.so": libvtkRenderingPythonTkWidgets-8.0.so: cannot open shared >>> object file: No such file or directory >>> >>> So to address this I am attempting to rebuild with GROUP_TK set on. >>> >>> Now I get the following compile error: >>> [ 87%] Linking CXX executable ../../../../bin/vtkInteraction >>> WidgetsCxxTests >>> [ 87%] Built target vtkInteractionWidgetsCxxTests >>> Makefile:138: recipe for target 'all' failed >>> make: *** [all] Error 2 >>> >>> I'm going to hunt around and probably install twenty or so random >>> packages that look anything like what I find @ 138 but if anyone knows what >>> I need to do, please let me know. >>> >>> Thanks, >>> >>> Nick >>> >>> >>> >>> >>> >>> >>> On Wed, Sep 27, 2017 at 9:26 AM, Dan Lipsa >>> wrote: >>> >>>> Nick, >>>> >>>> You should have VTK_PYTHON_VERSION=3 and VTK_WRAP_PYTHON=ON >>>> You should use vtkpython. This has all the right paths to see the VTK >>>> library. >>>> >>>> Take a look in your CMakeCache.txt and search for python to see your >>>> python related variables. If some point to python2 paths delete them and >>>> reconfigure and rebuild your VTK. >>>> >>>> Hope this helps, >>>> Dan >>>> >>>> >>>> On Tue, Sep 26, 2017 at 9:32 PM, Nick Torenvliet < >>>> natorenvliet at gmail.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> I'm running ubuntu 16.04 with python3. >>>>> >>>>> After compiling and installing vtk8 the following occurs. >>>>> >>>>> 1- I have an issue with doxygen / docs during vtk make install >>>>> >>>>> After make install >>>>> >>>>> 1- I fire up a python 3 window and can import vtk, but cannot call any >>>>> of the vtk functions except for those beginning with __ >>>>> 2- I fire up my python2 window and cannot import vtk at all >>>>> 3- I fire up vtkpython, which looks to be p3.5 and cannot import vtk >>>>> at all >>>>> >>>>> I feel like I'm missing a major step hooking the wrappers up into the >>>>> python environment. >>>>> >>>>> My desired functionality is to have vtk in python 3.5, optimally in a >>>>> venv if possible. >>>>> >>>>> Any ideas? >>>>> >>>>> Nick >>>>> >>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Wed Sep 27 11:55:17 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Wed, 27 Sep 2017 11:55:17 -0400 Subject: [vtkusers] Python and VTK In-Reply-To: References: Message-ID: I see... thanks David! On Wed, Sep 27, 2017 at 11:52 AM, David Gobbi wrote: > Hi Nick, > > Also check CMAKE_BUILD_TYPE. If it is set like the following, then your > compile was done with no optimization and the resulting VTK will be rather > slow: > > CMAKE_BUILD_TYPE:STRING= > > You should make sure that this is set to "Release" or "RelWithDebInfo" > (unless you specifically want a debug build, in which case you should set > it to "Debug"). > > > Building VTK with the Python wrappers requires BUILD_SHARED_LIBS=ON in the > general case. This is known by everyone who builds the VTK Python wrappers > on a regular basis, but perhaps it isn't documented as well as it should be. > > However, cmake does not force shared libraries when VTK_WRAP_PYTHON is on > because there are some situations where static libraries make sense with > Python, e.g. when someone wants to build their very own Python executable > with all the libraries built-in. > > - David > > > On Wed, Sep 27, 2017 at 9:03 AM, Nick Torenvliet > wrote: > >> Hey Dan, >> >> It looks like it worked. >> >> On my second last pass, I was compiling "without shared libraries" and >> got some error in the make output indicating something like "I don't want >> to do that because it requires shared libraries." I had "shared libraries" >> as negative in the config step. >> >> On my last ccmake I configured for "with shared libraries" and my last >> compile just finished with no errors. >> >> It looks like somewhere in the ccmake process, a dependency on "shared >> libraries" exists, and config passes with no errors even if "shared >> libraries" is off - this leads to a fail at compile time. >> >> Seems like a hard to reproduce error, let me know if you want any of my >> local files to document a possible bug in the compile process. >> >> Regards, >> >> Nick >> >> On Wed, Sep 27, 2017 at 10:36 AM, Dan Lipsa >> wrote: >> >>> Indeed, that's what you probably need to do. Look at the symbols not >>> found and search on the web to see what packages they are part of. >>> >>> On Wed, Sep 27, 2017 at 10:04 AM, Nick Torenvliet < >>> natorenvliet at gmail.com> wrote: >>> >>>> Ooops! >>>> >>>> Hey Dan, thanks! It is now working fine - guess I need to bone up on >>>> my ccmake skills. >>>> >>>> Another question then, >>>> >>>> A couple of the examples are coughing with: >>>> >>>> _tkinter.TclError: couldn't load file "libvtkRenderingPythonTkWidget >>>> s-8.0.so": libvtkRenderingPythonTkWidgets-8.0.so: cannot open shared >>>> object file: No such file or directory >>>> >>>> So to address this I am attempting to rebuild with GROUP_TK set on. >>>> >>>> Now I get the following compile error: >>>> [ 87%] Linking CXX executable ../../../../bin/vtkInteraction >>>> WidgetsCxxTests >>>> [ 87%] Built target vtkInteractionWidgetsCxxTests >>>> Makefile:138: recipe for target 'all' failed >>>> make: *** [all] Error 2 >>>> >>>> I'm going to hunt around and probably install twenty or so random >>>> packages that look anything like what I find @ 138 but if anyone knows what >>>> I need to do, please let me know. >>>> >>>> Thanks, >>>> >>>> Nick >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, Sep 27, 2017 at 9:26 AM, Dan Lipsa >>>> wrote: >>>> >>>>> Nick, >>>>> >>>>> You should have VTK_PYTHON_VERSION=3 and VTK_WRAP_PYTHON=ON >>>>> You should use vtkpython. This has all the right paths to see the VTK >>>>> library. >>>>> >>>>> Take a look in your CMakeCache.txt and search for python to see your >>>>> python related variables. If some point to python2 paths delete them and >>>>> reconfigure and rebuild your VTK. >>>>> >>>>> Hope this helps, >>>>> Dan >>>>> >>>>> >>>>> On Tue, Sep 26, 2017 at 9:32 PM, Nick Torenvliet < >>>>> natorenvliet at gmail.com> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I'm running ubuntu 16.04 with python3. >>>>>> >>>>>> After compiling and installing vtk8 the following occurs. >>>>>> >>>>>> 1- I have an issue with doxygen / docs during vtk make install >>>>>> >>>>>> After make install >>>>>> >>>>>> 1- I fire up a python 3 window and can import vtk, but cannot call >>>>>> any of the vtk functions except for those beginning with __ >>>>>> 2- I fire up my python2 window and cannot import vtk at all >>>>>> 3- I fire up vtkpython, which looks to be p3.5 and cannot import vtk >>>>>> at all >>>>>> >>>>>> I feel like I'm missing a major step hooking the wrappers up into the >>>>>> python environment. >>>>>> >>>>>> My desired functionality is to have vtk in python 3.5, optimally in a >>>>>> venv if possible. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Nick >>>>>> >>>>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Wed Sep 27 12:21:51 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Wed, 27 Sep 2017 12:21:51 -0400 Subject: [vtkusers] Python and VTK In-Reply-To: References: Message-ID: Now I am getting an error as follows: pantheon:~/vtk/VTK-8.0.1/Examples/GUI$ /usr/local/bin/vtkpython Python/BoxWidget.py /usr/local/bin/vtkpython: error while loading shared libraries: libvtksys-8.0.so.1: cannot open shared object file: No such file or directory But /usr/local/libvtksys-8.0.so.1 exists- do I need to set a path? On Wed, Sep 27, 2017 at 11:55 AM, Nick Torenvliet wrote: > I see... thanks David! > > On Wed, Sep 27, 2017 at 11:52 AM, David Gobbi > wrote: > >> Hi Nick, >> >> Also check CMAKE_BUILD_TYPE. If it is set like the following, then your >> compile was done with no optimization and the resulting VTK will be rather >> slow: >> >> CMAKE_BUILD_TYPE:STRING= >> >> You should make sure that this is set to "Release" or "RelWithDebInfo" >> (unless you specifically want a debug build, in which case you should set >> it to "Debug"). >> >> >> Building VTK with the Python wrappers requires BUILD_SHARED_LIBS=ON in >> the general case. This is known by everyone who builds the VTK Python >> wrappers on a regular basis, but perhaps it isn't documented as well as it >> should be. >> >> However, cmake does not force shared libraries when VTK_WRAP_PYTHON is on >> because there are some situations where static libraries make sense with >> Python, e.g. when someone wants to build their very own Python executable >> with all the libraries built-in. >> >> - David >> >> >> On Wed, Sep 27, 2017 at 9:03 AM, Nick Torenvliet >> wrote: >> >>> Hey Dan, >>> >>> It looks like it worked. >>> >>> On my second last pass, I was compiling "without shared libraries" and >>> got some error in the make output indicating something like "I don't want >>> to do that because it requires shared libraries." I had "shared libraries" >>> as negative in the config step. >>> >>> On my last ccmake I configured for "with shared libraries" and my last >>> compile just finished with no errors. >>> >>> It looks like somewhere in the ccmake process, a dependency on "shared >>> libraries" exists, and config passes with no errors even if "shared >>> libraries" is off - this leads to a fail at compile time. >>> >>> Seems like a hard to reproduce error, let me know if you want any of my >>> local files to document a possible bug in the compile process. >>> >>> Regards, >>> >>> Nick >>> >>> On Wed, Sep 27, 2017 at 10:36 AM, Dan Lipsa >>> wrote: >>> >>>> Indeed, that's what you probably need to do. Look at the symbols not >>>> found and search on the web to see what packages they are part of. >>>> >>>> On Wed, Sep 27, 2017 at 10:04 AM, Nick Torenvliet < >>>> natorenvliet at gmail.com> wrote: >>>> >>>>> Ooops! >>>>> >>>>> Hey Dan, thanks! It is now working fine - guess I need to bone up on >>>>> my ccmake skills. >>>>> >>>>> Another question then, >>>>> >>>>> A couple of the examples are coughing with: >>>>> >>>>> _tkinter.TclError: couldn't load file "libvtkRenderingPythonTkWidget >>>>> s-8.0.so": libvtkRenderingPythonTkWidgets-8.0.so: cannot open shared >>>>> object file: No such file or directory >>>>> >>>>> So to address this I am attempting to rebuild with GROUP_TK set on. >>>>> >>>>> Now I get the following compile error: >>>>> [ 87%] Linking CXX executable ../../../../bin/vtkInteraction >>>>> WidgetsCxxTests >>>>> [ 87%] Built target vtkInteractionWidgetsCxxTests >>>>> Makefile:138: recipe for target 'all' failed >>>>> make: *** [all] Error 2 >>>>> >>>>> I'm going to hunt around and probably install twenty or so random >>>>> packages that look anything like what I find @ 138 but if anyone knows what >>>>> I need to do, please let me know. >>>>> >>>>> Thanks, >>>>> >>>>> Nick >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Wed, Sep 27, 2017 at 9:26 AM, Dan Lipsa >>>>> wrote: >>>>> >>>>>> Nick, >>>>>> >>>>>> You should have VTK_PYTHON_VERSION=3 and VTK_WRAP_PYTHON=ON >>>>>> You should use vtkpython. This has all the right paths to see the VTK >>>>>> library. >>>>>> >>>>>> Take a look in your CMakeCache.txt and search for python to see your >>>>>> python related variables. If some point to python2 paths delete them and >>>>>> reconfigure and rebuild your VTK. >>>>>> >>>>>> Hope this helps, >>>>>> Dan >>>>>> >>>>>> >>>>>> On Tue, Sep 26, 2017 at 9:32 PM, Nick Torenvliet < >>>>>> natorenvliet at gmail.com> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I'm running ubuntu 16.04 with python3. >>>>>>> >>>>>>> After compiling and installing vtk8 the following occurs. >>>>>>> >>>>>>> 1- I have an issue with doxygen / docs during vtk make install >>>>>>> >>>>>>> After make install >>>>>>> >>>>>>> 1- I fire up a python 3 window and can import vtk, but cannot call >>>>>>> any of the vtk functions except for those beginning with __ >>>>>>> 2- I fire up my python2 window and cannot import vtk at all >>>>>>> 3- I fire up vtkpython, which looks to be p3.5 and cannot import vtk >>>>>>> at all >>>>>>> >>>>>>> I feel like I'm missing a major step hooking the wrappers up into >>>>>>> the python environment. >>>>>>> >>>>>>> My desired functionality is to have vtk in python 3.5, optimally in >>>>>>> a venv if possible. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Nick >>>>>>> >>>>>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Sep 27 12:29:27 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 27 Sep 2017 10:29:27 -0600 Subject: [vtkusers] Python and VTK In-Reply-To: References: Message-ID: Did you run "sudo ldconfig" to update the shared library cache? Is /usr/local/lib in /etc/ld.so.conf, or in a file in /etc/ld.so.conf.d/? On Wed, Sep 27, 2017 at 10:21 AM, Nick Torenvliet wrote: > Now I am getting an error as follows: > > pantheon:~/vtk/VTK-8.0.1/Examples/GUI$ /usr/local/bin/vtkpython > Python/BoxWidget.py > /usr/local/bin/vtkpython: error while loading shared libraries: > libvtksys-8.0.so.1: cannot open shared object file: No such file or > directory > > But /usr/local/libvtksys-8.0.so.1 exists- do I need to set a path? > > > On Wed, Sep 27, 2017 at 11:55 AM, Nick Torenvliet > wrote: > >> I see... thanks David! >> >> On Wed, Sep 27, 2017 at 11:52 AM, David Gobbi >> wrote: >> >>> Hi Nick, >>> >>> Also check CMAKE_BUILD_TYPE. If it is set like the following, then your >>> compile was done with no optimization and the resulting VTK will be rather >>> slow: >>> >>> CMAKE_BUILD_TYPE:STRING= >>> >>> You should make sure that this is set to "Release" or "RelWithDebInfo" >>> (unless you specifically want a debug build, in which case you should set >>> it to "Debug"). >>> >>> >>> Building VTK with the Python wrappers requires BUILD_SHARED_LIBS=ON in >>> the general case. This is known by everyone who builds the VTK Python >>> wrappers on a regular basis, but perhaps it isn't documented as well as it >>> should be. >>> >>> However, cmake does not force shared libraries when VTK_WRAP_PYTHON is >>> on because there are some situations where static libraries make sense with >>> Python, e.g. when someone wants to build their very own Python executable >>> with all the libraries built-in. >>> >>> - David >>> >>> >>> On Wed, Sep 27, 2017 at 9:03 AM, Nick Torenvliet >> > wrote: >>> >>>> Hey Dan, >>>> >>>> It looks like it worked. >>>> >>>> On my second last pass, I was compiling "without shared libraries" and >>>> got some error in the make output indicating something like "I don't want >>>> to do that because it requires shared libraries." I had "shared libraries" >>>> as negative in the config step. >>>> >>>> On my last ccmake I configured for "with shared libraries" and my last >>>> compile just finished with no errors. >>>> >>>> It looks like somewhere in the ccmake process, a dependency on "shared >>>> libraries" exists, and config passes with no errors even if "shared >>>> libraries" is off - this leads to a fail at compile time. >>>> >>>> Seems like a hard to reproduce error, let me know if you want any of my >>>> local files to document a possible bug in the compile process. >>>> >>>> Regards, >>>> >>>> Nick >>>> >>>> On Wed, Sep 27, 2017 at 10:36 AM, Dan Lipsa >>>> wrote: >>>> >>>>> Indeed, that's what you probably need to do. Look at the symbols not >>>>> found and search on the web to see what packages they are part of. >>>>> >>>>> On Wed, Sep 27, 2017 at 10:04 AM, Nick Torenvliet < >>>>> natorenvliet at gmail.com> wrote: >>>>> >>>>>> Ooops! >>>>>> >>>>>> Hey Dan, thanks! It is now working fine - guess I need to bone up on >>>>>> my ccmake skills. >>>>>> >>>>>> Another question then, >>>>>> >>>>>> A couple of the examples are coughing with: >>>>>> >>>>>> _tkinter.TclError: couldn't load file "libvtkRenderingPythonTkWidget >>>>>> s-8.0.so": libvtkRenderingPythonTkWidgets-8.0.so: cannot open shared >>>>>> object file: No such file or directory >>>>>> >>>>>> So to address this I am attempting to rebuild with GROUP_TK set on. >>>>>> >>>>>> Now I get the following compile error: >>>>>> [ 87%] Linking CXX executable ../../../../bin/vtkInteraction >>>>>> WidgetsCxxTests >>>>>> [ 87%] Built target vtkInteractionWidgetsCxxTests >>>>>> Makefile:138: recipe for target 'all' failed >>>>>> make: *** [all] Error 2 >>>>>> >>>>>> I'm going to hunt around and probably install twenty or so random >>>>>> packages that look anything like what I find @ 138 but if anyone knows what >>>>>> I need to do, please let me know. >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Nick >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Sep 27, 2017 at 9:26 AM, Dan Lipsa >>>>>> wrote: >>>>>> >>>>>>> Nick, >>>>>>> >>>>>>> You should have VTK_PYTHON_VERSION=3 and VTK_WRAP_PYTHON=ON >>>>>>> You should use vtkpython. This has all the right paths to see the >>>>>>> VTK library. >>>>>>> >>>>>>> Take a look in your CMakeCache.txt and search for python to see your >>>>>>> python related variables. If some point to python2 paths delete them and >>>>>>> reconfigure and rebuild your VTK. >>>>>>> >>>>>>> Hope this helps, >>>>>>> Dan >>>>>>> >>>>>>> >>>>>>> On Tue, Sep 26, 2017 at 9:32 PM, Nick Torenvliet < >>>>>>> natorenvliet at gmail.com> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I'm running ubuntu 16.04 with python3. >>>>>>>> >>>>>>>> After compiling and installing vtk8 the following occurs. >>>>>>>> >>>>>>>> 1- I have an issue with doxygen / docs during vtk make install >>>>>>>> >>>>>>>> After make install >>>>>>>> >>>>>>>> 1- I fire up a python 3 window and can import vtk, but cannot call >>>>>>>> any of the vtk functions except for those beginning with __ >>>>>>>> 2- I fire up my python2 window and cannot import vtk at all >>>>>>>> 3- I fire up vtkpython, which looks to be p3.5 and cannot import >>>>>>>> vtk at all >>>>>>>> >>>>>>>> I feel like I'm missing a major step hooking the wrappers up into >>>>>>>> the python environment. >>>>>>>> >>>>>>>> My desired functionality is to have vtk in python 3.5, optimally in >>>>>>>> a venv if possible. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Nick >>>>>>>> >>>>>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Wed Sep 27 12:31:28 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Wed, 27 Sep 2017 12:31:28 -0400 Subject: [vtkusers] Python and VTK In-Reply-To: References: Message-ID: I will... forgot that little trick. I threw a link in /usr/lib ... did the trick... ldconfig will be better I'm sure. Thanks again David. On Wed, Sep 27, 2017 at 12:29 PM, David Gobbi wrote: > Did you run "sudo ldconfig" to update the shared library cache? > > Is /usr/local/lib in /etc/ld.so.conf, or in a file in /etc/ld.so.conf.d/? > > On Wed, Sep 27, 2017 at 10:21 AM, Nick Torenvliet > wrote: > >> Now I am getting an error as follows: >> >> pantheon:~/vtk/VTK-8.0.1/Examples/GUI$ /usr/local/bin/vtkpython >> Python/BoxWidget.py >> /usr/local/bin/vtkpython: error while loading shared libraries: >> libvtksys-8.0.so.1: cannot open shared object file: No such file or >> directory >> >> But /usr/local/libvtksys-8.0.so.1 exists- do I need to set a path? >> >> >> On Wed, Sep 27, 2017 at 11:55 AM, Nick Torenvliet > > wrote: >> >>> I see... thanks David! >>> >>> On Wed, Sep 27, 2017 at 11:52 AM, David Gobbi >>> wrote: >>> >>>> Hi Nick, >>>> >>>> Also check CMAKE_BUILD_TYPE. If it is set like the following, then >>>> your compile was done with no optimization and the resulting VTK will be >>>> rather slow: >>>> >>>> CMAKE_BUILD_TYPE:STRING= >>>> >>>> You should make sure that this is set to "Release" or "RelWithDebInfo" >>>> (unless you specifically want a debug build, in which case you should set >>>> it to "Debug"). >>>> >>>> >>>> Building VTK with the Python wrappers requires BUILD_SHARED_LIBS=ON in >>>> the general case. This is known by everyone who builds the VTK Python >>>> wrappers on a regular basis, but perhaps it isn't documented as well as it >>>> should be. >>>> >>>> However, cmake does not force shared libraries when VTK_WRAP_PYTHON is >>>> on because there are some situations where static libraries make sense with >>>> Python, e.g. when someone wants to build their very own Python executable >>>> with all the libraries built-in. >>>> >>>> - David >>>> >>>> >>>> On Wed, Sep 27, 2017 at 9:03 AM, Nick Torenvliet < >>>> natorenvliet at gmail.com> wrote: >>>> >>>>> Hey Dan, >>>>> >>>>> It looks like it worked. >>>>> >>>>> On my second last pass, I was compiling "without shared libraries" and >>>>> got some error in the make output indicating something like "I don't want >>>>> to do that because it requires shared libraries." I had "shared libraries" >>>>> as negative in the config step. >>>>> >>>>> On my last ccmake I configured for "with shared libraries" and my last >>>>> compile just finished with no errors. >>>>> >>>>> It looks like somewhere in the ccmake process, a dependency on "shared >>>>> libraries" exists, and config passes with no errors even if "shared >>>>> libraries" is off - this leads to a fail at compile time. >>>>> >>>>> Seems like a hard to reproduce error, let me know if you want any of >>>>> my local files to document a possible bug in the compile process. >>>>> >>>>> Regards, >>>>> >>>>> Nick >>>>> >>>>> On Wed, Sep 27, 2017 at 10:36 AM, Dan Lipsa >>>>> wrote: >>>>> >>>>>> Indeed, that's what you probably need to do. Look at the symbols not >>>>>> found and search on the web to see what packages they are part of. >>>>>> >>>>>> On Wed, Sep 27, 2017 at 10:04 AM, Nick Torenvliet < >>>>>> natorenvliet at gmail.com> wrote: >>>>>> >>>>>>> Ooops! >>>>>>> >>>>>>> Hey Dan, thanks! It is now working fine - guess I need to bone up >>>>>>> on my ccmake skills. >>>>>>> >>>>>>> Another question then, >>>>>>> >>>>>>> A couple of the examples are coughing with: >>>>>>> >>>>>>> _tkinter.TclError: couldn't load file "libvtkRenderingPythonTkWidget >>>>>>> s-8.0.so": libvtkRenderingPythonTkWidgets-8.0.so: cannot open >>>>>>> shared object file: No such file or directory >>>>>>> >>>>>>> So to address this I am attempting to rebuild with GROUP_TK set on. >>>>>>> >>>>>>> Now I get the following compile error: >>>>>>> [ 87%] Linking CXX executable ../../../../bin/vtkInteraction >>>>>>> WidgetsCxxTests >>>>>>> [ 87%] Built target vtkInteractionWidgetsCxxTests >>>>>>> Makefile:138: recipe for target 'all' failed >>>>>>> make: *** [all] Error 2 >>>>>>> >>>>>>> I'm going to hunt around and probably install twenty or so random >>>>>>> packages that look anything like what I find @ 138 but if anyone knows what >>>>>>> I need to do, please let me know. >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Nick >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Sep 27, 2017 at 9:26 AM, Dan Lipsa >>>>>>> wrote: >>>>>>> >>>>>>>> Nick, >>>>>>>> >>>>>>>> You should have VTK_PYTHON_VERSION=3 and VTK_WRAP_PYTHON=ON >>>>>>>> You should use vtkpython. This has all the right paths to see the >>>>>>>> VTK library. >>>>>>>> >>>>>>>> Take a look in your CMakeCache.txt and search for python to see >>>>>>>> your python related variables. If some point to python2 paths delete them >>>>>>>> and reconfigure and rebuild your VTK. >>>>>>>> >>>>>>>> Hope this helps, >>>>>>>> Dan >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Sep 26, 2017 at 9:32 PM, Nick Torenvliet < >>>>>>>> natorenvliet at gmail.com> wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> I'm running ubuntu 16.04 with python3. >>>>>>>>> >>>>>>>>> After compiling and installing vtk8 the following occurs. >>>>>>>>> >>>>>>>>> 1- I have an issue with doxygen / docs during vtk make install >>>>>>>>> >>>>>>>>> After make install >>>>>>>>> >>>>>>>>> 1- I fire up a python 3 window and can import vtk, but cannot call >>>>>>>>> any of the vtk functions except for those beginning with __ >>>>>>>>> 2- I fire up my python2 window and cannot import vtk at all >>>>>>>>> 3- I fire up vtkpython, which looks to be p3.5 and cannot import >>>>>>>>> vtk at all >>>>>>>>> >>>>>>>>> I feel like I'm missing a major step hooking the wrappers up into >>>>>>>>> the python environment. >>>>>>>>> >>>>>>>>> My desired functionality is to have vtk in python 3.5, optimally >>>>>>>>> in a venv if possible. >>>>>>>>> >>>>>>>>> Any ideas? >>>>>>>>> >>>>>>>>> Nick >>>>>>>>> >>>>>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From siming.bayer at gmail.com Wed Sep 27 12:36:55 2017 From: siming.bayer at gmail.com (Siming Bayer) Date: Wed, 27 Sep 2017 18:36:55 +0200 Subject: [vtkusers] Correct way to save the output of vtkProbeFilter Message-ID: <29BC86E4-3ACD-46C4-9747-D5BE8771778E@gmail.com> Dear all, Could somebody please provide a correct way to save the output of vtkProbeFilter? I used the following code to save it as vtkStructuredGrid (probe ist a vtkProbeFilter) vtkSmartPointer probe = vtkSmartPointer::New(); ?... //save the output of probefileter as .vtu file vtkSmartPointer sgrid = vtkSmartPointer::New(); sgrid->SetDimensions(256, 256, 256); sgrid->SetPoints(probePoints); unsigned int numberOfArrays = probe->GetOutput()->GetPointData()->GetNumberOfArrays(); std::cout << "Copying arrays:" << std::endl; for (unsigned int i = 0; i < numberOfArrays; i++) { std::cout << "\t" << probe->GetOutput()->GetPointData()->GetArray(i)->GetName() << std::endl; sgrid->GetPointData()->AddArray(probe->GetOutput()->GetPointData()->GetArray(i)); } std::cout << "Writing .vts output" << std::endl; vtkSmartPointer sWriter = vtkSmartPointer::New(); sWriter->SetFileName("test.vts"); sWriter->SetInputData(sgrid); sWriter->Write(); But I got errors when I try to load the .vts file in paraview: ERROR: In C:\bbd\7cc78367\build\superbuild\paraview\src\VTK\IO\XML\vtkXMLStructuredDataReader.cxx, line 360 vtkXMLStructuredGridReader (000000000BA5C060): Error reading extent 0 255 0 255 0 255 from piece 0 ERROR: In C:\bbd\7cc78367\build\superbuild\paraview\src\VTK\IO\XML\vtkXMLDataReader.cxx, line 443 vtkXMLStructuredGridReader (000000000BA5C060): Cannot read point data array "position" from PointData in piece 0. The data array in the element may be too short. What do I do wrong? Thanks! best, Siming -------------- next part -------------- An HTML attachment was scrubbed... URL: From elhassan.abdou at gmail.com Wed Sep 27 17:15:03 2017 From: elhassan.abdou at gmail.com (Elhassan Abdou) Date: Wed, 27 Sep 2017 23:15:03 +0200 Subject: [vtkusers] Does vtk uses really glu.dll Message-ID: Hi all, In which classes do VTK uses glu or link to glu.dll? How was it replaced in the Andriod rendering pipeline? Regards Elhassan -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Thu Sep 28 08:36:58 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Thu, 28 Sep 2017 08:36:58 -0400 Subject: [vtkusers] Python Wrapper Documentation Message-ID: Hi all, I've downloaded the doxygen html docs for vtk8. Did not generate docs on install due to that option causing errors on make(something wrong with my tex install I think). This has re-invigorated my life-long hatred for tex, latex and anything associated. Searching on the net I find references to vtk.util.numpy_support and I can see the source which works for me Searching the downloaded docs, I see no ref to the wrapper functions and classes. I am wondering if there are nice doxygen generated pages for the python wrapper somewhere that I am missing? Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.nellmeldin at open-engineering.com Thu Sep 28 10:43:46 2017 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Thu, 28 Sep 2017 16:43:46 +0200 Subject: [vtkusers] Export mesh of cutting plane Message-ID: Hello. I have a method to cut a volume in a vtkUnstructuredGrid given a vtkPlane. I'm using vtkTableBasedClipDataSet to extract half of the model, also as vtkUnstructuredGrid. This is working. Now, I would like to obtain ONLY the surface of the cut, than means: I want a vtkUnstructuredGrid with the nodes and faces being on the surface of the cut. How can this be achieved? I tried using vtkCutter with vtkStripper but the mesh I get doesn't have any cells, only the points and their associated data. Here's how my code looks like. Thank You! vtkSmartPointer model = vtkSmartPointer::New(); // fill the ugrid ... // Create The Plane to cut vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetOrigin(0.0, 0.0, 0.0); plane->SetNormal(1.0, 0, 0); // Code to cut the model in half vtkSmartPointer clipDataSet = vtkSmartPointer::New(); clipDataSet->SetClipFunction(plane); clipDataSet->InsideOutOn(); clipDataSet->GenerateClippedOutputOn(); clipDataSet->SetInputConnection(model->GetProducerPort()); clipDataSet->Update(); // This has half the model, this is Ok but not what I want vtkSmartPointer halfModel = clipDataSet->GetOutput(); ////****//// // BEGINS code not working to extract the surface of the cut vtkSmartPointer cutter = vtkSmartPointer::New(); cutter->SetCutFunction(plane); cutter->SetInputConnection(model->GetProducerPort()); cutter->Update(); vtkSmartPointer stripper = vtkSmartPointer::New(); stripper->SetInputConnection(cutter->GetOutputPort()); stripper->Update(); vtkSmartPointer pd = vtkSmartPointer::New(); pd->SetPoints(stripper->GetOutput()->GetPoints()); pd->SetPolys(stripper->GetOutput()->GetLines()); vtkSmartPointer clipped = vtkSmartPointer::New(); clipped->ShallowCopy(pd); // Here I see that there is no Cells clipped->Print(std::cout); // ENDS code to extract the surface of the cut ////****//// // Write the unstructured grid vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("d:/unstructuredGrid.vtu"); writer->SetInput(clipped); writer->SetDataModeToAscii(); writer->Write(); // file doesnt have any cell, only points and pointdata -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Sep 28 11:31:02 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 28 Sep 2017 11:31:02 -0400 Subject: [vtkusers] Does vtk uses really glu.dll In-Reply-To: References: Message-ID: I believe the new OpenGL2 rendering backend does not make use of glu. It is used by the old backend. Only the new back end works on android. On Wed, Sep 27, 2017 at 5:15 PM, Elhassan Abdou wrote: > Hi all, > > In which classes do VTK uses glu or link to glu.dll? > How was it replaced in the Andriod rendering pipeline? > > Regards > > Elhassan > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Sep 28 14:21:15 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 28 Sep 2017 14:21:15 -0400 Subject: [vtkusers] Python Wrapper Documentation In-Reply-To: References: Message-ID: Nick, You should use the VTK C++ documentation https://www.vtk.org/doc/nightly/html/index.html augmented by https://www.vtk.org/Wiki/VTK/Python_Wrapping_FAQ especially the README link in that file which tells you how to convert from C++ to Python. Hope this helps, Dan On Thu, Sep 28, 2017 at 8:36 AM, Nick Torenvliet wrote: > Hi all, > > I've downloaded the doxygen html docs for vtk8. > > Did not generate docs on install due to that option causing errors on > make(something wrong with my tex install I think). This has re-invigorated > my life-long hatred for tex, latex and anything associated. > > Searching on the net I find references to vtk.util.numpy_support and I can > see the source which works for me > > Searching the downloaded docs, I see no ref to the wrapper functions and > classes. > > I am wondering if there are nice doxygen generated pages for the python > wrapper somewhere that I am missing? > > Nick > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hurtado at gmail.com Thu Sep 28 15:03:59 2017 From: jan.hurtado at gmail.com (Jan Jose Hurtado Jauregui) Date: Thu, 28 Sep 2017 16:03:59 -0300 Subject: [vtkusers] Obtain same visualization of vtkResliceImageViewer using vtkImagePlaneWidget Message-ID: Hi all, I am using vtkResliceImageViewer and vtkImagePlaneWidget to show slice planes. My problem is that i can't obtain the same behavior of the image viewer for the plane widget. Please see the attached figure where the green colored voxels have a smooth transition in the image viewer and in the case of the plane widget they look bigger. I am setting the plane widget in this way: vtkSmartPointer ipwProp2 = vtkSmartPointer::New(); t_planeWidget = vtkSmartPointer::New(); t_planeWidget->SetInteractor(iren); t_planeWidget->SetPicker(picker); t_planeWidget->RestrictPlaneToVolumeOn(); double t_color[3] = { 1, 1, 1 }; t_planeWidget->GetPlaneProperty()->SetColor(t_color); t_planeWidget->SetTexturePlaneProperty(ipwProp2); t_planeWidget->TextureInterpolateOff(); t_planeWidget->SetResliceInterpolateToLinear(); t_planeWidget->SetInputData(m_data.m_visualization_segmented_volume); t_planeWidget->SetPlaneOrientation(0); t_planeWidget->SetSliceIndex(imageDims[0] / 2); t_planeWidget->SetDefaultRenderer(ren); t_planeWidget->GetTexture()->SetLookupTable(lookupTable); t_planeWidget->GetTexture()->MapColorScalarsThroughLookupTableOn(); t_planeWidget->On(); t_planeWidget->InteractionOff(); Both objects are sharing the same image (i.e. m_data.m_visualization_segmented_volume) and the same lookup table. I don't know if the texture is resampled or something like that. In summary i want to obtain the same image in both objects, the vtkImageActor of the image viewer and the vtkActor of the plane widget. I am using VTK 7.1.0. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.jpg Type: image/jpeg Size: 125507 bytes Desc: not available URL: From onatt at gmx.de Thu Sep 28 15:31:28 2017 From: onatt at gmx.de (Oliver Natt) Date: Thu, 28 Sep 2017 21:31:28 +0200 Subject: [vtkusers] vtkImagePlaneWidget interpolation problem Message-ID: Dear vtkusers, during my work on a small programm for the analysis of computed tomography data I found an unexpected behaviour of the vtkImagePlaneWidget. I tried to boil down the problem to a small python script, which uses a very small image dimension of only 3 x 3 x 3, where the effect becomes prominent (see python program below). The script makes a cut through a 3 x 3 x 3 volume using a vtkImagePlaneWidget. The four coloured spheres indicate the expected edges of the resulting image slice. The result is pretty much, what I expected (see attachement screenshot1.png). However, when I grab the vtkImagePlaneWidget using "Control + Middle Mouse Button" an move the plane around in the x-y plane, some unexpected effects occur (see screenshot2.png): Sometimes some kind of interpolation happens, which results in an image that looks rather like a 6 x 3 grid instead of 3 x 3 and also the position of the image relative to the four coloured spheres changes. What I require is a cut through the volume data that preserves the correct voxel boundaries. Is that possible using the vtkImagePlaneWidget or is there an alternative class, that serves this purpose? Many thanks Oliver import vtk import vtk.util.numpy_support import numpyas np # create a renderer renderer = vtk.vtkRenderer() renderer.SetBackground(0.2,0.2,0.5) renderer.SetBackground2(0.4,0.4,1.0) renderer.SetGradientBackground(True) # create a render_window render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) # create a renderwindowinteractor iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(render_window) iren.Initialize() # Create a 3 x 3 x 3 image data with a spacing of 1. image = vtk.vtkImageData() dat = np.linspace(1,27,27,dtype=np.int16) *10 dat = np.ascontiguousarray(dat) dat = vtk.util.numpy_support.numpy_to_vtk(dat,deep=1) image.SetDimensions(3,3,3) image.SetSpacing(1,1,1) image.GetPointData().SetScalars(dat) image.Modified() # Create a vtkImagePlaneWidget and activate it plane_widget = vtk.vtkImagePlaneWidget() plane_widget.TextureInterpolateOff() plane_widget.SetInputData(image) plane_widget.SetInteractor(render_window.GetInteractor()) plane_widget.SetOrigin(0,0,0) plane_widget.SetPoint1(8,0,0) plane_widget.SetPoint2(0,8,0) plane_widget.UpdatePlacement() plane_widget.DisplayTextOn() plane_widget.On() plane_widget.SetWindowLevel(200,50) rs = plane_widget.GetReslice() def create_sphere(x, y, z, col): """Create a small sphere with color col at postion x, y, z""" source = vtk.vtkSphereSource() source.SetCenter(x, y, z) source.SetRadius(0.2) mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(source.GetOutputPort()) actor = vtk.vtkActor() actor.SetMapper(mapper) actor.GetProperty().SetColor(col) renderer.AddActor(actor) # Position 4 small markers at the expected edges of the image slice. create_sphere(0,0,0, (1,0,0)) create_sphere(3,0,0, (0,1,0)) create_sphere(0,3,0, (0,0,1)) create_sphere(3,3,0, (1,1,0)) # Reset the camera and start the RenderWindowInteractor renderer.ResetCamera() iren.Start() -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot1.png Type: image/png Size: 15542 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot2.png Type: image/png Size: 14906 bytes Desc: not available URL: From sujin.philip at kitware.com Thu Sep 28 16:33:44 2017 From: sujin.philip at kitware.com (Sujin Philip) Date: Thu, 28 Sep 2017 16:33:44 -0400 Subject: [vtkusers] Correct way to save the output of vtkProbeFilter In-Reply-To: <29BC86E4-3ACD-46C4-9747-D5BE8771778E@gmail.com> References: <29BC86E4-3ACD-46C4-9747-D5BE8771778E@gmail.com> Message-ID: Hi Siming, Without looking at the full code it is difficult to say if you are creating the structured grid correctly. Why don't you directly write the output of the probe filter. Something like this: vtkSmartPointer sWriter = vtkSmartPointer< vtkXMLDataSetWriter>::New(); sWriter->SetFileName("test.vts"); sWriter->SetInputData(probe->GetOutput()); sWriter->Write(); Thanks Sujin On Wed, Sep 27, 2017 at 12:36 PM, Siming Bayer wrote: > Dear all, > > Could somebody please provide a correct way to save the output of > vtkProbeFilter? > > I used the following code to save it as vtkStructuredGrid (probe ist a > vtkProbeFilter) > vtkSmartPointer probe = vtkSmartPointer >::New(); > ?... > > //save the output of probefileter as .vtu file > > vtkSmartPointer sgrid = vtkSmartPointer dGrid>::New(); > > sgrid->SetDimensions(256, 256, 256); > > sgrid->SetPoints(probePoints); > > unsigned int numberOfArrays = probe->GetOutput()->GetPointData()-> > GetNumberOfArrays(); > > std::cout << "Copying arrays:" << std::endl; > > for (unsigned int i = 0; i < numberOfArrays; i++) > > { > > std::cout << "\t" << probe->GetOutput()->GetPointData()-> > GetArray(i)->GetName() << std::endl; > > sgrid->GetPointData()->AddArray(probe->GetOutput()-> > GetPointData()->GetArray(i)); > > } > > std::cout << "Writing .vts output" << std::endl; > > vtkSmartPointer sWriter = vtkSmartPointer< > vtkXMLStructuredGridWriter>::New(); > > sWriter->SetFileName("test.vts"); > > sWriter->SetInputData(sgrid); > > sWriter->Write(); > > But I got errors when I try to load the .vts file in paraview: > > ERROR: In C:\bbd\7cc78367\build\superbuild\paraview\src\VTK\IO\XML\ > vtkXMLStructuredDataReader.cxx, line 360 > vtkXMLStructuredGridReader (000000000BA5C060): Error reading extent 0 255 > 0 255 0 255 from piece 0 > > ERROR: In C:\bbd\7cc78367\build\superbuild\paraview\src\VTK\IO\XML\vtkXMLDataReader.cxx, > line 443 > vtkXMLStructuredGridReader (000000000BA5C060): Cannot read point data > array "position" from PointData in piece 0. The data array in the element > may be too short. > > > What do I do wrong? > > Thanks! > > best, > Siming > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From seb.an at icloud.com Thu Sep 28 16:35:13 2017 From: seb.an at icloud.com (sebastian_a) Date: Thu, 28 Sep 2017 13:35:13 -0700 (MST) Subject: [vtkusers] Iterative subdivision causes holes In-Reply-To: <1506442373179-0.post@n5.nabble.com> References: <1506442373179-0.post@n5.nabble.com> Message-ID: <1506630913702-0.post@n5.nabble.com> Hello again, I found a great filter which subdivides till a certain face size: vtkAdaptiveSubdivision. But still it seem like the vtkAppendPolyData won't put the two extracted PolyDatas together correctly and is causing holes on the common edges. The thing is: If I don't subdivide the cells, vtkAppendPolyData isn't causing holes. With any subdivision filter applied on the selected cells it is. So the workflow is: extract selected and unselected -> subdivide selected -> append subdivided and unselected. In the picture, the red cells have bin selected (cellIds) and then subdivided. Also there are cut throughs from 3 angles. I tried to fill the model, which caused errors as you see in the incomplete filling on the three pictures. def extractCells(polydata, ids, inverse): selectionNode = vtk.vtkSelectionNode() selectionNode.SetFieldType(vtk.vtkSelectionNode.CELL) selectionNode.SetContentType(vtk.vtkSelectionNode.INDICES) selectionNode.SetSelectionList(ids) if inverse == True: selectionNode.GetProperties().Set(vtk.vtkSelectionNode.INVERSE(),1) else: selectionNode.GetProperties().Set(vtk.vtkSelectionNode.INVERSE(),0) selection = vtk.vtkSelection() selection.AddNode(selectionNode) extractSelection = vtk.vtkExtractSelection() extractSelection.SetInputData(0, polydata) extractSelection.SetInputData(1, selection) extractSelection.Update() geometryFilter = vtk.vtkGeometryFilter() geometryFilter.SetInputData(extractSelection.GetOutput()) geometryFilter.Update() return geometryFilter.GetOutput() selectedPolyData = extractCells(inputPolyData, cellIds, False) # subdivide selected cells ids = vtk.vtkIdFilter() ids.SetInputData(largeFacePolyData) adapt = vtk.vtkAdaptiveSubdivisionFilter() adapt.SetInputConnection(ids.GetOutputPort()) adapt.SetMaximumEdgeLength(edgeLength) adapt.SetMaximumTriangleArea(vtk.VTK_INT_MAX) adapt.SetMaximumNumberOfPasses(vtk.VTK_INT_MAX) adapt.Update() unselectedPolyData = extractCells(inputPolyData, cellIds, True) appendFilter = vtk.vtkAppendPolyData() appendFilter.AddInputConnection(adapt.GetOutputPort()) appendFilter.AddInputData(unselectedPolyData) appendFilter.Update() outputPolyData = appendFilter.GetOutput() Thank you for your help, Sebastian -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From milefn at rpi.edu Thu Sep 28 16:53:36 2017 From: milefn at rpi.edu (Milef, Nicholas Boris) Date: Thu, 28 Sep 2017 20:53:36 +0000 Subject: [vtkusers] Creating billboard particle effects (e.g., smoke, fire) In-Reply-To: References: , , Message-ID: I was able to get something looking decent with the vtkPointGaussianMapper, but how do I change the blend mode? Right now it looks to be additive. ________________________________ From: Milef, Nicholas Boris Sent: Tuesday, September 26, 2017 4:53 PM To: Ken Martin Cc: vtkusers at vtk.org Subject: RE: [vtkusers] Creating billboard particle effects (e.g., smoke, fire) Thanks Ken! I'll give vtkPointGaussianMapper a try. It seems to be closest to what I want to do. ________________________________ From: Ken Martin [ken.martin at kitware.com] Sent: Tuesday, September 26, 2017 12:37 PM To: Milef, Nicholas Boris Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Creating billboard particle effects (e.g., smoke, fire) It depends on the specifics of the implementation but as a start 1) vtkPointGaussianMapper will draw billboard triangles and execute a possibly user defined sharer on them. This can be used to draw translucent splats/discs/squares/etc. based on the shader provided. 2) if you are thinking more as point sprites (fixed pixel size as opposed to world coord size) you can use the regular polydata mapper with a point size and then shade it/texture it 3) If you have 3D elements (as opposed to billboards) then you could use vtkGlyph3DMapper which under the hood uses opengl instancing to replicate geometry. 4) if you mostly want spheres or cylinders then there are dedicated mappers for those which is what the molecule mapper uses under the hood. Those mappers have the code to properly compute z values based on sphere/cylinder equations so they are not exactly billboards but more impostors. On Tue, Sep 26, 2017 at 12:12 PM, Milef, Nicholas Boris > wrote: What would be the best way to create billboard particle effects such as smoke or fire? Should I use the vtkMoleculeMapper? Example: http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/particles-instancing/ _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From natorenvliet at gmail.com Thu Sep 28 17:06:54 2017 From: natorenvliet at gmail.com (Nick Torenvliet) Date: Thu, 28 Sep 2017 17:06:54 -0400 Subject: [vtkusers] Help with vtkImageData() Message-ID: Hi there, I've attached a python script and a small pickle with associated data. A code snippet, from the file, is found below and some debug output is found below. My code is a quick hack of a working use of vtkImageData() from the mailing list archives. I've taken out the original author's (thanks quentan) data source and put in place my pickle file. When I run the script I get a window, but nothing visible in it except a black back-ground. I'm not sure if its data representation issues, viewport/camera issues, or pipeline issues; I'm open to all three actually - but I think its probably pipeline... the full extent of which is in the attached script. The original author has an (n1, n2, n3) matrix generated with a bunch of trig, but I am using an (n1, n2, 1) matrix that I can view in matplotlib as an image. My data numpy array on a grid generated by mlab.griddata. bscan_grid graphs well, as an image, in other packages, so I believe the issue is somewhere in the block below(with the missing pipeline). I was hoping to get a surface plot, or height map of my bscan_grid, with z mapped onto xy The attached script has a bunch of debug statements, the output when used on the attached pickle is underneath the code snippet. I've stripped the code out and put a subsection below to illustrate my question, which is how do I get my lovely vtkImdateData objectto chain over and into the mapper and render my surface? Thanks, Nick data_matrix = bscan_grid #bscan_grid comes from the attached pickle and is 997x148x1 vtk_data_array = numpy_support.numpy_to_vtk(num_array=data_matrix.ravel(), deep=True, array_type=vtk.VTK_FLOAT ) img_vtk = vtk.vtkImageData() img_vtk.SetOrigin(minax, minrot, 0) img_vtk.SetSpacing(bscan_adelta, bscan_rdelta, 1) img_vtk.SetDimensions(data_matrix.shape) img_vtk.GetPointData().SetScalars(vtk_data_array) ** Insert the magic filter widget view or transfrom thingy that connects a vtkImage to a mapper here ** ** Or alternatively, is there something wrong with the line below *** mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(magic.GetOutputPort()) mapper.SetScalarVisibility(0) actor = vtk.vtkActor() actor.SetMapper(mapper) actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderer.AddActor(actor) xmins = [8830] xmaxs = [8930] ymins = [34] ymaxs = [50] render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) renderer.ResetCamera() renderer.SetViewport(xmins[0], ymins[0], xmaxs[0], ymaxs[0]) render_window.SetSize(600, 600) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(render_window) interactor_style = vtk.vtkInteractorStyleTrackballCamera() iren.SetInteractorStyle(interactor_style) iren.Initialize() iren.Start() ####DEBUG STATEMENTS#### data_matrix intended x axis length 396 data_matrix intended x axis structured grid delta 0.100386432911 data_matrix intended x axis lower bound 8839.26083655 data_matrix intended x axis upper bound 8878.91347755 data_matrix intended y axis length 48 data_matrix intended y axis structured grid delta 0.104253241356 data_matrix intended y axis lower bound 34.1994628906 data_matrix intended y axis upper bound 39.0993652344 data_matrix intended z/scalar min -9.41352769373 data_matrix intended z/scalar max 19.5618770894 data_matrix dimensions (396, 48, 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: user_list_post.py Type: text/x-python Size: 2733 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data.pickle Type: application/octet-stream Size: 155984 bytes Desc: not available URL: From david.gobbi at gmail.com Thu Sep 28 17:48:29 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 28 Sep 2017 15:48:29 -0600 Subject: [vtkusers] vtkImagePlaneWidget interpolation problem In-Reply-To: References: Message-ID: Hi Oliver, The extra squares are due to an extra level of interpolation, you can get rid of them by using this: plane_widget.SetResliceInterpolateToNearestNeighbour() Also, in your code you have assumed that the origin of the image data volume is the outer corner of the first voxel. This is not correct. In VTK, the origin is always the center of the first voxel. As a result, you have placed the plane at the wrong position. Use this instead: plane_widget.SetOrigin(-0.5, -0.5, 0.0) plane_widget.SetPoint1(+7.5, -0.5, 0.0) plane_widget.SetPoint2(-0.5, +7.5, 0.0) create_sphere(-0.5, -0.5, 0, (1, 0, 0)) create_sphere(+2.5, -0.5, 0, (0, 1, 0)) create_sphere(-0.5, +2.5, 0, (0, 0, 1)) create_sphere(+2.5, +2.5, 0, (1, 1, 0)) Note that DICOM, NIfTI, and other medical image formats also measure positions from the center of the first voxel. Now, here is some info about the vtkImagePlaneWidget. It's an old class and is a little clunky. It uses two steps: 1) first, vtkImageReslice extracts a slice (often padded or cropped) from the volume 2) next, the output of vtkImageReslice is used as a texture for a rectangular polygon Both the reslicing and the texture mapping perform interpolation (the interpolation method for either can be controlled). The main problem with vtkImagePlaneWidget is that the texels don't always match the image voxels. In fact, they only match under very specific circumstances: 1) the corner of the plane must be at the outer corner of the first voxel (i.e. a half-voxel offset in X and Y from the volume origin, or a multiple of the voxel spacing from the aforementioned position) 2) the size of the plane must be a power of two of the voxel size, because this class was written in a time when GPUs had a power of two restriction on texture sizes With these restrictions in mind, if you have a volume made of slices that are power-of-two (e.g. 256x256 or 512x512), then as long as the plane is placed as specified above, it is possible to exactly render the image slices with vtkImagePlaneWidget. I've written a mapper called vtkImageResliceMapper that overcomes the voxel vs. texel issue by putting the texels at exactly the same positions as the voxels (it also has another mode where the texels are placed exactly at screen pixel locations), but as far as I know no-one has used this class to make a VTK widget. - David On Thu, Sep 28, 2017 at 1:31 PM, Oliver Natt wrote: > Dear vtkusers, > > during my work on a small programm for the analysis of computed tomography > data I found an unexpected behaviour of the vtkImagePlaneWidget. I tried to > boil down the problem to a small python script, which uses a very small > image dimension of only 3 x 3 x 3, where the effect becomes prominent (see > python program below). > > The script makes a cut through a 3 x 3 x 3 volume using a > vtkImagePlaneWidget. The four coloured spheres indicate the expected edges > of the resulting image slice. The result is pretty much, what I expected > (see attachement screenshot1.png). However, when I grab the > vtkImagePlaneWidget using "Control + Middle Mouse Button" an move the plane > around in the x-y plane, some unexpected effects occur (see > screenshot2.png): Sometimes some kind of interpolation happens, which > results in an image that looks rather like a 6 x 3 grid instead of 3 x 3 > and also the position of the image relative to the four coloured spheres > changes. What I require is a cut through the volume data that preserves the > correct voxel boundaries. Is that possible using the vtkImagePlaneWidget or > is there an alternative class, that serves this purpose? > > Many thanks > Oliver > > import vtkimport vtk.util.numpy_supportimport numpy as np > # create a rendererrenderer = vtk.vtkRenderer() > renderer.SetBackground(0.2, 0.2, 0.5) > renderer.SetBackground2(0.4, 0.4, 1.0) > renderer.SetGradientBackground(True) > # create a render_windowrender_window = vtk.vtkRenderWindow() > render_window.AddRenderer(renderer) > # create a renderwindowinteractoriren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(render_window) > iren.Initialize() > # Create a 3 x 3 x 3 image data with a spacing of 1.image = vtk.vtkImageData() > dat = np.linspace(1, 27, 27, dtype=np.int16) * 10dat = np.ascontiguousarray(dat) > dat = vtk.util.numpy_support.numpy_to_vtk(dat, deep=1) > image.SetDimensions(3, 3, 3) > image.SetSpacing(1, 1, 1) > image.GetPointData().SetScalars(dat) > image.Modified() > # Create a vtkImagePlaneWidget and activate itplane_widget = vtk.vtkImagePlaneWidget() > plane_widget.TextureInterpolateOff() > plane_widget.SetInputData(image) > plane_widget.SetInteractor(render_window.GetInteractor()) > plane_widget.SetOrigin(0, 0, 0) > plane_widget.SetPoint1(8, 0, 0) > plane_widget.SetPoint2(0, 8, 0) > plane_widget.UpdatePlacement() > plane_widget.DisplayTextOn() > plane_widget.On() > plane_widget.SetWindowLevel(200, 50) > rs = plane_widget.GetReslice() > > def create_sphere(x, y, z, col): > """Create a small sphere with color col at postion x, y, z""" source = vtk.vtkSphereSource() > source.SetCenter(x, y, z) > source.SetRadius(0.2) > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputConnection(source.GetOutputPort()) > actor = vtk.vtkActor() > actor.SetMapper(mapper) > actor.GetProperty().SetColor(col) > renderer.AddActor(actor) > > # Position 4 small markers at the expected edges of the image slice.create_sphere(0, 0, 0, (1, 0, 0)) > create_sphere(3, 0, 0, (0, 1, 0)) > create_sphere(0, 3, 0, (0, 0, 1)) > create_sphere(3, 3, 0, (1, 1, 0)) > # Reset the camera and start the RenderWindowInteractorrenderer.ResetCamera() > iren.Start() > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Thu Sep 28 22:05:43 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 29 Sep 2017 11:05:43 +0900 Subject: [vtkusers] Export mesh of cutting plane In-Reply-To: References: Message-ID: Hello, Using vtkDataSetTriangleFilter is a simple way which allows you to convert polyData to unstructuredGrid. Something like this (VTK-8.0.0): --- // Create cutter vtkSmartPointer cutter = vtkSmartPointer::New(); cutter->SetCutFunction(plane); cutter->SetInputConnection(model->GetOutputPort()); // Convert polyData to unstructuredGrid vtkSmartPointer triFilter = vtkSmartPointer::New(); triFilter->SetInputConnection(cutter->GetOutputPort()); triFilter->Update(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("unstructuredGrid.vtu"); writer->SetInputConnection(triFilter->GetOutputPort()); writer->Write(); --- Regards 2017-09-28 23:43 GMT+09:00 Fernando Nellmeldin : > Hello. > I have a method to cut a volume in a vtkUnstructuredGrid given a vtkPlane. > I'm using vtkTableBasedClipDataSet to extract half of the model, also as > vtkUnstructuredGrid. This is working. > > Now, I would like to obtain ONLY the surface of the cut, than means: I want > a vtkUnstructuredGrid with the nodes and faces being on the surface of the > cut. > How can this be achieved? > > I tried using vtkCutter with vtkStripper but the mesh I get doesn't have any > cells, only the points and their associated data. > > Here's how my code looks like. > > Thank You! > > vtkSmartPointer model = > vtkSmartPointer::New(); > // fill the ugrid ... > > // Create The Plane to cut > vtkSmartPointer plane = vtkSmartPointer::New(); > plane->SetOrigin(0.0, 0.0, 0.0); > plane->SetNormal(1.0, 0, 0); > > // Code to cut the model in half > vtkSmartPointer clipDataSet = > vtkSmartPointer::New(); > clipDataSet->SetClipFunction(plane); > clipDataSet->InsideOutOn(); > clipDataSet->GenerateClippedOutputOn(); > clipDataSet->SetInputConnection(model->GetProducerPort()); > clipDataSet->Update(); > > // This has half the model, this is Ok but not what I want > vtkSmartPointer halfModel = clipDataSet->GetOutput(); > > ////****//// > // BEGINS code not working to extract the surface of the cut > vtkSmartPointer cutter = vtkSmartPointer::New(); > cutter->SetCutFunction(plane); > cutter->SetInputConnection(model->GetProducerPort()); > cutter->Update(); > > vtkSmartPointer stripper = vtkSmartPointer::New(); > stripper->SetInputConnection(cutter->GetOutputPort()); > stripper->Update(); > > vtkSmartPointer pd = vtkSmartPointer::New(); > pd->SetPoints(stripper->GetOutput()->GetPoints()); > pd->SetPolys(stripper->GetOutput()->GetLines()); > > vtkSmartPointer clipped = > vtkSmartPointer::New(); > clipped->ShallowCopy(pd); > > // Here I see that there is no Cells > clipped->Print(std::cout); > > // ENDS code to extract the surface of the cut > ////****//// > > // Write the unstructured grid > vtkSmartPointer writer = > vtkSmartPointer::New(); > writer->SetFileName("d:/unstructuredGrid.vtu"); > writer->SetInput(clipped); > writer->SetDataModeToAscii(); > writer->Write(); > // file doesnt have any cell, only points and pointdata > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From ruvva at yahoo.com Fri Sep 29 02:35:47 2017 From: ruvva at yahoo.com (Koteswara Rao Ruvva) Date: Fri, 29 Sep 2017 06:35:47 +0000 (UTC) Subject: [vtkusers] Disable rotation References: <2098812529.299197.1506666947155.ref@mail.yahoo.com> Message-ID: <2098812529.299197.1506666947155@mail.yahoo.com> Hello All, I have a renderWindow that contains two renderers. In first renderer I display Polydata actor and a cut plane actor. In the second renderer, I render contours generated by the intersection of the Polydata and the cut plane. I have a Trackball style interactor for the renderWindow to deal with the mouse and keyboard events in both the renderers. Everything is good so far.? Now I don't want to allow rotation of the camera with left mouse button in the second renderer, where contours are rendered. I need the zoom and pan, but not the rotation. How can I do it? I set the?PickableOff on contour actor in order to avoid pick and drag. This solves half the problem. I still need to lock the rotation of the camera with left mouse button.? I appreciate your suggestions. Thank youKoteswar -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.nellmeldin at open-engineering.com Fri Sep 29 03:37:39 2017 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Fri, 29 Sep 2017 09:37:39 +0200 Subject: [vtkusers] Export mesh of cutting plane In-Reply-To: References: Message-ID: Hello. That did the job! (although I get a triangle mesh while the initial surface was full of sliced hexahedron (quads). Thank you! On 29 September 2017 at 04:05, kenichiro yoshimi wrote: > Hello, > > Using vtkDataSetTriangleFilter is a simple way which allows you to > convert polyData to unstructuredGrid. Something like this (VTK-8.0.0): > --- > // Create cutter > vtkSmartPointer cutter = > vtkSmartPointer::New(); > cutter->SetCutFunction(plane); > cutter->SetInputConnection(model->GetOutputPort()); > > // Convert polyData to unstructuredGrid > vtkSmartPointer triFilter = > vtkSmartPointer::New(); > triFilter->SetInputConnection(cutter->GetOutputPort()); > triFilter->Update(); > > vtkSmartPointer writer = > vtkSmartPointer::New(); > writer->SetFileName("unstructuredGrid.vtu"); > writer->SetInputConnection(triFilter->GetOutputPort()); > writer->Write(); > --- > > Regards > > 2017-09-28 23:43 GMT+09:00 Fernando Nellmeldin > : > > Hello. > > I have a method to cut a volume in a vtkUnstructuredGrid given a > vtkPlane. > > I'm using vtkTableBasedClipDataSet to extract half of the model, also as > > vtkUnstructuredGrid. This is working. > > > > Now, I would like to obtain ONLY the surface of the cut, than means: I > want > > a vtkUnstructuredGrid with the nodes and faces being on the surface of > the > > cut. > > How can this be achieved? > > > > I tried using vtkCutter with vtkStripper but the mesh I get doesn't have > any > > cells, only the points and their associated data. > > > > Here's how my code looks like. > > > > Thank You! > > > > vtkSmartPointer model = > > vtkSmartPointer::New(); > > // fill the ugrid ... > > > > // Create The Plane to cut > > vtkSmartPointer plane = vtkSmartPointer::New(); > > plane->SetOrigin(0.0, 0.0, 0.0); > > plane->SetNormal(1.0, 0, 0); > > > > // Code to cut the model in half > > vtkSmartPointer clipDataSet = > > vtkSmartPointer::New(); > > clipDataSet->SetClipFunction(plane); > > clipDataSet->InsideOutOn(); > > clipDataSet->GenerateClippedOutputOn(); > > clipDataSet->SetInputConnection(model->GetProducerPort()); > > clipDataSet->Update(); > > > > // This has half the model, this is Ok but not what I want > > vtkSmartPointer halfModel = > clipDataSet->GetOutput(); > > > > ////****//// > > // BEGINS code not working to extract the surface of the cut > > vtkSmartPointer cutter = vtkSmartPointer::New(); > > cutter->SetCutFunction(plane); > > cutter->SetInputConnection(model->GetProducerPort()); > > cutter->Update(); > > > > vtkSmartPointer stripper = vtkSmartPointer:: > New(); > > stripper->SetInputConnection(cutter->GetOutputPort()); > > stripper->Update(); > > > > vtkSmartPointer pd = vtkSmartPointer::New(); > > pd->SetPoints(stripper->GetOutput()->GetPoints()); > > pd->SetPolys(stripper->GetOutput()->GetLines()); > > > > vtkSmartPointer clipped = > > vtkSmartPointer::New(); > > clipped->ShallowCopy(pd); > > > > // Here I see that there is no Cells > > clipped->Print(std::cout); > > > > // ENDS code to extract the surface of the cut > > ////****//// > > > > // Write the unstructured grid > > vtkSmartPointer writer = > > vtkSmartPointer::New(); > > writer->SetFileName("d:/unstructuredGrid.vtu"); > > writer->SetInput(clipped); > > writer->SetDataModeToAscii(); > > writer->Write(); > > // file doesnt have any cell, only points and pointdata > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > -- *Fernando NELLMELDIN* Software Engineer *_______________________________________________________________* *Open Engineering s.a.* Rue Bois Saint-Jean 15/1 B-4102 Seraing (Belgium) Tel: +32.4.353.30.34 http://www.open-engineering.com https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym *_________________________________________________________________________* -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Fri Sep 29 05:31:24 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 29 Sep 2017 18:31:24 +0900 Subject: [vtkusers] Export mesh of cutting plane In-Reply-To: References: Message-ID: Hi Fernando, This will be accomplished by using vtkCleanUnstructuredGrid class found in ParaView without triangulation. I have attached a simple code. Thanks 2017-09-29 16:37 GMT+09:00 Fernando Nellmeldin : > Hello. That did the job! (although I get a triangle mesh while the initial > surface was full of sliced hexahedron (quads). > > Thank you! > > On 29 September 2017 at 04:05, kenichiro yoshimi > wrote: >> >> Hello, >> >> Using vtkDataSetTriangleFilter is a simple way which allows you to >> convert polyData to unstructuredGrid. Something like this (VTK-8.0.0): >> --- >> // Create cutter >> vtkSmartPointer cutter = >> vtkSmartPointer::New(); >> cutter->SetCutFunction(plane); >> cutter->SetInputConnection(model->GetOutputPort()); >> >> // Convert polyData to unstructuredGrid >> vtkSmartPointer triFilter = >> vtkSmartPointer::New(); >> triFilter->SetInputConnection(cutter->GetOutputPort()); >> triFilter->Update(); >> >> vtkSmartPointer writer = >> vtkSmartPointer::New(); >> writer->SetFileName("unstructuredGrid.vtu"); >> writer->SetInputConnection(triFilter->GetOutputPort()); >> writer->Write(); >> --- >> >> Regards >> >> 2017-09-28 23:43 GMT+09:00 Fernando Nellmeldin >> : >> > Hello. >> > I have a method to cut a volume in a vtkUnstructuredGrid given a >> > vtkPlane. >> > I'm using vtkTableBasedClipDataSet to extract half of the model, also as >> > vtkUnstructuredGrid. This is working. >> > >> > Now, I would like to obtain ONLY the surface of the cut, than means: I >> > want >> > a vtkUnstructuredGrid with the nodes and faces being on the surface of >> > the >> > cut. >> > How can this be achieved? >> > >> > I tried using vtkCutter with vtkStripper but the mesh I get doesn't have >> > any >> > cells, only the points and their associated data. >> > >> > Here's how my code looks like. >> > >> > Thank You! >> > >> > vtkSmartPointer model = >> > vtkSmartPointer::New(); >> > // fill the ugrid ... >> > >> > // Create The Plane to cut >> > vtkSmartPointer plane = vtkSmartPointer::New(); >> > plane->SetOrigin(0.0, 0.0, 0.0); >> > plane->SetNormal(1.0, 0, 0); >> > >> > // Code to cut the model in half >> > vtkSmartPointer clipDataSet = >> > vtkSmartPointer::New(); >> > clipDataSet->SetClipFunction(plane); >> > clipDataSet->InsideOutOn(); >> > clipDataSet->GenerateClippedOutputOn(); >> > clipDataSet->SetInputConnection(model->GetProducerPort()); >> > clipDataSet->Update(); >> > >> > // This has half the model, this is Ok but not what I want >> > vtkSmartPointer halfModel = >> > clipDataSet->GetOutput(); >> > >> > ////****//// >> > // BEGINS code not working to extract the surface of the cut >> > vtkSmartPointer cutter = vtkSmartPointer::New(); >> > cutter->SetCutFunction(plane); >> > cutter->SetInputConnection(model->GetProducerPort()); >> > cutter->Update(); >> > >> > vtkSmartPointer stripper = >> > vtkSmartPointer::New(); >> > stripper->SetInputConnection(cutter->GetOutputPort()); >> > stripper->Update(); >> > >> > vtkSmartPointer pd = vtkSmartPointer::New(); >> > pd->SetPoints(stripper->GetOutput()->GetPoints()); >> > pd->SetPolys(stripper->GetOutput()->GetLines()); >> > >> > vtkSmartPointer clipped = >> > vtkSmartPointer::New(); >> > clipped->ShallowCopy(pd); >> > >> > // Here I see that there is no Cells >> > clipped->Print(std::cout); >> > >> > // ENDS code to extract the surface of the cut >> > ////****//// >> > >> > // Write the unstructured grid >> > vtkSmartPointer writer = >> > vtkSmartPointer::New(); >> > writer->SetFileName("d:/unstructuredGrid.vtu"); >> > writer->SetInput(clipped); >> > writer->SetDataModeToAscii(); >> > writer->Write(); >> > // file doesnt have any cell, only points and pointdata >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > > > -- > Fernando NELLMELDIN > Software Engineer > _______________________________________________________________ > > Open Engineering s.a. > > Rue Bois Saint-Jean 15/1 > B-4102 Seraing (Belgium) > Tel: +32.4.353.30.34 > > http://www.open-engineering.com > https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym > _________________________________________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: Cutter.tar.gz Type: application/x-gzip Size: 2756 bytes Desc: not available URL: From nicolas.cedilnik at inria.fr Fri Sep 29 07:00:52 2017 From: nicolas.cedilnik at inria.fr (Nicolas Cedilnik) Date: Fri, 29 Sep 2017 13:00:52 +0200 Subject: [vtkusers] =?utf-8?q?Extracting_normals_from_polydata_add_points?= =?utf-8?b?wqA/?= Message-ID: <2a44ef82-3a9e-6382-5d82-63c57aef3e94@inria.fr> Hello, I'm wondering if I should file a bug for this or if it's a feature I don't understand. I'm computing normals for a triangular mesh and for some reason the new polydata (with normals) ends up having more points than the original. I don't really have time to explore this issue right now but if needed I do it later. Here's a quick illustration with my ipython output: In [58]: polydata.GetPoints().GetNumberOfPoints() Out[58]: 11290 In [59]:???? normals_generator = vtk.vtkPolyDataNormals() ??? ...:???? normals_generator.SetInputData(polydata) ??? ...:???? normals_generator.ComputeCellNormalsOff() ??? ...:???? normals_generator.ComputePointNormalsOn() ??? ...:???? normals_generator.Update() ??? ...: ??? ...:???? polydata_with_normals = normals_generator.GetOutput() ??? ...: In [60]: polydata_with_normals.GetPoints().GetNumberOfPoints() Out[60]: 11382 So I have 92 new points, the 11290 first ones being equal: In [74]: (vtk_to_numpy(polydata_with_normals.GetPoints().GetData())[:11290] == vtk_to_numpy(polydata.GetPoints().GetData())).all() Out[74]: True I'm using VTK with python3.6 from conda-forge: $ conda list | grep vtk vtk?????????????????????? 7.1.1??????????????????? py36_1 conda-forge Thoughts? -- Nicolas From rccm.kyoshimi at gmail.com Fri Sep 29 07:21:51 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 29 Sep 2017 20:21:51 +0900 Subject: [vtkusers] Extracting normals from polydata add points ? In-Reply-To: <2a44ef82-3a9e-6382-5d82-63c57aef3e94@inria.fr> References: <2a44ef82-3a9e-6382-5d82-63c57aef3e94@inria.fr> Message-ID: Hi, Could you try to turn off the option for splitting of sharp edges? --- normals_generator.SplittingOff() --- Thanks 2017-09-29 20:00 GMT+09:00 Nicolas Cedilnik : > Hello, > > I'm wondering if I should file a bug for this or if it's a feature I don't > understand. > > I'm computing normals for a triangular mesh and for some reason the new > polydata (with normals) ends up having more points than the original. > > I don't really have time to explore this issue right now but if needed I do > it later. Here's a quick illustration with my ipython output: > > In [58]: polydata.GetPoints().GetNumberOfPoints() > Out[58]: 11290 > > In [59]: normals_generator = vtk.vtkPolyDataNormals() > ...: normals_generator.SetInputData(polydata) > ...: normals_generator.ComputeCellNormalsOff() > ...: normals_generator.ComputePointNormalsOn() > ...: normals_generator.Update() > ...: > ...: polydata_with_normals = normals_generator.GetOutput() > ...: > > In [60]: polydata_with_normals.GetPoints().GetNumberOfPoints() > Out[60]: 11382 > > So I have 92 new points, the 11290 first ones being equal: > > In [74]: (vtk_to_numpy(polydata_with_normals.GetPoints().GetData())[:11290] > == vtk_to_numpy(polydata.GetPoints().GetData())).all() > Out[74]: True > > I'm using VTK with python3.6 from conda-forge: > > $ conda list | grep vtk > vtk 7.1.1 py36_1 conda-forge > > Thoughts? > > -- Nicolas > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From f.nellmeldin at open-engineering.com Fri Sep 29 07:23:05 2017 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Fri, 29 Sep 2017 13:23:05 +0200 Subject: [vtkusers] Export mesh of cutting plane In-Reply-To: References: Message-ID: Hello, that worked as a charm, thank you very much for your time!! On 29 September 2017 at 11:31, kenichiro yoshimi wrote: > Hi Fernando, > > This will be accomplished by using vtkCleanUnstructuredGrid class > found in ParaView without triangulation. I have attached a simple > code. > > Thanks > > 2017-09-29 16:37 GMT+09:00 Fernando Nellmeldin > : > > Hello. That did the job! (although I get a triangle mesh while the > initial > > surface was full of sliced hexahedron (quads). > > > > Thank you! > > > > On 29 September 2017 at 04:05, kenichiro yoshimi < > rccm.kyoshimi at gmail.com> > > wrote: > >> > >> Hello, > >> > >> Using vtkDataSetTriangleFilter is a simple way which allows you to > >> convert polyData to unstructuredGrid. Something like this (VTK-8.0.0): > >> --- > >> // Create cutter > >> vtkSmartPointer cutter = > >> vtkSmartPointer::New(); > >> cutter->SetCutFunction(plane); > >> cutter->SetInputConnection(model->GetOutputPort()); > >> > >> // Convert polyData to unstructuredGrid > >> vtkSmartPointer triFilter = > >> vtkSmartPointer::New(); > >> triFilter->SetInputConnection(cutter->GetOutputPort()); > >> triFilter->Update(); > >> > >> vtkSmartPointer writer = > >> vtkSmartPointer::New(); > >> writer->SetFileName("unstructuredGrid.vtu"); > >> writer->SetInputConnection(triFilter->GetOutputPort()); > >> writer->Write(); > >> --- > >> > >> Regards > >> > >> 2017-09-28 23:43 GMT+09:00 Fernando Nellmeldin > >> : > >> > Hello. > >> > I have a method to cut a volume in a vtkUnstructuredGrid given a > >> > vtkPlane. > >> > I'm using vtkTableBasedClipDataSet to extract half of the model, also > as > >> > vtkUnstructuredGrid. This is working. > >> > > >> > Now, I would like to obtain ONLY the surface of the cut, than means: I > >> > want > >> > a vtkUnstructuredGrid with the nodes and faces being on the surface of > >> > the > >> > cut. > >> > How can this be achieved? > >> > > >> > I tried using vtkCutter with vtkStripper but the mesh I get doesn't > have > >> > any > >> > cells, only the points and their associated data. > >> > > >> > Here's how my code looks like. > >> > > >> > Thank You! > >> > > >> > vtkSmartPointer model = > >> > vtkSmartPointer::New(); > >> > // fill the ugrid ... > >> > > >> > // Create The Plane to cut > >> > vtkSmartPointer plane = vtkSmartPointer::New(); > >> > plane->SetOrigin(0.0, 0.0, 0.0); > >> > plane->SetNormal(1.0, 0, 0); > >> > > >> > // Code to cut the model in half > >> > vtkSmartPointer clipDataSet = > >> > vtkSmartPointer::New(); > >> > clipDataSet->SetClipFunction(plane); > >> > clipDataSet->InsideOutOn(); > >> > clipDataSet->GenerateClippedOutputOn(); > >> > clipDataSet->SetInputConnection(model->GetProducerPort()); > >> > clipDataSet->Update(); > >> > > >> > // This has half the model, this is Ok but not what I want > >> > vtkSmartPointer halfModel = > >> > clipDataSet->GetOutput(); > >> > > >> > ////****//// > >> > // BEGINS code not working to extract the surface of the cut > >> > vtkSmartPointer cutter = vtkSmartPointer:: > New(); > >> > cutter->SetCutFunction(plane); > >> > cutter->SetInputConnection(model->GetProducerPort()); > >> > cutter->Update(); > >> > > >> > vtkSmartPointer stripper = > >> > vtkSmartPointer::New(); > >> > stripper->SetInputConnection(cutter->GetOutputPort()); > >> > stripper->Update(); > >> > > >> > vtkSmartPointer pd = vtkSmartPointer:: > New(); > >> > pd->SetPoints(stripper->GetOutput()->GetPoints()); > >> > pd->SetPolys(stripper->GetOutput()->GetLines()); > >> > > >> > vtkSmartPointer clipped = > >> > vtkSmartPointer::New(); > >> > clipped->ShallowCopy(pd); > >> > > >> > // Here I see that there is no Cells > >> > clipped->Print(std::cout); > >> > > >> > // ENDS code to extract the surface of the cut > >> > ////****//// > >> > > >> > // Write the unstructured grid > >> > vtkSmartPointer writer = > >> > vtkSmartPointer::New(); > >> > writer->SetFileName("d:/unstructuredGrid.vtu"); > >> > writer->SetInput(clipped); > >> > writer->SetDataModeToAscii(); > >> > writer->Write(); > >> > // file doesnt have any cell, only points and pointdata > >> > > >> > _______________________________________________ > >> > Powered by www.kitware.com > >> > > >> > Visit other Kitware open-source projects at > >> > http://www.kitware.com/opensource/opensource.html > >> > > >> > Please keep messages on-topic and check the VTK FAQ at: > >> > http://www.vtk.org/Wiki/VTK_FAQ > >> > > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/vtkusers > >> > > > > > > > > > > > -- > > Fernando NELLMELDIN > > Software Engineer > > _______________________________________________________________ > > > > Open Engineering s.a. > > > > Rue Bois Saint-Jean 15/1 > > B-4102 Seraing (Belgium) > > Tel: +32.4.353.30.34 > > > > http://www.open-engineering.com > > https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym > > ____________________________________________________________ > _____________ > -- *Fernando NELLMELDIN* Software Engineer *_______________________________________________________________* *Open Engineering s.a.* Rue Bois Saint-Jean 15/1 B-4102 Seraing (Belgium) Tel: +32.4.353.30.34 http://www.open-engineering.com https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym *_________________________________________________________________________* -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cedilnik at inria.fr Fri Sep 29 09:51:03 2017 From: nicolas.cedilnik at inria.fr (Nicolas Cedilnik) Date: Fri, 29 Sep 2017 15:51:03 +0200 Subject: [vtkusers] Extracting normals from polydata add points ? In-Reply-To: References: Message-ID: Hi again, > Could you try to turn off the option for splitting of sharp edges? > --- > normals_generator.SplittingOff() > --- ?and that was it. It's a feature I didn't pay attention to. My next question would be: does turning this off affects normal values of the pre-existing points ? Should I leave it on and filter the result to the first n points as I did before for better normals estimation ? Thanks ! -- Nicolas From hh2699 at columbia.edu Fri Sep 29 12:00:29 2017 From: hh2699 at columbia.edu (Hengda He) Date: Fri, 29 Sep 2017 09:00:29 -0700 (MST) Subject: [vtkusers] InverseTransformPoint: no convergence in Thin-Plate Spline Message-ID: <1506700829387-0.post@n5.nabble.com> Hi VTK Users When I am using VTK: vtkThinPlateSplineTransform Class, sometimes there is warning like "InverseTransformPoint: no convergence". Why does this happen? And when I check the transformed volume, I found holes at some place. Thank you! Hengda he -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Fri Sep 29 12:26:52 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 29 Sep 2017 10:26:52 -0600 Subject: [vtkusers] InverseTransformPoint: no convergence in Thin-Plate Spline In-Reply-To: <1506700829387-0.post@n5.nabble.com> References: <1506700829387-0.post@n5.nabble.com> Message-ID: Hi Hengda, It's possible (and actually quite easy) to create a thin-plate spline transform that is not invertible. The simplest example of this is when two of the "source" points map to the same "target" point, but there are other source & target point configurations that cause the thin-plate spline to fold back upon itself. In general, the best way to ensure that the thin-plate spline is well-behaved is to make sure that the control points are not too close to each other. - David On Fri, Sep 29, 2017 at 10:00 AM, Hengda He wrote: > Hi VTK Users > > When I am using VTK: vtkThinPlateSplineTransform Class, sometimes there is > warning like "InverseTransformPoint: no convergence". Why does this happen? > And when I check the transformed volume, I found holes at some place. > > Thank you! > > Hengda he > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rick at pile.com Fri Sep 29 13:09:16 2017 From: rick at pile.com (Rick Dailey) Date: Fri, 29 Sep 2017 10:09:16 -0700 (MST) Subject: [vtkusers] vtkTextureObject bind error In-Reply-To: References: <1501518920479-5744223.post@n5.nabble.com> <1501522915867-5744226.post@n5.nabble.com> <1501584716697-5744234.post@n5.nabble.com> <1502710447044-5744390.post@n5.nabble.com> Message-ID: <1506704956266-0.post@n5.nabble.com> Hello Alvaro, I am now back from vacation and other projects and have begun to look at this issue once again. The temporary link that you provided back in August no longer works but I was able to see that your changes had been merged into the latest master (8.1) and I downloaded that version. Unfortunately, the new version behaves worse for me than before. 7.1.1 would display the outline of the large object even though the interior was not visible. The master that I just downloaded crashes when attempting to display my test data set. Once again, it starts at vtkTextureObject::Bind() where this->Handle is NULL. It was my understanding that this handle was not being created because of the large size of the object - and that was one of the fixes in the new version. Now when the code progresses past this function it encounters many obstacles that cause my program to crash rather than display an empty object as before. Here is the stack trace from the point where I call "Render" to the point where it crashes as described above: void vtkTextureObject::Bind() { assert(this->Context); assert(this->Handle); // <<<<<<<< THIS HANDLE IS NULL <<<<<<<<<< glBindTexture(this->Target, this->Handle); vtkOpenGLCheckErrorMacro("failed at glBindTexture"); if (this->AutoParameters && (this->GetMTime() > this->SendParametersTime)) { this->SendParameters(); } } > vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Bind() Line 516 C++ vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Activate() Line 465 C++ vtkRenderingVolumeOpenGL2-8.1.dll!vtkVolumeTexture::LoadTexture(const int interpolation, vtkVolumeTexture::VolumeBlock * volBlock) Line 268 C++ vtkRenderingVolumeOpenGL2-8.1.dll!vtkVolumeTexture::LoadVolume(vtkRenderer * ren, vtkImageData * data, vtkDataArray * scalars, const int interpolation) Line 114 C++ vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::LoadData(vtkRenderer * ren, vtkVolume * vol, vtkVolumeProperty * volProp, vtkImageData * input, vtkDataArray * scalars) Line 898 C++ vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMapper::GPURender(vtkRenderer * ren, vtkVolume * vol) Line 3471 C++ vtkRenderingVolume-8.1.dll!vtkGPUVolumeRayCastMapper::Render(vtkRenderer * ren, vtkVolume * vol) Line 154 C++ vtkRenderingCore-8.1.dll!vtkVolume::RenderVolumetricGeometry(vtkViewport * vp) Line 370 C++ vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::UpdateGeometry() Line 273 C++ vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::DeviceRender() Line 170 C++ vtkRenderingCore-8.1.dll!vtkRenderer::Render() Line 351 C++ vtkRenderingCore-8.1.dll!vtkRendererCollection::Render() Line 51 C++ vtkRenderingCore-8.1.dll!vtkRenderWindow::DoStereoRender() Line 784 C++ vtkRenderingCore-8.1.dll!vtkRenderWindow::DoFDRender() Line 750 C++ vtkRenderingCore-8.1.dll!vtkRenderWindow::DoAARender() Line 629 C++ vtkRenderingCore-8.1.dll!vtkRenderWindow::Render() Line 442 C++ -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rccm.kyoshimi at gmail.com Fri Sep 29 22:20:02 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sat, 30 Sep 2017 11:20:02 +0900 Subject: [vtkusers] Extracting normals from polydata add points ? In-Reply-To: References: Message-ID: Hi, Sorry for my late reply. There is a complete difference of computed normals between splitting on and off, since the algorithm works by determining normals for each polygon and then averaging them at shared points and each of points duplicated by splitting shares the different divided polygons respectively. (See attached) Unless you need to prevent blurry edges due to Gouraud shading, you don't have to set splitting on. Thanks 2017-09-29 22:51 GMT+09:00 Nicolas Cedilnik : > Hi again, > >> Could you try to turn off the option for splitting of sharp edges? >> --- >> normals_generator.SplittingOff() >> --- > > ?and that was it. It's a feature I didn't pay attention to. > > My next question would be: does turning this off affects normal values > of the pre-existing points ? > Should I leave it on and filter the result to the first n points as I > did before for better normals estimation ? > > Thanks ! > > -- Nicolas > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- A non-text attachment was scrubbed... Name: splitting_options.png Type: image/png Size: 325924 bytes Desc: not available URL: From onatt at gmx.de Sat Sep 30 05:11:29 2017 From: onatt at gmx.de (Oliver Natt) Date: Sat, 30 Sep 2017 11:11:29 +0200 Subject: [vtkusers] vtkImagePlaneWidget interpolation problem In-Reply-To: References: Message-ID: Hi David, thank your very much for your valuable help. I was aware of the fact that most medical image formats reference the center of the voxels and not the outer edge. Unfortunately, I did not find a sound documentation on the convention that is used in vtkImageData. Maybe, I did not search thoroughly enough. I will try your proposal to use the vtkImageResliceMapper. In my program, the vtkImagePlaneWidget is only used to control the position and orientation of a slice. The actual analysis is presented in a 2D view of the slice. I will try to get the geometry information from the vtkImagePlaneWidget and render the new slice using your ImageSliceRemapper. With best regards, Oliver From seb.an at icloud.com Sat Sep 30 06:54:04 2017 From: seb.an at icloud.com (sebastian_a) Date: Sat, 30 Sep 2017 03:54:04 -0700 (MST) Subject: [vtkusers] Iterative subdivision causes holes In-Reply-To: <1506630913702-0.post@n5.nabble.com> References: <1506442373179-0.post@n5.nabble.com> <1506630913702-0.post@n5.nabble.com> Message-ID: <1506768844247-0.post@n5.nabble.com> Hello, I think the problem might be, that the vtkAppendPolyData filter doesn't merge the edges on the surroundings of the unselected and the subdivided PolyDatas, which creates "two lines" of non-manifold edges. Do you have an idea how I could merge these edges or solve this? Thanks a lot, Sebastian -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From weihuayi at xtu.edu.cn Sat Sep 30 20:55:42 2017 From: weihuayi at xtu.edu.cn (=?utf-8?B?d2VpaHVheWk=?=) Date: Sun, 1 Oct 2017 08:55:42 +0800 Subject: [vtkusers] surface Message-ID: Hi, There I have a triangulation surface (please paraview show it with test.vtk), and there is a point data named rhoA on it. I plot rhoA in paraview and plot the contour with just one contour value. So you can see many circles on the surface. But what I need is to fill red colors in the circles and don't show other parts. So how to do it in paraview? Thanks very much. Best Huayi -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: surface.png Type: application/octet-stream Size: 375152 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.vtk Type: application/octet-stream Size: 236294 bytes Desc: not available URL: From rccm.kyoshimi at gmail.com Sat Sep 30 23:03:10 2017 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sun, 1 Oct 2017 12:03:10 +0900 Subject: [vtkusers] surface In-Reply-To: References: Message-ID: Hi Huayi, Your question may be better suited for the ParaView mailing-list(paraview at paraview.org). The simplest method for this is to set the Number Of Table Values to 2 in the Color Map Editor in ParaView (See attached screenshot). I hope this would be some of help. Regards 2017-10-01 9:55 GMT+09:00 weihuayi : > Hi, There > > I have a triangulation surface (please paraview show it with test.vtk), and > there is a point data named rhoA on it. I plot rhoA in paraview and plot the > contour with just one contour value. So you can see many circles on the > surface. > > But what I need is to fill red colors in the circles and don't show other > parts. So how to do it in paraview? > > Thanks very much. > > Best > Huayi > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- A non-text attachment was scrubbed... Name: test.png Type: image/png Size: 174908 bytes Desc: not available URL: From weihuayi at xtu.edu.cn Sat Sep 30 23:35:48 2017 From: weihuayi at xtu.edu.cn (=?utf-8?B?d2VpaHVheWk=?=) Date: Sun, 1 Oct 2017 11:35:48 +0800 Subject: [vtkusers] surface In-Reply-To: References: Message-ID: Hi, Kenichiro, Your advice basically can solve my problem, thanks very much for your reply. Best Huayi ------------------ Original ------------------ From: "kenichiro yoshimi"; Date: Sun, Oct 1, 2017 11:03 AM To: "???"; Cc: "Users"; Subject: Re: [vtkusers] surface Hi Huayi, Your question may be better suited for the ParaView mailing-list(paraview at paraview.org). The simplest method for this is to set the Number Of Table Values to 2 in the Color Map Editor in ParaView (See attached screenshot). I hope this would be some of help. Regards 2017-10-01 9:55 GMT+09:00 weihuayi : > Hi, There > > I have a triangulation surface (please paraview show it with test.vtk), and > there is a point data named rhoA on it. I plot rhoA in paraview and plot the > contour with just one contour value. So you can see many circles on the > surface. > > But what I need is to fill red colors in the circles and don't show other > parts. So how to do it in paraview? > > Thanks very much. > > Best > Huayi > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: