From zmanvortex at gmail.com Sun May 1 14:14:28 2016 From: zmanvortex at gmail.com (Donny Zimmerman) Date: Sun, 1 May 2016 13:14:28 -0500 Subject: [vtkusers] memory management In-Reply-To: <1634303515.3768763.1461951569442.JavaMail.yahoo@mail.yahoo.com> References: <1634303515.3768763.1461951569442.JavaMail.yahoo.ref@mail.yahoo.com> <1634303515.3768763.1461951569442.JavaMail.yahoo@mail.yahoo.com> Message-ID: <9D93332E-41B0-46A3-91E5-AF3847E517C7@gmail.com> I would also like to know more information on this. Sent from my iPhone > On Apr 29, 2016, at 12:39 PM, Maarten Beek wrote: > > I have a pipeline of 9 image filters. > For every filter I call ReleaseDataFlagOn(); > In Windows task Manager I see that before the pipeline executes my memory usage is 2.7GB, after the pipeline has executed it is 8GB. > I am using VTK 6.1, Is there something I don't understand re. the ReleaseDataFlagOn() call? > > Thanks - Maarten > -------------- next part -------------- An HTML attachment was scrubbed... URL: From weifeng0715 at gmail.com Mon May 2 09:01:20 2016 From: weifeng0715 at gmail.com (weifeng0715) Date: Mon, 2 May 2016 06:01:20 -0700 (MST) Subject: [vtkusers] Move STL model and colormap it In-Reply-To: <1394758396285-5726311.post@n5.nabble.com> References: <1393389305416-5726112.post@n5.nabble.com> <1394758396285-5726311.post@n5.nabble.com> Message-ID: <1462194080183-5737941.post@n5.nabble.com> Can you give me more clue, how to code it? -- View this message in context: http://vtk.1045678.n5.nabble.com/Move-STL-model-and-colormap-it-tp5726112p5737941.html Sent from the VTK - Users mailing list archive at Nabble.com. From beekmaarten at yahoo.com Mon May 2 11:42:15 2016 From: beekmaarten at yahoo.com (Maarten Beek) Date: Mon, 2 May 2016 15:42:15 +0000 (UTC) Subject: [vtkusers] memory management In-Reply-To: <9D93332E-41B0-46A3-91E5-AF3847E517C7@gmail.com> References: <1634303515.3768763.1461951569442.JavaMail.yahoo.ref@mail.yahoo.com> <1634303515.3768763.1461951569442.JavaMail.yahoo@mail.yahoo.com> <9D93332E-41B0-46A3-91E5-AF3847E517C7@gmail.com> Message-ID: <16451912.4813497.1462203735793.JavaMail.yahoo@mail.yahoo.com> This pipeline actually resides inside a from vtkImageAlgorithm derived class.The filters are created (<>::New()) in this class' constructor. The calls to ReleaseDataFlag() for each of the filters are also made in the constructor. In the RequestData() function, I connect the input to the first filter in the pipeline using SetInputData(). vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); vtkImageData* input = vtkImageData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));firstfilter->SetInputData(input); Then I call Update() on the last filter in the pipeline and copy the output of the last filter into the output of my custom filter: vtkInformation* outInfo = outputVector->GetInformationObject(0);vtkImageData* output = vtkImageData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); lastfilter->Update();output->ShallowCopy(lastfilter->GetOutput()); I have also tried to create and delete the filters in the RequestData() and using DeepCopy() instead of ShallowCopy(), but this did not help. Maarten On Sunday, May 1, 2016 2:14 PM, Donny Zimmerman wrote: I would also like to know more information on this. Sent from my iPhone On Apr 29, 2016, at 12:39 PM, Maarten Beek wrote: I have a pipeline of 9 image filters.For every filter I call ReleaseDataFlagOn(); In Windows task Manager I see that before the pipeline executes my memory usage is 2.7GB, after the pipeline has executed it is 8GB.I am using VTK 6.1, Is there something I don't understand re. the ReleaseDataFlagOn() call? Thanks - Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: From seun at rogue-research.com Mon May 2 16:19:44 2016 From: seun at rogue-research.com (Seun Odutola) Date: Mon, 2 May 2016 16:19:44 -0400 Subject: [vtkusers] How to bypass parts of the VTK pipeline Message-ID: Hello Everyone, After researching & googling for answers to no avail, I was wondering if someone here could help me regarding a situation am facing. To keep things simple let?s say I have 3 nodes, A, B, C. A is a probeFilter, B is a ClipPolyData and C is a PolyDataMapper. I currently have a pipeline A?> B?>C and I would like to occasionally ignore B and thus have A?>C directly, how do I achieve this. I have tried to connect directly A?> to C which does nothing (unless am doing something wrong). Hoping someone could point me in the right direction. Regards, Seun From cory.quammen at kitware.com Mon May 2 16:33:42 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 2 May 2016 16:33:42 -0400 Subject: [vtkusers] How to bypass parts of the VTK pipeline In-Reply-To: References: Message-ID: Seun, Hmm, that should work fine. Could you include a code sample that shows the problem? A compilable, self-contained example is ideal. Thanks, Cory On Mon, May 2, 2016 at 4:19 PM, Seun Odutola wrote: > Hello Everyone, > > After researching & googling for answers to no avail, I was wondering if someone here could help me regarding a situation am facing. To keep things simple let?s say I have 3 nodes, A, B, C. A is a probeFilter, B is a ClipPolyData and C is a PolyDataMapper. I currently have a pipeline A?> B?>C and I would like to occasionally ignore B and thus have A?>C directly, how do I achieve this. I have tried to connect directly A?> to C which does nothing (unless am doing something wrong). Hoping someone could point me in the right direction. > > Regards, > Seun > _______________________________________________ > 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 R&D Engineer Kitware, Inc. From dan.lipsa at kitware.com Mon May 2 16:36:50 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 2 May 2016 16:36:50 -0400 Subject: [vtkusers] How to bypass parts of the VTK pipeline In-Reply-To: References: Message-ID: Seun, What you tried should work. Call SetInputConnection on C with the output port of A and then call vktRenderWindow::Render. This should execute A->C Try setting a breakpoint on RequestUpdate for A, B and C to see what gets called. On Mon, May 2, 2016 at 4:19 PM, Seun Odutola wrote: > Hello Everyone, > > After researching & googling for answers to no avail, I was > wondering if someone here could help me regarding a situation am facing. To > keep things simple let?s say I have 3 nodes, A, B, C. A is a probeFilter, B > is a ClipPolyData and C is a PolyDataMapper. I currently have a pipeline > A?> B?>C and I would like to occasionally ignore B and thus have A?>C > directly, how do I achieve this. I have tried to connect directly A?> to C > which does nothing (unless am doing something wrong). Hoping someone could > point me in the right direction. > > Regards, > Seun > _______________________________________________ > 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 aoyeebay at gmail.com Tue May 3 02:48:39 2016 From: aoyeebay at gmail.com (lofan) Date: Mon, 2 May 2016 23:48:39 -0700 (MST) Subject: [vtkusers] vtkActor circle point In-Reply-To: References: Message-ID: <1462258119216-5737946.post@n5.nabble.com> I draw a point in vtk using a vertex, like the example do: http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Point I also want to change the point shape to circle, but it can't work using your solution. So can you tell me any other way? Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkActor-circle-point-tp5725910p5737946.html Sent from the VTK - Users mailing list archive at Nabble.com. From info at import-ev.com Tue May 3 03:36:48 2016 From: info at import-ev.com (=?iso-2022-jp?B?SW1wb3J0IEVWIBskQj1FSVkbKEI=?=) Date: Tue, 3 May 2016 16:36:48 +0900 Subject: [vtkusers] VTK build error in Xcode Message-ID: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> I would like to use VTK library for iOS app. I use CMake to create VTK Xcode project and build it. I got the following error. --- ... -- Configuring done -- Generating done -- Build files have been written to: /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && /Applications/CMake.app/Contents/bin/cmake -E touch /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Prefix/vtk-compile-tools/src/v tk-compile-tools-stamp/Release/vtk-compile-tools-configure echo "Performing build step for 'vtk-compile-tools'" Performing build step for 'vtk-compile-tools' cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && make vtkCompileTools make[1]: *** No rule to make target `vtkCompileTools'. Stop. make: *** [/Users/TetsuMacBookAir/Desktop/DICOM/VTK700bin/CMakeExternals/Prefix/vtk-co mpile-tools/src/vtk-compile-tools-stamp/Release/vtk-compile-tools-build] Error 2 Command /bin/sh failed with exit code 2 --- I set VTK_IOS_BUILD = ON in CMake and other settings stay default. The version for each; VTK 7.0.0 CMake 3.5.2 Xcode 7.2.1 OS X 10.10.5 I have no idea why this error occurs. Anyone who is familiar with this, please help me. --------- Import EV --------- From ken.martin at kitware.com Tue May 3 09:42:31 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 3 May 2016 09:42:31 -0400 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> Message-ID: You have to build the VTK framework using make or ninja, the XCode generator is not currently tested. Thanks Ken On Tue, May 3, 2016 at 3:36 AM, Import EV ?? wrote: > I would like to use VTK library for iOS app. > I use CMake to create VTK Xcode project and build it. > I got the following error. > > --- > ... > -- Configuring done > -- Generating done > -- Build files have been written to: > /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools > cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && > /Applications/CMake.app/Contents/bin/cmake -E touch > > /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Prefix/vtk-compile-tools/src/v > tk-compile-tools-stamp/Release/vtk-compile-tools-configure > echo "Performing build step for 'vtk-compile-tools'" > Performing build step for 'vtk-compile-tools' > cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && > make vtkCompileTools > make[1]: *** No rule to make target `vtkCompileTools'. Stop. > make: *** > > [/Users/TetsuMacBookAir/Desktop/DICOM/VTK700bin/CMakeExternals/Prefix/vtk-co > mpile-tools/src/vtk-compile-tools-stamp/Release/vtk-compile-tools-build] > Error 2 > Command /bin/sh failed with exit code 2 > --- > > I set VTK_IOS_BUILD = ON in CMake and other settings stay default. > > The version for each; > VTK 7.0.0 > CMake 3.5.2 > Xcode 7.2.1 > OS X 10.10.5 > > I have no idea why this error occurs. > Anyone who is familiar with this, please help me. > > --------- > Import EV > --------- > > > _______________________________________________ > 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 Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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 info at import-ev.com Tue May 3 10:07:00 2016 From: info at import-ev.com (=?UTF-8?Q?Import_EV_=E9=87=8D=E5=AF=8C?=) Date: Tue, 3 May 2016 23:07:00 +0900 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> Message-ID: <003501d1a545$0fe33510$2fa99f30$@import-ev.com> Hi Ken, Thank you for your response. I did not know that. As far as I searched on the web, I found that someone used Xcode to generate "vtk.framework". So, I thought I can do the same thing. I am not familiar with VTK as well as Cmake. Could you kindly advise me how to use make or ninja to generate "vtk.framework". I guess I should use "vtk-compile-tools" somehow, as there is a description "-- Build files have been written to:/Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools". Thanks for your additional help in this regards. ----- Import EV Corp. ----- From: Ken Martin [mailto:ken.martin at kitware.com] Sent: Tuesday, May 03, 2016 10:43 PM To: Import EV ?? Cc: vtk Subject: Re: [vtkusers] VTK build error in Xcode You have to build the VTK framework using make or ninja, the XCode generator is not currently tested. Thanks Ken On Tue, May 3, 2016 at 3:36 AM, Import EV ?? wrote: I would like to use VTK library for iOS app. I use CMake to create VTK Xcode project and build it. I got the following error. --- ... -- Configuring done -- Generating done -- Build files have been written to: /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && /Applications/CMake.app/Contents/bin/cmake -E touch /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Prefix/vtk-compile-tools/src/v tk-compile-tools-stamp/Release/vtk-compile-tools-configure echo "Performing build step for 'vtk-compile-tools'" Performing build step for 'vtk-compile-tools' cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && make vtkCompileTools make[1]: *** No rule to make target `vtkCompileTools'. Stop. make: *** [/Users/TetsuMacBookAir/Desktop/DICOM/VTK700bin/CMakeExternals/Prefix/vtk-co mpile-tools/src/vtk-compile-tools-stamp/Release/vtk-compile-tools-build] Error 2 Command /bin/sh failed with exit code 2 --- I set VTK_IOS_BUILD = ON in CMake and other settings stay default. The version for each; VTK 7.0.0 CMake 3.5.2 Xcode 7.2.1 OS X 10.10.5 I have no idea why this error occurs. Anyone who is familiar with this, please help me. --------- Import EV --------- _______________________________________________ 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 Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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. From mathieu.westphal at kitware.com Tue May 3 10:11:17 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Tue, 3 May 2016 16:11:17 +0200 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: <003501d1a545$0fe33510$2fa99f30$@import-ev.com> References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> <003501d1a545$0fe33510$2fa99f30$@import-ev.com> Message-ID: Hello I don't know much about osx, but generally speaking, do not forget to check the wiki for info : http://www.vtk.org/Wiki/VTK/Building/MacOSX is is not ninja specific though. Mathieu Westphal On Tue, May 3, 2016 at 4:07 PM, Import EV ?? wrote: > Hi Ken, > Thank you for your response. > > I did not know that. > As far as I searched on the web, I found that someone used Xcode to > generate "vtk.framework". So, I thought I can do the same thing. > > I am not familiar with VTK as well as Cmake. > Could you kindly advise me how to use make or ninja to generate > "vtk.framework". > > I guess I should use "vtk-compile-tools" somehow, as there is a > description "-- Build files have been written > to:/Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools". > > Thanks for your additional help in this regards. > > ----- > Import EV Corp. > ----- > > From: Ken Martin [mailto:ken.martin at kitware.com] > Sent: Tuesday, May 03, 2016 10:43 PM > To: Import EV ?? > Cc: vtk > Subject: Re: [vtkusers] VTK build error in Xcode > > You have to build the VTK framework using make or ninja, the XCode > generator is not currently tested. > > Thanks > Ken > > On Tue, May 3, 2016 at 3:36 AM, Import EV ?? wrote: > I would like to use VTK library for iOS app. > I use CMake to create VTK Xcode project and build it. > I got the following error. > > --- > ... > -- Configuring done > -- Generating done > -- Build files have been written to: > /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools > cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && > /Applications/CMake.app/Contents/bin/cmake -E touch > > /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Prefix/vtk-compile-tools/src/v > tk-compile-tools-stamp/Release/vtk-compile-tools-configure > echo "Performing build step for 'vtk-compile-tools'" > Performing build step for 'vtk-compile-tools' > cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && > make vtkCompileTools > make[1]: *** No rule to make target `vtkCompileTools'. Stop. > make: *** > > [/Users/TetsuMacBookAir/Desktop/DICOM/VTK700bin/CMakeExternals/Prefix/vtk-co > mpile-tools/src/vtk-compile-tools-stamp/Release/vtk-compile-tools-build] > Error 2 > Command /bin/sh failed with exit code 2 > --- > > I set VTK_IOS_BUILD = ON in CMake and other settings stay default. > > The version for each; > VTK 7.0.0 > CMake 3.5.2 > Xcode 7.2.1 > OS X 10.10.5 > > I have no idea why this error occurs. > Anyone who is familiar with this, please help me. > > --------- > Import EV > --------- > > > _______________________________________________ > 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 > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at import-ev.com Tue May 3 10:18:46 2016 From: info at import-ev.com (=?UTF-8?Q?Import_EV_=E9=87=8D=E5=AF=8C?=) Date: Tue, 3 May 2016 23:18:46 +0900 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> <003501d1a545$0fe33510$2fa99f30$@import-ev.com> Message-ID: <003901d1a546$b4e957a0$1ebc06e0$@import-ev.com> Hi Mathieu, Thank you for your information. Is this for iOS? I need vtk.framework for iOS. If my question is out of focus, please point it out. ----- Import EV Corp. ----- From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] Sent: Tuesday, May 03, 2016 11:11 PM To: Import EV ?? Cc: Ken Martin; vtk Subject: Re: [vtkusers] VTK build error in Xcode Hello I don't know much about osx, but generally speaking, do not forget to check the wiki for info : http://www.vtk.org/Wiki/VTK/Building/MacOSX is is not ninja specific though. Mathieu Westphal On Tue, May 3, 2016 at 4:07 PM, Import EV ?? wrote: Hi Ken, Thank you for your response. I did not know that. As far as I searched on the web, I found that someone used Xcode to generate "vtk.framework". So, I thought I can do the same thing. I am not familiar with VTK as well as Cmake. Could you kindly advise me how to use make or ninja to generate "vtk.framework". I guess I should use "vtk-compile-tools" somehow, as there is a description "-- Build files have been written to:/Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools". Thanks for your additional help in this regards. ----- Import EV Corp. ----- From: Ken Martin [mailto:ken.martin at kitware.com] Sent: Tuesday, May 03, 2016 10:43 PM To: Import EV ?? Cc: vtk Subject: Re: [vtkusers] VTK build error in Xcode You have to build the VTK framework using make or ninja, the XCode generator is not currently tested. Thanks Ken On Tue, May 3, 2016 at 3:36 AM, Import EV ?? wrote: I would like to use VTK library for iOS app. I use CMake to create VTK Xcode project and build it. I got the following error. --- ... -- Configuring done -- Generating done -- Build files have been written to: /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && /Applications/CMake.app/Contents/bin/cmake -E touch /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Prefix/vtk-compile-tools/src/v tk-compile-tools-stamp/Release/vtk-compile-tools-configure echo "Performing build step for 'vtk-compile-tools'" Performing build step for 'vtk-compile-tools' cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && make vtkCompileTools make[1]: *** No rule to make target `vtkCompileTools'. Stop. make: *** [/Users/TetsuMacBookAir/Desktop/DICOM/VTK700bin/CMakeExternals/Prefix/vtk-co mpile-tools/src/vtk-compile-tools-stamp/Release/vtk-compile-tools-build] Error 2 Command /bin/sh failed with exit code 2 --- I set VTK_IOS_BUILD = ON in CMake and other settings stay default. The version for each; VTK 7.0.0 CMake 3.5.2 Xcode 7.2.1 OS X 10.10.5 I have no idea why this error occurs. Anyone who is familiar with this, please help me. --------- Import EV --------- _______________________________________________ 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 Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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 From mathieu.westphal at kitware.com Tue May 3 10:27:48 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Tue, 3 May 2016 16:27:48 +0200 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: <003901d1a546$b4e957a0$1ebc06e0$@import-ev.com> References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> <003501d1a545$0fe33510$2fa99f30$@import-ev.com> <003901d1a546$b4e957a0$1ebc06e0$@import-ev.com> Message-ID: Sorry, I read your message too fast, i have no knowledge about running vtk on ios, there is this wiki page : http://www.vtk.org/Wiki/VES/Developers_Guide, but you may already tried that. Mathieu Westphal On Tue, May 3, 2016 at 4:18 PM, Import EV ?? wrote: > Hi Mathieu, > Thank you for your information. > > Is this for iOS? > I need vtk.framework for iOS. > If my question is out of focus, please point it out. > > ----- > Import EV Corp. > ----- > From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] > Sent: Tuesday, May 03, 2016 11:11 PM > To: Import EV ?? > Cc: Ken Martin; vtk > Subject: Re: [vtkusers] VTK build error in Xcode > > Hello > I don't know much about osx, but generally speaking, do not forget to > check the wiki for info : > http://www.vtk.org/Wiki/VTK/Building/MacOSX > is is not ninja specific though. > > > Mathieu Westphal > > On Tue, May 3, 2016 at 4:07 PM, Import EV ?? wrote: > Hi Ken, > Thank you for your response. > > I did not know that. > As far as I searched on the web, I found that someone used Xcode to > generate "vtk.framework". So, I thought I can do the same thing. > > I am not familiar with VTK as well as Cmake. > Could you kindly advise me how to use make or ninja to generate > "vtk.framework". > > I guess I should use "vtk-compile-tools" somehow, as there is a > description "-- Build files have been written > to:/Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools". > > Thanks for your additional help in this regards. > > ----- > Import EV Corp. > ----- > > From: Ken Martin [mailto:ken.martin at kitware.com] > Sent: Tuesday, May 03, 2016 10:43 PM > To: Import EV ?? > Cc: vtk > Subject: Re: [vtkusers] VTK build error in Xcode > > You have to build the VTK framework using make or ninja, the XCode > generator is not currently tested. > > Thanks > Ken > > On Tue, May 3, 2016 at 3:36 AM, Import EV ?? wrote: > I would like to use VTK library for iOS app. > I use CMake to create VTK Xcode project and build it. > I got the following error. > > --- > ... > -- Configuring done > -- Generating done > -- Build files have been written to: > /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools > cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && > /Applications/CMake.app/Contents/bin/cmake -E touch > > /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Prefix/vtk-compile-tools/src/v > tk-compile-tools-stamp/Release/vtk-compile-tools-configure > echo "Performing build step for 'vtk-compile-tools'" > Performing build step for 'vtk-compile-tools' > cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && > make vtkCompileTools > make[1]: *** No rule to make target `vtkCompileTools'. Stop. > make: *** > > [/Users/TetsuMacBookAir/Desktop/DICOM/VTK700bin/CMakeExternals/Prefix/vtk-co > mpile-tools/src/vtk-compile-tools-stamp/Release/vtk-compile-tools-build] > Error 2 > Command /bin/sh failed with exit code 2 > --- > > I set VTK_IOS_BUILD = ON in CMake and other settings stay default. > > The version for each; > VTK 7.0.0 > CMake 3.5.2 > Xcode 7.2.1 > OS X 10.10.5 > > I have no idea why this error occurs. > Anyone who is familiar with this, please help me. > > --------- > Import EV > --------- > > > _______________________________________________ > 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 > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at import-ev.com Tue May 3 10:35:40 2016 From: info at import-ev.com (=?UTF-8?Q?Import_EV_=E9=87=8D=E5=AF=8C?=) Date: Tue, 3 May 2016 23:35:40 +0900 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> <003501d1a545$0fe33510$2fa99f30$@import-ev.com> <003901d1a546$b4e957a0$1ebc06e0$@import-ev.com> Message-ID: <000301d1a549$10e231b0$32a69510$@import-ev.com> Hi Mathieu, What I referred to is; https://blog.kitware.com/building-vtk-for-mobile-architectures/ As far as I read iOS portion, I thought I could use Xcode to generate vtk.framework. ----- Import EV Corp. ----- From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] Sent: Tuesday, May 03, 2016 11:28 PM To: Import EV ?? Cc: Ken Martin; vtk Subject: Re: [vtkusers] VTK build error in Xcode Sorry, I read your message too fast, i have no knowledge about running vtk on ios, there is this wiki page : http://www.vtk.org/Wiki/VES/Developers_Guide, but you may already tried that. Mathieu Westphal On Tue, May 3, 2016 at 4:18 PM, Import EV ?? wrote: Hi Mathieu, Thank you for your information. Is this for iOS? I need vtk.framework for iOS. If my question is out of focus, please point it out. ----- Import EV Corp. ----- From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] Sent: Tuesday, May 03, 2016 11:11 PM To: Import EV ?? Cc: Ken Martin; vtk Subject: Re: [vtkusers] VTK build error in Xcode Hello I don't know much about osx, but generally speaking, do not forget to check the wiki for info : http://www.vtk.org/Wiki/VTK/Building/MacOSX is is not ninja specific though. Mathieu Westphal On Tue, May 3, 2016 at 4:07 PM, Import EV ?? wrote: Hi Ken, Thank you for your response. I did not know that. As far as I searched on the web, I found that someone used Xcode to generate "vtk.framework". So, I thought I can do the same thing. I am not familiar with VTK as well as Cmake. Could you kindly advise me how to use make or ninja to generate "vtk.framework". I guess I should use "vtk-compile-tools" somehow, as there is a description "-- Build files have been written to:/Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools". Thanks for your additional help in this regards. ----- Import EV Corp. ----- From: Ken Martin [mailto:ken.martin at kitware.com] Sent: Tuesday, May 03, 2016 10:43 PM To: Import EV ?? Cc: vtk Subject: Re: [vtkusers] VTK build error in Xcode You have to build the VTK framework using make or ninja, the XCode generator is not currently tested. Thanks Ken On Tue, May 3, 2016 at 3:36 AM, Import EV ?? wrote: I would like to use VTK library for iOS app. I use CMake to create VTK Xcode project and build it. I got the following error. --- ... -- Configuring done -- Generating done -- Build files have been written to: /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && /Applications/CMake.app/Contents/bin/cmake -E touch /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Prefix/vtk-compile-tools/src/v tk-compile-tools-stamp/Release/vtk-compile-tools-configure echo "Performing build step for 'vtk-compile-tools'" Performing build step for 'vtk-compile-tools' cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && make vtkCompileTools make[1]: *** No rule to make target `vtkCompileTools'. Stop. make: *** [/Users/TetsuMacBookAir/Desktop/DICOM/VTK700bin/CMakeExternals/Prefix/vtk-co mpile-tools/src/vtk-compile-tools-stamp/Release/vtk-compile-tools-build] Error 2 Command /bin/sh failed with exit code 2 --- I set VTK_IOS_BUILD = ON in CMake and other settings stay default. The version for each; VTK 7.0.0 CMake 3.5.2 Xcode 7.2.1 OS X 10.10.5 I have no idea why this error occurs. Anyone who is familiar with this, please help me. --------- Import EV --------- _______________________________________________ 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 Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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 From shawn.waldon at kitware.com Tue May 3 10:40:11 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Tue, 3 May 2016 10:40:11 -0400 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: <000301d1a549$10e231b0$32a69510$@import-ev.com> References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> <003501d1a545$0fe33510$2fa99f30$@import-ev.com> <003901d1a546$b4e957a0$1ebc06e0$@import-ev.com> <000301d1a549$10e231b0$32a69510$@import-ev.com> Message-ID: Quoting from that blog: " First ensure that you have the latest Xcode and XCode developer tools installed. To build the VTK framework for iOS development, configure CMake with VTK_IOS_BUILD=ON. CMake will then present a limited set of options, which will we shortly review. Be sure to generate only Unix Makefiles or Ninja build files, as* Xcode will not work for this special build.* Then use CMake as usual to produce project build files. " You have to install XCode so that your system will have a compiler. But when you are configuring VTK, you have to select 'Unix Makefiles' or 'Ninja' as the generator. It says that the XCode generator doesn't work. Then you open a terminal to the build directory and type 'make' or 'ninja' depending on the generator you chose. Note that to change generators you will have to delete the build directory and reconfigure. HTH, Shawn On Tue, May 3, 2016 at 10:35 AM, Import EV ?? wrote: > Hi Mathieu, > > What I referred to is; > https://blog.kitware.com/building-vtk-for-mobile-architectures/ > > As far as I read iOS portion, I thought I could use Xcode to generate > vtk.framework. > > ----- > Import EV Corp. > ----- > > > From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] > Sent: Tuesday, May 03, 2016 11:28 PM > To: Import EV ?? > Cc: Ken Martin; vtk > Subject: Re: [vtkusers] VTK build error in Xcode > > Sorry, I read your message too fast, i have no knowledge about running vtk > on ios, there is this wiki page : > http://www.vtk.org/Wiki/VES/Developers_Guide, but you may already tried > that. > > > Mathieu Westphal > > On Tue, May 3, 2016 at 4:18 PM, Import EV ?? wrote: > Hi Mathieu, > Thank you for your information. > > Is this for iOS? > I need vtk.framework for iOS. > If my question is out of focus, please point it out. > > ----- > Import EV Corp. > ----- > From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] > Sent: Tuesday, May 03, 2016 11:11 PM > To: Import EV ?? > Cc: Ken Martin; vtk > Subject: Re: [vtkusers] VTK build error in Xcode > > Hello > I don't know much about osx, but generally speaking, do not forget to > check the wiki for info : > http://www.vtk.org/Wiki/VTK/Building/MacOSX > is is not ninja specific though. > > > Mathieu Westphal > > On Tue, May 3, 2016 at 4:07 PM, Import EV ?? wrote: > Hi Ken, > Thank you for your response. > > I did not know that. > As far as I searched on the web, I found that someone used Xcode to > generate "vtk.framework". So, I thought I can do the same thing. > > I am not familiar with VTK as well as Cmake. > Could you kindly advise me how to use make or ninja to generate > "vtk.framework". > > I guess I should use "vtk-compile-tools" somehow, as there is a > description "-- Build files have been written > to:/Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools". > > Thanks for your additional help in this regards. > > ----- > Import EV Corp. > ----- > > From: Ken Martin [mailto:ken.martin at kitware.com] > Sent: Tuesday, May 03, 2016 10:43 PM > To: Import EV ?? > Cc: vtk > Subject: Re: [vtkusers] VTK build error in Xcode > > You have to build the VTK framework using make or ninja, the XCode > generator is not currently tested. > > Thanks > Ken > > On Tue, May 3, 2016 at 3:36 AM, Import EV ?? wrote: > I would like to use VTK library for iOS app. > I use CMake to create VTK Xcode project and build it. > I got the following error. > > --- > ... > -- Configuring done > -- Generating done > -- Build files have been written to: > /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools > cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && > /Applications/CMake.app/Contents/bin/cmake -E touch > > /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Prefix/vtk-compile-tools/src/v > tk-compile-tools-stamp/Release/vtk-compile-tools-configure > echo "Performing build step for 'vtk-compile-tools'" > Performing build step for 'vtk-compile-tools' > cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && > make vtkCompileTools > make[1]: *** No rule to make target `vtkCompileTools'. Stop. > make: *** > > [/Users/TetsuMacBookAir/Desktop/DICOM/VTK700bin/CMakeExternals/Prefix/vtk-co > mpile-tools/src/vtk-compile-tools-stamp/Release/vtk-compile-tools-build] > Error 2 > Command /bin/sh failed with exit code 2 > --- > > I set VTK_IOS_BUILD = ON in CMake and other settings stay default. > > The version for each; > VTK 7.0.0 > CMake 3.5.2 > Xcode 7.2.1 > OS X 10.10.5 > > I have no idea why this error occurs. > Anyone who is familiar with this, please help me. > > --------- > Import EV > --------- > > > _______________________________________________ > 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 > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > 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 > > > > _______________________________________________ > 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 info at import-ev.com Tue May 3 10:49:22 2016 From: info at import-ev.com (=?UTF-8?Q?Import_EV_=E9=87=8D=E5=AF=8C?=) Date: Tue, 3 May 2016 23:49:22 +0900 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> <003501d1a545$0fe33510$2fa99f30$@import-ev.com> <003901d1a546$b4e957a0$1ebc06e0$@import-ev.com> <000301d1a549$10e231b0$32a69510$@import-ev.com> Message-ID: <000701d1a54a$fb203550$f1609ff0$@import-ev.com> Hi Shawn, Thank you for your point. I read " Be sure to generate only Unix Makefiles or Ninja build files, as Xcode will not work for this special build." but did not understand what this really means. Now I understand. " Then use CMake as usual to produce project build files." I should do this but I do not know how to do it since I am not familiar with Cmake. What I should is; - open terminal - type "make" and press "return" key Is that it? Which directory should I move and do so? ----- Import EV Corp. ----- From: Shawn Waldon [mailto:shawn.waldon at kitware.com] Sent: Tuesday, May 03, 2016 11:40 PM To: Import EV ?? Cc: Mathieu Westphal; vtk Subject: Re: [vtkusers] VTK build error in Xcode Quoting from that blog: " First ensure that you have the latest Xcode and XCode developer tools installed. To build the VTK framework for iOS development, configure CMake with VTK_IOS_BUILD=ON. CMake will then present a limited set of options, which will we shortly review. Be sure to generate only Unix Makefiles or Ninja build files, as Xcode will not work for this special build. Then use CMake as usual to produce project build files. " You have to install XCode so that your system will have a compiler. But when you are configuring VTK, you have to select 'Unix Makefiles' or 'Ninja' as the generator. It says that the XCode generator doesn't work. Then you open a terminal to the build directory and type 'make' or 'ninja' depending on the generator you chose. Note that to change generators you will have to delete the build directory and reconfigure. HTH, Shawn On Tue, May 3, 2016 at 10:35 AM, Import EV ?? wrote: Hi Mathieu, What I referred to is; https://blog.kitware.com/building-vtk-for-mobile-architectures/ As far as I read iOS portion, I thought I could use Xcode to generate vtk.framework. ----- Import EV Corp. ----- From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] Sent: Tuesday, May 03, 2016 11:28 PM To: Import EV ?? Cc: Ken Martin; vtk Subject: Re: [vtkusers] VTK build error in Xcode Sorry, I read your message too fast, i have no knowledge about running vtk on ios, there is this wiki page : http://www.vtk.org/Wiki/VES/Developers_Guide, but you may already tried that. Mathieu Westphal On Tue, May 3, 2016 at 4:18 PM, Import EV ?? wrote: Hi Mathieu, Thank you for your information. Is this for iOS? I need vtk.framework for iOS. If my question is out of focus, please point it out. ----- Import EV Corp. ----- From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] Sent: Tuesday, May 03, 2016 11:11 PM To: Import EV ?? Cc: Ken Martin; vtk Subject: Re: [vtkusers] VTK build error in Xcode Hello I don't know much about osx, but generally speaking, do not forget to check the wiki for info : http://www.vtk.org/Wiki/VTK/Building/MacOSX is is not ninja specific though. Mathieu Westphal On Tue, May 3, 2016 at 4:07 PM, Import EV ?? wrote: Hi Ken, Thank you for your response. I did not know that. As far as I searched on the web, I found that someone used Xcode to generate "vtk.framework". So, I thought I can do the same thing. I am not familiar with VTK as well as Cmake. Could you kindly advise me how to use make or ninja to generate "vtk.framework". I guess I should use "vtk-compile-tools" somehow, as there is a description "-- Build files have been written to:/Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools". Thanks for your additional help in this regards. ----- Import EV Corp. ----- From: Ken Martin [mailto:ken.martin at kitware.com] Sent: Tuesday, May 03, 2016 10:43 PM To: Import EV ?? Cc: vtk Subject: Re: [vtkusers] VTK build error in Xcode You have to build the VTK framework using make or ninja, the XCode generator is not currently tested. Thanks Ken On Tue, May 3, 2016 at 3:36 AM, Import EV ?? wrote: I would like to use VTK library for iOS app. I use CMake to create VTK Xcode project and build it. I got the following error. --- ... -- Configuring done -- Generating done -- Build files have been written to: /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && /Applications/CMake.app/Contents/bin/cmake -E touch /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Prefix/vtk-compile-tools/src/v tk-compile-tools-stamp/Release/vtk-compile-tools-configure echo "Performing build step for 'vtk-compile-tools'" Performing build step for 'vtk-compile-tools' cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && make vtkCompileTools make[1]: *** No rule to make target `vtkCompileTools'. Stop. make: *** [/Users/TetsuMacBookAir/Desktop/DICOM/VTK700bin/CMakeExternals/Prefix/vtk-co mpile-tools/src/vtk-compile-tools-stamp/Release/vtk-compile-tools-build] Error 2 Command /bin/sh failed with exit code 2 --- I set VTK_IOS_BUILD = ON in CMake and other settings stay default. The version for each; VTK 7.0.0 CMake 3.5.2 Xcode 7.2.1 OS X 10.10.5 I have no idea why this error occurs. Anyone who is familiar with this, please help me. --------- Import EV --------- _______________________________________________ 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 Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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 _______________________________________________ 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 info at import-ev.com Tue May 3 11:20:42 2016 From: info at import-ev.com (=?UTF-8?Q?Import_EV_=E9=87=8D=E5=AF=8C?=) Date: Wed, 4 May 2016 00:20:42 +0900 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: <000301d1a549$10e231b0$32a69510$@import-ev.com> References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> <003501d1a545$0fe33510$2fa99f30$@import-ev.com> <003901d1a546$b4e957a0$1ebc06e0$@import-ev.com> <000301d1a549$10e231b0$32a69510$@import-ev.com> Message-ID: <000801d1a54f$5ba0a870$12e1f950$@import-ev.com> Hi Mathieu, I read "http://www.vtk.org/Wiki/VES/Developers_Guide" and tried to implement "$ cd Apps/iOS/CMakeBuild", but there is no "CMakeBuild" under Apps/iOS directory. Apps/Android directory has it, though. So, I could not complete the process written in this section. ----- Import EV Corp. ----- -----Original Message----- From: Import EV ?? [mailto:info at import-ev.com] Sent: Tuesday, May 03, 2016 11:36 PM To: 'Mathieu Westphal' Cc: 'Ken Martin'; 'vtk'; IMPORT EV Subject: RE: [vtkusers] VTK build error in Xcode Hi Mathieu, What I referred to is; https://blog.kitware.com/building-vtk-for-mobile-architectures/ As far as I read iOS portion, I thought I could use Xcode to generate vtk.framework. ----- Import EV Corp. ----- From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] Sent: Tuesday, May 03, 2016 11:28 PM To: Import EV ?? Cc: Ken Martin; vtk Subject: Re: [vtkusers] VTK build error in Xcode Sorry, I read your message too fast, i have no knowledge about running vtk on ios, there is this wiki page : http://www.vtk.org/Wiki/VES/Developers_Guide, but you may already tried that. Mathieu Westphal On Tue, May 3, 2016 at 4:18 PM, Import EV ?? wrote: Hi Mathieu, Thank you for your information. Is this for iOS? I need vtk.framework for iOS. If my question is out of focus, please point it out. ----- Import EV Corp. ----- From: Mathieu Westphal [mailto:mathieu.westphal at kitware.com] Sent: Tuesday, May 03, 2016 11:11 PM To: Import EV ?? Cc: Ken Martin; vtk Subject: Re: [vtkusers] VTK build error in Xcode Hello I don't know much about osx, but generally speaking, do not forget to check the wiki for info : http://www.vtk.org/Wiki/VTK/Building/MacOSX is is not ninja specific though. Mathieu Westphal On Tue, May 3, 2016 at 4:07 PM, Import EV ?? wrote: Hi Ken, Thank you for your response. I did not know that. As far as I searched on the web, I found that someone used Xcode to generate "vtk.framework". So, I thought I can do the same thing. I am not familiar with VTK as well as Cmake. Could you kindly advise me how to use make or ninja to generate "vtk.framework". I guess I should use "vtk-compile-tools" somehow, as there is a description "-- Build files have been written to:/Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools". Thanks for your additional help in this regards. ----- Import EV Corp. ----- From: Ken Martin [mailto:ken.martin at kitware.com] Sent: Tuesday, May 03, 2016 10:43 PM To: Import EV ?? Cc: vtk Subject: Re: [vtkusers] VTK build error in Xcode You have to build the VTK framework using make or ninja, the XCode generator is not currently tested. Thanks Ken On Tue, May 3, 2016 at 3:36 AM, Import EV ?? wrote: I would like to use VTK library for iOS app. I use CMake to create VTK Xcode project and build it. I got the following error. --- ... -- Configuring done -- Generating done -- Build files have been written to: /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && /Applications/CMake.app/Contents/bin/cmake -E touch /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Prefix/vtk-compile-tools/src/v tk-compile-tools-stamp/Release/vtk-compile-tools-configure echo "Performing build step for 'vtk-compile-tools'" Performing build step for 'vtk-compile-tools' cd /Users/MyMac/Desktop/VTK700bin/CMakeExternals/Build/vtk-compile-tools && make vtkCompileTools make[1]: *** No rule to make target `vtkCompileTools'. Stop. make: *** [/Users/TetsuMacBookAir/Desktop/DICOM/VTK700bin/CMakeExternals/Prefix/vtk-co mpile-tools/src/vtk-compile-tools-stamp/Release/vtk-compile-tools-build] Error 2 Command /bin/sh failed with exit code 2 --- I set VTK_IOS_BUILD = ON in CMake and other settings stay default. The version for each; VTK 7.0.0 CMake 3.5.2 Xcode 7.2.1 OS X 10.10.5 I have no idea why this error occurs. Anyone who is familiar with this, please help me. --------- Import EV --------- _______________________________________________ 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 Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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 From marcus.hanwell at kitware.com Tue May 3 11:41:31 2016 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Tue, 3 May 2016 11:41:31 -0400 Subject: [vtkusers] The real difference between QVTKWidget and QVTKWidget2 In-Reply-To: <5723AB70.9060103@bluequartz.net> References: <5723AB70.9060103@bluequartz.net> Message-ID: On Fri, Apr 29, 2016 at 2:44 PM, Michael Jackson wrote: > We are also getting a similar issue on OS X? Has anyone else seen this > problem? Is QVtkWidget2 ready for use or does it need more development time > on OS X? > It was working pretty well (for me at least) with Qt 4, but I am not sure it has had much testing/development with Qt 5. As stated, QGLWidget is deprecated, and I want to move to a QOpenGLWidget based VTK widget. If you want something right now I think QVTKWidget is the way to go, we have it building against Qt 5.6.0 in Tomviz. We have been testing it on the major platforms, an X event squashing bug was fixed in Qt 5.6.0. Hope that helps, Marcus From utkarsh.ayachit at kitware.com Tue May 3 11:48:45 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 3 May 2016 11:48:45 -0400 Subject: [vtkusers] The real difference between QVTKWidget and QVTKWidget2 In-Reply-To: References: <5723AB70.9060103@bluequartz.net> Message-ID: To add to what Marcus said, ParaView wants to switch over to using Qt 5.6 officially and when that happens, we will be using QOpenGLWidget (through QVTKWidget2). So testing QVTKWidget2 thoroughly in on the timeline for the May/June. Utkarsh From jrpani at louisville.edu Tue May 3 12:44:37 2016 From: jrpani at louisville.edu (jrpani at louisville.edu) Date: Tue, 3 May 2016 16:44:37 +0000 Subject: [vtkusers] The real difference between QVTKWidget and QVTKWidget2 Message-ID: <241A5A2885558545B5AACE36BCCB5DA1010A54FEB7@exmbx02> This is really good news (that ParaView is moving to Qt 5.6). When it makes sense to do so, please provide guidance for those of us who would like to shift our applications from Qt 4.8 to 5.6. Thanks. John ________________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Utkarsh Ayachit [utkarsh.ayachit at kitware.com] Sent: Tuesday, May 03, 2016 11:48 AM To: Marcus D. Hanwell Cc: VTK Users Subject: Re: [vtkusers] The real difference between QVTKWidget and QVTKWidget2 To add to what Marcus said, ParaView wants to switch over to using Qt 5.6 officially and when that happens, we will be using QOpenGLWidget (through QVTKWidget2). So testing QVTKWidget2 thoroughly in on the timeline for the May/June. Utkarsh _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=AwICAg&c=SgMrq23dbjbGX6e0ZsSHgEZX6A4IAf1SO3AJ2bNrHlk&r=mmnAYPckc-mLQBwvb6xmX-yPM0AZAKPJMkskxPzp2Vw&m=QSo2Nqh74TNqtemk4xOZ8XhV51UgLMWg4Tk0nn2brZc&s=V586JaiPqL3YY5Qt5miXWND5uPez1pxXYUPBzQtYet8&e= Please keep messages on-topic and check the VTK FAQ at: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=AwICAg&c=SgMrq23dbjbGX6e0ZsSHgEZX6A4IAf1SO3AJ2bNrHlk&r=mmnAYPckc-mLQBwvb6xmX-yPM0AZAKPJMkskxPzp2Vw&m=QSo2Nqh74TNqtemk4xOZ8XhV51UgLMWg4Tk0nn2brZc&s=h7EUv4BQjBAK-sbXawH54TRtKs7MwdoCfuNtlLoVJcA&e= Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=AwICAg&c=SgMrq23dbjbGX6e0ZsSHgEZX6A4IAf1SO3AJ2bNrHlk&r=mmnAYPckc-mLQBwvb6xmX-yPM0AZAKPJMkskxPzp2Vw&m=QSo2Nqh74TNqtemk4xOZ8XhV51UgLMWg4Tk0nn2brZc&s=XPM5bTuG5mD3Lj4oxdHJGAtkDkQ1PI7fqYnkGQDUZMM&e= Follow this link to subscribe/unsubscribe: https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_vtkusers&d=AwICAg&c=SgMrq23dbjbGX6e0ZsSHgEZX6A4IAf1SO3AJ2bNrHlk&r=mmnAYPckc-mLQBwvb6xmX-yPM0AZAKPJMkskxPzp2Vw&m=QSo2Nqh74TNqtemk4xOZ8XhV51UgLMWg4Tk0nn2brZc&s=zIF9vnlCIOKbnByJQTLpWc956boxdqfd_iIKT-fzVXY&e= From berk.geveci at kitware.com Tue May 3 12:54:34 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 3 May 2016 12:54:34 -0400 Subject: [vtkusers] VTK equivalent of Paraview's Crinkle Clip option? In-Reply-To: References: Message-ID: ParaView uses the vtkExtractGeometry filter under the covers for the crinkle option. Best, -berk On Fri, Apr 22, 2016 at 12:42 AM, Evan Kao wrote: > Hey all, > > Is there a VTK equivalent of Paraview's Crinkle Clip option? > > Some background: I'm want to interactively edit the point data array of > some vtkDataSet. I'm trying to do the following pipeline: > > - vtkIdsFilter is applied to a geometry generate an Ids array > - User uses (box, plane, sphere) widget to roughly specify an implicit > function encompassing part of the geometry > - The implicit function is used to clip the data set (inside out) and > the remaining point Ids are obtained > - The array data for those specific point Ids are set to a specific > value > > However, for some reason the various clippers will remove the generated > point Ids array in both VTK and Paraview. It makes some sense since new > points are generated by the clip, but I think it would be more convenient > if the array wasn't thrown out entirely. > > in Paraview, this issue can be avoided if the Crinkle Clip option is > turned on. But I couldn't find an equivalent option in any of VTK's > various clippers. > > I can get around this by basically casting the Idsarray from vtkIdType to > Int before clipping, but that seems pretty inelegant. A crinkle clip would > be more appropriate. > > I'm also open to other ideas for grabbing the point Ids without using a > clipper. > > Thanks, > Evan Kao > > _______________________________________________ > 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 drouin.simon at gmail.com Tue May 3 13:41:25 2016 From: drouin.simon at gmail.com (Simon Drouin) Date: Tue, 3 May 2016 13:41:25 -0400 Subject: [vtkusers] vtkImageStack with blending options Message-ID: Hi All, Looking for a class that behaves similarly to vtkImageStack but that allows for different types of blending between the slices ( basically, expose OpenGL controls for blending, i.e. glBlendFunc, and glBlendEquation). Is there a class that does that in VTK without relying on CPU-based image processing? Thanks in advance. Simon Drouin -------------- next part -------------- An HTML attachment was scrubbed... URL: From enzo.ferlin at micromar.com Tue May 3 13:54:06 2016 From: enzo.ferlin at micromar.com (Enzo Matsumiya) Date: Tue, 3 May 2016 14:54:06 -0300 Subject: [vtkusers] Custom interactor style with callback Message-ID: <4A20E818-6B54-403F-962F-18F79FC61D42@micromar.com> Hi, I added a callback to my interactor style to synchronize Window/Level accross MPR views. Now I want to use only the left mouse button to interact with them, so I can choose which "tool" I want to use (window, zoom, rotate and move). I can do it by creating a custom interactor style (subclassing vtkInteractorStyleImage), reimplement OnLeftButtonDown() and such, and it works as I expect. But then my callback is not called anymore. What should I do to inform my custom interactor style that it should call a callback? Is this the correct way or should I lookup for another strategy? Thanks, From david.gobbi at gmail.com Tue May 3 13:59:50 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 3 May 2016 11:59:50 -0600 Subject: [vtkusers] vtkImageStack with blending options In-Reply-To: References: Message-ID: Hi Simon, The vtkTexture class provides some control over blending modes, and this feature could also be added to vtkOpenGLImageSliceMapper (which uses vtkTexture internally, for the OpenGL2 backend). If it was added there, then it could be used with vtkImageStack or anywhere else that the vtkImageSlice/vtkImageActor classes are used. I've had this feature on my mind for a long while, but I haven't had any work projects that need it yet. If you want to tinker around with vtkOpenGLImageSliceMapper and get things working to your satisfaction, I'd gladly help to get your changes into VTK. - David On Tue, May 3, 2016 at 11:41 AM, Simon Drouin wrote: > Hi All, > > Looking for a class that behaves similarly to vtkImageStack but that > allows for different types of blending between the slices ( basically, > expose OpenGL controls for blending, i.e. glBlendFunc, and > glBlendEquation). Is there a class that does that in VTK without relying on > CPU-based image processing? > > Thanks in advance. > > Simon Drouin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramin.sinaee at decisionsciencescorp.com Tue May 3 14:59:45 2016 From: ramin.sinaee at decisionsciencescorp.com (Sinaee, Ramin) Date: Tue, 3 May 2016 11:59:45 -0700 Subject: [vtkusers] C or C++ Version of python array_handler package Message-ID: Hello: I am tasked with translating an algorithm from python into C++. The algorithm uses the array_handler python package, produced by the VTK community. I am especially interested in the VTK2Array function. The question is: is there an equivalent C/C++ Library (or even plain source code) for This function? Or better yet a C/C++ equivalent for the array_handler package? Any help on this matter would be greatly appreciated. Thank you, Ramin Sinaee -- This email and its contents are confidential. If you are not the intended recipient, please do not disclose or use the information within this email or its attachments. If you have received this email in error, please report the error to the sender by return email and delete this communication from your records. -------------- next part -------------- An HTML attachment was scrubbed... URL: From seun at rogue-research.com Tue May 3 16:28:59 2016 From: seun at rogue-research.com (Seun Odutola) Date: Tue, 3 May 2016 16:28:59 -0400 Subject: [vtkusers] How to bypass parts of the VTK pipeline In-Reply-To: References: Message-ID: Apologies for not being clear in my initial message, what I meant to say was that A?>C does work. I was hoping to find out a way of having A?>B?>C all connected but to suppress any effect of B when I don?t need it thus working like (A?>C) and turn B?s effect back on when I need it. In short, I have A(probe filter) ?> B(ClipPolyData) ?> C(PolyDataMapper) all connected but since one won?t be clipping much in the application am working with I want to keep the connection but just completely ignore B?s effect when clipping isn?t being executed (which is most of the time during normal operations) and vice versa turn it back on for just clipping. > On May 2, 2016, at 4:36 PM, Dan Lipsa wrote: > > Seun, > What you tried should work. Call SetInputConnection on C with the output port of A and then call vktRenderWindow::Render. > This should execute A->C > Try setting a breakpoint on RequestUpdate for A, B and C to see what gets called. > > > > On Mon, May 2, 2016 at 4:19 PM, Seun Odutola > wrote: > Hello Everyone, > > After researching & googling for answers to no avail, I was wondering if someone here could help me regarding a situation am facing. To keep things simple let?s say I have 3 nodes, A, B, C. A is a probeFilter, B is a ClipPolyData and C is a PolyDataMapper. I currently have a pipeline A?> B?>C and I would like to occasionally ignore B and thus have A?>C directly, how do I achieve this. I have tried to connect directly A?> to C which does nothing (unless am doing something wrong). Hoping someone could point me in the right direction. > > Regards, > Seun > _______________________________________________ > 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 Tue May 3 16:40:22 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 3 May 2016 16:40:22 -0400 Subject: [vtkusers] How to bypass parts of the VTK pipeline In-Reply-To: References: Message-ID: Seun, There is no flag that would remove the effects of a filter from the pipeline. You'll have keep pointers to A and C and insert B in the pipeline when needed and remove it when you don't. To execute the new pipeline you'll call vktRenderWindow::Render. On Tue, May 3, 2016 at 4:28 PM, Seun Odutola wrote: > Apologies for not being clear in my initial message, what I meant to say > was that A?>C does work. I was hoping to find out a way of having A?>B?>C > all connected but to suppress any effect of B when I don?t need it thus > working like (A?>C) and turn B?s effect back on when I need it. In short, I > have A(probe filter) ?> B(ClipPolyData) ?> C(PolyDataMapper) all connected > but since one won?t be clipping much in the application am working with I > want to keep the connection but just completely ignore B?s effect when > clipping isn?t being executed (which is most of the time during normal > operations) and vice versa turn it back on for just clipping. > > On May 2, 2016, at 4:36 PM, Dan Lipsa wrote: > > Seun, > What you tried should work. Call SetInputConnection on C with the output > port of A and then call vktRenderWindow::Render. > This should execute A->C > Try setting a breakpoint on RequestUpdate for A, B and C to see what gets > called. > > > > On Mon, May 2, 2016 at 4:19 PM, Seun Odutola > wrote: > >> Hello Everyone, >> >> After researching & googling for answers to no avail, I was >> wondering if someone here could help me regarding a situation am facing. To >> keep things simple let?s say I have 3 nodes, A, B, C. A is a probeFilter, B >> is a ClipPolyData and C is a PolyDataMapper. I currently have a pipeline >> A?> B?>C and I would like to occasionally ignore B and thus have A?>C >> directly, how do I achieve this. I have tried to connect directly A?> to C >> which does nothing (unless am doing something wrong). Hoping someone could >> point me in the right direction. >> >> Regards, >> Seun >> _______________________________________________ >> 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 May 3 17:01:29 2016 From: sean at rogue-research.com (Sean McBride) Date: Tue, 3 May 2016 17:01:29 -0400 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> Message-ID: <20160503210129.1199818174@mail.rogue-research.com> On Tue, 3 May 2016 09:42:31 -0400, Ken Martin said: >You have to build the VTK framework using make or ninja, the XCode >generator is not currently tested. FYI: I submit a nightly dashboard using the Xcode generator, but it's for OS X, not iOS. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From rickfrank at me.com Tue May 3 18:10:21 2016 From: rickfrank at me.com (Richard Frank) Date: Tue, 03 May 2016 18:10:21 -0400 Subject: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx, continued Message-ID: <2B980E57-85C5-4AE5-A918-8B9C559054B5@me.com> Hi, Were you able to reproduce the issue with LightKit (or the source I posted to Dropbox)? I?m hoping to migrate to 7.0 as soon as we can. Thanks Rick Frank > Re: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx, > continued > Message-ID: > > > Content-Type: text/plain; charset="utf-8" > > Thanks Rick for giving us the case for reproducing the error. I will have > someone look into it. > > Thanks, >> Hi, >> >> I was able to isolate?the problem. >> >> We are using vtkLightKit in our application. >> >> Here is a small app that will demonstrate the problem >> >> https://www.dropbox.com/s/crwlm6njmqvdrz4/Source.7z?dl=0 >> >> >> But basically all you have to do is: >> >> vtkSmartPointer lightKit = vtkSmartPointer::New(); >> lightKit->AddLightsToRenderer(ren1); >> >> and render a volume >> and the shader fails to compile. >> >> Can you verify? >> >> Also, while in there the code >> >> this->Impl->ShaderProgram = this->Impl->ShaderCache->ReadyShaderProgram( >> vertexShader.c_str(), fragmentShader.c_str(), ""); >> if (!this->Impl->ShaderProgram->GetCompiled()) >> { >> vtkErrorMacro("Shader failed to compile"); >> } >> >> should be changed to? >> if (this->Impl->ShaderProgram == nullptr || !this->Impl->ShaderProgram->GetCompiled()) >> { >> >> } >> >> as?ReadyShaderProgram returns nullptr at least in this case (which causes the crash) >> >> Let me ?know if you can repro and, if you fix it I will fetch from git and try again. >> >> Thanks! >> >> Rick Frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihouxing at yeah.net Wed May 4 01:39:40 2016 From: lihouxing at yeah.net (lee) Date: Tue, 3 May 2016 22:39:40 -0700 (MST) Subject: [vtkusers] vtkOrientedGlyphContourRepresentation AlwaysOnTop problem In-Reply-To: <1430214763787-5731654.post@n5.nabble.com> References: <1430214763787-5731654.post@n5.nabble.com> Message-ID: <1462340380854-5737969.post@n5.nabble.com> Hi? Have you sovled the problem? I encounted the same problem, and I am using vtk7.0. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkOrientedGlyphContourRepresentation-AlwaysOnTop-problem-tp5731654p5737969.html Sent from the VTK - Users mailing list archive at Nabble.com. From info at import-ev.com Wed May 4 04:04:22 2016 From: info at import-ev.com (Import EV) Date: Wed, 4 May 2016 17:04:22 +0900 Subject: [vtkusers] VES/Developlers Guide - Apps/iOS/CMakeBuild not exist Message-ID: <006b01d1a5db$9257e630$b707b290$@import-ev.com> I am trying to implement VTK build for iOS along with VES/Developers Guide (http://www.vtk.org/Wiki/VES/Developers_Guide). I did $ git clone git://vtk.org/VES.git and get "VES" folder. The next step is $ cd Apps/iOS/CMakeBuild $ cmake -P configure.cmake $ cd build $ make -j4 However, there is no "CMakeBuild" folder under " Apps/iOS" directory. How can I implement this for iOS? ----- Import EV Corp. ----- From info at import-ev.com Wed May 4 04:18:40 2016 From: info at import-ev.com (Import EV) Date: Wed, 4 May 2016 17:18:40 +0900 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: <20160503210129.1199818174@mail.rogue-research.com> References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> <20160503210129.1199818174@mail.rogue-research.com> Message-ID: <006c01d1a5dd$90aa7260$b1ff5720$@import-ev.com> Hi Sean, Thank you for your information. Since I am new to vtkusers, I am not familiar with a nightly dashboard. How can I see what you described? ----- Import EV Corp. ----- -----Original Message----- From: Sean McBride [mailto:sean at rogue-research.com] Sent: Wednesday, May 04, 2016 6:01 AM To: Ken Martin; Import EV ?? Cc: vtk Subject: Re: [vtkusers] VTK build error in Xcode On Tue, 3 May 2016 09:42:31 -0400, Ken Martin said: >You have to build the VTK framework using make or ninja, the XCode >generator is not currently tested. FYI: I submit a nightly dashboard using the Xcode generator, but it's for OS X, not iOS. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From moonkeeper86 at 126.com Wed May 4 04:37:57 2016 From: moonkeeper86 at 126.com (moonkeeper86 at 126.com) Date: Wed, 4 May 2016 01:37:57 -0700 (MST) Subject: [vtkusers] Fail getting the vtkTextRenderer instance!! Message-ID: <1462351077481-5737974.post@n5.nabble.com> Once I use codes as vtkSmartPointer::New(), the VS2012 will show error message :Fail getting the vtkTextRenderer instance!! -- View this message in context: http://vtk.1045678.n5.nabble.com/Fail-getting-the-vtkTextRenderer-instance-tp5737974.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Wed May 4 06:51:46 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 4 May 2016 06:51:46 -0400 Subject: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx, continued In-Reply-To: <2B980E57-85C5-4AE5-A918-8B9C559054B5@me.com> References: <2B980E57-85C5-4AE5-A918-8B9C559054B5@me.com> Message-ID: Hi Rick, Not yet, we were looking into another bug. One of our team member will look into it and will get back to the mailing list. Thanks for your test script. Thanks, On Tue, May 3, 2016 at 6:10 PM, Richard Frank wrote: > Hi, > > Were you able to reproduce the issue with LightKit (or the source I posted > to Dropbox)? > > > I?m hoping to migrate to 7.0 as soon as we can. > > Thanks > > Rick Frank > > Re: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx, > continued > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Thanks Rick for giving us the case for reproducing the error. I will have > someone look into it. > > Thanks, > > > > Hi, > > I was able to isolate?the problem. > > We are using vtkLightKit in our application. > > Here is a small app that will demonstrate the problem > > https://www.dropbox.com/s/crwlm6njmqvdrz4/Source.7z?dl=0 > > > But basically all you have to do is: > > vtkSmartPointer lightKit = > vtkSmartPointer::New(); > lightKit->AddLightsToRenderer(ren1); > > and render a volume > and the shader fails to compile. > > Can you verify? > > Also, while in there the code > > this->Impl->ShaderProgram = this->Impl->ShaderCache->ReadyShaderProgram( > vertexShader.c_str(), fragmentShader.c_str(), ""); > if (!this->Impl->ShaderProgram->GetCompiled()) > { > vtkErrorMacro("Shader failed to compile"); > } > > should be changed to? > if (this->Impl->ShaderProgram == nullptr || > !this->Impl->ShaderProgram->GetCompiled()) > { > > } > > as?ReadyShaderProgram returns nullptr at least in this case (which causes > the crash) > > Let me ?know if you can repro and, if you fix it I will fetch from git and > try again. > > Thanks! > > Rick Frank > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From hinesh_88 at hotmail.co.uk Wed May 4 09:24:20 2016 From: hinesh_88 at hotmail.co.uk (Hpatel) Date: Wed, 4 May 2016 06:24:20 -0700 (MST) Subject: [vtkusers] raycasting to create 3d surfaces on dicom files? Message-ID: <1462368260441-5737978.post@n5.nabble.com> Hi vtkUsers, Has anyone used raycasting to create 3d surfaces on dicom files? I am trying to do a direct render and display a 3D graphic using Raycasting -isosurfacefunction. What i'm after is to know if i can use DICOMImageReader to load a .dcm file and directly apply the raycast function to display a 3d Graphic? Many thanks, HP -- View this message in context: http://vtk.1045678.n5.nabble.com/raycasting-to-create-3d-surfaces-on-dicom-files-tp5737978.html Sent from the VTK - Users mailing list archive at Nabble.com. From sean at rogue-research.com Wed May 4 10:35:40 2016 From: sean at rogue-research.com (Sean McBride) Date: Wed, 4 May 2016 10:35:40 -0400 Subject: [vtkusers] VTK build error in Xcode In-Reply-To: <006c01d1a5dd$90aa7260$b1ff5720$@import-ev.com> References: <002501d1a50e$8d57ed10$a807c730$@import-ev.com> <20160503210129.1199818174@mail.rogue-research.com> <006c01d1a5dd$90aa7260$b1ff5720$@import-ev.com> Message-ID: <20160504143540.1290573080@mail.rogue-research.com> On Wed, 4 May 2016 17:18:40 +0900, Import EV said: >Thank you for your information. >Since I am new to vtkusers, I am not familiar with a nightly dashboard. >How can I see what you described? The 'dashboard' is a web page that shows the result of test compilations and test executions of VTK. You can see it here: It helps the community ensure that VTK works with a variety to compilers, operating systems, etc. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From elvis.stansvik at orexplore.com Wed May 4 12:39:56 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 4 May 2016 18:39:56 +0200 Subject: [vtkusers] How to bypass parts of the VTK pipeline In-Reply-To: References: Message-ID: Den 3 maj 2016 10:40 em skrev "Dan Lipsa" : > > Seun, > There is no flag that would remove the effects of a filter from the pipeline. You'll have keep pointers to A and C and insert B in the pipeline when needed and remove it when you don't. > To execute the new pipeline you'll call vktRenderWindow::Render. I guess you could subclass B and give it an easy switch function to turn it into a noop filter.. But better/easier to just reconfigure the pipeline like Dan suggests. Elvis > > > > On Tue, May 3, 2016 at 4:28 PM, Seun Odutola wrote: >> >> Apologies for not being clear in my initial message, what I meant to say was that A?>C does work. I was hoping to find out a way of having A?>B?>C all connected but to suppress any effect of B when I don?t need it thus working like (A?>C) and turn B?s effect back on when I need it. In short, I have A(probe filter) ?> B(ClipPolyData) ?> C(PolyDataMapper) all connected but since one won?t be clipping much in the application am working with I want to keep the connection but just completely ignore B?s effect when clipping isn?t being executed (which is most of the time during normal operations) and vice versa turn it back on for just clipping. >> >>> On May 2, 2016, at 4:36 PM, Dan Lipsa wrote: >>> >>> Seun, >>> What you tried should work. Call SetInputConnection on C with the output port of A and then call vktRenderWindow::Render. >>> This should execute A->C >>> Try setting a breakpoint on RequestUpdate for A, B and C to see what gets called. >>> >>> >>> >>> On Mon, May 2, 2016 at 4:19 PM, Seun Odutola wrote: >>>> >>>> Hello Everyone, >>>> >>>> After researching & googling for answers to no avail, I was wondering if someone here could help me regarding a situation am facing. To keep things simple let?s say I have 3 nodes, A, B, C. A is a probeFilter, B is a ClipPolyData and C is a PolyDataMapper. I currently have a pipeline A?> B?>C and I would like to occasionally ignore B and thus have A?>C directly, how do I achieve this. I have tried to connect directly A?> to C which does nothing (unless am doing something wrong). Hoping someone could point me in the right direction. >>>> >>>> Regards, >>>> Seun >>>> _______________________________________________ >>>> 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 Wed May 4 12:36:47 2016 From: tjlp at netease.com (Liu_tj) Date: Thu, 5 May 2016 00:36:47 +0800 (CST) Subject: [vtkusers] How to transform world coordinate to normalized viewport coordinate Message-ID: <7288a2f1.12.1547ca102e6.Coremail.tjlp@netease.com> Hi, Here I get a problem about transform world coordinate to normalized viewport coordinate. I use vtkBorderWidget to select an area. When the selection is finished, I use below code to get the normalized viewport coordinate of the select point and transform to world coordinate. vtkBorderRepresentation borderrep = vtkBorderRepresentation.SafeDownCast(m_areaSegment.GetRepresentation()); vtkCoordinate lowerleftCorr = borderrep.GetPositionCoordinate(); //normalized view port coordinate double[] lowerleft = lowerleftCorr.GetComputedWorldValue(m_renderer);//World coordinate vtkCoordinate upperRightCorr = borderrep.GetPosition2Coordinate(); double[] upperright = upperRightCorr.GetComputedWorldValue(m_renderer); Now, given a world coordinate, How can I transform to normalized viewport coordinate and then I can set the lower left and upper right corner of vtkBorderWidget by vtkBorderRepresentation.SetPostion() and SetPosition2()? I try http://stackoverflow.com/questions/30124534/convert-world-to-normalized-viewport but it doesn't work. Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From seun at rogue-research.com Wed May 4 15:48:18 2016 From: seun at rogue-research.com (Seun Odutola) Date: Wed, 4 May 2016 15:48:18 -0400 Subject: [vtkusers] How to bypass parts of the VTK pipeline In-Reply-To: References: Message-ID: Thanks guys, it?s looking more like I have to take that route as you all described (reconnecting the pipeline as desired). However, I would like to know if it?s possible to compare the (B - ClipPolyData?s) bounding box against the input?s box (A) in order to decide if the ?B? should be skipped (thus connecting A to C) as described in my previous email, how can I achieve this. Thanks a lot guys, truly appreciate the help. Regards, Seun > On May 4, 2016, at 12:39 PM, Elvis Stansvik wrote: > > > Den 3 maj 2016 10:40 em skrev "Dan Lipsa" >: > > > > Seun, > > There is no flag that would remove the effects of a filter from the pipeline. You'll have keep pointers to A and C and insert B in the pipeline when needed and remove it when you don't. > > To execute the new pipeline you'll call vktRenderWindow::Render. > > I guess you could subclass B and give it an easy switch function to turn it into a noop filter.. But better/easier to just reconfigure the pipeline like Dan suggests. > > Elvis > > > > > > > > > On Tue, May 3, 2016 at 4:28 PM, Seun Odutola > wrote: > >> > >> Apologies for not being clear in my initial message, what I meant to say was that A?>C does work. I was hoping to find out a way of having A?>B?>C all connected but to suppress any effect of B when I don?t need it thus working like (A?>C) and turn B?s effect back on when I need it. In short, I have A(probe filter) ?> B(ClipPolyData) ?> C(PolyDataMapper) all connected but since one won?t be clipping much in the application am working with I want to keep the connection but just completely ignore B?s effect when clipping isn?t being executed (which is most of the time during normal operations) and vice versa turn it back on for just clipping. > >> > >>> On May 2, 2016, at 4:36 PM, Dan Lipsa > wrote: > >>> > >>> Seun, > >>> What you tried should work. Call SetInputConnection on C with the output port of A and then call vktRenderWindow::Render. > >>> This should execute A->C > >>> Try setting a breakpoint on RequestUpdate for A, B and C to see what gets called. > >>> > >>> > >>> > >>> On Mon, May 2, 2016 at 4:19 PM, Seun Odutola > wrote: > >>>> > >>>> Hello Everyone, > >>>> > >>>> After researching & googling for answers to no avail, I was wondering if someone here could help me regarding a situation am facing. To keep things simple let?s say I have 3 nodes, A, B, C. A is a probeFilter, B is a ClipPolyData and C is a PolyDataMapper. I currently have a pipeline A?> B?>C and I would like to occasionally ignore B and thus have A?>C directly, how do I achieve this. I have tried to connect directly A?> to C which does nothing (unless am doing something wrong). Hoping someone could point me in the right direction. > >>>> > >>>> Regards, > >>>> Seun > >>>> _______________________________________________ > >>>> 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 david.lonie at kitware.com Wed May 4 17:35:49 2016 From: david.lonie at kitware.com (David Lonie) Date: Wed, 4 May 2016 17:35:49 -0400 Subject: [vtkusers] Fail getting the vtkTextRenderer instance!! In-Reply-To: <1462351077481-5737974.post@n5.nabble.com> References: <1462351077481-5737974.post@n5.nabble.com> Message-ID: On Wed, May 4, 2016 at 4:37 AM, moonkeeper86 at 126.com wrote: > Once I use codes as vtkSmartPointer::New(), the VS2012 > will show error message :Fail getting the vtkTextRenderer instance!! > Make sure you're linking the vtkRenderingFreeType library to your application. It provides the standard implementation of vtkTextRenderer, and these errors should go away. HTH, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Wed May 4 17:57:22 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 4 May 2016 17:57:22 -0400 Subject: [vtkusers] How to bypass parts of the VTK pipeline In-Reply-To: References: Message-ID: You want to make sure that the pipeline run before you can get the data from A and B. So I would listen to EndEvent on render window and do the bounding box check and possible reconfigure the pipeline then (remove B). Not sure that removing the clip filter would save you that much though. Dan On Wed, May 4, 2016 at 3:48 PM, Seun Odutola wrote: > Thanks guys, it?s looking more like I have to take that route as you all > described (reconnecting the pipeline as desired). However, I would like to > know if it?s possible to compare the (B - ClipPolyData?s) bounding box > against the input?s box (A) in order to decide if the ?B? should be skipped > (thus connecting A to C) as described in my previous email, how can I > achieve this. Thanks a lot guys, truly appreciate the help. > > Regards, > Seun > > > > > On May 4, 2016, at 12:39 PM, Elvis Stansvik > wrote: > > > Den 3 maj 2016 10:40 em skrev "Dan Lipsa" : > > > > Seun, > > There is no flag that would remove the effects of a filter from the > pipeline. You'll have keep pointers to A and C and insert B in the pipeline > when needed and remove it when you don't. > > To execute the new pipeline you'll call vktRenderWindow::Render. > > I guess you could subclass B and give it an easy switch function to turn > it into a noop filter.. But better/easier to just reconfigure the pipeline > like Dan suggests. > > Elvis > > > > > > > > > On Tue, May 3, 2016 at 4:28 PM, Seun Odutola > wrote: > >> > >> Apologies for not being clear in my initial message, what I meant to > say was that A?>C does work. I was hoping to find out a way of having > A?>B?>C all connected but to suppress any effect of B when I don?t need it > thus working like (A?>C) and turn B?s effect back on when I need it. In > short, I have A(probe filter) ?> B(ClipPolyData) ?> C(PolyDataMapper) all > connected but since one won?t be clipping much in the application am > working with I want to keep the connection but just completely ignore B?s > effect when clipping isn?t being executed (which is most of the time during > normal operations) and vice versa turn it back on for just clipping. > >> > >>> On May 2, 2016, at 4:36 PM, Dan Lipsa wrote: > >>> > >>> Seun, > >>> What you tried should work. Call SetInputConnection on C with the > output port of A and then call vktRenderWindow::Render. > >>> This should execute A->C > >>> Try setting a breakpoint on RequestUpdate for A, B and C to see what > gets called. > >>> > >>> > >>> > >>> On Mon, May 2, 2016 at 4:19 PM, Seun Odutola > wrote: > >>>> > >>>> Hello Everyone, > >>>> > >>>> After researching & googling for answers to no avail, I was > wondering if someone here could help me regarding a situation am facing. To > keep things simple let?s say I have 3 nodes, A, B, C. A is a probeFilter, B > is a ClipPolyData and C is a PolyDataMapper. I currently have a pipeline > A?> B?>C and I would like to occasionally ignore B and thus have A?>C > directly, how do I achieve this. I have tried to connect directly A?> to C > which does nothing (unless am doing something wrong). Hoping someone could > point me in the right direction. > >>>> > >>>> Regards, > >>>> Seun > >>>> _______________________________________________ > >>>> 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 info at import-ev.com Wed May 4 20:09:14 2016 From: info at import-ev.com (Import EV) Date: Thu, 5 May 2016 09:09:14 +0900 Subject: [vtkusers] VES/Developlers Guide - Apps/iOS/CMakeBuild not exist In-Reply-To: <006b01d1a5db$9257e630$b707b290$@import-ev.com> References: <006b01d1a5db$9257e630$b707b290$@import-ev.com> Message-ID: <003c01d1a662$5b812090$128361b0$@import-ev.com> I have another question. I would like to create 3D volume rendering on iPhone (iOS base products) from DICOM files. I searched on the web and finally found that VTK is the only library which enables iOS to create volume rendering from DICOM files. So, I have tried to get vtk.framework somehow, but am still struggling. Now, my another question is, "VES/Developlers Guide" is the best way for me to get vtk.framework to achieve my final purpose, which is to create 3D volume rendering on iPhone (iOS base products) from DICOM files? Please advise me the best way to achieve my final purpose. Thanks. ----- Import EV Corp. ----- -----Original Message----- From: Import EV [mailto:info at import-ev.com] Sent: Wednesday, May 04, 2016 5:04 PM To: vtkusers at vtk.org Cc: IMPORT EV Subject: VES/Developlers Guide - Apps/iOS/CMakeBuild not exist I am trying to implement VTK build for iOS along with VES/Developers Guide (http://www.vtk.org/Wiki/VES/Developers_Guide). I did $ git clone git://vtk.org/VES.git and get "VES" folder. The next step is $ cd Apps/iOS/CMakeBuild $ cmake -P configure.cmake $ cd build $ make -j4 However, there is no "CMakeBuild" folder under " Apps/iOS" directory. How can I implement this for iOS? ----- Import EV Corp. ----- From yangmin_hust at 126.com Thu May 5 04:37:37 2016 From: yangmin_hust at 126.com (minyang) Date: Thu, 5 May 2016 01:37:37 -0700 (MST) Subject: [vtkusers] Change label from vtkScalarBarActor In-Reply-To: <1462437457779-1242020.post@n5.nabble.com> References: <1462437457779-1242020.post@n5.nabble.com> Message-ID: <1462437457777-5737989.post@n5.nabble.com> Hi jimmigoo, Did you solved this case several years ago? Now, I meet the same requirement. Best Regards, min -- View this message in context: http://vtk.1045678.n5.nabble.com/Change-label-from-vtkScalarBarActor-tp1242020p5737989.html Sent from the VTK - Users mailing list archive at Nabble.com. From flaviumarc at gmail.com Thu May 5 08:11:07 2016 From: flaviumarc at gmail.com (mesajflaviu generic) Date: Thu, 5 May 2016 15:11:07 +0300 Subject: [vtkusers] CT slice numbering In-Reply-To: References: Message-ID: > > Hi to all ! > > I have done a CT viewer with MPR guided of this example: > > [VTK.git] / Examples / Medical / Cxx / Medical3.cxx > > > The only difference is that I have used vtkDICOMReader > as DICOM reader, it's the only > difference ... > > but I noticed that on *axial planes*, the original plane, *the slice > numbering begin with 1 from the top of the patient, and of some of them the > slice numbering are finish on the top of the patient* ... > > Can you tell me why is happen that, and how can I solve the problem ? Any > hint, link, solution would be very appreciated ! > > Flaviu. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From i.v.ankudinov at mail.ru Thu May 5 08:17:32 2016 From: i.v.ankudinov at mail.ru (IlinkaGrap) Date: Thu, 5 May 2016 05:17:32 -0700 (MST) Subject: [vtkusers] vtkFeatureEdges Message-ID: <1462450652924-5737991.post@n5.nabble.com> Dear VTK Users, I have a question regarding vtkFeatureEdges filter. When I apply it to my polydata I get the points but they are ordered/connected in a wrong way, thus Im not able to reconstruct the whole boundary properly. Is there a way to place them in the right order, or should I do this manually? Regards, Ilia -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkFeatureEdges-tp5737991.html Sent from the VTK - Users mailing list archive at Nabble.com. From ogdenk at upstate.edu Thu May 5 08:31:51 2016 From: ogdenk at upstate.edu (Kent Ogden) Date: Thu, 05 May 2016 08:31:51 -0400 Subject: [vtkusers] CT slice numbering In-Reply-To: References: Message-ID: <572B04F702000082000EDC27@gatedm1.upstate.edu> Flaviu, Maybe the order in which the scans were reconstructed were in opposite order? This could happen if, for example, the patient orientation was not set correctly in the scanner. An example would be the patient was feet first supine but the technologist left the default head first supine setting. Also, on some scanners I think it may be possible to reconstruct in either order. One dicom tag you can look at is InstanceNumber (0020,0013) and see how the slices are numbered. Kent Kent Ogden PhD Associate Professor, Radiology SUNY Upstate Medical University 750 E. Adams Street Syracuse, NY 13210 email: ogdenk at upstate.edu voice: (315) 464-5083 fax: (315) 464-8789>>> mesajflaviu generic 5/5/2016 8:11 AM >>> Hi to all ! I have done a CT viewer with MPR guided of this example: [VTK.git] / Examples / Medical / Cxx / Medical3.cxx ( http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Medical/Cxx/Medical3.cxx ) The only difference is that I have used vtkDICOMReader ( https://github.com/dgobbi/vtk-dicom ) as DICOM reader, it's the only difference ... but I noticed that on axial planes, the original plane, the slice numbering begin with 1 from the top of the patient, and of some of them the slice numbering are finish on the top of the patient ... Can you tell me why is happen that, and how can I solve the problem ? Any hint, link, solution would be very appreciated ! Flaviu. -------------- next part -------------- An HTML attachment was scrubbed... URL: From moonkeeper86 at 126.com Thu May 5 22:25:37 2016 From: moonkeeper86 at 126.com (moonkeeper86 at 126.com) Date: Thu, 5 May 2016 19:25:37 -0700 (MST) Subject: [vtkusers] =?utf-8?q?How_to_show_color_images_using_vtkImagePlane?= =?utf-8?b?V2lkZ2V077yf?= Message-ID: <1462501537004-5738007.post@n5.nabble.com> How to show color images using vtkImagePlaneWidget? Like following codes? imColorsmap->PassAlphaToOutputOff(); //use in RGBA imColorsmap->SetActiveComponent( 0 ); imColorsmap->SetOutputFormatToLuminance(); imColorsmap->SetInputData( (vtkDataSet*)imPlaneW->GetResliceOutput() ); imColorsmap->SetLookupTable( (vtkScalarsToColors *)imPlaneW->GetLookupTable() ); imCMActor->PickableOff(); imCMActor->SetInputData( imColorsmap->GetOutput() ); I have tried those. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-show-color-images-using-vtkImagePlaneWidget-tp5738007.html Sent from the VTK - Users mailing list archive at Nabble.com. From drouin.simon at gmail.com Fri May 6 00:29:51 2016 From: drouin.simon at gmail.com (Simon Drouin) Date: Fri, 6 May 2016 00:29:51 -0400 Subject: [vtkusers] vtkImageStack with blending options In-Reply-To: References: Message-ID: Hi David, Didn't realize OpenGL2 backend was using vtkTexture. We are still on the old OpenGL backend (hopefully we will switch soon). We have had our own (very simple) version of vtkImageStack based on vtkTexture for a while. Ours uses multi texturing to combine images, which is limited by the number of textures the OpenGL driver allows. I've been wanting to replace it with vtkImageStack for that reason but was always stopped by the lack of control of blending with vtkImageStack. I think modifying vtkImageStack is a little more work than you suggest though. vtkTexture has control for blending (I guess you are referring to VTKTextureBlendingMode), but nothing that would be compatible with vtkImageStack. VTKTextureBlendingMode controls how multiple textures are combined together and with incoming fragment color rather than how the fragment is blended into the frame buffer. My understanding is that vtkImageStack combines images in the framebuffer, so to control blending you have to be able to set glBlendFunc and glBlendEquation for each vtkImageSlice. I think one extra option that would be interesting for vtkImageStack is to allow rendering of all images in a texture rather than directly in the frame buffer. It would allow to combine all images in the stack in a very flexible way before rendering to the screen. What do you think? I'll try to find a time slot to work on those ideas. If I find the time I'll contact you to help me push the code to VTK. Cheers. s. On Tue, May 3, 2016 at 1:59 PM, David Gobbi wrote: > Hi Simon, > > The vtkTexture class provides some control over blending modes, and this > feature could also be added to vtkOpenGLImageSliceMapper (which uses > vtkTexture internally, for the OpenGL2 backend). If it was added there, > then it could be used with vtkImageStack or anywhere else that the > vtkImageSlice/vtkImageActor classes are used. > > I've had this feature on my mind for a long while, but I haven't had any > work projects that need it yet. If you want to tinker around with > vtkOpenGLImageSliceMapper and get things working to your satisfaction, I'd > gladly help to get your changes into VTK. > > - David > > > On Tue, May 3, 2016 at 11:41 AM, Simon Drouin > wrote: > >> Hi All, >> >> Looking for a class that behaves similarly to vtkImageStack but that >> allows for different types of blending between the slices ( basically, >> expose OpenGL controls for blending, i.e. glBlendFunc, and >> glBlendEquation). Is there a class that does that in VTK without relying on >> CPU-based image processing? >> >> Thanks in advance. >> >> Simon Drouin >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Fri May 6 07:19:42 2016 From: flaviu2 at yahoo.com (flaviu2) Date: Fri, 6 May 2016 04:19:42 -0700 (MST) Subject: [vtkusers] CT number refrence table In-Reply-To: References: Message-ID: <1462533582355-5738009.post@n5.nabble.com> Have you find what you seek ? -- View this message in context: http://vtk.1045678.n5.nabble.com/CT-number-refrence-table-tp3343480p5738009.html Sent from the VTK - Users mailing list archive at Nabble.com. From bruno.manata.oliveira at gmail.com Fri May 6 08:28:28 2016 From: bruno.manata.oliveira at gmail.com (Bruno Oliveira) Date: Fri, 6 May 2016 13:28:28 +0100 Subject: [vtkusers] [vtk-users] urgent! range image as double Message-ID: Hello, I need to get the zbuffer in double or single precision float. This is what I'm doing renderWindow->Render(); vtkSmartPointer filter = vtkSmartPointer::New(); vtkSmartPointer scale = vtkSmartPointer::New(); // Filter Object Setup filter->SetInput(renderWindow); filter->SetMagnification(1); filter->SetInputBufferTypeToZBuffer(); //Extract z buffer value filter->ReadFrontBufferOff(); // read from the back buffer filter->Update(); // Scale Object Setup scale->SetOutputScalarTypeToDouble(); scale->SetInputConnection(filter->GetOutputPort()); scale->SetShift(0); auto rawData = filter->GetOutput(); rawData->Register(nullptr); // !!! Increase reference counter, make returned Image struct // responsible for freeing the memory afterwards int dims[3]; // Returns coords in (x, y) instead of (row, col) rawData->GetDimensions(dims); assert(rawData->GetNumberOfScalarComponents() == 1); double *rawData = rawData->GetScalarPointer(); However, this is causing a segmentation fault. What am I doing wrong? -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri May 6 08:43:09 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 6 May 2016 06:43:09 -0600 Subject: [vtkusers] [vtk-users] urgent! range image as double In-Reply-To: References: Message-ID: Hi Bruno, This looks like a mistake: auto rawData = filter->GetOutput(); You need the output from vtkImageShiftScale (and you need to update first): scale->Update(); auto rawData = scale->GetOutput(); - David On Fri, May 6, 2016 at 6:28 AM, Bruno Oliveira < bruno.manata.oliveira at gmail.com> wrote: > Hello, > > I need to get the zbuffer in double or single precision float. This is > what I'm doing > > > > renderWindow->Render(); > > vtkSmartPointer filter = > vtkSmartPointer::New(); > vtkSmartPointer scale = > vtkSmartPointer::New(); > > // Filter Object Setup > filter->SetInput(renderWindow); > filter->SetMagnification(1); > filter->SetInputBufferTypeToZBuffer(); //Extract z buffer value > filter->ReadFrontBufferOff(); // read from the back buffer > filter->Update(); > > // Scale Object Setup > scale->SetOutputScalarTypeToDouble(); > scale->SetInputConnection(filter->GetOutputPort()); > scale->SetShift(0); > > > auto rawData = filter->GetOutput(); > rawData->Register(nullptr); // !!! Increase reference counter, make > returned Image struct > // responsible for freeing the memory > afterwards > > int dims[3]; > // Returns coords in (x, y) instead of (row, col) > rawData->GetDimensions(dims); > > assert(rawData->GetNumberOfScalarComponents() == 1); > > > double *rawData = rawData->GetScalarPointer(); > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri May 6 08:48:35 2016 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 May 2016 08:48:35 -0400 Subject: [vtkusers] Crash in vtkShaderProgram/vtkOpenGLPolyDataMapper In-Reply-To: References: <1460742057180-5737734.post@n5.nabble.com> <1461097665105-5737793.post@n5.nabble.com> <1461618738247-5737869.post@n5.nabble.com> <1461695330984-5737886.post@n5.nabble.com> <1461698736298-5737889.post@n5.nabble.com> <1461770129232-5737902.post@n5.nabble.com> Message-ID: The render() method has a if (initialized) to protect it from making opengl calls prior to initialization but it is certainly possible that some other operation is hitting openGL. If you know where it crashes that could help narrow down the entry point that is getting hit prior to initialization. On Wed, Apr 27, 2016 at 11:26 AM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > There is only one change on the OpenGL backend but it is a huge one. So > definitely it is more than likely the case... > > Ken any thoughts on that initialization process/check? > > Otherwise, you can always build your VTK with the OpenGL1 backend and see > if your problem goes away. That could also help us narrow down the source > of the problem. > > Thanks, > > Seb > > On Wed, Apr 27, 2016 at 9:15 AM, dei wrote: > >> This feels like a race condition between the vtk initialization of OpenGL >> and >> the first vtkRender() call. Is there a way to test for OpenGL >> initialized? I >> could block vtkRender() calls till it's ready to go. vtk's usage of OpenGL >> changed a lot in the last 2 years, right? >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Crash-in-vtkShaderProgram-vtkOpenGLPolyDataMapper-tp5737734p5737902.html >> Sent from the VTK - Users mailing list archive at Nabble.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 >> > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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 wangq1979 at outlook.com Fri May 6 16:15:59 2016 From: wangq1979 at outlook.com (Wang Q) Date: Fri, 6 May 2016 20:15:59 +0000 Subject: [vtkusers] save screenshot as png image Message-ID: Hi guys, I want to save screenshot as png image following the example. Unfortunately, the code went into windowToImageFilter->Update() method and never came back. Below is the snippet: // Screenshot vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); windowToImageFilter->SetInput(renderWindow); //windowToImageFilter->SetMagnification(3); //set the resolution of the output image (3 times the current resolution of vtk render window) //windowToImageFilter->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel //windowToImageFilter->ReadFrontBufferOff(); // read from the back buffer windowToImageFilter->Update(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("e:/screenshot2.png"); writer->SetInputConnection(windowToImageFilter->GetOutputPort()); writer->Write(); renderWindow->Render(); timerLog->MarkEvent("finish rendering"); renderWindowInteractor->Start(); I am using win10, vtk6.3 on vc2013. Any tips would be appreciated. Cheers, Chiang -------------- next part -------------- An HTML attachment was scrubbed... URL: From seun at rogue-research.com Fri May 6 16:23:32 2016 From: seun at rogue-research.com (Seun Odutola) Date: Fri, 6 May 2016 16:23:32 -0400 Subject: [vtkusers] Changing vtkClipPolyData to ignore processing based on it's Bounding Box evaluation Message-ID: <042F0014-EE8F-4F96-B0A7-FECE4FA0819C@rogue-research.com> Hi Everyone, I have a situation where I feed an input (which is an output result of a vtkProbeFilter) to a vtkClipPolyData and subsequently pass it?s output to a vtkPolyDataMapper. Basically my pipeline is as follows Mesh(polydata) (M) ?> A?> B ?> C A - vtkProbeFilter B - vtkClipPolyData C - vtkPolyDataMapper I gathered from previous responses to my last message (see topic: How to bypass parts of vtk pipeline) that reconfiguring the pipeline as suggested in that thread was most likely the way to go about achieving that. However, I had an idea which I would like to propose. For instance in my situation as described above my application typically will not be making use of the vtkClipPolyData that often but it?s of utmost importance that I have it configured ready to go whenever the user needs to Clip, so I decided to peek at vtkClipPolyData?s RequestData function where I compare the input?s bounding box (in my case the box to my polydata result from A), if the clippolydata?s box contains M in it?s entirety then I would like the input to be the output of the clippolydata (result going into ?> C) but if the clip polydata?s bounding box doesn?t contain M?s bounding box but just intersects it?s points then I would like to clip it and pass along the result to C. Basically 1 - if B?s box contains M - skip 2 - if B doesn?t contain M but just intersects some of it?s point - then clip. I managed to get do the bounds checking that certifies the first part of my algorithm but the 2nd part is the tricky bit when I resize my clipper (in it?s U.I) and then expect the vtkClipPolyData to Clip it empties the entire polydata of M. I believe it has something to do setting the clipScalars. I also noticed the line below in vtkClipPolyData.cxx for ( i=0; i < numPts; i++ ) { s = this->ClipFunction->FunctionValue(inPts->GetPoint(i)); tmpScalars->SetComponent(i,0,s); } tends to be the bottleneck in my case, which is why I?m trying to find a way to just ignore the effect of B in the pipeline when I need not clip but process it when I need to clip. I understand from the code that when I need to clip the line above must be executed but when I don?t need to clip what could be done to replace this line because ultimately down the line the tmpScalars is set to the clipScalars which is needed for further computation. Thanks everyone Regards, Seun -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.ei at novodynamics.com Fri May 6 17:03:00 2016 From: david.ei at novodynamics.com (dei) Date: Fri, 6 May 2016 14:03:00 -0700 (MST) Subject: [vtkusers] Crash in vtkShaderProgram/vtkOpenGLPolyDataMapper In-Reply-To: References: <1461618738247-5737869.post@n5.nabble.com> <1461695330984-5737886.post@n5.nabble.com> <1461698736298-5737889.post@n5.nabble.com> <1461770129232-5737902.post@n5.nabble.com> Message-ID: <1462568580080-5738017.post@n5.nabble.com> Just to reiterate, I want to use VTK-7.0.0 to display very large Wavefront .OBJ meshes within a complex java CT medical application. My simple java viewer test apps work fine (since I fixed a "mouse-move before initialization complete" crash - see above). However, more often than not, the CT app crashes during VTK initialization. When it initializes successfully, it works flawlessly. I have more info about the problem: 1. The problem occurs on different 3 PCs with 2 different graphics cards. All support OpenGL 4.x 2. When the crash occurs, the vtkError.txt log shows: ERROR: In ..\..\..\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx, line 724 vtkWin32OpenGLRenderWindow (0000000057C208F0): failed to get valid pixel format. ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 533 vtkWin32OpenGLRenderWindow (0000000057C208F0): GLEW could not be initialized. ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLRenderer.cxx, line 441 vtkOpenGLRenderer (0000000057C21150): failed after Clear 16 OpenGL errors detected 0 : (1282) Invalid operation 1 : (1282) Invalid operation 2 : (1282) Invalid operation ... ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLCamera.cxx, line 144 vtkOpenGLCamera (0000000051E5DDD0): failed after Render 16 OpenGL errors detected 0 : (1282) Invalid operation ... ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLRenderer.cxx, line 116 vtkOpenGLRenderer (0000000057C21150): failed after UpdateLights 16 OpenGL errors detected 0 : (1282) Invalid operation ... ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLProperty.cxx, line 91 vtkOpenGLProperty (00000000004E2D70): failed after Render 16 OpenGL errors detected 0 : (1282) Invalid operation ... ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLPolyDataMapper.cxx, line 2918 vtkOpenGLPolyDataMapper (0000000051E9C170): failed after BuildBufferObjects 16 OpenGL errors detected 0 : (1282) Invalid operation ... ERROR: In ..\..\..\Rendering\OpenGL2\vtkShaderProgram.cxx, line 399 vtkShaderProgram (0000000057C22B60): Shader object was not initialized, cannot attach it. 3. All accesses to the VTK occur on the AWT-EventQueue-1 thread. 4. Changing the order and timing of VTK initialization relative to the display of the VTK JPanel does not appear to fix the problem. 5. VTK-6.3.0 does *not* exhibit the crash, but it is slow to render when moving or zooming the mesh. My simple test apps *have no problem rendering the same mesh* when using VTK-6.3.0. This should tell me something, but I'm not sure what. -- View this message in context: http://vtk.1045678.n5.nabble.com/Crash-in-vtkShaderProgram-vtkOpenGLPolyDataMapper-tp5737734p5738017.html Sent from the VTK - Users mailing list archive at Nabble.com. From sebastien.jourdain at kitware.com Fri May 6 17:51:37 2016 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 6 May 2016 15:51:37 -0600 Subject: [vtkusers] Crash in vtkShaderProgram/vtkOpenGLPolyDataMapper In-Reply-To: <1462568580080-5738017.post@n5.nabble.com> References: <1461618738247-5737869.post@n5.nabble.com> <1461695330984-5737886.post@n5.nabble.com> <1461698736298-5737889.post@n5.nabble.com> <1461770129232-5737902.post@n5.nabble.com> <1462568580080-5738017.post@n5.nabble.com> Message-ID: 5. It tells you that change happened within the OpenGL2 work. Can you specify the exact spec of your graphic cards (ATI, Nvidia...) as well as the driver version? To track it down it would be nice if we could get a test that show that issue. On Fri, May 6, 2016 at 3:03 PM, dei wrote: > Just to reiterate, I want to use VTK-7.0.0 to display very large Wavefront > .OBJ meshes within a complex java CT medical application. My simple java > viewer test apps work fine (since I fixed a "mouse-move before > initialization complete" crash - see above). However, more often than not, > the CT app crashes during VTK initialization. When it initializes > successfully, it works flawlessly. > I have more info about the problem: > > 1. The problem occurs on different 3 PCs with 2 different graphics cards. > All support OpenGL 4.x > > 2. When the crash occurs, the vtkError.txt log shows: > ERROR: In ..\..\..\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx, > line 724 > vtkWin32OpenGLRenderWindow (0000000057C208F0): failed to get valid > pixel format. > > ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line > 533 > vtkWin32OpenGLRenderWindow (0000000057C208F0): GLEW could not be > initialized. > > ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLRenderer.cxx, line 441 > vtkOpenGLRenderer (0000000057C21150): failed after Clear 16 OpenGL > errors detected > 0 : (1282) Invalid operation > 1 : (1282) Invalid operation > 2 : (1282) Invalid operation > ... > ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLCamera.cxx, line 144 > vtkOpenGLCamera (0000000051E5DDD0): failed after Render 16 OpenGL > errors detected > 0 : (1282) Invalid operation > ... > ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLRenderer.cxx, line 116 > vtkOpenGLRenderer (0000000057C21150): failed after UpdateLights 16 > OpenGL errors detected > 0 : (1282) Invalid operation > ... > ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLProperty.cxx, line 91 > vtkOpenGLProperty (00000000004E2D70): failed after Render 16 OpenGL > errors detected > 0 : (1282) Invalid operation > ... > ERROR: In ..\..\..\Rendering\OpenGL2\vtkOpenGLPolyDataMapper.cxx, > line > 2918 > vtkOpenGLPolyDataMapper (0000000051E9C170): failed after > BuildBufferObjects 16 OpenGL errors detected > 0 : (1282) Invalid operation > ... > ERROR: In ..\..\..\Rendering\OpenGL2\vtkShaderProgram.cxx, line 399 > vtkShaderProgram (0000000057C22B60): Shader object was not > initialized, cannot attach it. > > 3. All accesses to the VTK occur on the AWT-EventQueue-1 thread. > > 4. Changing the order and timing of VTK initialization relative to the > display of the VTK JPanel does not appear to fix the problem. > > 5. VTK-6.3.0 does *not* exhibit the crash, but it is slow to render when > moving or zooming the mesh. My simple test apps *have no problem rendering > the same mesh* when using VTK-6.3.0. This should tell me something, but I'm > not sure what. > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Crash-in-vtkShaderProgram-vtkOpenGLPolyDataMapper-tp5737734p5738017.html > Sent from the VTK - Users mailing list archive at Nabble.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 info at import-ev.com Sat May 7 08:05:28 2016 From: info at import-ev.com (Import EV) Date: Sat, 7 May 2016 21:05:28 +0900 Subject: [vtkusers] DICOM files volume rendering Message-ID: <005e01d1a858$bee433f0$3cac9bd0$@import-ev.com> I could finally make vtk.framework for iOS. Now, I would like to implement volume rendering using 300 DICOM files. I use the sample Xcode project "VolumeRender" provided here (https://github.com/Kitware/VTK/tree/master/Examples/iOS). In "MyGLKViewController.mm" of this sample project, I changed the codes like below; "->" shows the codes I changed. === #else NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *basePath = paths.firstObject; std::string fname([basePath UTF8String]); -> //fname += "/CT-chest-quantized.nrrd"; -> //vtkNew mi; -> //mi->SetFileName(fname.c_str()); -> vtkNew mi; -> mi->SetDirectoryName(fname.c_str()); mi->Update(); double range[2]; mi->GetOutput()->GetPointData()->GetScalars()->GetRange(range); volumeMapper->SetInputConnection(mi->GetOutputPort()); #endif === Then I copied 300 DICOM files to "Documents" directory of the app via iTunes. The app runs without error but only black color cubic shown on the iPhone5S display and does not show correct volume rendering image. Do I need to do something else to show correct volume rendering image? Please advise me. ----- Import EV Corp. ----- From jialei.gary at gmail.com Sun May 8 09:47:24 2016 From: jialei.gary at gmail.com (gary_jia) Date: Sun, 8 May 2016 06:47:24 -0700 (MST) Subject: [vtkusers] how to simulate a vtkCamera's position&direction? Message-ID: <1462715244006-5738020.post@n5.nabble.com> Hi everyone, I have two renderers. One for an endoscopy view and the other shows an overall perspective which has an axesActor and a cone for demonstrating the camera. When synchronizing, what is the best way to get the matrix4x4 from vtkCamera and set it to the fake camera actor? thanks and regards, Gary -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-simulate-a-vtkCamera-s-position-direction-tp5738020.html Sent from the VTK - Users mailing list archive at Nabble.com. From wangq1979 at outlook.com Sun May 8 10:11:21 2016 From: wangq1979 at outlook.com (Wang Q) Date: Sun, 8 May 2016 14:11:21 +0000 Subject: [vtkusers] off screen rendering and screenshot Message-ID: Hi vtkusers, I want to offscreen render some objects and save them to images. The example on the wiki seems only support vtk 5.10 or earlier. It would be greatly appreciated if anyone could share an executable example on vtk 6.3. Cheers, Chiang -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangq1979 at outlook.com Sun May 8 12:03:34 2016 From: wangq1979 at outlook.com (Wang Q) Date: Sun, 8 May 2016 16:03:34 +0000 Subject: [vtkusers] save screenshot as png image In-Reply-To: References: Message-ID: Hi guys, I have found a simple yet executable example. In case anyone also wants it, here is the link: https://gist.github.com/certik/5687727 ________________________________ From: Wang Q Sent: 06 May 2016 21:15 To: VTK Users Subject: save screenshot as png image Hi guys, I want to save screenshot as png image following the example. Unfortunately, the code went into windowToImageFilter->Update() method and never came back. Below is the snippet: // Screenshot vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); windowToImageFilter->SetInput(renderWindow); //windowToImageFilter->SetMagnification(3); //set the resolution of the output image (3 times the current resolution of vtk render window) //windowToImageFilter->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel //windowToImageFilter->ReadFrontBufferOff(); // read from the back buffer windowToImageFilter->Update(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("e:/screenshot2.png"); writer->SetInputConnection(windowToImageFilter->GetOutputPort()); writer->Write(); renderWindow->Render(); timerLog->MarkEvent("finish rendering"); renderWindowInteractor->Start(); I am using win10, vtk6.3 on vc2013. Any tips would be appreciated. Cheers, Chiang -------------- next part -------------- An HTML attachment was scrubbed... URL: From hinesh_88 at hotmail.co.uk Mon May 9 04:11:46 2016 From: hinesh_88 at hotmail.co.uk (Hpatel) Date: Mon, 9 May 2016 01:11:46 -0700 (MST) Subject: [vtkusers] Help please! - ray casting Message-ID: <1462781506026-5738023.post@n5.nabble.com> Hi vtkUsers I previously posted the below message. Can anyone with any experience regarding this please comment and provide some feedback. I desperately need some help, even if the reply is that it cannot be done, anything to just help me progress. Thanks in advance. ####################################################################### Has anyone used raycasting to create 3d surfaces on dicom files? I am trying to do a direct render and display a 3D graphic using Raycasting -isosurfacefunction. What i'm after is to know if i can use DICOMImageReader to load a .dcm file and directly apply the raycast function to display a 3d Graphic? Many thanks, HP ######################################################################## -- View this message in context: http://vtk.1045678.n5.nabble.com/Help-please-ray-casting-tp5738023.html Sent from the VTK - Users mailing list archive at Nabble.com. From flaviu2 at yahoo.com Mon May 9 07:07:29 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Mon, 9 May 2016 11:07:29 +0000 (UTC) Subject: [vtkusers] Help please! - ray casting In-Reply-To: <1462781506026-5738023.post@n5.nabble.com> References: <1462781506026-5738023.post@n5.nabble.com> Message-ID: <265314625.974775.1462792049121.JavaMail.yahoo@mail.yahoo.com> Hi. Can you specify more what you want ? Perhaps I could help you ... Flaviu. On Monday, May 9, 2016 11:12 AM, Hpatel wrote: Hi vtkUsers I previously posted the below message. Can anyone with any experience regarding this please comment and provide some feedback. I desperately need some help, even if the reply is that it cannot be done, anything to just help me progress. Thanks in advance. ####################################################################### Has anyone used raycasting to create 3d surfaces on dicom files? I am trying to do a direct render and display a 3D graphic using Raycasting -isosurfacefunction. What i'm after is to know if i can use DICOMImageReader to load a .dcm file and directly apply the raycast function to display a 3d Graphic? Many thanks, HP ######################################################################## -- View this message in context: http://vtk.1045678.n5.nabble.com/Help-please-ray-casting-tp5738023.html Sent from the VTK - Users mailing list archive at Nabble.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 dan.lipsa at kitware.com Mon May 9 10:09:15 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 9 May 2016 10:09:15 -0400 Subject: [vtkusers] Changing vtkClipPolyData to ignore processing based on it's Bounding Box evaluation In-Reply-To: <042F0014-EE8F-4F96-B0A7-FECE4FA0819C@rogue-research.com> References: <042F0014-EE8F-4F96-B0A7-FECE4FA0819C@rogue-research.com> Message-ID: Does clipping without reconfiguring the pipeline work? There are cases when the clipping plane does not intersect the data to be clipped in which case you'll get an empty dataset. Dan On Fri, May 6, 2016 at 4:23 PM, Seun Odutola wrote: > Hi Everyone, > > I have a situation where I feed an input (which is an output result > of a vtkProbeFilter) to a vtkClipPolyData and subsequently pass it?s output > to a vtkPolyDataMapper. Basically my pipeline is as follows > > Mesh(polydata) (M) ?> A?> B ?> C > > A - vtkProbeFilter > B - vtkClipPolyData > C - vtkPolyDataMapper > > I gathered from previous responses to my last message (see topic: How to > bypass parts of vtk pipeline) that reconfiguring the pipeline as suggested > in that thread was most likely the way to go about achieving that. However, > I had an idea which I would like to propose. For instance in my situation > as described above my application typically will not be making use of the > vtkClipPolyData that often but it?s of utmost importance that I have it > configured ready to go whenever the user needs to Clip, so I decided to > peek at vtkClipPolyData?s RequestData function where I compare the input?s > bounding box (in my case the box to my polydata result from A), if the > clippolydata?s box contains M in it?s entirety then I would like the input > to be the output of the clippolydata (result going into ?> C) but if the > clip polydata?s bounding box doesn?t contain M?s bounding box but just > intersects it?s points then I would like to clip it and pass along the > result to C. > Basically > 1 - if B?s box contains M - skip > 2 - if B doesn?t contain M but just intersects some of it?s point - then > clip. > I managed to get do the bounds checking that certifies the first part of > my algorithm but the 2nd part is the tricky bit when I resize my clipper > (in it?s U.I) and then expect the vtkClipPolyData to Clip it empties the > entire polydata of M. I believe it has something to do setting the > clipScalars. I also noticed the line below in vtkClipPolyData.cxx > > for ( i=0; i < numPts; i++ ) > { > s = this->ClipFunction->FunctionValue(inPts->GetPoint(i)); > tmpScalars->SetComponent(i,0,s); > } > > tends to be the bottleneck in my case, which is why I?m trying to find a > way to just ignore the effect of B in the pipeline when I need not clip but > process it when I need to clip. I understand from the code that when I need > to clip the line above must be executed but when I don?t need to clip what > could be done to replace this line because ultimately down the line the > tmpScalars is set to the clipScalars which is needed for further > computation. Thanks everyone > > > Regards, > Seun > > > _______________________________________________ > 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 enzo.ferlin at micromar.com Mon May 9 11:11:26 2016 From: enzo.ferlin at micromar.com (Enzo Matsumiya) Date: Mon, 9 May 2016 12:11:26 -0300 Subject: [vtkusers] vtkResliceCursorWidget hidden at some point Message-ID: <50EDD043-D4DF-430E-981B-48D3C1F24AFC@micromar.com> Hello, Using the FourPaneViewer as a starting base, I implemented my own MPR viewer. When usgin the Reslice Cursor Widget, the Coronal plane doesn't update and the crosshair get hidden, unless I scroll through it. I found this old (2012) thread referencing exactly the same issue and without any solution: http://www.vtk.org/pipermail/vtkusers/2012-July/075433.html Screenshot of my application is attached. Can someone help please? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2016-05-09 at 12.10.22.png Type: image/png Size: 199201 bytes Desc: not available URL: From info at import-ev.com Mon May 9 11:12:35 2016 From: info at import-ev.com (Import EV) Date: Tue, 10 May 2016 00:12:35 +0900 Subject: [vtkusers] DICOM files volume rendering In-Reply-To: <005e01d1a858$bee433f0$3cac9bd0$@import-ev.com> References: <005e01d1a858$bee433f0$3cac9bd0$@import-ev.com> Message-ID: <000901d1aa05$37c634f0$a7529ed0$@import-ev.com> Can anyone advise me? No response so far. ----- Import EV Corp. ----- -----Original Message----- From: Import EV [mailto:info at import-ev.com] Sent: Saturday, May 07, 2016 9:05 PM To: vtkusers at vtk.org Cc: IMPORT EV Subject: DICOM files volume rendering I could finally make vtk.framework for iOS. Now, I would like to implement volume rendering using 300 DICOM files. I use the sample Xcode project "VolumeRender" provided here (https://github.com/Kitware/VTK/tree/master/Examples/iOS). In "MyGLKViewController.mm" of this sample project, I changed the codes like below; "->" shows the codes I changed. === #else NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *basePath = paths.firstObject; std::string fname([basePath UTF8String]); -> //fname += "/CT-chest-quantized.nrrd"; -> //vtkNew mi; -> //mi->SetFileName(fname.c_str()); -> vtkNew mi; -> mi->SetDirectoryName(fname.c_str()); mi->Update(); double range[2]; mi->GetOutput()->GetPointData()->GetScalars()->GetRange(range); volumeMapper->SetInputConnection(mi->GetOutputPort()); #endif === Then I copied 300 DICOM files to "Documents" directory of the app via iTunes. The app runs without error but only black color cubic shown on the iPhone5S display and does not show correct volume rendering image. Do I need to do something else to show correct volume rendering image? Please advise me. ----- Import EV Corp. ----- From matimontg at gmail.com Mon May 9 13:10:26 2016 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 09 May 2016 17:10:26 +0000 Subject: [vtkusers] Export 3D to use with SolidWorks or any other 3d Soft Message-ID: Hi, I'm currently using VTK to display a 3D image in a RenderWindow. I also save in memory the 3D Image as Is there an easy way to export the image to a format that SolidWorks can read? (or any other format for other tools that can then export into SolidWorks). I currently have a vtkPolyDataMapper that hold the image and I use an actor to display. Thanks, Matias. -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon May 9 13:16:48 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 9 May 2016 19:16:48 +0200 Subject: [vtkusers] DICOM files volume rendering In-Reply-To: <005e01d1a858$bee433f0$3cac9bd0$@import-ev.com> References: <005e01d1a858$bee433f0$3cac9bd0$@import-ev.com> Message-ID: I haven't looked at the example since I'm on my phone, but I would assume that you need a color/opacity transfer function that fits your data. Elvis Den 7 maj 2016 2:05 em skrev "Import EV" : > I could finally make vtk.framework for iOS. > > Now, I would like to implement volume rendering using 300 DICOM files. > I use the sample Xcode project "VolumeRender" provided here > (https://github.com/Kitware/VTK/tree/master/Examples/iOS). > > In "MyGLKViewController.mm" of this sample project, I changed the codes > like > below; > "->" shows the codes I changed. > > === > #else > NSArray *paths = > NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, > YES); > NSString *basePath = paths.firstObject; > std::string fname([basePath UTF8String]); > -> //fname += "/CT-chest-quantized.nrrd"; > -> //vtkNew mi; > -> //mi->SetFileName(fname.c_str()); > -> vtkNew mi; > -> mi->SetDirectoryName(fname.c_str()); > mi->Update(); > > double range[2]; > mi->GetOutput()->GetPointData()->GetScalars()->GetRange(range); > > volumeMapper->SetInputConnection(mi->GetOutputPort()); > #endif > === > > Then I copied 300 DICOM files to "Documents" directory of the app via > iTunes. > The app runs without error but only black color cubic shown on the iPhone5S > display and does not show correct volume rendering image. > > Do I need to do something else to show correct volume rendering image? > Please advise me. > > ----- > Import EV Corp. > ----- > > _______________________________________________ > 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.ei at novodynamics.com Mon May 9 13:37:01 2016 From: david.ei at novodynamics.com (dei) Date: Mon, 9 May 2016 10:37:01 -0700 (MST) Subject: [vtkusers] Crash in vtkShaderProgram/vtkOpenGLPolyDataMapper In-Reply-To: References: <1461695330984-5737886.post@n5.nabble.com> <1461698736298-5737889.post@n5.nabble.com> <1461770129232-5737902.post@n5.nabble.com> <1462568580080-5738017.post@n5.nabble.com> Message-ID: <1462815421253-5738030.post@n5.nabble.com> I attempted to debug the unmanaged VTI C++ code. The failure occurs at Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx line 659: 659 if (!SetPixelFormat(hDC, pixelFormat, &pfd)) 660 { 661 pixelFormat = 0; 662 } SetPixelFormat() is always called with pixelFormat == 44. When initialization succeeds, it is 44 on return. When it fails, it returns with pixelFormat == 0. I cannot step into SetPixelFormat() to get more details on the problem. In either case, the C++ call stack looks like this: > vtkRenderingOpenGL2-7.0.dll!vtkWin32OpenGLRenderWindow::SetupPixelFormatPaletteAndContext(HDC__ * hDC=0x000000007201311e, unsigned long dwFlags=37, int debug=0, int bpp=32, int zbpp=32) Line 661 C++ vtkRenderingOpenGL2-7.0.dll!vtkWin32OpenGLRenderWindow::CreateAWindow() Line 989 C++ vtkRenderingOpenGL2-7.0.dll!vtkWin32OpenGLRenderWindow::WindowInitialize() Line 1013 C++ vtkRenderingOpenGL2-7.0.dll!vtkWin32OpenGLRenderWindow::Initialize() Line 1028 C++ vtkRenderingOpenGL2-7.0.dll!vtkWin32OpenGLRenderWindow::Start() Line 1356 C++ vtkRenderingCore-7.0.dll!vtkRenderWindow::DoStereoRender() Line 753 C++ vtkRenderingCore-7.0.dll!vtkRenderWindow::DoFDRender() Line 743 C++ vtkRenderingCore-7.0.dll!vtkRenderWindow::DoAARender() Line 622 C++ vtkRenderingCore-7.0.dll!vtkRenderWindow::Render() Line 438 C++ vtkRenderingOpenGL2-7.0.dll!vtkOpenGLRenderWindow::Render() Line 600 C++ vtkRenderingCoreJava.dll!Java_vtk_vtkRenderWindow_Render_19(JNIEnv_ * env=0x000000004df639f8, _jobject * obj=0x00000001fb71d2b0) Line 123 C++ The video cards we've tested and which exhibit the problem are Both video cards which we've tested and which exhibit the problem are dual DVI and drive 2 monitors. They are: EVGA GeForce GT 610 DirectX 12 (feature level 11_0) 01G-P3-2616-KR 1GB 64-Bit DDR3 PCI Express 2.0 x16 HDCP Ready Video Card NVidea GeForce GT 610 OpenGL 4.2, DirectX 12 (feature level 11_0) Driver version: 10.18.13.6510 Driver date: 4/27/2016 http://www.newegg.com/Product/Product.aspx?Item=N82E16814130788 EVGA GeForce GT730 2 GB DDR3 Driver version: 10.18.13.5582 Driver date: 8/26/2015 RE: 5. Why should the 6.3.0 test app be performant, but the CT app not be? The CT app is not doing any CPU-intensive operations when I display the mesh. -- View this message in context: http://vtk.1045678.n5.nabble.com/Crash-in-vtkShaderProgram-vtkOpenGLPolyDataMapper-tp5737734p5738030.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon May 9 13:50:54 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 9 May 2016 11:50:54 -0600 Subject: [vtkusers] Export 3D to use with SolidWorks or any other 3d Soft In-Reply-To: References: Message-ID: Hi Matias, You can find a summary of VTK scene exporters here: http://www.vtk.org/doc/nightly/html/classvtkExporter.html That said, I don't quite understand your post. You say "3D image", but generally, a 3D image is not something that would be held by a vtkPolyDataMapper, nor is it something that SolidWorks could use. What, exactly, is the data that you want to export? - David On Mon, May 9, 2016 at 11:10 AM, Matias Montroull wrote: > Hi, > > I'm currently using VTK to display a 3D image in a RenderWindow. > > I also save in memory the 3D Image as Is there an easy way to export the > image to a format that SolidWorks can read? (or any other format for other > tools that can then export into SolidWorks). > I currently have a vtkPolyDataMapper that hold the image and I use an > actor to display. > > Thanks, > > Matias. > -- > Matias > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon May 9 14:37:21 2016 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 9 May 2016 14:37:21 -0400 Subject: [vtkusers] Crash in vtkShaderProgram/vtkOpenGLPolyDataMapper In-Reply-To: <1462815421253-5738030.post@n5.nabble.com> References: <1461695330984-5737886.post@n5.nabble.com> <1461698736298-5737889.post@n5.nabble.com> <1461770129232-5737902.post@n5.nabble.com> <1462568580080-5738017.post@n5.nabble.com> <1462815421253-5738030.post@n5.nabble.com> Message-ID: That call stack looks fine to me. As long as it is happening in whatever Java thread you have setup for Rendering it should be fine. Specifically that call to CreateAWindow looks like the standard call stack for creating a window in VTK on Windows. When that call fails to get a pixelformat it is typically because it is called twice with the same HDC/Window. That will return zero on windows. Maybe somehow the same canvas (or whatever the java thing is called) is being used when creating two RenderWindows, or creating one, destroying and creating again. Somehow I would bet the same windows window/HDC is being used twice for two different RenderWindows. Ken On Mon, May 9, 2016 at 1:37 PM, dei wrote: > I attempted to debug the unmanaged VTI C++ code. The failure occurs at > Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.cxx line 659: > 659 if (!SetPixelFormat(hDC, pixelFormat, &pfd)) > 660 { > 661 pixelFormat = 0; > 662 } > SetPixelFormat() is always called with pixelFormat == 44. When > initialization succeeds, it is 44 on return. When it fails, it returns with > pixelFormat == 0. I cannot step into SetPixelFormat() to get more details > on > the problem. In either case, the C++ call stack looks like this: > > > > vtkRenderingOpenGL2-7.0.dll!vtkWin32OpenGLRenderWindow::SetupPixelFormatPaletteAndContext(HDC__ > * hDC=0x000000007201311e, unsigned long dwFlags=37, int debug=0, int > bpp=32, > int zbpp=32) Line 661 C++ > > vtkRenderingOpenGL2-7.0.dll!vtkWin32OpenGLRenderWindow::CreateAWindow() > Line 989 C++ > > vtkRenderingOpenGL2-7.0.dll!vtkWin32OpenGLRenderWindow::WindowInitialize() > Line 1013 C++ > > vtkRenderingOpenGL2-7.0.dll!vtkWin32OpenGLRenderWindow::Initialize() Line > 1028 C++ > vtkRenderingOpenGL2-7.0.dll!vtkWin32OpenGLRenderWindow::Start() > Line 1356 > C++ > vtkRenderingCore-7.0.dll!vtkRenderWindow::DoStereoRender() Line > 753 C++ > vtkRenderingCore-7.0.dll!vtkRenderWindow::DoFDRender() Line 743 C++ > vtkRenderingCore-7.0.dll!vtkRenderWindow::DoAARender() Line 622 C++ > vtkRenderingCore-7.0.dll!vtkRenderWindow::Render() Line 438 C++ > vtkRenderingOpenGL2-7.0.dll!vtkOpenGLRenderWindow::Render() Line > 600 C++ > > vtkRenderingCoreJava.dll!Java_vtk_vtkRenderWindow_Render_19(JNIEnv_ * > env=0x000000004df639f8, _jobject * obj=0x00000001fb71d2b0) Line 123 C++ > > The video cards we've tested and which exhibit the problem are > Both video cards which we've tested and which exhibit the problem are dual > DVI and drive 2 monitors. They are: > > EVGA GeForce GT 610 DirectX 12 (feature level 11_0) 01G-P3-2616-KR 1GB > 64-Bit DDR3 PCI Express 2.0 x16 HDCP Ready Video Card > NVidea GeForce GT 610 OpenGL 4.2, DirectX 12 (feature level 11_0) > Driver version: 10.18.13.6510 > Driver date: 4/27/2016 > http://www.newegg.com/Product/Product.aspx?Item=N82E16814130788 > > > EVGA GeForce GT730 2 GB DDR3 > Driver version: 10.18.13.5582 > Driver date: 8/26/2015 > > RE: 5. Why should the 6.3.0 test app be performant, but the CT app not be? > The CT app is not doing any CPU-intensive operations when I display the > mesh. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Crash-in-vtkShaderProgram-vtkOpenGLPolyDataMapper-tp5737734p5738030.html > Sent from the VTK - Users mailing list archive at Nabble.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 > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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 david.gobbi at gmail.com Mon May 9 14:50:11 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 9 May 2016 12:50:11 -0600 Subject: [vtkusers] vtkImageStack with blending options In-Reply-To: References: Message-ID: Hi Simon, Yes, vtkImageStack pastes the images one-by-one into the frame buffer, and the reasoning behind this is that the images might have different geometries. In this case, combining them into a single texture is difficult. My main reason for creating vtkImageStack was, in fact, to cure the problem of z-buffer fighting when layering images that had different geometries. I'm looking again at the VTKTextureBlendingMode, and you are correct, it cannot be used here (and it isn't even implemented in the OpenGL2 backend!). But adding methods to vtkTexture and vtkImageSliceMapper so that glBlendFunc can be tweaked should be relatively straightforward. I could definitely help with that. Cheers, - David On Thu, May 5, 2016 at 10:29 PM, Simon Drouin wrote: > Hi David, > > Didn't realize OpenGL2 backend was using vtkTexture. We are still on the > old OpenGL backend (hopefully we will switch soon). > > We have had our own (very simple) version of vtkImageStack based on > vtkTexture for a while. Ours uses multi texturing to combine images, which > is limited by the number of textures the OpenGL driver allows. I've been > wanting to replace it with vtkImageStack for that reason but was always > stopped by the lack of control of blending with vtkImageStack. > > I think modifying vtkImageStack is a little more work than you suggest > though. vtkTexture has control for blending (I guess you are referring to > VTKTextureBlendingMode), but nothing that would be compatible with > vtkImageStack. VTKTextureBlendingMode controls how multiple textures are > combined together and with incoming fragment color rather than how the > fragment is blended into the frame buffer. My understanding is that > vtkImageStack combines images in the framebuffer, so to control blending > you have to be able to set glBlendFunc and glBlendEquation for each > vtkImageSlice. > > I think one extra option that would be interesting for vtkImageStack is to > allow rendering of all images in a texture rather than directly in the > frame buffer. It would allow to combine all images in the stack in a very > flexible way before rendering to the screen. > > What do you think? > > I'll try to find a time slot to work on those ideas. If I find the time > I'll contact you to help me push the code to VTK. > > Cheers. > > s. > > On Tue, May 3, 2016 at 1:59 PM, David Gobbi wrote: > >> Hi Simon, >> >> The vtkTexture class provides some control over blending modes, and this >> feature could also be added to vtkOpenGLImageSliceMapper (which uses >> vtkTexture internally, for the OpenGL2 backend). If it was added there, >> then it could be used with vtkImageStack or anywhere else that the >> vtkImageSlice/vtkImageActor classes are used. >> >> I've had this feature on my mind for a long while, but I haven't had any >> work projects that need it yet. If you want to tinker around with >> vtkOpenGLImageSliceMapper and get things working to your satisfaction, I'd >> gladly help to get your changes into VTK. >> >> - David >> >> >> On Tue, May 3, 2016 at 11:41 AM, Simon Drouin >> wrote: >> >>> Hi All, >>> >>> Looking for a class that behaves similarly to vtkImageStack but that >>> allows for different types of blending between the slices ( basically, >>> expose OpenGL controls for blending, i.e. glBlendFunc, and >>> glBlendEquation). Is there a class that does that in VTK without relying on >>> CPU-based image processing? >>> >>> Thanks in advance. >>> >>> Simon Drouin >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.ei at novodynamics.com Mon May 9 17:45:31 2016 From: david.ei at novodynamics.com (dei) Date: Mon, 9 May 2016 14:45:31 -0700 (MST) Subject: [vtkusers] Crash in vtkShaderProgram/vtkOpenGLPolyDataMapper In-Reply-To: References: <1461698736298-5737889.post@n5.nabble.com> <1461770129232-5737902.post@n5.nabble.com> <1462568580080-5738017.post@n5.nabble.com> <1462815421253-5738030.post@n5.nabble.com> Message-ID: <1462830331451-5738038.post@n5.nabble.com> By using both a managed and unmanaged debugger, breaking at the first line of java main() and attaching the unmanaged C++ debugger with appropriate breakpoints, I verified that CreateAWindow() and SetupPixelFormatPaletteAndContext() are only being called once. However, SetPixelFormat() is being called twice, both times from within SetupPixelFormatPaletteAndContext() at lines 580 and 659. The hDC is different for the 2 calls, both when it succeeds and when it fails. -- View this message in context: http://vtk.1045678.n5.nabble.com/Crash-in-vtkShaderProgram-vtkOpenGLPolyDataMapper-tp5737734p5738038.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Mon May 9 18:04:37 2016 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 9 May 2016 18:04:37 -0400 Subject: [vtkusers] Crash in vtkShaderProgram/vtkOpenGLPolyDataMapper In-Reply-To: <1462830331451-5738038.post@n5.nabble.com> References: <1461698736298-5737889.post@n5.nabble.com> <1461770129232-5737902.post@n5.nabble.com> <1462568580080-5738017.post@n5.nabble.com> <1462815421253-5738030.post@n5.nabble.com> <1462830331451-5738038.post@n5.nabble.com> Message-ID: Could you add a call to GetLastError() if the SetPixelFormat fails and see what the error code is? On Mon, May 9, 2016 at 5:45 PM, dei wrote: > By using both a managed and unmanaged debugger, breaking at the first line > of > java main() and attaching the unmanaged C++ debugger with appropriate > breakpoints, I verified that CreateAWindow() and > SetupPixelFormatPaletteAndContext() are only being called once. However, > SetPixelFormat() is being called twice, both times from within > SetupPixelFormatPaletteAndContext() at lines 580 and 659. The hDC is > different for the 2 calls, both when it succeeds and when it fails. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Crash-in-vtkShaderProgram-vtkOpenGLPolyDataMapper-tp5737734p5738038.html > Sent from the VTK - Users mailing list archive at Nabble.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 > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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 matimontg at gmail.com Mon May 9 19:04:08 2016 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 09 May 2016 23:04:08 +0000 Subject: [vtkusers] Export 3D to use with SolidWorks or any other 3d Soft In-Reply-To: References: Message-ID: Hi Gobbi, I finally got it working: vtkSTLWriter exportador = vtkSTLWriter.New(); exportador.SetFileName("test.stl"); exportador.SetInputConnection(skinnormals.GetOutputPort()); exportador.Update(); exportador.Write(); skinnormals is a vtkPolyDataNormals object that holds the data I wanted to export. Thanks! El lun., 9 de may. de 2016 a la(s) 14:51, David Gobbi escribi?: > Hi Matias, > > You can find a summary of VTK scene exporters here: > http://www.vtk.org/doc/nightly/html/classvtkExporter.html > > That said, I don't quite understand your post. You say "3D image", > but generally, a 3D image is not something that would be held by a > vtkPolyDataMapper, nor is it something that SolidWorks could use. > What, exactly, is the data that you want to export? > > - David > > > > On Mon, May 9, 2016 at 11:10 AM, Matias Montroull > wrote: > >> Hi, >> >> I'm currently using VTK to display a 3D image in a RenderWindow. >> >> I also save in memory the 3D Image as Is there an easy way to export the >> image to a format that SolidWorks can read? (or any other format for other >> tools that can then export into SolidWorks). >> I currently have a vtkPolyDataMapper that hold the image and I use an >> actor to display. >> >> Thanks, >> >> Matias. >> -- >> Matias >> > > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon May 9 19:06:18 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 9 May 2016 17:06:18 -0600 Subject: [vtkusers] Export 3D to use with SolidWorks or any other 3d Soft In-Reply-To: References: Message-ID: Why thanks? I never even understood your question! On Mon, May 9, 2016 at 5:04 PM, Matias Montroull wrote: > Hi Gobbi, I finally got it working: > > vtkSTLWriter exportador = vtkSTLWriter.New(); > exportador.SetFileName("test.stl"); > exportador.SetInputConnection(skinnormals.GetOutputPort()); > exportador.Update(); > exportador.Write(); > > skinnormals is a vtkPolyDataNormals object that holds the data I wanted to > export. > > Thanks! > > > El lun., 9 de may. de 2016 a la(s) 14:51, David Gobbi < > david.gobbi at gmail.com> escribi?: > >> Hi Matias, >> >> You can find a summary of VTK scene exporters here: >> http://www.vtk.org/doc/nightly/html/classvtkExporter.html >> >> That said, I don't quite understand your post. You say "3D image", >> but generally, a 3D image is not something that would be held by a >> vtkPolyDataMapper, nor is it something that SolidWorks could use. >> What, exactly, is the data that you want to export? >> >> - David >> >> >> >> On Mon, May 9, 2016 at 11:10 AM, Matias Montroull >> wrote: >> >>> Hi, >>> >>> I'm currently using VTK to display a 3D image in a RenderWindow. >>> >>> I also save in memory the 3D Image as Is there an easy way to export the >>> image to a format that SolidWorks can read? (or any other format for other >>> tools that can then export into SolidWorks). >>> I currently have a vtkPolyDataMapper that hold the image and I use an >>> actor to display. >>> >>> Thanks, >>> >>> Matias. >>> -- >>> Matias >>> >> >> -- > Matias > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Mon May 9 19:08:42 2016 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 09 May 2016 23:08:42 +0000 Subject: [vtkusers] Export 3D to use with SolidWorks or any other 3d Soft In-Reply-To: References: Message-ID: Well, you lead me in some way to the answer so thanks! El lun., 9 de may. de 2016 a la(s) 20:06, David Gobbi escribi?: > Why thanks? I never even understood your question! > > On Mon, May 9, 2016 at 5:04 PM, Matias Montroull > wrote: > >> Hi Gobbi, I finally got it working: >> >> vtkSTLWriter exportador = vtkSTLWriter.New(); >> exportador.SetFileName("test.stl"); >> exportador.SetInputConnection(skinnormals.GetOutputPort()); >> exportador.Update(); >> exportador.Write(); >> >> skinnormals is a vtkPolyDataNormals object that holds the data I wanted >> to export. >> >> Thanks! >> >> >> El lun., 9 de may. de 2016 a la(s) 14:51, David Gobbi < >> david.gobbi at gmail.com> escribi?: >> >>> Hi Matias, >>> >>> You can find a summary of VTK scene exporters here: >>> http://www.vtk.org/doc/nightly/html/classvtkExporter.html >>> >>> That said, I don't quite understand your post. You say "3D image", >>> but generally, a 3D image is not something that would be held by a >>> vtkPolyDataMapper, nor is it something that SolidWorks could use. >>> What, exactly, is the data that you want to export? >>> >>> - David >>> >>> >>> >>> On Mon, May 9, 2016 at 11:10 AM, Matias Montroull >>> wrote: >>> >>>> Hi, >>>> >>>> I'm currently using VTK to display a 3D image in a RenderWindow. >>>> >>>> I also save in memory the 3D Image as Is there an easy way to export >>>> the image to a format that SolidWorks can read? (or any other format for >>>> other tools that can then export into SolidWorks). >>>> I currently have a vtkPolyDataMapper that hold the image and I use an >>>> actor to display. >>>> >>>> Thanks, >>>> >>>> Matias. >>>> -- >>>> Matias >>>> >>> >>> -- >> Matias >> > > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at import-ev.com Mon May 9 20:52:09 2016 From: info at import-ev.com (Import EV) Date: Tue, 10 May 2016 09:52:09 +0900 Subject: [vtkusers] DICOM files volume rendering In-Reply-To: References: <005e01d1a858$bee433f0$3cac9bd0$@import-ev.com> Message-ID: <9080F281-0AB2-44A0-8DD8-77CC138C131D@import-ev.com> Hello Elvis, Thank you for your response. You may be right. I will check color/opacity transfer function. Thanks! ? Ted Shigetomi Import EV Corp. info at import-ev.com --- 2016/05/10 2:16?Elvis Stansvik I haven't looked at the example since I'm on my phone, but I would assume that you need a color/opacity transfer function that fits your data. Elvis Den 7 maj 2016 2:05 em skrev "Import EV" >: I could finally make vtk.framework for iOS. Now, I would like to implement volume rendering using 300 DICOM files. I use the sample Xcode project "VolumeRender" provided here (https://github.com/Kitware/VTK/tree/master/Examples/iOS ). In "MyGLKViewController.mm" of this sample project, I changed the codes like below; "->" shows the codes I changed. === #else NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *basePath = paths.firstObject; std::string fname([basePath UTF8String]); -> //fname += "/CT-chest-quantized.nrrd"; -> //vtkNew mi; -> //mi->SetFileName(fname.c_str()); -> vtkNew mi; -> mi->SetDirectoryName(fname.c_str()); mi->Update(); double range[2]; mi->GetOutput()->GetPointData()->GetScalars()->GetRange(range); volumeMapper->SetInputConnection(mi->GetOutputPort()); #endif === Then I copied 300 DICOM files to "Documents" directory of the app via iTunes. The app runs without error but only black color cubic shown on the iPhone5S display and does not show correct volume rendering image. Do I need to do something else to show correct volume rendering image? Please advise me. ----- Import EV Corp. ----- _______________________________________________ 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 mallikarjun49 at gmail.com Tue May 10 01:18:31 2016 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Tue, 10 May 2016 10:48:31 +0530 Subject: [vtkusers] Estimate(Measure) volume of volume rendered data Message-ID: Hello All, Is there any class in vtk to measure the volume of what is been volume rendered? I have seen vtkMassProperties class which estimates the volume of triangle mesh, but don't know how to make use of this class to volume rendered data. Any pointers or examples would be greatly appreciated. Thanks in advancev -- *With Kind Regards:* Mallikarjun -------------- next part -------------- An HTML attachment was scrubbed... URL: From rickfrank at me.com Tue May 10 07:07:17 2016 From: rickfrank at me.com (Richard Frank) Date: Tue, 10 May 2016 07:07:17 -0400 Subject: [vtkusers] CT slice numbering Message-ID: Here's a set of test images scanned in all six directions http://www.insight-journal.org/midas/item/view/2466# Sent from my iPad From flaviu2 at yahoo.com Tue May 10 07:53:57 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Tue, 10 May 2016 11:53:57 +0000 (UTC) Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR References: <1640119927.1788308.1462881237494.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1640119927.1788308.1462881237494.JavaMail.yahoo@mail.yahoo.com> Hi vtk users.I have made a DICOM viewer, using vtkDICOMReader, and vtkImageReslice, and vtkImageMapToColors to add as vtkImageActor. In order to have the original window/level, I didn't setup any vtkLookupTable on vtkImageMapToColors ... and seem to go well, but on runtime, I get a ugly warning: No LookupTable was set but input data is not VTK_UNSIGNED_CHAR, therefore input can't be passed through! My question is, it is OK to give up of lookup table ? And how to setup VTK_UNSIGNED_CHAR at my input image data ? I have tried this: m_pDICOMReader->GetOutput()->AllocateScalars(VTK_UNSIGNED_CHAR, 3); Not working .... can you help me, please ? Flaviu. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue May 10 08:19:55 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 10 May 2016 06:19:55 -0600 Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: <1640119927.1788308.1462881237494.JavaMail.yahoo@mail.yahoo.com> References: <1640119927.1788308.1462881237494.JavaMail.yahoo.ref@mail.yahoo.com> <1640119927.1788308.1462881237494.JavaMail.yahoo@mail.yahoo.com> Message-ID: On Tue, May 10, 2016 at 5:53 AM, Flaviu2 via vtkusers wrote: > My question is, it is OK to give up of lookup table ? If the input is 16-bit data (like most DICOM) then it needs a lookup table. > And how to setup VTK_UNSIGNED_CHAR at my input image data ? Don't! If the DICOM file is 16-bit data, then use 16-bit data in VTK. > I have tried this: > > m_pDICOMReader->GetOutput()->AllocateScalars(VTK_UNSIGNED_CHAR, 3); This will not work. The reader cannot read a 16-bit file into an 8-bit output. > Not working .... can you help me, please ? Create a vtkLookupTable for vtkImageMapToColors. table->SetValueRange(0.0, 1.0); table->SetSaturationRange(0.0, 0.0); table->SetRampToLinear(); table->Build(); Also, use table->SetRange(min, max) to tell the lookup table the min and max values in the image, e.g. something like table->SetRange(0, 2047). Cheers, - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue May 10 09:26:38 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 10 May 2016 09:26:38 -0400 Subject: [vtkusers] Estimate(Measure) volume of volume rendered data In-Reply-To: References: Message-ID: Mallikarjun, Essentially, no. Volume rendering is a display technique - maybe one could theoretically formulate an equation to try to calculate the volume during ray casting, and it's an interesting academic exercise to imagine, but there are certainly better ways to do volume estimation. How do you account for fuzzy regions of the volume where the opacity is not 100%, for example? My suggestion would be to figure out what a good isocontour value is for your data set, extract a contour and use vtkMassProperties on the resulting triangle mesh. Cory On Tue, May 10, 2016 at 1:18 AM, Mallikarjun K wrote: > Hello All, > Is there any class in vtk to measure the volume of what is been volume > rendered? > I have seen vtkMassProperties class which estimates the volume of triangle > mesh, but don't know how to make use of this class to volume rendered data. > > Any pointers or examples would be greatly appreciated. > > Thanks in advancev > -- > With Kind Regards: > Mallikarjun > > > _______________________________________________ > 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 R&D Engineer Kitware, Inc. From flaviu2 at yahoo.com Tue May 10 09:37:06 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Tue, 10 May 2016 13:37:06 +0000 (UTC) Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: References: Message-ID: <79683469.1965424.1462887426392.JavaMail.yahoo@mail.yahoo.com> Very useful your comments ! I have learned something here. The line > table->SetRange(0, 2047) is whole thing: I have removed lookup table from vtkMapImageToColors because I didn't found the proper value to setup lookup range, for CT images?... Without lookup table I have the original window/level on my renderer, but, I get those warnings?... with lookup table, and with [0, 2047] range, I have whiter images (and believe me, I had tried a lot of values). How can I get out of this trouble ? Flaviu. On Tuesday, May 10, 2016 3:20 PM, David Gobbi wrote: On Tue, May 10, 2016 at 5:53 AM, Flaviu2 via vtkusers wrote: > My question is, it is OK to give up of lookup table ? If the input is 16-bit data (like most DICOM) then it needs a lookup table. > And how to setup VTK_UNSIGNED_CHAR at my input image data ? Don't!? If the DICOM file is 16-bit data, then use 16-bit data in VTK. > I have tried this: > > m_pDICOMReader->GetOutput()->AllocateScalars(VTK_UNSIGNED_CHAR, 3); This will not work.? The reader cannot read a 16-bit file into an 8-bit output. > Not working .... can you help me, please ? Create a vtkLookupTable for vtkImageMapToColors. table->SetValueRange(0.0, 1.0);table->SetSaturationRange(0.0, 0.0);table->SetRampToLinear();table->Build(); Also, use table->SetRange(min, max) to tell the lookup table the min and maxvalues in the image, e.g. something like table->SetRange(0, 2047). Cheers,?- David -------------- next part -------------- An HTML attachment was scrubbed... URL: From mallikarjun49 at gmail.com Tue May 10 10:07:11 2016 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Tue, 10 May 2016 19:37:11 +0530 Subject: [vtkusers] Estimate(Measure) volume of volume rendered data In-Reply-To: References: Message-ID: Yeah.Thank you Cory.I will try it. With Kind Regards, Mallikarjun On May 10, 2016 6:56 PM, "Cory Quammen" wrote: > Mallikarjun, > > Essentially, no. Volume rendering is a display technique - maybe one > could theoretically formulate an equation to try to calculate the > volume during ray casting, and it's an interesting academic exercise > to imagine, but there are certainly better ways to do volume > estimation. How do you account for fuzzy regions of the volume where > the opacity is not 100%, for example? > > My suggestion would be to figure out what a good isocontour value is > for your data set, extract a contour and use vtkMassProperties on the > resulting triangle mesh. > > Cory > > On Tue, May 10, 2016 at 1:18 AM, Mallikarjun K > wrote: > > Hello All, > > Is there any class in vtk to measure the volume of what is been volume > > rendered? > > I have seen vtkMassProperties class which estimates the volume of > triangle > > mesh, but don't know how to make use of this class to volume rendered > data. > > > > Any pointers or examples would be greatly appreciated. > > > > Thanks in advancev > > -- > > With Kind Regards: > > Mallikarjun > > > > > > _______________________________________________ > > 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 > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue May 10 10:15:13 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 10 May 2016 08:15:13 -0600 Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: <79683469.1965424.1462887426392.JavaMail.yahoo@mail.yahoo.com> References: <79683469.1965424.1462887426392.JavaMail.yahoo@mail.yahoo.com> Message-ID: On Tue, May 10, 2016 at 7:37 AM, Flaviu2 wrote: > > Very useful your comments ! I have learned something here. > > The line > > > table->SetRange(0, 2047) Try something like the code below, it is simple but it often works fine. If it doesn't work for your image, there are more sophisticated methods that can be used, but they involve computing some statistics on the image and using the metadata to convert pixels to Hounsfield units. m_pDICOMReader->Update(); double range[2]; m_pDICOMReader->GetOutput()->GetScalarRange(range); table->SetRange(range); - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Tue May 10 12:09:05 2016 From: tjlp at netease.com (Liu_tj) Date: Wed, 11 May 2016 00:09:05 +0800 (CST) Subject: [vtkusers] Why I can't move the BorderWidget Message-ID: <3d1c4424.18.1549b6dcecd.Coremail.tjlp@netease.com> Hi, I use BorderWidget on the vtkImageViewer2 to select area. After I set the initial left bottom and right top corner and enable it, I can't move the borderWidget. Why? And when I drag the left bottom corner, the right top corner will change automatically. Can any guy tell me what happens? Below is the C# code for BorderWidget: vtkBorderWidget m_areaSegment = vtkBorderWidget.New(); m_areaSegment.SetInteractor( m_renderWindow.GetInteractor() ); vtkBorderRepresentation rep = vtkBorderRepresentation.New(); rep.SetShowBorderToOn(); m_areaSegment.SetRepresentation( rep ); m_areaSegment.InteractionEvt += newvtkObject.vtkObjectEventHandler( area_segment_InteractionEvt ); m_areaSegment.SelectableOn(); vtkBorderRepresentation borderrep = vtkBorderRepresentation.SafeDownCast( m_areaSegment.GetRepresentation() ); m_renderer.WorldToView(); double[] viewpint1 = m_renderer.GetViewPoint(); m_renderer.SetWorldPoint(displaybounds[0], displaybounds[2], displaybounds[4], 1); m_renderer.WorldToView(); double[] viewpint = m_renderer.GetViewPoint(); borderrep.GetPositionCoordinate().SetCoordinateSystemToView(); borderrep.GetPosition2Coordinate().SetCoordinateSystemToView(); borderrep.SetPosition(viewpint[0], viewpint[1]); borderrep.SetPosition2(viewpint1[0], viewpint1[1]); borderrep.GetBorderProperty().SetColor(0.0, 1.0, 0.0); borderrep.SetShowBorderToOn(); borderrep.MovingOn(); m_renderWindow.Render(); m_areaSegment.On(); Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at import-ev.com Wed May 11 04:23:06 2016 From: info at import-ev.com (Import EV) Date: Wed, 11 May 2016 17:23:06 +0900 Subject: [vtkusers] Volume rendering memory warning Message-ID: <007a01d1ab5e$58782780$09687680$@import-ev.com> I modified codes in "MyGLKViewController.mm" file in the sample Xcode project "VolumeRender" for iOS provided here (https://github.com/Kitware/VTK/tree/master/Examples/iOS) and am having memory warning problem. In my app I made 2 ViewControllers, one is a normal ViewController(TOP) and the other is a GLKViewController(GLK) where I use the above modified codes. In TOP, I made a UIButton. To click the button, view moves to GLK and display volume rendering image. To click close button then back to TOP. When repeat go back and forth between these 2 views, memory warning occurs. I checked memory consumption and found the memory is not released when closed GLK view. I guess I need to release all the memory in the following method in "MyGLKViewController.mm", - (void)tearDownGL { [EAGLContext setCurrentContext:self.context]; // free GL resources // ... } When close GLK this method is called. I have no idea, however, what codes I should use here. It is appreciated if anyone gives me appropriate codes to avoid memory warning? Thanks. ----- Import EV Corp. ----- From flaviu2 at yahoo.com Wed May 11 08:19:34 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Wed, 11 May 2016 12:19:34 +0000 (UTC) Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: References: Message-ID: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> I have tried this: // Create a greyscale lookup m_pLUTAxialm_pLUTAxial->SetValueRange(0.0, 1.0); // from black to whitem_pLUTAxial->SetSaturationRange(0.0, 0.0); // no color saturationdouble dRange[2];m_pDICOMReader->Update();m_pDICOMReader->GetOutput()->GetScalarRange(dRange);m_pLUTAxial->SetRange(dRange); // image intensity rangem_pLUTAxial->SetRampToLinear();m_pLUTAxial->Build();m_pColorAxial->SetLookupTable(m_pLUTAxial);The trouble is that image m_pColorAxial which is vtkMapImageToColors, is still whiter ... I noticed that dRange is between 0 and 3913 ... I guess that is more than that ... I will try to dig into converting pixels to Hounsfield units ... aIs nybody done this before ? Flaviu. On Tuesday, May 10, 2016 5:15 PM, David Gobbi wrote: On Tue, May 10, 2016 at 7:37 AM, Flaviu2 wrote: > > Very useful your comments ! I have learned something here. > > The line > > > table->SetRange(0, 2047) Try something like the code below, it is simple but it often works fine.If it doesn't work for your image, there are more sophisticated methodsthat can be used, but they involve computing some statistics on theimage and using the metadata to convert pixels to Hounsfield units. m_pDICOMReader->Update(); double range[2]; m_pDICOMReader->GetOutput()->GetScalarRange(range);table->SetRange(range); ?- David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed May 11 09:53:25 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 11 May 2016 07:53:25 -0600 Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> References: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> Message-ID: Since you're already using vtk-dicom, you can use vtkDICOMApplyRescale to convert your CT image to Hounsfield units (if you use this filter, you should also call AutoRescaleOff() on the reader). After the image has been converted to Hounsfield units, you can use the "Window Center" and "Window Width" presets that are stored in the meta data to set the range for the lookup table. However, I usually ignore these presets, and instead use the VTK class vtkImageHistogramStatistics to compute the range. Its GetAutoRange() computes a range by doing some simple histogram analysis. If you enjoy doing a lot of reading, the relevant parts the DICOM standard are here: http://dicom.nema.org/MEDICAL/Dicom/current/output/chtml/part03/sect_C.11.html After the image goes through vtkImageMapToColors, how are you rendering it? - David On Wed, May 11, 2016 at 6:19 AM, Flaviu2 wrote: > I have tried this: > > // Create a greyscale lookup m_pLUTAxial > m_pLUTAxial->SetValueRange(0.0, 1.0); // from black to white > m_pLUTAxial->SetSaturationRange(0.0, 0.0); // no color saturation > double dRange[2]; > m_pDICOMReader->Update(); > m_pDICOMReader->GetOutput()->GetScalarRange(dRange); > m_pLUTAxial->SetRange(dRange); // image intensity range > m_pLUTAxial->SetRampToLinear(); > m_pLUTAxial->Build(); > m_pColorAxial->SetLookupTable(m_pLUTAxial); > > The trouble is that image m_pColorAxial which is vtkMapImageToColors, is > still whiter ... I noticed that dRange is between 0 and 3913 ... > > I guess that is more than that ... I will try to dig into converting > pixels to Hounsfield units ... aIs nybody done this before ? > > Flaviu. > > > > > On Tuesday, May 10, 2016 5:15 PM, David Gobbi > wrote: > > > On Tue, May 10, 2016 at 7:37 AM, Flaviu2 wrote: > > > > Very useful your comments ! I have learned something here. > > > > The line > > > > > table->SetRange(0, 2047) > > Try something like the code below, it is simple but it often works fine. > If it doesn't work for your image, there are more sophisticated methods > that can be used, but they involve computing some statistics on the > image and using the metadata to convert pixels to Hounsfield units. > > m_pDICOMReader->Update(); > double range[2]; > m_pDICOMReader->GetOutput()->GetScalarRange(range); > table->SetRange(range); > > - David > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drouin.simon at gmail.com Wed May 11 10:04:15 2016 From: drouin.simon at gmail.com (Simon Drouin) Date: Wed, 11 May 2016 10:04:15 -0400 Subject: [vtkusers] vtkImageStack with blending options In-Reply-To: References: Message-ID: Excellent, I put this on my todo list. I agree it shouldn't be difficult. I'll do that as soon as I find a moment. s. On Mon, May 9, 2016 at 2:50 PM, David Gobbi wrote: > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yxliuwm at gmail.com Wed May 11 14:05:52 2016 From: yxliuwm at gmail.com (Yixun Liu) Date: Wed, 11 May 2016 11:05:52 -0700 Subject: [vtkusers] Blend result from two renderings Message-ID: Hi All, I have a question about rendering. Let's say in the scene, there are two objects A and B and A is before B. Can I separately render A and B and then blend the two 2D images, but still maintain the depth information, i.e., A looks before than B? I ask this is because I have an image from a real camera and a image from a virtual camera and I want to blend them. Thanks a lot. Yixun -------------- next part -------------- An HTML attachment was scrubbed... URL: From enzo.ferlin at micromar.com Wed May 11 14:31:33 2016 From: enzo.ferlin at micromar.com (Enzo Matsumiya) Date: Wed, 11 May 2016 15:31:33 -0300 Subject: [vtkusers] Where's the 'i' key press being handled? Message-ID: <9642C0E4-523F-4516-96F9-4DD2F78BCBC9@micromar.com> Hi, I'm in the process of change keyboard shortcuts behaviour on my application and I'm having trouble finding where vtkImagePlaneWidget handles the 'i' key press (to enable interactor). From this page: http://www.vtk.org/doc/nightly/html/classvtkImagePlaneWidget.html "If the "i" key (for "interactor") is pressed, the vtkImagePlaneWidget will appear. (See superclass documentation for information about changing this behavior.)" I took a look at the superclass, vtkPolyDataSourceWidget, but I couldn't find anything related to this. Thanks in advance, Enzo From brodyhuval at gmail.com Wed May 11 14:40:28 2016 From: brodyhuval at gmail.com (Brody Huval) Date: Wed, 11 May 2016 11:40:28 -0700 Subject: [vtkusers] GLXBadFBConfig on switching from VTK6 to VTK7 Message-ID: <6A1F0660-52C5-4266-A5AB-169E8B771220@gmail.com> Hello, When I switched from VTK 6 to 7 I got this error when I tried to run my program built with VTK: X Error of failed request: GLXBadFBConfig Major opcode of failed request: 150 (GLX) Minor opcode of failed request: 34 () Serial number of failed request: 39 Current serial number in output stream: 40 I am using X11 forwarding over an ssh tunnel (from my mac laptop to a ubuntu server) and my glxinfo on the server gives: GLX version: 1.4 GLX extensions: GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: NVIDIA GeForce GT 650M OpenGL Engine OpenGL version string: 1.4 (2.1 NVIDIA-10.10.5.2 310.42.25f01) This program works fine with VTK 6, and after a while of searching the closest post I could find was: https://gitlab.kitware.com/vtk/vtk/merge_requests/933 . However, when using the specified environment variable at runtime it did not help. Thank you in advance for any assistance. Best, Brody -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Wed May 11 16:47:49 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Wed, 11 May 2016 16:47:49 -0400 Subject: [vtkusers] GLXBadFBConfig on switching from VTK6 to VTK7 In-Reply-To: <6A1F0660-52C5-4266-A5AB-169E8B771220@gmail.com> References: <6A1F0660-52C5-4266-A5AB-169E8B771220@gmail.com> Message-ID: Hi Brody, VTK 7 switched the default OpenGL backend used to the newer OpenGL2 backend. This requires OpenGL 3.2 features to work properly, but X forwarding only supports OpenGL 1.something. The bad X call is probably the request for a newer context. Generally the solution people have used is to switch to using VNC to view VTK applications on remote machines. Others on the list may have more helpful advice though. HTH, Shawn On Wed, May 11, 2016 at 2:40 PM, Brody Huval wrote: > Hello, > > When I switched from VTK 6 to 7 I got this error when I tried to run my > program built with VTK: > > X Error of failed request: GLXBadFBConfig > Major opcode of failed request: 150 (GLX) > Minor opcode of failed request: 34 () > Serial number of failed request: 39 > Current serial number in output stream: 40 > > I am using X11 forwarding over an ssh tunnel (from my mac laptop to a > ubuntu server) and my glxinfo on the server gives: > > GLX version: 1.4 > GLX extensions: > GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, > GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig > OpenGL vendor string: NVIDIA Corporation > OpenGL renderer string: NVIDIA GeForce GT 650M OpenGL Engine > OpenGL version string: 1.4 (2.1 NVIDIA-10.10.5.2 310.42.25f01) > > This program works fine with VTK 6, and after a while of searching the > closest post I could find was: > https://gitlab.kitware.com/vtk/vtk/merge_requests/933. However, when > using the specified environment variable at runtime it did not help. Thank > you in advance for any assistance. > > Best, > Brody > > _______________________________________________ > 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 martin.buerger at plassertheurer.com Thu May 12 01:58:40 2016 From: martin.buerger at plassertheurer.com (PTMartin) Date: Wed, 11 May 2016 22:58:40 -0700 (MST) Subject: [vtkusers] Blend result from two renderings In-Reply-To: References: Message-ID: <1463032720968-5738065.post@n5.nabble.com> I cannot figure out what exactly you need. But I think it is layered rendering. Search for it Following example should show you the right way. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/BackgroundImage -- View this message in context: http://vtk.1045678.n5.nabble.com/Blend-result-from-two-renderings-tp5738059p5738065.html Sent from the VTK - Users mailing list archive at Nabble.com. From brodyhuval at gmail.com Thu May 12 02:01:23 2016 From: brodyhuval at gmail.com (Brody Huval) Date: Wed, 11 May 2016 23:01:23 -0700 Subject: [vtkusers] GLXBadFBConfig on switching from VTK6 to VTK7 In-Reply-To: References: <6A1F0660-52C5-4266-A5AB-169E8B771220@gmail.com> Message-ID: Thanks Shawn for your help. I was able to recompile VTK 7 using the backend OpenGL backend with -DVTK_RENDERING_BACKEND=OpenGL and this fixed the problem. I?m by no means a OpenGL expert, so I?m not sure of the consequences of this, but everything seems to work fine. Best, Brody > On May 11, 2016, at 1:47 PM, Shawn Waldon wrote: > > Hi Brody, > > VTK 7 switched the default OpenGL backend used to the newer OpenGL2 backend. This requires OpenGL 3.2 features to work properly, but X forwarding only supports OpenGL 1.something. The bad X call is probably the request for a newer context. Generally the solution people have used is to switch to using VNC to view VTK applications on remote machines. Others on the list may have more helpful advice though. > > HTH, > Shawn > > On Wed, May 11, 2016 at 2:40 PM, Brody Huval > wrote: > Hello, > > When I switched from VTK 6 to 7 I got this error when I tried to run my program built with VTK: > > X Error of failed request: GLXBadFBConfig > Major opcode of failed request: 150 (GLX) > Minor opcode of failed request: 34 () > Serial number of failed request: 39 > Current serial number in output stream: 40 > > I am using X11 forwarding over an ssh tunnel (from my mac laptop to a ubuntu server) and my glxinfo on the server gives: > > GLX version: 1.4 > GLX extensions: > GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, > GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig > OpenGL vendor string: NVIDIA Corporation > OpenGL renderer string: NVIDIA GeForce GT 650M OpenGL Engine > OpenGL version string: 1.4 (2.1 NVIDIA-10.10.5.2 310.42.25f01) > > This program works fine with VTK 6, and after a while of searching the closest post I could find was: https://gitlab.kitware.com/vtk/vtk/merge_requests/933 . However, when using the specified environment variable at runtime it did not help. Thank you in advance for any assistance. > > Best, > Brody > > _______________________________________________ > 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 martin.buerger at plassertheurer.com Thu May 12 02:12:10 2016 From: martin.buerger at plassertheurer.com (PTMartin) Date: Wed, 11 May 2016 23:12:10 -0700 (MST) Subject: [vtkusers] Projecting a texture to vtkpolydata without using an actor In-Reply-To: <1459417629170-5737455.post@n5.nabble.com> References: <1459417629170-5737455.post@n5.nabble.com> Message-ID: <1463033530645-5738067.post@n5.nabble.com> I solved it on my own in the following way. No need to convert Bitmap to VtkImage. Creating texture coords by usage of vtkProjectedTexture. Using output of extrinsic calibration to set focal point and position. Setting aspect ratio according bitmap size and intrinsic focal length in pixel. Resulting in texture coordinates. Then assigning color to each point of polydata by pixel color from bitmap according rounded texture coordinate. No interpolation at all. Thats it... -- View this message in context: http://vtk.1045678.n5.nabble.com/Projecting-a-texture-to-vtkpolydata-without-using-an-actor-tp5737455p5738067.html Sent from the VTK - Users mailing list archive at Nabble.com. From coyarzunlaura at googlemail.com Thu May 12 05:54:45 2016 From: coyarzunlaura at googlemail.com (Cristina Oyarzun) Date: Thu, 12 May 2016 11:54:45 +0200 Subject: [vtkusers] black contour instead of colors after vtkcutter Message-ID: Hello, I am rendering a surface (vtkpolydata) using a vtkcolortransferfunction to map its scalar values to RGB colors (just red, yellow and green). That works without problem. I have a different render window where I show 2D slices of a volume as I move a slider. While I traverse the volume I want to show in addition to the 2D slices the cut of the surface that correspond to that 2D slices in that render window. I use vtkcutter and a plane at the position of the current 2D slice to do this. I see the 2D contour of the surface that correspond to that 2D slice but the colors are not correct. I do get some colors in some slices, but in some other slices I just get a black contour. Does someone have an idea of why do I not get the same colors in the 3D surface and after the cut? Thank you very much! Cristina -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.ei at novodynamics.com Thu May 12 17:10:57 2016 From: david.ei at novodynamics.com (dei) Date: Thu, 12 May 2016 14:10:57 -0700 (MST) Subject: [vtkusers] Crash in vtkShaderProgram/vtkOpenGLPolyDataMapper In-Reply-To: References: <1461770129232-5737902.post@n5.nabble.com> <1462568580080-5738017.post@n5.nabble.com> <1462815421253-5738030.post@n5.nabble.com> <1462830331451-5738038.post@n5.nabble.com> Message-ID: <1463087457678-5738070.post@n5.nabble.com> The error returned is 2000, but I think I've figured out the problem. Early on, when I was trying to solve stability problems with the mouse and vtkCanvas, I found a recommendation to add: -Dsun.java2d.d3d=false -Dsun.java2d.gdiblit=false to the java VM launch configuration. It seemed to solve the particular problem I was experiencing at the time so I added it and forgot about it. In any case, removing these switches appears to fix the random crashes. -- View this message in context: http://vtk.1045678.n5.nabble.com/Crash-in-vtkShaderProgram-vtkOpenGLPolyDataMapper-tp5737734p5738070.html Sent from the VTK - Users mailing list archive at Nabble.com. From info at import-ev.com Thu May 12 21:20:30 2016 From: info at import-ev.com (Import EV) Date: Fri, 13 May 2016 10:20:30 +0900 Subject: [vtkusers] series UID & slice number in vtkDICOMImageReader::SetDirectoryName Message-ID: <000901d1acb5$a3a7b470$eaf71d50$@import-ev.com> Hello, I use "vtkDICOMImageReader::SetDirectoryName" and have a question. I wonder if "series UID" & "slice number" of DICOM files described in explanation of vtkDICOMImageReader::SetDirectoryName are " Series Instance UID (0020,000E)" & "Series Number (0020,0011)" respectively. I just want to make sure if my understanding is correct. Please advise me if anyone knows the answer. ----- Import EV Corp. ----- From tjlp at netease.com Thu May 12 22:50:54 2016 From: tjlp at netease.com (Liu_tj) Date: Fri, 13 May 2016 10:50:54 +0800 (CST) Subject: [vtkusers] encrypt and decrypt the VTK data in memory Message-ID: <315fdd0d.5.154a8061ff2.Coremail.tjlp@netease.com> Hi, Is it possible to encrypt VTk data in memory and decrypt it before we begin to use it? For example, I generate a 3D volume and want to store it to file, now I hope to encrypt it before writing to file, and decrypt it before using vtkSTLReader to load it? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From mallikarjun49 at gmail.com Fri May 13 02:49:08 2016 From: mallikarjun49 at gmail.com (Mallikarjun K) Date: Fri, 13 May 2016 12:19:08 +0530 Subject: [vtkusers] vtkSmartVolumeMapper Message-ID: Hello All, I am using vtkSmartVolumeMapper of vtk-6.1, by default its AutoAdjustSampleDistances is enabled and interaction with object is very fast with low resolution. So I set virtual void vtkSmartVolumeMapper::SetInteractiveUpdateRate(double ) to >15 and now I can see high resolution object with very slow interaction. Can anyone help me how can I make reasonably fast interaction with high resolution.. I have NVidia's GeForce 8500 GT ,3GB graphics card. Thanks in advance. -- *With Kind Regards:* Mallikarjun -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Fri May 13 03:22:28 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Fri, 13 May 2016 07:22:28 +0000 (UTC) Subject: [vtkusers] Fw: No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: <1446659382.1186392.1463058384723.JavaMail.yahoo@mail.yahoo.com> References: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> <1446659382.1186392.1463058384723.JavaMail.yahoo@mail.yahoo.com> Message-ID: <378522838.1414255.1463124148242.JavaMail.yahoo@mail.yahoo.com> This is a little pseudocode of the entire pipeline: vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); m_pDICOMReader->RemoveAllInputs(); vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); m_pDICOMReader->SetFileNames(pFN); // all files from serie m_pDICOMReader->AutoRescaleOff(); m_pDICOMReader->Update(); m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); m_pRescale->Update(); vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); vtkLookupTable* m_pLUTAxial = vtkLookupTable::New(); m_pLUTAxial->SetValueRange(0.0, 1.0); // from black to white m_pLUTAxial->SetSaturationRange(0.0, 0.0); // no color saturation vtkDICOMMetaData* pMeta = m_pDICOMReader->GetMetaData(); const vtkDICOMValue& window = pMeta->GetAttributeValue(DC::WindowWidth); const vtkDICOMValue& level = pMeta->GetAttributeValue(DC::WindowCenter); double dWindow = window.AsDouble(); double dLevel = level.AsDouble(); m_pLUTAxial->SetRange(dLevel, dWindow); // image intensity range m_pLUTAxial->SetRampToLinear(); m_pLUTAxial->Build(); vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); m_pColorAxial->SetLookupTable(m_pLUTAxial); m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); vtkImageActor* m_pImageActor = vtkImageActor::New(); // and then, forward, setup m_pColorAxial to an image actor: pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); // and add image actor to a renderer m_pRenderer->AddActor(m_pImageActor); I had taken "Window center" and "Window width" and put them as range on lookuptable ... the image are little dark, and is not like the original (without setup lookup table looks good, but I get those warning like in post subject) ... might not understand well what you said about this range, but I am feel I am not far from solve this problem ... can you guide me a little bit ? Flaviu. Since you're already using vtk-dicom, you can use vtkDICOMApplyRescaleto convert your CT image to Hounsfield units (if you use this filter, you shouldalso call AutoRescaleOff() on the reader). After the image has been converted to Hounsfield units, you can use the"Window Center" and "Window Width" presets that are stored in the metadata to set the range for the lookup table. However, I usually ignore these presets, and instead use the VTK classvtkImageHistogramStatistics to compute the range.? Its GetAutoRange()computes a range by doing some simple histogram analysis. If you enjoy doing a lot of reading, the relevant parts the DICOM standardare here:http://dicom.nema.org/MEDICAL/Dicom/current/output/chtml/part03/sect_C.11.html After the image goes through vtkImageMapToColors, how are yourendering it? ?- David -------------- next part -------------- An HTML attachment was scrubbed... URL: From edcpwk at gmail.com Fri May 13 07:24:51 2016 From: edcpwk at gmail.com (Eddy Cappeau) Date: Fri, 13 May 2016 13:24:51 +0200 Subject: [vtkusers] Iso volume in VTK Message-ID: Hi all, I prototyped a pipeline in Paraview and now that I'm happy with it I want to do the same in VTK. The problem is that my pipeline involve the use of the IsoVolume filter and this filter is not in VTK. Is it possible to do the same in pure VTK ? Thanks a lot, Eddy -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri May 13 08:20:42 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 13 May 2016 06:20:42 -0600 Subject: [vtkusers] Fw: No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: <378522838.1414255.1463124148242.JavaMail.yahoo@mail.yahoo.com> References: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> <1446659382.1186392.1463058384723.JavaMail.yahoo@mail.yahoo.com> <378522838.1414255.1463124148242.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Flaviu, This is incorrect: m_pLUTAxial->SetRange(dLevel, dWindow); It should be something like this: m_pLUTAxial->SetRange(dLevel - 0.5*dWindow, dLevel + 0.5*dWindow); - David On Fri, May 13, 2016 at 1:22 AM, Flaviu2 wrote: > This is a little pseudocode of the entire pipeline: > > vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); > m_pDICOMReader->RemoveAllInputs(); > vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); > m_pDICOMReader->SetFileNames(pFN); // all files from serie > m_pDICOMReader->AutoRescaleOff(); > m_pDICOMReader->Update(); > m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); > m_pRescale->Update(); > vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); > m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); > vtkLookupTable* m_pLUTAxial = vtkLookupTable::New(); > m_pLUTAxial->SetValueRange(0.0, 1.0); // from black to white > m_pLUTAxial->SetSaturationRange(0.0, 0.0); // no color saturation > vtkDICOMMetaData* pMeta = m_pDICOMReader->GetMetaData(); > const vtkDICOMValue& window = pMeta->GetAttributeValue(DC::WindowWidth); > const vtkDICOMValue& level = pMeta->GetAttributeValue(DC::WindowCenter); > double dWindow = window.AsDouble(); > double dLevel = level.AsDouble(); > m_pLUTAxial->SetRange(dLevel, dWindow); // image intensity range > m_pLUTAxial->SetRampToLinear(); > m_pLUTAxial->Build(); > vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); > m_pColorAxial->SetLookupTable(m_pLUTAxial); > m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); > vtkImageActor* m_pImageActor = vtkImageActor::New(); > // and then, forward, setup m_pColorAxial to an image actor: > > pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); > // and add image actor to a renderer > m_pRenderer->AddActor(m_pImageActor); > > > I had taken "Window center" and "Window width" and put them as range on > lookuptable ... the image are little dark, and is not like the original > (without setup lookup table looks good, but I get those warning like in > post subject) ... might not understand well what you said about this range, > but I am feel I am not far from solve this problem ... can you guide me a > little bit ? > > Flaviu. > > > > > > Since you're already using vtk-dicom, you can use vtkDICOMApplyRescale > to convert your CT image to Hounsfield units (if you use this filter, you > should > also call AutoRescaleOff() on the reader). > > After the image has been converted to Hounsfield units, you can use the > "Window Center" and "Window Width" presets that are stored in the meta > data to set the range for the lookup table. > > However, I usually ignore these presets, and instead use the VTK class > vtkImageHistogramStatistics to compute the range. Its GetAutoRange() > computes a range by doing some simple histogram analysis. > > If you enjoy doing a lot of reading, the relevant parts the DICOM standard > are here: > > http://dicom.nema.org/MEDICAL/Dicom/current/output/chtml/part03/sect_C.11.html > > After the image goes through vtkImageMapToColors, how are you > rendering it? > > - David > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drouin.simon at gmail.com Fri May 13 11:13:22 2016 From: drouin.simon at gmail.com (Simon Drouin) Date: Fri, 13 May 2016 11:13:22 -0400 Subject: [vtkusers] black contour instead of colors after vtkcutter In-Reply-To: References: Message-ID: Make sure lighting in off and ambient is set to 1 in the vtkProp3D that renders the contour. assuming the output of the vtkCutter goes into a vtkPolyDataMapper which in turn is connected to a vtkActor or vtkProp3D: vtkProp3D * contourProp; contourProp->GetProperty()->LightingOff(); contourProp->GetProperty()->SetAmbient(1.0); On Thu, May 12, 2016 at 5:54 AM, Cristina Oyarzun via vtkusers < vtkusers at vtk.org> wrote: > Hello, > > I am rendering a surface (vtkpolydata) using a vtkcolortransferfunction to > map its scalar values to RGB colors (just red, yellow and green). That > works without problem. > > I have a different render window where I show 2D slices of a volume as I > move a slider. > > While I traverse the volume I want to show in addition to the 2D slices > the cut of the surface that correspond to that 2D slices in that render > window. I use vtkcutter and a plane at the position of the current 2D slice > to do this. I see the 2D contour of the surface that correspond to that 2D > slice but the colors are not correct. I do get some colors in some slices, > but in some other slices I just get a black contour. > > Does someone have an idea of why do I not get the same colors in the 3D > surface and after the cut? > > Thank you very much! > > Cristina > > _______________________________________________ > 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 martin.genet at polytechnique.edu Fri May 13 12:16:36 2016 From: martin.genet at polytechnique.edu (Martin Genet) Date: Fri, 13 May 2016 18:16:36 +0200 Subject: [vtkusers] confused with vtkProbeFilter Message-ID: <5735FDE4.7030105@polytechnique.edu> Dear everyone: Sorry for the triviality, but I'm getting confused with vtkProbeFilter: trying to probe an image with a mesh (not the opposite: I need the mesh data interpolated onto the image points), but can't get it to work. Consider the following code: > import numpy > import vtk > > image = vtk.vtkImageData() > image.SetDimensions([3, 3, 1]) > image.SetSpacing(1./numpy.array(image.GetDimensions())) > image.SetOrigin(numpy.array(image.GetSpacing())/2) > > points = vtk.vtkPoints() > points.InsertNextPoint([1./4, 1./4, 2./4]) > points.InsertNextPoint([3./4, 1./4, 2./4]) > points.InsertNextPoint([3./4, 3./4, 2./4]) > points.InsertNextPoint([1./4, 3./4, 2./4]) > > cell = vtk.vtkQuad() > cell.GetPointIds().SetId(0, 0) > cell.GetPointIds().SetId(1, 1) > cell.GetPointIds().SetId(2, 2) > cell.GetPointIds().SetId(3, 3) > > cell_array = vtk.vtkCellArray() > cell_array.InsertNextCell(cell) > > ugrid = vtk.vtkUnstructuredGrid() > ugrid.SetPoints(points) > ugrid.SetCells(vtk.VTK_QUAD, cell_array) > > farray = vtk.vtkFloatArray() > farray.SetNumberOfComponents(1) > farray.SetNumberOfTuples(1) > farray.SetTuple1(0, 2.) > ugrid.GetCellData().AddArray(farray) > > farray = vtk.vtkFloatArray() > farray.SetNumberOfComponents(1) > farray.SetNumberOfTuples(4) > farray.SetTuple1(0, 2.) > farray.SetTuple1(2, 2.) > farray.SetTuple1(3, 2.) > farray.SetTuple1(4, 2.) > ugrid.GetPointData().AddArray(farray) > > probe = vtk.vtkProbeFilter() > if (vtk.vtkVersion.GetVTKMajorVersion() >= 6): > probe.SetInputData(image) > probe.SetSourceData(ugrid) > else: > probe.SetInput(image) > probe.SetSource(ugrid) > probe.Update() > probed_image = probe.GetOutput() Problem is: probed_image contains only one array, called vtkValidPointMask, but no interpolated data. If I do: > probed_scalars = probed_image.GetPointData().GetArray("vtkValidPointMask") > for k_voxels in xrange(probed_scalars.GetNumberOfTuples()): print > probed_scalars.GetTuple1(k_voxels) I'm getting: > 0.0 > 0.0 > 0.0 > 0.0 > 1.0 > 0.0 > 0.0 > 0.0 > 0.0 So I'm guessing the filter is able to figure out which image point lies within the mesh and which does not, but I can't find the interpolated data? Any help would be super appreciated. Thanks! Martin From sujin.philip at kitware.com Fri May 13 12:53:29 2016 From: sujin.philip at kitware.com (Sujin Philip) Date: Fri, 13 May 2016 12:53:29 -0400 Subject: [vtkusers] confused with vtkProbeFilter In-Reply-To: <5735FDE4.7030105@polytechnique.edu> References: <5735FDE4.7030105@polytechnique.edu> Message-ID: Hi Martin, You need to set names for the point and cell data arrays. farray.SetName("pointdata") and farray.SetName("celldata") after doing that your code works for me. -Sujin On Fri, May 13, 2016 at 12:16 PM, Martin Genet < martin.genet at polytechnique.edu> wrote: > Dear everyone: > > Sorry for the triviality, but I'm getting confused with vtkProbeFilter: > trying to probe an image with a mesh (not the opposite: I need the mesh > data interpolated onto the image points), but can't get it to work. > > Consider the following code: > >> import numpy >> import vtk >> >> image = vtk.vtkImageData() >> image.SetDimensions([3, 3, 1]) >> image.SetSpacing(1./numpy.array(image.GetDimensions())) >> image.SetOrigin(numpy.array(image.GetSpacing())/2) >> >> points = vtk.vtkPoints() >> points.InsertNextPoint([1./4, 1./4, 2./4]) >> points.InsertNextPoint([3./4, 1./4, 2./4]) >> points.InsertNextPoint([3./4, 3./4, 2./4]) >> points.InsertNextPoint([1./4, 3./4, 2./4]) >> >> cell = vtk.vtkQuad() >> cell.GetPointIds().SetId(0, 0) >> cell.GetPointIds().SetId(1, 1) >> cell.GetPointIds().SetId(2, 2) >> cell.GetPointIds().SetId(3, 3) >> >> cell_array = vtk.vtkCellArray() >> cell_array.InsertNextCell(cell) >> >> ugrid = vtk.vtkUnstructuredGrid() >> ugrid.SetPoints(points) >> ugrid.SetCells(vtk.VTK_QUAD, cell_array) >> >> farray = vtk.vtkFloatArray() >> farray.SetNumberOfComponents(1) >> farray.SetNumberOfTuples(1) >> farray.SetTuple1(0, 2.) >> ugrid.GetCellData().AddArray(farray) >> >> farray = vtk.vtkFloatArray() >> farray.SetNumberOfComponents(1) >> farray.SetNumberOfTuples(4) >> farray.SetTuple1(0, 2.) >> farray.SetTuple1(2, 2.) >> farray.SetTuple1(3, 2.) >> farray.SetTuple1(4, 2.) >> ugrid.GetPointData().AddArray(farray) >> >> probe = vtk.vtkProbeFilter() >> if (vtk.vtkVersion.GetVTKMajorVersion() >= 6): >> probe.SetInputData(image) >> probe.SetSourceData(ugrid) >> else: >> probe.SetInput(image) >> probe.SetSource(ugrid) >> probe.Update() >> probed_image = probe.GetOutput() >> > > Problem is: probed_image contains only one array, called > vtkValidPointMask, but no interpolated data. > > If I do: > >> probed_scalars = probed_image.GetPointData().GetArray("vtkValidPointMask") >> for k_voxels in xrange(probed_scalars.GetNumberOfTuples()): print >> probed_scalars.GetTuple1(k_voxels) >> > I'm getting: > >> 0.0 >> 0.0 >> 0.0 >> 0.0 >> 1.0 >> 0.0 >> 0.0 >> 0.0 >> 0.0 >> > So I'm guessing the filter is able to figure out which image point lies > within the mesh and which does not, but I can't find the interpolated data? > Any help would be super appreciated. Thanks! > > Martin > > _______________________________________________ > 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 filippo.brogi at topic.nl Fri May 13 12:56:34 2016 From: filippo.brogi at topic.nl (FilippoBrogi) Date: Fri, 13 May 2016 09:56:34 -0700 (MST) Subject: [vtkusers] QVTWidget2 issue Message-ID: <1463158594421-5738080.post@n5.nabble.com> Hello, I'm using Qt 5.3 and vtk 6.1 under windows. A 3D mesh is rendered in a QVTK windows using QVTWidget2. I'm currently trying to pick some cells. The pick event is connected to Qt slot. mpEventConnections->Connect(mpQVTKWidget->GetRenderWindow()->GetInteractor(), vtkCommand::EndPickEvent, this,SLOT(objectPickedVTK(vtkObject*, unsigned long, void*, void*))); Looks like the signal is not emitted. Using QVTKWidget is working as expected. Anyway I cannot use it for some rendering issues. Any suggestions? -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTWidget2-issue-tp5738080.html Sent from the VTK - Users mailing list archive at Nabble.com. From rickfrank at me.com Fri May 13 19:22:41 2016 From: rickfrank at me.com (Richard Frank) Date: Fri, 13 May 2016 23:22:41 +0000 (GMT) Subject: [vtkusers] SmartPointer reference? Message-ID: <1c9e3634-1e34-442a-b5e3-c311778ed316@me.com> Hi, Is it possible to return a smart pointer by reference?? I'd like to return an image as a parameter, rather than a return type but nothing seems to be happy.? for instance bool SomeFunction(vtkSmartPointer & outImage) { vtkSmartPointer r =?vtkSmartPointer::New(); r->SetFileName("Path"); r->Update(); // What next? return true;? } I though Take was a possible choice outImage = vtkSmartPointer::Take(r->GetOutput()); but no happiness there. Any solution? Thanks Rick -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.genet at polytechnique.edu Fri May 13 19:45:07 2016 From: martin.genet at polytechnique.edu (Martin Genet) Date: Sat, 14 May 2016 01:45:07 +0200 Subject: [vtkusers] confused with vtkProbeFilter In-Reply-To: References: <5735FDE4.7030105@polytechnique.edu> Message-ID: <57366703.8060707@polytechnique.edu> Thanks for your help, Sujin. What do you mean exactly by "your code works for me"? I sat the arrays names but am still getting the same behavior: the code runs fine, but I can't find the interpolated data. Do you know where it is? Thanks again. Martin On 13/05/2016 18:53, Sujin Philip wrote: > Hi Martin, > > You need to set names for the point and cell data arrays. > farray.SetName("pointdata") and farray.SetName("celldata") > > after doing that your code works for me. > > -Sujin > > > On Fri, May 13, 2016 at 12:16 PM, Martin Genet > > wrote: > > Dear everyone: > > Sorry for the triviality, but I'm getting confused with > vtkProbeFilter: trying to probe an image with a mesh (not the > opposite: I need the mesh data interpolated onto the image > points), but can't get it to work. > > Consider the following code: > > import numpy > import vtk > > image = vtk.vtkImageData() > image.SetDimensions([3, 3, 1]) > image.SetSpacing(1./numpy.array(image.GetDimensions())) > image.SetOrigin(numpy.array(image.GetSpacing())/2) > > points = vtk.vtkPoints() > points.InsertNextPoint([1./4, 1./4, 2./4]) > points.InsertNextPoint([3./4, 1./4, 2./4]) > points.InsertNextPoint([3./4, 3./4, 2./4]) > points.InsertNextPoint([1./4, 3./4, 2./4]) > > cell = vtk.vtkQuad() > cell.GetPointIds().SetId(0, 0) > cell.GetPointIds().SetId(1, 1) > cell.GetPointIds().SetId(2, 2) > cell.GetPointIds().SetId(3, 3) > > cell_array = vtk.vtkCellArray() > cell_array.InsertNextCell(cell) > > ugrid = vtk.vtkUnstructuredGrid() > ugrid.SetPoints(points) > ugrid.SetCells(vtk.VTK_QUAD, cell_array) > > farray = vtk.vtkFloatArray() > farray.SetNumberOfComponents(1) > farray.SetNumberOfTuples(1) > farray.SetTuple1(0, 2.) > ugrid.GetCellData().AddArray(farray) > > farray = vtk.vtkFloatArray() > farray.SetNumberOfComponents(1) > farray.SetNumberOfTuples(4) > farray.SetTuple1(0, 2.) > farray.SetTuple1(2, 2.) > farray.SetTuple1(3, 2.) > farray.SetTuple1(4, 2.) > ugrid.GetPointData().AddArray(farray) > > probe = vtk.vtkProbeFilter() > if (vtk.vtkVersion.GetVTKMajorVersion() >= 6): > probe.SetInputData(image) > probe.SetSourceData(ugrid) > else: > probe.SetInput(image) > probe.SetSource(ugrid) > probe.Update() > probed_image = probe.GetOutput() > > > Problem is: probed_image contains only one array, called > vtkValidPointMask, but no interpolated data. > > If I do: > > probed_scalars = > probed_image.GetPointData().GetArray("vtkValidPointMask") > for k_voxels in xrange(probed_scalars.GetNumberOfTuples()): > print probed_scalars.GetTuple1(k_voxels) > > I'm getting: > > 0.0 > 0.0 > 0.0 > 0.0 > 1.0 > 0.0 > 0.0 > 0.0 > 0.0 > > So I'm guessing the filter is able to figure out which image point > lies within the mesh and which does not, but I can't find the > interpolated data? Any help would be super appreciated. Thanks! > > Martin > > _______________________________________________ > 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 filippo.brogi at topic.nl Fri May 13 07:45:32 2016 From: filippo.brogi at topic.nl (Filippo Brogi) Date: Fri, 13 May 2016 11:45:32 +0000 Subject: [vtkusers] QVTKWidget2 Message-ID: <92C2B09BAC90E24EBC4250E7F22F153404052735@TOP-EX01.TOPIC.LOCAL> Hello, I'm using Qt 5.3 and vtk 6.1 under windows. A 3D mesh is rendered in a QVTK windows using QVTWidget2. I'm currently trying to pick some cells. The pick event is connected to Qt slot. mpEventConnections->Connect(mpQVTKWidget->GetRenderWindow()->GetInteractor(), vtkCommand::EndPickEvent, this,SLOT(objectPickedVTK(vtkObject*, unsigned long, void*, void*))); Looks like the signal is not emitted. Using QVTKWidget is working as expected. Anyway I cannot use it for some rendering issues. Any suggestions? Met vriendelijke groet / kind regards, Filippo Brogi [cid:image0385ad.PNG at 464d654e.41b59ea2] Topic Embedded Systems Eindhovenseweg 32c 5683 KH Best T: +31 (0) 499 33 69 79 Postbus 440 E: filippo.brogi at topic.nl 5680 AK Best W: www.topic.nl [cid:imagea72771.JPG at a4b7c69a.499a700d][cid:imagec60585.JPG at de8e3636.4b8c36f0][cid:image938546.JPG at f227e14b.428ba263] Please consider the environment before printing this e-mail Topic zoekt gedreven (embedded) software specialisten! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image0385ad.PNG Type: image/png Size: 21547 bytes Desc: image0385ad.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imagea72771.JPG Type: image/jpeg Size: 1088 bytes Desc: imagea72771.JPG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imagec60585.JPG Type: image/jpeg Size: 1087 bytes Desc: imagec60585.JPG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image938546.JPG Type: image/jpeg Size: 1060 bytes Desc: image938546.JPG URL: From zmanvortex at gmail.com Sat May 14 14:25:46 2016 From: zmanvortex at gmail.com (Donny Zimmerman) Date: Sat, 14 May 2016 13:25:46 -0500 Subject: [vtkusers] Using vtkLookupTable with discrete colors and vtkTexture Problem Message-ID: I am creating a lookup table with discrete rgba entries to map a vtkTexture with unsigned char data to colors. When I render my scene texture is all one color which is the last entry I put into the lookup table. Here is a code snippet of my lookup table and texture: vtkSmartPointer lookuptable = vtkSmartPointer::New(); lookuptable->GetTable()->Reset(); lookuptable->SetNumberOfColors(cols->Count); for (int tblid = 0; tblid < cols->Count; tblid++) { // Set the ref bin colors double r, g, b, a; r = cols[tblid].R / 255.0; g = cols[tblid].G / 255.0; b = cols[tblid].B / 255.0; if(tblid <= 20) { a = 0; } else { a = cols[tblid].A / 255.0; } lookuptable->SetTableValue(tblid, r, g, b, a); } lookuptable->Build(); vtkSmartPointer texture = vtkSmartPointer::New(); texture->MapColorScalarsThroughLookupTableOn(); texture->SetLookupTable(lookuptable); texture->InterpolateOff(); if(m_smooth) { texture->SetInputConnection(resize2->GetOutputPort()); } else { texture->SetInputConnection(imgdat->GetOutputPort()); } I have searched the documentation for vtkTexture and can't figure out what I am doing wrong. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat May 14 14:46:35 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 14 May 2016 12:46:35 -0600 Subject: [vtkusers] Using vtkLookupTable with discrete colors and vtkTexture Problem In-Reply-To: References: Message-ID: On Sat, May 14, 2016 at 12:25 PM, Donny Zimmerman wrote: > > > I have searched the documentation for vtkTexture and can't figure out what > I am doing wrong. > Did you remember to set the range of the lookup table? For a discrete mapping, lookuptable->SetRange(0, cols->Count - 1); -------------- next part -------------- An HTML attachment was scrubbed... URL: From zmanvortex at gmail.com Sat May 14 15:28:12 2016 From: zmanvortex at gmail.com (Donny Zimmerman) Date: Sat, 14 May 2016 14:28:12 -0500 Subject: [vtkusers] Using vtkLookupTable with discrete colors and vtkTexture Problem In-Reply-To: References: Message-ID: <92F2937A-C7FA-41DB-9944-4D320F18E27D@gmail.com> Thanks David. That fixed it. I was using this same lookup table to map scalars on vtkPolyData and it worked without setting the range so I didn't think it was a problem with the table settings. Thanks! Sent from my iPhone > On May 14, 2016, at 1:46 PM, David Gobbi wrote: > >> On Sat, May 14, 2016 at 12:25 PM, Donny Zimmerman wrote: >> >> I have searched the documentation for vtkTexture and can't figure out what I am doing wrong. > > Did you remember to set the range of the lookup table? > For a discrete mapping, > > lookuptable->SetRange(0, cols->Count - 1); > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Sun May 15 04:53:38 2016 From: juch at zhaw.ch (normanius) Date: Sun, 15 May 2016 01:53:38 -0700 (MST) Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges Message-ID: <1463302418839-5738088.post@n5.nabble.com> Hi all This is an issue that has been raised already. But I wanted to ask whether there is a workaround or whether it actually is a bug that has been properly reported. Find attached sample code which reproduces the problem: If I union two overlapping, watertight objects A and B, the resulting object C very likely won't be watertight (it shows border edges and non-manifold edges). The sample code in essence does this: - create cylinder A as a vtk.vtkCylinderSource - create sphere B as a vtk.vtkSphereSource - extract triangles from A and B - create union C with vtk.vtkBooleanOperationPolyDataFilter() with SetOperationToUnion() The problem occurs also, if I use other objects than cylinders or spheres. The problem occurs also, if I "clean/condition" the surfaces of A and B before calculating the union. (I tried vtkCleanPolyData(), vtkFillHolesFilter() and addition of small noise on the vertices, which sometimes helps to regularise operations on objects) In the following two screenshots. The first one indicates the two objects to union. The second one shows the result, with the non-manifold and border edges. Because I often make use of vtkBooleanOperationPolyDataFilter, the problem is really annoying for me. That's why I thought to seek help in the community. Any ideas of how to handle this? Cleaning the surface (set flag cleanOutputSurface=True in my code) does improve the situation in some cases - but it cannot be that one has to do that extra cleanup step after every such basic operation, right?! By the way: this problem has been reported already: see here and here reproduced_problem.py . Thanks for any inputs from your side. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088.html Sent from the VTK - Users mailing list archive at Nabble.com. From tjlp at netease.com Mon May 16 09:11:33 2016 From: tjlp at netease.com (Liu_tj) Date: Mon, 16 May 2016 21:11:33 +0800 (CST) Subject: [vtkusers] why does the generated 3D model have borken part? Message-ID: <7543d5b6.11.154b9b16f2f.Coremail.tjlp@netease.com> Hi, I used vtkMarchingCubes, vtkDecimatePro and vtkSmoothPolyDataFilter to generate 3D model for DICOM image. When it is firstly generated, the 3D model is fine (See the attached First.jpg). However, when I store it to STL file and use STLReader to read the STL file and display in vtkRenderWindow, it shows broken part (See loading.jpg). Why? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: First.jpg Type: image/jpeg Size: 36205 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: loading.jpg Type: image/jpeg Size: 24157 bytes Desc: not available URL: From dan.lipsa at kitware.com Mon May 16 10:18:30 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 16 May 2016 10:18:30 -0400 Subject: [vtkusers] SmartPointer reference? In-Reply-To: <1c9e3634-1e34-442a-b5e3-c311778ed316@me.com> References: <1c9e3634-1e34-442a-b5e3-c311778ed316@me.com> Message-ID: Does this help? http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers What exactly is the problem you are seeing? Dan On Fri, May 13, 2016 at 7:22 PM, Richard Frank wrote: > > Hi, > > Is it possible to return a smart pointer by reference? > > I'd like to return an image as a parameter, rather than a return type but > nothing seems to be happy. > > for instance > > bool SomeFunction(vtkSmartPointer & outImage) > { > vtkSmartPointer r = > vtkSmartPointer::New(); > r->SetFileName("Path"); > r->Update(); > // What next? > > return true; > } > > I though Take was a possible choice > > outImage = vtkSmartPointer::Take(r->GetOutput()); > > but no happiness there. > > Any solution? > > Thanks > > Rick > > > > _______________________________________________ > 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 lasso at queensu.ca Mon May 16 11:14:15 2016 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 16 May 2016 15:14:15 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges In-Reply-To: <1463302418839-5738088.post@n5.nabble.com> References: <1463302418839-5738088.post@n5.nabble.com> Message-ID: > but it cannot be that one has to do that extra cleanup step after every such basic operation, right?! Performing Boolean operation on meshes may sound easy but is an extremely difficult problem. It would be nice if VTK had a solution that worked reliably, so it's great that you submit reports on specific problems you find. However, I'm not sure if there is anybody who could work on fixing these issues in the near future. So, if you cannot fix them yourself then most likely your best bet is to work around the problem by converting all meshes to images, combining them, and regenerating a mesh. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of normanius Sent: May 15, 2016 4:54 AM To: vtkusers at vtk.org Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges Hi all This is an issue that has been raised already. But I wanted to ask whether there is a workaround or whether it actually is a bug that has been properly reported. Find attached sample code which reproduces the problem: If I union two overlapping, watertight objects A and B, the resulting object C very likely won't be watertight (it shows border edges and non-manifold edges). The sample code in essence does this: - create cylinder A as a vtk.vtkCylinderSource - create sphere B as a vtk.vtkSphereSource - extract triangles from A and B - create union C with vtk.vtkBooleanOperationPolyDataFilter() with SetOperationToUnion() The problem occurs also, if I use other objects than cylinders or spheres. The problem occurs also, if I "clean/condition" the surfaces of A and B before calculating the union. (I tried vtkCleanPolyData(), vtkFillHolesFilter() and addition of small noise on the vertices, which sometimes helps to regularise operations on objects) In the following two screenshots. The first one indicates the two objects to union. The second one shows the result, with the non-manifold and border edges. Because I often make use of vtkBooleanOperationPolyDataFilter, the problem is really annoying for me. That's why I thought to seek help in the community. Any ideas of how to handle this? Cleaning the surface (set flag cleanOutputSurface=True in my code) does improve the situation in some cases - but it cannot be that one has to do that extra cleanup step after every such basic operation, right?! By the way: this problem has been reported already: see here and here reproduced_problem.py . Thanks for any inputs from your side. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088.html Sent from the VTK - Users mailing list archive at Nabble.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 From seun at rogue-research.com Mon May 16 13:15:32 2016 From: seun at rogue-research.com (Seun Odutola) Date: Mon, 16 May 2016 13:15:32 -0400 Subject: [vtkusers] Changing vtkClipPolyData to ignore processing based on it's Bounding Box evaluation In-Reply-To: References: <042F0014-EE8F-4F96-B0A7-FECE4FA0819C@rogue-research.com> Message-ID: <734B1E41-D562-40B5-8F22-B5E9A2E42B11@rogue-research.com> Hi Dan, Pardon the late reply. Yes, clipping without reconfiguring the pipeline works and indeed there are cases when the clipping plane doesn?t intersect the data to be clipped which results in an empty dataset, this is currently what I?m observing and I would like to preserve the data set in this instance. To rephrase my initial question, if the clipping plane contains the entire dataset to be clipped (preserve the dataset and do not bother executing all the unnecessary computation, just return exactly the dataset as the output of the clipper). If the clipping plane has been adjusted such that its plane now intersects the dataset then clip as necessary. All in all everything works, all I?m trying to achieve is optimize vtkClipPolyData to perform as described above. Regards, Seun > On May 9, 2016, at 10:09 AM, Dan Lipsa wrote: > > Does clipping without reconfiguring the pipeline work? > There are cases when the clipping plane does not intersect the data to be clipped in which case you'll get an empty dataset. > > Dan > > > On Fri, May 6, 2016 at 4:23 PM, Seun Odutola > wrote: > Hi Everyone, > > I have a situation where I feed an input (which is an output result of a vtkProbeFilter) to a vtkClipPolyData and subsequently pass it?s output to a vtkPolyDataMapper. Basically my pipeline is as follows > > Mesh(polydata) (M) ?> A?> B ?> C > > A - vtkProbeFilter > B - vtkClipPolyData > C - vtkPolyDataMapper > > I gathered from previous responses to my last message (see topic: How to bypass parts of vtk pipeline) that reconfiguring the pipeline as suggested in that thread was most likely the way to go about achieving that. However, I had an idea which I would like to propose. For instance in my situation as described above my application typically will not be making use of the vtkClipPolyData that often but it?s of utmost importance that I have it configured ready to go whenever the user needs to Clip, so I decided to peek at vtkClipPolyData?s RequestData function where I compare the input?s bounding box (in my case the box to my polydata result from A), if the clippolydata?s box contains M in it?s entirety then I would like the input to be the output of the clippolydata (result going into ?> C) but if the clip polydata?s bounding box doesn?t contain M?s bounding box but just intersects it?s points then I would like to clip it and pass along the result to C. > Basically > 1 - if B?s box contains M - skip > 2 - if B doesn?t contain M but just intersects some of it?s point - then clip. > I managed to get do the bounds checking that certifies the first part of my algorithm but the 2nd part is the tricky bit when I resize my clipper (in it?s U.I) and then expect the vtkClipPolyData to Clip it empties the entire polydata of M. I believe it has something to do setting the clipScalars. I also noticed the line below in vtkClipPolyData.cxx > > for ( i=0; i < numPts; i++ ) > { > s = this->ClipFunction->FunctionValue(inPts->GetPoint(i)); > tmpScalars->SetComponent(i,0,s); > } > > tends to be the bottleneck in my case, which is why I?m trying to find a way to just ignore the effect of B in the pipeline when I need not clip but process it when I need to clip. I understand from the code that when I need to clip the line above must be executed but when I don?t need to clip what could be done to replace this line because ultimately down the line the tmpScalars is set to the clipScalars which is needed for further computation. Thanks everyone > > > Regards, > Seun > > > _______________________________________________ > 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 rickfrank at me.com Mon May 16 13:25:38 2016 From: rickfrank at me.com (Richard Frank) Date: Mon, 16 May 2016 13:25:38 -0400 Subject: [vtkusers] SmartPointer reference? Message-ID: <0D59F835-AD93-4744-95B5-D63EDCE90067@me.com> Rick Frank > > From: Dan Lipsa > To: Richard Frank > Cc: VTK Users > Subject: Re: [vtkusers] SmartPointer reference? > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Does this help? > http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers > > What exactly is the problem you are seeing? > Dan > > >> On Fri, May 13, 2016 at 7:22 PM, Richard Frank wrote: >> >> >> Hi, >> >> Is it possible to return a smart pointer by reference? >> >> I'd like to return an image as a parameter, rather than a return type but >> nothing seems to be happy. >> >> for instance >> >> bool SomeFunction(vtkSmartPointer & outImage) >> { >> vtkSmartPointer r = >> vtkSmartPointer::New(); >> r->SetFileName("Path"); >> r->Update(); >> // What next? >> >> return true; >> } >> >> I though Take was a possible choice >> >> outImage = vtkSmartPointer::Take(r->GetOutput()); >> >> but no happiness there. >> >> Any solution? >> >> Thanks >> >> Rick >> >> >> >> From rickfrank at me.com Mon May 16 13:38:21 2016 From: rickfrank at me.com (Richard Frank) Date: Mon, 16 May 2016 17:38:21 +0000 (GMT) Subject: [vtkusers] vtkusers Digest, Vol 145, Issue 16 In-Reply-To: Message-ID: <1e47db7c-2eda-482d-a8bf-63a944c74e27@me.com> Sorry for the blank reply previous. The Tutorial is great but?I don't see?an example of the case I'm talking about. That is, returning a pointer to the caller in such a way that the caller?doesn't ?have to think about whether they need to explicitly delete. so, given a function ?or method with a signature already returning a bool, and other code already dependent on that return type, I want to return the result of reading a file, for instance: bool ReadAnImageFile(vtkSmartPointer & theImageRead) { ???vtkSmartPointer reader =??vtkSmartPointer::New9); reader->SetFileName("Something.png"); reader->Update(); vtkImageData * image = ?reader->GetOutput(); ?How to get image into theImageRead? // This seems to work theImageRead->DeepCopy(image); // but if it's really doing a deep copy and I have a large 3D .mha file or something // it will be slow.....is there a better way? } Thanks Rick On May 16, 2016, at 12:00 PM, vtkusers-request at vtk.org wrote: Send vtkusers mailing list submissions to ? ? ?vtkusers at vtk.org To subscribe or unsubscribe via the World Wide Web, visit ?http://public.kitware.com/mailman/listinfo/vtkusers or, via email, send a message with subject or body 'help' to ? ? ?vtkusers-request at vtk.org You can reach the person managing the list at ?vtkusers-owner at vtk.org When replying, please edit your Subject line so it is more specific than "Re: Contents of vtkusers digest..." Today's Topics: 1. why does the generated 3D model have borken part? (Liu_tj) 2. Re: SmartPointer reference? (Dan Lipsa) 3. Re: vtkBooleanOperationPolyDataFilter creates ?non-manifold edges (Andras Lasso) ---------------------------------------------------------------------- Message: 1 Date: Mon, 16 May 2016 21:11:33 +0800 (CST) From: Liu_tj To: vtkusers Subject: [vtkusers] why does the generated 3D model have borken part? Message-ID: <7543d5b6.11.154b9b16f2f.Coremail.tjlp at netease.com> Content-Type: text/plain; charset="utf-8" Hi, I used vtkMarchingCubes, vtkDecimatePro and vtkSmoothPolyDataFilter to generate 3D model for DICOM image. When it is firstly generated, the 3D model is fine (See the attached First.jpg). However, when I store it to STL file and use STLReader to read the STL file and display in vtkRenderWindow, it shows broken part (See loading.jpg). Why? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: First.jpg Type: image/jpeg Size: 36205 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: loading.jpg Type: image/jpeg Size: 24157 bytes Desc: not available URL: ------------------------------ Message: 2 Date: Mon, 16 May 2016 10:18:30 -0400 From: Dan Lipsa To: Richard Frank Cc: VTK Users Subject: Re: [vtkusers] SmartPointer reference? Message-ID: ? Content-Type: text/plain; charset="utf-8" Does this help? http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers What exactly is the problem you are seeing? Dan On Fri, May 13, 2016 at 7:22 PM, Richard Frank wrote: Hi, Is it possible to return a smart pointer by reference? I'd like to return an image as a parameter, rather than a return type but nothing seems to be happy. for instance bool SomeFunction(vtkSmartPointer & outImage) { vtkSmartPointer r = vtkSmartPointer::New(); r->SetFileName("Path"); r->Update(); // What next? return true; } I though Take was a possible choice outImage = vtkSmartPointer::Take(r->GetOutput()); but no happiness there. Any solution? Thanks Rick _______________________________________________ Powered by http://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: ------------------------------ Message: 3 Date: Mon, 16 May 2016 15:14:15 +0000 From: Andras Lasso To: normanius , "vtkusers at vtk.org" Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter creates ? ?non-manifold ? ? ? ?edges Message-ID: ? ? ? ? ? ? ? ? Content-Type: text/plain; charset="us-ascii" but it cannot be that one has to do that extra cleanup step after every such basic operation, right?! Performing Boolean operation on meshes may sound easy but is an extremely difficult problem. It would be nice if VTK had a solution that worked reliably, so it's great that you submit reports on specific problems you find. However, I'm not sure if there is anybody who could work on fixing these issues in the near future. So, if you cannot fix them yourself then most likely your best bet is to work around the problem by converting all meshes to images, combining them, and regenerating a mesh. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of normanius Sent: May 15, 2016 4:54 AM To: vtkusers at vtk.org Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges Hi all This is an issue that has been raised already. But I wanted to ask whether there is a workaround or whether it actually is a bug that has been properly reported. Find attached sample code which reproduces the problem: If I union two overlapping, watertight objects A and B, the resulting object C very likely won't be watertight (it shows border edges and non-manifold edges). The sample code in essence does this: - create cylinder A as a vtk.vtkCylinderSource - create sphere B as a vtk.vtkSphereSource - extract triangles from A and B - create union C with vtk.vtkBooleanOperationPolyDataFilter() with SetOperationToUnion() The problem occurs also, if I use other objects than cylinders or spheres. The problem occurs also, if I "clean/condition" the surfaces of A and B before calculating the union. (I tried vtkCleanPolyData(), vtkFillHolesFilter() and addition of small noise on the vertices, which sometimes helps to regularise operations on objects) In the following two screenshots. The first one indicates the two objects to union. The second one shows the result, with the non-manifold and border edges. Because I often make use of vtkBooleanOperationPolyDataFilter, the problem is really annoying for me. That's why I thought to seek help in the community. Any ideas of how to handle this? Cleaning the surface (set flag cleanOutputSurface=True in my code) does improve the situation in some cases - but it cannot be that one has to do that extra cleanup step after every such basic operation, right?! By the way: this problem has been reported already: see here and here reproduced_problem.py . Thanks for any inputs from your side. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by http://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 ------------------------------ Subject: Digest Footer _______________________________________________ Powered by http://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 ------------------------------ End of vtkusers Digest, Vol 145, Issue 16 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Mon May 16 13:46:40 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Mon, 16 May 2016 13:46:40 -0400 Subject: [vtkusers] vtkusers Digest, Vol 145, Issue 16 In-Reply-To: <1e47db7c-2eda-482d-a8bf-63a944c74e27@me.com> References: <1e47db7c-2eda-482d-a8bf-63a944c74e27@me.com> Message-ID: Rick, You don't have to do a deep copy for this case. Deep copy is for when you plan to modify one and don't want the other to keep the modifications. Shallow Copy should work fine in this case. You could also do something like this: bool myFunction(vtkSmartPointer & output) { vtkSmartPointer myImage = ...; ... output = myImage; // This should change output to point to the image in myImage incrementing the reference count to myImage's image and avoid any need to copy. return true; } You would call it like this: vtkSmartPointer image; // Use default ctor that doesn't allocate bool result = myFunction(image); To the best of my knowledge, the above should work. HTH, Shawn On Mon, May 16, 2016 at 1:38 PM, Richard Frank wrote: > Sorry for the blank reply previous. > > The Tutorial is great but I don't see an example of the case I'm talking > about. > > That is, returning a pointer to the caller in such a way that the > caller doesn't have to think about whether they need to explicitly delete. > > so, given a function or method with a signature already returning a bool, > and other code already dependent on that return type, I want to return the > result of reading a file, for instance: > > bool ReadAnImageFile(vtkSmartPointer & theImageRead) > { > vtkSmartPointer reader = > vtkSmartPointer::New9); > > reader->SetFileName("Something.png"); > reader->Update(); > > vtkImageData * image = reader->GetOutput(); How to get image into > theImageRead? > > // This seems to work > > theImageRead->DeepCopy(image); > > // but if it's really doing a deep copy and I have a large 3D .mha file or > something > // it will be slow.....is there a better way? > } > > > Thanks > > Rick > > On May 16, 2016, at 12:00 PM, vtkusers-request at vtk.org wrote: > > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://public.kitware.com/mailman/listinfo/vtkusers > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. why does the generated 3D model have borken part? (Liu_tj) > 2. Re: SmartPointer reference? (Dan Lipsa) > 3. Re: vtkBooleanOperationPolyDataFilter creates non-manifold > edges (Andras Lasso) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 16 May 2016 21:11:33 +0800 (CST) > From: Liu_tj > To: vtkusers > Subject: [vtkusers] why does the generated 3D model have borken part? > Message-ID: <7543d5b6.11.154b9b16f2f.Coremail.tjlp at netease.com> > Content-Type: text/plain; charset="utf-8" > > Hi, > > I used vtkMarchingCubes, vtkDecimatePro and vtkSmoothPolyDataFilter to > generate 3D model for DICOM image. When it is firstly generated, the 3D > model is fine (See the attached First.jpg). However, when I store it to STL > file and use STLReader to read the STL file and display in vtkRenderWindow, > it shows broken part (See loading.jpg). Why? > > Thanks > Liu Peng > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20160516/b1f7bc02/attachment-0001.html> > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: First.jpg > Type: image/jpeg > Size: 36205 bytes > Desc: not available > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20160516/b1f7bc02/attachment-0002.jpg> > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: loading.jpg > Type: image/jpeg > Size: 24157 bytes > Desc: not available > URL: < > http://public.kitware.com/pipermail/vtkusers/attachments/20160516/b1f7bc02/attachment-0003.jpg> > > ------------------------------ > > Message: 2 > Date: Mon, 16 May 2016 10:18:30 -0400 > From: Dan Lipsa > To: Richard Frank > Cc: VTK Users > Subject: Re: [vtkusers] SmartPointer reference? > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Does this help? > http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers > > What exactly is the problem you are seeing? > Dan > > > On Fri, May 13, 2016 at 7:22 PM, Richard Frank wrote: > > > Hi, > > > Is it possible to return a smart pointer by reference? > > > I'd like to return an image as a parameter, rather than a return type but > > nothing seems to be happy. > > > for instance > > > bool SomeFunction(vtkSmartPointer & outImage) > > { > > vtkSmartPointer r = > > vtkSmartPointer::New(); > > r->SetFileName("Path"); > > r->Update(); > > // What next? > > > return true; > > } > > > I though Take was a possible choice > > > outImage = vtkSmartPointer::Take(r->GetOutput()); > > > but no happiness there. > > > Any solution? > > > Thanks > > > Rick > > > > > _______________________________________________ > > Powered by http://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: < > http://public.kitware.com/pipermail/vtkusers/attachments/20160516/2787da74/attachment-0001.html> > > ------------------------------ > > Message: 3 > Date: Mon, 16 May 2016 15:14:15 +0000 > From: Andras Lasso > To: normanius , "vtkusers at vtk.org" > Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter creates > non-manifold edges > Message-ID: > < > DM2PR07MB350120A5448638CA86B2746D8770 at DM2PR07MB350.namprd07.prod.outlook.com > > > > Content-Type: text/plain; charset="us-ascii" > > but it cannot be that one has to do that extra cleanup step after every > such basic operation, right?! > > > Performing Boolean operation on meshes may sound easy but is an extremely > difficult problem. It would be nice if VTK had a solution that worked > reliably, so it's great that you submit reports on specific problems you > find. > > However, I'm not sure if there is anybody who could work on fixing these > issues in the near future. So, if you cannot fix them yourself then most > likely your best bet is to work around the problem by converting all meshes > to images, combining them, and regenerating a mesh. > > Andras > > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of normanius > Sent: May 15, 2016 4:54 AM > To: vtkusers at vtk.org > Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold > edges > > Hi all > > This is an issue that has been raised already. But I wanted to ask whether > there is a workaround or whether it actually is a bug that has been > properly reported. > > Find attached sample code which reproduces the problem: If I union two > overlapping, watertight objects A and B, the resulting object C very likely > won't be watertight (it shows border edges and non-manifold edges). > > The sample code in essence does this: > - create cylinder A as a vtk.vtkCylinderSource > - create sphere B as a vtk.vtkSphereSource > - extract triangles from A and B > - create union C with vtk.vtkBooleanOperationPolyDataFilter() with > SetOperationToUnion() > > The problem occurs also, if I use other objects than cylinders or spheres. > The problem occurs also, if I "clean/condition" the surfaces of A and B > before calculating the union. (I tried vtkCleanPolyData(), > vtkFillHolesFilter() and addition of small noise on the vertices, which > sometimes helps to regularise operations on objects) > > In the following two screenshots. The first one indicates the two objects > to union. The second one shows the result, with the non-manifold and border > edges. > > > > > Because I often make use of vtkBooleanOperationPolyDataFilter, the problem > is really annoying for me. That's why I thought to seek help in the > community. Any ideas of how to handle this? > Cleaning the surface (set flag cleanOutputSurface=True in my code) does > improve the situation in some cases - but it cannot be that one has to do > that extra cleanup step after every such basic operation, right?! > > By the way: this problem has been reported already: see here < > http://vtk.1045678.n5.nabble.com/Non-manifold-triangles-after-running-vtkBooleanOperationPolydataFilter-td5713964.html> > and here > < > http://vtk.1045678.n5.nabble.com/Broken-surfaces-for-vtkBooleanOperationPolyDataFilter-Bug-td5735413.html> > reproduced_problem.py > . > > Thanks for any inputs from your side. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by http://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 > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Powered by http://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 > > ------------------------------ > > End of vtkusers Digest, Vol 145, Issue 16 > ***************************************** > > > _______________________________________________ > 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 bill.lorensen at gmail.com Mon May 16 13:47:53 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 16 May 2016 13:47:53 -0400 Subject: [vtkusers] vtkusers Digest, Vol 145, Issue 16 In-Reply-To: <1e47db7c-2eda-482d-a8bf-63a944c74e27@me.com> References: <1e47db7c-2eda-482d-a8bf-63a944c74e27@me.com> Message-ID: Look at Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx You can just theImageRead = reader->GetOutput(); On Mon, May 16, 2016 at 1:38 PM, Richard Frank wrote: > Sorry for the blank reply previous. > > The Tutorial is great but I don't see an example of the case I'm talking > about. > > That is, returning a pointer to the caller in such a way that the caller > doesn't have to think about whether they need to explicitly delete. > > so, given a function or method with a signature already returning a bool, > and other code already dependent on that return type, I want to return the > result of reading a file, for instance: > > bool ReadAnImageFile(vtkSmartPointer & theImageRead) > { > vtkSmartPointer reader = > vtkSmartPointer::New9); > > reader->SetFileName("Something.png"); > reader->Update(); > > vtkImageData * image = reader->GetOutput(); How to get image into > theImageRead? > > // This seems to work > > theImageRead->DeepCopy(image); > > // but if it's really doing a deep copy and I have a large 3D .mha file or > something > // it will be slow.....is there a better way? > } > > > Thanks > > Rick > > On May 16, 2016, at 12:00 PM, vtkusers-request at vtk.org wrote: > > Send vtkusers mailing list submissions to > vtkusers at vtk.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://public.kitware.com/mailman/listinfo/vtkusers > or, via email, send a message with subject or body 'help' to > vtkusers-request at vtk.org > > You can reach the person managing the list at > vtkusers-owner at vtk.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of vtkusers digest..." > > > Today's Topics: > > 1. why does the generated 3D model have borken part? (Liu_tj) > 2. Re: SmartPointer reference? (Dan Lipsa) > 3. Re: vtkBooleanOperationPolyDataFilter creates non-manifold > edges (Andras Lasso) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 16 May 2016 21:11:33 +0800 (CST) > From: Liu_tj > To: vtkusers > Subject: [vtkusers] why does the generated 3D model have borken part? > Message-ID: <7543d5b6.11.154b9b16f2f.Coremail.tjlp at netease.com> > Content-Type: text/plain; charset="utf-8" > > Hi, > > I used vtkMarchingCubes, vtkDecimatePro and vtkSmoothPolyDataFilter to > generate 3D model for DICOM image. When it is firstly generated, the 3D > model is fine (See the attached First.jpg). However, when I store it to STL > file and use STLReader to read the STL file and display in vtkRenderWindow, > it shows broken part (See loading.jpg). Why? > > Thanks > Liu Peng > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: First.jpg > Type: image/jpeg > Size: 36205 bytes > Desc: not available > URL: > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: loading.jpg > Type: image/jpeg > Size: 24157 bytes > Desc: not available > URL: > > > ------------------------------ > > Message: 2 > Date: Mon, 16 May 2016 10:18:30 -0400 > From: Dan Lipsa > To: Richard Frank > Cc: VTK Users > Subject: Re: [vtkusers] SmartPointer reference? > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Does this help? > http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers > > What exactly is the problem you are seeing? > Dan > > > On Fri, May 13, 2016 at 7:22 PM, Richard Frank wrote: > > > Hi, > > > Is it possible to return a smart pointer by reference? > > > I'd like to return an image as a parameter, rather than a return type but > > nothing seems to be happy. > > > for instance > > > bool SomeFunction(vtkSmartPointer & outImage) > > { > > vtkSmartPointer r = > > vtkSmartPointer::New(); > > r->SetFileName("Path"); > > r->Update(); > > // What next? > > > return true; > > } > > > I though Take was a possible choice > > > outImage = vtkSmartPointer::Take(r->GetOutput()); > > > but no happiness there. > > > Any solution? > > > Thanks > > > Rick > > > > > _______________________________________________ > > Powered by http://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: > > > ------------------------------ > > Message: 3 > Date: Mon, 16 May 2016 15:14:15 +0000 > From: Andras Lasso > To: normanius , "vtkusers at vtk.org" > Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter creates > non-manifold edges > Message-ID: > > > > Content-Type: text/plain; charset="us-ascii" > > but it cannot be that one has to do that extra cleanup step after every such > basic operation, right?! > > > Performing Boolean operation on meshes may sound easy but is an extremely > difficult problem. It would be nice if VTK had a solution that worked > reliably, so it's great that you submit reports on specific problems you > find. > > However, I'm not sure if there is anybody who could work on fixing these > issues in the near future. So, if you cannot fix them yourself then most > likely your best bet is to work around the problem by converting all meshes > to images, combining them, and regenerating a mesh. > > Andras > > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of normanius > Sent: May 15, 2016 4:54 AM > To: vtkusers at vtk.org > Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold > edges > > Hi all > > This is an issue that has been raised already. But I wanted to ask whether > there is a workaround or whether it actually is a bug that has been properly > reported. > > Find attached sample code which reproduces the problem: If I union two > overlapping, watertight objects A and B, the resulting object C very likely > won't be watertight (it shows border edges and non-manifold edges). > > The sample code in essence does this: > - create cylinder A as a vtk.vtkCylinderSource > - create sphere B as a vtk.vtkSphereSource > - extract triangles from A and B > - create union C with vtk.vtkBooleanOperationPolyDataFilter() with > SetOperationToUnion() > > The problem occurs also, if I use other objects than cylinders or spheres. > The problem occurs also, if I "clean/condition" the surfaces of A and B > before calculating the union. (I tried vtkCleanPolyData(), > vtkFillHolesFilter() and addition of small noise on the vertices, which > sometimes helps to regularise operations on objects) > > In the following two screenshots. The first one indicates the two objects to > union. The second one shows the result, with the non-manifold and border > edges. > > > > > Because I often make use of vtkBooleanOperationPolyDataFilter, the problem > is really annoying for me. That's why I thought to seek help in the > community. Any ideas of how to handle this? > Cleaning the surface (set flag cleanOutputSurface=True in my code) does > improve the situation in some cases - but it cannot be that one has to do > that extra cleanup step after every such basic operation, right?! > > By the way: this problem has been reported already: see here > > and here > > reproduced_problem.py > . > > Thanks for any inputs from your side. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by http://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 > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Powered by http://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 > > ------------------------------ > > End of vtkusers Digest, Vol 145, Issue 16 > ***************************************** > > > _______________________________________________ > 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 sujin.philip at kitware.com Mon May 16 13:55:43 2016 From: sujin.philip at kitware.com (Sujin Philip) Date: Mon, 16 May 2016 13:55:43 -0400 Subject: [vtkusers] confused with vtkProbeFilter In-Reply-To: <57366703.8060707@polytechnique.edu> References: <5735FDE4.7030105@polytechnique.edu> <57366703.8060707@polytechnique.edu> Message-ID: Hi Martin, Attached is the modified script that I ran. This is the output of the script: pointdata 1 9 (0.0,) (0.0,) (0.0,) (0.0,) (2.0,) (0.0,) (0.0,) (0.0,) (0.0,) celldata 1 9 (0.0,) (0.0,) (0.0,) (0.0,) (2.0,) (0.0,) (0.0,) (0.0,) (0.0,) vtkValidPointMask 1 9 (0.0,) (0.0,) (0.0,) (0.0,) (1.0,) (0.0,) (0.0,) (0.0,) (0.0,) The results look correct. Is this not the behaviour you are getting? Let me know if you still have issues. Thanks Sujin On Fri, May 13, 2016 at 7:45 PM, Martin Genet < martin.genet at polytechnique.edu> wrote: > Thanks for your help, Sujin. > > What do you mean exactly by "your code works for me"? I sat the arrays > names but am still getting the same behavior: the code runs fine, but I > can't find the interpolated data. Do you know where it is? Thanks again. > > Martin > > > On 13/05/2016 18:53, Sujin Philip wrote: > > Hi Martin, > > You need to set names for the point and cell data arrays. > farray.SetName("pointdata") and farray.SetName("celldata") > > after doing that your code works for me. > > -Sujin > > > On Fri, May 13, 2016 at 12:16 PM, Martin Genet < > martin.genet at polytechnique.edu> wrote: > >> Dear everyone: >> >> Sorry for the triviality, but I'm getting confused with vtkProbeFilter: >> trying to probe an image with a mesh (not the opposite: I need the mesh >> data interpolated onto the image points), but can't get it to work. >> >> Consider the following code: >> >>> import numpy >>> import vtk >>> >>> image = vtk.vtkImageData() >>> image.SetDimensions([3, 3, 1]) >>> image.SetSpacing(1./numpy.array(image.GetDimensions())) >>> image.SetOrigin(numpy.array(image.GetSpacing())/2) >>> >>> points = vtk.vtkPoints() >>> points.InsertNextPoint([1./4, 1./4, 2./4]) >>> points.InsertNextPoint([3./4, 1./4, 2./4]) >>> points.InsertNextPoint([3./4, 3./4, 2./4]) >>> points.InsertNextPoint([1./4, 3./4, 2./4]) >>> >>> cell = vtk.vtkQuad() >>> cell.GetPointIds().SetId(0, 0) >>> cell.GetPointIds().SetId(1, 1) >>> cell.GetPointIds().SetId(2, 2) >>> cell.GetPointIds().SetId(3, 3) >>> >>> cell_array = vtk.vtkCellArray() >>> cell_array.InsertNextCell(cell) >>> >>> ugrid = vtk.vtkUnstructuredGrid() >>> ugrid.SetPoints(points) >>> ugrid.SetCells(vtk.VTK_QUAD, cell_array) >>> >>> farray = vtk.vtkFloatArray() >>> farray.SetNumberOfComponents(1) >>> farray.SetNumberOfTuples(1) >>> farray.SetTuple1(0, 2.) >>> ugrid.GetCellData().AddArray(farray) >>> >>> farray = vtk.vtkFloatArray() >>> farray.SetNumberOfComponents(1) >>> farray.SetNumberOfTuples(4) >>> farray.SetTuple1(0, 2.) >>> farray.SetTuple1(2, 2.) >>> farray.SetTuple1(3, 2.) >>> farray.SetTuple1(4, 2.) >>> ugrid.GetPointData().AddArray(farray) >>> >>> probe = vtk.vtkProbeFilter() >>> if (vtk.vtkVersion.GetVTKMajorVersion() >= 6): >>> probe.SetInputData(image) >>> probe.SetSourceData(ugrid) >>> else: >>> probe.SetInput(image) >>> probe.SetSource(ugrid) >>> probe.Update() >>> probed_image = probe.GetOutput() >>> >> >> Problem is: probed_image contains only one array, called >> vtkValidPointMask, but no interpolated data. >> >> If I do: >> >>> probed_scalars = >>> probed_image.GetPointData().GetArray("vtkValidPointMask") >>> for k_voxels in xrange(probed_scalars.GetNumberOfTuples()): print >>> probed_scalars.GetTuple1(k_voxels) >>> >> I'm getting: >> >>> 0.0 >>> 0.0 >>> 0.0 >>> 0.0 >>> 1.0 >>> 0.0 >>> 0.0 >>> 0.0 >>> 0.0 >>> >> So I'm guessing the filter is able to figure out which image point lies >> within the mesh and which does not, but I can't find the interpolated data? >> Any help would be super appreciated. Thanks! >> >> Martin >> >> _______________________________________________ >> 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: test.py Type: text/x-python Size: 1570 bytes Desc: not available URL: From rickfrank at me.com Mon May 16 15:17:26 2016 From: rickfrank at me.com (Richard Frank) Date: Mon, 16 May 2016 15:17:26 -0400 Subject: [vtkusers] vtkusers Digest, Vol 145, Issue 16 In-Reply-To: References: <1e47db7c-2eda-482d-a8bf-63a944c74e27@me.com> Message-ID: Thanks I'll try again - coulda sworn I tried those but if those don't work I must have some other issue going on... Rick Frank > On May 16, 2016, at 1:47 PM, Bill Lorensen wrote: > > Look at > Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx > > You can just > theImageRead = reader->GetOutput(); > >> On Mon, May 16, 2016 at 1:38 PM, Richard Frank wrote: >> Sorry for the blank reply previous. >> >> The Tutorial is great but I don't see an example of the case I'm talking >> about. >> >> That is, returning a pointer to the caller in such a way that the caller >> doesn't have to think about whether they need to explicitly delete. >> >> so, given a function or method with a signature already returning a bool, >> and other code already dependent on that return type, I want to return the >> result of reading a file, for instance: >> >> bool ReadAnImageFile(vtkSmartPointer & theImageRead) >> { >> vtkSmartPointer reader = >> vtkSmartPointer::New9); >> >> reader->SetFileName("Something.png"); >> reader->Update(); >> >> vtkImageData * image = reader->GetOutput(); How to get image into >> theImageRead? >> >> // This seems to work >> >> theImageRead->DeepCopy(image); >> >> // but if it's really doing a deep copy and I have a large 3D .mha file or >> something >> // it will be slow.....is there a better way? >> } >> >> >> Thanks >> >> Rick >> >> On May 16, 2016, at 12:00 PM, vtkusers-request at vtk.org wrote: >> >> Send vtkusers mailing list submissions to >> vtkusers at vtk.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://public.kitware.com/mailman/listinfo/vtkusers >> or, via email, send a message with subject or body 'help' to >> vtkusers-request at vtk.org >> >> You can reach the person managing the list at >> vtkusers-owner at vtk.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of vtkusers digest..." >> >> >> Today's Topics: >> >> 1. why does the generated 3D model have borken part? (Liu_tj) >> 2. Re: SmartPointer reference? (Dan Lipsa) >> 3. Re: vtkBooleanOperationPolyDataFilter creates non-manifold >> edges (Andras Lasso) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Mon, 16 May 2016 21:11:33 +0800 (CST) >> From: Liu_tj >> To: vtkusers >> Subject: [vtkusers] why does the generated 3D model have borken part? >> Message-ID: <7543d5b6.11.154b9b16f2f.Coremail.tjlp at netease.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi, >> >> I used vtkMarchingCubes, vtkDecimatePro and vtkSmoothPolyDataFilter to >> generate 3D model for DICOM image. When it is firstly generated, the 3D >> model is fine (See the attached First.jpg). However, when I store it to STL >> file and use STLReader to read the STL file and display in vtkRenderWindow, >> it shows broken part (See loading.jpg). Why? >> >> Thanks >> Liu Peng >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> -------------- next part -------------- >> A non-text attachment was scrubbed... >> Name: First.jpg >> Type: image/jpeg >> Size: 36205 bytes >> Desc: not available >> URL: >> >> -------------- next part -------------- >> A non-text attachment was scrubbed... >> Name: loading.jpg >> Type: image/jpeg >> Size: 24157 bytes >> Desc: not available >> URL: >> >> >> ------------------------------ >> >> Message: 2 >> Date: Mon, 16 May 2016 10:18:30 -0400 >> From: Dan Lipsa >> To: Richard Frank >> Cc: VTK Users >> Subject: Re: [vtkusers] SmartPointer reference? >> Message-ID: >> >> Content-Type: text/plain; charset="utf-8" >> >> Does this help? >> http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers >> >> What exactly is the problem you are seeing? >> Dan >> >> >> On Fri, May 13, 2016 at 7:22 PM, Richard Frank wrote: >> >> >> Hi, >> >> >> Is it possible to return a smart pointer by reference? >> >> >> I'd like to return an image as a parameter, rather than a return type but >> >> nothing seems to be happy. >> >> >> for instance >> >> >> bool SomeFunction(vtkSmartPointer & outImage) >> >> { >> >> vtkSmartPointer r = >> >> vtkSmartPointer::New(); >> >> r->SetFileName("Path"); >> >> r->Update(); >> >> // What next? >> >> >> return true; >> >> } >> >> >> I though Take was a possible choice >> >> >> outImage = vtkSmartPointer::Take(r->GetOutput()); >> >> >> but no happiness there. >> >> >> Any solution? >> >> >> Thanks >> >> >> Rick >> >> >> >> >> _______________________________________________ >> >> Powered by http://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: >> >> >> ------------------------------ >> >> Message: 3 >> Date: Mon, 16 May 2016 15:14:15 +0000 >> From: Andras Lasso >> To: normanius , "vtkusers at vtk.org" >> Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter creates >> non-manifold edges >> Message-ID: >> >> >> >> Content-Type: text/plain; charset="us-ascii" >> >> but it cannot be that one has to do that extra cleanup step after every such >> basic operation, right?! >> >> >> Performing Boolean operation on meshes may sound easy but is an extremely >> difficult problem. It would be nice if VTK had a solution that worked >> reliably, so it's great that you submit reports on specific problems you >> find. >> >> However, I'm not sure if there is anybody who could work on fixing these >> issues in the near future. So, if you cannot fix them yourself then most >> likely your best bet is to work around the problem by converting all meshes >> to images, combining them, and regenerating a mesh. >> >> Andras >> >> -----Original Message----- >> From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of normanius >> Sent: May 15, 2016 4:54 AM >> To: vtkusers at vtk.org >> Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold >> edges >> >> Hi all >> >> This is an issue that has been raised already. But I wanted to ask whether >> there is a workaround or whether it actually is a bug that has been properly >> reported. >> >> Find attached sample code which reproduces the problem: If I union two >> overlapping, watertight objects A and B, the resulting object C very likely >> won't be watertight (it shows border edges and non-manifold edges). >> >> The sample code in essence does this: >> - create cylinder A as a vtk.vtkCylinderSource >> - create sphere B as a vtk.vtkSphereSource >> - extract triangles from A and B >> - create union C with vtk.vtkBooleanOperationPolyDataFilter() with >> SetOperationToUnion() >> >> The problem occurs also, if I use other objects than cylinders or spheres. >> The problem occurs also, if I "clean/condition" the surfaces of A and B >> before calculating the union. (I tried vtkCleanPolyData(), >> vtkFillHolesFilter() and addition of small noise on the vertices, which >> sometimes helps to regularise operations on objects) >> >> In the following two screenshots. The first one indicates the two objects to >> union. The second one shows the result, with the non-manifold and border >> edges. >> >> >> >> >> Because I often make use of vtkBooleanOperationPolyDataFilter, the problem >> is really annoying for me. That's why I thought to seek help in the >> community. Any ideas of how to handle this? >> Cleaning the surface (set flag cleanOutputSurface=True in my code) does >> improve the situation in some cases - but it cannot be that one has to do >> that extra cleanup step after every such basic operation, right?! >> >> By the way: this problem has been reported already: see here >> >> and here >> >> reproduced_problem.py >> . >> >> Thanks for any inputs from your side. >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by http://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 >> >> >> ------------------------------ >> >> Subject: Digest Footer >> >> _______________________________________________ >> Powered by http://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 >> >> ------------------------------ >> >> End of vtkusers Digest, Vol 145, Issue 16 >> ***************************************** >> >> >> _______________________________________________ >> 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 cory.quammen at kitware.com Mon May 16 15:38:04 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 16 May 2016 21:38:04 +0200 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges In-Reply-To: References: <1463302418839-5738088.post@n5.nabble.com> Message-ID: Normanius, On Mon, May 16, 2016 at 5:14 PM, Andras Lasso wrote: >> but it cannot be that one has to do that extra cleanup step after every such basic operation, right?! > > Performing Boolean operation on meshes may sound easy but is an extremely difficult problem. It would be nice if VTK had a solution that worked reliably, so it's great that you submit reports on specific problems you find. Hear hear. > However, I'm not sure if there is anybody who could work on fixing these issues in the near future. So, if you cannot fix them yourself then most likely your best bet is to work around the problem by converting all meshes to images, combining them, and regenerating a mesh. There is some new work that should improve the boolean operations filter: https://gitlab.kitware.com/vtk/vtk/merge_requests/1336 https://gitlab.kitware.com/vtk/vtk/merge_requests/1272 This should hopefully be merged in the near term. Best regards, Cory > > Andras > > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of normanius > Sent: May 15, 2016 4:54 AM > To: vtkusers at vtk.org > Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges > > Hi all > > This is an issue that has been raised already. But I wanted to ask whether there is a workaround or whether it actually is a bug that has been properly reported. > > Find attached sample code which reproduces the problem: If I union two overlapping, watertight objects A and B, the resulting object C very likely won't be watertight (it shows border edges and non-manifold edges). > > The sample code in essence does this: > - create cylinder A as a vtk.vtkCylinderSource > - create sphere B as a vtk.vtkSphereSource > - extract triangles from A and B > - create union C with vtk.vtkBooleanOperationPolyDataFilter() with > SetOperationToUnion() > > The problem occurs also, if I use other objects than cylinders or spheres. > The problem occurs also, if I "clean/condition" the surfaces of A and B before calculating the union. (I tried vtkCleanPolyData(), > vtkFillHolesFilter() and addition of small noise on the vertices, which sometimes helps to regularise operations on objects) > > In the following two screenshots. The first one indicates the two objects to union. The second one shows the result, with the non-manifold and border edges. > > > > > Because I often make use of vtkBooleanOperationPolyDataFilter, the problem is really annoying for me. That's why I thought to seek help in the community. Any ideas of how to handle this? > Cleaning the surface (set flag cleanOutputSurface=True in my code) does improve the situation in some cases - but it cannot be that one has to do that extra cleanup step after every such basic operation, right?! > > By the way: this problem has been reported already: see here > and here > > reproduced_problem.py > . > > Thanks for any inputs from your side. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088.html > Sent from the VTK - Users mailing list archive at Nabble.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 > _______________________________________________ > 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 R&D Engineer Kitware, Inc. From martin.genet at polytechnique.edu Mon May 16 16:07:27 2016 From: martin.genet at polytechnique.edu (Martin Genet) Date: Mon, 16 May 2016 22:07:27 +0200 Subject: [vtkusers] confused with vtkProbeFilter In-Reply-To: References: <5735FDE4.7030105@polytechnique.edu> <57366703.8060707@polytechnique.edu> Message-ID: <573A287F.6010203@polytechnique.edu> Works like a charm?thanks! Martin On 16/05/2016 19:55, Sujin Philip wrote: > Hi Martin, > > Attached is the modified script that I ran. This is the output of the > script: > pointdata 1 9 > (0.0,) (0.0,) (0.0,) (0.0,) (2.0,) (0.0,) (0.0,) (0.0,) (0.0,) > celldata 1 9 > (0.0,) (0.0,) (0.0,) (0.0,) (2.0,) (0.0,) (0.0,) (0.0,) (0.0,) > vtkValidPointMask 1 9 > (0.0,) (0.0,) (0.0,) (0.0,) (1.0,) (0.0,) (0.0,) (0.0,) (0.0,) > > The results look correct. Is this not the behaviour you are getting? > Let me know if you still have issues. > > Thanks > Sujin > > > On Fri, May 13, 2016 at 7:45 PM, Martin Genet > > wrote: > > Thanks for your help, Sujin. > > What do you mean exactly by "your code works for me"? I sat the > arrays names but am still getting the same behavior: the code runs > fine, but I can't find the interpolated data. Do you know where it > is? Thanks again. > > Martin > > > On 13/05/2016 18:53, Sujin Philip wrote: >> Hi Martin, >> >> You need to set names for the point and cell data arrays. >> farray.SetName("pointdata") and farray.SetName("celldata") >> >> after doing that your code works for me. >> >> -Sujin >> >> >> On Fri, May 13, 2016 at 12:16 PM, Martin Genet >> > > wrote: >> >> Dear everyone: >> >> Sorry for the triviality, but I'm getting confused with >> vtkProbeFilter: trying to probe an image with a mesh (not the >> opposite: I need the mesh data interpolated onto the image >> points), but can't get it to work. >> >> Consider the following code: >> >> import numpy >> import vtk >> >> image = vtk.vtkImageData() >> image.SetDimensions([3, 3, 1]) >> image.SetSpacing(1./numpy.array(image.GetDimensions())) >> image.SetOrigin(numpy.array(image.GetSpacing())/2) >> >> points = vtk.vtkPoints() >> points.InsertNextPoint([1./4, 1./4, 2./4]) >> points.InsertNextPoint([3./4, 1./4, 2./4]) >> points.InsertNextPoint([3./4, 3./4, 2./4]) >> points.InsertNextPoint([1./4, 3./4, 2./4]) >> >> cell = vtk.vtkQuad() >> cell.GetPointIds().SetId(0, 0) >> cell.GetPointIds().SetId(1, 1) >> cell.GetPointIds().SetId(2, 2) >> cell.GetPointIds().SetId(3, 3) >> >> cell_array = vtk.vtkCellArray() >> cell_array.InsertNextCell(cell) >> >> ugrid = vtk.vtkUnstructuredGrid() >> ugrid.SetPoints(points) >> ugrid.SetCells(vtk.VTK_QUAD, cell_array) >> >> farray = vtk.vtkFloatArray() >> farray.SetNumberOfComponents(1) >> farray.SetNumberOfTuples(1) >> farray.SetTuple1(0, 2.) >> ugrid.GetCellData().AddArray(farray) >> >> farray = vtk.vtkFloatArray() >> farray.SetNumberOfComponents(1) >> farray.SetNumberOfTuples(4) >> farray.SetTuple1(0, 2.) >> farray.SetTuple1(2, 2.) >> farray.SetTuple1(3, 2.) >> farray.SetTuple1(4, 2.) >> ugrid.GetPointData().AddArray(farray) >> >> probe = vtk.vtkProbeFilter() >> if (vtk.vtkVersion.GetVTKMajorVersion() >= 6): >> probe.SetInputData(image) >> probe.SetSourceData(ugrid) >> else: >> probe.SetInput(image) >> probe.SetSource(ugrid) >> probe.Update() >> probed_image = probe.GetOutput() >> >> >> Problem is: probed_image contains only one array, called >> vtkValidPointMask, but no interpolated data. >> >> If I do: >> >> probed_scalars = >> probed_image.GetPointData().GetArray("vtkValidPointMask") >> for k_voxels in >> xrange(probed_scalars.GetNumberOfTuples()): print >> probed_scalars.GetTuple1(k_voxels) >> >> I'm getting: >> >> 0.0 >> 0.0 >> 0.0 >> 0.0 >> 1.0 >> 0.0 >> 0.0 >> 0.0 >> 0.0 >> >> So I'm guessing the filter is able to figure out which image >> point lies within the mesh and which does not, but I can't >> find the interpolated data? Any help would be super >> appreciated. Thanks! >> >> Martin >> >> _______________________________________________ >> 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 juch at zhaw.ch Mon May 16 18:26:27 2016 From: juch at zhaw.ch (normanius) Date: Mon, 16 May 2016 15:26:27 -0700 (MST) Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges In-Reply-To: References: <1463302418839-5738088.post@n5.nabble.com> Message-ID: <1463437587857-5738108.post@n5.nabble.com> Hi Andras, Hi Cory Thanks for your answers. @Andras: Do you mean poly-data to image conversion like this ? Haven't ever used image data in vtk. Could you briefly sketch how to apply boolean operations on (3d) image data and how to generate a mesh from that. I guess this example is a starting point, right? @Cory: Wow, I can't wait for vtkBooleanOperationPolyDataFilter2. I checked out that branch updega2/vtk-new_intersection, but could not see any difference with the output. Is there something special I need to do to enable Adam's new filter? (Because there is no class named vtkBooleanOperationPolyDataFilter2, I assumed that the former vtkBooleanOperationPolyDataFilter was re-written.) As an alternative to vtkBooleanOperationPolyDataFilter: I sometimes use vtkImplicitFunction (vtkCylinder, vtkSphere, etc.), combine them with vtkImplicitBoolean and sample then with vtkSampleFunction. This is not always practicable however, because one gets visible artefacts on the borders, and also the meshes get quite large. (The work-around for the latter is to apply triangle decimation, see vtkDecimatePro). -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088p5738108.html Sent from the VTK - Users mailing list archive at Nabble.com. From lasso at queensu.ca Mon May 16 19:31:52 2016 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 16 May 2016 23:31:52 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges In-Reply-To: <1463437587857-5738108.post@n5.nabble.com> References: <1463302418839-5738088.post@n5.nabble.com> , <1463437587857-5738108.post@n5.nabble.com> Message-ID: Yes, those examples are good starting points. You can use image math filter to compute min/max (intersection/union) and create mesh from image using contour filter. Andras From: normanius Sent: May 16, 2016 18:27 To: vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges Hi Andras, Hi Cory Thanks for your answers. @Andras: Do you mean poly-data to image conversion like this ? Haven't ever used image data in vtk. Could you briefly sketch how to apply boolean operations on (3d) image data and how to generate a mesh from that. I guess this example is a starting point, right? @Cory: Wow, I can't wait for vtkBooleanOperationPolyDataFilter2. I checked out that branch updega2/vtk-new_intersection, but could not see any difference with the output. Is there something special I need to do to enable Adam's new filter? (Because there is no class named vtkBooleanOperationPolyDataFilter2, I assumed that the former vtkBooleanOperationPolyDataFilter was re-written.) As an alternative to vtkBooleanOperationPolyDataFilter: I sometimes use vtkImplicitFunction (vtkCylinder, vtkSphere, etc.), combine them with vtkImplicitBoolean and sample then with vtkSampleFunction. This is not always practicable however, because one gets visible artefacts on the borders, and also the meshes get quite large. (The work-around for the latter is to apply triangle decimation, see vtkDecimatePro). -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088p5738108.html Sent from the VTK - Users mailing list archive at Nabble.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 nicksnels at yahoo.com Tue May 17 03:00:09 2016 From: nicksnels at yahoo.com (Snels Nick) Date: Tue, 17 May 2016 07:00:09 +0000 (UTC) Subject: [vtkusers] How to get VTK 7 working with Qt 5.6 References: <1392743972.4039711.1463468409794.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1392743972.4039711.1463468409794.JavaMail.yahoo@mail.yahoo.com> Hi, I?m trying to generate a VTK7 build for Visual Studio 2015 64bit using the latest version of CMake. I am following the instructions on http://www.vtk.org/Wiki/VTK/Configure_and_Build . I can generate using the default options. However I need VTK to work with Qt 5.6 . So I have checked VTK_Group_Qt and added the entry CMAKE_PREFIX_PATH and set it to C:/Qt/5.6/msvc2015_64 When I click generate, I get an error: CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindQt4.cmake:1326 (message): Found unsuitable Qt version "5.6.0" from C:/Qt/5.6/msvc2015_64/bin/qmake.exe, this code requires Qt 4.x Call Stack (most recent call first): GUISupport/Qt/CMakeLists.txt:71 (find_package) What am I doing wrong? Thanks. Kind regards, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue May 17 03:04:15 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 17 May 2016 09:04:15 +0200 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges In-Reply-To: <1463437587857-5738108.post@n5.nabble.com> References: <1463302418839-5738088.post@n5.nabble.com> <1463437587857-5738108.post@n5.nabble.com> Message-ID: > @Cory: Wow, I can't wait for vtkBooleanOperationPolyDataFilter2. I checked > out that branch updega2/vtk-new_intersection, but could not see any > difference with the output. Is there something special I need to do to > enable Adam's new filter? (Because there is no class named > vtkBooleanOperationPolyDataFilter2, I assumed that the former > vtkBooleanOperationPolyDataFilter was re-written.) The vtkBooleanOperationPolyDataFilter2 class is in the second merge request I listed. It's a little messy right now because I asked Adam to split out the changes to the intersection filter and the boolean operation filter. If you try the second merge request branch, you should hopefully see improved results from vtkBooleanOperationPolyDataFilter2. -- Cory Quammen R&D Engineer Kitware, Inc. From richard.j.brown at live.co.uk Tue May 17 03:14:06 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Tue, 17 May 2016 09:14:06 +0200 Subject: [vtkusers] How to get VTK 7 working with Qt 5.6 In-Reply-To: <1392743972.4039711.1463468409794.JavaMail.yahoo@mail.yahoo.com> References: <1392743972.4039711.1463468409794.JavaMail.yahoo.ref@mail.yahoo.com> <1392743972.4039711.1463468409794.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Nick, I think changing VTK_QT_VERSION to 5 should solve your problem. Regards, Richard > On 17 May 2016, at 09:00, Snels Nick via vtkusers wrote: > > Hi, > > I?m trying to generate a VTK7 build for Visual Studio 2015 64bit using the > latest version of CMake. I am following the instructions on > http://www.vtk.org/Wiki/VTK/Configure_and_Build . > > I can generate using the default options. However I need VTK to work with Qt > 5.6 . So I have checked VTK_Group_Qt and added the entry CMAKE_PREFIX_PATH > and set it to C:/Qt/5.6/msvc2015_64 > > When I click generate, I get an error: > > CMake Error at C:/Program Files > (x86)/CMake/share/cmake-3.5/Modules/FindQt4.cmake:1326 (message): > Found unsuitable Qt version "5.6.0" from > C:/Qt/5.6/msvc2015_64/bin/qmake.exe, this code requires Qt 4.x > Call Stack (most recent call first): > GUISupport/Qt/CMakeLists.txt:71 (find_package) > > What am I doing wrong? Thanks. > > Kind regards, > > 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 juch at zhaw.ch Tue May 17 05:47:57 2016 From: juch at zhaw.ch (normanius) Date: Tue, 17 May 2016 02:47:57 -0700 (MST) Subject: [vtkusers] vtkBooleanOperationPolyDataFilter creates non-manifold edges In-Reply-To: References: <1463302418839-5738088.post@n5.nabble.com> <1463437587857-5738108.post@n5.nabble.com> Message-ID: <1463478477274-5738113.post@n5.nabble.com> Hey Cory, Give that guy a throne! Adam's work does solve my problem. Hurray hurray! :))) If I switch to that other branch (updega2/vtk-boolean_retry) and change vtkBooleanOperation() to vtkBooleanOperation2() I don't get any non-manifold edges, and also the border-edges seem to make sense now (that vtkBooleanOperation messed up completely). One issue I noticed after applying boolean ops consecutively: while all expected borders are returned, there is one extra border showing up for which I don't have any interpretation. I'll let you know when I notice any other issues with that new version. For which release roughly do you think vtkBooleanOperation2 will be available? And a big thanks to Adam and everyone else involved in this fix. :))) default_surface.png default_borders.png -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-creates-non-manifold-edges-tp5738088p5738113.html Sent from the VTK - Users mailing list archive at Nabble.com. From black4online at yahoo.com Tue May 17 07:54:53 2016 From: black4online at yahoo.com (max black) Date: Tue, 17 May 2016 11:54:53 +0000 (UTC) Subject: [vtkusers] Medical images References: <1230186171.4193949.1463486093899.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1230186171.4193949.1463486093899.JavaMail.yahoo@mail.yahoo.com> Hi there I new in VTK but I have a good programming experience in C++ , I am trying to load some CT scan and get a 3d model from it like medical example 1,2,3,4 , can any one point a tutorial to do this , or how I can modify the code to read the image slices I have. any help will be much appreciated.?Thanks Ahmad ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.wormser at gmx.de Tue May 17 07:59:18 2016 From: max.wormser at gmx.de (mwormser) Date: Tue, 17 May 2016 04:59:18 -0700 (MST) Subject: [vtkusers] Change rotation of vtkTubeFilter Message-ID: <1463486358253-5738115.post@n5.nabble.com> I found that using vtkTubeFilter always predetermines a certain orientation for the resulting tube. Using a 4-sided tube the edges align with the coordinate axes. Is there a way to rotate the tubes? If I change the DefaultNormal values all it does is twist the tubes and distort them. Any help is appreciated, thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Change-rotation-of-vtkTubeFilter-tp5738115.html Sent from the VTK - Users mailing list archive at Nabble.com. From dan.lipsa at kitware.com Tue May 17 10:56:51 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Tue, 17 May 2016 10:56:51 -0400 Subject: [vtkusers] Medical images In-Reply-To: <1230186171.4193949.1463486093899.JavaMail.yahoo@mail.yahoo.com> References: <1230186171.4193949.1463486093899.JavaMail.yahoo.ref@mail.yahoo.com> <1230186171.4193949.1463486093899.JavaMail.yahoo@mail.yahoo.com> Message-ID: This is an older tutorial using TCL I found useful some years ago. It needs porting to the current VTK though. http://www.crd.ge.com/esl/cgsp/projects/makevw/#creatingmodels On Tue, May 17, 2016 at 7:54 AM, max black via vtkusers wrote: > Hi there > I new in VTK but I have a good programming experience in C++ , I am trying > to load some CT scan and get a 3d model from it like medical example > 1,2,3,4 , can any one point a tutorial to do this , or how I can modify the > code to read the image slices I have. any help will be much appreciated. > > Thanks > Ahmad > > _______________________________________________ > 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 info at import-ev.com Tue May 17 21:02:53 2016 From: info at import-ev.com (Import EV) Date: Wed, 18 May 2016 10:02:53 +0900 Subject: [vtkusers] MPR (multi-planar reconstruction) for iOS Message-ID: <001d01d1b0a1$02445170$06ccf450$@import-ev.com> Hello, I am using VTK to create volume rendering image from DICOM files for an iOS app. Now I have volume rendering image on an iPhone display and I would like to create MPR (multi-planar reconstruction) from this image. I do not know if such a VTK function is available for iOS. Is it available? If yes, how? It would be highly appreciated if anyone shares the actual codes with me. Thanks! ----- Import EV Corp. ----- From patriciop at gmail.com Wed May 18 00:10:35 2016 From: patriciop at gmail.com (Patricio Palma C.) Date: Wed, 18 May 2016 00:10:35 -0400 Subject: [vtkusers] Fwd: Qt Events example crashes with VTK 6.3 OpenGL2 In-Reply-To: References: Message-ID: Hello I'm using the Events example provided in VTK sources (Examples/GUI/Qt/) using VTK 6.3 with OpenGL2 and Qt 5.6 by using QVTKWidget. However the resulting application is unstable and crashes most of the times either in X11lib or in MesaLib. This is the GDB backtrace gdb) bt #0 0x00002aaab32f8d4e in XGetWindowAttributes () from /usr/lib64/libX11.so.6 #1 0x00002aaaaee2ee94 in XMesaCreateWindowBuffer (v=0x7c20c0, w=69206033) at src/gallium/state_trackers/glx/xlib/xm_api.c:996 #2 0x00002aaaaee32ee4 in glXMakeContextCurrent (dpy=0x7b6ec0, draw=69206033, read=69206033, ctx=0x69b720) at src/gallium/state_trackers/glx/xlib/glx_api.c:1196 #3 0x00002aaaad7555cb in vtkXOpenGLRenderWindow::MakeCurrent (this=0x6e0170) at /remote/cl01home/papalma/MyPRJ/vtk-src.63/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:1283 gdb) bt #0 util_format_get_component_bits (component=0, colorspace=UTIL_FORMAT_COLORSPACE_RGB, format=7012467) at src/gallium/auxiliary/util/u_format.h:870 #1 st_visual_to_context_mode (visual=visual at entry=0x7fffffffb050, mode=mode at entry=0x7fffffffaf30) at src/mesa/state_tracker/st_manager.c:358 #2 0x00002aaaaee56955 in st_api_create_context (stapi=, smapi=0x713c60, attribs=0x7fffffffb040, error=0x7fffffffb03c, shared_stctxi=0x0) at src/mesa/state_tracker/st_manager.c:667 #3 0x00002aaaaee2edb4 in XMesaCreateContext (v=0x70a680, share_list=0x0, major ?Does a nybody has any idea ? or suggestion on how to solve this issue ??? Regards -- Patricio Palma Contreras -------------- next part -------------- An HTML attachment was scrubbed... URL: From black4online at yahoo.com Wed May 18 07:13:00 2016 From: black4online at yahoo.com (ahmad28) Date: Wed, 18 May 2016 04:13:00 -0700 (MST) Subject: [vtkusers] why does the generated 3D model have borken part? In-Reply-To: <7543d5b6.11.154b9b16f2f.Coremail.tjlp@netease.com> References: <7543d5b6.11.154b9b16f2f.Coremail.tjlp@netease.com> Message-ID: <1463569980062-5738128.post@n5.nabble.com> HI there just asking I am tiring to create a 3d model form DCOM files and I have been wondering through VTK and Google resource to find some tutorial that can help me untie now I didn't , I am trying to build something like you demonstrate can point some tutorial and documentation help you to generate this code. any help or tip will be much appreciated . I am sorry that I don't help you with your problem . Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/why-does-the-generated-3D-model-have-borken-part-tp5738089p5738128.html Sent from the VTK - Users mailing list archive at Nabble.com. From sean at rogue-research.com Wed May 18 09:27:46 2016 From: sean at rogue-research.com (Sean McBride) Date: Wed, 18 May 2016 09:27:46 -0400 Subject: [vtkusers] Fwd: Qt Events example crashes with VTK 6.3 OpenGL2 In-Reply-To: References: Message-ID: <20160518132746.1488446936@mail.rogue-research.com> On Wed, 18 May 2016 00:10:35 -0400, Patricio Palma C. said: >I'm using the Events example provided in VTK sources (Examples/GUI/Qt/) >using VTK 6.3 with OpenGL2 and Qt 5.6 by using QVTKWidget. However the >resulting application is unstable and crashes most of the times either in >X11lib or in MesaLib. The OpenGL2 backend was experimental (and non-default) in VTK 6. You might try switching to OpenGL1 or to VTK 7. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From tjlp at netease.com Wed May 18 09:55:04 2016 From: tjlp at netease.com (Liu_tj) Date: Wed, 18 May 2016 21:55:04 +0800 (CST) Subject: [vtkusers] why does the generated 3D model have borken part? In-Reply-To: <1463569980062-5738128.post@n5.nabble.com> References: <7543d5b6.11.154b9b16f2f.Coremail.tjlp@netease.com> <1463569980062-5738128.post@n5.nabble.com> Message-ID: <7ecc33d9.1b.154c425fb1d.Coremail.tjlp@netease.com> Hi, I completely understand your pain. When I firstly come to this area, I also have the same problem. So, my experience is trying it again and again, and post your problem to this community. Although you might not get all the answers, you can get some still. For creating 3d model from DICOM files, the example code from VTK is helpful: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Modelling/MarchingCubes. Thanks Liu Peng ?2016-05-18?"ahmad28 via vtkusers" ??? -----????----- ???:"ahmad28 via vtkusers" ????:2016?05?18? ??? ???:"vtkusers" ??:Re: [vtkusers] why does the generated 3D model have borken part? HI there just asking I am tiring to create a 3d model form DCOM files and I have been wondering through VTK and Google resource to find some tutorial that can help me untie now I didn't , I am trying to build something like you demonstrate can point some tutorial and documentation help you to generate this code. any help or tip will be much appreciated . I am sorry that I don't help you with your problem . Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/why-does-the-generated-3D-model-have-borken-part-tp5738089p5738128.html Sent from the VTK - Users mailing list archive at Nabble.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 bastien.kovac at gmail.com Wed May 18 11:12:27 2016 From: bastien.kovac at gmail.com (B.K.) Date: Wed, 18 May 2016 08:12:27 -0700 (MST) Subject: [vtkusers] Scaling issue with vtkContourFilter Message-ID: <1463584347197-5738131.post@n5.nabble.com> Hi everyone, I'm having some issue with the display of quadric functions in VTK. I am developping an application which gives me quadric equations corresponding to an ellipsoid, and I would like to display them (Actually, I'm trying to display the ellipsoids, vtkQuadric seemed like the easiest way since I directly obtain the quadric's coefficients). I'm working in Java, but I think I would be able to understand the logic behind the code in C++ if that's more convenient to you. Here is my code : / // This is where I store my coefficients Matrix q = quadric.getCoefficients(); vtkQuadric quadricVTK = new vtkQuadric(); double[] coeffs = q.getColumnPackedCopy(); quadricVTK.SetCoefficients(coeffs[0], coeffs[1], coeffs[2], coeffs[3], coeffs[4], coeffs[5], coeffs[6], coeffs[7], coeffs[8], coeffs[9]); vtkSampleFunction sample = new vtkSampleFunction(); sample.SetImplicitFunction(quadricVTK); double[][] bounds = quadric.getBoundaries(); double max = MathUtils.max(bounds[1]); sample.SetSampleDimensions(100, 100, 100); sample.SetModelBounds(-1.5 * max, 1.5 * max, -1.5 * max, 1.5 * max, -1.5 * max, 1.5 * max); sample.ComputeNormalsOn(); vtkContourFilter contourFilter = new vtkContourFilter(); contourFilter.SetInputConnection(sample.GetOutputPort()); contourFilter.SetValue(0, 0); contourFilter.Update(); vtkPolyDataMapper mapper = new vtkPolyDataMapper(); mapper.SetInputConnection(contourFilter.GetOutputPort()); ellipsoidActor = new vtkActor(); ellipsoidActor.SetMapper(mapper); // This is because scaling could change, its value during my test is (1,1,1) ellipsoidActor.SetScale(ViewerUtil.getScale());/ Despite that, I keep ending up with very different results when I try to plot the result with this code, and when I do it with MatLab (same values). The overall shape seems good, but the size is completely different, you can see it there, this is the result I obtain with the Java code (The points in green are the points the ellipsoid should fit) : And, here is the ellipsoid displayed by MatLab with the same quadric equation : Ugly, but it does the work (the points are the same as in the first screenshot). Here is the code I use to display it in Matlab : /// x is the matrix with the original points s=1.5*max(abs(x(:))); [X,Y,Z]=meshgrid(linspace(-s,s,100),linspace(-s,s,100),linspace(-s,s,100)); // Getting the quadric coefficients q = Ellipsoid_Fitting_Centering(x, nit); figure(1);plot3(x(1,:),x(2,:),x(3,:),'.');axis equal hold on; V=q(1)*X.^2+q(2)*Y.^2+q(3)*Z.^2+q(4)*X.*Y+q(5)*X.*Z+q(6)*Y.*Z+q(7)*X+q(8)*Y+q(9)*Z+q(10); p=patch(isosurface(X,Y,Z,V,0));/ I'm starting to get really lost, I'm very new to VTK, and a lot of terms are completely unknown to me, which doesn't help. Thanks, B.K. -- View this message in context: http://vtk.1045678.n5.nabble.com/Scaling-issue-with-vtkContourFilter-tp5738131.html Sent from the VTK - Users mailing list archive at Nabble.com. From dakota_63124 at yahoo.com Wed May 18 23:31:31 2016 From: dakota_63124 at yahoo.com (kent myers) Date: Wed, 18 May 2016 20:31:31 -0700 (MST) Subject: [vtkusers] VTK application crash on virtual machine Message-ID: <1463628691157-5738136.post@n5.nabble.com> I have a Java application using VTK 7.0rc1. It works fine when running directly on my desktop. I have installed Eclipse Neon on Windows 10 in a virtual machine. When I run the application (based on the standard DICOM image display demo that uses vtkDICOMImageReader and vtkImageViewer2) inside Eclipse in the VM environment, the libraries load up normally, and all the VTK import and related operations are apparently successful. The crash occurs somewhere in the VTK rendering code (See stack trace below) Does anyone know some magic settings that I need to be able to use VTK in a VM environment? Thanks, Kent Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j vtk.vtkRenderWindow.Render_9()V+0 j vtk.vtkRenderWindow.Render()V+1 j vtk.vtkRenderWindowPanel.Render()V+74 j vtk.vtkPanel.paint(Ljava/awt/Graphics;)V+1 j sun.awt.RepaintArea.paintComponent(Ljava/awt/Component;Ljava/awt/Graphics;)V+6 j sun.awt.RepaintArea.paint(Ljava/lang/Object;Z)V+326 J 3628 C1 sun.awt.windows.WComponentPeer.handleEvent(Ljava/awt/AWTEvent;)V (173 bytes) @ 0x000000000383cc68 [0x000000000383bd80+0xee8] J 2988 C1 java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V (883 bytes) @ 0x00000000036921df [0x000000000368ad60+0x747f] J 3606 C2 java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V (149 bytes) @ 0x0000000003800dac [0x0000000003800a60+0x34c] J 3024 C2 java.awt.EventQueue$3.run()Ljava/lang/Void; (60 bytes) @ 0x0000000003392b54 [0x0000000003392ae0+0x74] J 2673 C2 java.awt.EventQueue$3.run()Ljava/lang/Object; (5 bytes) @ 0x0000000003671394 [0x0000000003671360+0x34] v ~StubRoutines::call_stub J 1338 java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; (0 bytes) @ 0x0000000003304de6 [0x0000000003304d80+0x66] J 2906 C1 java.awt.EventQueue$4.run()Ljava/lang/Object; (5 bytes) @ 0x000000000379652f [0x0000000003796100+0x42f] v ~StubRoutines::call_stub J 1338 java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; (0 bytes) @ 0x0000000003304de6 [0x0000000003304d80+0x66] J 2868 C2 java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V (80 bytes) @ 0x0000000003510f74 [0x0000000003510ae0+0x494] J 3991 C2 java.awt.EventDispatchThread.pumpOneEventForFilters(I)V (295 bytes) @ 0x0000000003639600 [0x00000000036390c0+0x540] J 2890% C2 java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V (47 bytes) @ 0x0000000003334f0c [0x0000000003334dc0+0x14c] j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11 j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4 j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3 j java.awt.EventDispatchThread.run()V+9 -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-application-crash-on-virtual-machine-tp5738136.html Sent from the VTK - Users mailing list archive at Nabble.com. From Gerald.Lodron at joanneum.at Thu May 19 01:46:55 2016 From: Gerald.Lodron at joanneum.at (Lodron, Gerald) Date: Thu, 19 May 2016 05:46:55 +0000 Subject: [vtkusers] vtkContourWidget Message-ID: Hi I use a vtkContourWidget to draw a contour over a set of detected points because I like the highlighting of points when mouse is moved over the contour points. I successfully deactivated manual manipulation of the contour. I now like to add a drawing with the point number over or on the side of the current highlighted point where the mouse hoovers. Is that possible? I do not find a function or callback to use.... Any suggestions? ------------------------------------------------------------------------------------ Gerald Lodron Researcher of Machine Vision Applications Group DIGITAL - Institute for Information and Communication Technologies JOANNEUM RESEARCH Forschungsgesellschaft mbH Steyrergasse 17, 8010 Graz, AUSTRIA phone: +43-316-876-1751 general fax: +43-316-876-1751 web: http://www.joanneum.at/digital e-mail: gerald.lodron at joanneum.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Thu May 19 08:35:46 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Thu, 19 May 2016 12:35:46 +0000 (UTC) Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: <957548478.2248004.1463203275627.JavaMail.yahoo@mail.yahoo.com> References: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> <1446659382.1186392.1463058384723.JavaMail.yahoo@mail.yahoo.com> <378522838.1414255.1463124148242.JavaMail.yahoo@mail.yahoo.com> <957548478.2248004.1463203275627.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1939650259.5400669.1463661347007.JavaMail.yahoo@mail.yahoo.com> Hi David. Something strange is happen ... I had tried to set LUT as you said, but the image are still whiter than without LUT ... see attached images ... And of course, I can not use vtkImageMapToColors without LUT, because the application is crashing ... is there a solution here ? Flaviu. ? Hi Flaviu, This is incorrect: m_pLUTAxial->SetRange(dLevel, dWindow); It should be something like this: m_pLUTAxial->SetRange(dLevel - 0.5*dWindow, dLevel + 0.5*dWindow); ?- David On Fri, May 13, 2016 at 1:22 AM, Flaviu2 wrote: This is a little pseudocode of the entire pipeline: vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); m_pDICOMReader->RemoveAllInputs(); vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); m_pDICOMReader->SetFileNames(pFN); // all files from serie m_pDICOMReader->AutoRescaleOff(); m_pDICOMReader->Update(); m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); m_pRescale->Update(); vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); vtkLookupTable* m_pLUTAxial = vtkLookupTable::New(); m_pLUTAxial->SetValueRange(0.0, 1.0); // from black to white m_pLUTAxial->SetSaturationRange(0.0, 0.0); // no color saturation vtkDICOMMetaData* pMeta = m_pDICOMReader->GetMetaData(); const vtkDICOMValue& window = pMeta->GetAttributeValue(DC::WindowWidth); const vtkDICOMValue& level = pMeta->GetAttributeValue(DC::WindowCenter); double dWindow = window.AsDouble(); double dLevel = level.AsDouble(); m_pLUTAxial->SetRange(dLevel, dWindow); // image intensity range m_pLUTAxial->SetRampToLinear(); m_pLUTAxial->Build(); vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); m_pColorAxial->SetLookupTable(m_pLUTAxial); m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); vtkImageActor* m_pImageActor = vtkImageActor::New(); // and then, forward, setup m_pColorAxial to an image actor: pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); // and add image actor to a renderer m_pRenderer->AddActor(m_pImageActor); I had taken "Window center" and "Window width" and put them as range on lookuptable ... the image are little dark, and is not like the original (without setup lookup table looks good, but I get those warning like in post subject) ... might not understand well what you said about this range, but I am feel I am not far from solve this problem ... can you guide me a little bit ? Flaviu. Since you're already using vtk-dicom, you can use vtkDICOMApplyRescaleto convert your CT image to Hounsfield units (if you use this filter, you shouldalso call AutoRescaleOff() on the reader). After the image has been converted to Hounsfield units, you can use the"Window Center" and "Window Width" presets that are stored in the metadata to set the range for the lookup table. However, I usually ignore these presets, and instead use the VTK classvtkImageHistogramStatistics to compute the range.? Its GetAutoRange()computes a range by doing some simple histogram analysis. If you enjoy doing a lot of reading, the relevant parts the DICOM standardare here:http://dicom.nema.org/MEDICAL/Dicom/current/output/chtml/part03/sect_C.11.html After the image goes through vtkImageMapToColors, how are yourendering it? ?- David -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Snapshot_with_LUT.png Type: image/png Size: 50057 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Snapshot_without_LUT.png Type: image/png Size: 90724 bytes Desc: not available URL: From david.gobbi at gmail.com Thu May 19 09:03:30 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 19 May 2016 07:03:30 -0600 Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: <1939650259.5400669.1463661347007.JavaMail.yahoo@mail.yahoo.com> References: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> <1446659382.1186392.1463058384723.JavaMail.yahoo@mail.yahoo.com> <378522838.1414255.1463124148242.JavaMail.yahoo@mail.yahoo.com> <957548478.2248004.1463203275627.JavaMail.yahoo@mail.yahoo.com> <1939650259.5400669.1463661347007.JavaMail.yahoo@mail.yahoo.com> Message-ID: I will try to answer your question, but I need to know more about your code first. Can you post the code you used for the "Snapshot_without_LUT" image? In particular, the screenshot has a Window/Level annotation (W: 80, L: 35), so show me how those values are used in the code. On Thu, May 19, 2016 at 6:35 AM, Flaviu2 wrote: > Hi David. Something strange is happen ... I had tried to set LUT as you > said, but the image are still whiter than without LUT ... see attached > images ... > > And of course, I can not use vtkImageMapToColors without LUT, because the > application is crashing ... is there a solution here ? > > Flaviu. > > > > > > Hi Flaviu, > > This is incorrect: > > m_pLUTAxial->SetRange(dLevel, dWindow); > > It should be something like this: > > m_pLUTAxial->SetRange(dLevel - 0.5*dWindow, dLevel + 0.5*dWindow); > > - David > > > On Fri, May 13, 2016 at 1:22 AM, Flaviu2 wrote: > > This is a little pseudocode of the entire pipeline: > > vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); > m_pDICOMReader->RemoveAllInputs(); > vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); > m_pDICOMReader->SetFileNames(pFN); // all files from serie > m_pDICOMReader->AutoRescaleOff(); > m_pDICOMReader->Update(); > m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); > m_pRescale->Update(); > vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); > m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); > vtkLookupTable* m_pLUTAxial = vtkLookupTable::New(); > m_pLUTAxial->SetValueRange(0.0, 1.0); // from black to white > m_pLUTAxial->SetSaturationRange(0.0, 0.0); // no color saturation > vtkDICOMMetaData* pMeta = m_pDICOMReader->GetMetaData(); > const vtkDICOMValue& window = pMeta->GetAttributeValue(DC::WindowWidth); > const vtkDICOMValue& level = pMeta->GetAttributeValue(DC::WindowCenter); > double dWindow = window.AsDouble(); > double dLevel = level.AsDouble(); > m_pLUTAxial->SetRange(dLevel, dWindow); // image intensity range > m_pLUTAxial->SetRampToLinear(); > m_pLUTAxial->Build(); > vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); > m_pColorAxial->SetLookupTable(m_pLUTAxial); > m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); > vtkImageActor* m_pImageActor = vtkImageActor::New(); > // and then, forward, setup m_pColorAxial to an image actor: > > pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); > // and add image actor to a renderer > m_pRenderer->AddActor(m_pImageActor); > > > I had taken "Window center" and "Window width" and put them as range on > lookuptable ... the image are little dark, and is not like the original > (without setup lookup table looks good, but I get those warning like in > post subject) ... might not understand well what you said about this range, > but I am feel I am not far from solve this problem ... can you guide me a > little bit ? > > Flaviu. > > > > > > Since you're already using vtk-dicom, you can use vtkDICOMApplyRescale > to convert your CT image to Hounsfield units (if you use this filter, you > should > also call AutoRescaleOff() on the reader). > > After the image has been converted to Hounsfield units, you can use the > "Window Center" and "Window Width" presets that are stored in the meta > data to set the range for the lookup table. > > However, I usually ignore these presets, and instead use the VTK class > vtkImageHistogramStatistics to compute the range. Its GetAutoRange() > computes a range by doing some simple histogram analysis. > > If you enjoy doing a lot of reading, the relevant parts the DICOM standard > are here: > > http://dicom.nema.org/MEDICAL/Dicom/current/output/chtml/part03/sect_C.11.html > > After the image goes through vtkImageMapToColors, how are you > rendering it? > > - David > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gerald.Lodron at joanneum.at Thu May 19 09:28:43 2016 From: Gerald.Lodron at joanneum.at (Lodron, Gerald) Date: Thu, 19 May 2016 13:28:43 +0000 Subject: [vtkusers] vtkContourWidget In-Reply-To: References: Message-ID: <043eb68fe4fa4a32ae0794ed819d6385@RZJMBX2.jr1.local> Hi Thanks, didn?t know labelMapper yet I currently successfully implemented it over an own Representation inherited from vtkOrientedGlyphContourRepresentation Where I made a vtkTextActor array for each node of my contour. It works but my contour has up to 600 points (which means 600 text actors) where this solution gets really slow, especially when I use mouse to change cameras position??. I will try yours, this should be much faster I think?. Best regards, Gerald Von: Dean Inglis [mailto:inglis.dl at gmail.com] Gesendet: Donnerstag, 19. Mai 2016 15:22 An: Lodron, Gerald Betreff: Re: [vtkusers] vtkContourWidget Hi Gerald, have a look at the following classes: vtkIdFilter vtkLabeledDataMapper vtkActor2D if you have polydata from your contour, you could setup a visualization pipeline as follows: vtkPolyData contour vtkIdFilter filter vtkLabeledDataMapper mapper vtkActor2D actor filter->PointIdson(); filter->CellIdsOff(); filter->FieldDataOn(); filter->SetInput(contour); mapper->SetLabelModeToLabelFieldData(); mapper->SetInputConnection(filter->GetOutputPort()); actor->SetMapper(mapper); HTH, Dean On Thu, May 19, 2016 at 1:46 AM, Lodron, Gerald > wrote: Hi I use a vtkContourWidget to draw a contour over a set of detected points because I like the highlighting of points when mouse is moved over the contour points. I successfully deactivated manual manipulation of the contour. I now like to add a drawing with the point number over or on the side of the current highlighted point where the mouse hoovers. Is that possible? I do not find a function or callback to use?. Any suggestions? ------------------------------------------------------------------------------------ Gerald Lodron Researcher of Machine Vision Applications Group DIGITAL - Institute for Information and Communication Technologies JOANNEUM RESEARCH Forschungsgesellschaft mbH Steyrergasse 17, 8010 Graz, AUSTRIA phone: +43-316-876-1751 general fax: +43-316-876-1751 web: http://www.joanneum.at/digital e-mail: gerald.lodron at joanneum.at _______________________________________________ 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 Thu May 19 09:30:30 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Thu, 19 May 2016 13:30:30 +0000 (UTC) Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: References: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> <1446659382.1186392.1463058384723.JavaMail.yahoo@mail.yahoo.com> <378522838.1414255.1463124148242.JavaMail.yahoo@mail.yahoo.com> <957548478.2248004.1463203275627.JavaMail.yahoo@mail.yahoo.com> <1939650259.5400669.1463661347007.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1475658317.5441283.1463664630216.JavaMail.yahoo@mail.yahoo.com> David, I cannot thank you enough for your kindness.Yes, I post the code used for case without LUT: ??? vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); ??? m_pDICOMReader->RemoveAllInputs(); ??? vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); ??? m_pDICOMReader->SetFileNames(pFN); // all files from serie ??? m_pDICOMReader->AutoRescaleOff(); ??? m_pDICOMReader->Update(); ??? m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); ??? m_pRescale->Update(); ??? vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); ??? m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); ??? vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); ??? m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); ??? vtkImageActor* m_pImageActor = vtkImageActor::New(); ??? // and then, forward, setup m_pColorAxial to an image actor: ??? pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); ??? // and add image actor to a renderer ??? m_pRenderer->AddActor(m_pImageActor); In fact, I am using the same code, but I am not using vtkLookupTable at all ... I know, it is not quite ok, but it is the only way to have the original window level from the image ... Flaviu. On Thursday, May 19, 2016 4:03 PM, David Gobbi wrote: I will try to answer your question, but I need to know more about your code first.? Can you post the code you used for the "Snapshot_without_LUT" image?? In particular, the screenshot has a Window/Level annotation (W: 80, L: 35), so show me how those values are used in the code. On Thu, May 19, 2016 at 6:35 AM, Flaviu2 wrote: Hi David. Something strange is happen ... I had tried to set LUT as you said, but the image are still whiter than without LUT ... see attached images ... And of course, I can not use vtkImageMapToColors without LUT, because the application is crashing ... is there a solution here ? Flaviu. ? Hi Flaviu, This is incorrect: m_pLUTAxial->SetRange(dLevel, dWindow); It should be something like this: m_pLUTAxial->SetRange(dLevel - 0.5*dWindow, dLevel + 0.5*dWindow); ?- David On Fri, May 13, 2016 at 1:22 AM, Flaviu2 wrote: This is a little pseudocode of the entire pipeline: vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); m_pDICOMReader->RemoveAllInputs(); vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); m_pDICOMReader->SetFileNames(pFN); // all files from serie m_pDICOMReader->AutoRescaleOff(); m_pDICOMReader->Update(); m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); m_pRescale->Update(); vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); vtkLookupTable* m_pLUTAxial = vtkLookupTable::New(); m_pLUTAxial->SetValueRange(0.0, 1.0); // from black to white m_pLUTAxial->SetSaturationRange(0.0, 0.0); // no color saturation vtkDICOMMetaData* pMeta = m_pDICOMReader->GetMetaData(); const vtkDICOMValue& window = pMeta->GetAttributeValue(DC::WindowWidth); const vtkDICOMValue& level = pMeta->GetAttributeValue(DC::WindowCenter); double dWindow = window.AsDouble(); double dLevel = level.AsDouble(); m_pLUTAxial->SetRange(dLevel, dWindow); // image intensity range m_pLUTAxial->SetRampToLinear(); m_pLUTAxial->Build(); vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); m_pColorAxial->SetLookupTable(m_pLUTAxial); m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); vtkImageActor* m_pImageActor = vtkImageActor::New(); // and then, forward, setup m_pColorAxial to an image actor: pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); // and add image actor to a renderer m_pRenderer->AddActor(m_pImageActor); I had taken "Window center" and "Window width" and put them as range on lookuptable ... the image are little dark, and is not like the original (without setup lookup table looks good, but I get those warning like in post subject) ... might not understand well what you said about this range, but I am feel I am not far from solve this problem ... can you guide me a little bit ? Flaviu. Since you're already using vtk-dicom, you can use vtkDICOMApplyRescaleto convert your CT image to Hounsfield units (if you use this filter, you shouldalso call AutoRescaleOff() on the reader). After the image has been converted to Hounsfield units, you can use the"Window Center" and "Window Width" presets that are stored in the metadata to set the range for the lookup table. However, I usually ignore these presets, and instead use the VTK classvtkImageHistogramStatistics to compute the range.? Its GetAutoRange()computes a range by doing some simple histogram analysis. If you enjoy doing a lot of reading, the relevant parts the DICOM standardare here:http://dicom.nema.org/MEDICAL/Dicom/current/output/chtml/part03/sect_C.11.html After the image goes through vtkImageMapToColors, how are yourendering it? ?- David -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Thu May 19 09:55:46 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Thu, 19 May 2016 07:55:46 -0600 Subject: [vtkusers] VTK application crash on virtual machine In-Reply-To: <1463628691157-5738136.post@n5.nabble.com> References: <1463628691157-5738136.post@n5.nabble.com> Message-ID: Hi Kent, My suspicion would be that your VM doesn't support a new enough version of OpenGL to be used with the OpenGL2 rendering backend in VTK. The new backend requires a minimum OpenGL version of 3.2, which most VMs that I have used don't support. You could try rebuilding VTK with the OpenGL backend to see if that is indeed the problem (the default is OpenGL2 in VTK 7). HTH, Shawn On Wed, May 18, 2016 at 9:31 PM, kent myers via vtkusers wrote: > I have a Java application using VTK 7.0rc1. It works fine when running > directly on my desktop. I have installed Eclipse Neon on Windows 10 in a > virtual machine. When I run the application (based on the standard DICOM > image display demo that uses vtkDICOMImageReader and vtkImageViewer2) > inside > Eclipse in the VM environment, the libraries load up normally, and all the > VTK import and related operations are apparently successful. The crash > occurs somewhere in the VTK rendering code (See stack trace below) > > Does anyone know some magic settings that I need to be able to use VTK in a > VM environment? > > Thanks, > Kent > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j vtk.vtkRenderWindow.Render_9()V+0 > j vtk.vtkRenderWindow.Render()V+1 > j vtk.vtkRenderWindowPanel.Render()V+74 > j vtk.vtkPanel.paint(Ljava/awt/Graphics;)V+1 > j > > sun.awt.RepaintArea.paintComponent(Ljava/awt/Component;Ljava/awt/Graphics;)V+6 > j sun.awt.RepaintArea.paint(Ljava/lang/Object;Z)V+326 > J 3628 C1 sun.awt.windows.WComponentPeer.handleEvent(Ljava/awt/AWTEvent;)V > (173 bytes) @ 0x000000000383cc68 [0x000000000383bd80+0xee8] > J 2988 C1 java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V (883 > bytes) @ 0x00000000036921df [0x000000000368ad60+0x747f] > J 3606 C2 > > java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V > (149 bytes) @ 0x0000000003800dac [0x0000000003800a60+0x34c] > J 3024 C2 java.awt.EventQueue$3.run()Ljava/lang/Void; (60 bytes) @ > 0x0000000003392b54 [0x0000000003392ae0+0x74] > J 2673 C2 java.awt.EventQueue$3.run()Ljava/lang/Object; (5 bytes) @ > 0x0000000003671394 [0x0000000003671360+0x34] > v ~StubRoutines::call_stub > J 1338 > > java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; > (0 bytes) @ 0x0000000003304de6 [0x0000000003304d80+0x66] > J 2906 C1 java.awt.EventQueue$4.run()Ljava/lang/Object; (5 bytes) @ > 0x000000000379652f [0x0000000003796100+0x42f] > v ~StubRoutines::call_stub > J 1338 > > java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; > (0 bytes) @ 0x0000000003304de6 [0x0000000003304d80+0x66] > J 2868 C2 java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V (80 > bytes) > @ 0x0000000003510f74 [0x0000000003510ae0+0x494] > J 3991 C2 java.awt.EventDispatchThread.pumpOneEventForFilters(I)V (295 > bytes) @ 0x0000000003639600 [0x00000000036390c0+0x540] > J 2890% C2 > > java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V > (47 bytes) @ 0x0000000003334f0c [0x0000000003334dc0+0x14c] > j > > java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11 > j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4 > j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3 > j java.awt.EventDispatchThread.run()V+9 > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/VTK-application-crash-on-virtual-machine-tp5738136.html > Sent from the VTK - Users mailing list archive at Nabble.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 david.gobbi at gmail.com Thu May 19 10:41:33 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 19 May 2016 08:41:33 -0600 Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: <1475658317.5441283.1463664630216.JavaMail.yahoo@mail.yahoo.com> References: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> <1446659382.1186392.1463058384723.JavaMail.yahoo@mail.yahoo.com> <378522838.1414255.1463124148242.JavaMail.yahoo@mail.yahoo.com> <957548478.2248004.1463203275627.JavaMail.yahoo@mail.yahoo.com> <1939650259.5400669.1463661347007.JavaMail.yahoo@mail.yahoo.com> <1475658317.5441283.1463664630216.JavaMail.yahoo@mail.yahoo.com> Message-ID: And the values (W: 80, L: 35) that are shown on the image... where do they come from? On Thu, May 19, 2016 at 7:30 AM, Flaviu2 wrote: > David, I cannot thank you enough for your kindness. > Yes, I post the code used for case without LUT: > > > vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); > m_pDICOMReader->RemoveAllInputs(); > vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); > m_pDICOMReader->SetFileNames(pFN); // all files from serie > m_pDICOMReader->AutoRescaleOff(); > m_pDICOMReader->Update(); > m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); > m_pRescale->Update(); > vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); > m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); > vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); > m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); > vtkImageActor* m_pImageActor = vtkImageActor::New(); > // and then, forward, setup m_pColorAxial to an image actor: > > pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); > // and add image actor to a renderer > m_pRenderer->AddActor(m_pImageActor); > > In fact, I am using the same code, but I am not using vtkLookupTable at > all ... I know, it is not quite ok, but it is the only way to have the > original window level from the image ... > > Flaviu. > > > > > > > On Thursday, May 19, 2016 4:03 PM, David Gobbi > wrote: > > > I will try to answer your question, but I need to know more about your > code first. Can you post the code you used for the "Snapshot_without_LUT" > image? In particular, the screenshot has a Window/Level annotation (W: 80, > L: 35), so show me how those values are used in the code. > > On Thu, May 19, 2016 at 6:35 AM, Flaviu2 wrote: > > Hi David. Something strange is happen ... I had tried to set LUT as you > said, but the image are still whiter than without LUT ... see attached > images ... > > And of course, I can not use vtkImageMapToColors without LUT, because the > application is crashing ... is there a solution here ? > > Flaviu. > > > > > > Hi Flaviu, > > This is incorrect: > > m_pLUTAxial->SetRange(dLevel, dWindow); > > It should be something like this: > > m_pLUTAxial->SetRange(dLevel - 0.5*dWindow, dLevel + 0.5*dWindow); > > - David > > > On Fri, May 13, 2016 at 1:22 AM, Flaviu2 wrote: > > This is a little pseudocode of the entire pipeline: > > vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); > m_pDICOMReader->RemoveAllInputs(); > vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); > m_pDICOMReader->SetFileNames(pFN); // all files from serie > m_pDICOMReader->AutoRescaleOff(); > m_pDICOMReader->Update(); > m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); > m_pRescale->Update(); > vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); > m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); > vtkLookupTable* m_pLUTAxial = vtkLookupTable::New(); > m_pLUTAxial->SetValueRange(0.0, 1.0); // from black to white > m_pLUTAxial->SetSaturationRange(0.0, 0.0); // no color saturation > vtkDICOMMetaData* pMeta = m_pDICOMReader->GetMetaData(); > const vtkDICOMValue& window = pMeta->GetAttributeValue(DC::WindowWidth); > const vtkDICOMValue& level = pMeta->GetAttributeValue(DC::WindowCenter); > double dWindow = window.AsDouble(); > double dLevel = level.AsDouble(); > m_pLUTAxial->SetRange(dLevel, dWindow); // image intensity range > m_pLUTAxial->SetRampToLinear(); > m_pLUTAxial->Build(); > vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); > m_pColorAxial->SetLookupTable(m_pLUTAxial); > m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); > vtkImageActor* m_pImageActor = vtkImageActor::New(); > // and then, forward, setup m_pColorAxial to an image actor: > > pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); > // and add image actor to a renderer > m_pRenderer->AddActor(m_pImageActor); > > > I had taken "Window center" and "Window width" and put them as range on > lookuptable ... the image are little dark, and is not like the original > (without setup lookup table looks good, but I get those warning like in > post subject) ... might not understand well what you said about this range, > but I am feel I am not far from solve this problem ... can you guide me a > little bit ? > > Flaviu. > > > > > > Since you're already using vtk-dicom, you can use vtkDICOMApplyRescale > to convert your CT image to Hounsfield units (if you use this filter, you > should > also call AutoRescaleOff() on the reader). > > After the image has been converted to Hounsfield units, you can use the > "Window Center" and "Window Width" presets that are stored in the meta > data to set the range for the lookup table. > > However, I usually ignore these presets, and instead use the VTK class > vtkImageHistogramStatistics to compute the range. Its GetAutoRange() > computes a range by doing some simple histogram analysis. > > If you enjoy doing a lot of reading, the relevant parts the DICOM standard > are here: > > http://dicom.nema.org/MEDICAL/Dicom/current/output/chtml/part03/sect_C.11.html > > After the image goes through vtkImageMapToColors, how are you > rendering it? > > - David > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.m.bouffard at erdc.dren.mil Thu May 19 12:26:02 2016 From: julian.m.bouffard at erdc.dren.mil (jbouffar) Date: Thu, 19 May 2016 09:26:02 -0700 (MST) Subject: [vtkusers] filling a vtkFloatArray ... first element? Message-ID: <1463675162166-5738146.post@n5.nabble.com> Hello, I have a strange question. It seems the first element I put into a vtkFloatArray is missing, so that if I construct a new floatArray element by element from some other arrays, they are out of sync by one element. I have written some code in c++ to illustrate this (below). Even weirder (to me) it seems I can access the [-1] component, and it works! What is going on here? I have tried also using SetNumberOfTuples and SetTuple, but this doesn't even work. This is VTK 6.3. int main(int argc, char** argv){ vtkSmartPointer flame = vtkSmartPointer::New(); flame->SetNumberOfComponents(1); for(int i = 0; i < 10; i++){ flame->InsertNextTuple1(i); vtkIdType id = i; cout << flame->GetComponent(id,1) << ", " << flame->GetComponent(id-1,1) << endl; } cout << "nTuples = " << flame->GetNumberOfTuples() << endl; cout << "Contents of flame: " << endl; for(int i = 0; i < flame->GetNumberOfTuples(); i++){ vtkIdType id = i; cout << "i = " << i << ", flame[" << i << "] = " << flame->GetComponent(id,1) << endl; } //Okay, maybe if we use SetNumberOfTuples and SetTuple1 it will work. Nope! vtkIdType id = 0; flame->SetTuple1(id, 99); float retrieved = flame->GetComponent(id,1); cout << "retrieved = " << retrieved << endl; retrieved = flame->GetComponent(-1,1); cout << "retrieved = " << retrieved << endl; return 0; } Output: 4.58589e-41, 0 2.13737e+11, 1 4.58589e-41, 2 0, 3 0, 4 1.99685e-42, 5 0, 6 2.13737e+11, 7 4.58589e-41, 8 1.97443e-42, 9 nTuples = 10 Contents of flame: i = 0, flame[0] = 1 i = 1, flame[1] = 2 i = 2, flame[2] = 3 i = 3, flame[3] = 4 i = 4, flame[4] = 5 i = 5, flame[5] = 6 i = 6, flame[6] = 7 i = 7, flame[7] = 8 i = 8, flame[8] = 9 i = 9, flame[9] = 1.97443e-42 retrieved = 1 retrieved = 99 -- View this message in context: http://vtk.1045678.n5.nabble.com/filling-a-vtkFloatArray-first-element-tp5738146.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Thu May 19 12:58:11 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Thu, 19 May 2016 18:58:11 +0200 Subject: [vtkusers] filling a vtkFloatArray ... first element? In-Reply-To: <1463675162166-5738146.post@n5.nabble.com> References: <1463675162166-5738146.post@n5.nabble.com> Message-ID: Try using the InsertNextValue(), GetValue() and SetValue() methods: int main() { vtkSmartPointer flame = vtkSmartPointer::New(); flame->SetNumberOfComponents(1); for (int i = 0; i < 10; i++) { flame->InsertNextValue(i); vtkIdType id = i; cout << flame->GetValue(id) << ", " << flame->GetValue(id-1) << endl; } cout << "nTuples = " << flame->GetNumberOfTuples() << endl; cout << "Contents of flame: " << endl; for (int i = 0; i < flame->GetNumberOfTuples(); i++) { vtkIdType id = i; cout << "i = " << i << ", flame[" << i << "] = " << flame->GetValue(id) << endl; } //Okay, maybe if we use SetNumberOfTuples and SetTuple1 it will work. // Nope! vtkIdType id = 0; flame->SetValue(id, 99); float retrieved = flame->GetValue(id); cout << "retrieved = " << retrieved << endl; retrieved = flame->GetValue(-1); cout << "retrieved = " << retrieved << endl; return 0; } > On 19 May 2016, at 18:26, jbouffar wrote: > > Hello, > > I have a strange question. It seems the first element I put into a > vtkFloatArray is missing, so that if I construct a new floatArray element by > element from some other arrays, they are out of sync by one element. I have > written some code in c++ to illustrate this (below). Even weirder (to me) > it seems I can access the [-1] component, and it works! What is going on > here? I have tried also using SetNumberOfTuples and SetTuple, but this > doesn't even work. This is VTK 6.3. > > int main(int argc, char** argv){ > > vtkSmartPointer flame = > vtkSmartPointer::New(); > flame->SetNumberOfComponents(1); > > for(int i = 0; i < 10; i++){ > flame->InsertNextTuple1(i); > vtkIdType id = i; > cout << flame->GetComponent(id,1) << ", " << flame->GetComponent(id-1,1) > << endl; > } > > cout << "nTuples = " << flame->GetNumberOfTuples() << endl; > > cout << "Contents of flame: " << endl; > for(int i = 0; i < flame->GetNumberOfTuples(); i++){ > vtkIdType id = i; > cout << "i = " << i << ", flame[" << i << "] = " << > flame->GetComponent(id,1) << endl; > } > > //Okay, maybe if we use SetNumberOfTuples and SetTuple1 it will work. > Nope! > vtkIdType id = 0; > flame->SetTuple1(id, 99); > float retrieved = flame->GetComponent(id,1); > cout << "retrieved = " << retrieved << endl; > retrieved = flame->GetComponent(-1,1); > cout << "retrieved = " << retrieved << endl; > > return 0; > } > > Output: > > 4.58589e-41, 0 > 2.13737e+11, 1 > 4.58589e-41, 2 > 0, 3 > 0, 4 > 1.99685e-42, 5 > 0, 6 > 2.13737e+11, 7 > 4.58589e-41, 8 > 1.97443e-42, 9 > nTuples = 10 > Contents of flame: > i = 0, flame[0] = 1 > i = 1, flame[1] = 2 > i = 2, flame[2] = 3 > i = 3, flame[3] = 4 > i = 4, flame[4] = 5 > i = 5, flame[5] = 6 > i = 6, flame[6] = 7 > i = 7, flame[7] = 8 > i = 8, flame[8] = 9 > i = 9, flame[9] = 1.97443e-42 > retrieved = 1 > retrieved = 99 > > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/filling-a-vtkFloatArray-first-element-tp5738146.html > Sent from the VTK - Users mailing list archive at Nabble.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 david.gobbi at gmail.com Thu May 19 13:07:23 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 19 May 2016 11:07:23 -0600 Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: References: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> <1446659382.1186392.1463058384723.JavaMail.yahoo@mail.yahoo.com> <378522838.1414255.1463124148242.JavaMail.yahoo@mail.yahoo.com> <957548478.2248004.1463203275627.JavaMail.yahoo@mail.yahoo.com> <1939650259.5400669.1463661347007.JavaMail.yahoo@mail.yahoo.com> <1475658317.5441283.1463664630216.JavaMail.yahoo@mail.yahoo.com> Message-ID: You said "I can not use vtkImageMapToColors without LUT, because the application is crashing" but you posted code, and an output image that the code produced. So I am confused. Did the code crash? Or did it just display an error message? I'll try my best to give an explanation of how the VTK 3D image display pipeline works. The vtkImageActor can, by itself, apply a window/level to the image. To set this window/level, use these methods: m_pImageActor->GetProperty()->SetColorWindow(w); m_pImageActor->GetProperty()->SetColorLevel(l); By default, the window/level for vtkImageActor are set to window=255.0, level=127.5. This window and level provide a range of [0.0, 255.0]. This is the full display range for 8-bits. Converting between "window, level" and "range" is simple mathematics, and is described in many books and on many web pages, e.g. http://docs.oracle.com/cd/E19253-01/817-7519/6mmr6chkl/index.html When you have vtkImageMapToColors in your pipeline, it will take your CT data (16 bits) as input, and it will produce RGBA (8-bits per component) data as output. But it can only do this if you give it a lookup table. If you do not give a lookup table, then it will display an error message, and it will output the original CT data, and then the vtkImageActor will apply its own default window/level of window=255.0, level=127.5. This window/level does not come from the data! It is simply the default window/level for vtkImageActor. When you give a LUT to vtkImageMapToColors, it produces RGBA data as output (with 8-bits per component). The vtkImageActor then applies its default window/level of 255.0,127.5 but note that, for 8-bit data, this window/level is an identity mapping! A value of zero maps to zero, and a value of 255 maps to 255. This means the mapping is controlled completely by the range of the LUT used with vtkImageMapToColors. The vtkImageActor doesn't change the values at all. So, now let us consider the two output images that you posted. In the first one, it looks like you set the range of the LUT to [-5, 75], based on the fact that the image says (W: 80, L: 35). As I said in my previous email, you will have to tell me where those numbers came from! Using (W: 80, L: 35) only makes sense if you want to look at the brain, it is of course useless for bone because it saturates the bone (that is, it makes the bone completely white as you described). So a doctor will use this window/level if they are looking for a brain injury such as a hemorrhage. If they are interested in looking at bone injury, they will start with something like (W: 3000, L: 1000). For the second image you posted (the one with no LUT) the vtkImageActor is applying its default (W: 255.0, L: 127.5) which is a large window than (W: 80, L: 35) but is definitely smaller than you want. So I'll ask yet again... where did you get the values 80, 35? From the DICOM meta data? If so, they are obviously valid values (as I said, they are what a radiologist might use for investigating brain injury) even if they aren't the values that you want to use. - David On Thu, May 19, 2016 at 8:41 AM, David Gobbi wrote: > And the values (W: 80, L: 35) that are shown on the image... where do they > come from? > > On Thu, May 19, 2016 at 7:30 AM, Flaviu2 wrote: > >> David, I cannot thank you enough for your kindness. >> Yes, I post the code used for case without LUT: >> >> >> vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); >> m_pDICOMReader->RemoveAllInputs(); >> vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); >> m_pDICOMReader->SetFileNames(pFN); // all files from serie >> m_pDICOMReader->AutoRescaleOff(); >> m_pDICOMReader->Update(); >> m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); >> m_pRescale->Update(); >> vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); >> m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); >> vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); >> m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); >> vtkImageActor* m_pImageActor = vtkImageActor::New(); >> // and then, forward, setup m_pColorAxial to an image actor: >> >> pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); >> // and add image actor to a renderer >> m_pRenderer->AddActor(m_pImageActor); >> >> In fact, I am using the same code, but I am not using vtkLookupTable at >> all ... I know, it is not quite ok, but it is the only way to have the >> original window level from the image ... >> >> Flaviu. >> >> >> >> >> >> >> On Thursday, May 19, 2016 4:03 PM, David Gobbi >> wrote: >> >> >> I will try to answer your question, but I need to know more about your >> code first. Can you post the code you used for the "Snapshot_without_LUT" >> image? In particular, the screenshot has a Window/Level annotation (W: 80, >> L: 35), so show me how those values are used in the code. >> >> On Thu, May 19, 2016 at 6:35 AM, Flaviu2 wrote: >> >> Hi David. Something strange is happen ... I had tried to set LUT as you >> said, but the image are still whiter than without LUT ... see attached >> images ... >> >> And of course, I can not use vtkImageMapToColors without LUT, because the >> application is crashing ... is there a solution here ? >> >> Flaviu. >> >> >> >> >> >> Hi Flaviu, >> >> This is incorrect: >> >> m_pLUTAxial->SetRange(dLevel, dWindow); >> >> It should be something like this: >> >> m_pLUTAxial->SetRange(dLevel - 0.5*dWindow, dLevel + 0.5*dWindow); >> >> - David >> >> >> On Fri, May 13, 2016 at 1:22 AM, Flaviu2 wrote: >> >> This is a little pseudocode of the entire pipeline: >> >> vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); >> m_pDICOMReader->RemoveAllInputs(); >> vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); >> m_pDICOMReader->SetFileNames(pFN); // all files from serie >> m_pDICOMReader->AutoRescaleOff(); >> m_pDICOMReader->Update(); >> m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); >> m_pRescale->Update(); >> vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); >> m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); >> vtkLookupTable* m_pLUTAxial = vtkLookupTable::New(); >> m_pLUTAxial->SetValueRange(0.0, 1.0); // from black to white >> m_pLUTAxial->SetSaturationRange(0.0, 0.0); // no color saturation >> vtkDICOMMetaData* pMeta = m_pDICOMReader->GetMetaData(); >> const vtkDICOMValue& window = pMeta->GetAttributeValue(DC::WindowWidth); >> const vtkDICOMValue& level = pMeta->GetAttributeValue(DC::WindowCenter); >> double dWindow = window.AsDouble(); >> double dLevel = level.AsDouble(); >> m_pLUTAxial->SetRange(dLevel, dWindow); // image intensity range >> m_pLUTAxial->SetRampToLinear(); >> m_pLUTAxial->Build(); >> vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); >> m_pColorAxial->SetLookupTable(m_pLUTAxial); >> m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); >> vtkImageActor* m_pImageActor = vtkImageActor::New(); >> // and then, forward, setup m_pColorAxial to an image actor: >> >> pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); >> // and add image actor to a renderer >> m_pRenderer->AddActor(m_pImageActor); >> >> >> I had taken "Window center" and "Window width" and put them as range on >> lookuptable ... the image are little dark, and is not like the original >> (without setup lookup table looks good, but I get those warning like in >> post subject) ... might not understand well what you said about this range, >> but I am feel I am not far from solve this problem ... can you guide me a >> little bit ? >> >> Flaviu. >> >> >> >> >> >> Since you're already using vtk-dicom, you can use vtkDICOMApplyRescale >> to convert your CT image to Hounsfield units (if you use this filter, you >> should >> also call AutoRescaleOff() on the reader). >> >> After the image has been converted to Hounsfield units, you can use the >> "Window Center" and "Window Width" presets that are stored in the meta >> data to set the range for the lookup table. >> >> However, I usually ignore these presets, and instead use the VTK class >> vtkImageHistogramStatistics to compute the range. Its GetAutoRange() >> computes a range by doing some simple histogram analysis. >> >> If you enjoy doing a lot of reading, the relevant parts the DICOM standard >> are here: >> >> http://dicom.nema.org/MEDICAL/Dicom/current/output/chtml/part03/sect_C.11.html >> >> After the image goes through vtkImageMapToColors, how are you >> rendering it? >> >> - David >> >> >> >> >> >> >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Thu May 19 13:45:29 2016 From: david.lonie at kitware.com (David Lonie) Date: Thu, 19 May 2016 13:45:29 -0400 Subject: [vtkusers] filling a vtkFloatArray ... first element? In-Reply-To: <1463675162166-5738146.post@n5.nabble.com> References: <1463675162166-5738146.post@n5.nabble.com> Message-ID: Both arguments to GetComponent are zero based -- so to get the first component of the first tuple, you should call GetComponent(0, 0), not GetComponent(0, 1). HTH, Dave On Thu, May 19, 2016 at 12:26 PM, jbouffar wrote: > I have a strange question. It seems the first element I put into a > vtkFloatArray is missing, so that if I construct a new floatArray element > by > element from some other arrays, they are out of sync by one element. I > have > written some code in c++ to illustrate this (below). Even weirder (to me) > it seems I can access the [-1] component, and it works! What is going on > here? I have tried also using SetNumberOfTuples and SetTuple, but this > doesn't even work. This is VTK 6.3. > > int main(int argc, char** argv){ > > vtkSmartPointer flame = > vtkSmartPointer::New(); > flame->SetNumberOfComponents(1); > > for(int i = 0; i < 10; i++){ > flame->InsertNextTuple1(i); > vtkIdType id = i; > cout << flame->GetComponent(id,1) << ", " << > flame->GetComponent(id-1,1) > << endl; > } > > cout << "nTuples = " << flame->GetNumberOfTuples() << endl; > > cout << "Contents of flame: " << endl; > for(int i = 0; i < flame->GetNumberOfTuples(); i++){ > vtkIdType id = i; > cout << "i = " << i << ", flame[" << i << "] = " << > flame->GetComponent(id,1) << endl; > } > > //Okay, maybe if we use SetNumberOfTuples and SetTuple1 it will work. > Nope! > vtkIdType id = 0; > flame->SetTuple1(id, 99); > float retrieved = flame->GetComponent(id,1); > cout << "retrieved = " << retrieved << endl; > retrieved = flame->GetComponent(-1,1); > cout << "retrieved = " << retrieved << endl; > > return 0; > } > > Output: > > 4.58589e-41, 0 > 2.13737e+11, 1 > 4.58589e-41, 2 > 0, 3 > 0, 4 > 1.99685e-42, 5 > 0, 6 > 2.13737e+11, 7 > 4.58589e-41, 8 > 1.97443e-42, 9 > nTuples = 10 > Contents of flame: > i = 0, flame[0] = 1 > i = 1, flame[1] = 2 > i = 2, flame[2] = 3 > i = 3, flame[3] = 4 > i = 4, flame[4] = 5 > i = 5, flame[5] = 6 > i = 6, flame[6] = 7 > i = 7, flame[7] = 8 > i = 8, flame[8] = 9 > i = 9, flame[9] = 1.97443e-42 > retrieved = 1 > retrieved = 99 > > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/filling-a-vtkFloatArray-first-element-tp5738146.html > Sent from the VTK - Users mailing list archive at Nabble.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 patriciop at gmail.com Thu May 19 14:28:47 2016 From: patriciop at gmail.com (Patricio Palma C.) Date: Thu, 19 May 2016 14:28:47 -0400 Subject: [vtkusers] VTK application crash on virtual machine In-Reply-To: References: <1463628691157-5738136.post@n5.nabble.com> Message-ID: If you are using Mesa as OpenGL banckend, you can try MESA_GL_VERSION_OVERRIDE and MESA_GLSL_VERSION_OVERRIDE environment variables to force the driver to report an specific OpenGL version. Regards Patricio On Thu, May 19, 2016 at 9:55 AM, Shawn Waldon wrote: > Hi Kent, > > My suspicion would be that your VM doesn't support a new enough version of > OpenGL to be used with the OpenGL2 rendering backend in VTK. The new > backend requires a minimum OpenGL version of 3.2, which most VMs that I > have used don't support. You could try rebuilding VTK with the OpenGL > backend to see if that is indeed the problem (the default is OpenGL2 in VTK > 7). > > HTH, > Shawn > > On Wed, May 18, 2016 at 9:31 PM, kent myers via vtkusers > wrote: > >> I have a Java application using VTK 7.0rc1. It works fine when running >> directly on my desktop. I have installed Eclipse Neon on Windows 10 in a >> virtual machine. When I run the application (based on the standard DICOM >> image display demo that uses vtkDICOMImageReader and vtkImageViewer2) >> inside >> Eclipse in the VM environment, the libraries load up normally, and all the >> VTK import and related operations are apparently successful. The crash >> occurs somewhere in the VTK rendering code (See stack trace below) >> >> Does anyone know some magic settings that I need to be able to use VTK in >> a >> VM environment? >> >> Thanks, >> Kent >> >> Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) >> j vtk.vtkRenderWindow.Render_9()V+0 >> j vtk.vtkRenderWindow.Render()V+1 >> j vtk.vtkRenderWindowPanel.Render()V+74 >> j vtk.vtkPanel.paint(Ljava/awt/Graphics;)V+1 >> j >> >> sun.awt.RepaintArea.paintComponent(Ljava/awt/Component;Ljava/awt/Graphics;)V+6 >> j sun.awt.RepaintArea.paint(Ljava/lang/Object;Z)V+326 >> J 3628 C1 sun.awt.windows.WComponentPeer.handleEvent(Ljava/awt/AWTEvent;)V >> (173 bytes) @ 0x000000000383cc68 [0x000000000383bd80+0xee8] >> J 2988 C1 java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V (883 >> bytes) @ 0x00000000036921df [0x000000000368ad60+0x747f] >> J 3606 C2 >> >> java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V >> (149 bytes) @ 0x0000000003800dac [0x0000000003800a60+0x34c] >> J 3024 C2 java.awt.EventQueue$3.run()Ljava/lang/Void; (60 bytes) @ >> 0x0000000003392b54 [0x0000000003392ae0+0x74] >> J 2673 C2 java.awt.EventQueue$3.run()Ljava/lang/Object; (5 bytes) @ >> 0x0000000003671394 [0x0000000003671360+0x34] >> v ~StubRoutines::call_stub >> J 1338 >> >> java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; >> (0 bytes) @ 0x0000000003304de6 [0x0000000003304d80+0x66] >> J 2906 C1 java.awt.EventQueue$4.run()Ljava/lang/Object; (5 bytes) @ >> 0x000000000379652f [0x0000000003796100+0x42f] >> v ~StubRoutines::call_stub >> J 1338 >> >> java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; >> (0 bytes) @ 0x0000000003304de6 [0x0000000003304d80+0x66] >> J 2868 C2 java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V (80 >> bytes) >> @ 0x0000000003510f74 [0x0000000003510ae0+0x494] >> J 3991 C2 java.awt.EventDispatchThread.pumpOneEventForFilters(I)V (295 >> bytes) @ 0x0000000003639600 [0x00000000036390c0+0x540] >> J 2890% C2 >> >> java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V >> (47 bytes) @ 0x0000000003334f0c [0x0000000003334dc0+0x14c] >> j >> >> java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11 >> j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4 >> j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3 >> j java.awt.EventDispatchThread.run()V+9 >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/VTK-application-crash-on-virtual-machine-tp5738136.html >> Sent from the VTK - Users mailing list archive at Nabble.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 >> > > > _______________________________________________ > 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 > > -- Patricio Palma Contreras -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakota_63124 at yahoo.com Thu May 19 20:44:18 2016 From: dakota_63124 at yahoo.com (kent myers) Date: Thu, 19 May 2016 17:44:18 -0700 (MST) Subject: [vtkusers] VTK application crash on virtual machine In-Reply-To: References: <1463628691157-5738136.post@n5.nabble.com> Message-ID: <1463705058044-5738151.post@n5.nabble.com> I am not sure if I was clear about what I am doing. I am running a Java VTK application in Eclipse inside a VMWare virtual machine. The VMWare virtual machine is running Windows 10. When I run this environment on my native desktop Windows 10 system, it works fine. My first thought was that it might be a threading issue since my JVM traceback looks very similar to one I saw posted by someone else who was having a threading issue. My implementation is already putting all the VTK calls inside a SwingUtilities.invokeLater(), so I believe this should address the common threading issue. If you still think this could be an opengl issue, please let me know. Thanks, Kent -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-application-crash-on-virtual-machine-tp5738136p5738151.html Sent from the VTK - Users mailing list archive at Nabble.com. From macden56 at gmail.com Fri May 20 07:44:56 2016 From: macden56 at gmail.com (mack563) Date: Fri, 20 May 2016 04:44:56 -0700 (MST) Subject: [vtkusers] ++1-888-959-6787 Norton 360 customer service number Message-ID: <1463744696265-5738155.post@n5.nabble.com> California 1888 959 6787 Norton pro advisor support phone number, 1..888..959..6787 Intuit Norton payroll Support Number Norton Toll Free, Intuit@(1-888-959-6787)@-: Norton Tech Support Phone Number provides online solution for all USA/CANADA clients. For any help of query call 1 888 959 6787 to get all Norton account solution. @@Call, 1-888-959-6787 for all type help by Norton tech support phone number, Intuit Norton Tech Support Phone Number, Norton Help Desk Phone Number, Norton tech support number, Norton technical support phone number,@@@ Norton phone number, Norton technical support number, Norton support phone number, Norton technical support, Norton Customer Service Phone Number, Norton Customer Service Number, Norton Customer Support Phone Number, Norton Customer Support Number,@@@@ Norton Customer Service Helpline Number, Norton Customer Care Number, Norton support team phone number, @@@@@ Norton help number-Norton Helpline Number; Norton help phone number-Norton Helpline Number, Norton Tech Support Toll free Number, Norton Support Telephone Number, Norton Tech Support Telephone number, Norton Tech Support contact number, Norton support contact number, Norton technical support contact number. Call, Norton tech support phone number, Intuit Norton Tech Support Phone Number, Norton Help Desk Phone Number, Norton tech support number, Norton technical support phone number, Norton phone number, Norton technical support number, Norton support phone number. It is very popular toll free number which provide by Norton technical support, Norton Customer Service Phone Number, Norton Customer Service Number, Norton Customer Support Phone Number, Norton Customer Support Number, Norton Customer Service Helpline Number, Norton Customer Care Number, Norton support team phone number. Call, Norton tech support phone number, Intuit Norton Tech Support Phone Number, Norton Help Desk Phone Number, Norton tech support number, Norton technical support phone number, Norton phone number, Norton technical support number, Norton support phone number, Norton technical support, Norton Customer Service Phone Number, Norton Customer Service Number, Norton Customer Support Phone Number, Norton Customer Support Number, Norton Customer Service Helpline Number, Norton Customer Care Number, Norton support team phone number, Norton help number-Norton Helpline Number; Norton help phone number, Norton Helpline Number, Norton Tech Support Toll free Number, Norton Support Telephone Number, Norton Tech Support Telephone number, Norton Tech Support contact number, Norton support contact number, Norton technical support contact number, Norton pro support phone number, Norton payroll support phone number. Norton payroll customer support phone number 1888-959-6787 Norton technical help telephone number, Norton technical help contact number, Norton technical support contact number, Norton contact number, Norton contact phone number, Norton contact telephone number, Norton 24 hour contact number, Norton customer support contact number, Norton customer service contact number, Norton official number, Norton official contact number, Norton 888 contact number, Norton toll free number, 888 number for Norton support, Norton 24/7 support phone number Norton PRO support phone number,Norton PRO support phone number,Norton PRO help phone number, Norton PRO technical support number.Norton PRO support number, Norton PRO phone number, Norton PRO tech support number, Norton PRO customer support number, Norton PRO customer support phone number, Norton PRO customer service phone number, Norton PRO payroll customer service phone number, Norton PRO support phone number. Help at Call 1-888-959-6787/.Norton 24/7 support phone number,Norton telephone number for support? call 1888-959-6787 at ./Norton contact number, Norton contact phone number, Norton contact telephone number,,telephone number for Norton online support,Norton official support number,Norton official number,Norton payroll official phone number,,,phone number for Norton payroll support,,Norton 24/7 support phone number,,Norton support number,Norton telephone number for support for all type help by Norton Antivrus technical support phone number Norton Antivrus Toll Free, Intuit@(1-888-959-6787)@-:Norton Antivrus Tech Support Phone Number provides online solution for all USA/CANADA clients. For any help of query call 1 888 959 6787 to get all Norton Antivrus account solution. @@Call, 1-888-959-6787 for all type help by Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number,@@@ Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number,@@@@ Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, @@@@@ Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number-Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number. It is very popular toll free number which provide by Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number, Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number, Norton Antivrus pro support phone number, Norton Antivrus payroll support phone number. Norton Antivrus payroll customer support phone number Norton Antivrus Support Helpline Number, Norton Antivrus contact number Norton Antivrus tech support phone number Intuit Norton Antivrus Tech Support Phone Number Norton Antivrus Help Desk Phone Number Norton Antivrus tech support number Norton Antivrus technical support phone number Norton Antivrus phone number Norton Antivrus technical support number Norton Antivrus support phone number Norton Antivrus technical support Norton Antivrus Customer Service Phone Number Norton Antivrus Customer Service Number Norton Antivrus Customer Support Phone Number for all type help by Norton Antivrus technical support phone number Norton Antivrus Toll Free, Intuit@(1-888-959-6787)@-:Norton Antivrus Tech Support Phone Number provides online solution for all USA/CANADA clients. For any help of query call 1 888 959 6787 to get all Norton Antivrus account solution. @@Call, 1-888-959-6787 for all type help by Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number,@@@ Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number,@@@@ Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, @@@@@ Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number-Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number. It is very popular toll free number which provide by Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number, Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number, Norton Antivrus pro support phone number, Norton Antivrus payroll support phone number. Norton Antivrus payroll customer support phone number Norton Antivrus Support Helpline Number, Norton Antivrus contact number Norton Antivrus tech support phone number Intuit Norton Antivrus Tech Support Phone Number Norton Antivrus Help Desk Phone Number Norton Antivrus tech support number Norton Antivrus technical support phone number Norton Antivrus phone number Norton Antivrus technical support number Norton Antivrus support phone number Norton Antivrus technical support Norton Antivrus Customer Service Phone Number Norton Antivrus Customer Service Number Norton Antivrus Customer Support Phone Number for all type help by Norton Antivrus technical support phone number Norton Antivrus Toll Free, Intuit@(1-888-959-6787)@-:Norton Antivrus Tech Support Phone Number provides online solution for all USA/CANADA clients. For any help of query call 1 888 959 6787 to get all Norton Antivrus account solution. @@Call, 1-888-959-6787 for all type help by Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number,@@@ Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number,@@@@ Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, @@@@@ Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number-Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number. It is very popular toll free number which provide by Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number, Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number, Norton Antivrus pro support phone number, Norton Antivrus payroll support phone number. Norton Antivrus payroll customer support phone number Norton Antivrus Support Helpline Number, Norton Antivrus contact number Norton Antivrus tech support phone number Intuit Norton Antivrus Tech Support Phone Number Norton Antivrus Help Desk Phone Number Norton Antivrus tech support number Norton Antivrus technical support phone number Norton Antivrus phone number Norton Antivrus technical support number Norton Antivrus support phone number Norton Antivrus technical support Norton Antivrus Customer Service Phone Number Norton Antivrus Customer Service Number Norton Antivrus Customer Support Phone Number for all type help by Norton Antivrus technical support phone number Norton Antivrus Toll Free, Intuit@(1-888-959-6787)@-:Norton Antivrus Tech Support Phone Number provides online solution for all USA/CANADA clients. For any help of query call 1 888 959 6787 to get all Norton Antivrus account solution. @@Call, 1-888-959-6787 for all type help by Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number,@@@ Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number,@@@@ Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, @@@@@ Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number-Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number. It is very popular toll free number which provide by Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number, Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number, Norton Antivrus pro support phone number, Norton Antivrus payroll support phone number. Norton Antivrus payroll customer support phone number Norton Antivrus Support Helpline Number, Norton Antivrus contact number Norton Antivrus tech support phone number Intuit Norton Antivrus Tech Support Phone Number Norton Antivrus Help Desk Phone Number Norton Antivrus tech support number Norton Antivrus technical support phone number Norton Antivrus phone number Norton Antivrus technical support number Norton Antivrus support phone number Norton Antivrus technical support Norton Antivrus Customer Service Phone Number Norton Antivrus Customer Service Number Norton Antivrus Customer Support Phone Number for all type help by Norton Antivrus technical support phone number Norton Antivrus Toll Free, Intuit@(1-888-959-6787)@-:Norton Antivrus Tech Support Phone Number provides online solution for all USA/CANADA clients. For any help of query call 1 888 959 6787 to get all Norton Antivrus account solution. @@Call, 1-888-959-6787 for all type help by Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number,@@@ Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number,@@@@ Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, @@@@@ Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number-Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number. It is very popular toll free number which provide by Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number, Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number, Norton Antivrus pro support phone number, Norton Antivrus payroll support phone number. Norton Antivrus payroll customer support phone number Norton Antivrus Support Helpline Number, Norton Antivrus contact number Norton Antivrus tech support phone number Intuit Norton Antivrus Tech Support Phone Number Norton Antivrus Help Desk Phone Number Norton Antivrus tech support number Norton Antivrus technical support phone number Norton Antivrus phone number Norton Antivrus technical support number Norton Antivrus support phone number Norton Antivrus technical support Norton Antivrus Customer Service Phone Number Norton Antivrus Customer Service Number Norton Antivrus Customer Support Phone Number for all type help by Norton Antivrus technical support phone number Norton Antivrus Toll Free, Intuit@(1-888-959-6787)@-:Norton Antivrus Tech Support Phone Number provides online solution for all USA/CANADA clients. For any help of query call 1 888 959 6787 to get all Norton Antivrus account solution. @@Call, 1-888-959-6787 for all type help by Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number,@@@ Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number,@@@@ Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, @@@@@ Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number-Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number. It is very popular toll free number which provide by Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number. Call, Norton Antivrus tech support phone number, Intuit Norton Antivrus Tech Support Phone Number, Norton Antivrus Help Desk Phone Number, Norton Antivrus tech support number, Norton Antivrus technical support phone number, Norton Antivrus phone number, Norton Antivrus technical support number, Norton Antivrus support phone number, Norton Antivrus technical support, Norton Antivrus Customer Service Phone Number, Norton Antivrus Customer Service Number, Norton Antivrus Customer Support Phone Number, Norton Antivrus Customer Support Number, Norton Antivrus Customer Service Helpline Number, Norton Antivrus Customer Care Number, Norton Antivrus support team phone number, Norton Antivrus help number-Norton Antivrus Helpline Number; Norton Antivrus help phone number, Norton Antivrus Helpline Number, Norton Antivrus Tech Support Toll free Number, Norton Antivrus Support Telephone Number, Norton Antivrus Tech Support Telephone number, Norton Antivrus Tech Support contact number, Norton Antivrus support contact number, Norton Antivrus technical support contact number, Norton Antivrus pro support phone number, Norton Antivrus payroll support phone number. Norton Antivrus payroll customer support phone number Norton Antivrus Support Helpline Number, Norton Antivrus contact number Norton Antivrus tech support phone number Intuit Norton Antivrus Tech Support Phone Number Norton Antivrus Help Desk Phone Number Norton Antivrus tech support number Norton Antivrus technical support phone number Norton Antivrus phone number Norton Antivrus technical support number Norton Antivrus support phone number Norton Antivrus technical support Norton Antivrus Customer Service Phone Number Norton Antivrus Customer Service Number Norton Antivrus Customer Support Phone Number -- View this message in context: http://vtk.1045678.n5.nabble.com/1-888-959-6787-Norton-360-customer-service-number-tp5738155.html Sent from the VTK - Users mailing list archive at Nabble.com. From flaviu2 at yahoo.com Fri May 20 08:08:25 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Fri, 20 May 2016 12:08:25 +0000 (UTC) Subject: [vtkusers] No LookupTable was set but input data is not VTK_UNSIGNED_CHAR In-Reply-To: References: <1419830660.375519.1462969174320.JavaMail.yahoo@mail.yahoo.com> <1446659382.1186392.1463058384723.JavaMail.yahoo@mail.yahoo.com> <378522838.1414255.1463124148242.JavaMail.yahoo@mail.yahoo.com> <957548478.2248004.1463203275627.JavaMail.yahoo@mail.yahoo.com> <1939650259.5400669.1463661347007.JavaMail.yahoo@mail.yahoo.com> <1475658317.5441283.1463664630216.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1496461798.6032131.1463746105306.JavaMail.yahoo@mail.yahoo.com> Hi David.Because of your excellent explanation, I have found my mistake ... after I had setup WL correctly on LUT on vtkImageMapToColors, I had taken these values, and setup vtkImageActor WL. Here is the code that I had used: // read the CT vtkDICOMReader* m_pDICOMReader = vtkDICOMReader::New(); m_pDICOMReader->RemoveAllInputs(); vtkDICOMApplyRescale* m_pRescale = vtkDICOMApplyRescale::New(); m_pDICOMReader->SetFileNames(pFN); // all files from serie m_pDICOMReader->AutoRescaleOff(); m_pDICOMReader->Update(); m_pRescale->SetInputConnection(m_pDICOMReader->GetOutputPort()); m_pRescale->Update();vtkImageReslice* m_pResliceAxial = vtkImageReslice::New(); m_pResliceAxial->SetInputConnection(m_pRescale->GetOutputPort()); // setup LUT vtkLookupTable* m_pLUTAxial = vtkLookupTable::New(); m_pLUTAxial->SetValueRange(0.0, 1.0); // from black to white m_pLUTAxial->SetSaturationRange(0.0, 0.0); // no color saturation vtkDICOMMetaData* pMeta = m_pDICOMReader->GetMetaData(); const vtkDICOMValue& window = pMeta->GetAttributeValue(DC::WindowWidth); const vtkDICOMValue& level = pMeta->GetAttributeValue(DC::WindowCenter); double dWindow = window.AsDouble(); double dLevel = level.AsDouble(); m_pLUTAxial->SetRange(dLevel - 0.5 * dWindow, dLevel + 0.5 * dWindow); // image intensity range m_pLUTAxial->SetRampToLinear(); m_pLUTAxial->Build(); vtkImageMapToColors* m_pColorAxial = vtkImageMapToColors::New(); m_pColorAxial->SetLookupTable(m_pLUTAxial);???? // setup LUT m_pColorAxial->SetInputConnection(m_pResliceAxial->GetOutputPort()); vtkImageActor* m_pImageActor = vtkImageActor::New(); // and then, forward, setup m_pColorAxial to an image actor: pImageActor->GetMapper()->SetInputConnection(m_pColorAxial->GetOutputPort()); // and add image actor to a renderer m_pRenderer->AddActor(m_pImageActor); // setup the actor WL with original values - my misake - that is why the image was whiter m_pImageActor->GetProperty()->SetColorWindow(dWindow);? // !! these are lines that I have removed m_pImageActor->GetProperty()->SetColorLevel(dLevel);??? // !! these are lines that I have removed Now everything are working well. "And the values (W: 80, L: 35) that are shown on the image... where do they come from?" These values are coming from the original DICOM images, and?it has been taken like this: void CMyDoc::GetOriginalWindowLevel(double& dWindow, double& dLevel, BOOL bUpdateReader/* = FALSE*/) { ?if(NULL == m_pDICOMReader) ??return; ?if(bUpdateReader) ??m_pDICOMReader->Update(); ?vtkDICOMMetaData* pMeta = m_pDICOMReader->GetMetaData(); ?const vtkDICOMValue& window = pMeta->GetAttributeValue(DC::WindowWidth); ?const vtkDICOMValue& level = pMeta->GetAttributeValue(DC::WindowCenter); ?dWindow = window.AsDouble(); ?dLevel = level.AsDouble(); } "but you posted code, and an output image that the code produced.? So I am confused.? Did the code crash?? Or did it just display an error message?" In the code case without using LUT, the program has started, and shown images like the original ones ... but after few image handling (zooming, moving, etc.) the program?was crashed. All time when I handling the image (before crash, of course), the debugger shows me the error like in the post title: "No LookupTable was set but input data is not VTK_UNSIGNED_CHAR". One thing is sure: without your help, I would didn't make it ! I really appreciate your help ! Kindly thank you David ! Flaviu. -------------- next part -------------- An HTML attachment was scrubbed... URL: From patriciop at gmail.com Fri May 20 10:51:38 2016 From: patriciop at gmail.com (Patricio Palma C.) Date: Fri, 20 May 2016 10:51:38 -0400 Subject: [vtkusers] Fwd: Qt Events example crashes with VTK 6.3 OpenGL2 In-Reply-To: <20160518132746.1488446936@mail.rogue-research.com> References: <20160518132746.1488446936@mail.rogue-research.com> Message-ID: Thanks for the comments. Now we are using VTK 7.0 OpenGL2 with Qt 5.6 through vtkGUISupportQt module. The structures are displayed fine but now it crashes in libX11 when destroying the QVTKWidget. Program received signal SIGSEGV, Segmentation fault. 0x00002aaaaaf787fb in _XSend () from /usr/lib64/libX11.so.6 (gdb) bt #0 0x00002aaaaaf787fb in _XSend () from /usr/lib64/libX11.so.6 #1 0x00002aaaaaf78cb5 in _XFlush () from /usr/lib64/libX11.so.6 #2 0x00002aaaaaf7b725 in _XGetRequest () from /usr/lib64/libX11.so.6 #3 0x00002aaaaaf7491b in XSync () from /usr/lib64/libX11.so.6 #4 0x00002aaaac6ab36a in XMesaGarbageCollect () at src/gallium/state_trackers/glx/xlib/xm_api.c:1359 #5 0x00002aaaac6ae7ce in glXDestroyContext (dpy=, ctx=0x19ee7570) at src/gallium/state_trackers/glx/xlib/glx_api.c:1422 #6 0x00002aaab1139b3e in vtkXOpenGLRenderWindow::DestroyWindow (this=0xc13dfb0) at /MyPRJ/vtk70-src/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:719 #7 0x00002aaab113a635 in vtkXOpenGLRenderWindow::Finalize (this=0xc13dfb0) at //MyPRJ/vtk70-src/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:1005 #8 0x00002aaab3da3ebf in QVTKWidget::SetRenderWindow (this=0x18d673e0, w=0x0) at /MyPRJ/vtk70-src/GUISupport/Qt/QVTKWidget.cxx:192 #9 0x00002aaab3da3ca2 in QVTKWidget::~QVTKWidget (this=0x18d673e0, __in_chrg=) at /MyPRJ/vtk70-src/GUISupport/Qt/QVTKWidget.cxx:113 Does anybody knows what could be the cause for that crash? Thanks On Wed, May 18, 2016 at 9:27 AM, Sean McBride wrote: > On Wed, 18 May 2016 00:10:35 -0400, Patricio Palma C. said: > > >I'm using the Events example provided in VTK sources (Examples/GUI/Qt/) > >using VTK 6.3 with OpenGL2 and Qt 5.6 by using QVTKWidget. However the > >resulting application is unstable and crashes most of the times either in > >X11lib or in MesaLib. > > The OpenGL2 backend was experimental (and non-default) in VTK 6. You > might try switching to OpenGL1 or to VTK 7. > > Cheers, > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > -- Patricio Palma Contreras -------------- next part -------------- An HTML attachment was scrubbed... URL: From enzo.ferlin at micromar.com Fri May 20 13:34:41 2016 From: enzo.ferlin at micromar.com (Enzo Matsumiya) Date: Fri, 20 May 2016 14:34:41 -0300 Subject: [vtkusers] Camera's SetPosition has no effect Message-ID: <3380A9D2-156E-43F7-ADEC-C898FF69A542@micromar.com> Hi, I have a vtkResliceImageViewer with axial slices from a DICOM set but they are displayed flipped. Some of the solutions I found was to change camera's position and view up vector. The view up updates correctly, but the position doesn't. cam->SetFocalPoint(0,0,0); cam->SetPosition(0,0,-1); // <<<< here if I use 0,0,1 there's no difference cam->SetViewUp(0,-1,0); I'm trying to achieve a horizontal flip. (The vertical flip is already effective with the 0,-1,0 view up) Am I missing something? Thanks in advance, Enzo From rickfrank at me.com Fri May 20 16:46:15 2016 From: rickfrank at me.com (Richard Frank) Date: Fri, 20 May 2016 20:46:15 +0000 (GMT) Subject: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx, continued In-Reply-To: Message-ID: <8c4ae5e3-27e2-49f6-afc9-d3043d4fec6f@me.com> Hi, I was able to fix the problem by a simple modification to?raycasterfs.glsl. At line 45 I added? vec3 g_aspect; I touched the CMakeLists.txt file in?Y:\ThirdParty\vtk700\Rendering\VolumeOpenGL2 so that?vtkEncodeString would rebuild the shader, rebuilt VTK and that allows my test program to render correctly without crash I will also fix locally the check for null pointer problem. I'm surprised it hasn't surfaced before. I will try this with our full application and hopefully that is the correct fix. Rick Frank ------------------------------ . Message: 15 Date: Wed, 4 May 2016 06:51:46 -0400 From: Aashish Chaudhary To: Richard Frank Cc: Alvaro Sanchez , VTK Users ? ? Subject: Re: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx, ? ? ?continued Message-ID: ? ? Content-Type: text/plain; charset="utf-8" Hi Rick, Not yet, we were looking into another bug. One of our team member will look into it and will get back to the mailing list. Thanks for your test script. Thanks, On Tue, May 3, 2016 at 6:10 PM, Richard Frank wrote: Hi, Were you able to reproduce the issue with LightKit (or the source I posted to Dropbox)? I?m hoping to migrate to 7.0 as soon as we can. Thanks Rick Frank Re: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx, continued Message-ID: Content-Type: text/plain; charset="utf-8" Thanks Rick for giving us the case for reproducing the error. I will have someone look into it. Thanks, Hi, I was able to isolate?the problem. We are using vtkLightKit in our application. Here is a small app that will demonstrate the problem https://www.dropbox.com/s/crwlm6njmqvdrz4/Source.7z?dl=0 But basically all you have to do is: vtkSmartPointer lightKit = vtkSmartPointer::New(); lightKit->AddLightsToRenderer(ren1); and render a volume and the shader fails to compile. Can you verify? Also, while in there the code this->Impl->ShaderProgram = this->Impl->ShaderCache->ReadyShaderProgram( vertexShader.c_str(), fragmentShader.c_str(), ""); if (!this->Impl->ShaderProgram->GetCompiled()) { vtkErrorMacro("Shader failed to compile"); } should be changed to? if (this->Impl->ShaderProgram == nullptr || !this->Impl->ShaderProgram->GetCompiled()) { } as?ReadyShaderProgram returns nullptr at least in this case (which causes the crash) Let me ?know if you can repro and, if you fix it I will fetch from git and try again. Thanks! Rick Frank -- ************************ -------------- next part -------------- An HTML attachment was scrubbed... URL: From yxliuwm at gmail.com Fri May 20 19:25:47 2016 From: yxliuwm at gmail.com (Yixun Liu) Date: Fri, 20 May 2016 16:25:47 -0700 Subject: [vtkusers] render a CT chest image Message-ID: Hi All, I have a 3D CT chest image. I can adjust the color and opacity mapping functions to make the bone or the lung looks very good. However, it is very difficult to adjust the mapping functions to make both look good simultaneously. How do deal with it? Use layer rendering? Thanks a lot. Yixun -------------- next part -------------- An HTML attachment was scrubbed... URL: From fjw187104199167 at 126.com Sat May 21 09:30:12 2016 From: fjw187104199167 at 126.com (fanjwCMS) Date: Sat, 21 May 2016 06:30:12 -0700 (MST) Subject: [vtkusers] 2D contour from DICOM RTStruct Message-ID: <1463837412437-5738166.post@n5.nabble.com> Dear expert, did anyone know how to extract all the 2D contours from DICOM RTStruct and convert these contours into image?? Thanks so much -- View this message in context: http://vtk.1045678.n5.nabble.com/2D-contour-from-DICOM-RTStruct-tp5738166.html Sent from the VTK - Users mailing list archive at Nabble.com. From ahmad_koujan at yahoo.de Sat May 21 11:18:42 2016 From: ahmad_koujan at yahoo.de (ahmad_koujan at yahoo.de) Date: Sat, 21 May 2016 16:18:42 +0100 Subject: [vtkusers] WG: vtkImagedata std :: vector < vtkImageData * > images; Get the value from picked position and from each vtkimagedata In-Reply-To: <1903422463.351835.1463840578920.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1463843922.77370.YahooMailMobile@web172302.mail.ir2.yahoo.com> An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Mon May 23 05:21:12 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Mon, 23 May 2016 11:21:12 +0200 Subject: [vtkusers] 2D contour from DICOM RTStruct In-Reply-To: <1463837412437-5738166.post@n5.nabble.com> References: <1463837412437-5738166.post@n5.nabble.com> Message-ID: Check out vtkGDCMPolyDataReader. It?s part of the GDCM library and can be used to import your DICOM RTStruct images to vtkPolyData. > On 21 May 2016, at 15:30, fanjwCMS wrote: > > > Dear expert, > did anyone know how to extract all the 2D contours from DICOM RTStruct > and convert these contours into image?? Thanks so much > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/2D-contour-from-DICOM-RTStruct-tp5738166.html > Sent from the VTK - Users mailing list archive at Nabble.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 From elvis.stansvik at orexplore.com Mon May 23 09:00:41 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 15:00:41 +0200 Subject: [vtkusers] Disabling chart axis titles? Message-ID: At the moment I'm doing chart.GetAxis(vtkAxis.LEFT).SetTitle("") chart.GetAxis(vtkAxis.BOTTOM).SetTitle("") Is there some other way that is more definitive than setting the titles to "", or is this how you normally disable titles? Cheers, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From fjw187104199167 at 126.com Mon May 23 09:17:31 2016 From: fjw187104199167 at 126.com (fanjwCMS) Date: Mon, 23 May 2016 06:17:31 -0700 (MST) Subject: [vtkusers] 2D contour from DICOM RTStruct In-Reply-To: References: <1463837412437-5738166.post@n5.nabble.com> Message-ID: <1464009451480-5738170.post@n5.nabble.com> Yes, I already get to this step. I use the vtkGDCMPolyDataReader to read my DICOM RTStruct and obtain the vtkPolyData. But what I want is the contour in each slice not the entire 3D one, how can I get to this? Thanks so much. -- View this message in context: http://vtk.1045678.n5.nabble.com/2D-contour-from-DICOM-RTStruct-tp5738166p5738170.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.stansvik at orexplore.com Mon May 23 09:35:11 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 15:35:11 +0200 Subject: [vtkusers] Use transfer function editors from Python? In-Reply-To: References: Message-ID: 2016-04-15 18:54 GMT+02:00 Elvis Stansvik : > 2016-04-15 18:51 GMT+02:00 Cory Quammen : > >> On Fri, Apr 15, 2016 at 11:46 AM, Elvis Stansvik >> wrote: >> > 2016-04-15 16:36 GMT+02:00 Elvis Stansvik > >: >> >> >> >> 2016-04-15 16:09 GMT+02:00 Cory Quammen : >> >>> >> >>> Hi Elvis, >> >>> >> >>> Have a look at >> >>> >> >>> >> >>> >> http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Charts/Core/Testing/Cxx/TestScalarsToColors.cxx >> >>> >> >>> for an example of how to set up the transfer function editors used in >> >>> ParaView. >> >>> >> >>> You can eliminate the check at the end for vtkOpenGL2ContextDevice2D - >> >>> make sure to initialize and start the interactor, though. >> >>> >> >>> I don't see anything in this example that won't work in Python - if >> >>> there is, please report back any problems you encounter. >> >> >> >> >> >> Excellent, thanks a lot. I'll report back how it went. >> > >> > >> > Worked like a charm :) It's not quite the same as the editors in >> ParaView >> > though. In ParaView, the opacity and color transfer functions are edited >> > separately, like this: >> > >> > https://blog.kitware.com/blog/files/48_1536770536.png >> > >> > Do you know if it's possible to get that kind of editing through VTK >> > classes, with the color transfer function edited using a gradient editor >> > below and the X/Y editor only for the the opacity transfer function, or >> is >> > ParaView doing something custom here? >> >> Yes. You can use a vtkPiecewiseFunctionItem and >> vtkPiecewiseControlePointsItem to edit the opacity function and a >> vtkColorTransferFunctionItem and a vtkColorTransferControlPointsItem >> to edit the color transfer function. These can be displayed in two >> separate widgets, much like ParaView does. In each widget, you can >> have a vtkContextView. This is probably the easiest implementation for >> what you are after. >> > > Ah, excellent. Thanks. It was the vtkPiecewiseFunctionItem I was missing. > Was searching for something called "opacity" or somesuch, but makes sense > it's just a general piecewise function editor class. > Had to take a long break from this particular task, but now I'm back. I have a short and hopefully simple question about the above: When you say "In each widget, you can have a vtkContextView." I'm not quite sure how I add a vtkContextView to my widget (QVTKRenderWindowInteractor). I mean, how I establish a link between them. Should I * Set the render window of the context view to the render window of the QVTKRenderWindowInteractor using SetRenderView(...)? * Get the renderer of the context view with GetRenderer() and add it to the render window of the QVTKRenderWindowInteractor using AddRenderer(...)? * Something else? Sorry if this is obvious, but it's a little hard to navigate the VTK classes and figure out how they are to be used together :) Thanks in advance, Elvis > Elvis > > >> Cory >> >> > (I the class vtkCompositeTransferFunctionItem has "composite" in its >> name >> > precisely because it provides editing of both color/opacity in the same >> > editor, while I would like the separated approach that ParaView has.) >> > >> > Elvis >> > >> >> >> >> Elvis >> >> >> >>> >> >>> >> >>> HTH, >> >>> Cory >> >>> >> >>> On Fri, Apr 15, 2016 at 8:54 AM, Elvis Stansvik >> >>> wrote: >> >>> > Hi all, >> >>> > >> >>> > I'd like to use the transfer function editors that VTK seems to >> provide >> >>> > (used by e.g. Paraview) from Python. Is it possible? >> >>> > >> >>> > Looking at >> >>> > >> >>> > http://www.vtk.org/pipermail/vtkusers/2013-December/082410.html >> >>> > >> >>> > I read the slightly worrying: >> >>> > >> >>> > "[...] Save/restore state and python interface are not working >> as >> >>> > expected. [...]" >> >>> > >> >>> > Though that was an old message when the new editors were first >> >>> > introduced in >> >>> > 2013. Is it still the case that the Python interface for the editor >> >>> > classes >> >>> > is not working as expected? >> >>> > >> >>> > Does anyone know of a Python application/example that makes use of >> the >> >>> > editors? (I'm using VTK 6.2 and PyQt 5.5.1). >> >>> > >> >>> > Thanks, >> >>> > Elvis >> >>> > >> >>> > _______________________________________________ >> >>> > 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 >> >>> R&D Engineer >> >>> Kitware, Inc. >> >> >> >> >> > >> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon May 23 09:38:45 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 15:38:45 +0200 Subject: [vtkusers] Use transfer function editors from Python? In-Reply-To: References: Message-ID: 2016-05-23 15:35 GMT+02:00 Elvis Stansvik : > 2016-04-15 18:54 GMT+02:00 Elvis Stansvik : > >> 2016-04-15 18:51 GMT+02:00 Cory Quammen : >> >>> On Fri, Apr 15, 2016 at 11:46 AM, Elvis Stansvik >>> wrote: >>> > 2016-04-15 16:36 GMT+02:00 Elvis Stansvik < >>> elvis.stansvik at orexplore.com>: >>> >> >>> >> 2016-04-15 16:09 GMT+02:00 Cory Quammen : >>> >>> >>> >>> Hi Elvis, >>> >>> >>> >>> Have a look at >>> >>> >>> >>> >>> >>> >>> http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Charts/Core/Testing/Cxx/TestScalarsToColors.cxx >>> >>> >>> >>> for an example of how to set up the transfer function editors used in >>> >>> ParaView. >>> >>> >>> >>> You can eliminate the check at the end for vtkOpenGL2ContextDevice2D >>> - >>> >>> make sure to initialize and start the interactor, though. >>> >>> >>> >>> I don't see anything in this example that won't work in Python - if >>> >>> there is, please report back any problems you encounter. >>> >> >>> >> >>> >> Excellent, thanks a lot. I'll report back how it went. >>> > >>> > >>> > Worked like a charm :) It's not quite the same as the editors in >>> ParaView >>> > though. In ParaView, the opacity and color transfer functions are >>> edited >>> > separately, like this: >>> > >>> > https://blog.kitware.com/blog/files/48_1536770536.png >>> > >>> > Do you know if it's possible to get that kind of editing through VTK >>> > classes, with the color transfer function edited using a gradient >>> editor >>> > below and the X/Y editor only for the the opacity transfer function, >>> or is >>> > ParaView doing something custom here? >>> >>> Yes. You can use a vtkPiecewiseFunctionItem and >>> vtkPiecewiseControlePointsItem to edit the opacity function and a >>> vtkColorTransferFunctionItem and a vtkColorTransferControlPointsItem >>> to edit the color transfer function. These can be displayed in two >>> separate widgets, much like ParaView does. In each widget, you can >>> have a vtkContextView. This is probably the easiest implementation for >>> what you are after. >>> >> >> Ah, excellent. Thanks. It was the vtkPiecewiseFunctionItem I was missing. >> Was searching for something called "opacity" or somesuch, but makes sense >> it's just a general piecewise function editor class. >> > > Had to take a long break from this particular task, but now I'm back. > > I have a short and hopefully simple question about the above: When you say > > "In each widget, you can have a vtkContextView." > > I'm not quite sure how I add a vtkContextView to my widget > (QVTKRenderWindowInteractor). I mean, how I establish a link between them. > > Should I > > * Set the render window of the context view to the render window of the > QVTKRenderWindowInteractor using SetRenderView(...)? > * Get the renderer of the context view with GetRenderer() and add it to > the render window of the QVTKRenderWindowInteractor using AddRenderer(...)? > * Something else? > Another question that comes up is if I need to set the interactor of the context view to the QVTKRenderWindowInteractor using SetInteractor for the interaction to work? Elvis > Sorry if this is obvious, but it's a little hard to navigate the VTK > classes and figure out how they are to be used together :) > > Thanks in advance, > Elvis > > >> Elvis >> >> >>> Cory >>> >>> > (I the class vtkCompositeTransferFunctionItem has "composite" in its >>> name >>> > precisely because it provides editing of both color/opacity in the same >>> > editor, while I would like the separated approach that ParaView has.) >>> > >>> > Elvis >>> > >>> >> >>> >> Elvis >>> >> >>> >>> >>> >>> >>> >>> HTH, >>> >>> Cory >>> >>> >>> >>> On Fri, Apr 15, 2016 at 8:54 AM, Elvis Stansvik >>> >>> wrote: >>> >>> > Hi all, >>> >>> > >>> >>> > I'd like to use the transfer function editors that VTK seems to >>> provide >>> >>> > (used by e.g. Paraview) from Python. Is it possible? >>> >>> > >>> >>> > Looking at >>> >>> > >>> >>> > http://www.vtk.org/pipermail/vtkusers/2013-December/082410.html >>> >>> > >>> >>> > I read the slightly worrying: >>> >>> > >>> >>> > "[...] Save/restore state and python interface are not working >>> as >>> >>> > expected. [...]" >>> >>> > >>> >>> > Though that was an old message when the new editors were first >>> >>> > introduced in >>> >>> > 2013. Is it still the case that the Python interface for the editor >>> >>> > classes >>> >>> > is not working as expected? >>> >>> > >>> >>> > Does anyone know of a Python application/example that makes use of >>> the >>> >>> > editors? (I'm using VTK 6.2 and PyQt 5.5.1). >>> >>> > >>> >>> > Thanks, >>> >>> > Elvis >>> >>> > >>> >>> > _______________________________________________ >>> >>> > 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 >>> >>> R&D Engineer >>> >>> Kitware, Inc. >>> >> >>> >> >>> > >>> >>> >>> >>> -- >>> Cory Quammen >>> R&D Engineer >>> Kitware, Inc. >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon May 23 09:42:39 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 15:42:39 +0200 Subject: [vtkusers] Use transfer function editors from Python? In-Reply-To: References: Message-ID: 2016-05-23 15:38 GMT+02:00 Elvis Stansvik : > 2016-05-23 15:35 GMT+02:00 Elvis Stansvik : > >> 2016-04-15 18:54 GMT+02:00 Elvis Stansvik : >> >>> 2016-04-15 18:51 GMT+02:00 Cory Quammen : >>> >>>> On Fri, Apr 15, 2016 at 11:46 AM, Elvis Stansvik >>>> wrote: >>>> > 2016-04-15 16:36 GMT+02:00 Elvis Stansvik < >>>> elvis.stansvik at orexplore.com>: >>>> >> >>>> >> 2016-04-15 16:09 GMT+02:00 Cory Quammen : >>>> >>> >>>> >>> Hi Elvis, >>>> >>> >>>> >>> Have a look at >>>> >>> >>>> >>> >>>> >>> >>>> http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Charts/Core/Testing/Cxx/TestScalarsToColors.cxx >>>> >>> >>>> >>> for an example of how to set up the transfer function editors used >>>> in >>>> >>> ParaView. >>>> >>> >>>> >>> You can eliminate the check at the end for >>>> vtkOpenGL2ContextDevice2D - >>>> >>> make sure to initialize and start the interactor, though. >>>> >>> >>>> >>> I don't see anything in this example that won't work in Python - if >>>> >>> there is, please report back any problems you encounter. >>>> >> >>>> >> >>>> >> Excellent, thanks a lot. I'll report back how it went. >>>> > >>>> > >>>> > Worked like a charm :) It's not quite the same as the editors in >>>> ParaView >>>> > though. In ParaView, the opacity and color transfer functions are >>>> edited >>>> > separately, like this: >>>> > >>>> > https://blog.kitware.com/blog/files/48_1536770536.png >>>> > >>>> > Do you know if it's possible to get that kind of editing through VTK >>>> > classes, with the color transfer function edited using a gradient >>>> editor >>>> > below and the X/Y editor only for the the opacity transfer function, >>>> or is >>>> > ParaView doing something custom here? >>>> >>>> Yes. You can use a vtkPiecewiseFunctionItem and >>>> vtkPiecewiseControlePointsItem to edit the opacity function and a >>>> vtkColorTransferFunctionItem and a vtkColorTransferControlPointsItem >>>> to edit the color transfer function. These can be displayed in two >>>> separate widgets, much like ParaView does. In each widget, you can >>>> have a vtkContextView. This is probably the easiest implementation for >>>> what you are after. >>>> >>> >>> Ah, excellent. Thanks. It was the vtkPiecewiseFunctionItem I was >>> missing. Was searching for something called "opacity" or somesuch, but >>> makes sense it's just a general piecewise function editor class. >>> >> >> Had to take a long break from this particular task, but now I'm back. >> >> I have a short and hopefully simple question about the above: When you say >> >> "In each widget, you can have a vtkContextView." >> >> I'm not quite sure how I add a vtkContextView to my widget >> (QVTKRenderWindowInteractor). I mean, how I establish a link between them. >> >> Should I >> >> * Set the render window of the context view to the render window of the >> QVTKRenderWindowInteractor using SetRenderView(...)? >> * Get the renderer of the context view with GetRenderer() and add it to >> the render window of the QVTKRenderWindowInteractor using AddRenderer(...)? >> * Something else? >> > > Another question that comes up is if I need to set the interactor of the > context view to the QVTKRenderWindowInteractor using SetInteractor for the > interaction to work? > Ah, I think I found the answer to both questions in vtkRenderViewBase (which vtkContextView inherit): "In order to use the view with a QVTKWidget the following code is required to ensure the interactor and render window are initialized properly. QVTKWidget *widget = new QVTKWidget; vtkContextView *view = vtkContextView::New(); view->SetInteractor(widget->GetInteractor()); widget->SetRenderWindow(view->GetRenderWindow());" So I'll give that a try. Sorry for the noise. Of course interested in if there are any other (undocumented) gotchas here. Elvis > > Elvis > > >> Sorry if this is obvious, but it's a little hard to navigate the VTK >> classes and figure out how they are to be used together :) >> >> Thanks in advance, >> Elvis >> >> >>> Elvis >>> >>> >>>> Cory >>>> >>>> > (I the class vtkCompositeTransferFunctionItem has "composite" in its >>>> name >>>> > precisely because it provides editing of both color/opacity in the >>>> same >>>> > editor, while I would like the separated approach that ParaView has.) >>>> > >>>> > Elvis >>>> > >>>> >> >>>> >> Elvis >>>> >> >>>> >>> >>>> >>> >>>> >>> HTH, >>>> >>> Cory >>>> >>> >>>> >>> On Fri, Apr 15, 2016 at 8:54 AM, Elvis Stansvik >>>> >>> wrote: >>>> >>> > Hi all, >>>> >>> > >>>> >>> > I'd like to use the transfer function editors that VTK seems to >>>> provide >>>> >>> > (used by e.g. Paraview) from Python. Is it possible? >>>> >>> > >>>> >>> > Looking at >>>> >>> > >>>> >>> > >>>> http://www.vtk.org/pipermail/vtkusers/2013-December/082410.html >>>> >>> > >>>> >>> > I read the slightly worrying: >>>> >>> > >>>> >>> > "[...] Save/restore state and python interface are not >>>> working as >>>> >>> > expected. [...]" >>>> >>> > >>>> >>> > Though that was an old message when the new editors were first >>>> >>> > introduced in >>>> >>> > 2013. Is it still the case that the Python interface for the >>>> editor >>>> >>> > classes >>>> >>> > is not working as expected? >>>> >>> > >>>> >>> > Does anyone know of a Python application/example that makes use >>>> of the >>>> >>> > editors? (I'm using VTK 6.2 and PyQt 5.5.1). >>>> >>> > >>>> >>> > Thanks, >>>> >>> > Elvis >>>> >>> > >>>> >>> > _______________________________________________ >>>> >>> > 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 >>>> >>> R&D Engineer >>>> >>> Kitware, Inc. >>>> >> >>>> >> >>>> > >>>> >>>> >>>> >>>> -- >>>> Cory Quammen >>>> R&D Engineer >>>> Kitware, Inc. >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon May 23 09:56:08 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 15:56:08 +0200 Subject: [vtkusers] Use transfer function editors from Python? In-Reply-To: References: Message-ID: 2016-05-23 15:42 GMT+02:00 Elvis Stansvik : > 2016-05-23 15:38 GMT+02:00 Elvis Stansvik : > >> 2016-05-23 15:35 GMT+02:00 Elvis Stansvik : >> >>> 2016-04-15 18:54 GMT+02:00 Elvis Stansvik >>> : >>> >>>> 2016-04-15 18:51 GMT+02:00 Cory Quammen : >>>> >>>>> On Fri, Apr 15, 2016 at 11:46 AM, Elvis Stansvik >>>>> wrote: >>>>> > 2016-04-15 16:36 GMT+02:00 Elvis Stansvik < >>>>> elvis.stansvik at orexplore.com>: >>>>> >> >>>>> >> 2016-04-15 16:09 GMT+02:00 Cory Quammen : >>>>> >>> >>>>> >>> Hi Elvis, >>>>> >>> >>>>> >>> Have a look at >>>>> >>> >>>>> >>> >>>>> >>> >>>>> http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Charts/Core/Testing/Cxx/TestScalarsToColors.cxx >>>>> >>> >>>>> >>> for an example of how to set up the transfer function editors used >>>>> in >>>>> >>> ParaView. >>>>> >>> >>>>> >>> You can eliminate the check at the end for >>>>> vtkOpenGL2ContextDevice2D - >>>>> >>> make sure to initialize and start the interactor, though. >>>>> >>> >>>>> >>> I don't see anything in this example that won't work in Python - if >>>>> >>> there is, please report back any problems you encounter. >>>>> >> >>>>> >> >>>>> >> Excellent, thanks a lot. I'll report back how it went. >>>>> > >>>>> > >>>>> > Worked like a charm :) It's not quite the same as the editors in >>>>> ParaView >>>>> > though. In ParaView, the opacity and color transfer functions are >>>>> edited >>>>> > separately, like this: >>>>> > >>>>> > https://blog.kitware.com/blog/files/48_1536770536.png >>>>> > >>>>> > Do you know if it's possible to get that kind of editing through VTK >>>>> > classes, with the color transfer function edited using a gradient >>>>> editor >>>>> > below and the X/Y editor only for the the opacity transfer function, >>>>> or is >>>>> > ParaView doing something custom here? >>>>> >>>>> Yes. You can use a vtkPiecewiseFunctionItem and >>>>> vtkPiecewiseControlePointsItem to edit the opacity function and a >>>>> vtkColorTransferFunctionItem and a vtkColorTransferControlPointsItem >>>>> to edit the color transfer function. These can be displayed in two >>>>> separate widgets, much like ParaView does. In each widget, you can >>>>> have a vtkContextView. This is probably the easiest implementation for >>>>> what you are after. >>>>> >>>> >>>> Ah, excellent. Thanks. It was the vtkPiecewiseFunctionItem I was >>>> missing. Was searching for something called "opacity" or somesuch, but >>>> makes sense it's just a general piecewise function editor class. >>>> >>> >>> Had to take a long break from this particular task, but now I'm back. >>> >>> I have a short and hopefully simple question about the above: When you >>> say >>> >>> "In each widget, you can have a vtkContextView." >>> >>> I'm not quite sure how I add a vtkContextView to my widget >>> (QVTKRenderWindowInteractor). I mean, how I establish a link between them. >>> >>> Should I >>> >>> * Set the render window of the context view to the render window of the >>> QVTKRenderWindowInteractor using SetRenderView(...)? >>> * Get the renderer of the context view with GetRenderer() and add it to >>> the render window of the QVTKRenderWindowInteractor using AddRenderer(...)? >>> * Something else? >>> >> >> Another question that comes up is if I need to set the interactor of the >> context view to the QVTKRenderWindowInteractor using SetInteractor for the >> interaction to work? >> > > Ah, I think I found the answer to both questions in vtkRenderViewBase > (which vtkContextView inherit): > > "In order to use the view with a QVTKWidget the following code is required > to ensure the interactor and render window are initialized properly. > > QVTKWidget *widget = new QVTKWidget; > vtkContextView *view = vtkContextView::New(); > view->SetInteractor(widget->GetInteractor()); > widget->SetRenderWindow(view->GetRenderWindow());" > How would this work in the context of a QVTKRenderWindowInteractor (the Python Qt widget/interactor)? It does not have a SetRenderWindow(...), instead it takes a rw keyword parameter to its constructor. Does this mean I have to construct the context view before the Qt widget? That feels backwards :/ I think I'd want the context view completely contained within the Qt widget (an implementation detail so to speak). Elvis > > So I'll give that a try. Sorry for the noise. > > Of course interested in if there are any other (undocumented) gotchas here. > > Elvis > > > >> >> Elvis >> >> >>> Sorry if this is obvious, but it's a little hard to navigate the VTK >>> classes and figure out how they are to be used together :) >>> >>> Thanks in advance, >>> Elvis >>> >>> >>>> Elvis >>>> >>>> >>>>> Cory >>>>> >>>>> > (I the class vtkCompositeTransferFunctionItem has "composite" in its >>>>> name >>>>> > precisely because it provides editing of both color/opacity in the >>>>> same >>>>> > editor, while I would like the separated approach that ParaView has.) >>>>> > >>>>> > Elvis >>>>> > >>>>> >> >>>>> >> Elvis >>>>> >> >>>>> >>> >>>>> >>> >>>>> >>> HTH, >>>>> >>> Cory >>>>> >>> >>>>> >>> On Fri, Apr 15, 2016 at 8:54 AM, Elvis Stansvik >>>>> >>> wrote: >>>>> >>> > Hi all, >>>>> >>> > >>>>> >>> > I'd like to use the transfer function editors that VTK seems to >>>>> provide >>>>> >>> > (used by e.g. Paraview) from Python. Is it possible? >>>>> >>> > >>>>> >>> > Looking at >>>>> >>> > >>>>> >>> > >>>>> http://www.vtk.org/pipermail/vtkusers/2013-December/082410.html >>>>> >>> > >>>>> >>> > I read the slightly worrying: >>>>> >>> > >>>>> >>> > "[...] Save/restore state and python interface are not >>>>> working as >>>>> >>> > expected. [...]" >>>>> >>> > >>>>> >>> > Though that was an old message when the new editors were first >>>>> >>> > introduced in >>>>> >>> > 2013. Is it still the case that the Python interface for the >>>>> editor >>>>> >>> > classes >>>>> >>> > is not working as expected? >>>>> >>> > >>>>> >>> > Does anyone know of a Python application/example that makes use >>>>> of the >>>>> >>> > editors? (I'm using VTK 6.2 and PyQt 5.5.1). >>>>> >>> > >>>>> >>> > Thanks, >>>>> >>> > Elvis >>>>> >>> > >>>>> >>> > _______________________________________________ >>>>> >>> > 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 >>>>> >>> R&D Engineer >>>>> >>> Kitware, Inc. >>>>> >> >>>>> >> >>>>> > >>>>> >>>>> >>>>> >>>>> -- >>>>> Cory Quammen >>>>> R&D Engineer >>>>> Kitware, Inc. >>>>> >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Edmunds at icr.ac.uk Mon May 23 10:01:01 2016 From: David.Edmunds at icr.ac.uk (David Edmunds) Date: Mon, 23 May 2016 15:01:01 +0100 Subject: [vtkusers] Traversing vtkPolyData returns incorrect number of points Message-ID: <633A14E1-D5C5-44B3-A4A8-82B96A330747@icr.ac.uk> Dear all, I am traversing a vtkPolyData object which is read in from a file using vtkXMLPolyDataReader. I access the number of points in the vtkPolyData in two different ways, here is my source code: vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("/Users/dedmunds/Desktop/organ_Body.vtp"); reader->Update(); vtkSmartPointer poly_data = reader->GetOutput(); cout << "Number of points: " << poly_data->GetNumberOfPoints() << endl; int traversal_points = 0; for (int i=0; iGetNumberOfCells(); i++) { traversal_points += poly_data->GetCell(i)->GetNumberOfPoints(); } cout << "Traversal number of points: " << traversal_points << endl; Here is the output: Number of points: 286402 Traversal number of points: 143204 Why do I get two different answers? The second number is approximately half the first. What am I doing wrong? Thanks for your help, Kind regards, Dave The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. From elvis.stansvik at orexplore.com Mon May 23 10:55:01 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 16:55:01 +0200 Subject: [vtkusers] Using context views in a QVTKRenderWindowInteractor from Python In-Reply-To: References: Message-ID: 2016-05-23 16:28 GMT+02:00 Elvis Stansvik : > I'm trying to use a context view (my goal is to show an XYChart) inside a > QVTKRenderWindowInteractor, but I'm struggling to get the initialization of > render window / interactor right. > > The docs for vtkRenderViewBase (base class for vtkContextView) says: > > "In order to use the view with a QVTKWidget the following code is required > to ensure the interactor and render window are initialized properly. > > QVTKWidget *widget = new QVTKWidget; > vtkContextView *view = vtkContextView::New(); > view->SetInteractor(widget->GetInteractor()); > widget->SetRenderWindow(view->GetRenderWindow());" > > but this is about QVTKWidget, the C++ widget class, which is quite > different from the Python QVTKRenderWindowInteractor class. > > My failed attempt to recreate this initialization sequence when using > QVTKRenderWindowInteractor is this: > > > class TestWidget(QVTKRenderWindowInteractor): > > def __init__(self, parent=None): > > # We need a render window and interactor to pass to > # QVTKRenderWindowInteractor constructor. > self.renderWindow = vtkRenderWindow() > self.interactor = vtkGenericRenderWindowInteractor() > self.interactor.SetRenderWindow(self.renderWindow) > > super(TestWidget, self).__init__( > parent, rw=self.renderWindow, iren=self.interactor) > > # Create a context view and set it to use the same > # interactor as the QVTKRenderWindowInteractor. > self.contextView = vtkContextView() > self.contextView.SetInteractor(self.interactor) > > # Create chart and add it to the scene of the context view. > self.chart = vtkChartXY() > self.contextView.GetScene().AddItem(self.chart) > > # Initialize and start. > self.Initialize() > self.Start() > > > if __name__ == '__main__': > > app = QApplication(argv) > > widget = TestWidget() > widget.show() > > exit(app.exec_()) > > > But something goes wrong here, because two windows show up (see attached > screenshot). The application also segfaults on exit. Besides, it looks very > kludgy to have to do stuff before the call to super() here. Is this really > the right way to use the API? > > If anyone has worked with QVTKRenderWindowInteractor and vtkContextView, > I'd much appriciate some advice. > Inspired by an older post on this subject [1], I was able to get it partly working with: class TestWidget(QVTKRenderWindowInteractor): def __init__(self, parent=None): super(TestWidget, self).__init__(parent) self.contextView = vtkContextView() self.chart = vtkChartXY() self.contextView.GetScene().AddItem(self.chart) # Add renderer of context view to the render window of the widget. self.GetRenderWindow().AddRenderer(self.contextView.GetRenderer()) self.Initialize() self.Start() The chart is empty here, but I've verified by adding some items to it that it at least shows up correctly, in a single window. The problem is that interaction of course doesn't work, and if I also add self.contextView.SetInteractor(self._Iren) to set the interactor of the context view to the vtkGenericRenderWindowInteractor backing the QVTKRenderWindowInteractor, I'm back to the problem with two windows showing up. I need interaction to work, because my goal is to show an opacity function editor item in the chart. Thankful for any and all advice! Elvis [1] http://www.vtk.org/pipermail/vtkusers/2011-July/068893.html > > Cheers, > Elvis > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Mon May 23 11:03:08 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Mon, 23 May 2016 17:03:08 +0200 Subject: [vtkusers] Disabling chart axis titles? In-Reply-To: References: Message-ID: chart.GetAxis(vtkAxis.LEFT).SetVisible(0); > On 23 May 2016, at 15:00, Elvis Stansvik wrote: > > At the moment I'm doing > > chart.GetAxis(vtkAxis.LEFT).SetTitle("") > chart.GetAxis(vtkAxis.BOTTOM).SetTitle("") > > Is there some other way that is more definitive than setting the titles to "", or is this how you normally disable titles? > > Cheers, > Elvis > _______________________________________________ > 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 fjw187104199167 at 126.com Mon May 23 11:25:43 2016 From: fjw187104199167 at 126.com (fanjwCMS) Date: Mon, 23 May 2016 08:25:43 -0700 (MST) Subject: [vtkusers] vtkRenderWindow problem Message-ID: <1464017143365-5738178.post@n5.nabble.com> Dear expert, when I use vtkRenderWindow to view same plots, I got errors as follows: X Error of failed request: GLXBadFBConfig Major opcode of failed request: 150 (GLX) Minor opcode of failed request: 34 () Serial number of failed request: 39 Current serial number in output stream: 40 How to solve this??? Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkRenderWindow-problem-tp5738178.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.stansvik at orexplore.com Mon May 23 11:28:35 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 17:28:35 +0200 Subject: [vtkusers] Using context views in a QVTKRenderWindowInteractor from Python In-Reply-To: References: Message-ID: 2016-05-23 16:55 GMT+02:00 Elvis Stansvik : > 2016-05-23 16:28 GMT+02:00 Elvis Stansvik : > >> I'm trying to use a context view (my goal is to show an XYChart) inside a >> QVTKRenderWindowInteractor, but I'm struggling to get the initialization of >> render window / interactor right. >> >> The docs for vtkRenderViewBase (base class for vtkContextView) says: >> >> "In order to use the view with a QVTKWidget the following code is >> required to ensure the interactor and render window are initialized >> properly. >> >> QVTKWidget *widget = new QVTKWidget; >> vtkContextView *view = vtkContextView::New(); >> view->SetInteractor(widget->GetInteractor()); >> widget->SetRenderWindow(view->GetRenderWindow());" >> >> but this is about QVTKWidget, the C++ widget class, which is quite >> different from the Python QVTKRenderWindowInteractor class. >> >> My failed attempt to recreate this initialization sequence when using >> QVTKRenderWindowInteractor is this: >> >> >> class TestWidget(QVTKRenderWindowInteractor): >> >> def __init__(self, parent=None): >> >> # We need a render window and interactor to pass to >> # QVTKRenderWindowInteractor constructor. >> self.renderWindow = vtkRenderWindow() >> self.interactor = vtkGenericRenderWindowInteractor() >> self.interactor.SetRenderWindow(self.renderWindow) >> >> super(TestWidget, self).__init__( >> parent, rw=self.renderWindow, iren=self.interactor) >> >> # Create a context view and set it to use the same >> # interactor as the QVTKRenderWindowInteractor. >> self.contextView = vtkContextView() >> self.contextView.SetInteractor(self.interactor) >> >> # Create chart and add it to the scene of the context view. >> self.chart = vtkChartXY() >> self.contextView.GetScene().AddItem(self.chart) >> >> # Initialize and start. >> self.Initialize() >> self.Start() >> >> >> if __name__ == '__main__': >> >> app = QApplication(argv) >> >> widget = TestWidget() >> widget.show() >> >> exit(app.exec_()) >> >> >> But something goes wrong here, because two windows show up (see attached >> screenshot). The application also segfaults on exit. Besides, it looks very >> kludgy to have to do stuff before the call to super() here. Is this really >> the right way to use the API? >> >> If anyone has worked with QVTKRenderWindowInteractor and vtkContextView, >> I'd much appriciate some advice. >> > > Inspired by an older post on this subject [1], I was able to get it partly > working with: > > class TestWidget(QVTKRenderWindowInteractor): > > def __init__(self, parent=None): > super(TestWidget, self).__init__(parent) > > self.contextView = vtkContextView() > self.chart = vtkChartXY() > self.contextView.GetScene().AddItem(self.chart) > > # Add renderer of context view to the render window of the widget. > self.GetRenderWindow().AddRenderer(self.contextView.GetRenderer()) > > self.Initialize() > self.Start() > > The chart is empty here, but I've verified by adding some items to it that > it at least shows up correctly, in a single window. > > The problem is that interaction of course doesn't work, and if I also add > > self.contextView.SetInteractor(self._Iren) > > to set the interactor of the context view to the > vtkGenericRenderWindowInteractor backing the QVTKRenderWindowInteractor, > I'm back to the problem with two windows showing up. > > I need interaction to work, because my goal is to show an opacity function > editor item in the chart. > > Thankful for any and all advice! > To better illustrate, here's the scatter plot Python example from the wiki, with the code I've added to try to make it work with QVTKRenderWindowInteractor. The result is that when the application is executed, a "Visualization Toolkit - OpenGL" window first shows up, where interaction works fine. This is not the Qt window though. The Qt window shows up if I close the first window, and interaction does not work (try hovering the data points). How would this example need to be modified for it to work? (chart shown in the Qt window, with interaction working). Best regards, Elvis # app = QApplication(sys.argv) widget = QVTKRenderWindowInteractor() widget.Initialize() widget.Start() # view = vtk.vtkContextView() view.GetRenderer().SetBackground(1.0, 1.0, 1.0) view.GetRenderWindow().SetSize(400, 300) chart = vtk.vtkChartXY() view.GetScene().AddItem(chart) chart.SetShowLegend(True) table = vtk.vtkTable() arrX = vtk.vtkFloatArray() arrX.SetName('X Axis') arrC = vtk.vtkFloatArray() arrC.SetName('Cosine') arrS = vtk.vtkFloatArray() arrS.SetName('Sine') arrT = vtk.vtkFloatArray() arrT.SetName('Sine-Cosine') table.AddColumn(arrC) table.AddColumn(arrS) table.AddColumn(arrX) table.AddColumn(arrT) numPoints = 40 inc = 7.5 / (numPoints - 1) table.SetNumberOfRows(numPoints) for i in range(numPoints): table.SetValue(i, 0, i * inc) table.SetValue(i, 1, math.cos(i * inc)) table.SetValue(i, 2, math.sin(i * inc)) table.SetValue(i, 3, math.sin(i * inc) - math.cos(i * inc)) points = chart.AddPlot(vtk.vtkChart.POINTS) points.SetInputData(table, 0, 1) points.SetColor(0, 0, 0, 255) points.SetWidth(1.0) points.SetMarkerStyle(vtk.vtkPlotPoints.CROSS) points = chart.AddPlot(vtk.vtkChart.POINTS) points.SetInputData(table, 0, 2) points.SetColor(0, 0, 0, 255) points.SetWidth(1.0) points.SetMarkerStyle(vtk.vtkPlotPoints.PLUS) points = chart.AddPlot(vtk.vtkChart.POINTS) points.SetInputData(table, 0, 3) points.SetColor(0, 0, 255, 255) points.SetWidth(1.0) points.SetMarkerStyle(vtk.vtkPlotPoints.CIRCLE) view.GetRenderWindow().SetMultiSamples(0) view.GetInteractor().Initialize() view.GetInteractor().Start() # widget.GetRenderWindow().AddRenderer(view.GetRenderer()) widget.setWindowTitle('Qt Widget') widget.show() exit(app.exec_()) # > > Elvis > > [1] http://www.vtk.org/pipermail/vtkusers/2011-July/068893.html > > >> >> Cheers, >> Elvis >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon May 23 11:34:56 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 17:34:56 +0200 Subject: [vtkusers] Disabling chart axis titles? In-Reply-To: References: Message-ID: 2016-05-23 17:03 GMT+02:00 Richard Brown : > chart.GetAxis(vtkAxis.LEFT).SetVisible(0); > > Thanks! Elvis > > On 23 May 2016, at 15:00, Elvis Stansvik > wrote: > > At the moment I'm doing > > chart.GetAxis(vtkAxis.LEFT).SetTitle("") > chart.GetAxis(vtkAxis.BOTTOM).SetTitle("") > > Is there some other way that is more definitive than setting the titles to > "", or is this how you normally disable titles? > > Cheers, > Elvis > _______________________________________________ > 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 alexandre.ancel at cemosis.fr Mon May 23 11:34:59 2016 From: alexandre.ancel at cemosis.fr (Alexandre Ancel) Date: Mon, 23 May 2016 17:34:59 +0200 Subject: [vtkusers] vtkRenderWindow problem In-Reply-To: <1464017143365-5738178.post@n5.nabble.com> References: <1464017143365-5738178.post@n5.nabble.com> Message-ID: Hi, Your issue is probably related to this one: http://vtk.1045678.n5.nabble.com/GLXBadFBConfig-on-switching-from-VTK6-to-VTK7-td5738061.html You probably need to revert to the old OpenGL backend, (I had the same issue and it did the trick for me) Regards, Alexandre Ancel On Mon, May 23, 2016 at 5:25 PM, fanjwCMS wrote: > > Dear expert, > when I use vtkRenderWindow to view same plots, I got errors as follows: > > X Error of failed request: GLXBadFBConfig > Major opcode of failed request: 150 (GLX) > Minor opcode of failed request: 34 () > Serial number of failed request: 39 > Current serial number in output stream: 40 > > How to solve this??? Thanks! > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkRenderWindow-problem-tp5738178.html > Sent from the VTK - Users mailing list archive at Nabble.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 > -- Alexandre Ancel Docteur, Ing?nieur de recherche / Phd, Research Engineer Cemosis - alexandre.ancel at cemosis.fr Tel: +33 (0)3 68 8*5 02 06* IRMA - 7, rue Ren? Descartes 67 000 Strasbourg, France -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon May 23 11:51:34 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 23 May 2016 11:51:34 -0400 Subject: [vtkusers] Traversing vtkPolyData returns incorrect number of points In-Reply-To: <633A14E1-D5C5-44B3-A4A8-82B96A330747@icr.ac.uk> References: <633A14E1-D5C5-44B3-A4A8-82B96A330747@icr.ac.uk> Message-ID: Hi David, You have shared points between cells so it is normal you'll get a bigger number when you count all the points from cells. On Mon, May 23, 2016 at 10:01 AM, David Edmunds wrote: > Dear all, > > I am traversing a vtkPolyData object which is read in from a file using > vtkXMLPolyDataReader. I access the number of points in the vtkPolyData in > two different ways, here is my source code: > > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName("/Users/dedmunds/Desktop/organ_Body.vtp"); > reader->Update(); > vtkSmartPointer poly_data = reader->GetOutput(); > > cout << "Number of points: " << poly_data->GetNumberOfPoints() << endl; > > int traversal_points = 0; > for (int i=0; iGetNumberOfCells(); i++) { > traversal_points += poly_data->GetCell(i)->GetNumberOfPoints(); > } > cout << "Traversal number of points: " << traversal_points << endl; > > Here is the output: > > Number of points: 286402 > Traversal number of points: 143204 > > Why do I get two different answers? The second number is approximately > half the first. What am I doing wrong? > > Thanks for your help, > > Kind regards, > > Dave > > The Institute of Cancer Research: Royal Cancer Hospital, a charitable > Company Limited by Guarantee, Registered in England under Company No. > 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. > > This e-mail message is confidential and for use by the addressee only. If > the message is received by anyone other than the addressee, please return > the message to the sender by replying to it and then delete the message > from your computer and network. > _______________________________________________ > 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.Edmunds at icr.ac.uk Mon May 23 12:16:23 2016 From: David.Edmunds at icr.ac.uk (David Edmunds) Date: Mon, 23 May 2016 17:16:23 +0100 Subject: [vtkusers] Traversing vtkPolyData returns incorrect number of points In-Reply-To: References: <633A14E1-D5C5-44B3-A4A8-82B96A330747@icr.ac.uk> Message-ID: <46FD07EA-58D5-47AB-8957-E7F95905DC90@icr.ac.uk> Hi Dan, Thanks, but I actually get a much smaller number when I count all the points from cells. Also, in my input dataset the cells are disjoint, i.e. no points are shared between multiple cells. Kind regards, Dave On 23 May 2016, at 16:51, Dan Lipsa > wrote: Hi David, You have shared points between cells so it is normal you'll get a bigger number when you count all the points from cells. On Mon, May 23, 2016 at 10:01 AM, David Edmunds > wrote: Dear all, I am traversing a vtkPolyData object which is read in from a file using vtkXMLPolyDataReader. I access the number of points in the vtkPolyData in two different ways, here is my source code: vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("/Users/dedmunds/Desktop/organ_Body.vtp"); reader->Update(); vtkSmartPointer poly_data = reader->GetOutput(); cout << "Number of points: " << poly_data->GetNumberOfPoints() << endl; int traversal_points = 0; for (int i=0; iGetNumberOfCells(); i++) { traversal_points += poly_data->GetCell(i)->GetNumberOfPoints(); } cout << "Traversal number of points: " << traversal_points << endl; Here is the output: Number of points: 286402 Traversal number of points: 143204 Why do I get two different answers? The second number is approximately half the first. What am I doing wrong? Thanks for your help, Kind regards, Dave The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. _______________________________________________ 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 The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon May 23 12:43:06 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 18:43:06 +0200 Subject: [vtkusers] Using context views in a QVTKRenderWindowInteractor from Python In-Reply-To: References: Message-ID: Den 23 maj 2016 5:28 em skrev "Elvis Stansvik" : > > 2016-05-23 16:55 GMT+02:00 Elvis Stansvik : >> >> 2016-05-23 16:28 GMT+02:00 Elvis Stansvik : >>> >>> I'm trying to use a context view (my goal is to show an XYChart) inside a QVTKRenderWindowInteractor, but I'm struggling to get the initialization of render window / interactor right. >>> >>> The docs for vtkRenderViewBase (base class for vtkContextView) says: >>> >>> "In order to use the view with a QVTKWidget the following code is required to ensure the interactor and render window are initialized properly. >>> >>> QVTKWidget *widget = new QVTKWidget; >>> vtkContextView *view = vtkContextView::New(); >>> view->SetInteractor(widget->GetInteractor()); >>> widget->SetRenderWindow(view->GetRenderWindow());" >>> >>> but this is about QVTKWidget, the C++ widget class, which is quite different from the Python QVTKRenderWindowInteractor class. >>> >>> My failed attempt to recreate this initialization sequence when using QVTKRenderWindowInteractor is this: >>> >>> >>> class TestWidget(QVTKRenderWindowInteractor): >>> >>> def __init__(self, parent=None): >>> >>> # We need a render window and interactor to pass to >>> # QVTKRenderWindowInteractor constructor. >>> self.renderWindow = vtkRenderWindow() >>> self.interactor = vtkGenericRenderWindowInteractor() >>> self.interactor.SetRenderWindow(self.renderWindow) >>> >>> super(TestWidget, self).__init__( >>> parent, rw=self.renderWindow, iren=self.interactor) >>> >>> # Create a context view and set it to use the same >>> # interactor as the QVTKRenderWindowInteractor. >>> self.contextView = vtkContextView() >>> self.contextView.SetInteractor(self.interactor) >>> >>> # Create chart and add it to the scene of the context view. >>> self.chart = vtkChartXY() >>> self.contextView.GetScene().AddItem(self.chart) >>> >>> # Initialize and start. >>> self.Initialize() >>> self.Start() >>> >>> >>> if __name__ == '__main__': >>> >>> app = QApplication(argv) >>> >>> widget = TestWidget() >>> widget.show() >>> >>> exit(app.exec_()) >>> >>> >>> But something goes wrong here, because two windows show up (see attached screenshot). The application also segfaults on exit. Besides, it looks very kludgy to have to do stuff before the call to super() here. Is this really the right way to use the API? For full disclosure: This is with Qt 5.5.1 and VTK 6 (not sure if 6.2 or 6.3, on the bus atm), on Kubuntu 16.04. Elvis >>> >>> If anyone has worked with QVTKRenderWindowInteractor and vtkContextView, I'd much appriciate some advice. >> >> >> Inspired by an older post on this subject [1], I was able to get it partly working with: >> >> class TestWidget(QVTKRenderWindowInteractor): >> >> def __init__(self, parent=None): >> super(TestWidget, self).__init__(parent) >> >> self.contextView = vtkContextView() >> self.chart = vtkChartXY() >> self.contextView.GetScene().AddItem(self.chart) >> >> # Add renderer of context view to the render window of the widget. >> self.GetRenderWindow().AddRenderer(self.contextView.GetRenderer()) >> >> self.Initialize() >> self.Start() >> >> The chart is empty here, but I've verified by adding some items to it that it at least shows up correctly, in a single window. >> >> The problem is that interaction of course doesn't work, and if I also add >> >> self.contextView.SetInteractor(self._Iren) >> >> to set the interactor of the context view to the vtkGenericRenderWindowInteractor backing the QVTKRenderWindowInteractor, I'm back to the problem with two windows showing up. >> >> I need interaction to work, because my goal is to show an opacity function editor item in the chart. >> >> Thankful for any and all advice! > > > To better illustrate, here's the scatter plot Python example from the wiki, with the code I've added to try to make it work with QVTKRenderWindowInteractor. > > The result is that when the application is executed, a "Visualization Toolkit - OpenGL" window first shows up, where interaction works fine. This is not the Qt window though. The Qt window shows up if I close the first window, and interaction does not work (try hovering the data points). > > How would this example need to be modified for it to work? (chart shown in the Qt window, with interaction working). > > Best regards, > Elvis > > # > app = QApplication(sys.argv) > > widget = QVTKRenderWindowInteractor() > widget.Initialize() > widget.Start() > # > > view = vtk.vtkContextView() > view.GetRenderer().SetBackground(1.0, 1.0, 1.0) > view.GetRenderWindow().SetSize(400, 300) > > chart = vtk.vtkChartXY() > view.GetScene().AddItem(chart) > chart.SetShowLegend(True) > > table = vtk.vtkTable() > > arrX = vtk.vtkFloatArray() > arrX.SetName('X Axis') > > arrC = vtk.vtkFloatArray() > arrC.SetName('Cosine') > > arrS = vtk.vtkFloatArray() > arrS.SetName('Sine') > > arrT = vtk.vtkFloatArray() > arrT.SetName('Sine-Cosine') > > table.AddColumn(arrC) > table.AddColumn(arrS) > table.AddColumn(arrX) > table.AddColumn(arrT) > > numPoints = 40 > > inc = 7.5 / (numPoints - 1) > table.SetNumberOfRows(numPoints) > for i in range(numPoints): > table.SetValue(i, 0, i * inc) > table.SetValue(i, 1, math.cos(i * inc)) > table.SetValue(i, 2, math.sin(i * inc)) > table.SetValue(i, 3, math.sin(i * inc) - math.cos(i * inc)) > > points = chart.AddPlot(vtk.vtkChart.POINTS) > points.SetInputData(table, 0, 1) > points.SetColor(0, 0, 0, 255) > points.SetWidth(1.0) > points.SetMarkerStyle(vtk.vtkPlotPoints.CROSS) > > points = chart.AddPlot(vtk.vtkChart.POINTS) > points.SetInputData(table, 0, 2) > points.SetColor(0, 0, 0, 255) > points.SetWidth(1.0) > points.SetMarkerStyle(vtk.vtkPlotPoints.PLUS) > > points = chart.AddPlot(vtk.vtkChart.POINTS) > points.SetInputData(table, 0, 3) > points.SetColor(0, 0, 255, 255) > points.SetWidth(1.0) > points.SetMarkerStyle(vtk.vtkPlotPoints.CIRCLE) > > view.GetRenderWindow().SetMultiSamples(0) > view.GetInteractor().Initialize() > view.GetInteractor().Start() > > # > widget.GetRenderWindow().AddRenderer(view.GetRenderer()) > widget.setWindowTitle('Qt Widget') > widget.show() > > exit(app.exec_()) > # > >> >> >> Elvis >> >> [1] http://www.vtk.org/pipermail/vtkusers/2011-July/068893.html >> >>> >>> >>> Cheers, >>> Elvis >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon May 23 13:20:59 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 23 May 2016 13:20:59 -0400 Subject: [vtkusers] Traversing vtkPolyData returns incorrect number of points In-Reply-To: <46FD07EA-58D5-47AB-8957-E7F95905DC90@icr.ac.uk> References: <633A14E1-D5C5-44B3-A4A8-82B96A330747@icr.ac.uk> <46FD07EA-58D5-47AB-8957-E7F95905DC90@icr.ac.uk> Message-ID: I see, Well, in this case, you may have points that are not part of any cells. Can you share your data file? On Mon, May 23, 2016 at 12:16 PM, David Edmunds wrote: > Hi Dan, > > Thanks, but I actually get a much smaller number when I count all the > points from cells. Also, in my input dataset the cells are disjoint, i.e. > no points are shared between multiple cells. > > Kind regards, > > Dave > > On 23 May 2016, at 16:51, Dan Lipsa wrote: > > Hi David, > You have shared points between cells so it is normal you'll get a bigger > number when you count all the points from cells. > > On Mon, May 23, 2016 at 10:01 AM, David Edmunds > wrote: > >> Dear all, >> >> I am traversing a vtkPolyData object which is read in from a file using >> vtkXMLPolyDataReader. I access the number of points in the vtkPolyData in >> two different ways, here is my source code: >> >> vtkSmartPointer reader = >> vtkSmartPointer::New(); >> reader->SetFileName("/Users/dedmunds/Desktop/organ_Body.vtp"); >> reader->Update(); >> vtkSmartPointer poly_data = reader->GetOutput(); >> >> cout << "Number of points: " << poly_data->GetNumberOfPoints() << endl; >> >> int traversal_points = 0; >> for (int i=0; iGetNumberOfCells(); i++) { >> traversal_points += poly_data->GetCell(i)->GetNumberOfPoints(); >> } >> cout << "Traversal number of points: " << traversal_points << endl; >> >> Here is the output: >> >> Number of points: 286402 >> Traversal number of points: 143204 >> >> Why do I get two different answers? The second number is approximately >> half the first. What am I doing wrong? >> >> Thanks for your help, >> >> Kind regards, >> >> Dave >> >> The Institute of Cancer Research: Royal Cancer Hospital, a charitable >> Company Limited by Guarantee, Registered in England under Company No. >> 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. >> >> This e-mail message is confidential and for use by the addressee only. >> If the message is received by anyone other than the addressee, please >> return the message to the sender by replying to it and then delete the >> message from your computer and network. >> _______________________________________________ >> 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 >> > > > > The Institute of Cancer Research: Royal Cancer Hospital, a charitable > Company Limited by Guarantee, Registered in England under Company No. > 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. > > This e-mail message is confidential and for use by the addressee only. If > the message is received by anyone other than the addressee, please return > the message to the sender by replying to it and then delete the message > from your computer and network. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From filippo.santarelli at unicam.it Mon May 23 13:56:41 2016 From: filippo.santarelli at unicam.it (Jecko90) Date: Mon, 23 May 2016 10:56:41 -0700 (MST) Subject: [vtkusers] vtkImageResize doesn't resize... Message-ID: <1464026201749-5738186.post@n5.nabble.com> Hi!! I'm trying to resize all the vtkImageActors of a vtkRenderer to a fixed width and height. The code snippet below in my nooby opinion should work, instead it does nothing. What are the mistakes I did? I've been stuck with this problem for days...Please help me to solve it!! vtkSmartPointer Prop = PropCollection->GetNextProp(); if (Prop->IsA("vtkImageActor")) { vtkSmartPointer ImageActor = vtkImageActor::SafeDownCast(Prop); vtkSmartPointer ImageResize = vtkSmartPointer::New(); ImageResize->SetResizeMethodToOutputDimensions(); ImageResize->SetOutputDimensions(maxWidth, maxHeight, -1); ImageResize->SetInputData(ImageActor->GetMapper()->GetInput()); ImageResize->Update(); ImageActor->GetMapper()->SetInputConnection(ImageResize->GetOutputPort()); } renderWindow->Render(); -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageResize-doesn-t-resize-tp5738186.html Sent from the VTK - Users mailing list archive at Nabble.com. From juch at zhaw.ch Mon May 23 14:40:05 2016 From: juch at zhaw.ch (normanius) Date: Mon, 23 May 2016 11:40:05 -0700 (MST) Subject: [vtkusers] Remeshing or: how to get a "better" surface mesh from a vtkCylinderSource Message-ID: <1464028805570-5738187.post@n5.nabble.com> Hi all My question is whether it is possible to remesh an existing surface such that the original geometry is preserved, but the triangulation has "nice" properties. Let me exemplify my problem with vtkCylinderSource. If you try to extract the triangulated surface mesh, you will notice that the triangles of the cylinder jacket are very sharp and spread the full height. Have a look at the screenshot. Some filters require a more homogenous triangulation of such a surface. How could this be done in VTK? Thanks! Norman By the way, this is how I extract the triangles of a cylinder source: Screenshot 1: Wireframe of a vtkCylinderSource Screenshot 2: Result after remeshing of the cylinder in an external tool -- View this message in context: http://vtk.1045678.n5.nabble.com/Remeshing-or-how-to-get-a-better-surface-mesh-from-a-vtkCylinderSource-tp5738187.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon May 23 14:50:30 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 23 May 2016 12:50:30 -0600 Subject: [vtkusers] vtkImageResize doesn't resize... In-Reply-To: <1464026201749-5738186.post@n5.nabble.com> References: <1464026201749-5738186.post@n5.nabble.com> Message-ID: Hi Filippo, The code looks correct. It should resample the the image to "maxWidth" and "maxHeight". Note that "resampling" means that it changes the size of the voxels and hence changes the resolution of the image. It does not change the size of the image on the screen, if that is what you are trying to do. In order to do that, you would have to zoom in with the camera. - David On Mon, May 23, 2016 at 11:56 AM, Jecko90 wrote: > Hi!! > > I'm trying to resize all the vtkImageActors of a vtkRenderer to a fixed > width and height. > The code snippet below in my nooby opinion should work, instead it does > nothing. > What are the mistakes I did? > > I've been stuck with this problem for days...Please help me to solve it!! > > vtkSmartPointer Prop = PropCollection->GetNextProp(); > if (Prop->IsA("vtkImageActor")) { > vtkSmartPointer ImageActor = > vtkImageActor::SafeDownCast(Prop); > > vtkSmartPointer ImageResize = > vtkSmartPointer::New(); > ImageResize->SetResizeMethodToOutputDimensions(); > ImageResize->SetOutputDimensions(maxWidth, maxHeight, -1); > ImageResize->SetInputData(ImageActor->GetMapper()->GetInput()); > ImageResize->Update(); > > ImageActor->GetMapper()->SetInputConnection(ImageResize->GetOutputPort()); > } > renderWindow->Render(); > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon May 23 15:31:06 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 21:31:06 +0200 Subject: [vtkusers] vtkEventQtSlotConnect not wrapped in python 2.7 + VTK6.3 In-Reply-To: <1455115611734-5736473.post@n5.nabble.com> References: <1454082066016-5736250.post@n5.nabble.com> <1455115611734-5736473.post@n5.nabble.com> Message-ID: 2016-02-10 15:46 GMT+01:00 hchen : > Hi David, > > I removed the EXCLUDE_FROM_WRAPPING line, but it didn't quite work, the > error massage reads: > > make[2]: *** No rule to make target `GUISupport/Qt/moc_QVTKApplication.h', > needed by `GUISupport/Qt/vtkGUISupportQtHierarchy.stamp.txt'. Stop. > make[1]: *** [GUISupport/Qt/CMakeFiles/vtkGUISupportQt.dir/all] Error 2 > make: *** [all] Error 2 > > One thing I noticed, when building VTK5.10, there is an entry > VTK_WRAP_PYTHON_SIP, but in building VTK6.3, this entry is no longer there. > I am not sure if this has anything to do with above error. > > Any thoughts? > > Thank you! > I'm also interested in using GUISupport/Qt and GUISupport/QtOpenGL from Python. Anyone know the rationale for why these modules were marked as EXCLUDE_FROM_WRAPPING ? If there was no particular reason for it, it's very unfortunate, because now stable distributions like Ubuntu 16.04, which will be used for a long time to come, will have a version of VTK where there's no way to tap into these features from Python, forcing Python developers having to re-implement this functionality (either as pure Python modules, or by copying code from VTK). Or am I missing something? If there was in fact a rationale (the wrappings are broken?), then that's a different story :) We're a Python shop, and we find the Qt integration sorely lacking on the Python side (essentially just QVTKRenderWindowInteractor?) compared to the C++ counterparts. Elvis > Chen > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkEventQtSlotConnect-not-wrapped-in-python-2-7-VTK6-3-tp5736250p5736473.html > Sent from the VTK - Users mailing list archive at Nabble.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 ahmad_koujan at yahoo.de Mon May 23 15:51:28 2016 From: ahmad_koujan at yahoo.de (ahmad_koujan at yahoo.de) Date: Mon, 23 May 2016 19:51:28 +0000 (UTC) Subject: [vtkusers] Ensight Case File Display in QVTKWiget References: <144614796.2338958.1464033088472.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <144614796.2338958.1464033088472.JavaMail.yahoo@mail.yahoo.com> Hi, Ihave anEnsight Case File and must include in my program the Simulation. The Simulationis a Liver Segmentation in there simulate the temperature.?I can seethe Geometry Image. But i cant loop over the timeset.??The Formatof Ensight File is Gold?The builtof the Ensight File is: Format type: ensight gold GEOMETRYmodel: 1? emsight/K3045.geo VARIABLEscalar per element: 1 T ensight/K3045.T****scalar per element: 1 phi einsight/K3045.phi****7 TIMEtime set:??? ????????????????????1number of steps: ? ????????196filename start number:?? 0filename increment:??????? 1time values:0510152025......... Thanks! Please help me. ?Ahmad -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon May 23 16:18:04 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 23 May 2016 22:18:04 +0200 Subject: [vtkusers] Remeshing or: how to get a "better" surface mesh from a vtkCylinderSource In-Reply-To: <1464028805570-5738187.post@n5.nabble.com> References: <1464028805570-5738187.post@n5.nabble.com> Message-ID: Norman, VTK itself doesn't really have anything in terms of the remeshing you are looking for. Best, Cory On Mon, May 23, 2016 at 8:40 PM, normanius wrote: > Hi all > > My question is whether it is possible to remesh an existing surface such > that the original geometry is preserved, but the triangulation has "nice" > properties. > > Let me exemplify my problem with vtkCylinderSource. If you try to extract > the triangulated surface mesh, you will notice that the triangles of the > cylinder jacket are very sharp and spread the full height. Have a look at > the screenshot. > > Some filters require a more homogenous triangulation of such a surface. How > could this be done in VTK? > > Thanks! > Norman > > By the way, this is how I extract the triangles of a cylinder source: > > > Screenshot 1: Wireframe of a vtkCylinderSource > Screenshot 2: Result after remeshing of the cylinder in an external tool > > > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Remeshing-or-how-to-get-a-better-surface-mesh-from-a-vtkCylinderSource-tp5738187.html > Sent from the VTK - Users mailing list archive at Nabble.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 R&D Engineer Kitware, Inc. From elvis.stansvik at orexplore.com Mon May 23 16:24:30 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 22:24:30 +0200 Subject: [vtkusers] More powerful mechanisms than QVTKRenderWindowInteractor? Message-ID: Hi all, The Wrapping/Python/vtk/qt directory in VTK currently only contains QVTKRenderWindowInteractor.py, a relatively basic wrapper around vtkGenericRenderWindowInteractor. The class works, don't get me wrong, although it took some fixing to get the version in 6.x to work properly with Qt 5. I've also gotten the impression from VTK devs that this class is more of an example, something that you're supposed to customize or rewrite to fit your needs. The situation on the Python side is in stark contrast to the extensive set of classes available for C++ developers in GUISupport/Qt{,OpenGL,SQL,Webkit}. So my question is to the Python/VTK users/developers out there: Do you know if there's any more powerful/mature Python integration floating around? How have you gone about it? Did you use QVTKRenderWindowInteractor as it is? Customize it? Throw it out and wrote something of your own? I'm very interested to hear about your projects/approaches. And to the VTK developers: Any chance we could see Qt integration on the Python side which matches the maturity of the C++ integration? Or maybe wrappers for the classes in GUISupport? Cheers, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahmad_koujan at yahoo.de Mon May 23 16:37:32 2016 From: ahmad_koujan at yahoo.de (ahmad_koujan at yahoo.de) Date: Mon, 23 May 2016 20:37:32 +0000 (UTC) Subject: [vtkusers] How I plot pixel value from each vtkimagedata std::vector imagehisto; References: <880574254.2381139.1464035852323.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <880574254.2381139.1464035852323.JavaMail.yahoo@mail.yahoo.com> ?Hi, please help me! In my code MRI is read and stored in recordings vtkimagedata . I tried to save the individual vtkimagedata in a vector . std :: vector < vtkImageData * > imagehisto The Save is written with push_back in the vector : imagehisto.push_back ( image data); This also then all stored vtkimagedata . Now I want a read of each vtkimagedata particular pixel from . I have the position of a vtkprobpicker . Only I just get the last vtkimagedata the pixel value . Thank you very much Ahmad -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon May 23 16:41:57 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 23 May 2016 14:41:57 -0600 Subject: [vtkusers] vtkEventQtSlotConnect not wrapped in python 2.7 + VTK6.3 In-Reply-To: References: <1454082066016-5736250.post@n5.nabble.com> <1455115611734-5736473.post@n5.nabble.com> Message-ID: On Mon, May 23, 2016 at 1:31 PM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > > > Anyone know the rationale for why these modules were marked as > EXCLUDE_FROM_WRAPPING ? > I'm not sure, but I can make an educated guess. In VTK 5, the VTK Qt classes were wrapped using a sophisticated mechanism that combined the python wrappers and SIP. However, few people used it, and it was never part of the dashboard testing. So it seems that it was lost in the shuffle when VTK transitioned to VTK 6, which is too bad, because there was a lot of good stuff there. In fact a lot of the pieces are still around, laying dormant in the code. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon May 23 16:57:53 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 23 May 2016 22:57:53 +0200 Subject: [vtkusers] vtkEventQtSlotConnect not wrapped in python 2.7 + VTK6.3 In-Reply-To: References: <1454082066016-5736250.post@n5.nabble.com> <1455115611734-5736473.post@n5.nabble.com> Message-ID: 2016-05-23 22:41 GMT+02:00 David Gobbi : > On Mon, May 23, 2016 at 1:31 PM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: >> >> >> Anyone know the rationale for why these modules were marked as >> EXCLUDE_FROM_WRAPPING ? >> > > I'm not sure, but I can make an educated guess. In VTK 5, the VTK Qt > classes were wrapped using a sophisticated mechanism that combined the > python wrappers and SIP. However, few people used it, and it was never > part of the dashboard testing. So it seems that it was lost in the shuffle > when VTK transitioned to VTK 6, which is too bad, because there was a lot > of good stuff there. In fact a lot of the pieces are still around, laying > dormant in the code. > I see, things like this happens during refactorings, so it's understandable I guess. But yes, I agree it's unfortunate if functionality was lost/bitrotted, since the current QVTKRenderWindowInteractor leaves a lot to be desired compared to GUISupport (see my other thread). Thanks for the update! Elvis > > - David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fjw187104199167 at 126.com Tue May 24 09:32:32 2016 From: fjw187104199167 at 126.com (fanjwCMS) Date: Tue, 24 May 2016 06:32:32 -0700 (MST) Subject: [vtkusers] vtkRenderWindow problem In-Reply-To: References: <1464017143365-5738178.post@n5.nabble.com> Message-ID: <1464096752113-5738196.post@n5.nabble.com> Wonderful, thanks so much, I will try this! It is important for me. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkRenderWindow-problem-tp5738178p5738196.html Sent from the VTK - Users mailing list archive at Nabble.com. From aborsic at ne-scientific.com Tue May 24 10:45:22 2016 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Tue, 24 May 2016 16:45:22 +0200 Subject: [vtkusers] Remeshing or: how to get a "better" surface mesh from a vtkCylinderSource In-Reply-To: <1464028805570-5738187.post@n5.nabble.com> References: <1464028805570-5738187.post@n5.nabble.com> Message-ID: <57446902.70800@ne-scientific.com> Hi Norman, I suggest having a look at ACVD from Creatis (https://www.creatis.insa-lyon.fr/site/en/acvd.html). This is a coarsening library for triangulated meshes which is aware of triangle quality. The package is based on VTK, and it is distributed in the form of a binary (ACVD.exe for Windows) - which would allow you a quick test on a vtkPolyData saved to file - and the package is also available in source form. I am using it on input surface meshes from medical applications with success. It might be worth trying it on your own problems. The effort to get it working should be limited. Best Regards, Andrea P.S. Note that in my experience you can not only coarsen a mesh, but also increase the original number of nodes ... this might be useful in the case of the cylinder example. On 23-May-16 8:40 PM, normanius wrote: > Hi all > > My question is whether it is possible to remesh an existing surface such > that the original geometry is preserved, but the triangulation has "nice" > properties. > > Let me exemplify my problem with vtkCylinderSource. If you try to extract > the triangulated surface mesh, you will notice that the triangles of the > cylinder jacket are very sharp and spread the full height. Have a look at > the screenshot. > > Some filters require a more homogenous triangulation of such a surface. How > could this be done in VTK? > > Thanks! > Norman > > By the way, this is how I extract the triangles of a cylinder source: > > > Screenshot 1: Wireframe of a vtkCylinderSource > Screenshot 2: Result after remeshing of the cylinder in an external tool > > > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Remeshing-or-how-to-get-a-better-surface-mesh-from-a-vtkCylinderSource-tp5738187.html > Sent from the VTK - Users mailing list archive at Nabble.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 -- ++++++++++++++++++++++++++++++++++++ Andrea Borsic Ph.D. CEO & Founder NE Scientific LLC Tel: +1 603 676 7450 Web: www.ne-scientific.com Twitter: https://twitter.com/ne_scientific From sur.chiranjib at gmail.com Tue May 24 15:31:16 2016 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Wed, 25 May 2016 01:01:16 +0530 Subject: [vtkusers] Alternative of vtkDelaunay3D - is there any? Message-ID: Hi, I am looking for a method to convert a set of points to a set of volumetric cells. I understood that Delaunay triangulation (vtkDelaunay3D) is the de facto way for my purpose. However, this operation takes too much of time for a large dataset. I am looking for some alternative which can do the same thing but in a faster way. Any suggestions? Chiranjib -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed May 25 04:04:39 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 25 May 2016 10:04:39 +0200 Subject: [vtkusers] VTK 7 next release In-Reply-To: References: <56FC5009.2020104@cora.nwra.com> <56FD3D19.7090505@cora.nwra.com> Message-ID: 2016-04-05 15:32 GMT+02:00 David E DeMarle : > OK Orion, we'll do a 7.0.1 patch release in a few weeks time. It will be > the current release branch with the recent gcc 6 fix ported onto back to it. > To conserve energy we won't do the whole release candidate thing though. > If people find problems we'll just make a 7.0.2. > Hi, Is the 7.0.1 release just around the corner, or still a bit away? Elvis > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Mar 31, 2016 at 11:07 AM, Orion Poplawski > wrote: > >> I would appreciate a patch release. I really don't think I can update the >> package until there is a mechanism for the vtk using packages to >> automatically >> determine the back-end. Thanks! >> >> On 03/31/2016 08:08 AM, David E DeMarle wrote: >> > This is in master so it will be in 7.1, but that won't be for a few >> months still. >> > I can merge this onto the release branch now. The release branch is >> already a >> > handful of commits (GL2 volume rendering updates mostly) beyond 7.0.0. >> > >> > I suppose this particular change makes a good case for 7.0.1 since it >> lets >> > external applications determine what back end they've got and that >> seems, you >> > know, kind of important eh? >> > >> > Show of hands, shall we do a patch release? >> > >> > Thanks as always Orion (and the other packagers) for packaging. It is a >> great >> > thing. >> > >> > >> > David E DeMarle >> > Kitware, Inc. >> > R&D Engineer >> > 21 Corporate Drive >> > Clifton Park, NY 12065-8662 >> > Phone: 518-881-4909 >> > >> > On Wed, Mar 30, 2016 at 6:15 PM, Orion Poplawski > > > wrote: >> > >> > I'm holding off building VTK 7 for Fedora until this: >> > >> > >> https://gitlab.kitware.com/vtk/vtk/commit/0c4cbd3f0393dadfe3a3df149414fe6e8ba4870a >> > >> > makes it into a release. Any idea when this might happen? >> > >> > Thanks. >> > >> > -- >> > Orion Poplawski >> > Technical Manager 303-415-9701 x222 >> > >> > NWRA, Boulder/CoRA Office FAX: 303-415-9702 > 303-415-9702> >> > 3380 Mitchell Lane orion at nwra.com >> > >> > Boulder, CO 80301 http://www.nwra.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 >> > >> > >> >> >> -- >> Orion Poplawski >> Technical Manager 303-415-9701 x222 >> NWRA, Boulder/CoRA Office FAX: 303-415-9702 >> 3380 Mitchell Lane orion at nwra.com >> Boulder, CO 80301 http://www.nwra.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 elvis.stansvik at orexplore.com Wed May 25 04:50:51 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 25 May 2016 10:50:51 +0200 Subject: [vtkusers] Is -DVTK_RENDERING_BACKEND=OpenGL needed for Haswell with 7.0.0? Message-ID: Hi all, I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial). The machine where I need this to run has a Haswell Intel graphics chip (Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile. Will the new OpenGL backend (the version in 7.0.0) support this graphics card, or will I need to use the old backend with -DVTK_RENDERING_BACKEND=OpenGL? I read that support for is for Ivy Bridge and later in 7.0.0, so I think I should be OK right? Thanks in advance, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed May 25 07:49:43 2016 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 25 May 2016 07:49:43 -0400 Subject: [vtkusers] Is -DVTK_RENDERING_BACKEND=OpenGL needed for Haswell with 7.0.0? In-Reply-To: References: Message-ID: Yes, you should be fine with VTK 7.0, OpenGL2 and Haswell. - Ken On Wed, May 25, 2016 at 4:50 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > Hi all, > > I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial). > > The machine where I need this to run has a Haswell Intel graphics chip > (Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile. Will > the new OpenGL backend (the version in 7.0.0) support this graphics card, > or will I need to use the old backend with -DVTK_RENDERING_BACKEND=OpenGL? > > I read that support for is for Ivy Bridge and later in 7.0.0, so I think I > should be OK right? > > Thanks in advance, > Elvis > > _______________________________________________ > 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 Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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 dave.demarle at kitware.com Wed May 25 09:23:19 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 25 May 2016 09:23:19 -0400 Subject: [vtkusers] VTK 7 next release In-Reply-To: References: <56FC5009.2020104@cora.nwra.com> <56FD3D19.7090505@cora.nwra.com> Message-ID: 7.0.1 is still "a few weeks off" and 7.1.0 is still expected late this summer. Sorry for the delay. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, May 25, 2016 at 4:04 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > 2016-04-05 15:32 GMT+02:00 David E DeMarle : > >> OK Orion, we'll do a 7.0.1 patch release in a few weeks time. It will be >> the current release branch with the recent gcc 6 fix ported onto back to it. >> To conserve energy we won't do the whole release candidate thing though. >> If people find problems we'll just make a 7.0.2. >> > > Hi, > > Is the 7.0.1 release just around the corner, or still a bit away? > > Elvis > > >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Thu, Mar 31, 2016 at 11:07 AM, Orion Poplawski >> wrote: >> >>> I would appreciate a patch release. I really don't think I can update >>> the >>> package until there is a mechanism for the vtk using packages to >>> automatically >>> determine the back-end. Thanks! >>> >>> On 03/31/2016 08:08 AM, David E DeMarle wrote: >>> > This is in master so it will be in 7.1, but that won't be for a few >>> months still. >>> > I can merge this onto the release branch now. The release branch is >>> already a >>> > handful of commits (GL2 volume rendering updates mostly) beyond 7.0.0. >>> > >>> > I suppose this particular change makes a good case for 7.0.1 since it >>> lets >>> > external applications determine what back end they've got and that >>> seems, you >>> > know, kind of important eh? >>> > >>> > Show of hands, shall we do a patch release? >>> > >>> > Thanks as always Orion (and the other packagers) for packaging. It is >>> a great >>> > thing. >>> > >>> > >>> > David E DeMarle >>> > Kitware, Inc. >>> > R&D Engineer >>> > 21 Corporate Drive >>> > Clifton Park, NY 12065-8662 >>> > Phone: 518-881-4909 >>> > >>> > On Wed, Mar 30, 2016 at 6:15 PM, Orion Poplawski >> > > wrote: >>> > >>> > I'm holding off building VTK 7 for Fedora until this: >>> > >>> > >>> https://gitlab.kitware.com/vtk/vtk/commit/0c4cbd3f0393dadfe3a3df149414fe6e8ba4870a >>> > >>> > makes it into a release. Any idea when this might happen? >>> > >>> > Thanks. >>> > >>> > -- >>> > Orion Poplawski >>> > Technical Manager 303-415-9701 x222 >>> > >>> > NWRA, Boulder/CoRA Office FAX: 303-415-9702 >> 303-415-9702> >>> > 3380 Mitchell Lane orion at nwra.com >>> > >>> > Boulder, CO 80301 http://www.nwra.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 >>> > >>> > >>> >>> >>> -- >>> Orion Poplawski >>> Technical Manager 303-415-9701 x222 >>> NWRA, Boulder/CoRA Office FAX: 303-415-9702 >>> 3380 Mitchell Lane orion at nwra.com >>> Boulder, CO 80301 http://www.nwra.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 David.Edmunds at icr.ac.uk Wed May 25 09:51:14 2016 From: David.Edmunds at icr.ac.uk (David Edmunds) Date: Wed, 25 May 2016 14:51:14 +0100 Subject: [vtkusers] Traversing vtkPolyData returns incorrect number of points In-Reply-To: References: <633A14E1-D5C5-44B3-A4A8-82B96A330747@icr.ac.uk> <46FD07EA-58D5-47AB-8957-E7F95905DC90@icr.ac.uk> Message-ID: <59757265-A949-4112-8CFD-21E33AFE396F@icr.ac.uk> Hi, Sorry for the late reply but I couldn?t send attachments to the mailing list. My input file can be found at http://www.filedropper.com/organbody. Kind regards, Dave On 23 May 2016, at 18:20, Dan Lipsa > wrote: I see, Well, in this case, you may have points that are not part of any cells. Can you share your data file? On Mon, May 23, 2016 at 12:16 PM, David Edmunds > wrote: Hi Dan, Thanks, but I actually get a much smaller number when I count all the points from cells. Also, in my input dataset the cells are disjoint, i.e. no points are shared between multiple cells. Kind regards, Dave On 23 May 2016, at 16:51, Dan Lipsa > wrote: Hi David, You have shared points between cells so it is normal you'll get a bigger number when you count all the points from cells. On Mon, May 23, 2016 at 10:01 AM, David Edmunds > wrote: Dear all, I am traversing a vtkPolyData object which is read in from a file using vtkXMLPolyDataReader. I access the number of points in the vtkPolyData in two different ways, here is my source code: vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("/Users/dedmunds/Desktop/organ_Body.vtp"); reader->Update(); vtkSmartPointer poly_data = reader->GetOutput(); cout << "Number of points: " << poly_data->GetNumberOfPoints() << endl; int traversal_points = 0; for (int i=0; iGetNumberOfCells(); i++) { traversal_points += poly_data->GetCell(i)->GetNumberOfPoints(); } cout << "Traversal number of points: " << traversal_points << endl; Here is the output: Number of points: 286402 Traversal number of points: 143204 Why do I get two different answers? The second number is approximately half the first. What am I doing wrong? Thanks for your help, Kind regards, Dave The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. _______________________________________________ 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 The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed May 25 11:08:33 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 25 May 2016 17:08:33 +0200 Subject: [vtkusers] Is -DVTK_RENDERING_BACKEND=OpenGL needed for Haswell with 7.0.0? In-Reply-To: References: Message-ID: 2016-05-25 13:49 GMT+02:00 Ken Martin : > Yes, you should be fine with VTK 7.0, OpenGL2 and Haswell. - Ken > Great, thanks! Elvis > > On Wed, May 25, 2016 at 4:50 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> Hi all, >> >> I'm about to try a compile of VTK 7.0.0 release on Ubuntu 16.04 (Xenial). >> >> The machine where I need this to run has a Haswell Intel graphics chip >> (Intel(R) HD Graphics 4400), which supports the OpenGL 3.3 profile. Will >> the new OpenGL backend (the version in 7.0.0) support this graphics card, >> or will I need to use the old backend with -DVTK_RENDERING_BACKEND=OpenGL? >> >> I read that support for is for Ivy Bridge and later in 7.0.0, so I think >> I should be OK right? >> >> Thanks in advance, >> Elvis >> >> _______________________________________________ >> 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 > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > 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 elvis.stansvik at orexplore.com Wed May 25 11:09:19 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 25 May 2016 17:09:19 +0200 Subject: [vtkusers] VTK 7 next release In-Reply-To: References: <56FC5009.2020104@cora.nwra.com> <56FD3D19.7090505@cora.nwra.com> Message-ID: 2016-05-25 15:23 GMT+02:00 David E DeMarle : > 7.0.1 is still "a few weeks off" and 7.1.0 is still expected late this > summer. > Alright. > > Sorry for the delay. > No problem at all, was just curious. Elvis > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, May 25, 2016 at 4:04 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> 2016-04-05 15:32 GMT+02:00 David E DeMarle : >> >>> OK Orion, we'll do a 7.0.1 patch release in a few weeks time. It will be >>> the current release branch with the recent gcc 6 fix ported onto back to it. >>> To conserve energy we won't do the whole release candidate thing though. >>> If people find problems we'll just make a 7.0.2. >>> >> >> Hi, >> >> Is the 7.0.1 release just around the corner, or still a bit away? >> >> Elvis >> >> >>> >>> >>> >>> David E DeMarle >>> Kitware, Inc. >>> R&D Engineer >>> 21 Corporate Drive >>> Clifton Park, NY 12065-8662 >>> Phone: 518-881-4909 >>> >>> On Thu, Mar 31, 2016 at 11:07 AM, Orion Poplawski >>> wrote: >>> >>>> I would appreciate a patch release. I really don't think I can update >>>> the >>>> package until there is a mechanism for the vtk using packages to >>>> automatically >>>> determine the back-end. Thanks! >>>> >>>> On 03/31/2016 08:08 AM, David E DeMarle wrote: >>>> > This is in master so it will be in 7.1, but that won't be for a few >>>> months still. >>>> > I can merge this onto the release branch now. The release branch is >>>> already a >>>> > handful of commits (GL2 volume rendering updates mostly) beyond 7.0.0. >>>> > >>>> > I suppose this particular change makes a good case for 7.0.1 since it >>>> lets >>>> > external applications determine what back end they've got and that >>>> seems, you >>>> > know, kind of important eh? >>>> > >>>> > Show of hands, shall we do a patch release? >>>> > >>>> > Thanks as always Orion (and the other packagers) for packaging. It is >>>> a great >>>> > thing. >>>> > >>>> > >>>> > David E DeMarle >>>> > Kitware, Inc. >>>> > R&D Engineer >>>> > 21 Corporate Drive >>>> > Clifton Park, NY 12065-8662 >>>> > Phone: 518-881-4909 >>>> > >>>> > On Wed, Mar 30, 2016 at 6:15 PM, Orion Poplawski >>> > > wrote: >>>> > >>>> > I'm holding off building VTK 7 for Fedora until this: >>>> > >>>> > >>>> https://gitlab.kitware.com/vtk/vtk/commit/0c4cbd3f0393dadfe3a3df149414fe6e8ba4870a >>>> > >>>> > makes it into a release. Any idea when this might happen? >>>> > >>>> > Thanks. >>>> > >>>> > -- >>>> > Orion Poplawski >>>> > Technical Manager 303-415-9701 x222 >>>> > >>>> > NWRA, Boulder/CoRA Office FAX: 303-415-9702 >>> 303-415-9702> >>>> > 3380 Mitchell Lane orion at nwra.com >>>> > >>>> > Boulder, CO 80301 http://www.nwra.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 >>>> > >>>> > >>>> >>>> >>>> -- >>>> Orion Poplawski >>>> Technical Manager 303-415-9701 x222 >>>> NWRA, Boulder/CoRA Office FAX: 303-415-9702 >>>> 3380 Mitchell Lane orion at nwra.com >>>> Boulder, CO 80301 http://www.nwra.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 lkandris at gmail.com Wed May 25 11:19:14 2016 From: lkandris at gmail.com (=?UTF-8?B?QW5kcsOhcyBMZWhvdGF5LUvDqXJ5?=) Date: Wed, 25 May 2016 15:19:14 +0000 Subject: [vtkusers] Huge framedrops on Android when opening textured OBJs Message-ID: Hey folks! I mainly use VTK 7.0.0 for model display purposes on Android platform. I gave a try got the quite recently introduced vtkOBJImporter class to test the viewer behaviour for OBJ models with multiple textures and bumped into the following issues: Scenario 1: If i use vtkOBJImporter for models with any number of textures, i get ENORMOUS framedrops Scenario 2: If i use vtkOBJReader for models with a single texture, i get the same effect as above Scenario 3: If i use vtkOBJReader for the same models but without textures, i have no issues, the viewer is up to speed. I recorded two short videos for demostration: Scenario 2: https://goo.gl/93ag9e Scenario 3: https://goo.gl/cn0blJ Test model: https://sketchfab.com/models/a6f343cc661644319f88f1bdd20fe6de Mind you, the test model is quite large, but i get the same effect on models weigh less than 1MB. Build setup: Debian 8.3 Android NDK r10e toolchain GCC 4.9 -O3 optimization OpenGL ES 2.0 / 3.0 linkage (tried both, makes no difference here) Test devices: LG G4 Nexus 9 Galaxy S5 What could cause this effect? Different rendering mechanism for textured models? Thanks in advance! ---------------------------- [image: SmartMobileVision] *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) lka at smartmobilevision.com SmartMobileVision Szent Gell?rt t?r 3, 1114 Budapest, Hungary www.smartmobilevision.com [image: Google +] [image: LinkedIn] -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Wed May 25 11:22:33 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Wed, 25 May 2016 11:22:33 -0400 Subject: [vtkusers] Traversing vtkPolyData returns incorrect number of points In-Reply-To: <59757265-A949-4112-8CFD-21E33AFE396F@icr.ac.uk> References: <633A14E1-D5C5-44B3-A4A8-82B96A330747@icr.ac.uk> <46FD07EA-58D5-47AB-8957-E7F95905DC90@icr.ac.uk> <59757265-A949-4112-8CFD-21E33AFE396F@icr.ac.uk> Message-ID: Dave, There are many points that are not part of any cell. They have a large value (0, 3.69e+19, -5.2e+27) or they are nan. Here is a script that writes a poly data with all the points that are part of any cell. You can load that in ParaView and see the range of values. On Wed, May 25, 2016 at 9:51 AM, David Edmunds wrote: > Hi, > > Sorry for the late reply but I couldn?t send attachments to the mailing > list. My input file can be found at http://www.filedropper.com/organbody. > > Kind regards, > > Dave > > On 23 May 2016, at 18:20, Dan Lipsa wrote: > > I see, > Well, in this case, you may have points that are not part of any cells. > Can you share your data file? > > On Mon, May 23, 2016 at 12:16 PM, David Edmunds > wrote: > >> Hi Dan, >> >> Thanks, but I actually get a much smaller number when I count all the >> points from cells. Also, in my input dataset the cells are disjoint, i.e. >> no points are shared between multiple cells. >> >> Kind regards, >> >> Dave >> >> On 23 May 2016, at 16:51, Dan Lipsa wrote: >> >> Hi David, >> You have shared points between cells so it is normal you'll get a bigger >> number when you count all the points from cells. >> >> On Mon, May 23, 2016 at 10:01 AM, David Edmunds >> wrote: >> >>> Dear all, >>> >>> I am traversing a vtkPolyData object which is read in from a file using >>> vtkXMLPolyDataReader. I access the number of points in the vtkPolyData in >>> two different ways, here is my source code: >>> >>> vtkSmartPointer reader = >>> vtkSmartPointer::New(); >>> reader->SetFileName("/Users/dedmunds/Desktop/organ_Body.vtp"); >>> reader->Update(); >>> vtkSmartPointer poly_data = reader->GetOutput(); >>> >>> cout << "Number of points: " << poly_data->GetNumberOfPoints() << endl; >>> >>> int traversal_points = 0; >>> for (int i=0; iGetNumberOfCells(); i++) { >>> traversal_points += poly_data->GetCell(i)->GetNumberOfPoints(); >>> } >>> cout << "Traversal number of points: " << traversal_points << endl; >>> >>> Here is the output: >>> >>> Number of points: 286402 >>> Traversal number of points: 143204 >>> >>> Why do I get two different answers? The second number is approximately >>> half the first. What am I doing wrong? >>> >>> Thanks for your help, >>> >>> Kind regards, >>> >>> Dave >>> >>> The Institute of Cancer Research: Royal Cancer Hospital, a charitable >>> Company Limited by Guarantee, Registered in England under Company No. >>> 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. >>> >>> This e-mail message is confidential and for use by the addressee only. >>> If the message is received by anyone other than the addressee, please >>> return the message to the sender by replying to it and then delete the >>> message from your computer and network. >>> _______________________________________________ >>> 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 >>> >> >> >> >> The Institute of Cancer Research: Royal Cancer Hospital, a charitable >> Company Limited by Guarantee, Registered in England under Company No. >> 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. >> >> This e-mail message is confidential and for use by the addressee only. If >> the message is received by anyone other than the addressee, please return >> the message to the sender by replying to it and then delete the message >> from your computer and network. >> > > > > The Institute of Cancer Research: Royal Cancer Hospital, a charitable > Company Limited by Guarantee, Registered in England under Company No. > 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. > > This e-mail message is confidential and for use by the addressee only. If > the message is received by anyone other than the addressee, please return > the message to the sender by replying to it and then delete the message > from your computer and network. > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: points.py Type: text/x-python Size: 1111 bytes Desc: not available URL: From bill.lorensen at gmail.com Wed May 25 11:35:10 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 25 May 2016 11:35:10 -0400 Subject: [vtkusers] Huge framedrops on Android when opening textured OBJs In-Reply-To: References: Message-ID: How large are your textures and are they powers of 2. I've seen big performance hits with large textures (1024x1024) in a webgl app. On May 25, 2016 11:19 AM, "Andr?s Lehotay-K?ry" wrote: > Hey folks! > I mainly use VTK 7.0.0 for model display purposes on Android platform. I > gave a try got the quite recently introduced vtkOBJImporter class to test > the viewer behaviour for OBJ models with multiple textures and bumped into > the following issues: > > Scenario 1: > If i use vtkOBJImporter for models with any number of textures, i get > ENORMOUS framedrops > Scenario 2: > If i use vtkOBJReader for models with a single texture, i get the same > effect as above > Scenario 3: > If i use vtkOBJReader for the same models but without textures, i have no > issues, the viewer is up to speed. > > I recorded two short videos for demostration: > Scenario 2: > https://goo.gl/93ag9e > Scenario 3: > https://goo.gl/cn0blJ > Test model: > https://sketchfab.com/models/a6f343cc661644319f88f1bdd20fe6de > > Mind you, the test model is quite large, but i get the same effect on > models weigh less than 1MB. > > Build setup: > Debian 8.3 > Android NDK r10e > toolchain GCC 4.9 > -O3 optimization > OpenGL ES 2.0 / 3.0 linkage (tried both, makes no difference here) > > Test devices: > LG G4 > Nexus 9 > Galaxy S5 > > What could cause this effect? Different rendering mechanism for textured > models? > Thanks in advance! > > > > > ---------------------------- > > [image: SmartMobileVision] > > > *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) > lka at smartmobilevision.com > > SmartMobileVision > Szent Gell?rt t?r 3, 1114 Budapest, Hungary > www.smartmobilevision.com > > [image: Google +] [image: > LinkedIn] > > _______________________________________________ > 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 lkandris at gmail.com Wed May 25 11:39:42 2016 From: lkandris at gmail.com (=?UTF-8?B?QW5kcsOhcyBMZWhvdGF5LUvDqXJ5?=) Date: Wed, 25 May 2016 15:39:42 +0000 Subject: [vtkusers] Huge framedrops on Android when opening textured OBJs In-Reply-To: References: Message-ID: Well, mines can go up to 4096 x 4096. In fact the demo model has a texture with just this size. Allright, so if i split up my huge textures and generate multiple UV maps from them of 512x512 size would it make any difference? ---------------------------- [image: SmartMobileVision] *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) lka at smartmobilevision.com SmartMobileVision Szent Gell?rt t?r 3, 1114 Budapest, Hungary www.smartmobilevision.com [image: Google +] [image: LinkedIn] On Wed, 25 May 2016 at 17:35 Bill Lorensen wrote: > How large are your textures and are they powers of 2. I've seen big > performance hits with large textures (1024x1024) in a webgl app. > On May 25, 2016 11:19 AM, "Andr?s Lehotay-K?ry" > wrote: > >> Hey folks! >> I mainly use VTK 7.0.0 for model display purposes on Android platform. >> I gave a try got the quite recently introduced vtkOBJImporter class to test >> the viewer behaviour for OBJ models with multiple textures and bumped into >> the following issues: >> >> Scenario 1: >> If i use vtkOBJImporter for models with any number of textures, i get >> ENORMOUS framedrops >> Scenario 2: >> If i use vtkOBJReader for models with a single texture, i get the same >> effect as above >> Scenario 3: >> If i use vtkOBJReader for the same models but without textures, i have >> no issues, the viewer is up to speed. >> >> I recorded two short videos for demostration: >> Scenario 2: >> https://goo.gl/93ag9e >> Scenario 3: >> https://goo.gl/cn0blJ >> Test model: >> https://sketchfab.com/models/a6f343cc661644319f88f1bdd20fe6de >> >> Mind you, the test model is quite large, but i get the same effect on >> models weigh less than 1MB. >> >> Build setup: >> Debian 8.3 >> Android NDK r10e >> toolchain GCC 4.9 >> -O3 optimization >> OpenGL ES 2.0 / 3.0 linkage (tried both, makes no difference here) >> >> Test devices: >> LG G4 >> Nexus 9 >> Galaxy S5 >> >> What could cause this effect? Different rendering mechanism for textured >> models? >> Thanks in advance! >> >> >> >> >> ---------------------------- >> >> [image: SmartMobileVision] >> >> >> *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) >> lka at smartmobilevision.com >> >> SmartMobileVision >> Szent Gell?rt t?r 3, 1114 Budapest, Hungary >> www.smartmobilevision.com >> >> [image: Google +] >> [image: LinkedIn] >> >> >> _______________________________________________ >> 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 lkandris at gmail.com Wed May 25 11:43:12 2016 From: lkandris at gmail.com (=?UTF-8?B?QW5kcsOhcyBMZWhvdGF5LUvDqXJ5?=) Date: Wed, 25 May 2016 15:43:12 +0000 Subject: [vtkusers] Huge framedrops on Android when opening textured OBJs In-Reply-To: References: Message-ID: Although mine is a native app, not webgl based, should be faster i think. On Wed, 25 May 2016 at 17:39 Andr?s Lehotay-K?ry wrote: > Well, mines can go up to 4096 x 4096. In fact the demo model has a texture > with just this size. > Allright, so if i split up my huge textures and generate multiple UV maps > from them of 512x512 size would it make any difference? > > > > ---------------------------- > > [image: SmartMobileVision] > > > *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) > lka at smartmobilevision.com > > SmartMobileVision > Szent Gell?rt t?r 3, 1114 Budapest, Hungary > www.smartmobilevision.com > > [image: Google +] [image: > LinkedIn] > > On Wed, 25 May 2016 at 17:35 Bill Lorensen > wrote: > >> How large are your textures and are they powers of 2. I've seen big >> performance hits with large textures (1024x1024) in a webgl app. >> On May 25, 2016 11:19 AM, "Andr?s Lehotay-K?ry" >> wrote: >> >>> Hey folks! >>> I mainly use VTK 7.0.0 for model display purposes on Android platform. >>> I gave a try got the quite recently introduced vtkOBJImporter class to test >>> the viewer behaviour for OBJ models with multiple textures and bumped into >>> the following issues: >>> >>> Scenario 1: >>> If i use vtkOBJImporter for models with any number of textures, i get >>> ENORMOUS framedrops >>> Scenario 2: >>> If i use vtkOBJReader for models with a single texture, i get the same >>> effect as above >>> Scenario 3: >>> If i use vtkOBJReader for the same models but without textures, i have >>> no issues, the viewer is up to speed. >>> >>> I recorded two short videos for demostration: >>> Scenario 2: >>> https://goo.gl/93ag9e >>> Scenario 3: >>> https://goo.gl/cn0blJ >>> Test model: >>> https://sketchfab.com/models/a6f343cc661644319f88f1bdd20fe6de >>> >>> Mind you, the test model is quite large, but i get the same effect on >>> models weigh less than 1MB. >>> >>> Build setup: >>> Debian 8.3 >>> Android NDK r10e >>> toolchain GCC 4.9 >>> -O3 optimization >>> OpenGL ES 2.0 / 3.0 linkage (tried both, makes no difference here) >>> >>> Test devices: >>> LG G4 >>> Nexus 9 >>> Galaxy S5 >>> >>> What could cause this effect? Different rendering mechanism for textured >>> models? >>> Thanks in advance! >>> >>> >>> >>> >>> ---------------------------- >>> >>> [image: SmartMobileVision] >>> >>> >>> *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) >>> lka at smartmobilevision.com >>> >>> SmartMobileVision >>> Szent Gell?rt t?r 3, 1114 Budapest, Hungary >>> www.smartmobilevision.com >>> >>> [image: Google +] >>> [image: LinkedIn] >>> >>> >>> _______________________________________________ >>> 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 bill.lorensen at gmail.com Wed May 25 12:01:00 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 25 May 2016 12:01:00 -0400 Subject: [vtkusers] Huge framedrops on Android when opening textured OBJs In-Reply-To: References: Message-ID: How many 4k textures? I had about 100. Had to drop them to 512 then speed was good. On Wed, May 25, 2016 at 11:43 AM, Andr?s Lehotay-K?ry wrote: > Although mine is a native app, not webgl based, should be faster i think. > > On Wed, 25 May 2016 at 17:39 Andr?s Lehotay-K?ry > wrote: > >> Well, mines can go up to 4096 x 4096. In fact the demo model has a >> texture with just this size. >> Allright, so if i split up my huge textures and generate multiple UV maps >> from them of 512x512 size would it make any difference? >> >> >> >> ---------------------------- >> >> [image: SmartMobileVision] >> >> >> *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) >> lka at smartmobilevision.com >> >> SmartMobileVision >> Szent Gell?rt t?r 3, 1114 Budapest, Hungary >> www.smartmobilevision.com >> >> [image: Google +] >> [image: LinkedIn] >> >> >> On Wed, 25 May 2016 at 17:35 Bill Lorensen >> wrote: >> >>> How large are your textures and are they powers of 2. I've seen big >>> performance hits with large textures (1024x1024) in a webgl app. >>> On May 25, 2016 11:19 AM, "Andr?s Lehotay-K?ry" >>> wrote: >>> >>>> Hey folks! >>>> I mainly use VTK 7.0.0 for model display purposes on Android platform. >>>> I gave a try got the quite recently introduced vtkOBJImporter class to test >>>> the viewer behaviour for OBJ models with multiple textures and bumped into >>>> the following issues: >>>> >>>> Scenario 1: >>>> If i use vtkOBJImporter for models with any number of textures, i get >>>> ENORMOUS framedrops >>>> Scenario 2: >>>> If i use vtkOBJReader for models with a single texture, i get the >>>> same effect as above >>>> Scenario 3: >>>> If i use vtkOBJReader for the same models but without textures, i have >>>> no issues, the viewer is up to speed. >>>> >>>> I recorded two short videos for demostration: >>>> Scenario 2: >>>> https://goo.gl/93ag9e >>>> Scenario 3: >>>> https://goo.gl/cn0blJ >>>> Test model: >>>> https://sketchfab.com/models/a6f343cc661644319f88f1bdd20fe6de >>>> >>>> Mind you, the test model is quite large, but i get the same effect on >>>> models weigh less than 1MB. >>>> >>>> Build setup: >>>> Debian 8.3 >>>> Android NDK r10e >>>> toolchain GCC 4.9 >>>> -O3 optimization >>>> OpenGL ES 2.0 / 3.0 linkage (tried both, makes no difference here) >>>> >>>> Test devices: >>>> LG G4 >>>> Nexus 9 >>>> Galaxy S5 >>>> >>>> What could cause this effect? Different rendering mechanism for >>>> textured models? >>>> Thanks in advance! >>>> >>>> >>>> >>>> >>>> ---------------------------- >>>> >>>> [image: SmartMobileVision] >>>> >>>> >>>> *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) >>>> lka at smartmobilevision.com >>>> >>>> SmartMobileVision >>>> Szent Gell?rt t?r 3, 1114 Budapest, Hungary >>>> www.smartmobilevision.com >>>> >>>> [image: Google +] >>>> [image: >>>> LinkedIn] >>>> >>>> _______________________________________________ >>>> 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 lkandris at gmail.com Wed May 25 12:05:38 2016 From: lkandris at gmail.com (=?UTF-8?B?QW5kcsOhcyBMZWhvdGF5LUvDqXJ5?=) Date: Wed, 25 May 2016 16:05:38 +0000 Subject: [vtkusers] Huge framedrops on Android when opening textured OBJs In-Reply-To: References: Message-ID: Just a few at most. Will try it then. Does VTK provide any dynamic texture desampling at post load? That way i can isolate low-res texture usage to the mobile viewer and i still get to keep my fancy 4k textures. ---------------------------- [image: SmartMobileVision] *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) lka at smartmobilevision.com SmartMobileVision Szent Gell?rt t?r 3, 1114 Budapest, Hungary www.smartmobilevision.com [image: Google +] [image: LinkedIn] On Wed, 25 May 2016 at 18:01 Bill Lorensen wrote: > How many 4k textures? I had about 100. Had to drop them to 512 then speed > was good. > > > On Wed, May 25, 2016 at 11:43 AM, Andr?s Lehotay-K?ry > wrote: > >> Although mine is a native app, not webgl based, should be faster i think. >> >> On Wed, 25 May 2016 at 17:39 Andr?s Lehotay-K?ry >> wrote: >> >>> Well, mines can go up to 4096 x 4096. In fact the demo model has a >>> texture with just this size. >>> Allright, so if i split up my huge textures and generate multiple UV >>> maps from them of 512x512 size would it make any difference? >>> >>> >>> >>> ---------------------------- >>> >>> [image: SmartMobileVision] >>> >>> >>> *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) >>> lka at smartmobilevision.com >>> >>> SmartMobileVision >>> Szent Gell?rt t?r 3, 1114 Budapest, Hungary >>> www.smartmobilevision.com >>> >>> [image: Google +] >>> [image: LinkedIn] >>> >>> >>> On Wed, 25 May 2016 at 17:35 Bill Lorensen >>> wrote: >>> >>>> How large are your textures and are they powers of 2. I've seen big >>>> performance hits with large textures (1024x1024) in a webgl app. >>>> On May 25, 2016 11:19 AM, "Andr?s Lehotay-K?ry" >>>> wrote: >>>> >>>>> Hey folks! >>>>> I mainly use VTK 7.0.0 for model display purposes on Android platform. >>>>> I gave a try got the quite recently introduced vtkOBJImporter class to test >>>>> the viewer behaviour for OBJ models with multiple textures and bumped into >>>>> the following issues: >>>>> >>>>> Scenario 1: >>>>> If i use vtkOBJImporter for models with any number of textures, i get >>>>> ENORMOUS framedrops >>>>> Scenario 2: >>>>> If i use vtkOBJReader for models with a single texture, i get the >>>>> same effect as above >>>>> Scenario 3: >>>>> If i use vtkOBJReader for the same models but without textures, i >>>>> have no issues, the viewer is up to speed. >>>>> >>>>> I recorded two short videos for demostration: >>>>> Scenario 2: >>>>> https://goo.gl/93ag9e >>>>> Scenario 3: >>>>> https://goo.gl/cn0blJ >>>>> Test model: >>>>> https://sketchfab.com/models/a6f343cc661644319f88f1bdd20fe6de >>>>> >>>>> Mind you, the test model is quite large, but i get the same effect on >>>>> models weigh less than 1MB. >>>>> >>>>> Build setup: >>>>> Debian 8.3 >>>>> Android NDK r10e >>>>> toolchain GCC 4.9 >>>>> -O3 optimization >>>>> OpenGL ES 2.0 / 3.0 linkage (tried both, makes no difference here) >>>>> >>>>> Test devices: >>>>> LG G4 >>>>> Nexus 9 >>>>> Galaxy S5 >>>>> >>>>> What could cause this effect? Different rendering mechanism for >>>>> textured models? >>>>> Thanks in advance! >>>>> >>>>> >>>>> >>>>> >>>>> ---------------------------- >>>>> >>>>> [image: SmartMobileVision] >>>>> >>>>> >>>>> *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) >>>>> lka at smartmobilevision.com >>>>> >>>>> SmartMobileVision >>>>> Szent Gell?rt t?r 3, 1114 Budapest, Hungary >>>>> www.smartmobilevision.com >>>>> >>>>> [image: Google +] >>>>> [image: >>>>> LinkedIn] >>>>> >>>>> _______________________________________________ >>>>> 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 david.gobbi at gmail.com Wed May 25 12:08:45 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 25 May 2016 10:08:45 -0600 Subject: [vtkusers] Huge framedrops on Android when opening textured OBJs In-Reply-To: References: Message-ID: The vtkImageResize filter can be used to downsample an image. On Wed, May 25, 2016 at 10:05 AM, Andr?s Lehotay-K?ry wrote: > Just a few at most. Will try it then. > Does VTK provide any dynamic texture desampling at post load? That way i > can isolate low-res texture usage to the mobile viewer and i still get to > keep my fancy 4k textures. > > > ---------------------------- > > [image: SmartMobileVision] > > > *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) > lka at smartmobilevision.com > > SmartMobileVision > Szent Gell?rt t?r 3, 1114 Budapest, Hungary > www.smartmobilevision.com > > [image: Google +] [image: > LinkedIn] > > On Wed, 25 May 2016 at 18:01 Bill Lorensen > wrote: > >> How many 4k textures? I had about 100. Had to drop them to 512 then speed >> was good. >> >> >> On Wed, May 25, 2016 at 11:43 AM, Andr?s Lehotay-K?ry > > wrote: >> >>> Although mine is a native app, not webgl based, should be faster i think. >>> >>> On Wed, 25 May 2016 at 17:39 Andr?s Lehotay-K?ry >>> wrote: >>> >>>> Well, mines can go up to 4096 x 4096. In fact the demo model has a >>>> texture with just this size. >>>> Allright, so if i split up my huge textures and generate multiple UV >>>> maps from them of 512x512 size would it make any difference? >>>> >>>> >>>> >>>> ---------------------------- >>>> >>>> [image: SmartMobileVision] >>>> >>>> >>>> *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) >>>> lka at smartmobilevision.com >>>> >>>> SmartMobileVision >>>> Szent Gell?rt t?r 3, 1114 Budapest, Hungary >>>> www.smartmobilevision.com >>>> >>>> [image: Google +] >>>> [image: >>>> LinkedIn] >>>> >>>> On Wed, 25 May 2016 at 17:35 Bill Lorensen >>>> wrote: >>>> >>>>> How large are your textures and are they powers of 2. I've seen big >>>>> performance hits with large textures (1024x1024) in a webgl app. >>>>> On May 25, 2016 11:19 AM, "Andr?s Lehotay-K?ry" >>>>> wrote: >>>>> >>>>>> Hey folks! >>>>>> I mainly use VTK 7.0.0 for model display purposes on Android >>>>>> platform. I gave a try got the quite recently >>>>>> introduced vtkOBJImporter class to test the viewer behaviour for OBJ models >>>>>> with multiple textures and bumped into the following issues: >>>>>> >>>>>> Scenario 1: >>>>>> If i use vtkOBJImporter for models with any number of textures, i >>>>>> get ENORMOUS framedrops >>>>>> Scenario 2: >>>>>> If i use vtkOBJReader for models with a single texture, i get the >>>>>> same effect as above >>>>>> Scenario 3: >>>>>> If i use vtkOBJReader for the same models but without textures, i >>>>>> have no issues, the viewer is up to speed. >>>>>> >>>>>> I recorded two short videos for demostration: >>>>>> Scenario 2: >>>>>> https://goo.gl/93ag9e >>>>>> Scenario 3: >>>>>> https://goo.gl/cn0blJ >>>>>> Test model: >>>>>> https://sketchfab.com/models/a6f343cc661644319f88f1bdd20fe6de >>>>>> >>>>>> Mind you, the test model is quite large, but i get the same effect on >>>>>> models weigh less than 1MB. >>>>>> >>>>>> Build setup: >>>>>> Debian 8.3 >>>>>> Android NDK r10e >>>>>> toolchain GCC 4.9 >>>>>> -O3 optimization >>>>>> OpenGL ES 2.0 / 3.0 linkage (tried both, makes no difference here) >>>>>> >>>>>> Test devices: >>>>>> LG G4 >>>>>> Nexus 9 >>>>>> Galaxy S5 >>>>>> >>>>>> What could cause this effect? Different rendering mechanism for >>>>>> textured models? >>>>>> Thanks in advance! >>>>>> >>>>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From singh.sukhraj at gmail.com Wed May 25 13:04:47 2016 From: singh.sukhraj at gmail.com (Sukhraj Singh) Date: Wed, 25 May 2016 22:34:47 +0530 Subject: [vtkusers] How to scale a contour. Message-ID: Hello All, On the lines of the example http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/ContoursFromPolyData I created a contour by intersecting a Plane oriented in certain direction to get contour from an unstructuredgrid. My question is say I have a contour, and i want to scale it. How is that possible ? Using contour widget one can interactively change the location of points by picking them, but that is not what I want. To say in technically incorrect way, but in layman terms, I want to increase the radius of that circular looking contour. Thanks to provide the inputs. -- Sukhraj Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Wed May 25 17:26:06 2016 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 25 May 2016 15:26:06 -0600 Subject: [vtkusers] ExodusIIReader changes between 6.3 and 7.1. Message-ID: Using python vtk on OSX I am getting different behavior when reading ExodusII files. Am I missing a call to some different update function? The test code is: #!/usr/bin/env python import vtk print vtk.VTK_VERSION reader = vtk.vtkExodusIIReader() reader.SetFileName('adapt.e') reader.UpdateInformation() print 'adapt.e', reader.GetNumberOfTimeSteps() reader.SetFileName('adapt.e-s002') reader.UpdateInformation() print 'adapt.e-s002', reader.GetNumberOfTimeSteps() On 6.3 (installed via miniconda): 6.3.0 adapt.e 2 adapt.e-s002 1 On VTK 7 (4613a183c3e4481 76f3e0e1a1742ec fe46d6c531 ) 7.1.0 adapt.e 2 adapt.e-s002 0 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: adapt.e Type: application/octet-stream Size: 78044 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: adapt.e-s002 Type: application/octet-stream Size: 123332 bytes Desc: not available URL: From andrew.slaughter at inl.gov Wed May 25 18:10:15 2016 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 25 May 2016 16:10:15 -0600 Subject: [vtkusers] ExodusIIReader changes between 6.3 and 7.1. In-Reply-To: References: Message-ID: FYI: I have colleague who ran this on 7.0.0 and it worked as expected. On Wed, May 25, 2016 at 3:26 PM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > Using python vtk on OSX I am getting different behavior when reading > ExodusII files. Am I missing a call to some different update function? > > The test code is: > > #!/usr/bin/env python > import vtk > > print vtk.VTK_VERSION > reader = vtk.vtkExodusIIReader() > reader.SetFileName('adapt.e') > reader.UpdateInformation() > print 'adapt.e', reader.GetNumberOfTimeSteps() > > reader.SetFileName('adapt.e-s002') > reader.UpdateInformation() > print 'adapt.e-s002', reader.GetNumberOfTimeSteps() > > > On 6.3 (installed via miniconda): > 6.3.0 > adapt.e 2 > adapt.e-s002 1 > > On VTK 7 (4613a183c3e4481 > > 76f3e0e1a1742ec > > fe46d6c531 > > ) > 7.1.0 > adapt.e 2 > adapt.e-s002 0 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fabian.trobles at gmail.com Wed May 25 18:40:53 2016 From: fabian.trobles at gmail.com (Fabian Torres) Date: Wed, 25 May 2016 17:40:53 -0500 Subject: [vtkusers] Reslice rotation Message-ID: Hi all. I have a volume and I want to extract the center sagital slice of the volume and rotate it around the x axis in the center of the image. For this I'm using vtkImageReslice and vtkTransform. Everything works fine until I rotate the slice. It is rotating around the origin of the output image (lower left corner of the image) and not through the center of it. Can any one explain to me how do I choose the rotation axis in the transform. here is a brief of my code. const double MainWindow::sagitalElements[16] = { 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1 }; volumeData->GetSpacing(spacing); volumeData->GetOrigin(origin); volumeData->GetDimensions(dimensions); centerSlice[0] = floor(dimensions[0]*0.5); centerSlice[1] = floor(dimensions[1]*0.5); centerSlice[2] = floor(dimensions[2]*0.5); positionCenter[0] = origin[0] + spacing[0] * centerSlice[0]; positionCenter[1] = origin[1] + spacing[1] * centerSlice[1]; positionCenter[2] = origin[2] + spacing[2] * centerSlice[2]; resliceAxesSagital->DeepCopy(sagitalElements); reslicerSagital->SetInput(volumeData); reslicerSagital->SetOutputDimensionality(2); reslicerSagital->SetResliceAxes(resliceAxesSagital); reslicerSagital->SetResliceAxesOrigin(positionCenter); reslicerSagital->SetInterpolationModeToLinear(); -- Fabi?n Torres Robles Maestria en Ciencias en Ingenier?a Electr?nica Ingenier?a en Sistemas Electr?nicos tel. 58081280, 0445534661338 e-mail fabian.trobles at gmail.com, dae.wong at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fabian.trobles at gmail.com Wed May 25 18:43:10 2016 From: fabian.trobles at gmail.com (Fabian Torres) Date: Wed, 25 May 2016 17:43:10 -0500 Subject: [vtkusers] Reslice rotation Message-ID: Sorry I did not finished the other mail. Hi all. I have a volume and I want to extract the center sagital slice of the volume and rotate it around the x axis in the center of the image. For this I'm using vtkImageReslice and vtkTransform. Everything works fine until I rotate the slice. It is rotating around the origin of the output image (lower left corner of the image) and not through the center of it. Can any one explain to me how do I choose the rotation axis in the transform. here is a brief of my code. const double MainWindow::sagitalElements[16] = { 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1 }; volumeData->GetSpacing(spacing); volumeData->GetOrigin(origin); volumeData->GetDimensions(dimensions); centerSlice[0] = floor(dimensions[0]*0.5); centerSlice[1] = floor(dimensions[1]*0.5); centerSlice[2] = floor(dimensions[2]*0.5); positionCenter[0] = origin[0] + spacing[0] * centerSlice[0]; positionCenter[1] = origin[1] + spacing[1] * centerSlice[1]; positionCenter[2] = origin[2] + spacing[2] * centerSlice[2]; resliceAxesSagital->DeepCopy(sagitalElements); transformSagital->RotateX(rotate); reslicerSagital->SetInput(volumeData); reslicerSagital->SetOutputDimensionality(2); reslicerSagital->SetResliceAxes(resliceAxesSagital); reslicerSagital->SetResliceAxesOrigin(positionCenter); reslicerSagital->SetInterpolationModeToLinear(); reslicerSagital->SetResliceTransform(transformSagital); reslicerSagital->Update(); sliceImageSagital = reslicerSagital->GetOutput(); As I dsaid before the problem is that I want to rotate around the center of the image and not the origin of the image. Thanks a lot -- Fabi?n Torres Robles Maestria en Ciencias en Ingenier?a Electr?nica Ingenier?a en Sistemas Electr?nicos tel. 58081280, 0445534661338 e-mail fabian.trobles at gmail.com, dae.wong at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Wed May 25 22:12:48 2016 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Thu, 26 May 2016 12:12:48 +1000 Subject: [vtkusers] Traversing vtkPolyData returns incorrect number of points Message-ID: Hi David and Dan, I had a little look at the data using Dan's python script. Line 29 needs to be changed from: points.InsertPoint(currentPointId, d.GetPoint(pointIds[i])) to: points.InsertPoint(currentPointId, d.GetPoint(i)) When this is done, out.vtp has the points that are not associated with the cells in the original data in it. Now, if you change line 28 to: if pointIds[i] == 1 and i > 0: This will select all points associated with the cells. The extra i > 0 condition is needed as point 0 in cell 0 lies way outside the boundary of all the other points for some reason, yet is associated with a cell. This one point has a value of: (0, 3.6e19, -5.2e27), whilst the dimensions of the polygonal mesh are: X-range: -195 to 193 (delta: 389) Y-range: -45.2 to 242 (delta: 287) Z-range: -583 to 362 (delta: 945) This is a nice little script Dan for filtering out points not associated with cells, I'll add it to my list of useful scripts, thanks. Regards Andrew > > ---------- Forwarded message ---------- > From: David Edmunds > To: Dan Lipsa > Cc: "vtkusers at vtk.org" , David Edmunds < > David.Edmunds at icr.ac.uk> > Date: Wed, 25 May 2016 14:51:14 +0100 > Subject: Re: [vtkusers] Traversing vtkPolyData returns incorrect number of > points > Hi, > > Sorry for the late reply but I couldn?t send attachments to the mailing > list. My input file can be found at http://www.filedropper.com/organbody. > > Kind regards, > > Dave > > On 23 May 2016, at 18:20, Dan Lipsa wrote: > > I see, > Well, in this case, you may have points that are not part of any cells. > Can you share your data file? > > On Mon, May 23, 2016 at 12:16 PM, David Edmunds > wrote: > >> Hi Dan, >> >> Thanks, but I actually get a much smaller number when I count all the >> points from cells. Also, in my input dataset the cells are disjoint, i.e. >> no points are shared between multiple cells. >> >> Kind regards, >> >> Dave >> >> On 23 May 2016, at 16:51, Dan Lipsa wrote: >> >> Hi David, >> You have shared points between cells so it is normal you'll get a bigger >> number when you count all the points from cells. >> >> On Mon, May 23, 2016 at 10:01 AM, David Edmunds >> wrote: >> >>> Dear all, >>> >>> I am traversing a vtkPolyData object which is read in from a file using >>> vtkXMLPolyDataReader. I access the number of points in the vtkPolyData in >>> two different ways, here is my source code: >>> >>> vtkSmartPointer reader = >>> vtkSmartPointer::New(); >>> reader->SetFileName("/Users/dedmunds/Desktop/organ_Body.vtp"); >>> reader->Update(); >>> vtkSmartPointer poly_data = reader->GetOutput(); >>> >>> cout << "Number of points: " << poly_data->GetNumberOfPoints() << endl; >>> >>> int traversal_points = 0; >>> for (int i=0; iGetNumberOfCells(); i++) { >>> traversal_points += poly_data->GetCell(i)->GetNumberOfPoints(); >>> } >>> cout << "Traversal number of points: " << traversal_points << endl; >>> >>> Here is the output: >>> >>> Number of points: 286402 >>> Traversal number of points: 143204 >>> >>> Why do I get two different answers? The second number is approximately >>> half the first. What am I doing wrong? >>> >>> Thanks for your help, >>> >>> Kind regards, >>> >>> Dave >>> >>> The Institute of Cancer Research: Royal Cancer Hospital, a charitable >>> Company Limited by Guarantee, Registered in England under Company No. >>> 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. >>> >>> This e-mail message is confidential and for use by the addressee only. >>> If the message is received by anyone other than the addressee, please >>> return the message to the sender by replying to it and then delete the >>> message from your computer and network. >>> _______________________________________________ >>> 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 >>> >> >> >> >> The Institute of Cancer Research: Royal Cancer Hospital, a charitable >> Company Limited by Guarantee, Registered in England under Company No. >> 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. >> >> This e-mail message is confidential and for use by the addressee only. If >> the message is received by anyone other than the addressee, please return >> the message to the sender by replying to it and then delete the message >> from your computer and network. >> > > > > The Institute of Cancer Research: Royal Cancer Hospital, a charitable > Company Limited by Guarantee, Registered in England under Company No. > 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. > > This e-mail message is confidential and for use by the addressee only. If > the message is received by anyone other than the addressee, please return > the message to the sender by replying to it and then delete the message > from your computer and network. > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu May 26 01:55:42 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 26 May 2016 07:55:42 +0200 Subject: [vtkusers] My personal VTK package for Ubuntu 16.04 Message-ID: In case anyone is in need of a VTK 7.0.0 package for Ubuntu 16.04: https://launchpad.net/~elvstone/+archive/ubuntu/vtk7 It's a "jumbo" package that installs everything to /opt/VTK-7.0.0. It also only includes the Python wrappers. Very unofficial, and very much untested at this point since I only built it last night. Cheers, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu May 26 02:18:25 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 26 May 2016 08:18:25 +0200 Subject: [vtkusers] My personal VTK package for Ubuntu 16.04 In-Reply-To: References: Message-ID: 2016-05-26 7:55 GMT+02:00 Elvis Stansvik : > In case anyone is in need of a VTK 7.0.0 package for Ubuntu 16.04: > > https://launchpad.net/~elvstone/+archive/ubuntu/vtk7 > > It's a "jumbo" package that installs everything to /opt/VTK-7.0.0. It also > only includes the Python wrappers. > To clarify: It doesn't install everything from VTK. In fact, it excludes quite a lot (such as the Web module). With "jumbo" I just meant that it's a single package vtk7, not split into various packages like normal Debian packaging mandates. Elvis > Very unofficial, and very much untested at this point since I only built > it last night. > > Cheers, > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu May 26 04:51:39 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 26 May 2016 10:51:39 +0200 Subject: [vtkusers] Wiki examples fail to build due to no InsertNextTypedTuple Message-ID: In several of the wiki examples, I get /home/estan/orexplore/VTKWikiExamples/Cxx/GeometricObjects/ColoredLines.cxx:72:13: error: ?class vtkUnsignedCharArray? has no member named ?InsertNextTypedTuple? colors->InsertNextTypedTuple(red); I can't find the InsertNextTypedTuple function in VTK 7. The change was made here: http://www.vtk.org/Wiki/index.php?title=VTK%2FExamples%2FCxx%2FGeometricObjects%2FColoredLines&diff=59278&oldid=59243 Where is InsertNextTypedTuple coming from? Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu May 26 05:27:14 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 26 May 2016 11:27:14 +0200 Subject: [vtkusers] Wiki examples fail to build due to no InsertNextTypedTuple In-Reply-To: References: Message-ID: I got some other errors as well. I'm attaching a diff of how I had to change the examples in order for them all to compile with 7.0.0. Unfortunately don't have time right now to go through the wiki pages and edit them. Regards, Elvis 2016-05-26 10:51 GMT+02:00 Elvis Stansvik : > In several of the wiki examples, I get > > /home/estan/orexplore/VTKWikiExamples/Cxx/GeometricObjects/ColoredLines.cxx:72:13: > error: ?class vtkUnsignedCharArray? has no member named > ?InsertNextTypedTuple? > colors->InsertNextTypedTuple(red); > > I can't find the InsertNextTypedTuple function in VTK 7. > > The change was made here: > > > http://www.vtk.org/Wiki/index.php?title=VTK%2FExamples%2FCxx%2FGeometricObjects%2FColoredLines&diff=59278&oldid=59243 > > Where is InsertNextTypedTuple coming from? > > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- diff --git a/Cxx/GeometricObjects/ColoredLines.cxx b/Cxx/GeometricObjects/ColoredLines.cxx index 689e0d8..3948d99 100644 --- a/Cxx/GeometricObjects/ColoredLines.cxx +++ b/Cxx/GeometricObjects/ColoredLines.cxx @@ -65,13 +65,8 @@ int main(int, char *[]) vtkSmartPointer colors = vtkSmartPointer::New(); colors->SetNumberOfComponents(3); -#if VTK_MAJOR_VERSION < 7 colors->InsertNextTupleValue(red); colors->InsertNextTupleValue(green); -#else - colors->InsertNextTypedTuple(red); - colors->InsertNextTypedTuple(green); -#endif // Color the lines. // SetScalars() automatically associates the values in the data array passed as parameter diff --git a/Cxx/Graphs/AdjacentVertexIterator.cxx b/Cxx/Graphs/AdjacentVertexIterator.cxx index b537c5d..00e27cf 100644 --- a/Cxx/Graphs/AdjacentVertexIterator.cxx +++ b/Cxx/Graphs/AdjacentVertexIterator.cxx @@ -39,7 +39,7 @@ int main(int, char *[]) for(unsigned int i = 0; i < 4; i++) { - vertexColors->InsertNextTypedTuple(blue);//not connected vertices + vertexColors->InsertNextTuple(blue);//not connected vertices } diff --git a/Cxx/Math/VectorDot.cxx b/Cxx/Math/VectorDot.cxx index ffba206..2940589 100644 --- a/Cxx/Math/VectorDot.cxx +++ b/Cxx/Math/VectorDot.cxx @@ -33,9 +33,9 @@ int main(int, char *[]) normals->InsertNextTupleValue(n1); normals->InsertNextTupleValue(n2); #else - normals->InsertNextTypedTuple(n0); - normals->InsertNextTypedTuple(n1); - normals->InsertNextTypedTuple(n2); + normals->InsertNextTuple(n0); + normals->InsertNextTuple(n1); + normals->InsertNextTuple(n2); #endif polydata->GetPointData()->SetNormals(normals); @@ -53,9 +53,9 @@ int main(int, char *[]) vectors->InsertNextTupleValue(v1); vectors->InsertNextTupleValue(v2); #else - vectors->InsertNextTypedTuple(v0); - vectors->InsertNextTypedTuple(v1); - vectors->InsertNextTypedTuple(v2); + vectors->InsertNextTuple(v0); + vectors->InsertNextTuple(v1); + vectors->InsertNextTuple(v2); #endif polydata->GetPointData()->SetVectors(vectors); diff --git a/Cxx/Math/VectorNorm.cxx b/Cxx/Math/VectorNorm.cxx index 6b19c36..d97049a 100644 --- a/Cxx/Math/VectorNorm.cxx +++ b/Cxx/Math/VectorNorm.cxx @@ -28,8 +28,8 @@ int main(int, char *[]) distances->InsertNextTupleValue(v1); distances->InsertNextTupleValue(v2); #else - distances->InsertNextTypedTuple(v1); - distances->InsertNextTypedTuple(v2); + distances->InsertNextTuple(v1); + distances->InsertNextTuple(v2); #endif polydata->GetPointData()->SetVectors(distances); diff --git a/Cxx/Meshes/ColoredElevationMap.cxx b/Cxx/Meshes/ColoredElevationMap.cxx index 0f3d603..e1ead41 100644 --- a/Cxx/Meshes/ColoredElevationMap.cxx +++ b/Cxx/Meshes/ColoredElevationMap.cxx @@ -97,11 +97,7 @@ int main(int, char *[]) << (int)color[1] << " " << (int)color[2] << std::endl; -#if VTK_MAJOR_VERSION < 7 colors->InsertNextTupleValue(color); -#else - colors->InsertNextTypedTuple(color); -#endif } outputPolyData->GetPointData()->SetScalars(colors); diff --git a/Cxx/Meshes/ElevationFilter.cxx b/Cxx/Meshes/ElevationFilter.cxx index 76ba0a5..8a87767 100644 --- a/Cxx/Meshes/ElevationFilter.cxx +++ b/Cxx/Meshes/ElevationFilter.cxx @@ -87,11 +87,7 @@ int main(int, char *[]) } std::cout << "color: " << (int)color[0] << " " << (int)color[1] << " " << (int)color[2] << std::endl; -#if VTK_MAJOR_VERSION < 7 colors->InsertNextTupleValue(color); -#else - colors->InsertNextTypedTuple(color); -#endif } output->GetPointData()->AddArray(colors); diff --git a/Cxx/Meshes/SimpleElevationFilter.cxx b/Cxx/Meshes/SimpleElevationFilter.cxx index 94f9435..2bd1585 100644 --- a/Cxx/Meshes/SimpleElevationFilter.cxx +++ b/Cxx/Meshes/SimpleElevationFilter.cxx @@ -86,11 +86,7 @@ int main(int, char *[]) } std::cout << "color: " << (int)color[0] << " " << (int)color[1] << " " << (int)color[2] << std::endl; -#if VTK_MAJOR_VERSION < 7 colors->InsertNextTupleValue(color); -#else - colors->InsertNextTypedTuple(color); -#endif } output->GetPointData()->AddArray(colors); diff --git a/Cxx/PolyData/ColoredPoints.cxx b/Cxx/PolyData/ColoredPoints.cxx index 3970f9c..cf8a255 100644 --- a/Cxx/PolyData/ColoredPoints.cxx +++ b/Cxx/PolyData/ColoredPoints.cxx @@ -48,15 +48,9 @@ int main(int, char *[]) vtkSmartPointer::New(); colors->SetNumberOfComponents(3); colors->SetName ("Colors"); -#if VTK_MAJOR_VERSION < 7 colors->InsertNextTupleValue(red); colors->InsertNextTupleValue(green); colors->InsertNextTupleValue(blue); -#else - colors->InsertNextTypedTuple(red); - colors->InsertNextTypedTuple(green); - colors->InsertNextTypedTuple(blue); -#endif polydata->GetPointData()->SetScalars(colors); // Visualization diff --git a/Cxx/PolyData/TriangleColoredPoints.cxx b/Cxx/PolyData/TriangleColoredPoints.cxx index 861e3ae..01348b9 100644 --- a/Cxx/PolyData/TriangleColoredPoints.cxx +++ b/Cxx/PolyData/TriangleColoredPoints.cxx @@ -33,15 +33,9 @@ int main(int, char *[]) colors->SetName("Colors"); // Add the three colors we have created to the array -#if VTK_MAJOR_VERSION < 7 colors->InsertNextTupleValue(red); colors->InsertNextTupleValue(green); colors->InsertNextTupleValue(blue); -#else - colors->InsertNextTypedTuple(red); - colors->InsertNextTypedTuple(green); - colors->InsertNextTypedTuple(blue); -#endif // Create a triangle vtkSmartPointer triangles = vtkSmartPointer::New(); diff --git a/Cxx/PolyData/TriangleSolidColor.cxx b/Cxx/PolyData/TriangleSolidColor.cxx index badb852..cb18adf 100644 --- a/Cxx/PolyData/TriangleSolidColor.cxx +++ b/Cxx/PolyData/TriangleSolidColor.cxx @@ -31,11 +31,7 @@ int main(int, char *[]) vtkSmartPointer::New(); colors->SetNumberOfComponents(3); colors->SetName("Colors"); -#if VTK_MAJOR_VERSION < 7 colors->InsertNextTupleValue(red); -#else - colors->InsertNextTypedTuple(red); -#endif vtkSmartPointer triangles = vtkSmartPointer::New(); diff --git a/Cxx/Utilities/ShepardMethod.cxx b/Cxx/Utilities/ShepardMethod.cxx index c6ceeae..dd411a8 100644 --- a/Cxx/Utilities/ShepardMethod.cxx +++ b/Cxx/Utilities/ShepardMethod.cxx @@ -31,13 +31,8 @@ int main(int, char *[]) vtkSmartPointer::New(); vertexColors->SetNumberOfComponents(3); vertexColors->SetName("Colors"); -#if VTK_MAJOR_VERSION < 7 vertexColors->InsertNextTupleValue(black); vertexColors->InsertNextTupleValue(white); -#else - vertexColors->InsertNextTypedTuple(black); - vertexColors->InsertNextTypedTuple(white); -#endif // Create a scalar array for the pointdata, each value represents the distance // of the vertices from the first vertex diff --git a/Cxx/Visualization/BackgroundTexture.cxx b/Cxx/Visualization/BackgroundTexture.cxx index dcc9e0f..d3830cf 100644 --- a/Cxx/Visualization/BackgroundTexture.cxx +++ b/Cxx/Visualization/BackgroundTexture.cxx @@ -31,13 +31,8 @@ int main(int, char *[]) vtkSmartPointer::New(); vertexColors->SetNumberOfComponents(3); vertexColors->SetName("Colors"); -#if VTK_MAJOR_VERSION < 7 vertexColors->InsertNextTupleValue(black); vertexColors->InsertNextTupleValue(white); -#else - vertexColors->InsertNextTypedTuple(black); - vertexColors->InsertNextTypedTuple(white); -#endif // Create a scalar array for the pointdata, each value represents the distance // of the vertices from the first vertex vtkSmartPointer values = diff --git a/Cxx/Visualization/ColorGlyphs.cxx b/Cxx/Visualization/ColorGlyphs.cxx index 0f6e072..048e949 100644 --- a/Cxx/Visualization/ColorGlyphs.cxx +++ b/Cxx/Visualization/ColorGlyphs.cxx @@ -31,15 +31,9 @@ int main(int, char *[]) unsigned char r[3] = {255,0,0}; unsigned char g[3] = {0,255,0}; unsigned char b[3] = {0,0,255}; -#if VTK_MAJOR_VERSION < 7 colors->InsertNextTupleValue(r); colors->InsertNextTupleValue(g); colors->InsertNextTupleValue(b); -#else - colors->InsertNextTypedTuple(r); - colors->InsertNextTypedTuple(g); - colors->InsertNextTypedTuple(b); -#endif // Combine into a polydata vtkSmartPointer polydata = diff --git a/Cxx/Visualization/CubeAxesActor.cxx b/Cxx/Visualization/CubeAxesActor.cxx index cd4c010..f4e81cc 100644 --- a/Cxx/Visualization/CubeAxesActor.cxx +++ b/Cxx/Visualization/CubeAxesActor.cxx @@ -47,13 +47,7 @@ int main(int, char *[]) cubeAxesActor->DrawXGridlinesOn(); cubeAxesActor->DrawYGridlinesOn(); cubeAxesActor->DrawZGridlinesOn(); -#if VTK_MAJOR_VERSION == 6 cubeAxesActor->SetGridLineLocation(VTK_GRID_LINES_FURTHEST); -#endif -#if VTK_MAJOR_VERSION > 6 - cubeAxesActor->SetGridLineLocation( - cubeAxesActor->VTK_GRID_LINES_FURTHEST); -#endif cubeAxesActor->XAxisMinorTickVisibilityOff(); cubeAxesActor->YAxisMinorTickVisibilityOff(); From elvis.stansvik at orexplore.com Thu May 26 07:46:33 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 26 May 2016 13:46:33 +0200 Subject: [vtkusers] Glitch in rendering when using vtkGPUVolumeRayCastMapper in 7.0.0 Message-ID: Hi all, When I view my volume from certain angles, there are glitches in the rendering when using vtkGPUVolumeRayCastMapper , see attached screenshots when the glitch is occurring and when it is not. Has anyone seen this behavior and know what the problem might be? This is on Intel HD 4400 graphics. I would love to be able to use the GPU volume mapper since it's so much faster than the software one. Thanks, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gpu_volume_glitch.png Type: image/png Size: 23557 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: gpu_volume_ok.png Type: image/png Size: 39229 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Thu May 26 08:01:01 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 26 May 2016 14:01:01 +0200 Subject: [vtkusers] Glitch in rendering when using vtkGPUVolumeRayCastMapper in 7.0.0 In-Reply-To: References: Message-ID: 2016-05-26 13:46 GMT+02:00 Elvis Stansvik : > Hi all, > > When I view my volume from certain angles, there are glitches in the > rendering when using vtkGPUVolumeRayCastMapper , see attached screenshots > when the glitch is occurring and when it is not. > > Has anyone seen this behavior and know what the problem might be? This is > on Intel HD 4400 graphics. > If it's not quite clear, the glitch is at the bottom of the first screenshot, where an are of the volume is not visible. >From certain angles the volume disappears almost completely. Elvis > > I would love to be able to use the GPU volume mapper since it's so much > faster than the software one. > > Thanks, > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkandris at gmail.com Thu May 26 08:23:59 2016 From: lkandris at gmail.com (=?UTF-8?B?QW5kcsOhcyBMZWhvdGF5LUvDqXJ5?=) Date: Thu, 26 May 2016 12:23:59 +0000 Subject: [vtkusers] vtkQuadricLODActor does not render texture maps Message-ID: Hi folks, A quick question: when i try to load an OBJ model using vtkOBJReader, assign it to a vtkQuadricLODActor and add texture to this actor, there are no textures visible. Futhermore, when i load the obj with vtkOBJImporter, it seems the faces are gone. Attached screenshots below. Thanks in advance! vtkOBJReader + LOD based rendering = no textures [image: vtkOBJReader+LOD.jpg] vtkOBJImporter + LOD based rendering = no textures + incorrect geometry [image: vtkOBJImporter+LOD.jpg] ---------------------------- [image: SmartMobileVision] *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) lka at smartmobilevision.com SmartMobileVision Szent Gell?rt t?r 3, 1114 Budapest, Hungary www.smartmobilevision.com [image: Google +] [image: LinkedIn] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkOBJReader+LOD.jpg Type: image/jpeg Size: 69256 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkOBJImporter+LOD.jpg Type: image/jpeg Size: 32072 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Thu May 26 08:29:10 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 26 May 2016 14:29:10 +0200 Subject: [vtkusers] Glitch in rendering when using vtkGPUVolumeRayCastMapper in 7.0.0 In-Reply-To: References: Message-ID: 2016-05-26 14:01 GMT+02:00 Elvis Stansvik : > 2016-05-26 13:46 GMT+02:00 Elvis Stansvik : > >> Hi all, >> >> When I view my volume from certain angles, there are glitches in the >> rendering when using vtkGPUVolumeRayCastMapper , see attached screenshots >> when the glitch is occurring and when it is not. >> >> Has anyone seen this behavior and know what the problem might be? This is >> on Intel HD 4400 graphics. >> > > If it's not quite clear, the glitch is at the bottom of the first > screenshot, where an are of the volume is not visible. > An observation: I had the following to enable parallell projection in my code: self.camera.ParallelProjectionOn() If I remove this line, so that perspective projection is used instead, the glitches disappear. This is not a solution, since I need to use parallell projection, but maybe it's a clue to the problem? Elvis > From certain angles the volume disappears almost completely. > > Elvis > > >> >> I would love to be able to use the GPU volume mapper since it's so much >> faster than the software one. >> >> Thanks, >> Elvis >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lkandris at gmail.com Thu May 26 08:30:20 2016 From: lkandris at gmail.com (=?UTF-8?B?QW5kcsOhcyBMZWhvdGF5LUvDqXJ5?=) Date: Thu, 26 May 2016 12:30:20 +0000 Subject: [vtkusers] vtkQuadricLODActor does not render texture maps In-Reply-To: References: Message-ID: Code snippets for vtkOBJReader based loading: http://pastebin.com/mDySVFNN As for vtkOBJImporter, i only altered the local actor to be a vtkQuadricLODActor in vtkOBJImporterInternals.cxx. ---------------------------- [image: SmartMobileVision] *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) lka at smartmobilevision.com SmartMobileVision Szent Gell?rt t?r 3, 1114 Budapest, Hungary www.smartmobilevision.com [image: Google +] [image: LinkedIn] On Thu, 26 May 2016 at 14:23 Andr?s Lehotay-K?ry wrote: > Hi folks, > A quick question: when i try to load an OBJ model using vtkOBJReader, > assign it to a vtkQuadricLODActor and add texture to this actor, there are > no textures visible. Futhermore, when i load the obj with vtkOBJImporter, > it seems the faces are gone. > > Attached screenshots below. > > Thanks in advance! > > vtkOBJReader + LOD based rendering = no textures > [image: vtkOBJReader+LOD.jpg] > vtkOBJImporter + LOD based rendering = no textures + incorrect geometry > [image: vtkOBJImporter+LOD.jpg] > > > ---------------------------- > > [image: SmartMobileVision] > > > *Andr?s Lehotay-K?ry*Software Developer (Mobile / Computer Vision) > lka at smartmobilevision.com > > SmartMobileVision > Szent Gell?rt t?r 3, 1114 Budapest, Hungary > www.smartmobilevision.com > > [image: Google +] [image: > LinkedIn] > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkOBJReader+LOD.jpg Type: image/jpeg Size: 69256 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkOBJImporter+LOD.jpg Type: image/jpeg Size: 32072 bytes Desc: not available URL: From lasso at queensu.ca Thu May 26 09:03:53 2016 From: lasso at queensu.ca (Andras Lasso) Date: Thu, 26 May 2016 13:03:53 +0000 Subject: [vtkusers] Glitch in rendering when using vtkGPUVolumeRayCastMapper in 7.0.0 In-Reply-To: References: , Message-ID: Maybe you?ve forgot to set the camera clipping range. Andras From: Elvis Stansvik Sent: May 26, 2016 08:29 To: VTK Users Subject: Re: [vtkusers] Glitch in rendering when using vtkGPUVolumeRayCastMapper in 7.0.0 2016-05-26 14:01 GMT+02:00 Elvis Stansvik >: 2016-05-26 13:46 GMT+02:00 Elvis Stansvik >: Hi all, When I view my volume from certain angles, there are glitches in the rendering when using vtkGPUVolumeRayCastMapper , see attached screenshots when the glitch is occurring and when it is not. Has anyone seen this behavior and know what the problem might be? This is on Intel HD 4400 graphics. If it's not quite clear, the glitch is at the bottom of the first screenshot, where an are of the volume is not visible. An observation: I had the following to enable parallell projection in my code: self.camera.ParallelProjectionOn() If I remove this line, so that perspective projection is used instead, the glitches disappear. This is not a solution, since I need to use parallell projection, but maybe it's a clue to the problem? Elvis >From certain angles the volume disappears almost completely. Elvis I would love to be able to use the GPU volume mapper since it's so much faster than the software one. Thanks, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Edmunds at icr.ac.uk Thu May 26 09:07:40 2016 From: David.Edmunds at icr.ac.uk (David Edmunds) Date: Thu, 26 May 2016 14:07:40 +0100 Subject: [vtkusers] Traversing vtkPolyData returns incorrect number of points In-Reply-To: References: Message-ID: <1C902A90-FA28-4EF7-A43F-E0FDAA7997A3@icr.ac.uk> Hi Andrew and Dan, Thanks very much for your help and the useful Python script. I have now fixed the problem, it was related to a bug in the way I generate my vtkPolyData objects from my input data. For future reference, my input data consists of a set of closed loops consisting of 3D points, stored in a vector>. I now successfully convert this to vtkPolyData using the following two functions: vtkSmartPointer convertContourToPolyData(vector c) { auto points = vtkSmartPointer::New(); for (auto i = 0; i < c.size(); i += 3) { auto id = points->InsertNextPoint(c[i], c[i + 1], c[i + 2]); } auto poly_line = vtkSmartPointer::New(); poly_line->GetPointIds()->SetNumberOfIds(points->GetNumberOfPoints()); for (auto i = 0; i < points->GetNumberOfPoints(); i++) { poly_line->GetPointIds()->SetId(i, i); } auto cells = vtkSmartPointer::New(); cells->InsertNextCell(poly_line); auto poly_data = vtkSmartPointer::New(); poly_data->SetPoints(points); poly_data->SetLines(cells); return poly_data; } vtkSmartPointer convertContoursToPolyData(vector> contours) { auto append_filter = vtkSmartPointer::New(); for (auto c : contours) { append_filter->AddInputData(convertContourToPolyData(c)); } append_filter->Update(); return append_filter->GetOutput(); } Kind regards, Dave On 26 May 2016, at 03:12, Andrew Maclean > wrote: Hi David and Dan, I had a little look at the data using Dan's python script. Line 29 needs to be changed from: points.InsertPoint(currentPointId, d.GetPoint(pointIds[i])) to: points.InsertPoint(currentPointId, d.GetPoint(i)) When this is done, out.vtp has the points that are not associated with the cells in the original data in it. Now, if you change line 28 to: if pointIds[i] == 1 and i > 0: This will select all points associated with the cells. The extra i > 0 condition is needed as point 0 in cell 0 lies way outside the boundary of all the other points for some reason, yet is associated with a cell. This one point has a value of: (0, 3.6e19, -5.2e27), whilst the dimensions of the polygonal mesh are: X-range: -195 to 193 (delta: 389) Y-range: -45.2 to 242 (delta: 287) Z-range: -583 to 362 (delta: 945) This is a nice little script Dan for filtering out points not associated with cells, I'll add it to my list of useful scripts, thanks. Regards Andrew ---------- Forwarded message ---------- From: David Edmunds > To: Dan Lipsa > Cc: "vtkusers at vtk.org" >, David Edmunds > Date: Wed, 25 May 2016 14:51:14 +0100 Subject: Re: [vtkusers] Traversing vtkPolyData returns incorrect number of points Hi, Sorry for the late reply but I couldn?t send attachments to the mailing list. My input file can be found at http://www.filedropper.com/organbody. Kind regards, Dave On 23 May 2016, at 18:20, Dan Lipsa > wrote: I see, Well, in this case, you may have points that are not part of any cells. Can you share your data file? On Mon, May 23, 2016 at 12:16 PM, David Edmunds > wrote: Hi Dan, Thanks, but I actually get a much smaller number when I count all the points from cells. Also, in my input dataset the cells are disjoint, i.e. no points are shared between multiple cells. Kind regards, Dave On 23 May 2016, at 16:51, Dan Lipsa > wrote: Hi David, You have shared points between cells so it is normal you'll get a bigger number when you count all the points from cells. On Mon, May 23, 2016 at 10:01 AM, David Edmunds > wrote: Dear all, I am traversing a vtkPolyData object which is read in from a file using vtkXMLPolyDataReader. I access the number of points in the vtkPolyData in two different ways, here is my source code: vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("/Users/dedmunds/Desktop/organ_Body.vtp"); reader->Update(); vtkSmartPointer poly_data = reader->GetOutput(); cout << "Number of points: " << poly_data->GetNumberOfPoints() << endl; int traversal_points = 0; for (int i=0; iGetNumberOfCells(); i++) { traversal_points += poly_data->GetCell(i)->GetNumberOfPoints(); } cout << "Traversal number of points: " << traversal_points << endl; Here is the output: Number of points: 286402 Traversal number of points: 143204 Why do I get two different answers? The second number is approximately half the first. What am I doing wrong? Thanks for your help, Kind regards, Dave The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. _______________________________________________ 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 The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network. -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu May 26 09:17:56 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 26 May 2016 15:17:56 +0200 Subject: [vtkusers] Glitch in rendering when using vtkGPUVolumeRayCastMapper in 7.0.0 In-Reply-To: References: Message-ID: 2016-05-26 15:03 GMT+02:00 Andras Lasso : > Maybe you?ve forgot to set the camera clipping range. > Hm, I realize I wasn't clear: The problem occurs only with the GPU mapper, not with the software based one. So I don't think it's a clipping range problem (since then it would show up in the software mapper as well). I've also tried changing my clipping range and the effect is the same. It occurs no matter how zoomed in/zoomed out I am, and seems to more have to do with the angle I'm viewing the volume from. Elvis > > > Andras > > > > *From: *Elvis Stansvik > *Sent: *May 26, 2016 08:29 > *To: *VTK Users > *Subject: *Re: [vtkusers] Glitch in rendering when using > vtkGPUVolumeRayCastMapper in 7.0.0 > > > 2016-05-26 14:01 GMT+02:00 Elvis Stansvik : > >> 2016-05-26 13:46 GMT+02:00 Elvis Stansvik : >> >>> Hi all, >>> >>> When I view my volume from certain angles, there are glitches in the >>> rendering when using vtkGPUVolumeRayCastMapper , see attached screenshots >>> when the glitch is occurring and when it is not. >>> >>> Has anyone seen this behavior and know what the problem might be? This >>> is on Intel HD 4400 graphics. >>> >> >> If it's not quite clear, the glitch is at the bottom of the first >> screenshot, where an are of the volume is not visible. >> > > An observation: I had the following to enable parallell projection in my > code: > > self.camera.ParallelProjectionOn() > > If I remove this line, so that perspective projection is used instead, the > glitches disappear. > > This is not a solution, since I need to use parallell projection, but > maybe it's a clue to the problem? > > Elvis > > >> From certain angles the volume disappears almost completely. >> >> Elvis >> >> >>> >>> I would love to be able to use the GPU volume mapper since it's so much >>> faster than the software one. >>> >>> Thanks, >>> Elvis >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu May 26 09:30:08 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 26 May 2016 09:30:08 -0400 Subject: [vtkusers] Traversing vtkPolyData returns incorrect number of points In-Reply-To: References: Message-ID: > > > Line 29 needs to be changed from: > points.InsertPoint(currentPointId, d.GetPoint(pointIds[i])) > to: > points.InsertPoint(currentPointId, d.GetPoint(i)) > Thanks for the bug fix Andrew. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu May 26 09:30:57 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 26 May 2016 15:30:57 +0200 Subject: [vtkusers] Glitch in rendering when using vtkGPUVolumeRayCastMapper in 7.0.0 In-Reply-To: References: Message-ID: 2016-05-26 15:17 GMT+02:00 Elvis Stansvik : > 2016-05-26 15:03 GMT+02:00 Andras Lasso : > >> Maybe you?ve forgot to set the camera clipping range. >> > > Hm, I realize I wasn't clear: The problem occurs only with the GPU mapper, > not with the software based one. So I don't think it's a clipping range > problem (since then it would show up in the software mapper as well). I've > also tried changing my clipping range and the effect is the same. > > It occurs no matter how zoomed in/zoomed out I am, and seems to more have > to do with the angle I'm viewing the volume from. > Bah, my camera was actually positioned inside the volume. Moving it outside to a "safe distance" and the problem is gone. Elvis > > Elvis > > >> >> >> Andras >> >> >> >> *From: *Elvis Stansvik >> *Sent: *May 26, 2016 08:29 >> *To: *VTK Users >> *Subject: *Re: [vtkusers] Glitch in rendering when using >> vtkGPUVolumeRayCastMapper in 7.0.0 >> >> >> 2016-05-26 14:01 GMT+02:00 Elvis Stansvik : >> >>> 2016-05-26 13:46 GMT+02:00 Elvis Stansvik >>> : >>> >>>> Hi all, >>>> >>>> When I view my volume from certain angles, there are glitches in the >>>> rendering when using vtkGPUVolumeRayCastMapper , see attached screenshots >>>> when the glitch is occurring and when it is not. >>>> >>>> Has anyone seen this behavior and know what the problem might be? This >>>> is on Intel HD 4400 graphics. >>>> >>> >>> If it's not quite clear, the glitch is at the bottom of the first >>> screenshot, where an are of the volume is not visible. >>> >> >> An observation: I had the following to enable parallell projection in my >> code: >> >> self.camera.ParallelProjectionOn() >> >> If I remove this line, so that perspective projection is used instead, >> the glitches disappear. >> >> This is not a solution, since I need to use parallell projection, but >> maybe it's a clue to the problem? >> >> Elvis >> >> >>> From certain angles the volume disappears almost completely. >>> >>> Elvis >>> >>> >>>> >>>> I would love to be able to use the GPU volume mapper since it's so much >>>> faster than the software one. >>>> >>>> Thanks, >>>> Elvis >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu May 26 10:47:26 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 26 May 2016 10:47:26 -0400 Subject: [vtkusers] Wiki examples fail to build due to no InsertNextTypedTuple In-Reply-To: References: Message-ID: Unfortunately, that API was changed and there is no tag that isolates the change. So we have to wait until the 7.1 release. For now, you can update your VTK to HEAD nad you should be fine. Bill On Thu, May 26, 2016 at 5:27 AM, Elvis Stansvik wrote: > I got some other errors as well. I'm attaching a diff of how I had to change > the examples in order for them all to compile with 7.0.0. > > Unfortunately don't have time right now to go through the wiki pages and > edit them. > > Regards, > Elvis > > > 2016-05-26 10:51 GMT+02:00 Elvis Stansvik : >> >> In several of the wiki examples, I get >> >> >> /home/estan/orexplore/VTKWikiExamples/Cxx/GeometricObjects/ColoredLines.cxx:72:13: >> error: ?class vtkUnsignedCharArray? has no member named >> ?InsertNextTypedTuple? >> colors->InsertNextTypedTuple(red); >> >> I can't find the InsertNextTypedTuple function in VTK 7. >> >> The change was made here: >> >> >> http://www.vtk.org/Wiki/index.php?title=VTK%2FExamples%2FCxx%2FGeometricObjects%2FColoredLines&diff=59278&oldid=59243 >> >> Where is InsertNextTypedTuple coming from? >> >> Elvis > > > > _______________________________________________ > 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 Thu May 26 11:02:00 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 26 May 2016 09:02:00 -0600 Subject: [vtkusers] Wiki examples fail to build due to no InsertNextTypedTuple In-Reply-To: References: Message-ID: I use the following for compatibility, since the change occurred when the vtkGenericDataArray class was introduced: // For compatibility with new VTK generic data arrays #ifdef vtkGenericDataArray_h #define SetTupleValue SetTypedTuple #define GetTupleValue GetTypedTuple #endif On Thu, May 26, 2016 at 8:47 AM, Bill Lorensen wrote: > Unfortunately, that API was changed and there is no tag that isolates > the change. So we have to wait until the 7.1 release. For now, you can > update your VTK to HEAD nad you should be fine. > > Bill > > > On Thu, May 26, 2016 at 5:27 AM, Elvis Stansvik > wrote: > > I got some other errors as well. I'm attaching a diff of how I had to > change > > the examples in order for them all to compile with 7.0.0. > > > > Unfortunately don't have time right now to go through the wiki pages and > > edit them. > > > > Regards, > > Elvis > > > > > > 2016-05-26 10:51 GMT+02:00 Elvis Stansvik >: > >> > >> In several of the wiki examples, I get > >> > >> > >> > /home/estan/orexplore/VTKWikiExamples/Cxx/GeometricObjects/ColoredLines.cxx:72:13: > >> error: ?class vtkUnsignedCharArray? has no member named > >> ?InsertNextTypedTuple? > >> colors->InsertNextTypedTuple(red); > >> > >> I can't find the InsertNextTypedTuple function in VTK 7. > >> > >> The change was made here: > >> > >> > >> > http://www.vtk.org/Wiki/index.php?title=VTK%2FExamples%2FCxx%2FGeometricObjects%2FColoredLines&diff=59278&oldid=59243 > >> > >> Where is InsertNextTypedTuple coming from? > >> > >> Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu May 26 11:41:13 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 26 May 2016 11:41:13 -0400 Subject: [vtkusers] Wiki examples fail to build due to no InsertNextTypedTuple In-Reply-To: References: Message-ID: David, Thanks, I'll try that. What a PAIN! Bill On Thu, May 26, 2016 at 11:02 AM, David Gobbi wrote: > I use the following for compatibility, since the change occurred when > the vtkGenericDataArray class was introduced: > > // For compatibility with new VTK generic data arrays > #ifdef vtkGenericDataArray_h > #define SetTupleValue SetTypedTuple > #define GetTupleValue GetTypedTuple > #endif > > On Thu, May 26, 2016 at 8:47 AM, Bill Lorensen > wrote: >> >> Unfortunately, that API was changed and there is no tag that isolates >> the change. So we have to wait until the 7.1 release. For now, you can >> update your VTK to HEAD nad you should be fine. >> >> Bill >> >> >> On Thu, May 26, 2016 at 5:27 AM, Elvis Stansvik >> wrote: >> > I got some other errors as well. I'm attaching a diff of how I had to >> > change >> > the examples in order for them all to compile with 7.0.0. >> > >> > Unfortunately don't have time right now to go through the wiki pages and >> > edit them. >> > >> > Regards, >> > Elvis >> > >> > >> > 2016-05-26 10:51 GMT+02:00 Elvis Stansvik >> > : >> >> >> >> In several of the wiki examples, I get >> >> >> >> >> >> >> >> /home/estan/orexplore/VTKWikiExamples/Cxx/GeometricObjects/ColoredLines.cxx:72:13: >> >> error: ?class vtkUnsignedCharArray? has no member named >> >> ?InsertNextTypedTuple? >> >> colors->InsertNextTypedTuple(red); >> >> >> >> I can't find the InsertNextTypedTuple function in VTK 7. >> >> >> >> The change was made here: >> >> >> >> >> >> >> >> http://www.vtk.org/Wiki/index.php?title=VTK%2FExamples%2FCxx%2FGeometricObjects%2FColoredLines&diff=59278&oldid=59243 >> >> >> >> Where is InsertNextTypedTuple coming from? >> >> >> >> Elvis > > > _______________________________________________ > 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 utkarsh.ayachit at kitware.com Thu May 26 13:09:04 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Thu, 26 May 2016 13:09:04 -0400 Subject: [vtkusers] Temporarily moratorium on new accounts for ParaView and VTK bug tracker Message-ID: Folks, Due to a recent spam-a-geddon, we are temporarily disabling new account signing up on VTK/ParaView bug trackers while we figure out how best to deal with this in the long term. Thanks for patience, VTK/ParaView Team From andrew.amaclean at gmail.com Thu May 26 20:25:55 2016 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Fri, 27 May 2016 10:25:55 +1000 Subject: [vtkusers] Wiki examples fail to build due to no InsertNextTypedTuple Message-ID: Hi Bill, As VTK evolves this is going to become more of a problem. The same problems will occur with the Python code also. I think that a comment pointing out that VTK versions differ in API and available classes and the code may not run on all versions would be most appropriate along with a link to the pages describing the different versions of VTK. Regards Andrew > ---------- Forwarded message ---------- > From: Bill Lorensen > To: David Gobbi > Cc: VTK Users > Date: Thu, 26 May 2016 11:41:13 -0400 > Subject: Re: [vtkusers] Wiki examples fail to build due to no > InsertNextTypedTuple > David, > > Thanks, I'll try that. > > What a PAIN! > > Bill > > On Thu, May 26, 2016 at 11:02 AM, David Gobbi > wrote: > > I use the following for compatibility, since the change occurred when > > the vtkGenericDataArray class was introduced: > > > > // For compatibility with new VTK generic data arrays > > #ifdef vtkGenericDataArray_h > > #define SetTupleValue SetTypedTuple > > #define GetTupleValue GetTypedTuple > > #endif > > > > On Thu, May 26, 2016 at 8:47 AM, Bill Lorensen > > wrote: > >> > >> Unfortunately, that API was changed and there is no tag that isolates > >> the change. So we have to wait until the 7.1 release. For now, you can > >> update your VTK to HEAD nad you should be fine. > >> > >> Bill > >> > >> > >> On Thu, May 26, 2016 at 5:27 AM, Elvis Stansvik > >> wrote: > >> > I got some other errors as well. I'm attaching a diff of how I had to > >> > change > >> > the examples in order for them all to compile with 7.0.0. > >> > > >> > Unfortunately don't have time right now to go through the wiki pages > and > >> > edit them. > >> > > >> > Regards, > >> > Elvis > >> > > >> > > >> > 2016-05-26 10:51 GMT+02:00 Elvis Stansvik > >> > : > >> >> > >> >> In several of the wiki examples, I get > >> >> > >> >> > >> >> > >> >> > /home/estan/orexplore/VTKWikiExamples/Cxx/GeometricObjects/ColoredLines.cxx:72:13: > >> >> error: ?class vtkUnsignedCharArray? has no member named > >> >> ?InsertNextTypedTuple? > >> >> colors->InsertNextTypedTuple(red); > >> >> > >> >> I can't find the InsertNextTypedTuple function in VTK 7. > >> >> > >> >> The change was made here: > >> >> > >> >> > >> >> > >> >> > http://www.vtk.org/Wiki/index.php?title=VTK%2FExamples%2FCxx%2FGeometricObjects%2FColoredLines&diff=59278&oldid=59243 > >> >> > >> >> Where is InsertNextTypedTuple coming from? > >> >> > >> >> Elvis > > > > > > _______________________________________________ > > 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 > > -- > ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Fri May 27 07:23:09 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Fri, 27 May 2016 11:23:09 +0000 (UTC) Subject: [vtkusers] vtkDataArrayTemplate.txx, line 147 References: <1297568886.299157.1464348189428.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1297568886.299157.1464348189428.JavaMail.yahoo@mail.yahoo.com> Hi all of you.I want to ask you if someone has encountered to a VTK error: ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line 147vtkDoubleArray (070B6078): Unable to allocate 203948032 elements of size 8 bytes. and has happened when I tried to read a DICOM CT serie with 779 slices, with vtkDICOMReader object, at m_pDICOMReader->Update(); method ... the reading algorithm is the one usual one, like here, the only difference is that I have read it with?this library (the series is DICOM jpeg lossless). Could you tell me why I have this error ? Thank you. | | | vtk-dicom | | | | | | | | | | | | | | VTK/Examples/Cxx/IO/ReadDICOMSeries - KitwarePublic | | | | -------------- next part -------------- An HTML attachment was scrubbed... URL: From fr.ponzio at gmail.com Fri May 27 10:48:43 2016 From: fr.ponzio at gmail.com (Francesco Ponzio) Date: Fri, 27 May 2016 16:48:43 +0200 Subject: [vtkusers] vtkImageReslice for tranforming images in a common space Message-ID: Dear vtk users, I need help with vtkImageReslice. I'm performing image registration between US and MRI images (.nii) )with itk. The first step is to roughly align the two images in the same anatomical space in order to apply here the registration pipeline. In particular I've a .mat file which is supposed to transform US into MR space. Here is my code #include #include #include #include #include #include #include #include using namespace std; int main(int argc, char*argv[]) { //Check input if (argc<3) { std:cout<<"Usage:" << argv[0] <<" img.nii transform.mat [reference.nii] [output.nii] "<> mat[r][0] >> mat[r][1] >> mat[r][2] >> mat[r][3]; r++; } dataInput.close(); //Matrix transform static double t[16] = { mat[0][0], mat[0][1], mat[0][2], mat[0][3], mat[1][0], mat[1][1], mat[1][2], mat[1][3], mat[2][0], mat[2][1], mat[2][2], mat[2][3], mat[3][0], mat[3][1], mat[3][2], mat[3][3],}; vtkSmartPointer m = vtkSmartPointer::New(); m->DeepCopy(t); cout << endl << "Applied 4x4 matrix:" << endl; for (int i=0;i<4;i++){ cout << m->GetElement(i,0) << ' ' << m->GetElement(i,1) << ' ' << m->GetElement(i,2) << ' ' << m->GetElement(i,3) << endl; } //Reader vtkSmartPointer reader=vtkSmartPointer::New(); reader->SetFileName(inputFilename.c_str()); reader->Update(); //Reslicing vtkSmartPointer reslice = vtkSmartPointer::New(); reslice->SetInputConnection(reader->GetOutputPort()); if (argc > 3) { vtkSmartPointer reader1=vtkSmartPointer::New(); cout << "Applied reference image information" << endl; reader1->SetFileName(argv[3]); reader1->Update(); vtkSmartPointer imgReference = vtkSmartPointer::New(); imgReference->ShallowCopy(reader1->GetOutput()); reslice->SetInformationInput(imgReference); } vtkSmartPointer transform = vtkSmartPointer::New(); transform->SetMatrix(m); transform->PreMultiply(); reslice->SetResliceTransform(transform); reslice->AutoCropOutputOn(); reslice->SetInterpolationModeToNearestNeighbor(); reslice->Update(); //Save vtkSmartPointer out = vtkSmartPointer::New(); if (argc < 5) { out->SetFileName("Resliced.nii"); } else{ out->SetFileName(argv[4]); } out->SetInputConnection(reslice->GetOutputPort()); out->Write(); return EXIT_SUCCESS; } Here is the transformation matrix -0.963857 -0.250682 0.090209 121.954769 -0.155085 0.803248 0.575101 47.195941 -0.216627 0.540326 -0.813093 102.646109 0 0 0 1 The results of the reslice step are not consistent: images don't look aligned using paraview. If I've well understood the problem, since I have two images obtained from different devices, I need firstly to trasform each of them in the corresponding scanner space (which is in mm) and the to transform the US image, now rapresented in US scanner space, into the MRI scanner space. My question is: can I apply directly this trasformation (with SetMatrix() method) or do I need to keep in consideration some other aspects (such as qform and sform)? And how to keep thme in consideration? -- Francesco Ponzio -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Fri May 27 11:21:33 2016 From: sean at rogue-research.com (Sean McBride) Date: Fri, 27 May 2016 11:21:33 -0400 Subject: [vtkusers] vtkDataArrayTemplate.txx, line 147 In-Reply-To: <1297568886.299157.1464348189428.JavaMail.yahoo@mail.yahoo.com> References: <1297568886.299157.1464348189428.JavaMail.yahoo.ref@mail.yahoo.com> <1297568886.299157.1464348189428.JavaMail.yahoo@mail.yahoo.com> Message-ID: <20160527152133.60654222@mail.rogue-research.com> On Fri, 27 May 2016 11:23:09 +0000, Flaviu2 via vtkusers said: > Hi all of you.I want to ask you if someone has encountered to a VTK error: >ERROR: In c:\vtk\vtk-6.1.0\common\core\vtkDataArrayTemplate.txx, line >147vtkDoubleArray (070B6078): Unable to allocate 203948032 elements of >size 8 bytes. >and has happened when I tried to read a DICOM CT serie with 779 slices, >with vtkDICOMReader object, at >m_pDICOMReader->Update(); >method ... the reading algorithm is the one usual one, like here, the >only difference is that I have read it with?this library (the series is >DICOM jpeg lossless). >Could you tell me why I have this error ? That's 1556 MiB, which isn't all that much. What OS are you using? Are you building as a 32 bit or 64 bit process? If 32 bit, then trying to allocate that much could easily fail. Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From fabian.trobles at gmail.com Fri May 27 15:26:17 2016 From: fabian.trobles at gmail.com (Fabian Torres) Date: Fri, 27 May 2016 14:26:17 -0500 Subject: [vtkusers] Reslicer rotation axis Message-ID: Hi all. I have a volume and I want to extract the center sagital slice of the volume and rotate it around the x axis in the center of the image. For this I'm using vtkImageReslice and vtkTransform. Everything works fine until I rotate the slice. It is rotating around the origin of the output image (lower left corner of the image) and not through the center of it. Can any one explain to me how do I choose the rotation axis in the transform. here is a brief of my code. const double MainWindow::sagitalElements[16] = { 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1 }; volumeData->GetSpacing(spacing); volumeData->GetOrigin(origin); volumeData->GetDimensions(dimensions); centerSlice[0] = floor(dimensions[0]*0.5); centerSlice[1] = floor(dimensions[1]*0.5); centerSlice[2] = floor(dimensions[2]*0.5); positionCenter[0] = origin[0] + spacing[0] * centerSlice[0]; positionCenter[1] = origin[1] + spacing[1] * centerSlice[1]; positionCenter[2] = origin[2] + spacing[2] * centerSlice[2]; resliceAxesSagital->DeepCopy(sagitalElements); transformSagital->RotateX(rotate); reslicerSagital->SetInput(volumeData); reslicerSagital->SetOutputDimensionality(2); reslicerSagital->SetResliceAxes(resliceAxesSagital); reslicerSagital->SetResliceAxesOrigin(positionCenter); reslicerSagital->SetInterpolationModeToLinear(); reslicerSagital->SetResliceTransform(transformSagital); reslicerSagital->Update(); sliceImageSagital = reslicerSagital->GetOutput(); As I dsaid before the problem is that I want to rotate around the center of the image and not the origin of the image. Thanks a lot -- Fabi?n Torres Robles Maestria en Ciencias en Ingenier?a Electr?nica Ingenier?a en Sistemas Electr?nicos tel. 58081280, 0445534661338 e-mail fabian.trobles at gmail.com, dae.wong at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri May 27 15:46:55 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 27 May 2016 13:46:55 -0600 Subject: [vtkusers] Reslicer rotation axis In-Reply-To: References: Message-ID: Hi Fabian, Calling SetResliceAxesOrigin() is the wrong thing to do here. If you want to rotate around a specific point, you need to build a transform matrix that does the following: 1) translate by (- P) where P is the desired centre of rotation 2) rotate 3) translate by P (the same P as above) Define T as the matrix that translates by -P, define R as the pure rotation matrix, and define U as the matrix that translates by P: M = U R T The special property of this matrix is that it does not change the point that is defined as the centre of rotation: M P == P So you should build matrix M and then call SetResliceAxes(M). - David On Fri, May 27, 2016 at 1:26 PM, Fabian Torres wrote: > Hi all. > > I have a volume and I want to extract the center sagital slice of the > volume and rotate it around the x axis in the center of the image. For this > I'm using vtkImageReslice and vtkTransform. > Everything works fine until I rotate the slice. It is rotating around the > origin of the output image (lower left corner of the image) and not through > the center of it. Can any one explain to me how do I choose the rotation > axis in the transform. here is a brief of my code. > > const double MainWindow::sagitalElements[16] = { > 0, 0, 1, 0, > 1, 0, 0, 0, > 0, 1, 0, 0, > 0, 0, 0, 1 > }; > > volumeData->GetSpacing(spacing); > volumeData->GetOrigin(origin); > volumeData->GetDimensions(dimensions); > > centerSlice[0] = floor(dimensions[0]*0.5); > centerSlice[1] = floor(dimensions[1]*0.5); > centerSlice[2] = floor(dimensions[2]*0.5); > > positionCenter[0] = origin[0] + spacing[0] * centerSlice[0]; > positionCenter[1] = origin[1] + spacing[1] * centerSlice[1]; > positionCenter[2] = origin[2] + spacing[2] * centerSlice[2]; > > resliceAxesSagital->DeepCopy(sagitalElements); > > transformSagital->RotateX(rotate); > > reslicerSagital->SetInput(volumeData); > reslicerSagital->SetOutputDimensionality(2); > reslicerSagital->SetResliceAxes(resliceAxesSagital); > reslicerSagital->SetResliceAxesOrigin(positionCenter); > reslicerSagital->SetInterpolationModeToLinear(); > > reslicerSagital->SetResliceTransform(transformSagital); > reslicerSagital->Update(); > sliceImageSagital = reslicerSagital->GetOutput(); > > > As I dsaid before the problem is that I want to rotate around the > center of the image and not the origin of the image. > > > Thanks a lot > > > -- > Fabi?n Torres Robles > Maestria en Ciencias en Ingenier?a Electr?nica > Ingenier?a en Sistemas Electr?nicos > tel. 58081280, 0445534661338 > e-mail fabian.trobles at gmail.com, dae.wong at gmail.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Sun May 29 11:09:47 2016 From: tjlp at netease.com (Liu_tj) Date: Sun, 29 May 2016 23:09:47 +0800 (CST) Subject: [vtkusers] How to disable the default mouse wheel event handler of vtkResliceImageViewer? Message-ID: <5a7e0023.a.154fd1058e2.Coremail.tjlp@netease.com> Hi, I want to define my own mouse wheel event handler of vtkResliceImageViewer. But I don't know how to disable the default one and make my own one take effect. Or any other options? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From fabian.trobles at gmail.com Sun May 29 23:16:43 2016 From: fabian.trobles at gmail.com (Fabian Torres) Date: Sun, 29 May 2016 22:16:43 -0500 Subject: [vtkusers] Reslicer rotation axis In-Reply-To: References: Message-ID: Hi David. Thanks a lot, that solved my problem. On Fri, May 27, 2016 at 2:46 PM, David Gobbi wrote: > Hi Fabian, > > Calling SetResliceAxesOrigin() is the wrong thing to do here. > > If you want to rotate around a specific point, you need to build a > transform matrix that does the following: > 1) translate by (- P) where P is the desired centre of rotation > 2) rotate > 3) translate by P (the same P as above) > > Define T as the matrix that translates by -P, > define R as the pure rotation matrix, and > define U as the matrix that translates by P: > > M = U R T > > The special property of this matrix is that it does not change the > point that is defined as the centre of rotation: > > M P == P > > So you should build matrix M and then call SetResliceAxes(M). > > - David > > > On Fri, May 27, 2016 at 1:26 PM, Fabian Torres > wrote: > >> Hi all. >> >> I have a volume and I want to extract the center sagital slice of the >> volume and rotate it around the x axis in the center of the image. For this >> I'm using vtkImageReslice and vtkTransform. >> Everything works fine until I rotate the slice. It is rotating around the >> origin of the output image (lower left corner of the image) and not through >> the center of it. Can any one explain to me how do I choose the rotation >> axis in the transform. here is a brief of my code. >> >> const double MainWindow::sagitalElements[16] = { >> 0, 0, 1, 0, >> 1, 0, 0, 0, >> 0, 1, 0, 0, >> 0, 0, 0, 1 >> }; >> >> volumeData->GetSpacing(spacing); >> volumeData->GetOrigin(origin); >> volumeData->GetDimensions(dimensions); >> >> centerSlice[0] = floor(dimensions[0]*0.5); >> centerSlice[1] = floor(dimensions[1]*0.5); >> centerSlice[2] = floor(dimensions[2]*0.5); >> >> positionCenter[0] = origin[0] + spacing[0] * centerSlice[0]; >> positionCenter[1] = origin[1] + spacing[1] * centerSlice[1]; >> positionCenter[2] = origin[2] + spacing[2] * centerSlice[2]; >> >> resliceAxesSagital->DeepCopy(sagitalElements); >> >> transformSagital->RotateX(rotate); >> >> reslicerSagital->SetInput(volumeData); >> reslicerSagital->SetOutputDimensionality(2); >> reslicerSagital->SetResliceAxes(resliceAxesSagital); >> reslicerSagital->SetResliceAxesOrigin(positionCenter); >> reslicerSagital->SetInterpolationModeToLinear(); >> >> reslicerSagital->SetResliceTransform(transformSagital); >> reslicerSagital->Update(); >> sliceImageSagital = reslicerSagital->GetOutput(); >> >> >> As I dsaid before the problem is that I want to rotate around the >> center of the image and not the origin of the image. >> >> >> Thanks a lot >> >> >> -- >> Fabi?n Torres Robles >> Maestria en Ciencias en Ingenier?a Electr?nica >> Ingenier?a en Sistemas Electr?nicos >> tel. 58081280, 0445534661338 >> e-mail fabian.trobles at gmail.com, dae.wong at gmail.com >> > > -- Fabi?n Torres Robles Maestria en Ciencias en Ingenier?a Electr?nica Ingenier?a en Sistemas Electr?nicos tel. 58081280, 0445534661338 e-mail fabian.trobles at gmail.com, dae.wong at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Mon May 30 00:05:51 2016 From: david.thompson at kitware.com (David Thompson) Date: Mon, 30 May 2016 00:05:51 -0400 Subject: [vtkusers] ExodusIIReader changes between 6.3 and 7.1. In-Reply-To: References: Message-ID: Hi Andrew, > ...Using python vtk on OSX I am getting different behavior when reading ExodusII files. I can confirm this is a problem. > Am I missing a call to some different update function? No, UpdateInformation should be all that's required. Please file a bug report (if you already have an account... if not, please let me know since account creation is currently disabled while we deal with spammers). David From dhoppes at mbfbioscience.com Mon May 30 08:30:18 2016 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Mon, 30 May 2016 12:30:18 +0000 Subject: [vtkusers] Picking points by clicking on them Message-ID: <46CB11F12B9DC24D860D4082451B318A36B417D4@exchange3.microbrightfield.com> Hey all, I have a system where I have around 100,000 points displayed in the window. The use would like to physically click on a point to select it. Right now, I use the vtkAreaPicker to let the user marquee around the points to select them. When they try to physically click on a point, it's too small for them select. Now, I could create a small sphere around each marker (using the vtkGlyph3D object) and make the sphere almost transparent and pickable. The issue is that we have found that a glyph3D sphere with 4 sides with 100,000 points brings the system to a crawl. So, I'm trying to figure out if there is some sort of really lightweight object that I can put around the point that is semi-transparent, pickable, and the user can select with the vtkcellpicker.... Or if there is another way to do this? Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon May 30 11:27:34 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 30 May 2016 11:27:34 -0400 Subject: [vtkusers] Wiki examples fail to build due to no InsertNextTypedTuple In-Reply-To: References: Message-ID: Elvis, I updated the wiki examples using the approach that David Gobbi suggested. Please update and let me know if everything builds OK. Thanks, Bill On Thu, May 26, 2016 at 11:02 AM, David Gobbi wrote: > I use the following for compatibility, since the change occurred when > the vtkGenericDataArray class was introduced: > > // For compatibility with new VTK generic data arrays > #ifdef vtkGenericDataArray_h > #define SetTupleValue SetTypedTuple > #define GetTupleValue GetTypedTuple > #endif > > On Thu, May 26, 2016 at 8:47 AM, Bill Lorensen > wrote: >> >> Unfortunately, that API was changed and there is no tag that isolates >> the change. So we have to wait until the 7.1 release. For now, you can >> update your VTK to HEAD nad you should be fine. >> >> Bill >> >> >> On Thu, May 26, 2016 at 5:27 AM, Elvis Stansvik >> wrote: >> > I got some other errors as well. I'm attaching a diff of how I had to >> > change >> > the examples in order for them all to compile with 7.0.0. >> > >> > Unfortunately don't have time right now to go through the wiki pages and >> > edit them. >> > >> > Regards, >> > Elvis >> > >> > >> > 2016-05-26 10:51 GMT+02:00 Elvis Stansvik >> > : >> >> >> >> In several of the wiki examples, I get >> >> >> >> >> >> >> >> /home/estan/orexplore/VTKWikiExamples/Cxx/GeometricObjects/ColoredLines.cxx:72:13: >> >> error: ?class vtkUnsignedCharArray? has no member named >> >> ?InsertNextTypedTuple? >> >> colors->InsertNextTypedTuple(red); >> >> >> >> I can't find the InsertNextTypedTuple function in VTK 7. >> >> >> >> The change was made here: >> >> >> >> >> >> >> >> http://www.vtk.org/Wiki/index.php?title=VTK%2FExamples%2FCxx%2FGeometricObjects%2FColoredLines&diff=59278&oldid=59243 >> >> >> >> Where is InsertNextTypedTuple coming from? >> >> >> >> Elvis > > > _______________________________________________ > 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 rickfrank at me.com Mon May 30 12:08:25 2016 From: rickfrank at me.com (Richard Frank) Date: Mon, 30 May 2016 12:08:25 -0400 Subject: [vtkusers] (no subject) Message-ID: Perhaps as the mouse hovers, you could put the glyphs on the points within a certain radius of the nearest hit point during the hover. The let the user click.... Sent from my iPad > On May 30, 2016, at 12:00 PM, vtkusers-request at vtk.org wrote: > > [vtkusers] Picking points by clicking on them > Message-ID: From elvis.stansvik at orexplore.com Mon May 30 12:14:12 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 30 May 2016 18:14:12 +0200 Subject: [vtkusers] Wiki examples fail to build due to no InsertNextTypedTuple In-Reply-To: References: Message-ID: Den 30 maj 2016 5:27 em skrev "Bill Lorensen" : > > Elvis, > > I updated the wiki examples using the approach that David Gobbi > suggested. Please update and let me know if everything builds OK. Thanks a lot. Will test when I'm back at work tomorrow, where I have things set up. Elvis > > Thanks, > > Bill > > > On Thu, May 26, 2016 at 11:02 AM, David Gobbi wrote: > > I use the following for compatibility, since the change occurred when > > the vtkGenericDataArray class was introduced: > > > > // For compatibility with new VTK generic data arrays > > #ifdef vtkGenericDataArray_h > > #define SetTupleValue SetTypedTuple > > #define GetTupleValue GetTypedTuple > > #endif > > > > On Thu, May 26, 2016 at 8:47 AM, Bill Lorensen > > wrote: > >> > >> Unfortunately, that API was changed and there is no tag that isolates > >> the change. So we have to wait until the 7.1 release. For now, you can > >> update your VTK to HEAD nad you should be fine. > >> > >> Bill > >> > >> > >> On Thu, May 26, 2016 at 5:27 AM, Elvis Stansvik > >> wrote: > >> > I got some other errors as well. I'm attaching a diff of how I had to > >> > change > >> > the examples in order for them all to compile with 7.0.0. > >> > > >> > Unfortunately don't have time right now to go through the wiki pages and > >> > edit them. > >> > > >> > Regards, > >> > Elvis > >> > > >> > > >> > 2016-05-26 10:51 GMT+02:00 Elvis Stansvik > >> > : > >> >> > >> >> In several of the wiki examples, I get > >> >> > >> >> > >> >> > >> >> /home/estan/orexplore/VTKWikiExamples/Cxx/GeometricObjects/ColoredLines.cxx:72:13: > >> >> error: ?class vtkUnsignedCharArray? has no member named > >> >> ?InsertNextTypedTuple? > >> >> colors->InsertNextTypedTuple(red); > >> >> > >> >> I can't find the InsertNextTypedTuple function in VTK 7. > >> >> > >> >> The change was made here: > >> >> > >> >> > >> >> > >> >> http://www.vtk.org/Wiki/index.php?title=VTK%2FExamples%2FCxx%2FGeometricObjects%2FColoredLines&diff=59278&oldid=59243 > >> >> > >> >> Where is InsertNextTypedTuple coming from? > >> >> > >> >> Elvis > > > > > > _______________________________________________ > > 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 zeinsalah at gmail.com Tue May 31 04:31:18 2016 From: zeinsalah at gmail.com (Zein Salah) Date: Tue, 31 May 2016 10:31:18 +0200 Subject: [vtkusers] Sharing 3D textures on GPU between multiple openGL contexts Message-ID: Hi everybody, I have a 3D texture (i.e., a 3D image volume) on the GPU that I want to share between multiple contexts. In essence, I want to display different views of the same texture in different widgets using different shader/fragement programs. 1. Is this possible in VTK? 2. Which version of VTK supports this? Much thanks, Zein From coyarzunlaura at googlemail.com Tue May 31 05:45:40 2016 From: coyarzunlaura at googlemail.com (Cristina Oyarzun) Date: Tue, 31 May 2016 11:45:40 +0200 Subject: [vtkusers] CFP: MICCAI CLIP 2016 Workshop on Clinical Image-based Procedures: Translational Research in Medical Imaging Message-ID: CALL FOR PAPERS MICCAI 2016 Workshop on Clinical Image-based Procedures: Translational Research in Medical Imaging October 17, 2016 Athens, Greece Website:http://miccai-clip.org/ ============================== ========================================== SCOPE The outstanding proliferation of medical image applications has created a need for greater study and scrutiny of the clinical application and validation of such methods. New strategies are essential to ensure a smooth and effective translation of computational image-based techniques into the clinic. For these reasons CLIP 2015?s major focus is on translational research filling the gaps between basic science and clinical applications. A highlight of the workshop is the subject of strategies for personalized medicine to enhance diagnosis, treatment and interventions. Authors are encouraged to submit work centered on specific clinical applications, including techniques and procedures based on comprehensive clinical image data. Submissions related to applications already in use and evaluated by clinical users are particularly encouraged. The event will bring together world-class specialists to present ways to strengthen links between computer scientists and engineers, and clinicians. TOPICS *Strategies for patient-specific and anatomical modeling to support planning and interventions *Clinical studies employing advanced image-guided methods *Clinical translation and validation of image-guided systems *Current challenges and emerging techniques in image-based procedures *Identification of parameters and error analysis in image-based procedures *Multimodal image integration for modeling, planning and guidance *Clinical applications in open and minimally invasive procedures PAPER SUBMISSION Papers will be limited to eight pages following the MICCAI submission guidelines. Prospective authors should refer to the Paper Submission section on the workshop website for details on how to submit papers to be presented at the workshop. All submissions will be peer-reviewed by at least 2 members of the program committee. The selection of the papers will be based on the significance of results, novelty, technical merit, relevance and clarity of presentation. Papers will be presented in a day long single track workshop starting with plenary sessions. Accepted papers will be published as a proceedings volume in the Springer Lecture Notes in Computer Science (LNCS) series after the workshop. WORKSHOP FORMAT Accepted papers will be presented in a day long single track workshop. The final program will consist of invited speakers and original papers with time allocated for discussions. Electronic proceedings will be arranged for all of the papers presented at the workshop. IMPORTANT DATES * June 10, 2016: Paper submission due date * July 10, 2016: Notification of acceptance * July 17, 2016: Final camera-ready paper submission deadline CONTACT Inquires about the workshop should be sent to the Information Desk ( info at miccai-clip.org). ORGANIZERS (in alphabetical order) Klaus Drechsler (Fraunhofer IGD, Germany) Marius Erdt (Fraunhofer IDM at NTU, Singapore) Miguel Gonz?lez Ballester (ICREA - Universitat Pompeu Fabra, Spain) Marius George Linguraru (Children's National Medical Center, USA) Cristina Oyarzun Laura (Fraunhofer IGD, Germany) Yoshinobu Sato (Nara Institute of Science and Technology, Japan) Raj Shekhar (Children's National Medical Center, USA) Stefan Wesarg (Fraunhofer IGD, Germany) ======================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From rickfrank at me.com Tue May 31 07:55:18 2016 From: rickfrank at me.com (Richard Frank) Date: Tue, 31 May 2016 07:55:18 -0400 Subject: [vtkusers] Free form selecting? Message-ID: <1AEFD2FC-DDCF-4D58-BED7-21A576B392CE@me.com> I see rubberband interactorstyle but I don't see one for freehand selection. Does a class exist for this type of selection? Thx Rick Sent from my iPad From giorgosragos at gmail.com Tue May 31 08:09:25 2016 From: giorgosragos at gmail.com (Giorgos Ragkousis) Date: Tue, 31 May 2016 13:09:25 +0100 Subject: [vtkusers] writing_headers_to_describe_data_vtu/vtm_files? Message-ID: Dear vtk users, I have been writing vtk applications for converting result files (generated from our solvers) to vtk/vtu/vtm files. I wanted to write a Header in the beginning of each file describing the type of numerical analysis these results came from. When writing vtk files, there is the vtkUnstructuredGridWriter::SetHeader class method to write such a header. Does any of you know how could I write something relevant when writing XML files (e.g. vtkXMLMultiBlockDataWriter) for instance? Any suggestion would be much appreciated. Thanks a lot in advance, Giorgos. -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Tue May 31 13:23:27 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Tue, 31 May 2016 13:23:27 -0400 Subject: [vtkusers] ISAV2016: Call for Participation Message-ID: Call for Participation: ISAV 2016 ========================= ISAV2016: In Situ Infrastructures for Enabling Extreme-Scale Analysis and Visualization In cooperation with SIGHPC and held in conjunction with SC16: The International Conference on High Performance Computing, Networking, Storage and Analysis, Salt Lake City, Utah, U.S.A. Full-day Sunday November 13th, 2016 ISAV 2016 Web Site: http://vis.lbl.gov/Events/ISAV-2016/ Workshop Theme ------------------------ The considerable interest in the HPC community regarding in situ analysis and visualization is due to several factors. First is an I/O cost savings, where data is analyzed/visualized while being generated, without first storing to a file system. Second is the potential for increased accuracy, where fine temporal sampling of transient analysis might expose some complex behavior missed in coarse temporal sampling. Third is the ability to use all available resources, CPU?s and accelerators, in the computation of analysis products. The workshop brings together researchers, developers and practitioners from industry, academia, and government laboratories developing, applying, and deploying in situ methods in extreme-scale, high performance computing. The goal is to present research findings, lessons learned, and insights related to developing and applying in situ methods and infrastructure across a range of science and engineering applications in HPC environments; to discuss topics like opportunities presented by new architectures, existing infrastructure needs, requirements, and gaps, and experiences to foster and enable in situ analysis and visualization; to serve as a ?center of gravity? for researchers, practitioners, and users/consumers of in situ methods and infrastructure in the HPC space. Participation/Call for Papers and Oral Presentations --------------------------------------------------------------------- We invite two types of submissions to ISAV 2016: (1) short, 4-page papers that present research results, that identify opportunities or challenges, and that present case studies/best practices for in situ methods/infrastructure in the areas of data management, analysis and visualization; (2) lightning presentation submission, consisting of a 1- or 2-page submission, for a brief oral presentation at the workshop. Short papers will appear in the workshop proceedings and will be invited to give an oral presentation of 15 to 20 minutes; lightning round submissions that are invited to present at the workshop will have author names and titles included as part of the proceedings. Submissions of both types are welcome that fall within one or more areas of interest, as follows: Areas of interest for ISAV, include, but are not limited to: In situ infrastructures * Current Systems: production quality, research prototypes * Opportunities * Gaps System resources, hardware, and emerging architectures * Enabling Hardware * Hardware and architectures that provide opportunities for In situ processing, such as burst buffers, staging computations on I/O nodes, sharing cores within a node for both simulation and in situ processing Methods/algorithms/applications/Case studies * Best practices * Analysis: feature detection, statistical methods, temporal methods, geometric methods * Visualization: information visualization, scientific visualization, time- varying methods * Data reduction/compression * Examples/case studies of solving a specific science challenge with in situ methods/infrastructure. Simulation * Integration:data modeling, software-engineering * Resilience: error detection, fault recovery * Workflows for supporting complex in situ processing pipelines Requirements * Preserve important elements * Significantly reduce the data size * Flexibility for post-processing exploration Review Process ---------------------- All submissions will undergo a peer-review process consisting of three reviews by experts in the field, and evaluated according to relevance to the workshop theme, technical soundness, creativity, originality, and impactfulness of method/results. Lightning round submissions will be evaluated primarily for relevance to the workshop. Submission Process ---------------------------- Authors are invited to submit papers of at most 4 pages in PDF format, excluding references, and lightning presentations of at most 2 pages in PDF format, excluding references. Papers should be formatted in the ACM Proceedings Style (templates available at https://www.acm.org/publications/proceedings-template) and submitted via EasyChair (https://easychair.org/conferences/?conf=isav2016). No changes to the margins, spacing, or font sizes as specified by the style file are allowed. Papers must be self-contained and provide the technical substance required for the program committee to evaluate their contributions. Submitted papers must be original work that has not appeared in and is not under consideration for another conference or a journal. See the ACM Prior Publication Policy for more details. Papers can be submitted at https://easychair.org/conferences/?conf=isav2016. Publication in proceedings, presentation at the workshop --------------------------------------------------------------------------- All paper submissions that receive favorable reviews will be included as part of the workshop proceedings, which will be published through SIGHPC along with other SC16 workshop proceedings in the ACM Digital Library and IEEE Xplore. Lightning round submissions will not be included as part of the proceedings. Subject to the constraints of workshop length, some subset of the accepted publications will be invited to give a brief oral presentation at the workshop. The exact number of such presentations and their length will be determined after the review process has been completed. Timeline/Important Dates ----------------------------------- 15 August 2016 Paper submission deadline 15 September 2016 Author notification 30 September 2016 Camera ready copy due 15 October 2016 Final program posted to ISAV web page 13 November 2016 ISAV 2016 workshop at SC16 From ken.martin at kitware.com Tue May 31 15:11:49 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 31 May 2016 15:11:49 -0400 Subject: [vtkusers] Sharing 3D textures on GPU between multiple openGL contexts In-Reply-To: References: Message-ID: We have not added that capability into VTK. OpenGL supports it, we just have not provided an API to do it directly. On Tue, May 31, 2016 at 4:31 AM, Zein Salah wrote: > Hi everybody, > > I have a 3D texture (i.e., a 3D image volume) on the GPU that I want to > share > between multiple contexts. In essence, I want to display different views > of the > same texture in different widgets using different shader/fragement > programs. > > 1. Is this possible in VTK? > 2. Which version of VTK supports this? > > Much thanks, > Zein > _______________________________________________ > 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 Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 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 hjchen.work at gmail.com Tue May 31 16:40:38 2016 From: hjchen.work at gmail.com (hchen) Date: Tue, 31 May 2016 13:40:38 -0700 (MST) Subject: [vtkusers] efficient way to set opacity pixelwise? Message-ID: <1464727238724-5738533.post@n5.nabble.com> Hello, Does anyone know if there is an efficient way of setting opacity pixelwise, eg. using luminance of a pixel for its opacity? I am writing an application where I need to overlay a few images (eg, a slice of CT, and then a few planned and measured doses, the doses have a lot zeros), I have been using SetOpacity in vtkImageBlend or vtkImageProperty, it works OK, but it feels like the more layers displayed, the duller the bottom layers becomes. So, I am trying to set opacity for layers( except the bottom one ) according their pixel value to see if it will do better. As for now, I first use vtkImageMapToColors to convert to RGBA, then loop through each pixel using SetComponent in vtkArrayData to set opacity pixelwise. The program is written in python, so the looping is not particularly efficient. If anyone knows a better way of setting opacity on a per-pixel base, I would appreciate a lot! Thanks! Chen -- View this message in context: http://vtk.1045678.n5.nabble.com/efficient-way-to-set-opacity-pixelwise-tp5738533.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue May 31 16:55:55 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 31 May 2016 14:55:55 -0600 Subject: [vtkusers] efficient way to set opacity pixelwise? In-Reply-To: <1464727238724-5738533.post@n5.nabble.com> References: <1464727238724-5738533.post@n5.nabble.com> Message-ID: Hi Chen, The easiest way to set the opacity according to the pixel value is to do it with the lookup table. For example, to make dark pixels transparent and bright pixels opaque, build an alpha ramp: table->SetAlphaRange(0.0, 1.0); table->Build(); Or you can use a for() loop to build the table with SetTableValue(i, r,g,b,a) with a different "a" for each table entry. - David On Tue, May 31, 2016 at 2:40 PM, hchen wrote: > Hello, > > Does anyone know if there is an efficient way of setting opacity pixelwise, > eg. using luminance of a pixel for its opacity? > > I am writing an application where I need to overlay a few images (eg, a > slice of CT, and then a few planned and measured doses, the doses have a > lot > zeros), I have been using SetOpacity in vtkImageBlend or vtkImageProperty, > it works OK, but it feels like the more layers displayed, the duller the > bottom layers becomes. So, I am trying to set opacity for layers( except > the > bottom one ) according their pixel value to see if it will do better. As > for > now, I first use vtkImageMapToColors to convert to RGBA, then loop through > each pixel using SetComponent in vtkArrayData to set opacity pixelwise. The > program is written in python, so the looping is not particularly efficient. > > If anyone knows a better way of setting opacity on a per-pixel base, I > would > appreciate a lot! > > Thanks! > > Chen > -------------- next part -------------- An HTML attachment was scrubbed... URL: