From amit112amit at yahoo.co.in Fri Jan 1 03:55:32 2016 From: amit112amit at yahoo.co.in (amit112amit) Date: Fri, 1 Jan 2016 01:55:32 -0700 (MST) Subject: [vtkusers] Unable to read all scalars from Cell Data in a VTK file Message-ID: <1451638532864-5735720.post@n5.nabble.com> Hi. I have a VTK legacy file format POLYDATA that opens properly in Paraview. It has cell data with multiple scalar arrays in it. I can see all of them listed in Paraview dropdown for choosing what scalar to color the view by. I am trying to read the VTK file using C++: vtkPolyDataReader *reader1 = vtkPolyDataReader::New(); reader1->SetFileName("T7-relaxed-2.vtk"); vtkPolyData* ds1 = reader1->GetOutput(); ds1->Update(); vtkDataArray* dsa = ds1->GetCellData()->GetScalars(); I expect 'dsa' to have all the 6 scalar arrays from the VTK file. But it only has the first one. I even tried GetScalars() but I get an empty data array. I have same issue with GetPointData()->GetVectors(). I can only fetch the first vector from the file although there are 2. How can I read all the scalars and vectors from the VTK file using VTK functions? Thanks for your time. Regards, Amit -- View this message in context: http://vtk.1045678.n5.nabble.com/Unable-to-read-all-scalars-from-Cell-Data-in-a-VTK-file-tp5735720.html Sent from the VTK - Users mailing list archive at Nabble.com. From juch at zhaw.ch Fri Jan 1 08:10:31 2016 From: juch at zhaw.ch (normanius) Date: Fri, 1 Jan 2016 06:10:31 -0700 (MST) Subject: [vtkusers] Problems with vtkClipPolyData and vtkImplicitBoolean In-Reply-To: <1451526366773-5735714.post@n5.nabble.com> References: <1451525713172-5735713.post@n5.nabble.com> <1451526366773-5735714.post@n5.nabble.com> Message-ID: <1451653831796-5735721.post@n5.nabble.com> Hi VTK-developers I implemented a hack that solves the above problem for me. See the result (before and after): Below the two patches. The second patch is the important one. The first one just implements the suggested linear distance metric for vtkCylinder. (I branched off from the revision git-hash ac7a28f). patch-001-linear-cylinder-function.diff patch-002-clippolydata-triangle-clipping-fix.diff Here is what I did roughly: In vtkTriangle::Clip(), use the bisection method to correctly find the "zero-crossing", as an alternative to the linear interpolation that is the method of choice in the current release. The bisection method requires a handle to the implicit function and the iso-value used in vtkClipPolyData. If in the cell traversal in vtkClipPolyData::RequestData() the current vtkGenericCell turns out to be of triangular type, it gets dirty-casted into vtkTriangle and the implicit function and the iso-value are set. This will trigger the advanced interpolation scheme in vtkTriangle::Clip(). Obviously, my fix works only for triangular meshes. I haven't spent a thought on how to generalise and implement this properly. Let me know what you think. Shall create an issue in your bug-tracker? -- View this message in context: http://vtk.1045678.n5.nabble.com/Problems-with-vtkClipPolyData-and-vtkImplicitBoolean-tp5735713p5735721.html Sent from the VTK - Users mailing list archive at Nabble.com. From paulo.waelkens at gmail.com Fri Jan 1 12:42:17 2016 From: paulo.waelkens at gmail.com (Paulo Waelkens) Date: Fri, 1 Jan 2016 18:42:17 +0100 Subject: [vtkusers] VTK with NVidia Optimus Message-ID: Dear all, I'm trying to get my VTK 6.3 application to use the NVidia GPU on my laptop. The laptop (Dell Alienware) combines an intel HD530 with an Nvidia GTX970m using the NVidia Optimus technology. At the moment, my application always uses the integrated GPU, which is slow and horrible. Did any of you figure out how to make the NVidia Optimus driver choose the discrete GPU instead??? The laptop uses the discrete GPU for games, so it's not a hardware problem, I'd say. NOTE: I have both the latest intel and nvidia GPU drivers, and installed the intel driver first (as suggested somewhere). I've built VTK 6.3 with shared libraries and using the OpenGL2 flag. I've followed the solutions described by nvidia, without success: http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf - set the discrete GPU as the "Preferred graphics processor" => no effect - adding this line to my main.cpp extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; } //=>no effect To check if the discrete GPU is being used, I use the GPU activity icon of the nvidia control panel ( http://acer--uk.custhelp.com/app/answers/detail/a_id/9075/~/determining-which-graphics-card-is-used-with-nvidia-optimus). The icon does work correctly, since it shows activity when games are running (e.g. Starcraft 2). I figured maybe I need to add the *extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; }* line in the VTK source code somewhere. This is a bit of a wild guess, but maybe, since I'm linking to VTK dynamically, all the OpenGL stuff is done withing the VTK dll boundaries, so NVidia Optimus needs a hint from VTK, not from my (console) application that uses VTK. I'm really running out of tricks here, and was wondering if one of you knows how to proceed. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangq1979 at outlook.com Fri Jan 1 13:54:05 2016 From: wangq1979 at outlook.com (WangQ) Date: Sat, 2 Jan 2016 02:54:05 +0800 Subject: [vtkusers] VTK with NVidia Optimus In-Reply-To: References: Message-ID: Hi,You may try disabling optimus in bios setting to see if works. At least this works with my DELL M4700 and direct opengl programming. Not 100% sure whether for VTK.Cheers,ChiangDate: Fri, 1 Jan 2016 18:42:17 +0100 From: paulo.waelkens at gmail.com To: vtkusers at vtk.org Subject: [vtkusers] VTK with NVidia Optimus Dear all, I'm trying to get my VTK 6.3 application to use the NVidia GPU on my laptop. The laptop (Dell Alienware) combines an intel HD530 with an Nvidia GTX970m using the NVidia Optimus technology. At the moment, my application always uses the integrated GPU, which is slow and horrible. Did any of you figure out how to make the NVidia Optimus driver choose the discrete GPU instead??? The laptop uses the discrete GPU for games, so it's not a hardware problem, I'd say. NOTE: I have both the latest intel and nvidia GPU drivers, and installed the intel driver first (as suggested somewhere). I've built VTK 6.3 with shared libraries and using the OpenGL2 flag. I've followed the solutions described by nvidia, without success:http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf- set the discrete GPU as the "Preferred graphics processor" => no effect- adding this line to my main.cppextern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; } //=>no effect To check if the discrete GPU is being used, I use the GPU activity icon of the nvidia control panel (http://acer--uk.custhelp.com/app/answers/detail/a_id/9075/~/determining-which-graphics-card-is-used-with-nvidia-optimus). The icon does work correctly, since it shows activity when games are running (e.g. Starcraft 2). I figured maybe I need to add the extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; } line in the VTK source code somewhere. This is a bit of a wild guess, but maybe, since I'm linking to VTK dynamically, all the OpenGL stuff is done withing the VTK dll boundaries, so NVidia Optimus needs a hint from VTK, not from my (console) application that uses VTK. I'm really running out of tricks here, and was wondering if one of you knows how to proceed.Thanks! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 paulo.waelkens at gmail.com Fri Jan 1 18:02:01 2016 From: paulo.waelkens at gmail.com (Paulo Waelkens) Date: Sat, 2 Jan 2016 00:02:01 +0100 Subject: [vtkusers] VTK with NVidia Optimus In-Reply-To: References: Message-ID: Dear Chiang, thank you for your suggestion. It is not possible to disable the IGP in the BIOS of my laptop (Alienware17 r3), even after getting the newest BIOS from dell. I *guess* this means the laptop does not have a hardware multiplexer(?), whilst your M4700 has one(?). So this approach won't work, I think. Did you perhaps try the programmatic solutions suggested by nvidia (e.g. NvOptimusEnablement export thing) when doing your OpenGL programming? Thanks! Regards, Paulo On 1 January 2016 at 19:54, WangQ wrote: > > Hi, > > You may try disabling optimus in bios setting to see if works. At least > this works with my DELL M4700 and direct opengl programming. Not 100% sure > whether for VTK. > > Cheers, > > Chiang > ------------------------------ > Date: Fri, 1 Jan 2016 18:42:17 +0100 > From: paulo.waelkens at gmail.com > To: vtkusers at vtk.org > Subject: [vtkusers] VTK with NVidia Optimus > > Dear all, > > I'm trying to get my VTK 6.3 application to use the NVidia GPU on my > laptop. The laptop (Dell Alienware) combines an intel HD530 with an Nvidia > GTX970m using the NVidia Optimus technology. At the moment, my application > always uses the integrated GPU, which is slow and horrible. Did any of you > figure out how to make the NVidia Optimus driver choose the discrete GPU > instead??? The laptop uses the discrete GPU for games, so it's not a > hardware problem, I'd say. > > NOTE: I have both the latest intel and nvidia GPU drivers, and installed > the intel driver first (as suggested somewhere). I've built VTK 6.3 with > shared libraries and using the OpenGL2 flag. > > I've followed the solutions described by nvidia, without success: > > http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf > - set the discrete GPU as the "Preferred graphics processor" => no effect > - adding this line to my main.cpp > extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; > } //=>no effect > > To check if the discrete GPU is being used, I use the GPU activity icon of > the nvidia control panel ( > http://acer--uk.custhelp.com/app/answers/detail/a_id/9075/~/determining-which-graphics-card-is-used-with-nvidia-optimus). > The icon does work correctly, since it shows activity when games are > running (e.g. Starcraft 2). > > I figured maybe I need to add the *extern "C" { _declspec(dllexport) > DWORD NvOptimusEnablement = 0x00000001; }* line in the VTK source code > somewhere. This is a bit of a wild guess, but maybe, since I'm linking to > VTK dynamically, all the OpenGL stuff is done withing the VTK dll > boundaries, so NVidia Optimus needs a hint from VTK, not from my (console) > application that uses VTK. > > I'm really running out of tricks here, and was wondering if one of you > knows how to proceed. > Thanks! > > _______________________________________________ Powered by www.kitware.com > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html Please keep messages > on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 wangq1979 at outlook.com Fri Jan 1 21:54:06 2016 From: wangq1979 at outlook.com (WangQ) Date: Sat, 2 Jan 2016 10:54:06 +0800 Subject: [vtkusers] VTK with NVidia Optimus In-Reply-To: References: , , Message-ID: Hi Paulo, Not sure about alienware, but my m4700 is able to disable IGP through bios setting. I always switch it off since I need CUDA, and my opengl code works well when the IGP is switched off. But i did not try the suggestion in WP. I just googled it and found this https://www.youtube.com/watch?v=HuqyR-496Sw Check it to see if you are luck. Cheers, Chiang Date: Sat, 2 Jan 2016 00:02:01 +0100 Subject: Re: [vtkusers] VTK with NVidia Optimus From: paulo.waelkens at gmail.com To: wangq1979 at outlook.com CC: vtkusers at vtk.org Dear Chiang,thank you for your suggestion. It is not possible to disable the IGP in the BIOS of my laptop (Alienware17 r3), even after getting the newest BIOS from dell. I *guess* this means the laptop does not have a hardware multiplexer(?), whilst your M4700 has one(?). So this approach won't work, I think. Did you perhaps try the programmatic solutions suggested by nvidia (e.g. NvOptimusEnablement export thing) when doing your OpenGL programming? Thanks! Regards,Paulo On 1 January 2016 at 19:54, WangQ wrote: Hi,You may try disabling optimus in bios setting to see if works. At least this works with my DELL M4700 and direct opengl programming. Not 100% sure whether for VTK.Cheers,ChiangDate: Fri, 1 Jan 2016 18:42:17 +0100 From: paulo.waelkens at gmail.com To: vtkusers at vtk.org Subject: [vtkusers] VTK with NVidia Optimus Dear all, I'm trying to get my VTK 6.3 application to use the NVidia GPU on my laptop. The laptop (Dell Alienware) combines an intel HD530 with an Nvidia GTX970m using the NVidia Optimus technology. At the moment, my application always uses the integrated GPU, which is slow and horrible. Did any of you figure out how to make the NVidia Optimus driver choose the discrete GPU instead??? The laptop uses the discrete GPU for games, so it's not a hardware problem, I'd say. NOTE: I have both the latest intel and nvidia GPU drivers, and installed the intel driver first (as suggested somewhere). I've built VTK 6.3 with shared libraries and using the OpenGL2 flag. I've followed the solutions described by nvidia, without success:http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf- set the discrete GPU as the "Preferred graphics processor" => no effect- adding this line to my main.cppextern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; } //=>no effect To check if the discrete GPU is being used, I use the GPU activity icon of the nvidia control panel (http://acer--uk.custhelp.com/app/answers/detail/a_id/9075/~/determining-which-graphics-card-is-used-with-nvidia-optimus). The icon does work correctly, since it shows activity when games are running (e.g. Starcraft 2). I figured maybe I need to add the extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; } line in the VTK source code somewhere. This is a bit of a wild guess, but maybe, since I'm linking to VTK dynamically, all the OpenGL stuff is done withing the VTK dll boundaries, so NVidia Optimus needs a hint from VTK, not from my (console) application that uses VTK. I'm really running out of tricks here, and was wondering if one of you knows how to proceed.Thanks! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 mcragun at gmail.com Fri Jan 1 23:45:41 2016 From: mcragun at gmail.com (Matthew Cragun) Date: Fri, 1 Jan 2016 22:45:41 -0600 Subject: [vtkusers] VtK 7, python3.4 build error Message-ID: I am having trouble building VTK 7 with Python 3.4 on OS X 10.11 . Everything goes well for the first 99% of the process, however at the end, I get this error: [ 99%[ Building CXX object Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o make[2]: *** No rule to make target `/Users/mcragun/anaconda/envs/py3k/lib/libpython3.4.dylib', needed by `bin/vtkpython'. Stop. make[2]: *** Waiting for unfinished jobs.... In file included from /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29: /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:119:3: error: no matching function for call to 'PyImport_AppendInittab' PyImport_AppendInittab(namevtkCommonCore, initvtkCommonCorePython); ^~~~~~~~~~~~~~~~~~~~~~ /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17: note: candidate function not viable: no known conversion from 'void ()' to 'PyObject *(*)()' for 2nd argument PyAPI_FUNC(int) PyImport_AppendInittab( ^ In file included from /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29: /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:122:3: error: no matching function for call to 'PyImport_AppendInittab' PyImport_AppendInittab(namevtkCommonMath, initvtkCommonMathPython); ^~~~~~~~~~~~~~~~~~~~~~ Similar errors are repeated until... ^~~~~~~~~~~~~~~~~~~~~~ /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17: note: candidate function not viable: no known conversion from 'void ()' to 'PyObject *(*)()' for 2nd argument PyAPI_FUNC(int) PyImport_AppendInittab( ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o] Error 1 make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2 make: *** [all] Error 2 Any thoughts on what I missed? Are there pre-built binaries with python 3 for OS X? Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Jan 2 00:19:54 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 1 Jan 2016 22:19:54 -0700 Subject: [vtkusers] VtK 7, python3.4 build error In-Reply-To: References: Message-ID: Hi Matthew, No, there aren't pre-build binaries with python 3. I don't think that is planned for this release. I've been doing my OS X builds with the python binary packages from python.org, so I know that those, at least, should work. Can you give me some details about the python you are using? Specifically, can you tell me what the contents of the library directory ( /Users/mcragun/anaconda/envs/py3k/lib/) are? Also, in the CMakeCache.txt, can you give me the values of PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR, and PYTHON_LIBRARY? For my build against the python.org binaries, VTK found the following: PYTHON_EXECUTABLE:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 PYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.4/Headers/ PYTHON_LIBRARY:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib Obviously the locations will be different for Anaconda, but I just wanted to give you an example of how these variables can be set. - David On Fri, Jan 1, 2016 at 9:45 PM, Matthew Cragun wrote: > I am having trouble building VTK 7 with Python 3.4 on OS X 10.11 . > Everything goes well for the first 99% of the process, however at the end, > I get this error: > > [ 99%[ Building CXX object > Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o > make[2]: *** No rule to make target > `/Users/mcragun/anaconda/envs/py3k/lib/libpython3.4.dylib', needed by > `bin/vtkpython'. Stop. > make[2]: *** Waiting for unfinished jobs.... > In file included from > /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29: > /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:119:3: > error: no matching function > for call to 'PyImport_AppendInittab' > PyImport_AppendInittab(namevtkCommonCore, initvtkCommonCorePython); > ^~~~~~~~~~~~~~~~~~~~~~ > /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17: > note: candidate function not > viable: no known conversion from 'void ()' to 'PyObject *(*)()' for > 2nd argument > PyAPI_FUNC(int) PyImport_AppendInittab( > ^ > In file included from > /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29: > /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:122:3: > error: no matching function > for call to 'PyImport_AppendInittab' > PyImport_AppendInittab(namevtkCommonMath, initvtkCommonMathPython); > ^~~~~~~~~~~~~~~~~~~~~~ > > Similar errors are repeated until... > > ^~~~~~~~~~~~~~~~~~~~~~ > /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17: > note: candidate function not > viable: no known conversion from 'void ()' to 'PyObject *(*)()' for > 2nd argument > PyAPI_FUNC(int) PyImport_AppendInittab( > ^ > fatal error: too many errors emitted, stopping now [-ferror-limit=] > 20 errors generated. > make[2]: *** > [Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o] Error 1 > make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2 > make: *** [all] Error 2 > > Any thoughts on what I missed? Are there pre-built binaries with python 3 > for OS X? > > Thanks, > > Matt > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Sat Jan 2 07:11:23 2016 From: juch at zhaw.ch (normanius) Date: Sat, 2 Jan 2016 05:11:23 -0700 (MST) Subject: [vtkusers] how to derive vtkPloyDataAlgorithm class In-Reply-To: References: Message-ID: <1451736683188-5735730.post@n5.nabble.com> Hi Chiang Happy new year to you too. I'd go by example. Have a look at vtkClipPolyData.cxx, which derives from vtkPolyDataAlgorithm. In essence, only vtkPolyDataAlgorithm::RequestData() has to be overridden by the subclass, that's where all the functionality of an algorithm is supposed to go. The input and output data is contained in generic containers that are passed as function arguments. inputVector represents what you feed to the algorithm, typically by using vtkAlgorithm::SetInputConnection(), vtkAlgorithm::SetInputData(), vtkAlgorithm::GetOutputPort(), etc. You are supposed to access the data in the following way. You have the chance to notify the progress by calling vtkAlgorithm::UpdateProgress(). You can check if the user requested the termination of an algorithm by checking the value of vtkAlgorithm::GetAbortExecute(). Besides that, make sure to first carefully read through the documentation of vtkPolyDataAlgorithm and vtkAlgorithm . The implementation of the vtkAlgorithm.cxx and vtkPolyDataAlgorithm.cxx may also serve as reference. I hope this helped. Norman -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-derive-vtkPloyDataAlgorithm-class-tp5735719p5735730.html Sent from the VTK - Users mailing list archive at Nabble.com. From goretzki.imre at gmail.com Sat Jan 2 11:00:11 2016 From: goretzki.imre at gmail.com (Imre Goretzki) Date: Sat, 2 Jan 2016 17:00:11 +0100 Subject: [vtkusers] method to extract regions In-Reply-To: <56827C43.5030409@gmail.com> References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> Message-ID: <5687F40B.20100@gmail.com> Hey David, first of all: Happy new year :) I have some questions about your filter. First of all in part A of the attached image, is my understanding of extents, so if you have a region, you will get the x_min/x_max, y_min/y_max (and z_min/z_max for 3D). If you do not have rectangular regions than you could have some problems (see part A and B). In part B you see my mask. The red rectangle shows the case that the 4 corners of a 2D region cannot be directly checked, because the region that lies within this rectangle has little matches with the mask (none of the 4 corners are within the mask). The green rectangle has 3 out of 4 edges that lie within the mask. Part C shows one of the worst cases of this approach (using extents) because there is so much space that does not belong to the actual region. My question: Is it possible to extend your filter to directly store the region data (for each region, for example as vtkImageData) if the extraction mode is set to "All"? - Imre Am 29.12.2015 um 13:27 schrieb Imre Goretzki: > Hi David, > > thank you. I'll take a look at your class. > > Regards > Imre > > Am 29.12.2015 um 13:07 schrieb David Gobbi: >> Hi Imre, >> >> I have a connectivity filter that works directly on images, it can >> label connected regions according to size and it should be much >> faster (probably 1000x) than doing voxel checks via polydata: >> https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h >> I'll probably be contributing this filter to VTK sometime in the near >> future. >> >> - David >> >> >> On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki >> wrote: >> >> Is there an easier way in ITK? >> >> Thanks >> Imre >> >> >> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >>> Hey guys, >>> >>> I use the vtkPolyDataConnectivityFilter from polydata to extract >>> several different and more or less unknown regions. >>> My problem is that I want to extract regions from this filter, >>> but if I do this, the update process for all regions takes up to >>> 10minutes: >>> >>> filter->SetExtractionModeToAllRegions(); >>> filter->Update(); >>> ... >>> >>> for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) >>> { >>> extractFilter->InitializeSpecifiedRegionList(); >>> extractFilter->AddSpecifiedRegion(i); >>> extractFilter->Modified(); >>> extractFilter->Update(); >>> extractRegionData->DeepCopy(extractFilter->GetOutput()); >>> } >>> extractFilter->InitializeSpecifiedRegionList(); >>> >>> Background for this: I want to use the points of each region to >>> check whether they lie within an object in my binary >>> mask image. So the pipeline would be like this: >>> >>> 1) Get all Regions >>> 2) get region /i/ >>> 3) get points of region /i/ >>> 4) check if point /j/ lies within the binary mask >>> /B/ (/B/_/j/ == 255) >>> 4a) if true then add region to the >>> extractFilter and break (-> next region /i/) >>> 4b) if false then continue with next point /j/ >>> 5) Mark all regions red (done easily) >>> 6) Mark some regions green that are above a specific size (can >>> be accessed with filter->GetRegionSizes() ) >>> 7) Mark some regions yellow (the regions that are extracted >>> during step 1-4a) >>> >>> I do not know if the PolyDataConnectivityFilter is the right >>> class for this, I think it is. >>> If I store the extractRegionData in a vector, all regions have >>> the same number of points (which is kind of strange) but >>> different number of cells (region size == number of cells is >>> correct). >>> >>> I would now try to get the points from the cells and check the >>> binary mask, because the >>> >>> vtkPolyData->GetNumberOfPoints() >>> >>> and >>> >>> vtkPolyData->GetPoint(pointCounter, point); >>> >>> are not working correctly in this scenario (all regions are >>> extracted because every single region has every point? >>> i did not verify my guess but I think there would be the problem) >>> >>> The binary mask is a vtkImageData, that could be transformed to >>> vtkPolyData. >>> The input image (already filtered with vtkMarchingCubes) and the >>> binary mask have the same dimensions (x,y,z). >>> >>> I hope you can imagine what I'm trying to do and have some tips >>> for me, if my approach is correct. >>> >>> Regards >>> Imre >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cases.png Type: image/png Size: 20139 bytes Desc: not available URL: From pavol.palicka at tuke.sk Sat Jan 2 12:04:45 2016 From: pavol.palicka at tuke.sk (Pavol) Date: Sat, 2 Jan 2016 10:04:45 -0700 (MST) Subject: [vtkusers] reading .neu file into vtkUnstructuredGrid object Message-ID: <1451754285160-5735732.post@n5.nabble.com> Hello, I'm trying to read .neu file into vtkUnstcturedGrid. I have created vtkUnstructuredGrid object using *vtkSmartPointer unstructuredGrid = vtkSmartPointer::New();* Every point coords are inserted into vtkPoints object which is at the end ofreading set for unstructured gria via method SetPoints. Before reading and setting up cells for unstructuredGrid I am calling *unstructuredGrid->Allocate(nCells);* (nCells represent total amount of cells) in a while cycle I am reading ids of eah point which forms cell (cells for the object are of same type) into idList and then using *unstructuredGrid->InsertNextCell(VTK_HEXAHEDRON,idList);* I am inserting cells into unstructuredGrid object. Till this point everithing for me seems to be right and program seems to work properly but visualizing this object I get this: output from paraview displaying points and object surface with edges: something is wrong there... object suppost to be regular cube formed by cells of the smae type. So for me it seems like problem comes with cells... I am trying to read .neu file for points and cells and .msh file for the faces. I want to : - use Gambit to create computing mesh for the object (furnace to be spefific), - read it into vtkUnstructuredGrid, - set up initial and boundary conditions (especialy for this purpose i want to read faces), - using method of elementary balances compute material properies in time during thermal processing, - use vtkCellData (add multiple arrays) as data storage for computing, - visuslize proces using paraview and vtk. So... If anyone can help me with this, I will be really thankfull. Have a great day Best regards Pavol -- View this message in context: http://vtk.1045678.n5.nabble.com/reading-neu-file-into-vtkUnstructuredGrid-object-tp5735732.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Sat Jan 2 12:54:30 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 2 Jan 2016 10:54:30 -0700 Subject: [vtkusers] method to extract regions In-Reply-To: <5687F40B.20100@gmail.com> References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> <5687F40B.20100@gmail.com> Message-ID: Hi Imre, Happy New Year! I've read your email few times, and I feel that I must be missing some important because there are several things that I don't understand about it. The vtkImageConnectivityFilter is essentially just a connected component filter. In the output of this filter, all pixels outside the mask will be colored black (they will have a value of zero). So what I don't understand about your email is why you say that non-rectangular regions are a problem. Are you just worried about the wasted memory? - David On Sat, Jan 2, 2016 at 9:00 AM, Imre Goretzki wrote: > Hey David, > > first of all: Happy new year :) > > I have some questions about your filter. First of all in part A of the > attached image, is my understanding of extents, so if you have a region, > you will get the x_min/x_max, y_min/y_max (and z_min/z_max for 3D). If you > do not have rectangular regions than you could have some problems (see part > A and B). In part B you see my mask. The red rectangle shows the case that > the 4 corners of a 2D region cannot be directly checked, because the region > that lies within this rectangle has little matches with the mask (none of > the 4 corners are within the mask). The green rectangle has 3 out of 4 > edges that lie within the mask. > > Part C shows one of the worst cases of this approach (using extents) > because there is so much space that does not belong to the actual region. > > My question: Is it possible to extend your filter to directly store the > region data (for each region, for example as vtkImageData) if the > extraction mode is set to "All"? > > - Imre > > > Am 29.12.2015 um 13:27 schrieb Imre Goretzki: > > Hi David, > > thank you. I'll take a look at your class. > > Regards > Imre > > Am 29.12.2015 um 13:07 schrieb David Gobbi: > > Hi Imre, > > I have a connectivity filter that works directly on images, it can label > connected regions according to size and it should be much faster (probably > 1000x) than doing voxel checks via polydata: > > https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h > I'll probably be contributing this filter to VTK sometime in the near > future. > > - David > > > On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki < > goretzki.imre at gmail.com> wrote: > >> Is there an easier way in ITK? >> >> Thanks >> Imre >> >> >> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >> >> Hey guys, >> >> I use the vtkPolyDataConnectivityFilter from polydata to extract several >> different and more or less unknown regions. >> My problem is that I want to extract regions from this filter, but if I >> do this, the update process for all regions takes up to 10minutes: >> >> filter->SetExtractionModeToAllRegions(); >> filter->Update(); >> ... >> >> for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) >> { >> extractFilter->InitializeSpecifiedRegionList(); >> extractFilter->AddSpecifiedRegion(i); >> extractFilter->Modified(); >> extractFilter->Update(); >> extractRegionData->DeepCopy(extractFilter->GetOutput()); >> } >> extractFilter->InitializeSpecifiedRegionList(); >> >> Background for this: I want to use the points of each region to check >> whether they lie within an object in my binary >> mask image. So the pipeline would be like this: >> >> 1) Get all Regions >> 2) get region *i* >> 3) get points of region *i* >> 4) check if point *j* lies within the binary mask *B* ( >> *B*_*j* == 255) >> 4a) if true then add region to the extractFilter and >> break (-> next region *i*) >> 4b) if false then continue with next point *j* >> 5) Mark all regions red (done easily) >> 6) Mark some regions green that are above a specific size (can be >> accessed with filter->GetRegionSizes() ) >> 7) Mark some regions yellow (the regions that are extracted during step >> 1-4a) >> >> I do not know if the PolyDataConnectivityFilter is the right class for >> this, I think it is. >> If I store the extractRegionData in a vector, all regions have the same >> number of points (which is kind of strange) but different number of cells >> (region size == number of cells is correct). >> >> I would now try to get the points from the cells and check the binary >> mask, because the >> >> vtkPolyData->GetNumberOfPoints() >> >> and >> >> vtkPolyData->GetPoint(pointCounter, point); >> >> are not working correctly in this scenario (all regions are extracted >> because every single region has every point? >> i did not verify my guess but I think there would be the problem) >> >> The binary mask is a vtkImageData, that could be transformed to >> vtkPolyData. >> The input image (already filtered with vtkMarchingCubes) and the binary >> mask have the same dimensions (x,y,z). >> >> I hope you can imagine what I'm trying to do and have some tips for me, >> if my approach is correct. >> >> Regards >> Imre >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From goretzki.imre at gmail.com Sat Jan 2 13:46:10 2016 From: goretzki.imre at gmail.com (Imre Goretzki) Date: Sat, 2 Jan 2016 19:46:10 +0100 Subject: [vtkusers] method to extract regions In-Reply-To: References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> <5687F40B.20100@gmail.com> Message-ID: <56881AF2.8080806@gmail.com> Mh ok, I guess I did not explained my problem well enough. The vtkPolyDataConnectivityFilter returns regions, either the largest, specified, seeded or all regions (your filter returns largest, seeded or all). I'm interessted in the following: - all regions - specified regions. The problem is not the filter, the performance or possible memory leaks, I need the region's polydata representation because I have a second object (vtkImageData or vtkPolyData, binary mask) that has some additional information, that are not represented by the data (the input for the vtkImageConnectivityFilter). Imagine the input for the filter as image 1 and the mask as image 2. Both images have the same dimensions in all 3 directions (x, y, z) but contain different information. image 2 will be transformed to a binary image mask from image 1 i need to extract regions, but if some (unknown) regions have points that are located in the binary image mask, I do not want these regions to be contained in the extracted region list. So it's not about your filter or the performance, but I have some problems using this filter for my issue, because I cannot reach the region's polydata. I hope this helps. - Imre Am 02.01.2016 um 18:54 schrieb David Gobbi: > Hi Imre, Happy New Year! > > I've read your email few times, and I feel that I must be missing some > important because there are several things that I don't understand > about it. > > The vtkImageConnectivityFilter is essentially just a connected > component filter. In the output of this filter, all pixels outside > the mask will be colored black (they will have a value of zero). So > what I don't understand about your email is why you say that > non-rectangular regions are a problem. Are you just worried about the > wasted memory? > > - David > > > On Sat, Jan 2, 2016 at 9:00 AM, Imre Goretzki > wrote: > > Hey David, > > first of all: Happy new year :) > > I have some questions about your filter. First of all in part A of > the attached image, is my understanding of extents, so if you have > a region, you will get the x_min/x_max, y_min/y_max (and > z_min/z_max for 3D). If you do not have rectangular regions than > you could have some problems (see part A and B). In part B you see > my mask. The red rectangle shows the case that the 4 corners of a > 2D region cannot be directly checked, because the region that lies > within this rectangle has little matches with the mask (none of > the 4 corners are within the mask). The green rectangle has 3 out > of 4 edges that lie within the mask. > > Part C shows one of the worst cases of this approach (using > extents) because there is so much space that does not belong to > the actual region. > > My question: Is it possible to extend your filter to directly > store the region data (for each region, for example as > vtkImageData) if the extraction mode is set to "All"? > > - Imre > > > Am 29.12.2015 um 13:27 schrieb Imre Goretzki: >> Hi David, >> >> thank you. I'll take a look at your class. >> >> Regards >> Imre >> >> Am 29.12.2015 um 13:07 schrieb David Gobbi: >>> Hi Imre, >>> >>> I have a connectivity filter that works directly on images, it >>> can label connected regions according to size and it should be >>> much faster (probably 1000x) than doing voxel checks via polydata: >>> https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h >>> I'll probably be contributing this filter to VTK sometime in the >>> near future. >>> >>> - David >>> >>> >>> On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki >>> > wrote: >>> >>> Is there an easier way in ITK? >>> >>> Thanks >>> Imre >>> >>> >>> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >>>> Hey guys, >>>> >>>> I use the vtkPolyDataConnectivityFilter from polydata to >>>> extract several different and more or less unknown regions. >>>> My problem is that I want to extract regions from this >>>> filter, but if I do this, the update process for all >>>> regions takes up to 10minutes: >>>> >>>> filter->SetExtractionModeToAllRegions(); >>>> filter->Update(); >>>> ... >>>> >>>> for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) >>>> { >>>> extractFilter->InitializeSpecifiedRegionList(); >>>> extractFilter->AddSpecifiedRegion(i); >>>> extractFilter->Modified(); >>>> extractFilter->Update(); >>>> extractRegionData->DeepCopy(extractFilter->GetOutput()); >>>> } >>>> extractFilter->InitializeSpecifiedRegionList(); >>>> >>>> Background for this: I want to use the points of each >>>> region to check whether they lie within an object in my binary >>>> mask image. So the pipeline would be like this: >>>> >>>> 1) Get all Regions >>>> 2) get region /i/ >>>> 3) get points of region /i/ >>>> 4) check if point /j/ lies within the binary >>>> mask /B/ (/B/_/j/ == 255) >>>> 4a) if true then add region to the >>>> extractFilter and break (-> next region /i/) >>>> 4b) if false then continue with next point /j/ >>>> 5) Mark all regions red (done easily) >>>> 6) Mark some regions green that are above a specific size >>>> (can be accessed with filter->GetRegionSizes() ) >>>> 7) Mark some regions yellow (the regions that are extracted >>>> during step 1-4a) >>>> >>>> I do not know if the PolyDataConnectivityFilter is the >>>> right class for this, I think it is. >>>> If I store the extractRegionData in a vector, all regions >>>> have the same number of points (which is kind of strange) >>>> but different number of cells (region size == number of >>>> cells is correct). >>>> >>>> I would now try to get the points from the cells and check >>>> the binary mask, because the >>>> >>>> vtkPolyData->GetNumberOfPoints() >>>> >>>> and >>>> >>>> vtkPolyData->GetPoint(pointCounter, point); >>>> >>>> are not working correctly in this scenario (all regions are >>>> extracted because every single region has every point? >>>> i did not verify my guess but I think there would be the >>>> problem) >>>> >>>> The binary mask is a vtkImageData, that could be >>>> transformed to vtkPolyData. >>>> The input image (already filtered with vtkMarchingCubes) >>>> and the binary mask have the same dimensions (x,y,z). >>>> >>>> I hope you can imagine what I'm trying to do and have some >>>> tips for me, if my approach is correct. >>>> >>>> Regards >>>> Imre >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Jan 2 14:16:19 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 2 Jan 2016 12:16:19 -0700 Subject: [vtkusers] method to extract regions In-Reply-To: <56881AF2.8080806@gmail.com> References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> <5687F40B.20100@gmail.com> <56881AF2.8080806@gmail.com> Message-ID: Sorry, but I still don't follow your explanation. I have some vague idea of what you are trying to do, but I don't understand well enough to give you any concrete advice. Can you try focussing on just one specific aspect of the problem, and then once I've understood that one aspect, we can move forward from there? - David On Sat, Jan 2, 2016 at 11:46 AM, Imre Goretzki wrote: > Mh ok, I guess I did not explained my problem well enough. > > The vtkPolyDataConnectivityFilter returns regions, either the largest, > specified, seeded or all regions (your filter returns largest, seeded or > all). I'm interessted in the following: > > - all regions > - specified regions. > > The problem is not the filter, the performance or possible memory leaks, I > need the region's polydata representation because I have a second object > (vtkImageData or vtkPolyData, binary mask) that has some additional > information, that are not represented by the data (the input for the > vtkImageConnectivityFilter). > > Imagine the input for the filter as image 1 and the mask as image 2. Both > images have the same dimensions in all 3 directions (x, y, z) but contain > different information. > > image 2 will be transformed to a binary image mask > > from image 1 i need to extract regions, but if some (unknown) regions have > points that are located in the binary image mask, I do not want these > regions to be contained in the extracted region list. > > So it's not about your filter or the performance, but I have some problems > using this filter for my issue, because I cannot reach the region's > polydata. > > I hope this helps. > > - Imre > > > Am 02.01.2016 um 18:54 schrieb David Gobbi: > > Hi Imre, Happy New Year! > > I've read your email few times, and I feel that I must be missing some > important because there are several things that I don't understand about it. > > The vtkImageConnectivityFilter is essentially just a connected component > filter. In the output of this filter, all pixels outside the mask will be > colored black (they will have a value of zero). So what I don't understand > about your email is why you say that non-rectangular regions are a > problem. Are you just worried about the wasted memory? > > - David > > > On Sat, Jan 2, 2016 at 9:00 AM, Imre Goretzki < > goretzki.imre at gmail.com> wrote: > >> Hey David, >> >> first of all: Happy new year :) >> >> I have some questions about your filter. First of all in part A of the >> attached image, is my understanding of extents, so if you have a region, >> you will get the x_min/x_max, y_min/y_max (and z_min/z_max for 3D). If you >> do not have rectangular regions than you could have some problems (see part >> A and B). In part B you see my mask. The red rectangle shows the case that >> the 4 corners of a 2D region cannot be directly checked, because the region >> that lies within this rectangle has little matches with the mask (none of >> the 4 corners are within the mask). The green rectangle has 3 out of 4 >> edges that lie within the mask. >> >> Part C shows one of the worst cases of this approach (using extents) >> because there is so much space that does not belong to the actual region. >> >> My question: Is it possible to extend your filter to directly store the >> region data (for each region, for example as vtkImageData) if the >> extraction mode is set to "All"? >> >> - Imre >> >> >> Am 29.12.2015 um 13:27 schrieb Imre Goretzki: >> >> Hi David, >> >> thank you. I'll take a look at your class. >> >> Regards >> Imre >> >> Am 29.12.2015 um 13:07 schrieb David Gobbi: >> >> Hi Imre, >> >> I have a connectivity filter that works directly on images, it can label >> connected regions according to size and it should be much faster (probably >> 1000x) than doing voxel checks via polydata: >> >> https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h >> I'll probably be contributing this filter to VTK sometime in the near >> future. >> >> - David >> >> >> On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki < >> goretzki.imre at gmail.com> wrote: >> >>> Is there an easier way in ITK? >>> >>> Thanks >>> Imre >>> >>> >>> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >>> >>> Hey guys, >>> >>> I use the vtkPolyDataConnectivityFilter from polydata to extract several >>> different and more or less unknown regions. >>> My problem is that I want to extract regions from this filter, but if I >>> do this, the update process for all regions takes up to 10minutes: >>> >>> filter->SetExtractionModeToAllRegions(); >>> filter->Update(); >>> ... >>> >>> for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) >>> { >>> extractFilter->InitializeSpecifiedRegionList(); >>> extractFilter->AddSpecifiedRegion(i); >>> extractFilter->Modified(); >>> extractFilter->Update(); >>> extractRegionData->DeepCopy(extractFilter->GetOutput()); >>> } >>> extractFilter->InitializeSpecifiedRegionList(); >>> >>> Background for this: I want to use the points of each region to check >>> whether they lie within an object in my binary >>> mask image. So the pipeline would be like this: >>> >>> 1) Get all Regions >>> 2) get region *i* >>> 3) get points of region *i* >>> 4) check if point *j* lies within the binary mask *B* ( >>> *B*_*j* == 255) >>> 4a) if true then add region to the extractFilter and >>> break (-> next region *i*) >>> 4b) if false then continue with next point *j* >>> 5) Mark all regions red (done easily) >>> 6) Mark some regions green that are above a specific size (can be >>> accessed with filter->GetRegionSizes() ) >>> 7) Mark some regions yellow (the regions that are extracted during step >>> 1-4a) >>> >>> I do not know if the PolyDataConnectivityFilter is the right class for >>> this, I think it is. >>> If I store the extractRegionData in a vector, all regions have the same >>> number of points (which is kind of strange) but different number of cells >>> (region size == number of cells is correct). >>> >>> I would now try to get the points from the cells and check the binary >>> mask, because the >>> >>> vtkPolyData->GetNumberOfPoints() >>> >>> and >>> >>> vtkPolyData->GetPoint(pointCounter, point); >>> >>> are not working correctly in this scenario (all regions are extracted >>> because every single region has every point? >>> i did not verify my guess but I think there would be the problem) >>> >>> The binary mask is a vtkImageData, that could be transformed to >>> vtkPolyData. >>> The input image (already filtered with vtkMarchingCubes) and the binary >>> mask have the same dimensions (x,y,z). >>> >>> I hope you can imagine what I'm trying to do and have some tips for me, >>> if my approach is correct. >>> >>> Regards >>> Imre >>> >>> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From goretzki.imre at gmail.com Sat Jan 2 14:32:49 2016 From: goretzki.imre at gmail.com (Imre Goretzki) Date: Sat, 2 Jan 2016 20:32:49 +0100 Subject: [vtkusers] method to extract regions In-Reply-To: References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> <5687F40B.20100@gmail.com> <56881AF2.8080806@gmail.com> Message-ID: <568825E1.8070902@gmail.com> I've drawn another image you could look at. The left image is the input data from which I would like to extract the regions. Here every region I would like to keep is painted green. The other two regions, that are painted red, have points that are located inside a region in the binary mask. For all points /P/ in all regions /R/ of image 1 with binary mask /B/ If B_P == 255 color region /R/ red else color region /R/ green - Imre Am 02.01.2016 um 20:16 schrieb David Gobbi: > Sorry, but I still don't follow your explanation. I have some vague > idea of what you are trying to do, but I don't understand well enough > to give you any concrete advice. Can you try focussing on just one > specific aspect of the problem, and then once I've understood that one > aspect, we can move forward from there? > > - David > > On Sat, Jan 2, 2016 at 11:46 AM, Imre Goretzki > > wrote: > > Mh ok, I guess I did not explained my problem well enough. > > The vtkPolyDataConnectivityFilter returns regions, either the > largest, specified, seeded or all regions (your filter returns > largest, seeded or all). I'm interessted in the following: > > - all regions > - specified regions. > > The problem is not the filter, the performance or possible memory > leaks, I need the region's polydata representation because I have > a second object (vtkImageData or vtkPolyData, binary mask) that > has some additional information, that are not represented by the > data (the input for the vtkImageConnectivityFilter). > > Imagine the input for the filter as image 1 and the mask as image > 2. Both images have the same dimensions in all 3 directions (x, y, > z) but contain different information. > > image 2 will be transformed to a binary image mask > > from image 1 i need to extract regions, but if some (unknown) > regions have points that are located in the binary image mask, I > do not want these regions to be contained in the extracted region > list. > > So it's not about your filter or the performance, but I have some > problems using this filter for my issue, because I cannot reach > the region's polydata. > > I hope this helps. > > - Imre > > > Am 02.01.2016 um 18:54 schrieb David Gobbi: >> Hi Imre, Happy New Year! >> >> I've read your email few times, and I feel that I must be missing >> some important because there are several things that I don't >> understand about it. >> >> The vtkImageConnectivityFilter is essentially just a connected >> component filter. In the output of this filter, all pixels >> outside the mask will be colored black (they will have a value of >> zero). So what I don't understand about your email is why you >> say that non-rectangular regions are a problem. Are you just >> worried about the wasted memory? >> >> - David >> >> >> On Sat, Jan 2, 2016 at 9:00 AM, Imre Goretzki >> > wrote: >> >> Hey David, >> >> first of all: Happy new year :) >> >> I have some questions about your filter. First of all in part >> A of the attached image, is my understanding of extents, so >> if you have a region, you will get the x_min/x_max, >> y_min/y_max (and z_min/z_max for 3D). If you do not have >> rectangular regions than you could have some problems (see >> part A and B). In part B you see my mask. The red rectangle >> shows the case that the 4 corners of a 2D region cannot be >> directly checked, because the region that lies within this >> rectangle has little matches with the mask (none of the 4 >> corners are within the mask). The green rectangle has 3 out >> of 4 edges that lie within the mask. >> >> Part C shows one of the worst cases of this approach (using >> extents) because there is so much space that does not belong >> to the actual region. >> >> My question: Is it possible to extend your filter to directly >> store the region data (for each region, for example as >> vtkImageData) if the extraction mode is set to "All"? >> >> - Imre >> >> >> Am 29.12.2015 um 13:27 schrieb Imre Goretzki: >>> Hi David, >>> >>> thank you. I'll take a look at your class. >>> >>> Regards >>> Imre >>> >>> Am 29.12.2015 um 13:07 schrieb David Gobbi: >>>> Hi Imre, >>>> >>>> I have a connectivity filter that works directly on images, >>>> it can label connected regions according to size and it >>>> should be much faster (probably 1000x) than doing voxel >>>> checks via polydata: >>>> https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h >>>> I'll probably be contributing this filter to VTK sometime >>>> in the near future. >>>> >>>> - David >>>> >>>> >>>> On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki >>>> > >>>> wrote: >>>> >>>> Is there an easier way in ITK? >>>> >>>> Thanks >>>> Imre >>>> >>>> >>>> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >>>>> Hey guys, >>>>> >>>>> I use the vtkPolyDataConnectivityFilter from polydata >>>>> to extract several different and more or less unknown >>>>> regions. >>>>> My problem is that I want to extract regions from this >>>>> filter, but if I do this, the update process for all >>>>> regions takes up to 10minutes: >>>>> >>>>> filter->SetExtractionModeToAllRegions(); >>>>> filter->Update(); >>>>> ... >>>>> >>>>> for (int i = 0; i < >>>>> filter->GetNumberOfExtractedRegions(); i++) >>>>> { >>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>> extractFilter->AddSpecifiedRegion(i); >>>>> extractFilter->Modified(); >>>>> extractFilter->Update(); >>>>> extractRegionData->DeepCopy(extractFilter->GetOutput()); >>>>> } >>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>> >>>>> Background for this: I want to use the points of each >>>>> region to check whether they lie within an object in >>>>> my binary >>>>> mask image. So the pipeline would be like this: >>>>> >>>>> 1) Get all Regions >>>>> 2) get region /i/ >>>>> 3) get points of region /i/ >>>>> 4) check if point /j/ lies within the binary mask /B/ >>>>> (/B/_/j/ == 255) >>>>> 4a) if true then add region to the extractFilter and >>>>> break (-> next region /i/) >>>>> 4b) if false then continue with next point /j/ >>>>> 5) Mark all regions red (done easily) >>>>> 6) Mark some regions green that are above a specific >>>>> size (can be accessed with filter->GetRegionSizes() ) >>>>> 7) Mark some regions yellow (the regions that are >>>>> extracted during step 1-4a) >>>>> >>>>> I do not know if the PolyDataConnectivityFilter is the >>>>> right class for this, I think it is. >>>>> If I store the extractRegionData in a vector, all >>>>> regions have the same number of points (which is kind >>>>> of strange) but different number of cells (region size >>>>> == number of cells is correct). >>>>> >>>>> I would now try to get the points from the cells and >>>>> check the binary mask, because the >>>>> >>>>> vtkPolyData->GetNumberOfPoints() >>>>> >>>>> and >>>>> >>>>> vtkPolyData->GetPoint(pointCounter, point); >>>>> >>>>> are not working correctly in this scenario (all >>>>> regions are extracted because every single region has >>>>> every point? >>>>> i did not verify my guess but I think there would be >>>>> the problem) >>>>> >>>>> The binary mask is a vtkImageData, that could be >>>>> transformed to vtkPolyData. >>>>> The input image (already filtered with >>>>> vtkMarchingCubes) and the binary mask have the same >>>>> dimensions (x,y,z). >>>>> >>>>> I hope you can imagine what I'm trying to do and have >>>>> some tips for me, if my approach is correct. >>>>> >>>>> Regards >>>>> Imre >>>> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.png Type: image/png Size: 17806 bytes Desc: not available URL: From david.gobbi at gmail.com Sat Jan 2 14:48:48 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 2 Jan 2016 12:48:48 -0700 Subject: [vtkusers] method to extract regions In-Reply-To: <568825E1.8070902@gmail.com> References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> <5687F40B.20100@gmail.com> <56881AF2.8080806@gmail.com> <568825E1.8070902@gmail.com> Message-ID: Thanks, that helps. Here is my understanding so far: 1) The mask is, originally, a polydata contour. 2) The mask indicates the regions you do not want. 3) The mask will be converted into a binary image before use. What I still need to know is: 3) Will some regions be partially within and partially outside the mask? Or will they always be entirely within or entirely outside? The vtkImageConnectivityFilter takes two inputs: the first input is just an image (of course) and the second input (which is optional) is an image stencil (essentially a binary image). There is a filter called vtkPolyDataToImageStencil which can be used create this second input from a vtkPolyData object. - David On Sat, Jan 2, 2016 at 12:32 PM, Imre Goretzki wrote: > I've drawn another image you could look at. The left image is the input > data from which I would like to extract the regions. Here every region I > would like to keep is painted green. The other two regions, that are > painted red, have points that are located inside a region in the binary > mask. > > > For all points *P* in all regions *R* of image 1 with binary mask *B* > > If B_P == 255 > color region *R* red > else > color region *R* green > > - Imre > > > Am 02.01.2016 um 20:16 schrieb David Gobbi: > > Sorry, but I still don't follow your explanation. I have some vague idea > of what you are trying to do, but I don't understand well enough to give > you any concrete advice. Can you try focussing on just one specific aspect > of the problem, and then once I've understood that one aspect, we can move > forward from there? > > - David > > On Sat, Jan 2, 2016 at 11:46 AM, Imre Goretzki > wrote: > >> Mh ok, I guess I did not explained my problem well enough. >> >> The vtkPolyDataConnectivityFilter returns regions, either the largest, >> specified, seeded or all regions (your filter returns largest, seeded or >> all). I'm interessted in the following: >> >> - all regions >> - specified regions. >> >> The problem is not the filter, the performance or possible memory leaks, >> I need the region's polydata representation because I have a second object >> (vtkImageData or vtkPolyData, binary mask) that has some additional >> information, that are not represented by the data (the input for the >> vtkImageConnectivityFilter). >> >> Imagine the input for the filter as image 1 and the mask as image 2. Both >> images have the same dimensions in all 3 directions (x, y, z) but contain >> different information. >> >> image 2 will be transformed to a binary image mask >> >> from image 1 i need to extract regions, but if some (unknown) regions >> have points that are located in the binary image mask, I do not want these >> regions to be contained in the extracted region list. >> >> So it's not about your filter or the performance, but I have some >> problems using this filter for my issue, because I cannot reach the >> region's polydata. >> >> I hope this helps. >> >> - Imre >> >> >> Am 02.01.2016 um 18:54 schrieb David Gobbi: >> >> Hi Imre, Happy New Year! >> >> I've read your email few times, and I feel that I must be missing some >> important because there are several things that I don't understand about it. >> >> The vtkImageConnectivityFilter is essentially just a connected component >> filter. In the output of this filter, all pixels outside the mask will be >> colored black (they will have a value of zero). So what I don't understand >> about your email is why you say that non-rectangular regions are a >> problem. Are you just worried about the wasted memory? >> >> - David >> >> >> On Sat, Jan 2, 2016 at 9:00 AM, Imre Goretzki < >> goretzki.imre at gmail.com> wrote: >> >>> Hey David, >>> >>> first of all: Happy new year :) >>> >>> I have some questions about your filter. First of all in part A of the >>> attached image, is my understanding of extents, so if you have a region, >>> you will get the x_min/x_max, y_min/y_max (and z_min/z_max for 3D). If you >>> do not have rectangular regions than you could have some problems (see part >>> A and B). In part B you see my mask. The red rectangle shows the case that >>> the 4 corners of a 2D region cannot be directly checked, because the region >>> that lies within this rectangle has little matches with the mask (none of >>> the 4 corners are within the mask). The green rectangle has 3 out of 4 >>> edges that lie within the mask. >>> >>> Part C shows one of the worst cases of this approach (using extents) >>> because there is so much space that does not belong to the actual region. >>> >>> My question: Is it possible to extend your filter to directly store the >>> region data (for each region, for example as vtkImageData) if the >>> extraction mode is set to "All"? >>> >>> - Imre >>> >>> >>> Am 29.12.2015 um 13:27 schrieb Imre Goretzki: >>> >>> Hi David, >>> >>> thank you. I'll take a look at your class. >>> >>> Regards >>> Imre >>> >>> Am 29.12.2015 um 13:07 schrieb David Gobbi: >>> >>> Hi Imre, >>> >>> I have a connectivity filter that works directly on images, it can label >>> connected regions according to size and it should be much faster (probably >>> 1000x) than doing voxel checks via polydata: >>> >>> https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h >>> I'll probably be contributing this filter to VTK sometime in the near >>> future. >>> >>> - David >>> >>> >>> On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki < >>> goretzki.imre at gmail.com> wrote: >>> >>>> Is there an easier way in ITK? >>>> >>>> Thanks >>>> Imre >>>> >>>> >>>> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >>>> >>>> Hey guys, >>>> >>>> I use the vtkPolyDataConnectivityFilter from polydata to extract >>>> several different and more or less unknown regions. >>>> My problem is that I want to extract regions from this filter, but if I >>>> do this, the update process for all regions takes up to 10minutes: >>>> >>>> filter->SetExtractionModeToAllRegions(); >>>> filter->Update(); >>>> ... >>>> >>>> for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) >>>> { >>>> extractFilter->InitializeSpecifiedRegionList(); >>>> extractFilter->AddSpecifiedRegion(i); >>>> extractFilter->Modified(); >>>> extractFilter->Update(); >>>> extractRegionData->DeepCopy(extractFilter->GetOutput()); >>>> } >>>> extractFilter->InitializeSpecifiedRegionList(); >>>> >>>> Background for this: I want to use the points of each region to check >>>> whether they lie within an object in my binary >>>> mask image. So the pipeline would be like this: >>>> >>>> 1) Get all Regions >>>> 2) get region *i* >>>> 3) get points of region *i* >>>> 4) check if point *j* lies within the binary mask *B* >>>> (*B*_*j* == 255) >>>> 4a) if true then add region to the extractFilter and >>>> break (-> next region *i*) >>>> 4b) if false then continue with next point *j* >>>> 5) Mark all regions red (done easily) >>>> 6) Mark some regions green that are above a specific size (can be >>>> accessed with filter->GetRegionSizes() ) >>>> 7) Mark some regions yellow (the regions that are extracted during step >>>> 1-4a) >>>> >>>> I do not know if the PolyDataConnectivityFilter is the right class for >>>> this, I think it is. >>>> If I store the extractRegionData in a vector, all regions have the same >>>> number of points (which is kind of strange) but different number of cells >>>> (region size == number of cells is correct). >>>> >>>> I would now try to get the points from the cells and check the binary >>>> mask, because the >>>> >>>> vtkPolyData->GetNumberOfPoints() >>>> >>>> and >>>> >>>> vtkPolyData->GetPoint(pointCounter, point); >>>> >>>> are not working correctly in this scenario (all regions are extracted >>>> because every single region has every point? >>>> i did not verify my guess but I think there would be the problem) >>>> >>>> The binary mask is a vtkImageData, that could be transformed to >>>> vtkPolyData. >>>> The input image (already filtered with vtkMarchingCubes) and the binary >>>> mask have the same dimensions (x,y,z). >>>> >>>> I hope you can imagine what I'm trying to do and have some tips for me, >>>> if my approach is correct. >>>> >>>> Regards >>>> Imre >>>> >>>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From goretzki.imre at gmail.com Sat Jan 2 15:06:08 2016 From: goretzki.imre at gmail.com (Imre Goretzki) Date: Sat, 2 Jan 2016 21:06:08 +0100 Subject: [vtkusers] method to extract regions In-Reply-To: References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> <5687F40B.20100@gmail.com> <56881AF2.8080806@gmail.com> <568825E1.8070902@gmail.com> Message-ID: <56882DB0.2080509@gmail.com> Great! This is correct. Yes they can be partially outside the mask because I neither know the sizes and locations of the regions I want to keep nor the sizes and locations of the regions I want to discard for both input image and mask image (the mask changes dynamically) Ok so in later progress I could use the mask as the second input (the stencil) and this removes the regions? My current code lets me get the regions I want to discard by storing the polydata output of vtkPolyDataConnectivityFilter and then iterate over the cells and their points for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) { vtkSmartPointer extractRegionData = vtkSmartPointer::New(); //fast extractFilter->InitializeSpecifiedRegionList(); //fast extractFilter->AddSpecifiedRegion(i); //fast extractFilter->Modified(); //fast extractFilter->Update(); //very long extractRegionData->DeepCopy(extractFilter->GetOutput()); //fast regionList.push_back(extractRegionData); //fast } for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) { // some other operations } The update() process takes a very long time. As an example, if I have about 200 regions, this would take about 10 minutes. All other following operations on the data and/or a vtkPolyDataConnectivityFilter do not take so long. - Imre Am 02.01.2016 um 20:48 schrieb David Gobbi: > Thanks, that helps. Here is my understanding so far: > > 1) The mask is, originally, a polydata contour. > 2) The mask indicates the regions you do not want. > 3) The mask will be converted into a binary image before use. > > What I still need to know is: > > 3) Will some regions be partially within and partially outside the > mask? Or will they always be entirely within or entirely outside? > > The vtkImageConnectivityFilter takes two inputs: the first input is > just an image (of course) and the second input (which is optional) is > an image stencil (essentially a binary image). There is a filter > called vtkPolyDataToImageStencil which can be used create this second > input from a vtkPolyData object. > > - David > > > On Sat, Jan 2, 2016 at 12:32 PM, Imre Goretzki > > wrote: > > I've drawn another image you could look at. The left image is the > input data from which I would like to extract the regions. Here > every region I would like to keep is painted green. The other two > regions, that are painted red, have points that are located inside > a region in the binary mask. > > > For all points /P/ in all regions /R/ of image 1 with binary mask /B/ > > If B_P == 255 > color region /R/ red > else > color region /R/ green > > - Imre > > > Am 02.01.2016 um 20:16 schrieb David Gobbi: >> Sorry, but I still don't follow your explanation. I have some >> vague idea of what you are trying to do, but I don't understand >> well enough to give you any concrete advice. Can you try >> focussing on just one specific aspect of the problem, and then >> once I've understood that one aspect, we can move forward from >> there? >> >> - David >> >> On Sat, Jan 2, 2016 at 11:46 AM, Imre Goretzki >> > wrote: >> >> Mh ok, I guess I did not explained my problem well enough. >> >> The vtkPolyDataConnectivityFilter returns regions, either the >> largest, specified, seeded or all regions (your filter >> returns largest, seeded or all). I'm interessted in the >> following: >> >> - all regions >> - specified regions. >> >> The problem is not the filter, the performance or possible >> memory leaks, I need the region's polydata representation >> because I have a second object (vtkImageData or vtkPolyData, >> binary mask) that has some additional information, that are >> not represented by the data (the input for the >> vtkImageConnectivityFilter). >> >> Imagine the input for the filter as image 1 and the mask as >> image 2. Both images have the same dimensions in all 3 >> directions (x, y, z) but contain different information. >> >> image 2 will be transformed to a binary image mask >> >> from image 1 i need to extract regions, but if some (unknown) >> regions have points that are located in the binary image >> mask, I do not want these regions to be contained in the >> extracted region list. >> >> So it's not about your filter or the performance, but I have >> some problems using this filter for my issue, because I >> cannot reach the region's polydata. >> >> I hope this helps. >> >> - Imre >> >> >> Am 02.01.2016 um 18:54 schrieb David Gobbi: >>> Hi Imre, Happy New Year! >>> >>> I've read your email few times, and I feel that I must be >>> missing some important because there are several things that >>> I don't understand about it. >>> >>> The vtkImageConnectivityFilter is essentially just a >>> connected component filter. In the output of this filter, >>> all pixels outside the mask will be colored black (they will >>> have a value of zero). So what I don't understand about your >>> email is why you say that non-rectangular regions are a >>> problem. Are you just worried about the wasted memory? >>> >>> - David >>> >>> >>> On Sat, Jan 2, 2016 at 9:00 AM, Imre Goretzki >>> > >>> wrote: >>> >>> Hey David, >>> >>> first of all: Happy new year :) >>> >>> I have some questions about your filter. First of all in >>> part A of the attached image, is my understanding of >>> extents, so if you have a region, you will get the >>> x_min/x_max, y_min/y_max (and z_min/z_max for 3D). If >>> you do not have rectangular regions than you could have >>> some problems (see part A and B). In part B you see my >>> mask. The red rectangle shows the case that the 4 >>> corners of a 2D region cannot be directly checked, >>> because the region that lies within this rectangle has >>> little matches with the mask (none of the 4 corners are >>> within the mask). The green rectangle has 3 out of 4 >>> edges that lie within the mask. >>> >>> Part C shows one of the worst cases of this approach >>> (using extents) because there is so much space that does >>> not belong to the actual region. >>> >>> My question: Is it possible to extend your filter to >>> directly store the region data (for each region, for >>> example as vtkImageData) if the extraction mode is set >>> to "All"? >>> >>> - Imre >>> >>> >>> Am 29.12.2015 um 13:27 schrieb Imre Goretzki: >>>> Hi David, >>>> >>>> thank you. I'll take a look at your class. >>>> >>>> Regards >>>> Imre >>>> >>>> Am 29.12.2015 um 13:07 schrieb David Gobbi: >>>>> Hi Imre, >>>>> >>>>> I have a connectivity filter that works directly on >>>>> images, it can label connected regions according to >>>>> size and it should be much faster (probably 1000x) >>>>> than doing voxel checks via polydata: >>>>> https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h >>>>> I'll probably be contributing this filter to VTK >>>>> sometime in the near future. >>>>> >>>>> - David >>>>> >>>>> >>>>> On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki >>>>> >>>> > wrote: >>>>> >>>>> Is there an easier way in ITK? >>>>> >>>>> Thanks >>>>> Imre >>>>> >>>>> >>>>> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >>>>>> Hey guys, >>>>>> >>>>>> I use the vtkPolyDataConnectivityFilter from >>>>>> polydata to extract several different and more or >>>>>> less unknown regions. >>>>>> My problem is that I want to extract regions from >>>>>> this filter, but if I do this, the update process >>>>>> for all regions takes up to 10minutes: >>>>>> >>>>>> filter->SetExtractionModeToAllRegions(); >>>>>> filter->Update(); >>>>>> ... >>>>>> >>>>>> for (int i = 0; i < >>>>>> filter->GetNumberOfExtractedRegions(); i++) >>>>>> { >>>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>>> extractFilter->AddSpecifiedRegion(i); >>>>>> extractFilter->Modified(); >>>>>> extractFilter->Update(); >>>>>> extractRegionData->DeepCopy(extractFilter->GetOutput()); >>>>>> } >>>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>>> >>>>>> Background for this: I want to use the points of >>>>>> each region to check whether they lie within an >>>>>> object in my binary >>>>>> mask image. So the pipeline would be like this: >>>>>> >>>>>> 1) Get all Regions >>>>>> 2) get region /i/ >>>>>> 3) get points of region /i/ >>>>>> 4) check if point /j/ lies within the binary mask >>>>>> /B/ (/B/_/j/ == 255) >>>>>> 4a) if true then add region to the extractFilter >>>>>> and break (-> next region /i/) >>>>>> 4b) if false then continue with next point /j/ >>>>>> 5) Mark all regions red (done easily) >>>>>> 6) Mark some regions green that are above a >>>>>> specific size (can be accessed with >>>>>> filter->GetRegionSizes() ) >>>>>> 7) Mark some regions yellow (the regions that are >>>>>> extracted during step 1-4a) >>>>>> >>>>>> I do not know if the PolyDataConnectivityFilter >>>>>> is the right class for this, I think it is. >>>>>> If I store the extractRegionData in a vector, all >>>>>> regions have the same number of points (which is >>>>>> kind of strange) but different number of cells >>>>>> (region size == number of cells is correct). >>>>>> >>>>>> I would now try to get the points from the cells >>>>>> and check the binary mask, because the >>>>>> >>>>>> vtkPolyData->GetNumberOfPoints() >>>>>> >>>>>> and >>>>>> >>>>>> vtkPolyData->GetPoint(pointCounter, point); >>>>>> >>>>>> are not working correctly in this scenario (all >>>>>> regions are extracted because every single region >>>>>> has every point? >>>>>> i did not verify my guess but I think there would >>>>>> be the problem) >>>>>> >>>>>> The binary mask is a vtkImageData, that could be >>>>>> transformed to vtkPolyData. >>>>>> The input image (already filtered with >>>>>> vtkMarchingCubes) and the binary mask have the >>>>>> same dimensions (x,y,z). >>>>>> >>>>>> I hope you can imagine what I'm trying to do and >>>>>> have some tips for me, if my approach is correct. >>>>>> >>>>>> Regards >>>>>> Imre >>>>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Jan 2 15:45:49 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 2 Jan 2016 13:45:49 -0700 Subject: [vtkusers] method to extract regions In-Reply-To: <56882DB0.2080509@gmail.com> References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> <5687F40B.20100@gmail.com> <56881AF2.8080806@gmail.com> <568825E1.8070902@gmail.com> <56882DB0.2080509@gmail.com> Message-ID: On Sat, Jan 2, 2016 at 1:06 PM, Imre Goretzki wrote: > > > Yes they can be partially outside the mask because I neither know the > sizes and locations of the regions I want to keep nor the sizes and > locations of the regions I want to discard for both input image and mask > image (the mask changes dynamically) > > Ok so in later progress I could use the mask as the second input (the > stencil) and this removes the regions? > The vtkImageConnectivityFilter ignores any pixels that are outside the stencil (so that might be the reverse of what you want, since you want to ignore the regions that are inside your mask). If a region is partly outside the stencil, then only the part that is outside will be ignored. The rest would be counted. As far as I understand, that is not what you want. You would want the entire region to be ignored, right? Is there any reason that you even need a "mask"? Would it be just as good if you could specify the unwanted regions by giving just one point in each unwanted region, i.e. the user would use the mouse to click on the unwanted regions? Actually, instead of using an input mask, it seems that it would be best to allow vtkImageConnectivityFilter to assign a different label value to each region. Then, once you know which labels correspond to which regions, you could pass this label image through a lookup table that colors all of the unwanted regions black. - David > My current code lets me get the regions I want to discard by storing the > polydata output of vtkPolyDataConnectivityFilter and then iterate over the > cells and their points > > for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) > { > vtkSmartPointer extractRegionData = > vtkSmartPointer::New(); //fast > extractFilter->InitializeSpecifiedRegionList(); //fast > extractFilter->AddSpecifiedRegion(i); //fast > extractFilter->Modified(); //fast > extractFilter->Update(); //very long > extractRegionData->DeepCopy(extractFilter->GetOutput()); //fast > regionList.push_back(extractRegionData); //fast > } > for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) > { > // some other operations > } > > The update() process takes a very long time. As an example, if I have > about 200 regions, this would take about 10 minutes. All other following > operations on the data and/or a vtkPolyDataConnectivityFilter do not take > so long. > > - Imre > > > Am 02.01.2016 um 20:48 schrieb David Gobbi: > > Thanks, that helps. Here is my understanding so far: > > 1) The mask is, originally, a polydata contour. > 2) The mask indicates the regions you do not want. > 3) The mask will be converted into a binary image before use. > > What I still need to know is: > > 3) Will some regions be partially within and partially outside the mask? > Or will they always be entirely within or entirely outside? > > The vtkImageConnectivityFilter takes two inputs: the first input is just > an image (of course) and the second input (which is optional) is an image > stencil (essentially a binary image). There is a filter called > vtkPolyDataToImageStencil which can be used create this second input from a > vtkPolyData object. > > - David > > > On Sat, Jan 2, 2016 at 12:32 PM, Imre Goretzki > wrote: > >> I've drawn another image you could look at. The left image is the input >> data from which I would like to extract the regions. Here every region I >> would like to keep is painted green. The other two regions, that are >> painted red, have points that are located inside a region in the binary >> mask. >> >> >> For all points *P* in all regions *R* of image 1 with binary mask *B* >> >> If B_P == 255 >> color region *R* red >> else >> color region *R* green >> >> - Imre >> >> >> Am 02.01.2016 um 20:16 schrieb David Gobbi: >> >> Sorry, but I still don't follow your explanation. I have some vague idea >> of what you are trying to do, but I don't understand well enough to give >> you any concrete advice. Can you try focussing on just one specific aspect >> of the problem, and then once I've understood that one aspect, we can move >> forward from there? >> >> - David >> >> On Sat, Jan 2, 2016 at 11:46 AM, Imre Goretzki < >> goretzki.imre at gmail.com> wrote: >> >>> Mh ok, I guess I did not explained my problem well enough. >>> >>> The vtkPolyDataConnectivityFilter returns regions, either the largest, >>> specified, seeded or all regions (your filter returns largest, seeded or >>> all). I'm interessted in the following: >>> >>> - all regions >>> - specified regions. >>> >>> The problem is not the filter, the performance or possible memory leaks, >>> I need the region's polydata representation because I have a second object >>> (vtkImageData or vtkPolyData, binary mask) that has some additional >>> information, that are not represented by the data (the input for the >>> vtkImageConnectivityFilter). >>> >>> Imagine the input for the filter as image 1 and the mask as image 2. >>> Both images have the same dimensions in all 3 directions (x, y, z) but >>> contain different information. >>> >>> image 2 will be transformed to a binary image mask >>> >>> from image 1 i need to extract regions, but if some (unknown) regions >>> have points that are located in the binary image mask, I do not want these >>> regions to be contained in the extracted region list. >>> >>> So it's not about your filter or the performance, but I have some >>> problems using this filter for my issue, because I cannot reach the >>> region's polydata. >>> >>> I hope this helps. >>> >>> - Imre >>> >>> >>> Am 02.01.2016 um 18:54 schrieb David Gobbi: >>> >>> Hi Imre, Happy New Year! >>> >>> I've read your email few times, and I feel that I must be missing some >>> important because there are several things that I don't understand about it. >>> >>> The vtkImageConnectivityFilter is essentially just a connected component >>> filter. In the output of this filter, all pixels outside the mask will be >>> colored black (they will have a value of zero). So what I don't understand >>> about your email is why you say that non-rectangular regions are a >>> problem. Are you just worried about the wasted memory? >>> >>> - David >>> >>> >>> On Sat, Jan 2, 2016 at 9:00 AM, Imre Goretzki < >>> goretzki.imre at gmail.com> wrote: >>> >>>> Hey David, >>>> >>>> first of all: Happy new year :) >>>> >>>> I have some questions about your filter. First of all in part A of the >>>> attached image, is my understanding of extents, so if you have a region, >>>> you will get the x_min/x_max, y_min/y_max (and z_min/z_max for 3D). If you >>>> do not have rectangular regions than you could have some problems (see part >>>> A and B). In part B you see my mask. The red rectangle shows the case that >>>> the 4 corners of a 2D region cannot be directly checked, because the region >>>> that lies within this rectangle has little matches with the mask (none of >>>> the 4 corners are within the mask). The green rectangle has 3 out of 4 >>>> edges that lie within the mask. >>>> >>>> Part C shows one of the worst cases of this approach (using extents) >>>> because there is so much space that does not belong to the actual region. >>>> >>>> My question: Is it possible to extend your filter to directly store the >>>> region data (for each region, for example as vtkImageData) if the >>>> extraction mode is set to "All"? >>>> >>>> - Imre >>>> >>>> >>>> Am 29.12.2015 um 13:27 schrieb Imre Goretzki: >>>> >>>> Hi David, >>>> >>>> thank you. I'll take a look at your class. >>>> >>>> Regards >>>> Imre >>>> >>>> Am 29.12.2015 um 13:07 schrieb David Gobbi: >>>> >>>> Hi Imre, >>>> >>>> I have a connectivity filter that works directly on images, it can >>>> label connected regions according to size and it should be much faster >>>> (probably 1000x) than doing voxel checks via polydata: >>>> >>>> >>>> https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h >>>> I'll probably be contributing this filter to VTK sometime in the near >>>> future. >>>> >>>> - David >>>> >>>> >>>> On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki < >>>> goretzki.imre at gmail.com> wrote: >>>> >>>>> Is there an easier way in ITK? >>>>> >>>>> Thanks >>>>> Imre >>>>> >>>>> >>>>> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >>>>> >>>>> Hey guys, >>>>> >>>>> I use the vtkPolyDataConnectivityFilter from polydata to extract >>>>> several different and more or less unknown regions. >>>>> My problem is that I want to extract regions from this filter, but if >>>>> I do this, the update process for all regions takes up to 10minutes: >>>>> >>>>> filter->SetExtractionModeToAllRegions(); >>>>> filter->Update(); >>>>> ... >>>>> >>>>> for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) >>>>> { >>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>> extractFilter->AddSpecifiedRegion(i); >>>>> extractFilter->Modified(); >>>>> extractFilter->Update(); >>>>> extractRegionData->DeepCopy(extractFilter->GetOutput()); >>>>> } >>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>> >>>>> Background for this: I want to use the points of each region to check >>>>> whether they lie within an object in my binary >>>>> mask image. So the pipeline would be like this: >>>>> >>>>> 1) Get all Regions >>>>> 2) get region *i* >>>>> 3) get points of region *i* >>>>> 4) check if point *j* lies within the binary mask *B* >>>>> (*B*_*j* == 255) >>>>> 4a) if true then add region to the extractFilter and >>>>> break (-> next region *i*) >>>>> 4b) if false then continue with next point *j* >>>>> 5) Mark all regions red (done easily) >>>>> 6) Mark some regions green that are above a specific size (can be >>>>> accessed with filter->GetRegionSizes() ) >>>>> 7) Mark some regions yellow (the regions that are extracted during >>>>> step 1-4a) >>>>> >>>>> I do not know if the PolyDataConnectivityFilter is the right class for >>>>> this, I think it is. >>>>> If I store the extractRegionData in a vector, all regions have the >>>>> same number of points (which is kind of strange) but different number of >>>>> cells (region size == number of cells is correct). >>>>> >>>>> I would now try to get the points from the cells and check the binary >>>>> mask, because the >>>>> >>>>> vtkPolyData->GetNumberOfPoints() >>>>> >>>>> and >>>>> >>>>> vtkPolyData->GetPoint(pointCounter, point); >>>>> >>>>> are not working correctly in this scenario (all regions are extracted >>>>> because every single region has every point? >>>>> i did not verify my guess but I think there would be the problem) >>>>> >>>>> The binary mask is a vtkImageData, that could be transformed to >>>>> vtkPolyData. >>>>> The input image (already filtered with vtkMarchingCubes) and the >>>>> binary mask have the same dimensions (x,y,z). >>>>> >>>>> I hope you can imagine what I'm trying to do and have some tips for >>>>> me, if my approach is correct. >>>>> >>>>> Regards >>>>> Imre >>>>> >>>>> >>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From goretzki.imre at gmail.com Sat Jan 2 17:14:51 2016 From: goretzki.imre at gmail.com (Imre Goretzki) Date: Sat, 2 Jan 2016 23:14:51 +0100 Subject: [vtkusers] method to extract regions In-Reply-To: References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> <5687F40B.20100@gmail.com> <56881AF2.8080806@gmail.com> <568825E1.8070902@gmail.com> <56882DB0.2080509@gmail.com> Message-ID: <56884BDB.9080201@gmail.com> Yes I would like to ignore the entire region. No there will be no user interaction. This is completely unwanted - unfortunately. Your last point could be helpful. Thanks David. I guess, I try that tomorrow. - Imre Am 02.01.2016 um 21:45 schrieb David Gobbi: > On Sat, Jan 2, 2016 at 1:06 PM, Imre Goretzki > wrote: > > > Yes they can be partially outside the mask because I neither know > the sizes and locations of the regions I want to keep nor the > sizes and locations of the regions I want to discard for both > input image and mask image (the mask changes dynamically) > > Ok so in later progress I could use the mask as the second input > (the stencil) and this removes the regions? > > > The vtkImageConnectivityFilter ignores any pixels that are outside the > stencil (so that might be the reverse of what you want, since you want > to ignore the regions that are inside your mask). > > If a region is partly outside the stencil, then only the part that is > outside will be ignored. The rest would be counted. As far as I > understand, that is not what you want. You would want the entire > region to be ignored, right? > > Is there any reason that you even need a "mask"? Would it be just as > good if you could specify the unwanted regions by giving just one > point in each unwanted region, i.e. the user would use the mouse to > click on the unwanted regions? > > Actually, instead of using an input mask, it seems that it would be > best to allow vtkImageConnectivityFilter to assign a different label > value to each region. Then, once you know which labels correspond to > which regions, you could pass this label image through a lookup table > that colors all of the unwanted regions black. > > - David > > > My current code lets me get the regions I want to discard by > storing the polydata output of vtkPolyDataConnectivityFilter and > then iterate over the cells and their points > > for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) > { > vtkSmartPointer extractRegionData = > vtkSmartPointer::New(); //fast > extractFilter->InitializeSpecifiedRegionList(); //fast > extractFilter->AddSpecifiedRegion(i); //fast > extractFilter->Modified(); //fast > extractFilter->Update(); //very long > extractRegionData->DeepCopy(extractFilter->GetOutput()); //fast > regionList.push_back(extractRegionData); //fast > } > for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) > { > // some other operations > } > > The update() process takes a very long time. As an example, if I > have about 200 regions, this would take about 10 minutes. All > other following operations on the data and/or a > vtkPolyDataConnectivityFilter do not take so long. > > - Imre > > > Am 02.01.2016 um 20:48 schrieb David Gobbi: >> Thanks, that helps. Here is my understanding so far: >> >> 1) The mask is, originally, a polydata contour. >> 2) The mask indicates the regions you do not want. >> 3) The mask will be converted into a binary image before use. >> >> What I still need to know is: >> >> 3) Will some regions be partially within and partially outside >> the mask? Or will they always be entirely within or entirely >> outside? >> >> The vtkImageConnectivityFilter takes two inputs: the first input >> is just an image (of course) and the second input (which is >> optional) is an image stencil (essentially a binary image). >> There is a filter called vtkPolyDataToImageStencil which can be >> used create this second input from a vtkPolyData object. >> >> - David >> >> >> On Sat, Jan 2, 2016 at 12:32 PM, Imre Goretzki >> > wrote: >> >> I've drawn another image you could look at. The left image is >> the input data from which I would like to extract the >> regions. Here every region I would like to keep is painted >> green. The other two regions, that are painted red, have >> points that are located inside a region in the binary mask. >> >> >> For all points /P/ in all regions /R/ of image 1 with binary >> mask /B/ >> >> If B_P == 255 >> color region /R/ red >> else >> color region /R/ green >> >> - Imre >> >> >> Am 02.01.2016 um 20:16 schrieb David Gobbi: >>> Sorry, but I still don't follow your explanation. I have >>> some vague idea of what you are trying to do, but I don't >>> understand well enough to give you any concrete advice. Can >>> you try focussing on just one specific aspect of the >>> problem, and then once I've understood that one aspect, we >>> can move forward from there? >>> >>> - David >>> >>> On Sat, Jan 2, 2016 at 11:46 AM, Imre Goretzki >>> > >>> wrote: >>> >>> Mh ok, I guess I did not explained my problem well enough. >>> >>> The vtkPolyDataConnectivityFilter returns regions, >>> either the largest, specified, seeded or all regions >>> (your filter returns largest, seeded or all). I'm >>> interessted in the following: >>> >>> - all regions >>> - specified regions. >>> >>> The problem is not the filter, the performance or >>> possible memory leaks, I need the region's polydata >>> representation because I have a second object >>> (vtkImageData or vtkPolyData, binary mask) that has some >>> additional information, that are not represented by the >>> data (the input for the vtkImageConnectivityFilter). >>> >>> Imagine the input for the filter as image 1 and the mask >>> as image 2. Both images have the same dimensions in all >>> 3 directions (x, y, z) but contain different information. >>> >>> image 2 will be transformed to a binary image mask >>> >>> from image 1 i need to extract regions, but if some >>> (unknown) regions have points that are located in the >>> binary image mask, I do not want these regions to be >>> contained in the extracted region list. >>> >>> So it's not about your filter or the performance, but I >>> have some problems using this filter for my issue, >>> because I cannot reach the region's polydata. >>> >>> I hope this helps. >>> >>> - Imre >>> >>> >>> Am 02.01.2016 um 18:54 schrieb David Gobbi: >>>> Hi Imre, Happy New Year! >>>> >>>> I've read your email few times, and I feel that I must >>>> be missing some important because there are several >>>> things that I don't understand about it. >>>> >>>> The vtkImageConnectivityFilter is essentially just a >>>> connected component filter. In the output of this >>>> filter, all pixels outside the mask will be colored >>>> black (they will have a value of zero). So what I don't >>>> understand about your email is why you say that >>>> non-rectangular regions are a problem. Are you just >>>> worried about the wasted memory? >>>> >>>> - David >>>> >>>> >>>> On Sat, Jan 2, 2016 at 9:00 AM, Imre Goretzki >>>> >>> > wrote: >>>> >>>> Hey David, >>>> >>>> first of all: Happy new year :) >>>> >>>> I have some questions about your filter. First of >>>> all in part A of the attached image, is my >>>> understanding of extents, so if you have a region, >>>> you will get the x_min/x_max, y_min/y_max (and >>>> z_min/z_max for 3D). If you do not have rectangular >>>> regions than you could have some problems (see part >>>> A and B). In part B you see my mask. The red >>>> rectangle shows the case that the 4 corners of a 2D >>>> region cannot be directly checked, because the >>>> region that lies within this rectangle has little >>>> matches with the mask (none of the 4 corners are >>>> within the mask). The green rectangle has 3 out of >>>> 4 edges that lie within the mask. >>>> >>>> Part C shows one of the worst cases of this >>>> approach (using extents) because there is so much >>>> space that does not belong to the actual region. >>>> >>>> My question: Is it possible to extend your filter >>>> to directly store the region data (for each region, >>>> for example as vtkImageData) if the extraction mode >>>> is set to "All"? >>>> >>>> - Imre >>>> >>>> >>>> Am 29.12.2015 um 13:27 schrieb Imre Goretzki: >>>>> Hi David, >>>>> >>>>> thank you. I'll take a look at your class. >>>>> >>>>> Regards >>>>> Imre >>>>> >>>>> Am 29.12.2015 um 13:07 schrieb David Gobbi: >>>>>> Hi Imre, >>>>>> >>>>>> I have a connectivity filter that works directly >>>>>> on images, it can label connected regions >>>>>> according to size and it should be much faster >>>>>> (probably 1000x) than doing voxel checks via >>>>>> polydata: >>>>>> https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h >>>>>> I'll probably be contributing this filter to VTK >>>>>> sometime in the near future. >>>>>> >>>>>> - David >>>>>> >>>>>> >>>>>> On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki >>>>>> >>>>> > wrote: >>>>>> >>>>>> Is there an easier way in ITK? >>>>>> >>>>>> Thanks >>>>>> Imre >>>>>> >>>>>> >>>>>> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >>>>>>> Hey guys, >>>>>>> >>>>>>> I use the vtkPolyDataConnectivityFilter from >>>>>>> polydata to extract several different and >>>>>>> more or less unknown regions. >>>>>>> My problem is that I want to extract regions >>>>>>> from this filter, but if I do this, the >>>>>>> update process for all regions takes up to >>>>>>> 10minutes: >>>>>>> >>>>>>> filter->SetExtractionModeToAllRegions(); >>>>>>> filter->Update(); >>>>>>> ... >>>>>>> >>>>>>> for (int i = 0; i < >>>>>>> filter->GetNumberOfExtractedRegions(); i++) >>>>>>> { >>>>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>>>> extractFilter->AddSpecifiedRegion(i); >>>>>>> extractFilter->Modified(); >>>>>>> extractFilter->Update(); >>>>>>> extractRegionData->DeepCopy(extractFilter->GetOutput()); >>>>>>> } >>>>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>>>> >>>>>>> Background for this: I want to use the >>>>>>> points of each region to check whether they >>>>>>> lie within an object in my binary >>>>>>> mask image. So the pipeline would be like this: >>>>>>> >>>>>>> 1) Get all Regions >>>>>>> 2) get region /i/ >>>>>>> 3) get points of region /i/ >>>>>>> 4) check if point /j/ lies within the binary >>>>>>> mask /B/ (/B/_/j/ == 255) >>>>>>> 4a) if true then add region to the >>>>>>> extractFilter and break (-> next region /i/) >>>>>>> 4b) if false then continue with next point /j/ >>>>>>> 5) Mark all regions red (done easily) >>>>>>> 6) Mark some regions green that are above a >>>>>>> specific size (can be accessed with >>>>>>> filter->GetRegionSizes() ) >>>>>>> 7) Mark some regions yellow (the regions >>>>>>> that are extracted during step 1-4a) >>>>>>> >>>>>>> I do not know if the >>>>>>> PolyDataConnectivityFilter is the right >>>>>>> class for this, I think it is. >>>>>>> If I store the extractRegionData in a >>>>>>> vector, all regions have the same number of >>>>>>> points (which is kind of strange) but >>>>>>> different number of cells (region size == >>>>>>> number of cells is correct). >>>>>>> >>>>>>> I would now try to get the points from the >>>>>>> cells and check the binary mask, because the >>>>>>> >>>>>>> vtkPolyData->GetNumberOfPoints() >>>>>>> >>>>>>> and >>>>>>> >>>>>>> vtkPolyData->GetPoint(pointCounter, point); >>>>>>> >>>>>>> are not working correctly in this scenario >>>>>>> (all regions are extracted because every >>>>>>> single region has every point? >>>>>>> i did not verify my guess but I think there >>>>>>> would be the problem) >>>>>>> >>>>>>> The binary mask is a vtkImageData, that >>>>>>> could be transformed to vtkPolyData. >>>>>>> The input image (already filtered with >>>>>>> vtkMarchingCubes) and the binary mask have >>>>>>> the same dimensions (x,y,z). >>>>>>> >>>>>>> I hope you can imagine what I'm trying to do >>>>>>> and have some tips for me, if my approach is >>>>>>> correct. >>>>>>> >>>>>>> Regards >>>>>>> Imre >>>>>> >>>> >>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangq1979 at outlook.com Sat Jan 2 17:30:09 2016 From: wangq1979 at outlook.com (WangQ) Date: Sun, 3 Jan 2016 06:30:09 +0800 Subject: [vtkusers] how to derive vtkPloyDataAlgorithm class In-Reply-To: <1451736683188-5735730.post@n5.nabble.com> References: , <1451736683188-5735730.post@n5.nabble.com> Message-ID: Dear Norman, Thanks for the explanation. Please allow me sometime to digest, and I will get back to here if anything get me confused. Regards, Chiang > Date: Sat, 2 Jan 2016 05:11:23 -0700 > From: juch at zhaw.ch > To: vtkusers at vtk.org > Subject: Re: [vtkusers] how to derive vtkPloyDataAlgorithm class > > Hi Chiang > > Happy new year to you too. > > I'd go by example. Have a look at vtkClipPolyData.cxx, which derives from > vtkPolyDataAlgorithm. In essence, only vtkPolyDataAlgorithm::RequestData() > has to be overridden by the subclass, that's where all the functionality of > an algorithm is supposed to go. > > The input and output data is contained in generic containers that are passed > as function arguments. > > > inputVector represents what you feed to the algorithm, typically by using > vtkAlgorithm::SetInputConnection(), vtkAlgorithm::SetInputData(), > vtkAlgorithm::GetOutputPort(), etc. You are supposed to access the data in > the following way. > > > You have the chance to notify the progress by calling > vtkAlgorithm::UpdateProgress(). > You can check if the user requested the termination of an algorithm by > checking the value of vtkAlgorithm::GetAbortExecute(). > > Besides that, make sure to first carefully read through the documentation of > vtkPolyDataAlgorithm > and > vtkAlgorithm . > The implementation of the vtkAlgorithm.cxx > > and vtkPolyDataAlgorithm.cxx > > may also serve as reference. > > I hope this helped. > Norman > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/how-to-derive-vtkPloyDataAlgorithm-class-tp5735719p5735730.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 matthias at blaicher.com Sun Jan 3 03:07:49 2016 From: matthias at blaicher.com (Matthias Blaicher) Date: Sun, 3 Jan 2016 09:07:49 +0100 Subject: [vtkusers] Success: Building VTK 7.0.0rc1 for Anaconda 3.5 Message-ID: <5688D6D5.4060002@blaicher.com> Hi all, I'd like to provide a short report on a successful compilation of VTK 7.0.0rc1 for Anaconda 3.5 on Windows 10, including the conda build script. Hopefully it is a good starting point for others to improve upon. You will need: - Anaconda Python 3.5 - Visual Studio 2015 Community edition to compile against Python 3.5 (about 10GB of Download. It's unbelievable... But there is no other matching version of the compiler on the interwebs. You'll get SQL Server for free...) - conda-build installed, see [1] The build files are attached to this mail, a simple conda build should suffice to give you working vtk in python 3.5. Alternatively, I've also uploaded the resulting binary to my server [2], if you so choose to trust my binaries ;-). Install it simply with conda install. Potentially, the script should also work for OSX and Linux, I'd be happy to get feedback on this. Very best, Matthias [1] http://conda.pydata.org/docs/building/recipe.html [2] http://static.blaicher.com/msc/vtk/vtk-7.0.0.rc1-py35_1.tar.bz2 -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_conda.zip Type: application/zip Size: 2944 bytes Desc: not available URL: From goretzki.imre at gmail.com Sun Jan 3 06:28:54 2016 From: goretzki.imre at gmail.com (Imre Goretzki) Date: Sun, 3 Jan 2016 12:28:54 +0100 Subject: [vtkusers] method to extract regions In-Reply-To: References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> <5687F40B.20100@gmail.com> <56881AF2.8080806@gmail.com> <568825E1.8070902@gmail.com> <56882DB0.2080509@gmail.com> Message-ID: <568905F6.3050408@gmail.com> Hi David, is it possible to connect the vtkImageConnectivityFilter to other filters of VTK that do not have vtkImageData as output? I have a pipleline that creates vtkPolyData as output, so I cannot use your filter directly. Using this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData creates one single region. I printed the number of regions and the size by s = c->GetExtractedRegionSizes(); for (int i = 0; i < c->GetNumberOfExtractedRegions(); i++) { cout << "num: " << c->GetNumberOfExtractedRegions() << endl; //1 cout << "size: " << s->GetTuple1(i); //1.27008e+07 } - Imre Am 02.01.2016 um 21:45 schrieb David Gobbi: > On Sat, Jan 2, 2016 at 1:06 PM, Imre Goretzki > wrote: > > > Yes they can be partially outside the mask because I neither know > the sizes and locations of the regions I want to keep nor the > sizes and locations of the regions I want to discard for both > input image and mask image (the mask changes dynamically) > > Ok so in later progress I could use the mask as the second input > (the stencil) and this removes the regions? > > > The vtkImageConnectivityFilter ignores any pixels that are outside the > stencil (so that might be the reverse of what you want, since you want > to ignore the regions that are inside your mask). > > If a region is partly outside the stencil, then only the part that is > outside will be ignored. The rest would be counted. As far as I > understand, that is not what you want. You would want the entire > region to be ignored, right? > > Is there any reason that you even need a "mask"? Would it be just as > good if you could specify the unwanted regions by giving just one > point in each unwanted region, i.e. the user would use the mouse to > click on the unwanted regions? > > Actually, instead of using an input mask, it seems that it would be > best to allow vtkImageConnectivityFilter to assign a different label > value to each region. Then, once you know which labels correspond to > which regions, you could pass this label image through a lookup table > that colors all of the unwanted regions black. > > - David > > > My current code lets me get the regions I want to discard by > storing the polydata output of vtkPolyDataConnectivityFilter and > then iterate over the cells and their points > > for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) > { > vtkSmartPointer extractRegionData = > vtkSmartPointer::New(); //fast > extractFilter->InitializeSpecifiedRegionList(); //fast > extractFilter->AddSpecifiedRegion(i); //fast > extractFilter->Modified(); //fast > extractFilter->Update(); //very long > extractRegionData->DeepCopy(extractFilter->GetOutput()); //fast > regionList.push_back(extractRegionData); //fast > } > for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) > { > // some other operations > } > > The update() process takes a very long time. As an example, if I > have about 200 regions, this would take about 10 minutes. All > other following operations on the data and/or a > vtkPolyDataConnectivityFilter do not take so long. > > - Imre > > > Am 02.01.2016 um 20:48 schrieb David Gobbi: >> Thanks, that helps. Here is my understanding so far: >> >> 1) The mask is, originally, a polydata contour. >> 2) The mask indicates the regions you do not want. >> 3) The mask will be converted into a binary image before use. >> >> What I still need to know is: >> >> 3) Will some regions be partially within and partially outside >> the mask? Or will they always be entirely within or entirely >> outside? >> >> The vtkImageConnectivityFilter takes two inputs: the first input >> is just an image (of course) and the second input (which is >> optional) is an image stencil (essentially a binary image). >> There is a filter called vtkPolyDataToImageStencil which can be >> used create this second input from a vtkPolyData object. >> >> - David >> >> >> On Sat, Jan 2, 2016 at 12:32 PM, Imre Goretzki >> > wrote: >> >> I've drawn another image you could look at. The left image is >> the input data from which I would like to extract the >> regions. Here every region I would like to keep is painted >> green. The other two regions, that are painted red, have >> points that are located inside a region in the binary mask. >> >> >> For all points /P/ in all regions /R/ of image 1 with binary >> mask /B/ >> >> If B_P == 255 >> color region /R/ red >> else >> color region /R/ green >> >> - Imre >> >> >> Am 02.01.2016 um 20:16 schrieb David Gobbi: >>> Sorry, but I still don't follow your explanation. I have >>> some vague idea of what you are trying to do, but I don't >>> understand well enough to give you any concrete advice. Can >>> you try focussing on just one specific aspect of the >>> problem, and then once I've understood that one aspect, we >>> can move forward from there? >>> >>> - David >>> >>> On Sat, Jan 2, 2016 at 11:46 AM, Imre Goretzki >>> > >>> wrote: >>> >>> Mh ok, I guess I did not explained my problem well enough. >>> >>> The vtkPolyDataConnectivityFilter returns regions, >>> either the largest, specified, seeded or all regions >>> (your filter returns largest, seeded or all). I'm >>> interessted in the following: >>> >>> - all regions >>> - specified regions. >>> >>> The problem is not the filter, the performance or >>> possible memory leaks, I need the region's polydata >>> representation because I have a second object >>> (vtkImageData or vtkPolyData, binary mask) that has some >>> additional information, that are not represented by the >>> data (the input for the vtkImageConnectivityFilter). >>> >>> Imagine the input for the filter as image 1 and the mask >>> as image 2. Both images have the same dimensions in all >>> 3 directions (x, y, z) but contain different information. >>> >>> image 2 will be transformed to a binary image mask >>> >>> from image 1 i need to extract regions, but if some >>> (unknown) regions have points that are located in the >>> binary image mask, I do not want these regions to be >>> contained in the extracted region list. >>> >>> So it's not about your filter or the performance, but I >>> have some problems using this filter for my issue, >>> because I cannot reach the region's polydata. >>> >>> I hope this helps. >>> >>> - Imre >>> >>> >>> Am 02.01.2016 um 18:54 schrieb David Gobbi: >>>> Hi Imre, Happy New Year! >>>> >>>> I've read your email few times, and I feel that I must >>>> be missing some important because there are several >>>> things that I don't understand about it. >>>> >>>> The vtkImageConnectivityFilter is essentially just a >>>> connected component filter. In the output of this >>>> filter, all pixels outside the mask will be colored >>>> black (they will have a value of zero). So what I don't >>>> understand about your email is why you say that >>>> non-rectangular regions are a problem. Are you just >>>> worried about the wasted memory? >>>> >>>> - David >>>> >>>> >>>> On Sat, Jan 2, 2016 at 9:00 AM, Imre Goretzki >>>> >>> > wrote: >>>> >>>> Hey David, >>>> >>>> first of all: Happy new year :) >>>> >>>> I have some questions about your filter. First of >>>> all in part A of the attached image, is my >>>> understanding of extents, so if you have a region, >>>> you will get the x_min/x_max, y_min/y_max (and >>>> z_min/z_max for 3D). If you do not have rectangular >>>> regions than you could have some problems (see part >>>> A and B). In part B you see my mask. The red >>>> rectangle shows the case that the 4 corners of a 2D >>>> region cannot be directly checked, because the >>>> region that lies within this rectangle has little >>>> matches with the mask (none of the 4 corners are >>>> within the mask). The green rectangle has 3 out of >>>> 4 edges that lie within the mask. >>>> >>>> Part C shows one of the worst cases of this >>>> approach (using extents) because there is so much >>>> space that does not belong to the actual region. >>>> >>>> My question: Is it possible to extend your filter >>>> to directly store the region data (for each region, >>>> for example as vtkImageData) if the extraction mode >>>> is set to "All"? >>>> >>>> - Imre >>>> >>>> >>>> Am 29.12.2015 um 13:27 schrieb Imre Goretzki: >>>>> Hi David, >>>>> >>>>> thank you. I'll take a look at your class. >>>>> >>>>> Regards >>>>> Imre >>>>> >>>>> Am 29.12.2015 um 13:07 schrieb David Gobbi: >>>>>> Hi Imre, >>>>>> >>>>>> I have a connectivity filter that works directly >>>>>> on images, it can label connected regions >>>>>> according to size and it should be much faster >>>>>> (probably 1000x) than doing voxel checks via >>>>>> polydata: >>>>>> https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h >>>>>> I'll probably be contributing this filter to VTK >>>>>> sometime in the near future. >>>>>> >>>>>> - David >>>>>> >>>>>> >>>>>> On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki >>>>>> >>>>> > wrote: >>>>>> >>>>>> Is there an easier way in ITK? >>>>>> >>>>>> Thanks >>>>>> Imre >>>>>> >>>>>> >>>>>> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >>>>>>> Hey guys, >>>>>>> >>>>>>> I use the vtkPolyDataConnectivityFilter from >>>>>>> polydata to extract several different and >>>>>>> more or less unknown regions. >>>>>>> My problem is that I want to extract regions >>>>>>> from this filter, but if I do this, the >>>>>>> update process for all regions takes up to >>>>>>> 10minutes: >>>>>>> >>>>>>> filter->SetExtractionModeToAllRegions(); >>>>>>> filter->Update(); >>>>>>> ... >>>>>>> >>>>>>> for (int i = 0; i < >>>>>>> filter->GetNumberOfExtractedRegions(); i++) >>>>>>> { >>>>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>>>> extractFilter->AddSpecifiedRegion(i); >>>>>>> extractFilter->Modified(); >>>>>>> extractFilter->Update(); >>>>>>> extractRegionData->DeepCopy(extractFilter->GetOutput()); >>>>>>> } >>>>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>>>> >>>>>>> Background for this: I want to use the >>>>>>> points of each region to check whether they >>>>>>> lie within an object in my binary >>>>>>> mask image. So the pipeline would be like this: >>>>>>> >>>>>>> 1) Get all Regions >>>>>>> 2) get region /i/ >>>>>>> 3) get points of region /i/ >>>>>>> 4) check if point /j/ lies within the binary >>>>>>> mask /B/ (/B/_/j/ == 255) >>>>>>> 4a) if true then add region to the >>>>>>> extractFilter and break (-> next region /i/) >>>>>>> 4b) if false then continue with next point /j/ >>>>>>> 5) Mark all regions red (done easily) >>>>>>> 6) Mark some regions green that are above a >>>>>>> specific size (can be accessed with >>>>>>> filter->GetRegionSizes() ) >>>>>>> 7) Mark some regions yellow (the regions >>>>>>> that are extracted during step 1-4a) >>>>>>> >>>>>>> I do not know if the >>>>>>> PolyDataConnectivityFilter is the right >>>>>>> class for this, I think it is. >>>>>>> If I store the extractRegionData in a >>>>>>> vector, all regions have the same number of >>>>>>> points (which is kind of strange) but >>>>>>> different number of cells (region size == >>>>>>> number of cells is correct). >>>>>>> >>>>>>> I would now try to get the points from the >>>>>>> cells and check the binary mask, because the >>>>>>> >>>>>>> vtkPolyData->GetNumberOfPoints() >>>>>>> >>>>>>> and >>>>>>> >>>>>>> vtkPolyData->GetPoint(pointCounter, point); >>>>>>> >>>>>>> are not working correctly in this scenario >>>>>>> (all regions are extracted because every >>>>>>> single region has every point? >>>>>>> i did not verify my guess but I think there >>>>>>> would be the problem) >>>>>>> >>>>>>> The binary mask is a vtkImageData, that >>>>>>> could be transformed to vtkPolyData. >>>>>>> The input image (already filtered with >>>>>>> vtkMarchingCubes) and the binary mask have >>>>>>> the same dimensions (x,y,z). >>>>>>> >>>>>>> I hope you can imagine what I'm trying to do >>>>>>> and have some tips for me, if my approach is >>>>>>> correct. >>>>>>> >>>>>>> Regards >>>>>>> Imre >>>>>> >>>> >>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid_dulman at yahoo.co.uk Sun Jan 3 08:53:05 2016 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Sun, 3 Jan 2016 13:53:05 +0000 (UTC) Subject: [vtkusers] Success: Building VTK 7.0.0rc1 for Anaconda 3.5 References: <393676973.9479178.1451829185794.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <393676973.9479178.1451829185794.JavaMail.yahoo@mail.yahoo.com> I built VTK 7.0. RC1 with Qt 5.6.0, Python 2.7.11, TCl/Tk 8.6.3 in windows 10 with VC 2015 too -------------------------------------------- On Sun, 1/3/16, Matthias Blaicher wrote: Subject: [vtkusers] Success: Building VTK 7.0.0rc1 for Anaconda 3.5 To: vtkusers at vtk.org Received: Sunday, January 3, 2016, 10:07 AM Hi all, I'd like to provide a short report on a successful compilation of VTK 7.0.0rc1 for Anaconda 3.5 on Windows 10, including the conda build script. Hopefully it is a good starting point for others to improve upon. You will need: - Anaconda Python 3.5 - Visual Studio 2015 Community edition to compile against Python 3.5 ???(about 10GB of Download. It's unbelievable... But there is no other ? ? matching version of the compiler on the interwebs. You'll get SQL ? ? Server for free...) - conda-build installed, see [1] The build files are attached to this mail, a simple conda build should suffice to give you working vtk in python 3.5. Alternatively, I've also uploaded the resulting binary to my server [2], if you so choose to trust my binaries ;-). Install it simply with conda install. Potentially, the script should also work for OSX and Linux, I'd be happy to get feedback on this. Very best, Matthias [1] http://conda.pydata.org/docs/building/recipe.html [2] http://static.blaicher.com/msc/vtk/vtk-7.0.0.rc1-py35_1.tar.bz2 -----Inline Attachment Follows----- _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 david.gobbi at gmail.com Sun Jan 3 09:59:59 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 3 Jan 2016 07:59:59 -0700 Subject: [vtkusers] method to extract regions In-Reply-To: <568905F6.3050408@gmail.com> References: <5681B9CB.9070502@gmail.com> <5682683B.1000905@gmail.com> <56827C43.5030409@gmail.com> <5687F40B.20100@gmail.com> <56881AF2.8080806@gmail.com> <568825E1.8070902@gmail.com> <56882DB0.2080509@gmail.com> <568905F6.3050408@gmail.com> Message-ID: Hi Imre, The input that is set via SetInputConnection() must be a vtkImageData. Connected component labelling is done on this input. For examples of connected component labelling, see https://en.wikipedia.org/wiki/Connected-component_labeling There are two other inputs. The optional SetStencilConnection() input, which I mentioned in previous emails, applies a mask to the entire operation, and must be a vtkImageStencilData. The optional SetSeedConnection() input provides points to be used as seeds, and it can be anything. When seeds are used, the filter acts like a traditional flood-fill filter (i.e. it labels regions that are connected to the seed points). - David On Sun, Jan 3, 2016 at 4:28 AM, Imre Goretzki wrote: > Hi David, > > is it possible to connect the vtkImageConnectivityFilter to other filters > of VTK that do not have vtkImageData as output? > > I have a pipleline that creates vtkPolyData as output, so I cannot use > your filter directly. Using this example: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData > creates one single region. I printed the number of regions and the size by > > s = c->GetExtractedRegionSizes(); > for (int i = 0; i < c->GetNumberOfExtractedRegions(); i++) > { > cout << "num: " << c->GetNumberOfExtractedRegions() << endl; //1 > cout << "size: " << s->GetTuple1(i); //1.27008e+07 > } > > - Imre > > Am 02.01.2016 um 21:45 schrieb David Gobbi: > > On Sat, Jan 2, 2016 at 1:06 PM, Imre Goretzki > wrote: >> >> >> Yes they can be partially outside the mask because I neither know the >> sizes and locations of the regions I want to keep nor the sizes and >> locations of the regions I want to discard for both input image and mask >> image (the mask changes dynamically) >> >> Ok so in later progress I could use the mask as the second input (the >> stencil) and this removes the regions? >> > > The vtkImageConnectivityFilter ignores any pixels that are outside the > stencil (so that might be the reverse of what you want, since you want to > ignore the regions that are inside your mask). > > If a region is partly outside the stencil, then only the part that is > outside will be ignored. The rest would be counted. As far as I > understand, that is not what you want. You would want the entire region to > be ignored, right? > > Is there any reason that you even need a "mask"? Would it be just as good > if you could specify the unwanted regions by giving just one point in each > unwanted region, i.e. the user would use the mouse to click on the unwanted > regions? > > Actually, instead of using an input mask, it seems that it would be best > to allow vtkImageConnectivityFilter to assign a different label value to > each region. Then, once you know which labels correspond to which regions, > you could pass this label image through a lookup table that colors all of > the unwanted regions black. > > - David > > > > >> My current code lets me get the regions I want to discard by storing the >> polydata output of vtkPolyDataConnectivityFilter and then iterate over the >> cells and their points >> >> for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) >> { >> vtkSmartPointer extractRegionData = >> vtkSmartPointer::New(); //fast >> extractFilter->InitializeSpecifiedRegionList(); //fast >> extractFilter->AddSpecifiedRegion(i); //fast >> extractFilter->Modified(); //fast >> extractFilter->Update(); //very long >> extractRegionData->DeepCopy(extractFilter->GetOutput()); //fast >> regionList.push_back(extractRegionData); //fast >> } >> for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) >> { >> // some other operations >> } >> >> The update() process takes a very long time. As an example, if I have >> about 200 regions, this would take about 10 minutes. All other following >> operations on the data and/or a vtkPolyDataConnectivityFilter do not take >> so long. >> >> - Imre >> >> >> Am 02.01.2016 um 20:48 schrieb David Gobbi: >> >> Thanks, that helps. Here is my understanding so far: >> >> 1) The mask is, originally, a polydata contour. >> 2) The mask indicates the regions you do not want. >> 3) The mask will be converted into a binary image before use. >> >> What I still need to know is: >> >> 3) Will some regions be partially within and partially outside the mask? >> Or will they always be entirely within or entirely outside? >> >> The vtkImageConnectivityFilter takes two inputs: the first input is just >> an image (of course) and the second input (which is optional) is an image >> stencil (essentially a binary image). There is a filter called >> vtkPolyDataToImageStencil which can be used create this second input from a >> vtkPolyData object. >> >> - David >> >> >> On Sat, Jan 2, 2016 at 12:32 PM, Imre Goretzki < >> goretzki.imre at gmail.com> wrote: >> >>> I've drawn another image you could look at. The left image is the input >>> data from which I would like to extract the regions. Here every region I >>> would like to keep is painted green. The other two regions, that are >>> painted red, have points that are located inside a region in the binary >>> mask. >>> >>> >>> For all points *P* in all regions *R* of image 1 with binary mask *B* >>> >>> If B_P == 255 >>> color region *R* red >>> else >>> color region *R* green >>> >>> - Imre >>> >>> >>> Am 02.01.2016 um 20:16 schrieb David Gobbi: >>> >>> Sorry, but I still don't follow your explanation. I have some vague >>> idea of what you are trying to do, but I don't understand well enough to >>> give you any concrete advice. Can you try focussing on just one specific >>> aspect of the problem, and then once I've understood that one aspect, we >>> can move forward from there? >>> >>> - David >>> >>> On Sat, Jan 2, 2016 at 11:46 AM, Imre Goretzki < >>> goretzki.imre at gmail.com> wrote: >>> >>>> Mh ok, I guess I did not explained my problem well enough. >>>> >>>> The vtkPolyDataConnectivityFilter returns regions, either the largest, >>>> specified, seeded or all regions (your filter returns largest, seeded or >>>> all). I'm interessted in the following: >>>> >>>> - all regions >>>> - specified regions. >>>> >>>> The problem is not the filter, the performance or possible memory >>>> leaks, I need the region's polydata representation because I have a second >>>> object (vtkImageData or vtkPolyData, binary mask) that has some additional >>>> information, that are not represented by the data (the input for the >>>> vtkImageConnectivityFilter). >>>> >>>> Imagine the input for the filter as image 1 and the mask as image 2. >>>> Both images have the same dimensions in all 3 directions (x, y, z) but >>>> contain different information. >>>> >>>> image 2 will be transformed to a binary image mask >>>> >>>> from image 1 i need to extract regions, but if some (unknown) regions >>>> have points that are located in the binary image mask, I do not want these >>>> regions to be contained in the extracted region list. >>>> >>>> So it's not about your filter or the performance, but I have some >>>> problems using this filter for my issue, because I cannot reach the >>>> region's polydata. >>>> >>>> I hope this helps. >>>> >>>> - Imre >>>> >>>> >>>> Am 02.01.2016 um 18:54 schrieb David Gobbi: >>>> >>>> Hi Imre, Happy New Year! >>>> >>>> I've read your email few times, and I feel that I must be missing some >>>> important because there are several things that I don't understand about it. >>>> >>>> The vtkImageConnectivityFilter is essentially just a connected >>>> component filter. In the output of this filter, all pixels outside the >>>> mask will be colored black (they will have a value of zero). So what I >>>> don't understand about your email is why you say that non-rectangular >>>> regions are a problem. Are you just worried about the wasted memory? >>>> >>>> - David >>>> >>>> >>>> On Sat, Jan 2, 2016 at 9:00 AM, Imre Goretzki < >>>> goretzki.imre at gmail.com> wrote: >>>> >>>>> Hey David, >>>>> >>>>> first of all: Happy new year :) >>>>> >>>>> I have some questions about your filter. First of all in part A of the >>>>> attached image, is my understanding of extents, so if you have a region, >>>>> you will get the x_min/x_max, y_min/y_max (and z_min/z_max for 3D). If you >>>>> do not have rectangular regions than you could have some problems (see part >>>>> A and B). In part B you see my mask. The red rectangle shows the case that >>>>> the 4 corners of a 2D region cannot be directly checked, because the region >>>>> that lies within this rectangle has little matches with the mask (none of >>>>> the 4 corners are within the mask). The green rectangle has 3 out of 4 >>>>> edges that lie within the mask. >>>>> >>>>> Part C shows one of the worst cases of this approach (using extents) >>>>> because there is so much space that does not belong to the actual region. >>>>> >>>>> My question: Is it possible to extend your filter to directly store >>>>> the region data (for each region, for example as vtkImageData) if the >>>>> extraction mode is set to "All"? >>>>> >>>>> - Imre >>>>> >>>>> >>>>> Am 29.12.2015 um 13:27 schrieb Imre Goretzki: >>>>> >>>>> Hi David, >>>>> >>>>> thank you. I'll take a look at your class. >>>>> >>>>> Regards >>>>> Imre >>>>> >>>>> Am 29.12.2015 um 13:07 schrieb David Gobbi: >>>>> >>>>> Hi Imre, >>>>> >>>>> I have a connectivity filter that works directly on images, it can >>>>> label connected regions according to size and it should be much faster >>>>> (probably 1000x) than doing voxel checks via polydata: >>>>> >>>>> >>>>> https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h >>>>> I'll probably be contributing this filter to VTK sometime in the near >>>>> future. >>>>> >>>>> - David >>>>> >>>>> >>>>> On Tue, Dec 29, 2015 at 4:02 AM, Imre Goretzki < >>>>> goretzki.imre at gmail.com> wrote: >>>>> >>>>>> Is there an easier way in ITK? >>>>>> >>>>>> Thanks >>>>>> Imre >>>>>> >>>>>> >>>>>> Am 28.12.2015 um 23:38 schrieb Imre Goretzki: >>>>>> >>>>>> Hey guys, >>>>>> >>>>>> I use the vtkPolyDataConnectivityFilter from polydata to extract >>>>>> several different and more or less unknown regions. >>>>>> My problem is that I want to extract regions from this filter, but if >>>>>> I do this, the update process for all regions takes up to 10minutes: >>>>>> >>>>>> filter->SetExtractionModeToAllRegions(); >>>>>> filter->Update(); >>>>>> ... >>>>>> >>>>>> for (int i = 0; i < filter->GetNumberOfExtractedRegions(); i++) >>>>>> { >>>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>>> extractFilter->AddSpecifiedRegion(i); >>>>>> extractFilter->Modified(); >>>>>> extractFilter->Update(); >>>>>> extractRegionData->DeepCopy(extractFilter->GetOutput()); >>>>>> } >>>>>> extractFilter->InitializeSpecifiedRegionList(); >>>>>> >>>>>> Background for this: I want to use the points of each region to check >>>>>> whether they lie within an object in my binary >>>>>> mask image. So the pipeline would be like this: >>>>>> >>>>>> 1) Get all Regions >>>>>> 2) get region *i* >>>>>> 3) get points of region *i* >>>>>> 4) check if point *j* lies within the binary mask *B* >>>>>> (*B*_*j* == 255) >>>>>> 4a) if true then add region to the extractFilter and >>>>>> break (-> next region *i*) >>>>>> 4b) if false then continue with next point *j* >>>>>> 5) Mark all regions red (done easily) >>>>>> 6) Mark some regions green that are above a specific size (can be >>>>>> accessed with filter->GetRegionSizes() ) >>>>>> 7) Mark some regions yellow (the regions that are extracted during >>>>>> step 1-4a) >>>>>> >>>>>> I do not know if the PolyDataConnectivityFilter is the right class >>>>>> for this, I think it is. >>>>>> If I store the extractRegionData in a vector, all regions have the >>>>>> same number of points (which is kind of strange) but different number of >>>>>> cells (region size == number of cells is correct). >>>>>> >>>>>> I would now try to get the points from the cells and check the binary >>>>>> mask, because the >>>>>> >>>>>> vtkPolyData->GetNumberOfPoints() >>>>>> >>>>>> and >>>>>> >>>>>> vtkPolyData->GetPoint(pointCounter, point); >>>>>> >>>>>> are not working correctly in this scenario (all regions are extracted >>>>>> because every single region has every point? >>>>>> i did not verify my guess but I think there would be the problem) >>>>>> >>>>>> The binary mask is a vtkImageData, that could be transformed to >>>>>> vtkPolyData. >>>>>> The input image (already filtered with vtkMarchingCubes) and the >>>>>> binary mask have the same dimensions (x,y,z). >>>>>> >>>>>> I hope you can imagine what I'm trying to do and have some tips for >>>>>> me, if my approach is correct. >>>>>> >>>>>> Regards >>>>>> Imre >>>>>> >>>>>> >>>> >>>> >>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paulo.waelkens at gmail.com Sun Jan 3 12:26:37 2016 From: paulo.waelkens at gmail.com (Paulo Waelkens) Date: Sun, 3 Jan 2016 18:26:37 +0100 Subject: [vtkusers] VTK with NVidia Optimus In-Reply-To: References: Message-ID: Hi Chiang, I also found this video, but my BIOS does look different. Apparently my laptop has a hybrid graphics with a dynamic switching model ( https://wiki.archlinux.org/index.php/Hybrid_graphics), meaning it is impossible to disable the IGP, since the IGP's framebuffer provides the only interface to the screen. The discrete GPU, when in use, will write its output to the IGP's framebuffer. In the coming days I'll try writing a "pure" OpenGL win32 application (i.e. a program that uses the window manager of the OS, unlike a console application), and try out the solutions nvidia gives in the OptimusRenderingPolicies. I suspect the real problem is that I'm starting all the rendering stuff from a console application (i.e. not a win32 application, that explicitly uses the window manager of the OS). *Maybe* the optimus driver always assigns the IGP to console applications, since in windows you would usually create a win32 application if you wanted to do rendering. To test this I'll do the following: - create a win32 application with simple OpenGL code (e.g. draw a sphere) => play with nvidia settings until it uses the discrete GPU. This should work, I hope - create a console application, that links to a dll with OpenGL code, that draws a sphere => this is basically analogous to what VTK is doing in my application right now. I get the feeling, this will always default to the IGP - create a win32 application, that links to the same OpenGL dll => if I get this to work with the discrete GPU, this is the solution! I'm no OpenGL expert though; maybe what I'm planning here is not possible. Guess I'll find out =D Cheers, Paulo On 2 January 2016 at 03:54, WangQ wrote: > Hi Paulo, > > Not sure about alienware, but my m4700 is able to disable IGP through bios > setting. I always switch it off since I need CUDA, and my opengl code works > well when the IGP is switched off. But i did not try the suggestion in WP. > > I just googled it and found this > https://www.youtube.com/watch?v=HuqyR-496Sw > > Check it to see if you are luck. > > Cheers, > > Chiang > > ------------------------------ > Date: Sat, 2 Jan 2016 00:02:01 +0100 > Subject: Re: [vtkusers] VTK with NVidia Optimus > From: paulo.waelkens at gmail.com > To: wangq1979 at outlook.com > CC: vtkusers at vtk.org > > > Dear Chiang, > thank you for your suggestion. It is not possible to disable the IGP in > the BIOS of my laptop (Alienware17 r3), even after getting the newest BIOS > from dell. I *guess* this means the laptop does not have a hardware > multiplexer(?), whilst your M4700 has one(?). So this approach won't work, > I think. > Did you perhaps try the programmatic solutions suggested by nvidia (e.g. > NvOptimusEnablement export thing) when doing your OpenGL programming? > Thanks! Regards, > Paulo > > On 1 January 2016 at 19:54, WangQ wrote: > > > Hi, > > You may try disabling optimus in bios setting to see if works. At least > this works with my DELL M4700 and direct opengl programming. Not 100% sure > whether for VTK. > > Cheers, > > Chiang > ------------------------------ > Date: Fri, 1 Jan 2016 18:42:17 +0100 > From: paulo.waelkens at gmail.com > To: vtkusers at vtk.org > Subject: [vtkusers] VTK with NVidia Optimus > > Dear all, > > I'm trying to get my VTK 6.3 application to use the NVidia GPU on my > laptop. The laptop (Dell Alienware) combines an intel HD530 with an Nvidia > GTX970m using the NVidia Optimus technology. At the moment, my application > always uses the integrated GPU, which is slow and horrible. Did any of you > figure out how to make the NVidia Optimus driver choose the discrete GPU > instead??? The laptop uses the discrete GPU for games, so it's not a > hardware problem, I'd say. > > NOTE: I have both the latest intel and nvidia GPU drivers, and installed > the intel driver first (as suggested somewhere). I've built VTK 6.3 with > shared libraries and using the OpenGL2 flag. > > I've followed the solutions described by nvidia, without success: > > http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf > - set the discrete GPU as the "Preferred graphics processor" => no effect > - adding this line to my main.cpp > extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; > } //=>no effect > > To check if the discrete GPU is being used, I use the GPU activity icon of > the nvidia control panel ( > http://acer--uk.custhelp.com/app/answers/detail/a_id/9075/~/determining-which-graphics-card-is-used-with-nvidia-optimus). > The icon does work correctly, since it shows activity when games are > running (e.g. Starcraft 2). > > I figured maybe I need to add the *extern "C" { _declspec(dllexport) > DWORD NvOptimusEnablement = 0x00000001; }* line in the VTK source code > somewhere. This is a bit of a wild guess, but maybe, since I'm linking to > VTK dynamically, all the OpenGL stuff is done withing the VTK dll > boundaries, so NVidia Optimus needs a hint from VTK, not from my (console) > application that uses VTK. > > I'm really running out of tricks here, and was wondering if one of you > knows how to proceed. > Thanks! > > _______________________________________________ Powered by www.kitware.com > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html Please keep messages > on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 mcragun at gmail.com Sun Jan 3 14:24:57 2016 From: mcragun at gmail.com (Matthew Cragun) Date: Sun, 3 Jan 2016 13:24:57 -0600 Subject: [vtkusers] VtK 7, python3.4 build error In-Reply-To: References: Message-ID: David, thanks for the response. To provide some additional information, I have tried using python3.5 binaries straight off of python.org as wells as my anaconda installation. Both give me the same error. The variables I have set using ccmake and standard python are: PYTHON_EXECUTABLE = /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 PYTHON_INCLUDE_DIR = /Library/Frameworks/Python.framework/Versions/3.5/python3.5m PYTHON_LIBRARY = /Library/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5.dylib The contents of the lib folder are: libformw.5.dylib libmenuw.5.dylib libncursesw.5.dylib libpanelw.5.dylib libpython3.5.dylib pkgconfig libformw.dylib libmenuw.dylib libncursesw.dylib libpanelw.dylib libpython3.5m.dylib python3.5 Thanks, Matt On Fri, Jan 1, 2016 at 11:19 PM, David Gobbi wrote: > Hi Matthew, > > No, there aren't pre-build binaries with python 3. I don't think that is > planned for this release. > > I've been doing my OS X builds with the python binary packages from > python.org, so I know that those, at least, should work. > > Can you give me some details about the python you are using? > Specifically, can you tell me what the contents of the library directory ( > /Users/mcragun/anaconda/envs/py3k/lib/) are? > > Also, in the CMakeCache.txt, can you give me the values > of PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR, and PYTHON_LIBRARY? > > For my build against the python.org binaries, VTK found the following: > > > PYTHON_EXECUTABLE:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 > > PYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.4/Headers/ > > PYTHON_LIBRARY:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib > > Obviously the locations will be different for Anaconda, but I just wanted > to give you an example of how these variables can be set. > > - David > > On Fri, Jan 1, 2016 at 9:45 PM, Matthew Cragun wrote: > >> I am having trouble building VTK 7 with Python 3.4 on OS X 10.11 . >> Everything goes well for the first 99% of the process, however at the end, >> I get this error: >> >> [ 99%[ Building CXX object >> Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o >> make[2]: *** No rule to make target >> `/Users/mcragun/anaconda/envs/py3k/lib/libpython3.4.dylib', needed by >> `bin/vtkpython'. Stop. >> make[2]: *** Waiting for unfinished jobs.... >> In file included from >> /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29: >> /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:119:3: >> error: no matching function >> for call to 'PyImport_AppendInittab' >> PyImport_AppendInittab(namevtkCommonCore, initvtkCommonCorePython); >> ^~~~~~~~~~~~~~~~~~~~~~ >> /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17: >> note: candidate function not >> viable: no known conversion from 'void ()' to 'PyObject *(*)()' for >> 2nd argument >> PyAPI_FUNC(int) PyImport_AppendInittab( >> ^ >> In file included from >> /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29: >> /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:122:3: >> error: no matching function >> for call to 'PyImport_AppendInittab' >> PyImport_AppendInittab(namevtkCommonMath, initvtkCommonMathPython); >> ^~~~~~~~~~~~~~~~~~~~~~ >> >> Similar errors are repeated until... >> >> ^~~~~~~~~~~~~~~~~~~~~~ >> /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17: >> note: candidate function not >> viable: no known conversion from 'void ()' to 'PyObject *(*)()' for >> 2nd argument >> PyAPI_FUNC(int) PyImport_AppendInittab( >> ^ >> fatal error: too many errors emitted, stopping now [-ferror-limit=] >> 20 errors generated. >> make[2]: *** >> [Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o] Error 1 >> make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2 >> make: *** [all] Error 2 >> >> Any thoughts on what I missed? Are there pre-built binaries with python >> 3 for OS X? >> >> Thanks, >> >> Matt >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Jan 3 14:42:29 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 3 Jan 2016 12:42:29 -0700 Subject: [vtkusers] VtK 7, python3.4 build error In-Reply-To: References: Message-ID: Hi Matthew, Try pointing PYTHON_LIBRARY to libpython3.5m.dylib instead, and likewise point PYTHON_EXECUTABLE to python3.5m. The suffix (in this case "m") should be the same for the lib, the include dir, and the executable. The three suffixes for python are "m" (pymalloc), "d" (pydebug), and "u" (wide unicode). These suffixes reflect the build options for the python package. I did build VTK against python 3.5 on OS X a few months ago, when Python 3.5 was first released, and I did not encounter any problems. I can do it again tomorrow with the latest package to see if anything has changed. - David On Sun, Jan 3, 2016 at 12:24 PM, Matthew Cragun wrote: > David, > > thanks for the response. > > To provide some additional information, I have tried using python3.5 > binaries straight off of python.org as wells as my anaconda > installation. Both give me the same error. > > The variables I have set using ccmake and standard python are: > > > PYTHON_EXECUTABLE = > /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 > PYTHON_INCLUDE_DIR = > /Library/Frameworks/Python.framework/Versions/3.5/python3.5m > PYTHON_LIBRARY = > /Library/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5.dylib > > > The contents of the lib folder are: > libformw.5.dylib libmenuw.5.dylib libncursesw.5.dylib > libpanelw.5.dylib libpython3.5.dylib pkgconfig > libformw.dylib libmenuw.dylib libncursesw.dylib > libpanelw.dylib libpython3.5m.dylib python3.5 > > > Thanks, > > Matt > > On Fri, Jan 1, 2016 at 11:19 PM, David Gobbi > wrote: > >> Hi Matthew, >> >> No, there aren't pre-build binaries with python 3. I don't think that is >> planned for this release. >> >> I've been doing my OS X builds with the python binary packages from >> python.org, so I know that those, at least, should work. >> >> Can you give me some details about the python you are using? >> Specifically, can you tell me what the contents of the library directory ( >> /Users/mcragun/anaconda/envs/py3k/lib/) are? >> >> Also, in the CMakeCache.txt, can you give me the values >> of PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR, and PYTHON_LIBRARY? >> >> For my build against the python.org binaries, VTK found the following: >> >> >> PYTHON_EXECUTABLE:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 >> >> PYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.4/Headers/ >> >> PYTHON_LIBRARY:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib >> >> Obviously the locations will be different for Anaconda, but I just wanted >> to give you an example of how these variables can be set. >> >> - David >> >> On Fri, Jan 1, 2016 at 9:45 PM, Matthew Cragun wrote: >> >>> I am having trouble building VTK 7 with Python 3.4 on OS X 10.11 . >>> Everything goes well for the first 99% of the process, however at the end, >>> I get this error: >>> >>> [ 99%[ Building CXX object >>> Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o >>> make[2]: *** No rule to make target >>> `/Users/mcragun/anaconda/envs/py3k/lib/libpython3.4.dylib', needed by >>> `bin/vtkpython'. Stop. >>> make[2]: *** Waiting for unfinished jobs.... >>> In file included from >>> /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29: >>> /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:119:3: >>> error: no matching function >>> for call to 'PyImport_AppendInittab' >>> PyImport_AppendInittab(namevtkCommonCore, initvtkCommonCorePython); >>> ^~~~~~~~~~~~~~~~~~~~~~ >>> /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17: >>> note: candidate function not >>> viable: no known conversion from 'void ()' to 'PyObject *(*)()' >>> for 2nd argument >>> PyAPI_FUNC(int) PyImport_AppendInittab( >>> ^ >>> In file included from >>> /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29: >>> /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:122:3: >>> error: no matching function >>> for call to 'PyImport_AppendInittab' >>> PyImport_AppendInittab(namevtkCommonMath, initvtkCommonMathPython); >>> ^~~~~~~~~~~~~~~~~~~~~~ >>> >>> Similar errors are repeated until... >>> >>> ^~~~~~~~~~~~~~~~~~~~~~ >>> /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17: >>> note: candidate function not >>> viable: no known conversion from 'void ()' to 'PyObject *(*)()' >>> for 2nd argument >>> PyAPI_FUNC(int) PyImport_AppendInittab( >>> ^ >>> fatal error: too many errors emitted, stopping now [-ferror-limit=] >>> 20 errors generated. >>> make[2]: *** >>> [Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o] Error 1 >>> make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2 >>> make: *** [all] Error 2 >>> >>> Any thoughts on what I missed? Are there pre-built binaries with python >>> 3 for OS X? >>> >>> Thanks, >>> >>> Matt >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeanmichael.celerier at gmail.com Sun Jan 3 17:22:18 2016 From: jeanmichael.celerier at gmail.com (=?UTF-8?Q?Jean=2DMicha=C3=ABl_Celerier?=) Date: Sun, 3 Jan 2016 23:22:18 +0100 Subject: [vtkusers] GraphicsView example crashes on start Message-ID: Hello, When I build and run the Qt GraphicsView example, I get the following stack trace : #0 0x0000000000ad53a8 in ?? () #1 0x00007ffff72ac3e3 in QVTKGraphicsItem::MakeCurrent() () from /usr/lib/libvtkGUISupportQtOpenGL.so.1 #2 0x00007ffff021a31a in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5 #3 0x00007ffff1041d67 in ?? () from /usr/lib/libvtkGUISupportQt.so.1 #4 0x00007ffff102c96c in ?? () from /usr/lib/libvtkGUISupportQt.so.1 #5 0x00007fffe8cc2049 in vtkCallbackCommand::Execute(vtkObject*, unsigned long, void*) () from /usr/lib/libvtkCommonCore.so.1 #6 0x00007fffe8e1ad19 in ?? () from /usr/lib/libvtkCommonCore.so.1 #7 0x00007ffff5df60a1 in vtkRenderView::UpdateHoverWidgetState() () from /usr/lib/libvtkViewsInfovis.so.1 #8 0x00007ffff5df5b2f in vtkRenderView::PrepareForRendering() () from /usr/lib/libvtkViewsInfovis.so.1 #9 0x00007ffff5df5c97 in vtkRenderView::Render() () from /usr/lib/libvtkViewsInfovis.so.1 #10 0x00007ffff5df900c in vtkRenderView::ProcessEvents(vtkObject*, unsigned long, void*) () from /usr/lib/libvtkViewsInfovis.so.1 #11 0x00007fffe8e1ad19 in ?? () from /usr/lib/libvtkCommonCore.so.1 #12 0x00007ffff72ac6f8 in QVTKGraphicsItem::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) () from /usr/lib/libvtkGUISupportQtOpenGL.so.1 #18 0x00007ffff0e32677 in QGraphicsView::paintEvent(QPaintEvent*) () from /usr/lib/libQt5Widgets.so.5 (I can put the rest of the stack trace but only this seems relevant to me). Any idea of what's wrong ? Qt 5.5.1 on x64 linux. Best regards Jean-Micha?l -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangq1979 at outlook.com Sun Jan 3 19:57:03 2016 From: wangq1979 at outlook.com (WangQ) Date: Mon, 4 Jan 2016 08:57:03 +0800 Subject: [vtkusers] VTK with NVidia Optimus In-Reply-To: References: , , , , Message-ID: Hi Paulo, It is quite strange. Suppose to have hard or soft trigger for graphic card switch. You may also try a simple CUDA program to see if the dedicated graphic card is used. If you get CUDA installed, there is an example about cuda with opengl rendering. If successfully executed, the dedicated one should be used. Cheers, Chiang Date: Sun, 3 Jan 2016 18:26:37 +0100 Subject: Re: [vtkusers] VTK with NVidia Optimus From: paulo.waelkens at gmail.com To: wangq1979 at outlook.com CC: vtkusers at vtk.org Hi Chiang,I also found this video, but my BIOS does look different. Apparently my laptop has a hybrid graphics with a dynamic switching model (https://wiki.archlinux.org/index.php/Hybrid_graphics), meaning it is impossible to disable the IGP, since the IGP's framebuffer provides the only interface to the screen. The discrete GPU, when in use, will write its output to the IGP's framebuffer.In the coming days I'll try writing a "pure" OpenGL win32 application (i.e. a program that uses the window manager of the OS, unlike a console application), and try out the solutions nvidia gives in the OptimusRenderingPolicies. I suspect the real problem is that I'm starting all the rendering stuff from a console application (i.e. not a win32 application, that explicitly uses the window manager of the OS). *Maybe* the optimus driver always assigns the IGP to console applications, since in windows you would usually create a win32 application if you wanted to do rendering. To test this I'll do the following:- create a win32 application with simple OpenGL code (e.g. draw a sphere) => play with nvidia settings until it uses the discrete GPU. This should work, I hope- create a console application, that links to a dll with OpenGL code, that draws a sphere => this is basically analogous to what VTK is doing in my application right now. I get the feeling, this will always default to the IGP- create a win32 application, that links to the same OpenGL dll => if I get this to work with the discrete GPU, this is the solution! I'm no OpenGL expert though; maybe what I'm planning here is not possible. Guess I'll find out =D Cheers,Paulo On 2 January 2016 at 03:54, WangQ wrote: Hi Paulo, Not sure about alienware, but my m4700 is able to disable IGP through bios setting. I always switch it off since I need CUDA, and my opengl code works well when the IGP is switched off. But i did not try the suggestion in WP. I just googled it and found this https://www.youtube.com/watch?v=HuqyR-496Sw Check it to see if you are luck. Cheers, Chiang Date: Sat, 2 Jan 2016 00:02:01 +0100 Subject: Re: [vtkusers] VTK with NVidia Optimus From: paulo.waelkens at gmail.com To: wangq1979 at outlook.com CC: vtkusers at vtk.org Dear Chiang,thank you for your suggestion. It is not possible to disable the IGP in the BIOS of my laptop (Alienware17 r3), even after getting the newest BIOS from dell. I *guess* this means the laptop does not have a hardware multiplexer(?), whilst your M4700 has one(?). So this approach won't work, I think. Did you perhaps try the programmatic solutions suggested by nvidia (e.g. NvOptimusEnablement export thing) when doing your OpenGL programming? Thanks! Regards,Paulo On 1 January 2016 at 19:54, WangQ wrote: Hi,You may try disabling optimus in bios setting to see if works. At least this works with my DELL M4700 and direct opengl programming. Not 100% sure whether for VTK.Cheers,ChiangDate: Fri, 1 Jan 2016 18:42:17 +0100 From: paulo.waelkens at gmail.com To: vtkusers at vtk.org Subject: [vtkusers] VTK with NVidia Optimus Dear all, I'm trying to get my VTK 6.3 application to use the NVidia GPU on my laptop. The laptop (Dell Alienware) combines an intel HD530 with an Nvidia GTX970m using the NVidia Optimus technology. At the moment, my application always uses the integrated GPU, which is slow and horrible. Did any of you figure out how to make the NVidia Optimus driver choose the discrete GPU instead??? The laptop uses the discrete GPU for games, so it's not a hardware problem, I'd say. NOTE: I have both the latest intel and nvidia GPU drivers, and installed the intel driver first (as suggested somewhere). I've built VTK 6.3 with shared libraries and using the OpenGL2 flag. I've followed the solutions described by nvidia, without success:http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf- set the discrete GPU as the "Preferred graphics processor" => no effect- adding this line to my main.cppextern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; } //=>no effect To check if the discrete GPU is being used, I use the GPU activity icon of the nvidia control panel (http://acer--uk.custhelp.com/app/answers/detail/a_id/9075/~/determining-which-graphics-card-is-used-with-nvidia-optimus). The icon does work correctly, since it shows activity when games are running (e.g. Starcraft 2). I figured maybe I need to add the extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; } line in the VTK source code somewhere. This is a bit of a wild guess, but maybe, since I'm linking to VTK dynamically, all the OpenGL stuff is done withing the VTK dll boundaries, so NVidia Optimus needs a hint from VTK, not from my (console) application that uses VTK. I'm really running out of tricks here, and was wondering if one of you knows how to proceed.Thanks! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 andrew.buckler at elucidbio.com Sun Jan 3 20:54:33 2016 From: andrew.buckler at elucidbio.com (Andrew J. Buckler (Elucid Bioimaging)) Date: Mon, 4 Jan 2016 01:54:33 +0000 Subject: [vtkusers] How avoid QVTKWidget crash on exit In-Reply-To: References: Message-ID: Hello, I have an application of QVTKWidget running nicely on a Mac, but when I ported it to Windows (after much effort to get everything to build cleanly!) I get: ERROR: In VTK-6.3.0\Rendering\OpenGL\vtkWin32OpenGLRenderWindow.cxx, line 270 vtkWin32OpenGLRenderWindow (0000003B20C1B720): wglMakeCurrent failed in MakeCurrent(), error: The requested resource is in use. >From the name, this module isn't even used in the Mac stack; so: why is it needed? How can the error be fixed? Thank you, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From amit112amit at yahoo.co.in Mon Jan 4 04:30:24 2016 From: amit112amit at yahoo.co.in (amit112amit) Date: Mon, 4 Jan 2016 02:30:24 -0700 (MST) Subject: [vtkusers] Unable to read all scalars from Cell Data in a VTK file In-Reply-To: <1451638532864-5735720.post@n5.nabble.com> References: <1451638532864-5735720.post@n5.nabble.com> Message-ID: <1451899824043-5735754.post@n5.nabble.com> I think I figured out my problem. My LEGACY VTK file structure looked like following: ************ File starts ******************* # vtk DataFile Version 2.0 Test example ASCII DATASET POLYDATA POINTS 3 double ... POLYGONS 1 4 ... CELL_DATA 1 SCALARS strainEnergy double 1 ... SCALARS bendingEnergy double 1 ... SCALARS curvature double 1 ... POINT_DATA 3 VECTORS displacements double ... VECTORS forces double ... *************** File Ends ************* Paraview has no problem opening this file. But when reading this file by code, we can fetch only the first scalar or vector from a cell data or point data. The same file can be restructured as follows to be able to retain all the information when reading using VTK library functions: ************** File Starts ************ # vtk DataFile Version 2.0 Test example ASCII DATASET POLYDATA POINTS 3 double ... POLYGONS 1 4 ... CELL_DATA 1 SCALARS strainEnergy double 1 ... FIELD FieldData 2 bendingEnergy 1 1 double ... curvature 1 1 double ... POINT_DATA 3 VECTORS displacements double ... FIELD FieldData 1 forces 3 1 double ... ****************** File Ends **************** What is the difference? 1. Cell data and point data can have only one active scalar or vector at a time. 2. All other scalars and vectors should be written under FIELD as field data respectively for cell and point data sections. The format is FIELD FieldData 3. Field data arrays have a name, number of components, number of tuple and data-type 4. With the corrected file format a code like polyData->GetPointData()->GetScalar() gives desired output without any loss of information. To figure it out I had to look at the source code and the data-manipulation example code from vtk documentation website was helpful. Hope this post somebody some time and effort and give some clarity about LEGACY VTK file formats. Regards, Amit -- View this message in context: http://vtk.1045678.n5.nabble.com/Unable-to-read-all-scalars-from-Cell-Data-in-a-VTK-file-tp5735720p5735754.html Sent from the VTK - Users mailing list archive at Nabble.com. From gregory.baert at inserm.fr Mon Jan 4 05:39:10 2016 From: gregory.baert at inserm.fr (Mercusyo) Date: Mon, 4 Jan 2016 03:39:10 -0700 (MST) Subject: [vtkusers] Problem with vtkInteractorStyleImage In-Reply-To: <1450771333999-5735629.post@n5.nabble.com> References: <1450771333999-5735629.post@n5.nabble.com> Message-ID: <1451903950268-5735755.post@n5.nabble.com> Hello, Thank you for your reply. Effectively, I forgot to define the macro. So the event works fine. But, I have a problem, I would like to use the "window/level" when click left on the mouse and move it to left/right/up/down ... but the window/level fonctionnality does not work ... However, I herit from "vtkInteractorStyleImage" I use DICOM files in input and C++ Builder on windows 7 system. The same code in a MS Microsoft binary file (Visual Studio 2010 C++ - 32 bits), cause "access violation" ... Best regards, -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-vtkInteractorStyleImage-tp5735629p5735755.html Sent from the VTK - Users mailing list archive at Nabble.com. From juch at zhaw.ch Mon Jan 4 06:43:43 2016 From: juch at zhaw.ch (normanius) Date: Mon, 4 Jan 2016 04:43:43 -0700 (MST) Subject: [vtkusers] Problem with vtkInteractorStyleImage In-Reply-To: <1451903950268-5735755.post@n5.nabble.com> References: <1450771333999-5735629.post@n5.nabble.com> <1451903950268-5735755.post@n5.nabble.com> Message-ID: <1451907823752-5735756.post@n5.nabble.com> Have you tried to inherit from vtkInteractorStyleTrackballCamera? This is my favourite interactor style for 3D data. I don't know vtkInteractorStyleImage that well. Does it really behave differently than described in the documentation ? Regards, Norman -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-vtkInteractorStyleImage-tp5735629p5735756.html Sent from the VTK - Users mailing list archive at Nabble.com. From gregory.baert at inserm.fr Mon Jan 4 09:49:47 2016 From: gregory.baert at inserm.fr (Mercusyo) Date: Mon, 4 Jan 2016 07:49:47 -0700 (MST) Subject: [vtkusers] Problem with vtkInteractorStyleImage In-Reply-To: <1451907823752-5735756.post@n5.nabble.com> References: <1450771333999-5735629.post@n5.nabble.com> <1451903950268-5735755.post@n5.nabble.com> <1451907823752-5735756.post@n5.nabble.com> Message-ID: <1451918987500-5735760.post@n5.nabble.com> Hello, I tried to inherit from vtkInteractorStyleTrackballCamera, this work fine like in the VTK documentation. But we would like to use the window/level functionnality in this new application. I add the ShwoMessage("bla bla bla") function in the MouseInteractorStyle1 event, the message appear correctly when I clicked on left/right buttons. However the window/level functionnality as described in the documentation does not work ... the vtkInteractorStyleImage::OnLeftButtonDown(); it seems like vtkInteractorStyleImage::OnRightButtonDown(); don't go back eventon vtkInteractorStyleImage class. class MouseInteractorStyle1 : public vtkInteractorStyleImage { public: static MouseInteractorStyle1* New(); vtkTypeMacro(MouseInteractorStyle1, vtkInteractorStyleImage); virtual void OnLeftButtonDown() { // Forward events ShowMessage("Left button!"); vtkInteractorStyleImage::OnLeftButtonDown(); } virtual void OnRightButtonDown() { ShowMessage("Right button!"); // Forward events vtkInteractorStyleImage::OnRightButtonDown(); } }; -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-vtkInteractorStyleImage-tp5735629p5735760.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Mon Jan 4 10:20:36 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 4 Jan 2016 10:20:36 -0500 Subject: [vtkusers] Problems with vtkClipPolyData and vtkImplicitBoolean In-Reply-To: <1451653831796-5735721.post@n5.nabble.com> References: <1451525713172-5735713.post@n5.nabble.com> <1451526366773-5735714.post@n5.nabble.com> <1451653831796-5735721.post@n5.nabble.com> Message-ID: Hi Normanius, I'm CC'ing David Gobbi for his expertise in geometry operations in VTK as he likely has some insight in the issue and what you've done. Looking at the other implicit functions besides vtkPlane, it looks like most evaluate the squared distance rather than the linear distance, so this appears to be by design. I'm not familiar with the history of the classes, but, as you suspect, I wouldn't recommend changing the current behavior of vtkCylinder because it would be a backwards-incompatible change. Instead, for your application, I would recommend subclassing vtkCylinder and overriding the EvaluateFunction() and possibly EvaluateGradient() if you need it to compute the non-squared distances. Regarding your second patch, I am intrigued by using a bisection method or other solver to find the zero-crossing of the implicit function. Your results with the combined cylinder and planes look very nice. I might recommend changing from specifying the clipping function from vtkImplicitFunction to something more general, like a callback function, though I'm not completely sold on that, and moving the setting/getter to vtkCell so that other cells might someday make use of the zero-crossing function. Thanks for the interesting work, Cory On Fri, Jan 1, 2016 at 8:10 AM, normanius wrote: > Hi VTK-developers > > I implemented a hack that solves the above problem for me. See the result > (before and after): > > > > Below the two patches. The second patch is the important one. The first one > just implements the suggested linear distance metric for vtkCylinder. (I > branched off from the revision git-hash ac7a28f). > patch-001-linear-cylinder-function.diff > < > http://vtk.1045678.n5.nabble.com/file/n5735721/patch-001-linear-cylinder-function.diff > > > patch-002-clippolydata-triangle-clipping-fix.diff > < > http://vtk.1045678.n5.nabble.com/file/n5735721/patch-002-clippolydata-triangle-clipping-fix.diff > > > > Here is what I did roughly: In vtkTriangle::Clip(), use the bisection > method > to correctly find the "zero-crossing", as an alternative to the linear > interpolation that is the method of choice in the current release. The > bisection method requires a handle to the implicit function and the > iso-value used in vtkClipPolyData. If in the cell traversal in > vtkClipPolyData::RequestData() the current vtkGenericCell turns out to be > of > triangular type, it gets dirty-casted into vtkTriangle and the implicit > function and the iso-value are set. This will trigger the advanced > interpolation scheme in vtkTriangle::Clip(). > > Obviously, my fix works only for triangular meshes. I haven't spent a > thought on how to generalise and implement this properly. Let me know what > you think. Shall create an issue in your bug-tracker? > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Problems-with-vtkClipPolyData-and-vtkImplicitBoolean-tp5735713p5735721.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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Jan 4 10:29:34 2016 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 4 Jan 2016 10:29:34 -0500 Subject: [vtkusers] android examples openGL ES 2.0 In-Reply-To: References: Message-ID: I'm not sure what the issue is. I just checked and the Native app is working on my device. I just rebuilt and used API level 21 and OPENGL_ES_VERSION set to 2.0 - Ken On Sun, Dec 20, 2015 at 3:09 PM, Francesco R wrote: > > Dear vtk users and developers, > I am currently trying to run the two android examples with OpenGL ES 2.0 > backend available in vtk 7.0.0 rc1, on an ARM Mali 400 MP GPU. > Unfortunately, I am not able to run neither of them on the device. > > NativeVTK crashes at Rendering/OpenGL2/vtkShaderProgram.cxx, line 399 > with "Shader object was not initialized, cannot attach it." > See also http://pastebin.com/Wvew3gen for the full log. > > JavaVTK appears to interact correctly with the user (see > http://pastebin.com/w3Sdu7CC ), but only a blue background is shown. The > trace file obtained with the android device monitor is available at > http://filebin.ca/2QdKao08I3lb/trace1.gltrace > > Do you have any suggestion on what could be the issue? > > Thanks > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 andrew.buckler at elucidbio.com Mon Jan 4 10:23:14 2016 From: andrew.buckler at elucidbio.com (Andrew J. Buckler (Elucid Bioimaging)) Date: Mon, 4 Jan 2016 15:23:14 +0000 Subject: [vtkusers] QVTKWidget error: vtkWin32OpenGLRenderWindow (0000003B20C1B720): wglMakeCurrent failed in MakeCurrent(), error: The requested resource is in use. Message-ID: Hello, I have an application of QVTKWidget running nicely on a Mac, but when I ported it to Windows (after much effort to get everything to build cleanly!) I get: ERROR: In VTK-6.3.0\Rendering\OpenGL\vtkWin32OpenGLRenderWindow.cxx, line 270 vtkWin32OpenGLRenderWindow (0000003B20C1B720): wglMakeCurrent failed in MakeCurrent(), error: The requested resource is in use. >From the name, this module isn't even used in the Mac stack; so: why is it needed? How can the error be fixed? Thank you, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Jan 4 11:06:30 2016 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 4 Jan 2016 11:06:30 -0500 Subject: [vtkusers] Announce: vtk 7.0.0 release candidate 1 is ready In-Reply-To: References: Message-ID: I was unable to duplicate this. I modified a test to use layers and it seemed to work. Specifically I updated Rendering/OpenGL2/Testing/CXX/TestVBOPLY.cxx to be the following, rebuilts, and then ran it ala .\bin\vtkRenderingOpenGL2CxxTests.exe TestVBOPLYMapper -D "C:/Users/ken.martin/Documents/vtk/vtkbin/ExternalData/Testing" -I and it seemed to work fine. Does that work for you? If so , can you modify the example to show the problem? Thanks Ken #include "vtkCamera.h" #include "vtkRenderer.h" #include "vtkOpenGLRenderWindow.h" #include "vtkActor.h" #include "vtkCellArray.h" #include "vtkPointData.h" #include "vtkPolyDataMapper.h" #include "vtkPLYReader.h" #include "vtkNew.h" #include "vtkProperty.h" #include "vtkLightKit.h" #include "vtkPolyDataNormals.h" #include "vtkTimerLog.h" #include "vtkRegressionTestImage.h" #include "vtkTestUtilities.h" #include "vtkRenderWindowInteractor.h" //---------------------------------------------------------------------------- int TestVBOPLYMapper(int argc, char *argv[]) { vtkNew actor; vtkNew renderer; vtkNew mapper; renderer->SetBackground(0.0, 0.0, 0.0); vtkNew renderWindow; renderWindow->SetSize(300, 300); renderWindow->AddRenderer(renderer.Get()); renderer->AddActor(actor.Get()); vtkNew iren; iren->SetRenderWindow(renderWindow.Get()); vtkNew lightKit; lightKit->AddLightsToRenderer(renderer.Get()); if (!renderWindow->SupportsOpenGL()) { cerr << "The platform does not support OpenGL as required\n"; cerr << vtkOpenGLRenderWindow::SafeDownCast(renderWindow.Get())->GetOpenGLSupportMessage(); cerr << renderWindow->ReportCapabilities(); return 1; } const char* fileName = vtkTestUtilities::ExpandDataFileName(argc, argv, "Data/dragon.ply"); vtkNew reader; reader->SetFileName(fileName); reader->Update(); // vtkNew norms; // norms->SetInputConnection(reader->GetOutputPort()); // norms->Update(); mapper->SetInputConnection(reader->GetOutputPort()); //mapper->SetInputConnection(norms->GetOutputPort()); actor->SetMapper(mapper.Get()); actor->GetProperty()->SetAmbientColor(0.2, 0.2, 1.0); actor->GetProperty()->SetDiffuseColor(1.0, 0.65, 0.7); actor->GetProperty()->SetSpecularColor(1.0, 1.0, 1.0); actor->GetProperty()->SetSpecular(0.5); actor->GetProperty()->SetDiffuse(0.7); actor->GetProperty()->SetAmbient(0.5); actor->GetProperty()->SetSpecularPower(20.0); actor->GetProperty()->SetOpacity(1.0); //actor->GetProperty()->SetRepresentationToWireframe(); vtkNew actor2; vtkNew renderer2; vtkNew mapper2; mapper2->SetInputConnection(reader->GetOutputPort()); actor2->SetMapper(mapper2.Get()); actor2->GetProperty()->SetOpacity(1.0); renderer2->SetLayer(1); renderer2->AddActor(actor2.Get()); renderWindow->SetNumberOfLayers(2); renderWindow->AddRenderer(renderer2.Get()); renderWindow->SetMultiSamples(0); vtkNew timer; timer->StartTimer(); renderWindow->Render(); timer->StopTimer(); double firstRender = timer->GetElapsedTime(); cerr << "first render time: " << firstRender << endl; timer->StartTimer(); int numRenders = 8; for (int i = 0; i < numRenders; ++i) { renderer->GetActiveCamera()->Azimuth(10); renderer->GetActiveCamera()->Elevation(10); renderWindow->Render(); } timer->StopTimer(); double elapsed = timer->GetElapsedTime(); cerr << "interactive render time: " << elapsed / numRenders << endl; unsigned int numTris = reader->GetOutput()->GetPolys()->GetNumberOfCells(); cerr << "number of triangles: " << numTris << endl; cerr << "triangles per second: " << numTris*(numRenders/elapsed) << endl; renderer->GetActiveCamera()->SetPosition(0,0,1); renderer->GetActiveCamera()->SetFocalPoint(0,0,0); renderer->GetActiveCamera()->SetViewUp(0,1,0); renderer->ResetCamera(); renderWindow->Render(); renderWindow->Render(); int retVal = vtkRegressionTestImage( renderWindow.Get() ); if ( retVal == vtkRegressionTester::DO_INTERACTOR) { iren->Start(); } return !retVal; } On Fri, Dec 18, 2015 at 12:31 PM, Michael Redmond < michael.j.redmond at gmail.com> wrote: > I reported a bug issue id 0015892. It's a bug for opengl2. Extra cells > are shown in 2nd/3rd renderer layers. I've seen the bug in 6.3 and > 7.0rc1. I've checked with the official 64 bit python release and my own > 6.3 builds. > On Dec 17, 2015 2:39 PM, "David E DeMarle" > wrote: > >> The VTK developement team is happy to announce that VTK 7.0 has entered >> the release candidate stage! >> >> You can find the source, data, and vtkpython binary packages here: >> >> http://www.vtk.org/download/#candidate >> >> Please try this version of VTK and report any issues to the list or the >> bug tracker so that we can try to address them before VTK 7.0.0 final. >> >> The official release notes will be available when VTK final is released >> in the next few weeks. In the meantime here is a preview: >> >> The big news is that the OpenGL"new" backend is now the default and that >> VTK is for the first time compatible with Python 3. >> >> Other new functionality includes: >> - the introduction of the Flying Edges SMP optimized (very fast) >> isocontour filter >> - a new and improved vtkPUnstructuredGridGhostCells filter that >> efficiently creates ghost cells in DMP parallel contexts. >> - allow the Python Global Interpreter Lock (GIL) for multithreaded Python >> routines >> - offscreen rendering through EGL now supported >> - remove vtkFreeTypeUtilities >> >> Improvements to existing functionality includes: >> - optimizations to the Contingency Statistics class which provides a >> significant performance boost when using only integer or floating point >> data >> - improved MPAS file handling including including arbitrary vertical >> dimensions and more general attribute reading >> - modernize depth sorting code. In tests the improved depth sort is 2 to >> 3x faster than before. >> - fixes to the ExodusWriter, especially when handling side sets and node set >> data. >> - updates to the PLY Writer >> >> Some of the changes that affect building and using VTK in applications >> include: >> - the OpenGL2 backend requires newer rendering capabilities than its >> predecessor >> - QtWebKit is no longer part of the Qt build group and thus easier to do >> without >> - vtkStreamer and related classes are deprecated; use vtkStreamTracer >> instead. >> - a new option (when building with newer CMake) to build with C++11 >> support >> - add support for Visual Studio 2015 >> - Java 1.6 is now the minimum version that is tested; 1.5 may not work >> - remove support for OSX10.5 Leopard and the Carbon (OSX9 compatibility >> layer) API >> - remove support for gcc 4.1 >> >> And many bug fixes across the codebase. >> >> We hope you enjoy this release of VTK! As always, contact Kitware and >> the mailing lists for assistance. >> >> Thanks, >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Jan 4 12:57:48 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 4 Jan 2016 10:57:48 -0700 Subject: [vtkusers] VtK 7, python3.4 build error In-Reply-To: References: Message-ID: Hi Matthew, I downloaded the latest python 3.5 package from python.org this morning and did a test build of VTK against it. There weren't any problems with the build (I tried with both cmake-2.8 and cmake-3.4, both of them worked). It found the following include dir and library: PYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m PYTHON_LIBRARY:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5m.dylib Please let me know if you discover anything new. - David On Sun, Jan 3, 2016 at 12:42 PM, David Gobbi wrote: > Hi Matthew, > > Try pointing PYTHON_LIBRARY to libpython3.5m.dylib instead, and likewise > point PYTHON_EXECUTABLE to python3.5m. > > The suffix (in this case "m") should be the same for the lib, the include > dir, and the executable. The three suffixes for python are "m" (pymalloc), > "d" (pydebug), and "u" (wide unicode). These suffixes reflect the build > options for the python package. > > I did build VTK against python 3.5 on OS X a few months ago, when Python > 3.5 was first released, and I did not encounter any problems. I can do it > again tomorrow with the latest package to see if anything has changed. > > - David > > > On Sun, Jan 3, 2016 at 12:24 PM, Matthew Cragun wrote: > >> David, >> >> thanks for the response. >> >> To provide some additional information, I have tried using python3.5 >> binaries straight off of python.org as wells as my anaconda >> installation. Both give me the same error. >> >> The variables I have set using ccmake and standard python are: >> >> >> PYTHON_EXECUTABLE = >> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 >> PYTHON_INCLUDE_DIR = >> /Library/Frameworks/Python.framework/Versions/3.5/python3.5m >> PYTHON_LIBRARY = >> /Library/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5.dylib >> >> >> The contents of the lib folder are: >> libformw.5.dylib libmenuw.5.dylib libncursesw.5.dylib >> libpanelw.5.dylib libpython3.5.dylib pkgconfig >> libformw.dylib libmenuw.dylib libncursesw.dylib >> libpanelw.dylib libpython3.5m.dylib python3.5 >> >> >> Thanks, >> >> Matt >> >> On Fri, Jan 1, 2016 at 11:19 PM, David Gobbi >> wrote: >> >>> Hi Matthew, >>> >>> No, there aren't pre-build binaries with python 3. I don't think that >>> is planned for this release. >>> >>> I've been doing my OS X builds with the python binary packages from >>> python.org, so I know that those, at least, should work. >>> >>> Can you give me some details about the python you are using? >>> Specifically, can you tell me what the contents of the library directory ( >>> /Users/mcragun/anaconda/envs/py3k/lib/) are? >>> >>> Also, in the CMakeCache.txt, can you give me the values >>> of PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR, and PYTHON_LIBRARY? >>> >>> For my build against the python.org binaries, VTK found the following: >>> >>> >>> PYTHON_EXECUTABLE:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 >>> >>> PYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.4/Headers/ >>> >>> PYTHON_LIBRARY:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib >>> >>> Obviously the locations will be different for Anaconda, but I just >>> wanted to give you an example of how these variables can be set. >>> >>> - David >>> >>> On Fri, Jan 1, 2016 at 9:45 PM, Matthew Cragun >>> wrote: >>> >>>> I am having trouble building VTK 7 with Python 3.4 on OS X 10.11 . >>>> Everything goes well for the first 99% of the process, however at the end, >>>> I get this error: >>>> >>>> [ 99%[ Building CXX object >>>> Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o >>>> make[2]: *** No rule to make target >>>> `/Users/mcragun/anaconda/envs/py3k/lib/libpython3.4.dylib', needed by >>>> `bin/vtkpython'. Stop. >>>> make[2]: *** Waiting for unfinished jobs.... >>>> In file included from >>>> /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29: >>>> /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:119:3: >>>> error: no matching function >>>> for call to 'PyImport_AppendInittab' >>>> PyImport_AppendInittab(namevtkCommonCore, initvtkCommonCorePython); >>>> ^~~~~~~~~~~~~~~~~~~~~~ >>>> /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17: >>>> note: candidate function not >>>> viable: no known conversion from 'void ()' to 'PyObject *(*)()' >>>> for 2nd argument >>>> PyAPI_FUNC(int) PyImport_AppendInittab( >>>> ^ >>>> In file included from >>>> /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29: >>>> /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:122:3: >>>> error: no matching function >>>> for call to 'PyImport_AppendInittab' >>>> PyImport_AppendInittab(namevtkCommonMath, initvtkCommonMathPython); >>>> ^~~~~~~~~~~~~~~~~~~~~~ >>>> >>>> Similar errors are repeated until... >>>> >>>> ^~~~~~~~~~~~~~~~~~~~~~ >>>> /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17: >>>> note: candidate function not >>>> viable: no known conversion from 'void ()' to 'PyObject *(*)()' >>>> for 2nd argument >>>> PyAPI_FUNC(int) PyImport_AppendInittab( >>>> ^ >>>> fatal error: too many errors emitted, stopping now [-ferror-limit=] >>>> 20 errors generated. >>>> make[2]: *** >>>> [Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o] Error 1 >>>> make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2 >>>> make: *** [all] Error 2 >>>> >>>> Any thoughts on what I missed? Are there pre-built binaries with >>>> python 3 for OS X? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Jan 4 15:45:24 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 4 Jan 2016 15:45:24 -0500 Subject: [vtkusers] Unable to read all scalars from Cell Data in a VTK file In-Reply-To: <1451899824043-5735754.post@n5.nabble.com> References: <1451638532864-5735720.post@n5.nabble.com> <1451899824043-5735754.post@n5.nabble.com> Message-ID: Hi Amit, Thanks for reporting what worked. I'm puzzled, though, because ParaView uses vtkPolyDataReader for poly data legacy files, so there should be no difference between what ParaView can read and what VTK can read. I wonder if you need to call reader1->ReadAllScalarsOn(); to ensure all scalars defined with the SCALARS declaration are read? It is off by default in VTK, but ParaView sets this to on. - Cory On Mon, Jan 4, 2016 at 4:30 AM, amit112amit wrote: > I think I figured out my problem. My LEGACY VTK file structure looked like > following: > > ************ File starts ******************* > # vtk DataFile Version 2.0 > Test example > ASCII > DATASET POLYDATA > POINTS 3 double > ... > POLYGONS 1 4 > ... > CELL_DATA 1 > SCALARS strainEnergy double 1 > ... > SCALARS bendingEnergy double 1 > ... > SCALARS curvature double 1 > ... > POINT_DATA 3 > VECTORS displacements double > ... > VECTORS forces double > ... > *************** File Ends ************* > > Paraview has no problem opening this file. But when reading this file by > code, we can fetch only the first scalar or vector from a cell data or > point > data. The same file can be restructured as follows to be able to retain all > the information when reading using VTK library functions: > > ************** File Starts ************ > # vtk DataFile Version 2.0 > Test example > ASCII > DATASET POLYDATA > POINTS 3 double > ... > > POLYGONS 1 4 > ... > > CELL_DATA 1 > SCALARS strainEnergy double 1 > ... > > FIELD FieldData 2 > bendingEnergy 1 1 double > ... > curvature 1 1 double > ... > > POINT_DATA 3 > VECTORS displacements double > ... > > FIELD FieldData 1 > forces 3 1 double > ... > ****************** File Ends **************** > > What is the difference? > 1. Cell data and point data can have only one active scalar or vector at a > time. > 2. All other scalars and vectors should be written under FIELD as field > data > respectively for cell and point data sections. The format is FIELD > FieldData > > 3. Field data arrays have a name, number of components, number of tuple and > data-type > 4. With the corrected file format a code like > polyData->GetPointData()->GetScalar() > gives desired output without any loss of information. > > To figure it out I had to look at the source code and the data-manipulation > example code from vtk documentation website was helpful. > > Hope this post somebody some time and effort and give some clarity about > LEGACY VTK file formats. > > Regards, > Amit > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Unable-to-read-all-scalars-from-Cell-Data-in-a-VTK-file-tp5735720p5735754.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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Jan 4 16:16:33 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 4 Jan 2016 16:16:33 -0500 Subject: [vtkusers] Conversion Example In-Reply-To: References: Message-ID: I am guessing you want to voxelize a polygonal geometry into a binary image where voxels inside the geometry have one value and voxels outside the geometry have another value. Is that correct? There isn't anything that I know of that does exactly this, but please see this example for generating an image from an implicit sphere object to get you started: http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Imaging/Core/Testing/Python/TestStencilToImage.py You can change the functionToStencil object to an instance of vtkPolyDataToImageStencil and connect it to the output of a vtkOBJReader. HTH, Cory On Wed, Dec 23, 2015 at 3:11 AM, Constantinus Spanakis < c.spanakis83 at gmail.com> wrote: > Hello. I am a new user of VTK and I was wondering if there is an example > of 3D file (VRML, OBJ, etc) conversion to Image Conversion(mha, mhd+raw). > > This > email has been sent from a virus-free computer protected by Avast. > www.avast.com > > <#151cde4877ea5a22_DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Jan 4 17:17:24 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 4 Jan 2016 17:17:24 -0500 Subject: [vtkusers] vtkScalarBarRepresentation::SetOrientation error In-Reply-To: <56684C8E.3010404@infolytica.com> References: <56684C8E.3010404@infolytica.com> Message-ID: Serge, Can you provide the error message or, equivalently, the location in the code that triggers the error? Thanks, Cory On Wed, Dec 9, 2015 at 10:45 AM, Serge Lalonde wrote: > Hello VTK users, > > It looks like vtkScalarBarRepresentation::SetOrientation() generates a VTK > error (and pops up the VTK error window) if called when its > vtkScalarBarWidget is not visible because the renderer is NULL. This didn't > happen in VTK 6.1 and must be a regression failure. > > There's no reason to not be able to set the orientation when the widget is > invisible, and in fact is desirable since you don't want the user to see it > flash in two different orientations while it's being initialized in the > code. > > Anyone else run into this and is there a workaround? > > Thanks. > -- > www.infolytica.com > 300 Leo Pariseau, Suite 2222, Montreal, QC, Canada, H2X 4B3 > (514) 849-8752 x236, Fax: (514) 849-4239 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 amit112amit at yahoo.co.in Mon Jan 4 22:06:17 2016 From: amit112amit at yahoo.co.in (amit112amit) Date: Mon, 4 Jan 2016 20:06:17 -0700 (MST) Subject: [vtkusers] Unable to read all scalars from Cell Data in a VTK file In-Reply-To: References: <1451638532864-5735720.post@n5.nabble.com> <1451899824043-5735754.post@n5.nabble.com> Message-ID: <1451963177079-5735778.post@n5.nabble.com> Thanks a lot for your reply, Cory. ReadAllScalarsOn() and ReadAllVectorsOn() are exactly the functions that I needed to read the original version of my legacy VTK file. That VTK file was generated directly using C++ file output functions. That means there was no vtkPolyData object created and no vtkPolyDataWriter was used to write it. I am trying to use vtkPolyDataWriter such that I get a legacy VTK files which has multiple scalars and vectors listed as I showed in my original VTK file sample. But I am not able to find how. How do I add multiple scalars to a cell-data? I looked at the code for vtkCellData *cd->SetScalars(); It removes the existing scalar array and then adds the new one. Whereas if I do vtkCellData *cd->AddArray(); when i write the file using vtkPolyDataWriter object, the added array appears under FIELD section instead of under SCALAR. This is what prompted me to think that all except the first scalar must be stored as field data and thus the file format I found to work. Can you please help? Thanks again. Regards, Amit -- View this message in context: http://vtk.1045678.n5.nabble.com/Unable-to-read-all-scalars-from-Cell-Data-in-a-VTK-file-tp5735720p5735778.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Mon Jan 4 23:44:04 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 4 Jan 2016 23:44:04 -0500 Subject: [vtkusers] Unable to read all scalars from Cell Data in a VTK file In-Reply-To: <1451963177079-5735778.post@n5.nabble.com> References: <1451638532864-5735720.post@n5.nabble.com> <1451899824043-5735754.post@n5.nabble.com> <1451963177079-5735778.post@n5.nabble.com> Message-ID: On Mon, Jan 4, 2016 at 10:06 PM, amit112amit wrote: > Thanks a lot for your reply, Cory. ReadAllScalarsOn() and > ReadAllVectorsOn() > are exactly the functions that I needed to read the original version of my > legacy VTK file. That VTK file was generated directly using C++ file output > functions. That means there was no vtkPolyData object created and no > vtkPolyDataWriter was used to write it. I am trying to use > vtkPolyDataWriter > such that I get a legacy VTK files which has multiple scalars and vectors > listed as I showed in my original VTK file sample. But I am not able to > find > how. > > How do I add multiple scalars to a cell-data? I looked at the code for > vtkCellData *cd->SetScalars(); > It removes the existing scalar array and then adds the new one. > Whereas if I do > vtkCellData *cd->AddArray(); > when i write the file using vtkPolyDataWriter object, the added array > appears under FIELD section instead of under SCALAR. This is what prompted > me to think that all except the first scalar must be stored as field data > and thus the file format I found to work. > Yep, that's the right way to add additional arrays in vtkCellData. You probably don't even need to call cd->SetScalars() to write out all your fields. I would trust the output of vtkPolyDataWriter to be the correct way to write the files. It might be that you happened to find a not-quite-correct variant of the VTK legacy file format that just happens to be read in correctly when RealAllScalars() is on. FYI, the notion of active scalars/vectors/normals/tensors is bit old-fashioned and VTK is moving away from the concept. Cory > > Can you please help? Thanks again. > > Regards, > Amit > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Unable-to-read-all-scalars-from-Cell-Data-in-a-VTK-file-tp5735720p5735778.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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sendtomatteo at yahoo.it Tue Jan 5 04:33:52 2016 From: sendtomatteo at yahoo.it (Matteo) Date: Tue, 5 Jan 2016 10:33:52 +0100 Subject: [vtkusers] Delaunay 2D In-Reply-To: <5672E0BF.3010709@yahoo.it> References: <5672E0BF.3010709@yahoo.it> Message-ID: <568B8E00.9090400@yahoo.it> Hi I have some points to be triangulated, but it seems I can not use vtkDelaunay2D filter because these points can not processed on the XY plane. I also tried to use a vtkTransform to select a different projection plane, but this solves only partially the problem, and again the "error" persists. This because these points are really in a complex position, so there is not a common normal to the interpolated face... you can think to the "mobius strip", just to figure out the problem. Is there a filter (analog to vtkDelaunay2D), that can solve this? Thanks Matteo -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregory.baert at inserm.fr Tue Jan 5 05:33:39 2016 From: gregory.baert at inserm.fr (Mercusyo) Date: Tue, 5 Jan 2016 03:33:39 -0700 (MST) Subject: [vtkusers] Create vtkVolume from a dicom series files Message-ID: <1451990019314-5735781.post@n5.nabble.com> Hello, I would like to use the vtkVolume class to create a volume from a list of dicom files. I found the example : http://www.vtk.org/Wiki/VTK/Examples/Cxx/VolumeRendering/MinIntensityRendering I change the reader to vtkDICOMImageReader class, the program build succesfully, but it fails in runtime ... (using Visual Studio 2010) Thanks, Best regards, -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-vtkVolume-from-a-dicom-series-files-tp5735781.html Sent from the VTK - Users mailing list archive at Nabble.com. From francesco81492 at gmail.com Tue Jan 5 07:28:33 2016 From: francesco81492 at gmail.com (Francesco R) Date: Tue, 5 Jan 2016 13:28:33 +0100 Subject: [vtkusers] android examples openGL ES 2.0 In-Reply-To: References: Message-ID: Thanks Dr. Martin for you reply. I just recompiled the current master with API 19 (the version of android installed on the device is 4.4) and I can confirm that I have the same issues as in my first email. Do you think it can be related to my particular GPU (ARM Mali 400 MP)? What GPU do you have on your device? Thank you! On Mon, Jan 4, 2016 at 4:29 PM, Ken Martin wrote: > I'm not sure what the issue is. I just checked and the Native app is > working on my device. I just rebuilt and used API level 21 and > OPENGL_ES_VERSION set to 2.0 > > - Ken > > On Sun, Dec 20, 2015 at 3:09 PM, Francesco R > wrote: > >> >> Dear vtk users and developers, >> I am currently trying to run the two android examples with OpenGL ES 2.0 >> backend available in vtk 7.0.0 rc1, on an ARM Mali 400 MP GPU. >> Unfortunately, I am not able to run neither of them on the device. >> >> NativeVTK crashes at Rendering/OpenGL2/vtkShaderProgram.cxx, line 399 >> with "Shader object was not initialized, cannot attach it." >> See also http://pastebin.com/Wvew3gen for the full log. >> >> JavaVTK appears to interact correctly with the user (see >> http://pastebin.com/w3Sdu7CC ), but only a blue background is shown. The >> trace file obtained with the android device monitor is available at >> http://filebin.ca/2QdKao08I3lb/trace1.gltrace >> >> Do you have any suggestion on what could be the issue? >> >> Thanks >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 Tue Jan 5 07:32:08 2016 From: wangq1979 at outlook.com (WangQ) Date: Tue, 5 Jan 2016 20:32:08 +0800 Subject: [vtkusers] Transform a clipping plane Message-ID: Hello vtkusers, I used vtkplane to clip a volume. Everything is find until the volume is transformed. The plane is still at the original position. I then applied vtkTransform to the plane, but the plane is still the same place. The code snippet is as below: vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetOrigin(0, tomo2DDims / 2, 0); plane->SetNormal(0, 1, 0); vtkSmartPointer transPlane = vtkSmartPointer::New(); transPlane->RotateY(90); transPlane->RotateZ(90); transPlane->RotateX(55); transPlane->RotateY(3); plane->SetTransform(transPlane); cutVolumeMapper->AddClippingPlane(plane); Appreciate your help in advance! cheers, Chiang -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: lipeline-2.png Type: image/png Size: 56050 bytes Desc: not available URL: From ken.martin at kitware.com Tue Jan 5 07:57:22 2016 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 5 Jan 2016 07:57:22 -0500 Subject: [vtkusers] android examples openGL ES 2.0 In-Reply-To: References: Message-ID: The system I tested on is a Mali 628 MP6 GPU running 5.0.2 (support ES 20 and 3.0). The Mali 400 is old but its specs say that it supports OpenGL ES 2.0 so it should work. Thanks Ken On Tue, Jan 5, 2016 at 7:28 AM, Francesco R wrote: > Thanks Dr. Martin for you reply. I just recompiled the current master with > API 19 (the version of android installed on the device is 4.4) and I can > confirm that I have the same issues as in my first email. Do you think it > can be related to my particular GPU (ARM Mali 400 MP)? What GPU do you have > on your device? Thank you! > > On Mon, Jan 4, 2016 at 4:29 PM, Ken Martin wrote: > >> I'm not sure what the issue is. I just checked and the Native app is >> working on my device. I just rebuilt and used API level 21 and >> OPENGL_ES_VERSION set to 2.0 >> >> - Ken >> >> On Sun, Dec 20, 2015 at 3:09 PM, Francesco R >> wrote: >> >>> >>> Dear vtk users and developers, >>> I am currently trying to run the two android examples with OpenGL ES 2.0 >>> backend available in vtk 7.0.0 rc1, on an ARM Mali 400 MP GPU. >>> Unfortunately, I am not able to run neither of them on the device. >>> >>> NativeVTK crashes at Rendering/OpenGL2/vtkShaderProgram.cxx, line 399 >>> with "Shader object was not initialized, cannot attach it." >>> See also http://pastebin.com/Wvew3gen for the full log. >>> >>> JavaVTK appears to interact correctly with the user (see >>> http://pastebin.com/w3Sdu7CC ), but only a blue background is shown. >>> The trace file obtained with the android device monitor is available at >>> http://filebin.ca/2QdKao08I3lb/trace1.gltrace >>> >>> Do you have any suggestion on what could be the issue? >>> >>> Thanks >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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. >> > > -- 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 francesco81492 at gmail.com Tue Jan 5 08:20:18 2016 From: francesco81492 at gmail.com (Francesco R) Date: Tue, 5 Jan 2016 14:20:18 +0100 Subject: [vtkusers] android examples openGL ES 2.0 In-Reply-To: References: Message-ID: Ok. I posted logcat and gltrace files, is there anything else that I can do to help debug the issue? Thanks On Tue, Jan 5, 2016 at 1:57 PM, Ken Martin wrote: > The system I tested on is a Mali 628 MP6 GPU running 5.0.2 (support ES 20 > and 3.0). The Mali 400 is old but its specs say that it supports OpenGL ES > 2.0 so it should work. > > Thanks > Ken > > On Tue, Jan 5, 2016 at 7:28 AM, Francesco R > wrote: > >> Thanks Dr. Martin for you reply. I just recompiled the current master >> with API 19 (the version of android installed on the device is 4.4) and I >> can confirm that I have the same issues as in my first email. Do you think >> it can be related to my particular GPU (ARM Mali 400 MP)? What GPU do you >> have on your device? Thank you! >> >> On Mon, Jan 4, 2016 at 4:29 PM, Ken Martin >> wrote: >> >>> I'm not sure what the issue is. I just checked and the Native app is >>> working on my device. I just rebuilt and used API level 21 and >>> OPENGL_ES_VERSION set to 2.0 >>> >>> - Ken >>> >>> On Sun, Dec 20, 2015 at 3:09 PM, Francesco R >>> wrote: >>> >>>> >>>> Dear vtk users and developers, >>>> I am currently trying to run the two android examples with OpenGL ES >>>> 2.0 backend available in vtk 7.0.0 rc1, on an ARM Mali 400 MP GPU. >>>> Unfortunately, I am not able to run neither of them on the device. >>>> >>>> NativeVTK crashes at Rendering/OpenGL2/vtkShaderProgram.cxx, line 399 >>>> with "Shader object was not initialized, cannot attach it." >>>> See also http://pastebin.com/Wvew3gen for the full log. >>>> >>>> JavaVTK appears to interact correctly with the user (see >>>> http://pastebin.com/w3Sdu7CC ), but only a blue background is shown. >>>> The trace file obtained with the android device monitor is available at >>>> http://filebin.ca/2QdKao08I3lb/trace1.gltrace >>>> >>>> Do you have any suggestion on what could be the issue? >>>> >>>> Thanks >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> 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. >>> >> >> > > > -- > 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 cory.quammen at kitware.com Tue Jan 5 10:05:37 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Jan 2016 10:05:37 -0500 Subject: [vtkusers] Delaunay 2D In-Reply-To: <568B8E00.9090400@yahoo.it> References: <5672E0BF.3010709@yahoo.it> <568B8E00.9090400@yahoo.it> Message-ID: Matteo, Sounds like a tough problem. To my knowledge, there is nothing in VTK that does this. Maybe you could figure out how to "unwrap" the points so that you can triangulate them by projecting them to a common plane, then wrap the resulting triangulation? HTH, Cory On Tue, Jan 5, 2016 at 4:33 AM, Matteo wrote: > Hi > I have some points to be triangulated, but it seems I can not use > vtkDelaunay2D filter because these points can not processed on the XY plane. > I also tried to use a vtkTransform to select a different projection plane, > but this solves only partially the problem, and again the "error" persists. > This because these points are really in a complex position, so there is > not a common normal to the interpolated face... you can think to the > "mobius strip", just to figure out the problem. > Is there a filter (analog to vtkDelaunay2D), that can solve this? > Thanks > Matteo > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 cory.quammen at kitware.com Tue Jan 5 10:07:57 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Jan 2016 10:07:57 -0500 Subject: [vtkusers] Create vtkVolume from a dicom series files In-Reply-To: <1451990019314-5735781.post@n5.nabble.com> References: <1451990019314-5735781.post@n5.nabble.com> Message-ID: This example shows use of vtkDICOMImageReader and may help you: http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOMSeries Cory On Tue, Jan 5, 2016 at 5:33 AM, Mercusyo wrote: > Hello, > > I would like to use the vtkVolume class to create a volume from a list of > dicom files. > I found the example : > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/VolumeRendering/MinIntensityRendering > < > http://www.vtk.org/Wiki/VTK/Examples/Cxx/VolumeRendering/MinIntensityRendering > > > > I change the reader to vtkDICOMImageReader class, the program build > succesfully, but it fails in runtime ... (using Visual Studio 2010) > > Thanks, > > Best regards, > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Create-vtkVolume-from-a-dicom-series-files-tp5735781.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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Jan 5 10:28:33 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Jan 2016 10:28:33 -0500 Subject: [vtkusers] Transform a clipping plane In-Reply-To: References: Message-ID: Chiang, The transform is applied to points at which the plane function is evaluated, but it is not considered when setting up clipping planes in the mapper. You should be able to get the same effect from your rotations by applying the transform to a point representing the tip of the plane normal. double normal[] = {0, 1, 0}; double rotatedNormal[3]; transPlane->TransformPoint(normal, rotatedNormal); plane->SetNormal(rotatedNormal); HTH, Cory On Tue, Jan 5, 2016 at 7:32 AM, WangQ wrote: > Hello vtkusers, > > I used vtkplane to clip a volume. Everything is find until the volume is > transformed. The plane is still at the original position. I then applied > vtkTransform to the plane, but the plane is still the same place. The code > snippet is as below: > > vtkSmartPointer plane = > vtkSmartPointer::New(); > plane->SetOrigin(0, tomo2DDims / 2, 0); > plane->SetNormal(0, 1, 0); > vtkSmartPointer transPlane = > vtkSmartPointer::New(); > transPlane->RotateY(90); > transPlane->RotateZ(90); > transPlane->RotateX(55); > transPlane->RotateY(3); > plane->SetTransform(transPlane); > > cutVolumeMapper->AddClippingPlane(plane); > > > Appreciate your help in advance! > > cheers, > > Chiang > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 joaorobertojr88 at gmail.com Tue Jan 5 10:48:59 2016 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Tue, 5 Jan 2016 08:48:59 -0700 (MST) Subject: [vtkusers] Using string labels on vtkCubeAxesActor2D Message-ID: <1452008939940-5735789.post@n5.nabble.com> Dear VTK Users, Is there a way use strings in an vtkCubeAxesActor axis, specifically date strings? I've found this related post http://vtk.1045678.n5.nabble.com/using-strings-for-axis-tick-labels-td3320733.html and vtkChartXY axes are used as a workaround. I think this approach doesn't work for me since my input data is a vtkRectilinearGrid and vtkChartXY class (via vtkPlot) requires a vtkTable as input. Thanks for any help. Joao. -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-string-labels-on-vtkCubeAxesActor2D-tp5735789.html Sent from the VTK - Users mailing list archive at Nabble.com. From wangq1979 at outlook.com Tue Jan 5 12:39:52 2016 From: wangq1979 at outlook.com (WangQ) Date: Wed, 6 Jan 2016 01:39:52 +0800 Subject: [vtkusers] Transform a clipping plane In-Reply-To: References: , Message-ID: Dear Cory, Thanks for the help. Now it is working! The only thing is that the origin needs to be transformed as well. Cheers, Qiang Date: Tue, 5 Jan 2016 10:28:33 -0500 Subject: Re: [vtkusers] Transform a clipping plane From: cory.quammen at kitware.com To: wangq1979 at outlook.com CC: vtkusers at vtk.org Chiang, The transform is applied to points at which the plane function is evaluated, but it is not considered when setting up clipping planes in the mapper. You should be able to get the same effect from your rotations by applying the transform to a point representing the tip of the plane normal. double normal[] = {0, 1, 0};double rotatedNormal[3];transPlane->TransformPoint(normal, rotatedNormal);plane->SetNormal(rotatedNormal); HTH,Cory On Tue, Jan 5, 2016 at 7:32 AM, WangQ wrote: Hello vtkusers, I used vtkplane to clip a volume. Everything is find until the volume is transformed. The plane is still at the original position. I then applied vtkTransform to the plane, but the plane is still the same place. The code snippet is as below: vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetOrigin(0, tomo2DDims / 2, 0); plane->SetNormal(0, 1, 0); vtkSmartPointer transPlane = vtkSmartPointer::New(); transPlane->RotateY(90); transPlane->RotateZ(90); transPlane->RotateX(55); transPlane->RotateY(3); plane->SetTransform(transPlane); cutVolumeMapper->AddClippingPlane(plane); Appreciate your help in advance! cheers, Chiang _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 prakeshofficial at gmail.com Tue Jan 5 12:52:17 2016 From: prakeshofficial at gmail.com (rakesh patil) Date: Tue, 5 Jan 2016 23:22:17 +0530 Subject: [vtkusers] qcombobox as a child of qvtkwidget doesn't show up on mac. Message-ID: Hello, I have derived my own class from QVTKwidget class. In the constructor of the class I am creating a combo box whose parent will be QVTKwidget. Example: Class mywidget : public QVTKwidget { public: mywidget (); }; mywidget::mywidget () { ... ... mycombo = new QCombobox (this); mycombo->setGeometry (0, 0, width, height); ... } on MAC, the combo box appears below QVTKwidget and all vtk objects are rendered on top of the combo box, thus hiding it behind QVTKwidget. I need the combo box to appear above(on top of) QVTKwidget at top left corner. Can anyone help me to overcome this problem. ? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Tue Jan 5 13:05:28 2016 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Tue, 5 Jan 2016 19:05:28 +0100 Subject: [vtkusers] qcombobox as a child of qvtkwidget doesn't show up on mac. In-Reply-To: References: Message-ID: Hello, Well from my experience, it's is not easy to draw a qt widget on top of a QVTKWidget, especially on OSX. You can try to add some Qt flags (Qt::Tool or Qt::WindowStaysOnTopHint) to the combobox. This may or not work, depending the version of Qt you're running, and it may also introduce some weird behavior ... I would rather advice you put the widget beside the QVTKWidget, in a vertical/horizontal layout, or you use some of VTK widget if you really want to draw within the view (use a TextureButton together with a qt popup menu for example) Good luck Simon 2016-01-05 18:52 GMT+01:00 rakesh patil : > Hello, > > I have derived my own class from QVTKwidget class. In the constructor of > the class I am creating a combo box whose parent will be QVTKwidget. > Example: > > Class mywidget : public QVTKwidget > { > public: > mywidget (); > }; > > mywidget::mywidget () > { > ... > ... > > mycombo = new QCombobox (this); > mycombo->setGeometry (0, 0, width, height); > ... > } > > on MAC, the combo box appears below QVTKwidget and all vtk objects are > rendered on top of the combo box, thus hiding it behind QVTKwidget. I need > the combo box to appear above(on top of) QVTKwidget at top left corner. Can > anyone help me to overcome this problem. ? > > Thanks > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Jan 5 13:56:24 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Jan 2016 13:56:24 -0500 Subject: [vtkusers] How to use vtkClipDataSet and preserve Arrays In-Reply-To: References: Message-ID: > > // Clip data > vtkSmartPointer clipDataSet = > vtkSmartPointer::New(); > clipDataSet->SetClipFunction(plane); > clipDataSet->SetInputConnection(model->GetProducerPort()); > clipDataSet->InsideOutOn(); > clipDataSet->GenerateClippedOutputOn(); > > //PROBLEM HERE. The print shows that there aren't any arrays on the output > data > clipDataSet->GetOutput()->Print(std::cout); > You haven't updated the clipDataSet filter yet at this point, so the output should be empty here. If you do add a call to clipDataSet->Update(), you should see that the output has the arrays you expect. Let us know if it doesn't. > // Warp the data. > vtkSmartPointer warpingVector = > vtkSmartPointer::New(); > warpingVector->SetInput(clipDataSet->GetOutput()); > warpingVector->Update(); > Could you try calling warpingVector->SetInputArrayToProcess(0, 0, 0, vtkDataObject:: FIELD_ASSOCIATION_POINTS, "Displacements"); This should tell the vtkWarpVector object to displace by your "Displacements" array. HTH, Cory > // Filter the data because vtkFeatureEdges needs polydata as input > vtkSmartPointer outGeometryFilter = > vtkSmartPointer::New(); > outGeometryFilter->SetInput(warpingVector->GetOutput()); > > //Create a filter to only draw the boundaries of the displaced mesh > vtkSmartPointer drawOnlyBoundaries = > vtkSmartPointer::New(); > drawOnlyBoundaries->SetInputConnection(outGeometryFilter->GetOutputPort()); > // configuration of drawOnlyBoundaries, it is not important > drawOnlyBoundaries->BoundaryEdgesOn(); > drawOnlyBoundaries->ManifoldEdgesOff(); > drawOnlyBoundaries->NonManifoldEdgesOff(); drawOnlyBoundaries->Update(); > > /* Here I omitted the code to display the mesh using > clipDataSet->GetOutputPort() as input*/ > /* Also, the code to configure the mapper and actor using > drawOnlyBoundaries as input */ > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 wangq1979 at outlook.com Tue Jan 5 14:40:10 2016 From: wangq1979 at outlook.com (WangQ) Date: Wed, 6 Jan 2016 03:40:10 +0800 Subject: [vtkusers] Transform a clipping plane In-Reply-To: References: , Message-ID: Dear Cory, I try to use 2 perpendicular planes to clip a volume to achieve something shown in the attachment, i.e. clipping 1/4 of a volume. But the result unfortunately is reverse, i.e. clipping 3/4 away, and showing the rest 1/4. Do you have any suggestion? Many thanks! Chiang Date: Tue, 5 Jan 2016 10:28:33 -0500 Subject: Re: [vtkusers] Transform a clipping plane From: cory.quammen at kitware.com To: wangq1979 at outlook.com CC: vtkusers at vtk.org Chiang, The transform is applied to points at which the plane function is evaluated, but it is not considered when setting up clipping planes in the mapper. You should be able to get the same effect from your rotations by applying the transform to a point representing the tip of the plane normal. double normal[] = {0, 1, 0};double rotatedNormal[3];transPlane->TransformPoint(normal, rotatedNormal);plane->SetNormal(rotatedNormal); HTH,Cory On Tue, Jan 5, 2016 at 7:32 AM, WangQ wrote: Hello vtkusers, I used vtkplane to clip a volume. Everything is find until the volume is transformed. The plane is still at the original position. I then applied vtkTransform to the plane, but the plane is still the same place. The code snippet is as below: vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetOrigin(0, tomo2DDims / 2, 0); plane->SetNormal(0, 1, 0); vtkSmartPointer transPlane = vtkSmartPointer::New(); transPlane->RotateY(90); transPlane->RotateZ(90); transPlane->RotateX(55); transPlane->RotateY(3); plane->SetTransform(transPlane); cutVolumeMapper->AddClippingPlane(plane); Appreciate your help in advance! cheers, Chiang _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: lipeline-2.png Type: image/png Size: 56050 bytes Desc: not available URL: From cory.quammen at kitware.com Tue Jan 5 14:45:53 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Jan 2016 14:45:53 -0500 Subject: [vtkusers] Transform a clipping plane In-Reply-To: References: Message-ID: Chiang, You can't clip an object with two planes and get a convex object as shown in the attachment. Instead, try clipping with a vtkBox: http://www.vtk.org/doc/nightly/html/classvtkBox.html - Cory On Tue, Jan 5, 2016 at 2:40 PM, WangQ wrote: > Dear Cory, > > I try to use 2 perpendicular planes to clip a volume to achieve something > shown in the attachment, i.e. clipping 1/4 of a volume. But the result > unfortunately is reverse, i.e. clipping 3/4 away, and showing the rest > 1/4. Do you have any suggestion? > > Many thanks! > > Chiang > > ------------------------------ > Date: Tue, 5 Jan 2016 10:28:33 -0500 > Subject: Re: [vtkusers] Transform a clipping plane > From: cory.quammen at kitware.com > To: wangq1979 at outlook.com > CC: vtkusers at vtk.org > > Chiang, > > The transform is applied to points at which the plane function is > evaluated, but it is not considered when setting up clipping planes in the > mapper. > > You should be able to get the same effect from your rotations by applying > the transform to a point representing the tip of the plane normal. > > double normal[] = {0, 1, 0}; > double rotatedNormal[3]; > transPlane->TransformPoint(normal, rotatedNormal); > plane->SetNormal(rotatedNormal); > > HTH, > Cory > > > On Tue, Jan 5, 2016 at 7:32 AM, WangQ wrote: > > Hello vtkusers, > > I used vtkplane to clip a volume. Everything is find until the volume is > transformed. The plane is still at the original position. I then applied > vtkTransform to the plane, but the plane is still the same place. The code > snippet is as below: > > vtkSmartPointer plane = > vtkSmartPointer::New(); > plane->SetOrigin(0, tomo2DDims / 2, 0); > plane->SetNormal(0, 1, 0); > vtkSmartPointer transPlane = > vtkSmartPointer::New(); > transPlane->RotateY(90); > transPlane->RotateZ(90); > transPlane->RotateX(55); > transPlane->RotateY(3); > plane->SetTransform(transPlane); > > cutVolumeMapper->AddClippingPlane(plane); > > > Appreciate your help in advance! > > cheers, > > Chiang > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 cory.quammen at kitware.com Tue Jan 5 15:18:02 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Jan 2016 15:18:02 -0500 Subject: [vtkusers] VTK Threshold Discrepancy In-Reply-To: <1B22639EA62F9B41AF2D9DE147555DF308A52D4E@Mail.cfdrc.com> References: <1B22639EA62F9B41AF2D9DE147555DF308A52D22@Mail.cfdrc.com> <1B22639EA62F9B41AF2D9DE147555DF308A52D4E@Mail.cfdrc.com> Message-ID: Hi Eric, I don't know if you are still working on this, but would it be possible to send me a dataset and compilable code sample to try to replicate this problem? Thank you, Cory On Wed, Nov 11, 2015 at 11:11 AM, Eric D. Robertson < eric.robertson at cfdrc.com> wrote: > Thank you for the reply. However, that seems to not have an effect. Here > is my snippet of code > > > threshold->SetInputData(unstructuredGrid); > threshold->SetInputArrayToProcess(0, 0, 0, > vtkDataObject::FIELD_ASSOCIATION_POINTS, "Flag"); > threshold->ThresholdByUpper(1); //Cut off everything that isn't Flag = 1 > > threshold->AllScalarsOff(); > > threshold->Update(); > > > > There are 20402 original points in "unstructuredGrid." > > There are 16492 points after thresholding. > However, there are 16495 points designated with Flag = 1 in > "unstructuredGrid." > > Eric Robertson > Research Engineer, BET > CFD Research Corporation > 701 McMillian Way NW, Suite D > Huntsville, AL 35806 > Ph: 256-726-4912 > Email: eric.robertson at cfdrc.com > > > > ------------------------------ > *From:* Cory Quammen [cory.quammen at kitware.com] > *Sent:* Tuesday, November 10, 2015 4:58 PM > *To:* Eric D. Robertson > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] VTK Threshold Discrepancy > > Eric, > > Try unchecking the "All Scalars" option in the Threshold filter > properties. > > HTH, > Cory > > On Tue, Nov 10, 2015 at 5:47 PM, Eric D. Robertson < > eric.robertson at cfdrc.com> wrote: > >> I am using vtkThreshold to filter point data stored as vtkStructuredGrid. >> >> >> >> The data is essentially an array of 0?s and 1?s, where I am looking to >> only keep the cells with 1?s stored. >> >> >> >> When I apply the vtkThreshold, the result is a domain slightly smaller >> than the number of cells with 1?s. In other words, the number of cells in >> the vtkThreshold doesn?t exactly match up to the number of 1?s available in >> the original unthresholded domain. Is this a known issue? >> >> >> >> >> >> >> >> Eric Robertson >> >> Research Engineer, BET >> >> CFD Research Corporation >> >> 701 McMillian Way NW, Suite D >> >> Huntsville, AL 35806 >> >> Ph: 256-726-4912 >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 biomates at telefonica.net Tue Jan 5 15:44:10 2016 From: biomates at telefonica.net (Mario Rodriguez) Date: Tue, 5 Jan 2016 21:44:10 +0100 Subject: [vtkusers] Positioning a text label in a vtkChartXY Message-ID: <568C2B1A.3010403@telefonica.net> Hello, I want to write a text label and place it in a position given in the vtkChartXY coordinates system. My environment: VTK 6.3 + TCL. This is what I have made so far: I have a chart created by vtkChartXY chart with some points in it. Now I create a text label this way: vtkTextMapper mapText mapText SetInput "Some text here" vtkActor2D txt txt SetMapper mapText Then, I create the renderer: vtkRenderer renderer and add to it the chart and the text: renderer AddActor txt txt SetPosition 100 100 And I see the complete scene as expected. My problem is that I need to set the label position according to the coordinates system of vtkChartXY, not in Viewport coordinates. Is it possible? I have seen that vtkXYPlotActor has some methods to get these coordinates, but I couldn't find anything similar in vtkChartXY. Thanks. -- Mario From cory.quammen at kitware.com Tue Jan 5 15:59:32 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Jan 2016 15:59:32 -0500 Subject: [vtkusers] vtkFastSplatter broken? In-Reply-To: <1450353507849-5735566.post@n5.nabble.com> References: <1450353507849-5735566.post@n5.nabble.com> Message-ID: Hi Richard, I think you had two problems in your code: 1). The vtkFastSplatter was auto-determining the origin and pixel spacing of the output image. When you moved the one point around, the origin was adjusted so that it was always at the location of the one point. This appeared in the renderer as though nothing was happening. You can fix this by adding a call to splatter->SetModelBounds(...) to some fixed bounding box. 2). Moving points 2-5 by 1 unit in space won't really be visible in an image where the voxel size is also 1 and the splat is relatively large. You can fix this by moving the points a further distance. Here is a modified version of your example where the points show up where expected: /* * Copyright 2004 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the * U.S. Government. Redistribution and use in source and binary forms, with * or without modification, are permitted provided that this Notice and any * statement of authorship are reproduced on all copies. */ // Simple test of vtkFastSplatter #include "vtkImageData.h" #include "vtkImageShiftScale.h" #include "vtkFastSplatter.h" #include "vtkImageViewer2.h" #include "vtkPoints.h" #include "vtkPolyData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkSmartPointer.h" #define VTK_CREATE(type, name) \ vtkSmartPointer name = vtkSmartPointer::New() #include const int SPLAT_IMAGE_SIZE = 100; int main(int, char *[]) { // For the purposes of this example we'll build the splat image by // hand. VTK_CREATE(vtkImageData, SplatImage); SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); SplatImage->AllocateScalars(VTK_FLOAT, 1); for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) { for (int j = 0; j < SPLAT_IMAGE_SIZE; ++j) { double xCoord = 1 - fabs( (i - SPLAT_IMAGE_SIZE/2) / (SPLAT_IMAGE_SIZE/2.0) ); double yCoord = 1 - fabs( (j - SPLAT_IMAGE_SIZE/2) / (SPLAT_IMAGE_SIZE/2.0) ); SplatImage->SetScalarComponentFromDouble(i, j, 0, 0, xCoord * yCoord ); } } VTK_CREATE(vtkPolyData, SplatPoints); VTK_CREATE(vtkPoints, Points); Points->SetNumberOfPoints( 5 ); double point[3]; // Move the points further point[0] = 100; point[1] = 100; point[2] = 0; Points->SetPoint( 0, point ); point[0] = 100; point[1] = 0; point[2] = 0; Points->SetPoint( 1, point ); point[0] = 0; point[1] = 100; point[2] = 0; Points->SetPoint( 2, point ); point[0] = 0; point[1] = 0; point[2] = 0; Points->SetPoint( 3, point ); point[0] = 199; point[1] = 199; point[2] = 0; Points->SetPoint( 4, point ); SplatPoints->SetPoints(Points); VTK_CREATE(vtkFastSplatter, splatter); splatter->SetInputData( SplatPoints ); splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, 2*SPLAT_IMAGE_SIZE, 1 ); // Fix the model bounds rather than relying on vtkFastSplatter to calculate them splatter->SetModelBounds(0, 199, 0, 199, 0, 0); splatter->SetInputData(1, SplatImage ); // The image viewers and writers are only happy with unsigned char // images. This will convert the floats into that format. VTK_CREATE(vtkImageShiftScale, resultScale); resultScale->SetOutputScalarTypeToUnsignedChar(); resultScale->SetShift(0); resultScale->SetScale(255); resultScale->SetInputConnection( splatter->GetOutputPort() ); splatter->Update(); resultScale->Update(); splatter->GetOutput()->Print(cout); // Set up a viewer for the image. vtkImageViewer and // vtkImageViewer2 are convenient wrappers around vtkActor2D, // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need // to supply is the interactor and hooray, Bob's your uncle. VTK_CREATE(vtkImageViewer2, ImageViewer); ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); ImageViewer->SetColorLevel(127); ImageViewer->SetColorWindow(255); VTK_CREATE(vtkRenderWindowInteractor, iren); ImageViewer->SetupInteractor(iren); ImageViewer->Render(); ImageViewer->GetRenderer()->ResetCamera(); iren->Initialize(); ImageViewer->Render(); iren->Start(); return EXIT_SUCCESS; } HTH, Cory On Thu, Dec 17, 2015 at 6:58 AM, mbcx9rb9 wrote: > Hi all, > > I was hoping to use vtkFastSplatter so I took a look at the test. However, > it doesn't work how I expected (or how it should, I think). > > The example places 5 splatters at various coordinates. But I can't control > the position of those splats. If I comment out all but the first splat and > then change the coordinates, it doesn't move! > > Below is the relevant code, can someone confirm that if they change point[0] > and point[1], nothing happens? Then, try adding in a second splat (remember > to change Points->SetNumberOfPoints( 1 ) to 2), changing its coordinates and > observe that weird things start happening... > > > /* > * Copyright 2004 Sandia Corporation. > * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive > * license for use of this work by or on behalf of the > * U.S. Government. Redistribution and use in source and binary forms, with > * or without modification, are permitted provided that this Notice and any > * statement of authorship are reproduced on all copies. > */ > > // Simple test of vtkFastSplatter > > #include "vtkImageData.h" > #include "vtkImageShiftScale.h" > #include "vtkFastSplatter.h" > #include "vtkImageViewer2.h" > #include "vtkPoints.h" > #include "vtkPolyData.h" > #include "vtkRenderer.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > > #include "vtkSmartPointer.h" > #define VTK_CREATE(type, name) \ > vtkSmartPointer name = vtkSmartPointer::New() > > #include > > const int SPLAT_IMAGE_SIZE = 100; > > int main(int, char *[]) > { > // For the purposes of this example we'll build the splat image by > // hand. > > VTK_CREATE(vtkImageData, SplatImage); > SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); > SplatImage->AllocateScalars(VTK_FLOAT, 1); > > for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) > { > for (int j = 0; j < SPLAT_IMAGE_SIZE; ++j) > { > double xCoord = 1 - fabs( (i - SPLAT_IMAGE_SIZE/2) > / (SPLAT_IMAGE_SIZE/2.0) ); > double yCoord = 1 - fabs( (j - SPLAT_IMAGE_SIZE/2) > / (SPLAT_IMAGE_SIZE/2.0) ); > > SplatImage->SetScalarComponentFromDouble(i, j, 0, 0, > xCoord * yCoord ); > } > } > > VTK_CREATE(vtkPolyData, SplatPoints); > VTK_CREATE(vtkPoints, Points); > > Points->SetNumberOfPoints( 1 ); > double point[3]; > > point[0] = 0; > point[1] = 0; > point[2] = 0; > Points->SetPoint( 0, point ); > /* > point[0] = 1; > point[1] = 0; > point[2] = 0; > Points->SetPoint( 1, point ); > > point[0] = -1; > point[1] = 1; > point[2] = 0; > Points->SetPoint( 2, point ); > > point[0] = 1; > point[1] = -1; > point[2] = 0; > Points->SetPoint( 3, point ); > > point[0] = -1; > point[1] = -1; > point[2] = 0; > Points->SetPoint( 4, point ); > */ > SplatPoints->SetPoints(Points); > > VTK_CREATE(vtkFastSplatter, splatter); > splatter->SetInputData( SplatPoints ); > splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, > 2*SPLAT_IMAGE_SIZE, > 1 ); > splatter->SetInputData(1, SplatImage ); > > // The image viewers and writers are only happy with unsigned char > // images. This will convert the floats into that format. > VTK_CREATE(vtkImageShiftScale, resultScale); > resultScale->SetOutputScalarTypeToUnsignedChar(); > resultScale->SetShift(0); > resultScale->SetScale(255); > resultScale->SetInputConnection( splatter->GetOutputPort() ); > > splatter->Update(); > resultScale->Update(); > > // Set up a viewer for the image. vtkImageViewer and > // vtkImageViewer2 are convenient wrappers around vtkActor2D, > // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need > // to supply is the interactor and hooray, Bob's your uncle. > VTK_CREATE(vtkImageViewer2, ImageViewer); > ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); > ImageViewer->SetColorLevel(127); > ImageViewer->SetColorWindow(255); > > VTK_CREATE(vtkRenderWindowInteractor, iren); > ImageViewer->SetupInteractor(iren); > > ImageViewer->Render(); > ImageViewer->GetRenderer()->ResetCamera(); > > iren->Initialize(); > ImageViewer->Render(); > iren->Start(); > > return EXIT_SUCCESS; > } > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/vtkFastSplatter-broken-tp5735566.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 joaorobertojr88 at gmail.com Tue Jan 5 17:59:00 2016 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Tue, 5 Jan 2016 15:59:00 -0700 (MST) Subject: [vtkusers] How can I display a vtkRectilinearGrid as a 2d actor? Message-ID: <1452034740963-5735803.post@n5.nabble.com> Hi, I would like to display a vtkRectilinearGrid as a 2d actor. I found that I have two approaches: 1. Convert it to either vtkImageData or vtkPolyData and use the appropriated implementation of vtkMapper2D class; 2. Display it as an original 3d actor, but blocking user interaction such as rotation. I've seen vtkRenderer, vtkActor and vtkInteractorStyle classes however I didn't find any methods to make this approach work. What can I do to get it working? Thanks for any help. Joao. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-can-I-display-a-vtkRectilinearGrid-as-a-2d-actor-tp5735803.html Sent from the VTK - Users mailing list archive at Nabble.com. From prakeshofficial at gmail.com Tue Jan 5 19:06:22 2016 From: prakeshofficial at gmail.com (rakesh patil) Date: Wed, 6 Jan 2016 05:36:22 +0530 Subject: [vtkusers] qcombobox as a child of qvtkwidget doesn't show up on mac. In-Reply-To: References: Message-ID: Hi Simon, Thank you for the reply. Can you point me to some links to examples related to this (texture button for popup) ? Thanks On Tuesday, January 5, 2016, Simon ESNEAULT wrote: > Hello, > > Well from my experience, it's is not easy to draw a qt widget on top of a > QVTKWidget, especially on OSX. > You can try to add some Qt flags (Qt::Tool or Qt::WindowStaysOnTopHint) to > the combobox. This may or not work, depending the version of Qt you're > running, and it may also introduce some weird behavior ... > > I would rather advice you put the widget beside the QVTKWidget, in a > vertical/horizontal layout, or you use some of VTK widget if you really > want to draw within the view (use a TextureButton together with a qt popup > menu for example) > > Good luck > Simon > > 2016-01-05 18:52 GMT+01:00 rakesh patil >: > >> Hello, >> >> I have derived my own class from QVTKwidget class. In the constructor of >> the class I am creating a combo box whose parent will be QVTKwidget. >> Example: >> >> Class mywidget : public QVTKwidget >> { >> public: >> mywidget (); >> }; >> >> mywidget::mywidget () >> { >> ... >> ... >> >> mycombo = new QCombobox (this); >> mycombo->setGeometry (0, 0, width, height); >> ... >> } >> >> on MAC, the combo box appears below QVTKwidget and all vtk objects are >> rendered on top of the combo box, thus hiding it behind QVTKwidget. I need >> the combo box to appear above(on top of) QVTKwidget at top left corner. Can >> anyone help me to overcome this problem. ? >> >> Thanks >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Jan 5 22:20:35 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Jan 2016 22:20:35 -0500 Subject: [vtkusers] How can I display a vtkRectilinearGrid as a 2d actor? In-Reply-To: <1452034740963-5735803.post@n5.nabble.com> References: <1452034740963-5735803.post@n5.nabble.com> Message-ID: Is it just 2D interaction that you want? If so, you can implement a subclass of vtkInteractorStyle and change the behavior on the button event handlers to eliminate rotation, for example. On Tue, Jan 5, 2016 at 5:59 PM, joaoroberto88 wrote: > Hi, > > I would like to display a vtkRectilinearGrid as a 2d actor. I found that I > have two approaches: > 1. Convert it to either vtkImageData or vtkPolyData and use the appropriated > implementation of vtkMapper2D class; > 2. Display it as an original 3d actor, but blocking user interaction such as > rotation. I've seen vtkRenderer, vtkActor and vtkInteractorStyle classes > however I didn't find any methods to make this approach work. > > What can I do to get it working? > > Thanks for any help. > > Joao. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-can-I-display-a-vtkRectilinearGrid-as-a-2d-actor-tp5735803.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 f.nellmeldin at open-engineering.com Wed Jan 6 03:28:51 2016 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Wed, 6 Jan 2016 09:28:51 +0100 Subject: [vtkusers] How to use vtkClipDataSet and preserve Arrays In-Reply-To: References: Message-ID: Yes, indeed that was the problem. I had solved it a few weeks ago and I forgot to reply it here. Thank you. 2016-01-05 19:56 GMT+01:00 Cory Quammen : > // Clip data >> vtkSmartPointer clipDataSet = >> vtkSmartPointer::New(); >> clipDataSet->SetClipFunction(plane); >> clipDataSet->SetInputConnection(model->GetProducerPort()); >> clipDataSet->InsideOutOn(); >> clipDataSet->GenerateClippedOutputOn(); >> >> //PROBLEM HERE. The print shows that there aren't any arrays on the >> output data >> clipDataSet->GetOutput()->Print(std::cout); >> > > You haven't updated the clipDataSet filter yet at this point, so the > output should be empty here. If you do add a call to clipDataSet->Update(), > you should see that the output has the arrays you expect. Let us know if it > doesn't. > > >> // Warp the data. >> vtkSmartPointer warpingVector = >> vtkSmartPointer::New(); >> warpingVector->SetInput(clipDataSet->GetOutput()); >> warpingVector->Update(); >> > > Could you try calling > > warpingVector->SetInputArrayToProcess(0, 0, 0, vtkDataObject:: > FIELD_ASSOCIATION_POINTS, "Displacements"); > > This should tell the vtkWarpVector object to displace by your > "Displacements" array. > > HTH, > Cory > > >> // Filter the data because vtkFeatureEdges needs polydata as input >> vtkSmartPointer outGeometryFilter = >> vtkSmartPointer::New(); >> outGeometryFilter->SetInput(warpingVector->GetOutput()); >> >> //Create a filter to only draw the boundaries of the displaced mesh >> vtkSmartPointer drawOnlyBoundaries = >> vtkSmartPointer::New(); >> >> drawOnlyBoundaries->SetInputConnection(outGeometryFilter->GetOutputPort()); >> // configuration of drawOnlyBoundaries, it is not important >> drawOnlyBoundaries->BoundaryEdgesOn(); >> drawOnlyBoundaries->ManifoldEdgesOff(); >> drawOnlyBoundaries->NonManifoldEdgesOff(); drawOnlyBoundaries->Update(); >> >> /* Here I omitted the code to display the mesh using >> clipDataSet->GetOutputPort() as input*/ >> /* Also, the code to configure the mapper and actor using >> drawOnlyBoundaries as input */ >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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. > -- *Fernando NELLMELDIN* Software Engineer *_______________________________________________________________* *Open Engineering s.a.* Rue Bois Saint-Jean 15/1 B-4102 Seraing (Belgium) Tel: +32.4.353.30.34 http://www.open-engineering.com https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym *_________________________________________________________________________* -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregory.baert at inserm.fr Wed Jan 6 04:29:56 2016 From: gregory.baert at inserm.fr (Mercusyo) Date: Wed, 6 Jan 2016 02:29:56 -0700 (MST) Subject: [vtkusers] Create vtkVolume from a dicom series files In-Reply-To: <1451990019314-5735781.post@n5.nabble.com> References: <1451990019314-5735781.post@n5.nabble.com> Message-ID: <1452072596299-5735808.post@n5.nabble.com> Hello, Thanks for your help; So, I used the "ReadDicomSeries" project and modified it as follow : // // This example demonstrates how to read a series of dicom images // and how to scroll with the mousewheel or the up/down keys // through all slices // // some standard vtk headers #include #include #include #include #include #include // headers needed for this example #include #include #include #include #include #include // Pour le volume #include #include #include #include #include #include // needed to easily convert int to std::string #include // helper class to format slice status message class StatusMessage { public: static std::string Format(int slice, int maxSlice) { std::stringstream tmp; tmp << "Slice Number " << slice + 1 << "/" << maxSlice + 1; return tmp.str(); } }; // Define own interaction style class myVtkInteractorStyleImage : public vtkInteractorStyleImage { public: static myVtkInteractorStyleImage* New(); vtkTypeMacro(myVtkInteractorStyleImage, vtkInteractorStyleImage); protected: vtkImageViewer2* _ImageViewer; vtkTextMapper* _StatusMapper; int _Slice; int _MinSlice; int _MaxSlice; public: void SetImageViewer(vtkImageViewer2* imageViewer) { _ImageViewer = imageViewer; _MinSlice = imageViewer->GetSliceMin(); _MaxSlice = imageViewer->GetSliceMax(); _Slice = _MinSlice; cout << "Slicer: Min = " << _MinSlice << ", Max = " << _MaxSlice << std::endl; } void SetStatusMapper(vtkTextMapper* statusMapper) { _StatusMapper = statusMapper; } protected: void MoveSliceForward() { if(_Slice < _MaxSlice) { _Slice += 1; cout << "MoveSliceForward::Slice = " << _Slice << std::endl; _ImageViewer->SetSlice(_Slice); std::string msg = StatusMessage::Format(_Slice, _MaxSlice); _StatusMapper->SetInput(msg.c_str()); _ImageViewer->Render(); } } void MoveSliceBackward() { if(_Slice > _MinSlice) { _Slice -= 1; cout << "MoveSliceBackward::Slice = " << _Slice << std::endl; _ImageViewer->SetSlice(_Slice); std::string msg = StatusMessage::Format(_Slice, _MaxSlice); _StatusMapper->SetInput(msg.c_str()); _ImageViewer->Render(); } } virtual void OnKeyDown() { std::string key = this->GetInteractor()->GetKeySym(); if(key.compare("Up") == 0) { //cout << "Up arrow key was pressed." << endl; MoveSliceForward(); } else if(key.compare("Down") == 0) { //cout << "Down arrow key was pressed." << endl; MoveSliceBackward(); } // forward event vtkInteractorStyleImage::OnKeyDown(); } virtual void OnMouseWheelForward() { //std::cout << "Scrolled mouse wheel forward." << std::endl; MoveSliceForward(); // don't forward events, otherwise the image will be zoomed // in case another interactorstyle is used (e.g. trackballstyle, ...) // vtkInteractorStyleImage::OnMouseWheelForward(); } virtual void OnMouseWheelBackward() { //std::cout << "Scrolled mouse wheel backward." << std::endl; if(_Slice > _MinSlice) { MoveSliceBackward(); } // don't forward events, otherwise the image will be zoomed // in case another interactorstyle is used (e.g. trackballstyle, ...) // vtkInteractorStyleImage::OnMouseWheelBackward(); } }; vtkStandardNewMacro(myVtkInteractorStyleImage); int main(int argc, char* argv[]) { // Verify input arguments if (argc != 2) { std::cout << "Usage: " << argv[0] << " FolderName" << std::endl; return EXIT_FAILURE; } std::string folder = argv[1]; // Read all the DICOM files in the specified directory. vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetDirectoryName(folder.c_str()); reader->Update(); // Visualize vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(reader->GetOutputPort()); // slice status message vtkSmartPointer sliceTextProp = vtkSmartPointer::New(); sliceTextProp->SetFontFamilyToCourier(); sliceTextProp->SetFontSize(20); sliceTextProp->SetVerticalJustificationToBottom(); sliceTextProp->SetJustificationToLeft(); vtkSmartPointer sliceTextMapper = vtkSmartPointer::New(); std::string msg = StatusMessage::Format(imageViewer->GetSliceMin(), imageViewer->GetSliceMax()); sliceTextMapper->SetInput(msg.c_str()); sliceTextMapper->SetTextProperty(sliceTextProp); vtkSmartPointer sliceTextActor = vtkSmartPointer::New(); sliceTextActor->SetMapper(sliceTextMapper); sliceTextActor->SetPosition(15, 10); // usage hint message vtkSmartPointer usageTextProp = vtkSmartPointer::New(); usageTextProp->SetFontFamilyToCourier(); usageTextProp->SetFontSize(14); usageTextProp->SetVerticalJustificationToTop(); usageTextProp->SetJustificationToLeft(); vtkSmartPointer usageTextMapper = vtkSmartPointer::New(); usageTextMapper->SetInput("- Slice with mouse wheel\n or Up/Down-Key\n- Zoom with pressed right\n mouse button while dragging"); usageTextMapper->SetTextProperty(usageTextProp); vtkSmartPointer usageTextActor = vtkSmartPointer::New(); usageTextActor->SetMapper(usageTextMapper); usageTextActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedDisplay(); usageTextActor->GetPositionCoordinate()->SetValue( 0.05, 0.95); // create an interactor with our own style (inherit from vtkInteractorStyleImage) // in order to catch mousewheel and key events vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkSmartPointer myInteractorStyle = vtkSmartPointer::New(); // make imageviewer2 and sliceTextMapper visible to our interactorstyle // to enable slice status message updates when scrolling through the slices myInteractorStyle->SetImageViewer(imageViewer); myInteractorStyle->SetStatusMapper(sliceTextMapper); imageViewer->SetupInteractor(renderWindowInteractor); // make the interactor use our own interactorstyle // cause SetupInteractor() is defining it's own default interatorstyle // this must be called after SetupInteractor() renderWindowInteractor->SetInteractorStyle(myInteractorStyle); // add slice status message and usage hint message to the renderer imageViewer->GetRenderer()->AddActor2D(sliceTextActor); imageViewer->GetRenderer()->AddActor2D(usageTextActor); // initialize rendering and interaction //imageViewer->GetRenderWindow()->SetSize(400, 300); //imageViewer->GetRenderer()->SetBackground(0.2, 0.3, 0.4); imageViewer->Render(); imageViewer->GetRenderer()->ResetCamera(); // Create a transfer function mapping scalar value to opacity vtkSmartPointer oTFun = vtkSmartPointer::New(); oTFun->AddSegment(0, 1.0, 256, 0.1); vtkSmartPointer cTFun = vtkSmartPointer::New(); cTFun->AddRGBPoint( 0, 1.0, 1.0, 1.0 ); cTFun->AddRGBPoint( 255, 1.0, 1.0, 1.0 ); // Need to crop to actually see minimum intensity vtkSmartPointer clip = vtkSmartPointer::New(); clip->SetInputConnection(reader->GetOutputPort()); clip->SetOutputWholeExtent(0,66,0,66,30,37); clip->ClipDataOn(); vtkSmartPointer property = vtkSmartPointer::New(); property->SetScalarOpacity(oTFun); property->SetColor(cTFun); property->SetInterpolationTypeToLinear(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetBlendModeToMinimumIntensity(); mapper->SetInputConnection( clip->GetOutputPort() ); vtkSmartPointer volume = vtkSmartPointer::New(); volume->SetMapper(mapper); volume->SetProperty(property); imageViewer->GetRenderer()->AddViewProp(volume); renderWindowInteractor->Start(); return EXIT_SUCCESS; } But the result is strange (see joined file) Capture.PNG on the left bottom corner ... is that the volume ? I don't really understand yet the notion of volume with VTK ... Best regards, -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-vtkVolume-from-a-dicom-series-files-tp5735781p5735808.html Sent from the VTK - Users mailing list archive at Nabble.com. From wulihouxiaoshuai at 163.com Wed Jan 6 06:25:22 2016 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Wed, 6 Jan 2016 04:25:22 -0700 (MST) Subject: [vtkusers] how can make the surface rendering result more beautiful Message-ID: <1452079522528-5735809.post@n5.nabble.com> Hello everyone, I am doing some work related to surface rendering, but I find some unnecessary triangles on the rendering surface(Please see the attached image); How can I remove these ugly triangles? Does anyone know how to do this? Have anyone can give me some advice? Many thanks! Best Wishes! -- View this message in context: http://vtk.1045678.n5.nabble.com/how-can-make-the-surface-rendering-result-more-beautiful-tp5735809.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Wed Jan 6 06:19:02 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Wed, 6 Jan 2016 12:19:02 +0100 Subject: [vtkusers] vtkFastSplatter broken? In-Reply-To: References: <1450353507849-5735566.post@n5.nabble.com> Message-ID: Cory, Thanks for the help. Still trying to wrap my head around it though - is there any way to splat a pre-existing vtkImageData? Regards, Richard > On 05 Jan 2016, at 21:59, Cory Quammen wrote: > > Hi Richard, > > I think you had two problems in your code: > > 1). The vtkFastSplatter was auto-determining the origin and pixel > spacing of the output image. When you moved the one point around, the > origin was adjusted so that it was always at the location of the one > point. This appeared in the renderer as though nothing was happening. > You can fix this by adding a call to > > splatter->SetModelBounds(...) > > to some fixed bounding box. > > 2). Moving points 2-5 by 1 unit in space won't really be visible in an > image where the voxel size is also 1 and the splat is relatively > large. You can fix this by moving the points a further distance. > > Here is a modified version of your example where the points show up > where expected: > > /* > * Copyright 2004 Sandia Corporation. > * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive > * license for use of this work by or on behalf of the > * U.S. Government. Redistribution and use in source and binary forms, with > * or without modification, are permitted provided that this Notice and any > * statement of authorship are reproduced on all copies. > */ > > // Simple test of vtkFastSplatter > #include "vtkImageData.h" > #include "vtkImageShiftScale.h" > #include "vtkFastSplatter.h" > #include "vtkImageViewer2.h" > #include "vtkPoints.h" > #include "vtkPolyData.h" > #include "vtkRenderer.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > > #include "vtkSmartPointer.h" > #define VTK_CREATE(type, name) \ > > vtkSmartPointer name = vtkSmartPointer::New() > > #include > > const int SPLAT_IMAGE_SIZE = 100; > > int main(int, char *[]) > { > // For the purposes of this example we'll build the splat image by > // hand. > > VTK_CREATE(vtkImageData, SplatImage); > SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); > SplatImage->AllocateScalars(VTK_FLOAT, 1); > > for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) > { > for (int j = 0; j < SPLAT_IMAGE_SIZE; ++j) > { > double xCoord = 1 - fabs( (i - SPLAT_IMAGE_SIZE/2) > / (SPLAT_IMAGE_SIZE/2.0) ); > double yCoord = 1 - fabs( (j - SPLAT_IMAGE_SIZE/2) > / (SPLAT_IMAGE_SIZE/2.0) ); > > SplatImage->SetScalarComponentFromDouble(i, j, 0, 0, > xCoord * yCoord ); > } > } > > VTK_CREATE(vtkPolyData, SplatPoints); > VTK_CREATE(vtkPoints, Points); > > Points->SetNumberOfPoints( 5 ); > double point[3]; > > // Move the points further > point[0] = 100; > point[1] = 100; > point[2] = 0; > Points->SetPoint( 0, point ); > > point[0] = 100; > point[1] = 0; > point[2] = 0; > Points->SetPoint( 1, point ); > > point[0] = 0; > point[1] = 100; > point[2] = 0; > Points->SetPoint( 2, point ); > > point[0] = 0; > point[1] = 0; > point[2] = 0; > Points->SetPoint( 3, point ); > > point[0] = 199; > point[1] = 199; > point[2] = 0; > Points->SetPoint( 4, point ); > > SplatPoints->SetPoints(Points); > > VTK_CREATE(vtkFastSplatter, splatter); > splatter->SetInputData( SplatPoints ); > splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, > 2*SPLAT_IMAGE_SIZE, > 1 ); > > // Fix the model bounds rather than relying on vtkFastSplatter to > calculate them > splatter->SetModelBounds(0, 199, 0, 199, 0, 0); > splatter->SetInputData(1, SplatImage ); > > // The image viewers and writers are only happy with unsigned char > // images. This will convert the floats into that format. > VTK_CREATE(vtkImageShiftScale, resultScale); > resultScale->SetOutputScalarTypeToUnsignedChar(); > resultScale->SetShift(0); > resultScale->SetScale(255); > resultScale->SetInputConnection( splatter->GetOutputPort() ); > > splatter->Update(); > resultScale->Update(); > > splatter->GetOutput()->Print(cout); > > // Set up a viewer for the image. vtkImageViewer and > // vtkImageViewer2 are convenient wrappers around vtkActor2D, > // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need > // to supply is the interactor and hooray, Bob's your uncle. > VTK_CREATE(vtkImageViewer2, ImageViewer); > ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); > ImageViewer->SetColorLevel(127); > ImageViewer->SetColorWindow(255); > > VTK_CREATE(vtkRenderWindowInteractor, iren); > ImageViewer->SetupInteractor(iren); > > ImageViewer->Render(); > ImageViewer->GetRenderer()->ResetCamera(); > > iren->Initialize(); > ImageViewer->Render(); > iren->Start(); > > return EXIT_SUCCESS; > } > > HTH, > Cory > > > On Thu, Dec 17, 2015 at 6:58 AM, mbcx9rb9 wrote: >> Hi all, >> >> I was hoping to use vtkFastSplatter so I took a look at the test. However, >> it doesn't work how I expected (or how it should, I think). >> >> The example places 5 splatters at various coordinates. But I can't control >> the position of those splats. If I comment out all but the first splat and >> then change the coordinates, it doesn't move! >> >> Below is the relevant code, can someone confirm that if they change point[0] >> and point[1], nothing happens? Then, try adding in a second splat (remember >> to change Points->SetNumberOfPoints( 1 ) to 2), changing its coordinates and >> observe that weird things start happening... >> >> >> /* >> * Copyright 2004 Sandia Corporation. >> * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive >> * license for use of this work by or on behalf of the >> * U.S. Government. Redistribution and use in source and binary forms, with >> * or without modification, are permitted provided that this Notice and any >> * statement of authorship are reproduced on all copies. >> */ >> >> // Simple test of vtkFastSplatter >> >> #include "vtkImageData.h" >> #include "vtkImageShiftScale.h" >> #include "vtkFastSplatter.h" >> #include "vtkImageViewer2.h" >> #include "vtkPoints.h" >> #include "vtkPolyData.h" >> #include "vtkRenderer.h" >> #include "vtkRenderWindow.h" >> #include "vtkRenderWindowInteractor.h" >> >> #include "vtkSmartPointer.h" >> #define VTK_CREATE(type, name) \ >> vtkSmartPointer name = vtkSmartPointer::New() >> >> #include >> >> const int SPLAT_IMAGE_SIZE = 100; >> >> int main(int, char *[]) >> { >> // For the purposes of this example we'll build the splat image by >> // hand. >> >> VTK_CREATE(vtkImageData, SplatImage); >> SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); >> SplatImage->AllocateScalars(VTK_FLOAT, 1); >> >> for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) >> { >> for (int j = 0; j < SPLAT_IMAGE_SIZE; ++j) >> { >> double xCoord = 1 - fabs( (i - SPLAT_IMAGE_SIZE/2) >> / (SPLAT_IMAGE_SIZE/2.0) ); >> double yCoord = 1 - fabs( (j - SPLAT_IMAGE_SIZE/2) >> / (SPLAT_IMAGE_SIZE/2.0) ); >> >> SplatImage->SetScalarComponentFromDouble(i, j, 0, 0, >> xCoord * yCoord ); >> } >> } >> >> VTK_CREATE(vtkPolyData, SplatPoints); >> VTK_CREATE(vtkPoints, Points); >> >> Points->SetNumberOfPoints( 1 ); >> double point[3]; >> >> point[0] = 0; >> point[1] = 0; >> point[2] = 0; >> Points->SetPoint( 0, point ); >> /* >> point[0] = 1; >> point[1] = 0; >> point[2] = 0; >> Points->SetPoint( 1, point ); >> >> point[0] = -1; >> point[1] = 1; >> point[2] = 0; >> Points->SetPoint( 2, point ); >> >> point[0] = 1; >> point[1] = -1; >> point[2] = 0; >> Points->SetPoint( 3, point ); >> >> point[0] = -1; >> point[1] = -1; >> point[2] = 0; >> Points->SetPoint( 4, point ); >> */ >> SplatPoints->SetPoints(Points); >> >> VTK_CREATE(vtkFastSplatter, splatter); >> splatter->SetInputData( SplatPoints ); >> splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, >> 2*SPLAT_IMAGE_SIZE, >> 1 ); >> splatter->SetInputData(1, SplatImage ); >> >> // The image viewers and writers are only happy with unsigned char >> // images. This will convert the floats into that format. >> VTK_CREATE(vtkImageShiftScale, resultScale); >> resultScale->SetOutputScalarTypeToUnsignedChar(); >> resultScale->SetShift(0); >> resultScale->SetScale(255); >> resultScale->SetInputConnection( splatter->GetOutputPort() ); >> >> splatter->Update(); >> resultScale->Update(); >> >> // Set up a viewer for the image. vtkImageViewer and >> // vtkImageViewer2 are convenient wrappers around vtkActor2D, >> // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need >> // to supply is the interactor and hooray, Bob's your uncle. >> VTK_CREATE(vtkImageViewer2, ImageViewer); >> ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); >> ImageViewer->SetColorLevel(127); >> ImageViewer->SetColorWindow(255); >> >> VTK_CREATE(vtkRenderWindowInteractor, iren); >> ImageViewer->SetupInteractor(iren); >> >> ImageViewer->Render(); >> ImageViewer->GetRenderer()->ResetCamera(); >> >> iren->Initialize(); >> ImageViewer->Render(); >> iren->Start(); >> >> return EXIT_SUCCESS; >> } >> >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.com/vtkFastSplatter-broken-tp5735566.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 joaorobertojr88 at gmail.com Wed Jan 6 08:20:49 2016 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Wed, 6 Jan 2016 06:20:49 -0700 (MST) Subject: [vtkusers] How can I display a vtkRectilinearGrid as a 2d actor? In-Reply-To: References: <1452034740963-5735803.post@n5.nabble.com> Message-ID: <1452086449392-5735811.post@n5.nabble.com> Hi Cory, Thanks for your reply. I've subclassed vtkInteractorStyleTrackballCamera class leaving in blank the interaction methods (Rotate, Spin, ...) and it worked! Thanks! Joao. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-can-I-display-a-vtkRectilinearGrid-as-a-2d-actor-tp5735803p5735811.html Sent from the VTK - Users mailing list archive at Nabble.com. From kenji.tsumura at neosoftmedical.com Wed Jan 6 09:11:03 2016 From: kenji.tsumura at neosoftmedical.com (Kenji Tsumura) Date: Wed, 6 Jan 2016 14:11:03 +0000 Subject: [vtkusers] VTK-7.0.0 RC1: Image reslice with OpenGL2 Message-ID: <10285631702C4D4CB5C4921DC14337954EEA0455@neocoilexch01> Hi, I have posted a bug on image re-slice using vtkImageResliceMapper. http://www.vtk.org/Bug/view.php?id=15914 The description of the bug is: When I rotated a volume image, a portion of the resliced image is missing sometimes. The bug can be reproducible using the attached test code. As far as I can tell, the bug doesn't occur with VTK_RENDERING_BACKEND OpenGL setting. My environment is: VTK-7.0.0 RC1 CMake 3.1.1 Visual Studio 12 2013 Win 64 Thank you, Kenji Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Jan 6 09:18:05 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 6 Jan 2016 09:18:05 -0500 Subject: [vtkusers] how can make the surface rendering result more beautiful In-Reply-To: <1452079522528-5735809.post@n5.nabble.com> References: <1452079522528-5735809.post@n5.nabble.com> Message-ID: Could you provide some more information on how you rendered this surface and where it came from? Did you just load it and display it with a VTK program? Maybe you could highlight the triangles you consider unnecessary? Thanks, Cory On Wed, Jan 6, 2016 at 6:25 AM, Emptystack wrote: > Hello everyone, > > I am doing some work related to surface rendering, but I find some > unnecessary triangles on the rendering surface(Please see the attached > image); How can I remove these ugly triangles? > Does > anyone know how to do this? Have anyone can give me some advice? > > Many thanks! > Best Wishes! > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/how-can-make-the-surface-rendering-result-more-beautiful-tp5735809.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 cory.quammen at kitware.com Wed Jan 6 09:19:21 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 6 Jan 2016 09:19:21 -0500 Subject: [vtkusers] vtkFastSplatter broken? In-Reply-To: References: <1450353507849-5735566.post@n5.nabble.com> Message-ID: Richard, Not sure what you mean. You are splatting a vtkImageData at the 5 points you defined into a new image. Do you mean you want to splat them into an existing image? Thanks, Cory On Wed, Jan 6, 2016 at 6:19 AM, Richard Brown wrote: > Cory, > > Thanks for the help. Still trying to wrap my head around it though - is there any way to splat a pre-existing vtkImageData? > > Regards, > Richard > >> On 05 Jan 2016, at 21:59, Cory Quammen wrote: >> >> Hi Richard, >> >> I think you had two problems in your code: >> >> 1). The vtkFastSplatter was auto-determining the origin and pixel >> spacing of the output image. When you moved the one point around, the >> origin was adjusted so that it was always at the location of the one >> point. This appeared in the renderer as though nothing was happening. >> You can fix this by adding a call to >> >> splatter->SetModelBounds(...) >> >> to some fixed bounding box. >> >> 2). Moving points 2-5 by 1 unit in space won't really be visible in an >> image where the voxel size is also 1 and the splat is relatively >> large. You can fix this by moving the points a further distance. >> >> Here is a modified version of your example where the points show up >> where expected: >> >> /* >> * Copyright 2004 Sandia Corporation. >> * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive >> * license for use of this work by or on behalf of the >> * U.S. Government. Redistribution and use in source and binary forms, with >> * or without modification, are permitted provided that this Notice and any >> * statement of authorship are reproduced on all copies. >> */ >> >> // Simple test of vtkFastSplatter >> #include "vtkImageData.h" >> #include "vtkImageShiftScale.h" >> #include "vtkFastSplatter.h" >> #include "vtkImageViewer2.h" >> #include "vtkPoints.h" >> #include "vtkPolyData.h" >> #include "vtkRenderer.h" >> #include "vtkRenderWindow.h" >> #include "vtkRenderWindowInteractor.h" >> >> #include "vtkSmartPointer.h" >> #define VTK_CREATE(type, name) \ >> >> vtkSmartPointer name = vtkSmartPointer::New() >> >> #include >> >> const int SPLAT_IMAGE_SIZE = 100; >> >> int main(int, char *[]) >> { >> // For the purposes of this example we'll build the splat image by >> // hand. >> >> VTK_CREATE(vtkImageData, SplatImage); >> SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); >> SplatImage->AllocateScalars(VTK_FLOAT, 1); >> >> for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) >> { >> for (int j = 0; j < SPLAT_IMAGE_SIZE; ++j) >> { >> double xCoord = 1 - fabs( (i - SPLAT_IMAGE_SIZE/2) >> / (SPLAT_IMAGE_SIZE/2.0) ); >> double yCoord = 1 - fabs( (j - SPLAT_IMAGE_SIZE/2) >> / (SPLAT_IMAGE_SIZE/2.0) ); >> >> SplatImage->SetScalarComponentFromDouble(i, j, 0, 0, >> xCoord * yCoord ); >> } >> } >> >> VTK_CREATE(vtkPolyData, SplatPoints); >> VTK_CREATE(vtkPoints, Points); >> >> Points->SetNumberOfPoints( 5 ); >> double point[3]; >> >> // Move the points further >> point[0] = 100; >> point[1] = 100; >> point[2] = 0; >> Points->SetPoint( 0, point ); >> >> point[0] = 100; >> point[1] = 0; >> point[2] = 0; >> Points->SetPoint( 1, point ); >> >> point[0] = 0; >> point[1] = 100; >> point[2] = 0; >> Points->SetPoint( 2, point ); >> >> point[0] = 0; >> point[1] = 0; >> point[2] = 0; >> Points->SetPoint( 3, point ); >> >> point[0] = 199; >> point[1] = 199; >> point[2] = 0; >> Points->SetPoint( 4, point ); >> >> SplatPoints->SetPoints(Points); >> >> VTK_CREATE(vtkFastSplatter, splatter); >> splatter->SetInputData( SplatPoints ); >> splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, >> 2*SPLAT_IMAGE_SIZE, >> 1 ); >> >> // Fix the model bounds rather than relying on vtkFastSplatter to >> calculate them >> splatter->SetModelBounds(0, 199, 0, 199, 0, 0); >> splatter->SetInputData(1, SplatImage ); >> >> // The image viewers and writers are only happy with unsigned char >> // images. This will convert the floats into that format. >> VTK_CREATE(vtkImageShiftScale, resultScale); >> resultScale->SetOutputScalarTypeToUnsignedChar(); >> resultScale->SetShift(0); >> resultScale->SetScale(255); >> resultScale->SetInputConnection( splatter->GetOutputPort() ); >> >> splatter->Update(); >> resultScale->Update(); >> >> splatter->GetOutput()->Print(cout); >> >> // Set up a viewer for the image. vtkImageViewer and >> // vtkImageViewer2 are convenient wrappers around vtkActor2D, >> // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need >> // to supply is the interactor and hooray, Bob's your uncle. >> VTK_CREATE(vtkImageViewer2, ImageViewer); >> ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); >> ImageViewer->SetColorLevel(127); >> ImageViewer->SetColorWindow(255); >> >> VTK_CREATE(vtkRenderWindowInteractor, iren); >> ImageViewer->SetupInteractor(iren); >> >> ImageViewer->Render(); >> ImageViewer->GetRenderer()->ResetCamera(); >> >> iren->Initialize(); >> ImageViewer->Render(); >> iren->Start(); >> >> return EXIT_SUCCESS; >> } >> >> HTH, >> Cory >> >> >> On Thu, Dec 17, 2015 at 6:58 AM, mbcx9rb9 wrote: >>> Hi all, >>> >>> I was hoping to use vtkFastSplatter so I took a look at the test. However, >>> it doesn't work how I expected (or how it should, I think). >>> >>> The example places 5 splatters at various coordinates. But I can't control >>> the position of those splats. If I comment out all but the first splat and >>> then change the coordinates, it doesn't move! >>> >>> Below is the relevant code, can someone confirm that if they change point[0] >>> and point[1], nothing happens? Then, try adding in a second splat (remember >>> to change Points->SetNumberOfPoints( 1 ) to 2), changing its coordinates and >>> observe that weird things start happening... >>> >>> >>> /* >>> * Copyright 2004 Sandia Corporation. >>> * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive >>> * license for use of this work by or on behalf of the >>> * U.S. Government. Redistribution and use in source and binary forms, with >>> * or without modification, are permitted provided that this Notice and any >>> * statement of authorship are reproduced on all copies. >>> */ >>> >>> // Simple test of vtkFastSplatter >>> >>> #include "vtkImageData.h" >>> #include "vtkImageShiftScale.h" >>> #include "vtkFastSplatter.h" >>> #include "vtkImageViewer2.h" >>> #include "vtkPoints.h" >>> #include "vtkPolyData.h" >>> #include "vtkRenderer.h" >>> #include "vtkRenderWindow.h" >>> #include "vtkRenderWindowInteractor.h" >>> >>> #include "vtkSmartPointer.h" >>> #define VTK_CREATE(type, name) \ >>> vtkSmartPointer name = vtkSmartPointer::New() >>> >>> #include >>> >>> const int SPLAT_IMAGE_SIZE = 100; >>> >>> int main(int, char *[]) >>> { >>> // For the purposes of this example we'll build the splat image by >>> // hand. >>> >>> VTK_CREATE(vtkImageData, SplatImage); >>> SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); >>> SplatImage->AllocateScalars(VTK_FLOAT, 1); >>> >>> for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) >>> { >>> for (int j = 0; j < SPLAT_IMAGE_SIZE; ++j) >>> { >>> double xCoord = 1 - fabs( (i - SPLAT_IMAGE_SIZE/2) >>> / (SPLAT_IMAGE_SIZE/2.0) ); >>> double yCoord = 1 - fabs( (j - SPLAT_IMAGE_SIZE/2) >>> / (SPLAT_IMAGE_SIZE/2.0) ); >>> >>> SplatImage->SetScalarComponentFromDouble(i, j, 0, 0, >>> xCoord * yCoord ); >>> } >>> } >>> >>> VTK_CREATE(vtkPolyData, SplatPoints); >>> VTK_CREATE(vtkPoints, Points); >>> >>> Points->SetNumberOfPoints( 1 ); >>> double point[3]; >>> >>> point[0] = 0; >>> point[1] = 0; >>> point[2] = 0; >>> Points->SetPoint( 0, point ); >>> /* >>> point[0] = 1; >>> point[1] = 0; >>> point[2] = 0; >>> Points->SetPoint( 1, point ); >>> >>> point[0] = -1; >>> point[1] = 1; >>> point[2] = 0; >>> Points->SetPoint( 2, point ); >>> >>> point[0] = 1; >>> point[1] = -1; >>> point[2] = 0; >>> Points->SetPoint( 3, point ); >>> >>> point[0] = -1; >>> point[1] = -1; >>> point[2] = 0; >>> Points->SetPoint( 4, point ); >>> */ >>> SplatPoints->SetPoints(Points); >>> >>> VTK_CREATE(vtkFastSplatter, splatter); >>> splatter->SetInputData( SplatPoints ); >>> splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, >>> 2*SPLAT_IMAGE_SIZE, >>> 1 ); >>> splatter->SetInputData(1, SplatImage ); >>> >>> // The image viewers and writers are only happy with unsigned char >>> // images. This will convert the floats into that format. >>> VTK_CREATE(vtkImageShiftScale, resultScale); >>> resultScale->SetOutputScalarTypeToUnsignedChar(); >>> resultScale->SetShift(0); >>> resultScale->SetScale(255); >>> resultScale->SetInputConnection( splatter->GetOutputPort() ); >>> >>> splatter->Update(); >>> resultScale->Update(); >>> >>> // Set up a viewer for the image. vtkImageViewer and >>> // vtkImageViewer2 are convenient wrappers around vtkActor2D, >>> // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need >>> // to supply is the interactor and hooray, Bob's your uncle. >>> VTK_CREATE(vtkImageViewer2, ImageViewer); >>> ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); >>> ImageViewer->SetColorLevel(127); >>> ImageViewer->SetColorWindow(255); >>> >>> VTK_CREATE(vtkRenderWindowInteractor, iren); >>> ImageViewer->SetupInteractor(iren); >>> >>> ImageViewer->Render(); >>> ImageViewer->GetRenderer()->ResetCamera(); >>> >>> iren->Initialize(); >>> ImageViewer->Render(); >>> iren->Start(); >>> >>> return EXIT_SUCCESS; >>> } >>> >>> >>> >>> >>> -- >>> View this message in context: http://vtk.1045678.n5.nabble.com/vtkFastSplatter-broken-tp5735566.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. > -- Cory Quammen R&D Engineer Kitware, Inc. From cory.quammen at kitware.com Wed Jan 6 09:27:01 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 6 Jan 2016 09:27:01 -0500 Subject: [vtkusers] Create vtkVolume from a dicom series files In-Reply-To: <1452072596299-5735808.post@n5.nabble.com> References: <1451990019314-5735781.post@n5.nabble.com> <1452072596299-5735808.post@n5.nabble.com> Message-ID: Hi, It looks like your image data from the DICOMs is being displayed as slices in the window, so that's good. I'm not sure what the brighter square in the bottom left corner is - could be the volume rendering you are trying to do. Maybe try removing this: imageViewer->GetRenderer()->AddViewProp(volume); and see if the bright square goes away. A vtkImageData contains a volume image as you may be most familiar with in medical imaging. A vtkVolume is used to represent a vtkImageData in a volume rendering setup - you don't need it if you just want to display slices in your program. HTH, Cory On Wed, Jan 6, 2016 at 4:29 AM, Mercusyo wrote: > Hello, > > Thanks for your help; > So, I used the "ReadDicomSeries" project and modified it as follow : > > // > // This example demonstrates how to read a series of dicom images > // and how to scroll with the mousewheel or the up/down keys > // through all slices > // > // some standard vtk headers > #include > #include > #include > #include > #include > #include > // headers needed for this example > #include > #include > #include > #include > #include > #include > // Pour le volume > #include > #include > #include > #include > #include > #include > // needed to easily convert int to std::string > #include > > > // helper class to format slice status message > class StatusMessage > { > public: > static std::string Format(int slice, int maxSlice) > { > std::stringstream tmp; > tmp << "Slice Number " << slice + 1 << "/" << maxSlice + 1; > return tmp.str(); > } > }; > > > // Define own interaction style > class myVtkInteractorStyleImage : public vtkInteractorStyleImage > { > public: > static myVtkInteractorStyleImage* New(); > vtkTypeMacro(myVtkInteractorStyleImage, vtkInteractorStyleImage); > > protected: > vtkImageViewer2* _ImageViewer; > vtkTextMapper* _StatusMapper; > int _Slice; > int _MinSlice; > int _MaxSlice; > > public: > void SetImageViewer(vtkImageViewer2* imageViewer) { > _ImageViewer = imageViewer; > _MinSlice = imageViewer->GetSliceMin(); > _MaxSlice = imageViewer->GetSliceMax(); > _Slice = _MinSlice; > cout << "Slicer: Min = " << _MinSlice << ", Max = " << _MaxSlice << > std::endl; > } > > void SetStatusMapper(vtkTextMapper* statusMapper) { > _StatusMapper = statusMapper; > } > > > protected: > void MoveSliceForward() { > if(_Slice < _MaxSlice) { > _Slice += 1; > cout << "MoveSliceForward::Slice = " << _Slice << std::endl; > _ImageViewer->SetSlice(_Slice); > std::string msg = StatusMessage::Format(_Slice, _MaxSlice); > _StatusMapper->SetInput(msg.c_str()); > _ImageViewer->Render(); > } > } > > void MoveSliceBackward() { > if(_Slice > _MinSlice) { > _Slice -= 1; > cout << "MoveSliceBackward::Slice = " << _Slice << std::endl; > _ImageViewer->SetSlice(_Slice); > std::string msg = StatusMessage::Format(_Slice, _MaxSlice); > _StatusMapper->SetInput(msg.c_str()); > _ImageViewer->Render(); > } > } > > > virtual void OnKeyDown() { > std::string key = this->GetInteractor()->GetKeySym(); > if(key.compare("Up") == 0) { > //cout << "Up arrow key was pressed." << endl; > MoveSliceForward(); > } > else if(key.compare("Down") == 0) { > //cout << "Down arrow key was pressed." << endl; > MoveSliceBackward(); > } > // forward event > vtkInteractorStyleImage::OnKeyDown(); > } > > > virtual void OnMouseWheelForward() { > //std::cout << "Scrolled mouse wheel forward." << std::endl; > MoveSliceForward(); > // don't forward events, otherwise the image will be zoomed > // in case another interactorstyle is used (e.g. trackballstyle, ...) > // vtkInteractorStyleImage::OnMouseWheelForward(); > } > > > virtual void OnMouseWheelBackward() { > //std::cout << "Scrolled mouse wheel backward." << std::endl; > if(_Slice > _MinSlice) { > MoveSliceBackward(); > } > // don't forward events, otherwise the image will be zoomed > // in case another interactorstyle is used (e.g. trackballstyle, ...) > // vtkInteractorStyleImage::OnMouseWheelBackward(); > } > }; > > vtkStandardNewMacro(myVtkInteractorStyleImage); > > > int main(int argc, char* argv[]) > { > // Verify input arguments > if (argc != 2) > { > std::cout << "Usage: " << argv[0] << " FolderName" << std::endl; > return EXIT_FAILURE; > } > > std::string folder = argv[1]; > > // Read all the DICOM files in the specified directory. > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetDirectoryName(folder.c_str()); > reader->Update(); > > // Visualize > vtkSmartPointer imageViewer = > vtkSmartPointer::New(); > imageViewer->SetInputConnection(reader->GetOutputPort()); > > // slice status message > vtkSmartPointer sliceTextProp = > vtkSmartPointer::New(); > sliceTextProp->SetFontFamilyToCourier(); > sliceTextProp->SetFontSize(20); > sliceTextProp->SetVerticalJustificationToBottom(); > sliceTextProp->SetJustificationToLeft(); > > vtkSmartPointer sliceTextMapper = > vtkSmartPointer::New(); > std::string msg = StatusMessage::Format(imageViewer->GetSliceMin(), > imageViewer->GetSliceMax()); > sliceTextMapper->SetInput(msg.c_str()); > sliceTextMapper->SetTextProperty(sliceTextProp); > > vtkSmartPointer sliceTextActor = > vtkSmartPointer::New(); > sliceTextActor->SetMapper(sliceTextMapper); > sliceTextActor->SetPosition(15, 10); > > // usage hint message > vtkSmartPointer usageTextProp = > vtkSmartPointer::New(); > usageTextProp->SetFontFamilyToCourier(); > usageTextProp->SetFontSize(14); > usageTextProp->SetVerticalJustificationToTop(); > usageTextProp->SetJustificationToLeft(); > > vtkSmartPointer usageTextMapper = > vtkSmartPointer::New(); > usageTextMapper->SetInput("- Slice with mouse wheel\n or Up/Down-Key\n- > Zoom with pressed right\n mouse button while dragging"); > usageTextMapper->SetTextProperty(usageTextProp); > > vtkSmartPointer usageTextActor = > vtkSmartPointer::New(); > usageTextActor->SetMapper(usageTextMapper); > > usageTextActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedDisplay(); > usageTextActor->GetPositionCoordinate()->SetValue( 0.05, 0.95); > > // create an interactor with our own style (inherit from > vtkInteractorStyleImage) > // in order to catch mousewheel and key events > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > > vtkSmartPointer myInteractorStyle = > vtkSmartPointer::New(); > > // make imageviewer2 and sliceTextMapper visible to our interactorstyle > // to enable slice status message updates when scrolling through the > slices > myInteractorStyle->SetImageViewer(imageViewer); > myInteractorStyle->SetStatusMapper(sliceTextMapper); > > imageViewer->SetupInteractor(renderWindowInteractor); > // make the interactor use our own interactorstyle > // cause SetupInteractor() is defining it's own default interatorstyle > // this must be called after SetupInteractor() > renderWindowInteractor->SetInteractorStyle(myInteractorStyle); > // add slice status message and usage hint message to the renderer > imageViewer->GetRenderer()->AddActor2D(sliceTextActor); > imageViewer->GetRenderer()->AddActor2D(usageTextActor); > > // initialize rendering and interaction > //imageViewer->GetRenderWindow()->SetSize(400, 300); > //imageViewer->GetRenderer()->SetBackground(0.2, 0.3, 0.4); > imageViewer->Render(); > imageViewer->GetRenderer()->ResetCamera(); > > // Create a transfer function mapping scalar value to opacity > vtkSmartPointer oTFun = > vtkSmartPointer::New(); > oTFun->AddSegment(0, 1.0, 256, 0.1); > > vtkSmartPointer cTFun = > vtkSmartPointer::New(); > cTFun->AddRGBPoint( 0, 1.0, 1.0, 1.0 ); > cTFun->AddRGBPoint( 255, 1.0, 1.0, 1.0 ); > > // Need to crop to actually see minimum intensity > vtkSmartPointer clip = vtkSmartPointer::New(); > clip->SetInputConnection(reader->GetOutputPort()); > clip->SetOutputWholeExtent(0,66,0,66,30,37); > clip->ClipDataOn(); > > vtkSmartPointer property = > vtkSmartPointer::New(); > property->SetScalarOpacity(oTFun); > property->SetColor(cTFun); > property->SetInterpolationTypeToLinear(); > > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetBlendModeToMinimumIntensity(); > mapper->SetInputConnection( clip->GetOutputPort() ); > > vtkSmartPointer volume = vtkSmartPointer::New(); > volume->SetMapper(mapper); > volume->SetProperty(property); > > imageViewer->GetRenderer()->AddViewProp(volume); > > renderWindowInteractor->Start(); > return EXIT_SUCCESS; > } > > But the result is strange (see joined file) Capture.PNG > > on the left bottom corner ... is that the volume ? > I don't really understand yet the notion of volume with VTK ... > > Best regards, > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Create-vtkVolume-from-a-dicom-series-files-tp5735781p5735808.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 david.gobbi at gmail.com Wed Jan 6 09:53:16 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 6 Jan 2016 07:53:16 -0700 Subject: [vtkusers] VTK-7.0.0 RC1: Image reslice with OpenGL2 In-Reply-To: <10285631702C4D4CB5C4921DC14337954EEA0455@neocoilexch01> References: <10285631702C4D4CB5C4921DC14337954EEA0455@neocoilexch01> Message-ID: Hi Kenji, Thanks for the bug report, I'll look into this. - David On Wed, Jan 6, 2016 at 7:11 AM, Kenji Tsumura < kenji.tsumura at neosoftmedical.com> wrote: > Hi, > > > > I have posted a bug on image re-slice using vtkImageResliceMapper. > > http://www.vtk.org/Bug/view.php?id=15914 > > > > The description of the bug is: > > > > When I rotated a volume image, a portion of the resliced image is missing > sometimes. The bug can be reproducible using the attached test code. As far > as I can tell, the bug doesn't occur with VTK_RENDERING_BACKEND OpenGL > setting. > > > > My environment is: > > VTK-7.0.0 RC1 > > CMake 3.1.1 > > Visual Studio 12 2013 Win 64 > > > > Thank you, > > > > Kenji > Disclaimer: The information contained in this communication may be > confidential, is intended only for the use of the recipient(s) named above, > and may be legally privileged. If the reader of this message is not the > intended recipient, you are hereby notified that any dissemination, > distribution, or copying of this communication, or any of its contents, is > strictly prohibited. If you have received this communication in error, > please return it to the sender immediately and delete the original message > and any copy of it from your computer system. If you have any questions > concerning this message, please contact the sender. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregory.baert at inserm.fr Wed Jan 6 10:25:19 2016 From: gregory.baert at inserm.fr (Mercusyo) Date: Wed, 6 Jan 2016 08:25:19 -0700 (MST) Subject: [vtkusers] Create vtkVolume from a dicom series files In-Reply-To: References: <1451990019314-5735781.post@n5.nabble.com> <1452072596299-5735808.post@n5.nabble.com> Message-ID: <1452093919271-5735817.post@n5.nabble.com> Hello, Cory Quammen-2 wrote > Maybe try removing this: > > imageViewer->GetRenderer()->AddViewProp(volume); > > and see if the bright square goes away. Effectively, when the code lines above were commented, the bright square goes away. Ok for the information of volume in vtkImageData. Best regards, -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-vtkVolume-from-a-dicom-series-files-tp5735781p5735817.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Wed Jan 6 11:00:53 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Wed, 6 Jan 2016 17:00:53 +0100 Subject: [vtkusers] vtkFastSplatter broken? In-Reply-To: References: <1450353507849-5735566.post@n5.nabble.com> Message-ID: Cory, If possible I?d like to splat them into an existing image. When repeating the process many times for a large image, surely it becomes rather slow to create a new image each time and set all the other values to zero? Regards, Richard > On 06 Jan 2016, at 15:19, Cory Quammen wrote: > > Richard, > > Not sure what you mean. You are splatting a vtkImageData at the 5 > points you defined into a new image. Do you mean you want to splat > them into an existing image? > > Thanks, > Cory > > On Wed, Jan 6, 2016 at 6:19 AM, Richard Brown > > wrote: >> Cory, >> >> Thanks for the help. Still trying to wrap my head around it though - is there any way to splat a pre-existing vtkImageData? >> >> Regards, >> Richard >> >>> On 05 Jan 2016, at 21:59, Cory Quammen wrote: >>> >>> Hi Richard, >>> >>> I think you had two problems in your code: >>> >>> 1). The vtkFastSplatter was auto-determining the origin and pixel >>> spacing of the output image. When you moved the one point around, the >>> origin was adjusted so that it was always at the location of the one >>> point. This appeared in the renderer as though nothing was happening. >>> You can fix this by adding a call to >>> >>> splatter->SetModelBounds(...) >>> >>> to some fixed bounding box. >>> >>> 2). Moving points 2-5 by 1 unit in space won't really be visible in an >>> image where the voxel size is also 1 and the splat is relatively >>> large. You can fix this by moving the points a further distance. >>> >>> Here is a modified version of your example where the points show up >>> where expected: >>> >>> /* >>> * Copyright 2004 Sandia Corporation. >>> * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive >>> * license for use of this work by or on behalf of the >>> * U.S. Government. Redistribution and use in source and binary forms, with >>> * or without modification, are permitted provided that this Notice and any >>> * statement of authorship are reproduced on all copies. >>> */ >>> >>> // Simple test of vtkFastSplatter >>> #include "vtkImageData.h" >>> #include "vtkImageShiftScale.h" >>> #include "vtkFastSplatter.h" >>> #include "vtkImageViewer2.h" >>> #include "vtkPoints.h" >>> #include "vtkPolyData.h" >>> #include "vtkRenderer.h" >>> #include "vtkRenderWindow.h" >>> #include "vtkRenderWindowInteractor.h" >>> >>> #include "vtkSmartPointer.h" >>> #define VTK_CREATE(type, name) \ >>> >>> vtkSmartPointer name = vtkSmartPointer::New() >>> >>> #include >>> >>> const int SPLAT_IMAGE_SIZE = 100; >>> >>> int main(int, char *[]) >>> { >>> // For the purposes of this example we'll build the splat image by >>> // hand. >>> >>> VTK_CREATE(vtkImageData, SplatImage); >>> SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); >>> SplatImage->AllocateScalars(VTK_FLOAT, 1); >>> >>> for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) >>> { >>> for (int j = 0; j < SPLAT_IMAGE_SIZE; ++j) >>> { >>> double xCoord = 1 - fabs( (i - SPLAT_IMAGE_SIZE/2) >>> / (SPLAT_IMAGE_SIZE/2.0) ); >>> double yCoord = 1 - fabs( (j - SPLAT_IMAGE_SIZE/2) >>> / (SPLAT_IMAGE_SIZE/2.0) ); >>> >>> SplatImage->SetScalarComponentFromDouble(i, j, 0, 0, >>> xCoord * yCoord ); >>> } >>> } >>> >>> VTK_CREATE(vtkPolyData, SplatPoints); >>> VTK_CREATE(vtkPoints, Points); >>> >>> Points->SetNumberOfPoints( 5 ); >>> double point[3]; >>> >>> // Move the points further >>> point[0] = 100; >>> point[1] = 100; >>> point[2] = 0; >>> Points->SetPoint( 0, point ); >>> >>> point[0] = 100; >>> point[1] = 0; >>> point[2] = 0; >>> Points->SetPoint( 1, point ); >>> >>> point[0] = 0; >>> point[1] = 100; >>> point[2] = 0; >>> Points->SetPoint( 2, point ); >>> >>> point[0] = 0; >>> point[1] = 0; >>> point[2] = 0; >>> Points->SetPoint( 3, point ); >>> >>> point[0] = 199; >>> point[1] = 199; >>> point[2] = 0; >>> Points->SetPoint( 4, point ); >>> >>> SplatPoints->SetPoints(Points); >>> >>> VTK_CREATE(vtkFastSplatter, splatter); >>> splatter->SetInputData( SplatPoints ); >>> splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, >>> 2*SPLAT_IMAGE_SIZE, >>> 1 ); >>> >>> // Fix the model bounds rather than relying on vtkFastSplatter to >>> calculate them >>> splatter->SetModelBounds(0, 199, 0, 199, 0, 0); >>> splatter->SetInputData(1, SplatImage ); >>> >>> // The image viewers and writers are only happy with unsigned char >>> // images. This will convert the floats into that format. >>> VTK_CREATE(vtkImageShiftScale, resultScale); >>> resultScale->SetOutputScalarTypeToUnsignedChar(); >>> resultScale->SetShift(0); >>> resultScale->SetScale(255); >>> resultScale->SetInputConnection( splatter->GetOutputPort() ); >>> >>> splatter->Update(); >>> resultScale->Update(); >>> >>> splatter->GetOutput()->Print(cout); >>> >>> // Set up a viewer for the image. vtkImageViewer and >>> // vtkImageViewer2 are convenient wrappers around vtkActor2D, >>> // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need >>> // to supply is the interactor and hooray, Bob's your uncle. >>> VTK_CREATE(vtkImageViewer2, ImageViewer); >>> ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); >>> ImageViewer->SetColorLevel(127); >>> ImageViewer->SetColorWindow(255); >>> >>> VTK_CREATE(vtkRenderWindowInteractor, iren); >>> ImageViewer->SetupInteractor(iren); >>> >>> ImageViewer->Render(); >>> ImageViewer->GetRenderer()->ResetCamera(); >>> >>> iren->Initialize(); >>> ImageViewer->Render(); >>> iren->Start(); >>> >>> return EXIT_SUCCESS; >>> } >>> >>> HTH, >>> Cory >>> >>> >>> On Thu, Dec 17, 2015 at 6:58 AM, mbcx9rb9 wrote: >>>> Hi all, >>>> >>>> I was hoping to use vtkFastSplatter so I took a look at the test. However, >>>> it doesn't work how I expected (or how it should, I think). >>>> >>>> The example places 5 splatters at various coordinates. But I can't control >>>> the position of those splats. If I comment out all but the first splat and >>>> then change the coordinates, it doesn't move! >>>> >>>> Below is the relevant code, can someone confirm that if they change point[0] >>>> and point[1], nothing happens? Then, try adding in a second splat (remember >>>> to change Points->SetNumberOfPoints( 1 ) to 2), changing its coordinates and >>>> observe that weird things start happening... >>>> >>>> >>>> /* >>>> * Copyright 2004 Sandia Corporation. >>>> * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive >>>> * license for use of this work by or on behalf of the >>>> * U.S. Government. Redistribution and use in source and binary forms, with >>>> * or without modification, are permitted provided that this Notice and any >>>> * statement of authorship are reproduced on all copies. >>>> */ >>>> >>>> // Simple test of vtkFastSplatter >>>> >>>> #include "vtkImageData.h" >>>> #include "vtkImageShiftScale.h" >>>> #include "vtkFastSplatter.h" >>>> #include "vtkImageViewer2.h" >>>> #include "vtkPoints.h" >>>> #include "vtkPolyData.h" >>>> #include "vtkRenderer.h" >>>> #include "vtkRenderWindow.h" >>>> #include "vtkRenderWindowInteractor.h" >>>> >>>> #include "vtkSmartPointer.h" >>>> #define VTK_CREATE(type, name) \ >>>> vtkSmartPointer name = vtkSmartPointer::New() >>>> >>>> #include >>>> >>>> const int SPLAT_IMAGE_SIZE = 100; >>>> >>>> int main(int, char *[]) >>>> { >>>> // For the purposes of this example we'll build the splat image by >>>> // hand. >>>> >>>> VTK_CREATE(vtkImageData, SplatImage); >>>> SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); >>>> SplatImage->AllocateScalars(VTK_FLOAT, 1); >>>> >>>> for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) >>>> { >>>> for (int j = 0; j < SPLAT_IMAGE_SIZE; ++j) >>>> { >>>> double xCoord = 1 - fabs( (i - SPLAT_IMAGE_SIZE/2) >>>> / (SPLAT_IMAGE_SIZE/2.0) ); >>>> double yCoord = 1 - fabs( (j - SPLAT_IMAGE_SIZE/2) >>>> / (SPLAT_IMAGE_SIZE/2.0) ); >>>> >>>> SplatImage->SetScalarComponentFromDouble(i, j, 0, 0, >>>> xCoord * yCoord ); >>>> } >>>> } >>>> >>>> VTK_CREATE(vtkPolyData, SplatPoints); >>>> VTK_CREATE(vtkPoints, Points); >>>> >>>> Points->SetNumberOfPoints( 1 ); >>>> double point[3]; >>>> >>>> point[0] = 0; >>>> point[1] = 0; >>>> point[2] = 0; >>>> Points->SetPoint( 0, point ); >>>> /* >>>> point[0] = 1; >>>> point[1] = 0; >>>> point[2] = 0; >>>> Points->SetPoint( 1, point ); >>>> >>>> point[0] = -1; >>>> point[1] = 1; >>>> point[2] = 0; >>>> Points->SetPoint( 2, point ); >>>> >>>> point[0] = 1; >>>> point[1] = -1; >>>> point[2] = 0; >>>> Points->SetPoint( 3, point ); >>>> >>>> point[0] = -1; >>>> point[1] = -1; >>>> point[2] = 0; >>>> Points->SetPoint( 4, point ); >>>> */ >>>> SplatPoints->SetPoints(Points); >>>> >>>> VTK_CREATE(vtkFastSplatter, splatter); >>>> splatter->SetInputData( SplatPoints ); >>>> splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, >>>> 2*SPLAT_IMAGE_SIZE, >>>> 1 ); >>>> splatter->SetInputData(1, SplatImage ); >>>> >>>> // The image viewers and writers are only happy with unsigned char >>>> // images. This will convert the floats into that format. >>>> VTK_CREATE(vtkImageShiftScale, resultScale); >>>> resultScale->SetOutputScalarTypeToUnsignedChar(); >>>> resultScale->SetShift(0); >>>> resultScale->SetScale(255); >>>> resultScale->SetInputConnection( splatter->GetOutputPort() ); >>>> >>>> splatter->Update(); >>>> resultScale->Update(); >>>> >>>> // Set up a viewer for the image. vtkImageViewer and >>>> // vtkImageViewer2 are convenient wrappers around vtkActor2D, >>>> // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need >>>> // to supply is the interactor and hooray, Bob's your uncle. >>>> VTK_CREATE(vtkImageViewer2, ImageViewer); >>>> ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); >>>> ImageViewer->SetColorLevel(127); >>>> ImageViewer->SetColorWindow(255); >>>> >>>> VTK_CREATE(vtkRenderWindowInteractor, iren); >>>> ImageViewer->SetupInteractor(iren); >>>> >>>> ImageViewer->Render(); >>>> ImageViewer->GetRenderer()->ResetCamera(); >>>> >>>> iren->Initialize(); >>>> ImageViewer->Render(); >>>> iren->Start(); >>>> >>>> return EXIT_SUCCESS; >>>> } >>>> >>>> >>>> >>>> >>>> -- >>>> View this message in context: http://vtk.1045678.n5.nabble.com/vtkFastSplatter-broken-tp5735566.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. >> > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Jan 6 11:07:29 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 6 Jan 2016 11:07:29 -0500 Subject: [vtkusers] vtkFastSplatter broken? In-Reply-To: References: <1450353507849-5735566.post@n5.nabble.com> Message-ID: Richard, On Wed, Jan 6, 2016 at 11:00 AM, Richard Brown wrote: > Cory, > > If possible I?d like to splat them into an existing image. Makes sense, but vtkFastSplatter takes a vtkImageData input into which you might splat. One could add a third input that, if present, would be the image into which splatting occurs. If you wanted to patch VTK and submit the change, it would likely have a good chance of being integrated. > When repeating > the process many times for a large image, surely it becomes rather slow to > create a new image each time and set all the other values to zero? My guess is that the splatting is going to take much longer than allocating and initializing a new vtkImageData. Thanks, Cory > > Regards, > Richard > > On 06 Jan 2016, at 15:19, Cory Quammen wrote: > > Richard, > > Not sure what you mean. You are splatting a vtkImageData at the 5 > points you defined into a new image. Do you mean you want to splat > them into an existing image? > > Thanks, > Cory > > On Wed, Jan 6, 2016 at 6:19 AM, Richard Brown > wrote: > > Cory, > > Thanks for the help. Still trying to wrap my head around it though - is > there any way to splat a pre-existing vtkImageData? > > Regards, > Richard > > On 05 Jan 2016, at 21:59, Cory Quammen wrote: > > Hi Richard, > > I think you had two problems in your code: > > 1). The vtkFastSplatter was auto-determining the origin and pixel > spacing of the output image. When you moved the one point around, the > origin was adjusted so that it was always at the location of the one > point. This appeared in the renderer as though nothing was happening. > You can fix this by adding a call to > > splatter->SetModelBounds(...) > > to some fixed bounding box. > > 2). Moving points 2-5 by 1 unit in space won't really be visible in an > image where the voxel size is also 1 and the splat is relatively > large. You can fix this by moving the points a further distance. > > Here is a modified version of your example where the points show up > where expected: > > /* > * Copyright 2004 Sandia Corporation. > * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive > * license for use of this work by or on behalf of the > * U.S. Government. Redistribution and use in source and binary forms, with > * or without modification, are permitted provided that this Notice and any > * statement of authorship are reproduced on all copies. > */ > > // Simple test of vtkFastSplatter > #include "vtkImageData.h" > #include "vtkImageShiftScale.h" > #include "vtkFastSplatter.h" > #include "vtkImageViewer2.h" > #include "vtkPoints.h" > #include "vtkPolyData.h" > #include "vtkRenderer.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > > #include "vtkSmartPointer.h" > #define VTK_CREATE(type, name) \ > > vtkSmartPointer name = vtkSmartPointer::New() > > #include > > const int SPLAT_IMAGE_SIZE = 100; > > int main(int, char *[]) > { > // For the purposes of this example we'll build the splat image by > // hand. > > VTK_CREATE(vtkImageData, SplatImage); > SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); > SplatImage->AllocateScalars(VTK_FLOAT, 1); > > for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) > { > for (int j = 0; j < SPLAT_IMAGE_SIZE; ++j) > { > double xCoord = 1 - fabs( (i - SPLAT_IMAGE_SIZE/2) > / (SPLAT_IMAGE_SIZE/2.0) ); > double yCoord = 1 - fabs( (j - SPLAT_IMAGE_SIZE/2) > / (SPLAT_IMAGE_SIZE/2.0) ); > > SplatImage->SetScalarComponentFromDouble(i, j, 0, 0, > xCoord * yCoord ); > } > } > > VTK_CREATE(vtkPolyData, SplatPoints); > VTK_CREATE(vtkPoints, Points); > > Points->SetNumberOfPoints( 5 ); > double point[3]; > > // Move the points further > point[0] = 100; > point[1] = 100; > point[2] = 0; > Points->SetPoint( 0, point ); > > point[0] = 100; > point[1] = 0; > point[2] = 0; > Points->SetPoint( 1, point ); > > point[0] = 0; > point[1] = 100; > point[2] = 0; > Points->SetPoint( 2, point ); > > point[0] = 0; > point[1] = 0; > point[2] = 0; > Points->SetPoint( 3, point ); > > point[0] = 199; > point[1] = 199; > point[2] = 0; > Points->SetPoint( 4, point ); > > SplatPoints->SetPoints(Points); > > VTK_CREATE(vtkFastSplatter, splatter); > splatter->SetInputData( SplatPoints ); > splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, > 2*SPLAT_IMAGE_SIZE, > 1 ); > > // Fix the model bounds rather than relying on vtkFastSplatter to > calculate them > splatter->SetModelBounds(0, 199, 0, 199, 0, 0); > splatter->SetInputData(1, SplatImage ); > > // The image viewers and writers are only happy with unsigned char > // images. This will convert the floats into that format. > VTK_CREATE(vtkImageShiftScale, resultScale); > resultScale->SetOutputScalarTypeToUnsignedChar(); > resultScale->SetShift(0); > resultScale->SetScale(255); > resultScale->SetInputConnection( splatter->GetOutputPort() ); > > splatter->Update(); > resultScale->Update(); > > splatter->GetOutput()->Print(cout); > > // Set up a viewer for the image. vtkImageViewer and > // vtkImageViewer2 are convenient wrappers around vtkActor2D, > // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need > // to supply is the interactor and hooray, Bob's your uncle. > VTK_CREATE(vtkImageViewer2, ImageViewer); > ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); > ImageViewer->SetColorLevel(127); > ImageViewer->SetColorWindow(255); > > VTK_CREATE(vtkRenderWindowInteractor, iren); > ImageViewer->SetupInteractor(iren); > > ImageViewer->Render(); > ImageViewer->GetRenderer()->ResetCamera(); > > iren->Initialize(); > ImageViewer->Render(); > iren->Start(); > > return EXIT_SUCCESS; > } > > HTH, > Cory > > > On Thu, Dec 17, 2015 at 6:58 AM, mbcx9rb9 > wrote: > > Hi all, > > I was hoping to use vtkFastSplatter so I took a look at the test. However, > it doesn't work how I expected (or how it should, I think). > > The example places 5 splatters at various coordinates. But I can't control > the position of those splats. If I comment out all but the first splat and > then change the coordinates, it doesn't move! > > Below is the relevant code, can someone confirm that if they change point[0] > and point[1], nothing happens? Then, try adding in a second splat (remember > to change Points->SetNumberOfPoints( 1 ) to 2), changing its coordinates and > observe that weird things start happening... > > > /* > * Copyright 2004 Sandia Corporation. > * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive > * license for use of this work by or on behalf of the > * U.S. Government. Redistribution and use in source and binary forms, with > * or without modification, are permitted provided that this Notice and any > * statement of authorship are reproduced on all copies. > */ > > // Simple test of vtkFastSplatter > > #include "vtkImageData.h" > #include "vtkImageShiftScale.h" > #include "vtkFastSplatter.h" > #include "vtkImageViewer2.h" > #include "vtkPoints.h" > #include "vtkPolyData.h" > #include "vtkRenderer.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > > #include "vtkSmartPointer.h" > #define VTK_CREATE(type, name) \ > vtkSmartPointer name = vtkSmartPointer::New() > > #include > > const int SPLAT_IMAGE_SIZE = 100; > > int main(int, char *[]) > { > // For the purposes of this example we'll build the splat image by > // hand. > > VTK_CREATE(vtkImageData, SplatImage); > SplatImage->SetDimensions(SPLAT_IMAGE_SIZE, SPLAT_IMAGE_SIZE, 1); > SplatImage->AllocateScalars(VTK_FLOAT, 1); > > for (int i = 0; i < SPLAT_IMAGE_SIZE; ++i) > { > for (int j = 0; j < SPLAT_IMAGE_SIZE; ++j) > { > double xCoord = 1 - fabs( (i - SPLAT_IMAGE_SIZE/2) > / (SPLAT_IMAGE_SIZE/2.0) ); > double yCoord = 1 - fabs( (j - SPLAT_IMAGE_SIZE/2) > / (SPLAT_IMAGE_SIZE/2.0) ); > > SplatImage->SetScalarComponentFromDouble(i, j, 0, 0, > xCoord * yCoord ); > } > } > > VTK_CREATE(vtkPolyData, SplatPoints); > VTK_CREATE(vtkPoints, Points); > > Points->SetNumberOfPoints( 1 ); > double point[3]; > > point[0] = 0; > point[1] = 0; > point[2] = 0; > Points->SetPoint( 0, point ); > /* > point[0] = 1; > point[1] = 0; > point[2] = 0; > Points->SetPoint( 1, point ); > > point[0] = -1; > point[1] = 1; > point[2] = 0; > Points->SetPoint( 2, point ); > > point[0] = 1; > point[1] = -1; > point[2] = 0; > Points->SetPoint( 3, point ); > > point[0] = -1; > point[1] = -1; > point[2] = 0; > Points->SetPoint( 4, point ); > */ > SplatPoints->SetPoints(Points); > > VTK_CREATE(vtkFastSplatter, splatter); > splatter->SetInputData( SplatPoints ); > splatter->SetOutputDimensions( 2*SPLAT_IMAGE_SIZE, > 2*SPLAT_IMAGE_SIZE, > 1 ); > splatter->SetInputData(1, SplatImage ); > > // The image viewers and writers are only happy with unsigned char > // images. This will convert the floats into that format. > VTK_CREATE(vtkImageShiftScale, resultScale); > resultScale->SetOutputScalarTypeToUnsignedChar(); > resultScale->SetShift(0); > resultScale->SetScale(255); > resultScale->SetInputConnection( splatter->GetOutputPort() ); > > splatter->Update(); > resultScale->Update(); > > // Set up a viewer for the image. vtkImageViewer and > // vtkImageViewer2 are convenient wrappers around vtkActor2D, > // vtkImageMapper, vtkRenderer, and vtkRenderWindow. All you need > // to supply is the interactor and hooray, Bob's your uncle. > VTK_CREATE(vtkImageViewer2, ImageViewer); > ImageViewer->SetInputConnection( resultScale->GetOutputPort() ); > ImageViewer->SetColorLevel(127); > ImageViewer->SetColorWindow(255); > > VTK_CREATE(vtkRenderWindowInteractor, iren); > ImageViewer->SetupInteractor(iren); > > ImageViewer->Render(); > ImageViewer->GetRenderer()->ResetCamera(); > > iren->Initialize(); > ImageViewer->Render(); > iren->Start(); > > return EXIT_SUCCESS; > } > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkFastSplatter-broken-tp5735566.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. > > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > -- Cory Quammen R&D Engineer Kitware, Inc. From yumin.yuan at kitware.com Wed Jan 6 11:44:33 2016 From: yumin.yuan at kitware.com (Yumin Yuan) Date: Wed, 6 Jan 2016 11:44:33 -0500 Subject: [vtkusers] reading .neu file into vtkUnstructuredGrid object In-Reply-To: <1451754285160-5735732.post@n5.nabble.com> References: <1451754285160-5735732.post@n5.nabble.com> Message-ID: Hi Pavol, This is not answering your question directly, but in VTK, there is a vtkGAMBITReader, which outputs a vtkUnstructuredGrid. Is that reader not able to read your .neu file? If not, at least you can check out how it is constructing vtkUnstructuredGrid as output. Also, based on your description of what you want to do, you may want to checkout our Computational Model Builder (CMB) framework , especially the ModelBuilder application suite . The CMB suite is for managing the full life cycle of a simulation and the core resources required to define the simulation. The applications are developed on top of paraview, and the install package also includes a fairly-up-to-date paraview. Also like Paraview, all these tools are open source. If you have any questions on these tools, you can use these mailing lists Best, Yumin On Sat, Jan 2, 2016 at 12:04 PM, Pavol wrote: > Hello, > I'm trying to read .neu file into vtkUnstcturedGrid. > I have created vtkUnstructuredGrid object using > *vtkSmartPointer unstructuredGrid = > vtkSmartPointer::New();* > Every point coords are inserted into vtkPoints object which is at the end > ofreading set for unstructured gria via method SetPoints. Before reading > and > setting up cells for unstructuredGrid I am calling > *unstructuredGrid->Allocate(nCells);* (nCells represent total amount of > cells) in a while cycle I am reading ids of eah point which forms cell > (cells for the object are of same type) into idList and then using > *unstructuredGrid->InsertNextCell(VTK_HEXAHEDRON,idList);* I am inserting > cells into unstructuredGrid object. > Till this point everithing for me seems to be right and program seems to > work properly but visualizing this object I get this: > > output from paraview displaying points and object surface with edges: > > something is wrong there... object suppost to be regular cube formed by > cells of the smae type. So for me it seems like problem comes with cells... > > I am trying to read .neu file for points and cells and .msh file for the > faces. > I want to : > - use Gambit to create computing mesh for the object (furnace to be > spefific), > - read it into vtkUnstructuredGrid, > - set up initial and boundary conditions (especialy for this purpose i want > to read faces), > - using method of elementary balances compute material properies in time > during thermal processing, > - use vtkCellData (add multiple arrays) as data storage for computing, > - visuslize proces using paraview and vtk. > > So... > If anyone can help me with this, I will be really thankfull. > > Have a great day > Best regards > Pavol > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/reading-neu-file-into-vtkUnstructuredGrid-object-tp5735732.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 kenji.tsumura at neosoftmedical.com Wed Jan 6 13:31:30 2016 From: kenji.tsumura at neosoftmedical.com (Kenji Tsumura) Date: Wed, 6 Jan 2016 18:31:30 +0000 Subject: [vtkusers] VTK-7.0.0 RC1: vtkProperty2D LineStipplePattern with OpenGL2 Message-ID: <10285631702C4D4CB5C4921DC14337954EEA0563@neocoilexch01> Hi, I have posted a bug on vtkProperty2D LineStipplePattern. http://www.vtk.org/Bug/view.php?id=15918 The description of the bug is: vtkProperty2D LineStipplePattern doesn't work with OpenGL2 setting. When I use OpenGL setting, it worked. I can reproduce the bug using the attached modified example code. My environment is: VTK-7.0.0 RC1 CMake 3.1.1 Visual Studio 12 2013 Win 64 VTK_RENDERING_BACKEND OpenGL2 Thank you, Kenji Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wumengda at gmail.com Wed Jan 6 16:22:31 2016 From: wumengda at gmail.com (Mengda Wu) Date: Wed, 6 Jan 2016 16:22:31 -0500 Subject: [vtkusers] BUG: vtkImageMapToColors does not output with input spacing and origin Message-ID: Hi Vtkusers, I found a bug in vtkImageMapToColors. It does not output with input spacing and origin. It sets the spacing to [1,1,1] and origin to [0,0,0]. I am using VTK 6.2 but I believe it happens also in VTK 7.0. Can you fix this? Here is a test program and a sample image (input.mha) and its output(input-colormap.mha): vtkSmartPointer inputReader = vtkSmartPointer::New(); inputReader->SetFileName(argv[1]); try { inputReader->Update(); } catch(...) { std::cerr << "Error occurs when reading " << argv[1] << std::endl; return EXIT_FAILURE; } vtkSmartPointer lookupTable = vtkSmartPointer::New(); lookupTable->SetTableRange(0.0, 255.0); lookupTable->SetNumberOfTableValues(256); lookupTable->SetTableValue(0, 0.0, 0.0, 0.0, 0.0); for(vtkIdType i=1; i<256; i++) lookupTable->SetTableValue(i, 1.0, 0.0, 0.0, 0.4); lookupTable->Build(); vtkSmartPointer imageColor = vtkSmartPointer::New(); imageColor->SetInputConnection(inputReader->GetOutputPort()); imageColor->SetOutputFormatToRGBA(); imageColor->SetLookupTable(lookupTable); vtkSmartPointer< vtkMetaImageWriter > writer = vtkSmartPointer< vtkMetaImageWriter >::New(); writer->SetFileName(argv[2]); writer->SetInputConnection(imageColor->GetOutputPort()); try { writer->Write(); } catch(...) { std::cerr << "Error occurs when writing " << argv[2] << std::endl; return EXIT_FAILURE; } Thanks, Mengda -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: input.mha Type: application/octet-stream Size: 378 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: input-colormap.mha Type: application/octet-stream Size: 956 bytes Desc: not available URL: From dave.demarle at kitware.com Wed Jan 6 16:26:28 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 6 Jan 2016 16:26:28 -0500 Subject: [vtkusers] Building VTK 7.0.0 for PCL 1.8.0 In-Reply-To: References: Message-ID: vtkVisibleCellSelector was deprecated long ago and removed in 6.0. vtkHardwareSelector replaced it when it was first deprecated. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Dec 23, 2015 at 3:46 PM, Ken Martin wrote: > Included below is a response to a similar email from a while back - Ken > > > vtkgl.h can be replaced with vtk_glew.h > > the extension manager is not in the new backend but glew should provide > any extension checking support you need although with a different interface > > I am not sure about vtkVisibleCellSelector > > Thanks > Ken > > Ken Martin > Nov 19 > to VictorLamoine, vtk > If you are using the generic Rendering API (vtkActor/vtkCamera/etc) then > code should mostly work unchanged. If you are directly working with the > OpenGL implementation then the conversion really depends on what you were > doing as the implementation is fairly different. In terms of the two > specific issues you mentioned vtkgl.h can probably be replaced with > vtk_glew.h, I do not recall what vtkOpenGLHardwareSupport does but there is > no match for that class in the new backend. Given that you have a class > named vtkVertexBufferObject I am guessing you are getting into very > specific implementation details so the conversion may not be trivial. On > the plus side the new back end includes classes such as > vtkOpenGLVertexBufferObject so ... If you have further > questions/roadblocks let me know and I'll try to point you in the right > direction. > > P.S. vtkOpenGLPointGaussianMapper in the new backend may be worth a look > too as it renders both points and splats etc. > > Thanks > Ken > > > On Thu, Nov 19, 2015 at 5:10 PM, VictorLamoine > wrote: > >> Hello, >> >> The library I'm using (Point Cloud Library) cannot be compiled as is >> against >> a VTK version with OpenGL2 back end. (I'm using VTK trunk) >> There are some missing includes etc. >> >> Error examples: >> >> > In file included from >> > /home/victor/libraries/pcl >> /src/visualization/src/vtk/vtkVertexBufferObject.cxx:15:0: >> > /home/victor/libraries/pcl/src/visualization/include/pcl >> /visualization/vtk/vtkVertexBufferObject.h:35:62: >> > fatal error: vtkgl.h: No such file or directory >> > #include "vtkgl.h" // Needed for gl data types exposed in API >> > ^ >> > compilation terminated. >> > [ 50%] Built target pcl_poisson_reconstruction >> > In file included from >> > /home/victor/libraries/pcl >> /src/visualization/src/vtk/vtkVertexBufferObjectMapper.cxx:18:0: >> > /home/victor/libraries/pcl/src/visualization/include/pcl >> /visualization/vtk/vtkVertexBufferObject.h:35:62: >> > fatal error: vtkgl.h: No such file or directory >> > #include "vtkgl.h" // Needed for gl data types exposed in API >> > ^ >> > compilation terminated. >> > >> > /home/victor/libraries/pcl >> /src/visualization/src/pcl_visualizer.cpp:87:38: >> > fatal error: vtkOpenGLHardwareSupport.h: No such file or directory >> > #include >> > >> > ^ >> > compilation terminated. >> >> Is there a migration guide helping users getting their code working with >> OpenGL2 back end? >> if not, how do I make the association between old/new includes? (and maybe >> there are some differences in the classes ?) >> >> Bye >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Migrating-from-OpenGL-to-OpenGL2-tp5735123.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 >> > > > > On Wed, Dec 23, 2015 at 3:15 AM, Yuri A. wrote: > >> Good day everyone. >> >> I'm trying to build VTK for PCL library. Well VTK itself is compiled >> like a charm, without any error. But inside some the PCL files are >> some dependencies to those files: >> >> #include "vtkgl.h" >> #include "vtkOpenGLExtensionManager.h" >> #include >> >> And me and my compiler can't find those. >> >> It looks like file vtkgl.h should be generated by cmake and put into >> "/Rendering/vtkgl.h". But there is none. What settings should i use in >> Cmake for VTK? Or that file is not being generated anymore? What am i >> doing wrong? >> >> If you're interested my settings you can see in the attachments to the >> letter (not sure how attachments work in mailing list). >> >> Anyway than you, and have a good day. >> >> Yuri. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 juch at zhaw.ch Wed Jan 6 17:51:40 2016 From: juch at zhaw.ch (normanius) Date: Wed, 6 Jan 2016 15:51:40 -0700 (MST) Subject: [vtkusers] Problem with vtkInteractorStyleImage In-Reply-To: <1451918987500-5735760.post@n5.nabble.com> References: <1450771333999-5735629.post@n5.nabble.com> <1451903950268-5735755.post@n5.nabble.com> <1451907823752-5735756.post@n5.nabble.com> <1451918987500-5735760.post@n5.nabble.com> Message-ID: <1452120700069-5735825.post@n5.nabble.com> Hi Mercusyo The attached test does work as I would expect it. (Note that you have to press the shift button for the scene to move.) vtkInteractorStyleImage and MouseInteractorStyle1 behave identically, except for the messages of course. I haven't tested the behaviour for actors of type vtkImageActor for which vtkInteractorStyleImage has been specialised for. Can you send a minimal example that shows the problem? Cheers, No main.cpp -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-vtkInteractorStyleImage-tp5735629p5735825.html Sent from the VTK - Users mailing list archive at Nabble.com. From binarybottle at gmail.com Wed Jan 6 18:45:28 2016 From: binarybottle at gmail.com (Arno Klein) Date: Wed, 6 Jan 2016 18:45:28 -0500 Subject: [vtkusers] Migration to VTK6 Message-ID: Thank you all so much for your kind help. Unfortunately, I am still unable to compile the C++ code in my project on MacOSX, even after setting the following in my top-level CMakeLists.txt file: SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") When I type: $ export VERBOSE=1 $ make I get the following even though I don't have /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ but instead have /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ on my computer: ------------------ ... *Scanning dependencies of target TravelDepthMain* /Applications/Xcode.app/Contents/Developer/usr/bin/make -f travel_depth/CMakeFiles/TravelDepthMain.dir/build.make travel_depth/CMakeFiles/TravelDepthMain.dir/build [ 57%] Building CXX object travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" -I/software/install/miniconda2/include/vtk-6.3 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -isystem /software/install/miniconda2/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp make[2]: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', needed by `travel_depth/TravelDepthMain'. Stop. make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 make: *** [all] Error 2 ------------------- Cheers, @rno On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi wrote: > Hi Arno, > > I think that I've found out where the AGL link is coming from. It isn't > via Carbon, it looks like it was linked directly into the VTK that you're > using. And it looks like a bug within CMake itself. > > CMake has a module called FindOpenGL.cmake that VTK uses to find OpenGL. > It looks for both the OpenGL.framework and for the obsolete AGL.framework > (which is only for Carbon, and is deprecated by Apple). If it finds both > (e.g. with an older SDK and XCode 6 or earlier), then it uses both, even > though AGL.framework is really not needed for any modern software. > > This means that a VTK that is built with (for example) Xcode 6 and its > SDKs becomes linked to AGL, because AGL.framework is present in those older > SDKs. It's a private link, though, so I'm surprised that it would cause > the error. But you are building with Xcode 7 and you are seeing an > error... that much is indisputable. > > I suggest that you enable verbose error reporting so that you can see > exactly what is being linked when the error occurs: > > export VERBOSE=1 > make > ... > > Use "unset VERBOSE" to turn off the verbosity. > > - David > > > On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein > wrote: > >> I tried again, and am still getting the AGL.framework error even when I >> set to 10.9 and the SDK to 10.11 (see: >> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >> ): >> >> > [ 57%] Building CXX object >> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >> > make[2]: *** No rule to make target >> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >> needed by `travel_depth/TravelDepthMain'. Stop. >> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >> > make: *** [all] Error 2 >> >> Could you please tell me how to ensure that there are no calls to Carbon >> APIs? >> >> By the way, I am tracking this as an issue on Github: >> https://github.com/nipy/mindboggle/issues/69 >> >> Cheers, >> @rno >> >> >> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi >> wrote: >> >>> Hi Arno, >>> >>> Using the macosx10.11 SDK is fine as long as it allows you to set this >>> desired deployment target. So if you are able to compile with the >>> following settings, then the result should run on OS X 10.7: >>> >>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>> >>> I'm not sure how far back you can set the deployment target with this >>> SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9. >>> >>> If if gives errors for the AGL.framework, then make sure that your code >>> has no calls to Carbon APIs. >>> >>> - David >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jan 6 19:02:43 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 6 Jan 2016 17:02:43 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Hi Arno, Look for the following line in your CMakeCache.txt: OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework Change it to the following and then recompile: OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework That should keep the problematic AGL library out of your build. Please let me know if this works. Cheers, - David On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein wrote: > Thank you all so much for your kind help. Unfortunately, I am still > unable to compile the C++ code in my project on MacOSX, even after setting > the following in my top-level CMakeLists.txt file: > SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") > > When I type: > $ export VERBOSE=1 > $ make > > I get the following even though I don't have > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ > but instead have > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ > on my computer: > > ------------------ > ... > > *Scanning dependencies of target TravelDepthMain* > > /Applications/Xcode.app/Contents/Developer/usr/bin/make -f > travel_depth/CMakeFiles/TravelDepthMain.dir/build.make > travel_depth/CMakeFiles/TravelDepthMain.dir/build > > [ 57%] Building CXX object > travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o > > cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ > -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" > -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" > -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" > -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" > -I/software/install/miniconda2/include/vtk-6.3 > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > -isystem /software/install/miniconda2/include -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk > -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c > /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp > > make[2]: *** No rule to make target > `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', > needed by `travel_depth/TravelDepthMain'. Stop. > > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 > > make: *** [all] Error 2 > ------------------- > > > Cheers, > @rno > > On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi > wrote: > >> Hi Arno, >> >> I think that I've found out where the AGL link is coming from. It isn't >> via Carbon, it looks like it was linked directly into the VTK that you're >> using. And it looks like a bug within CMake itself. >> >> CMake has a module called FindOpenGL.cmake that VTK uses to find OpenGL. >> It looks for both the OpenGL.framework and for the obsolete AGL.framework >> (which is only for Carbon, and is deprecated by Apple). If it finds both >> (e.g. with an older SDK and XCode 6 or earlier), then it uses both, even >> though AGL.framework is really not needed for any modern software. >> >> This means that a VTK that is built with (for example) Xcode 6 and its >> SDKs becomes linked to AGL, because AGL.framework is present in those older >> SDKs. It's a private link, though, so I'm surprised that it would cause >> the error. But you are building with Xcode 7 and you are seeing an >> error... that much is indisputable. >> >> I suggest that you enable verbose error reporting so that you can see >> exactly what is being linked when the error occurs: >> >> export VERBOSE=1 >> make >> ... >> >> Use "unset VERBOSE" to turn off the verbosity. >> >> - David >> >> >> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein >> wrote: >> >>> I tried again, and am still getting the AGL.framework error even when I >>> set to 10.9 and the SDK to 10.11 (see: >>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>> ): >>> >>> > [ 57%] Building CXX object >>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>> > make[2]: *** No rule to make target >>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>> needed by `travel_depth/TravelDepthMain'. Stop. >>> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>> > make: *** [all] Error 2 >>> >>> Could you please tell me how to ensure that there are no calls to Carbon >>> APIs? >>> >>> By the way, I am tracking this as an issue on Github: >>> https://github.com/nipy/mindboggle/issues/69 >>> >>> Cheers, >>> @rno >>> >>> >>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi >>> wrote: >>> >>>> Hi Arno, >>>> >>>> Using the macosx10.11 SDK is fine as long as it allows you to set this >>>> desired deployment target. So if you are able to compile with the >>>> following settings, then the result should run on OS X 10.7: >>>> >>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>> >>>> I'm not sure how far back you can set the deployment target with this >>>> SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9. >>>> >>>> If if gives errors for the AGL.framework, then make sure that your code >>>> has no calls to Carbon APIs. >>>> >>>> - David >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jan 6 19:12:17 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 6 Jan 2016 17:12:17 -0700 Subject: [vtkusers] VTK-7.0.0 RC1: Image reslice with OpenGL2 In-Reply-To: References: <10285631702C4D4CB5C4921DC14337954EEA0455@neocoilexch01> Message-ID: Hi Kenji, I've confirmed that the bug is present for vtk-7.0.0.rc1 (Dec 10) but was absent at commit 06ad5dec (Tue Oct 27). I share your opinion that this is a critical bug. - David On Wed, Jan 6, 2016 at 7:53 AM, David Gobbi wrote: > Hi Kenji, > > Thanks for the bug report, I'll look into this. > > - David > > > On Wed, Jan 6, 2016 at 7:11 AM, Kenji Tsumura < > kenji.tsumura at neosoftmedical.com> wrote: > >> Hi, >> >> >> >> I have posted a bug on image re-slice using vtkImageResliceMapper. >> >> http://www.vtk.org/Bug/view.php?id=15914 >> >> >> >> The description of the bug is: >> >> >> >> When I rotated a volume image, a portion of the resliced image is missing >> sometimes. The bug can be reproducible using the attached test code. As far >> as I can tell, the bug doesn't occur with VTK_RENDERING_BACKEND OpenGL >> setting. >> >> >> >> My environment is: >> >> VTK-7.0.0 RC1 >> >> CMake 3.1.1 >> >> Visual Studio 12 2013 Win 64 >> >> >> >> Thank you, >> >> >> >> Kenji >> Disclaimer: The information contained in this communication may be >> confidential, is intended only for the use of the recipient(s) named above, >> and may be legally privileged. If the reader of this message is not the >> intended recipient, you are hereby notified that any dissemination, >> distribution, or copying of this communication, or any of its contents, is >> strictly prohibited. If you have received this communication in error, >> please return it to the sender immediately and delete the original message >> and any copy of it from your computer system. If you have any questions >> concerning this message, please contact the sender. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jan 6 19:22:04 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 6 Jan 2016 17:22:04 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Also see this related patch that was added to cmake itself two weeks ago: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08580be2 On Wed, Jan 6, 2016 at 5:02 PM, David Gobbi wrote: > Hi Arno, > > Look for the following line in your CMakeCache.txt: > > OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework > > Change it to the following and then recompile: > > OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework > > That should keep the problematic AGL library out of your build. > > Please let me know if this works. > > Cheers, > - David > > > On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein wrote: > >> Thank you all so much for your kind help. Unfortunately, I am still >> unable to compile the C++ code in my project on MacOSX, even after setting >> the following in my top-level CMakeLists.txt file: >> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >> >> When I type: >> $ export VERBOSE=1 >> $ make >> >> I get the following even though I don't have >> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >> but instead have >> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >> on my computer: >> >> ------------------ >> ... >> >> *Scanning dependencies of target TravelDepthMain* >> >> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >> travel_depth/CMakeFiles/TravelDepthMain.dir/build >> >> [ 57%] Building CXX object >> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >> >> cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >> -I/software/install/miniconda2/include/vtk-6.3 >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >> -isystem /software/install/miniconda2/include -isysroot >> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >> >> make[2]: *** No rule to make target >> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >> needed by `travel_depth/TravelDepthMain'. Stop. >> >> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >> >> make: *** [all] Error 2 >> ------------------- >> >> >> Cheers, >> @rno >> >> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi >> wrote: >> >>> Hi Arno, >>> >>> I think that I've found out where the AGL link is coming from. It isn't >>> via Carbon, it looks like it was linked directly into the VTK that you're >>> using. And it looks like a bug within CMake itself. >>> >>> CMake has a module called FindOpenGL.cmake that VTK uses to find >>> OpenGL. It looks for both the OpenGL.framework and for the obsolete >>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>> both, even though AGL.framework is really not needed for any modern >>> software. >>> >>> This means that a VTK that is built with (for example) Xcode 6 and its >>> SDKs becomes linked to AGL, because AGL.framework is present in those older >>> SDKs. It's a private link, though, so I'm surprised that it would cause >>> the error. But you are building with Xcode 7 and you are seeing an >>> error... that much is indisputable. >>> >>> I suggest that you enable verbose error reporting so that you can see >>> exactly what is being linked when the error occurs: >>> >>> export VERBOSE=1 >>> make >>> ... >>> >>> Use "unset VERBOSE" to turn off the verbosity. >>> >>> - David >>> >>> >>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein >>> wrote: >>> >>>> I tried again, and am still getting the AGL.framework error even when I >>>> set to 10.9 and the SDK to 10.11 (see: >>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>> ): >>>> >>>> > [ 57%] Building CXX object >>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>> > make[2]: *** No rule to make target >>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>> > make: *** [all] Error 2 >>>> >>>> Could you please tell me how to ensure that there are no calls to >>>> Carbon APIs? >>>> >>>> By the way, I am tracking this as an issue on Github: >>>> https://github.com/nipy/mindboggle/issues/69 >>>> >>>> Cheers, >>>> @rno >>>> >>>> >>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi >>>> wrote: >>>> >>>>> Hi Arno, >>>>> >>>>> Using the macosx10.11 SDK is fine as long as it allows you to set this >>>>> desired deployment target. So if you are able to compile with the >>>>> following settings, then the result should run on OS X 10.7: >>>>> >>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>> >>>>> I'm not sure how far back you can set the deployment target with this >>>>> SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9. >>>>> >>>>> If if gives errors for the AGL.framework, then make sure that your >>>>> code has no calls to Carbon APIs. >>>>> >>>>> - David >>>>> >>>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From binarybottle at gmail.com Wed Jan 6 19:34:19 2016 From: binarybottle at gmail.com (Arno Klein) Date: Wed, 6 Jan 2016 19:34:19 -0500 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: David -- There was no instance of "AGL" in CMakeCache.txt, but I replaced every instance of "AGL" with OpenGL" in all of the build.make files. Without cmake, but with make I got the following error: make[2]: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', needed by `travel_depth/TravelDepthMain'. Stop. It still calls 10.7 even though I have 10.11 installed on my Mac. Cheers, @rno On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi wrote: > Hi Arno, > > Look for the following line in your CMakeCache.txt: > > OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework > > Change it to the following and then recompile: > > OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework > > That should keep the problematic AGL library out of your build. > > Please let me know if this works. > > Cheers, > - David > > > On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein wrote: > >> Thank you all so much for your kind help. Unfortunately, I am still >> unable to compile the C++ code in my project on MacOSX, even after setting >> the following in my top-level CMakeLists.txt file: >> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >> >> When I type: >> $ export VERBOSE=1 >> $ make >> >> I get the following even though I don't have >> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >> but instead have >> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >> on my computer: >> >> ------------------ >> ... >> >> *Scanning dependencies of target TravelDepthMain* >> >> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >> travel_depth/CMakeFiles/TravelDepthMain.dir/build >> >> [ 57%] Building CXX object >> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >> >> cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >> -I/software/install/miniconda2/include/vtk-6.3 >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >> -isystem /software/install/miniconda2/include -isysroot >> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >> >> make[2]: *** No rule to make target >> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >> needed by `travel_depth/TravelDepthMain'. Stop. >> >> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >> >> make: *** [all] Error 2 >> ------------------- >> >> >> Cheers, >> @rno >> >> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi >> wrote: >> >>> Hi Arno, >>> >>> I think that I've found out where the AGL link is coming from. It isn't >>> via Carbon, it looks like it was linked directly into the VTK that you're >>> using. And it looks like a bug within CMake itself. >>> >>> CMake has a module called FindOpenGL.cmake that VTK uses to find >>> OpenGL. It looks for both the OpenGL.framework and for the obsolete >>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>> both, even though AGL.framework is really not needed for any modern >>> software. >>> >>> This means that a VTK that is built with (for example) Xcode 6 and its >>> SDKs becomes linked to AGL, because AGL.framework is present in those older >>> SDKs. It's a private link, though, so I'm surprised that it would cause >>> the error. But you are building with Xcode 7 and you are seeing an >>> error... that much is indisputable. >>> >>> I suggest that you enable verbose error reporting so that you can see >>> exactly what is being linked when the error occurs: >>> >>> export VERBOSE=1 >>> make >>> ... >>> >>> Use "unset VERBOSE" to turn off the verbosity. >>> >>> - David >>> >>> >>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein >>> wrote: >>> >>>> I tried again, and am still getting the AGL.framework error even when I >>>> set to 10.9 and the SDK to 10.11 (see: >>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>> ): >>>> >>>> > [ 57%] Building CXX object >>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>> > make[2]: *** No rule to make target >>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>> > make: *** [all] Error 2 >>>> >>>> Could you please tell me how to ensure that there are no calls to >>>> Carbon APIs? >>>> >>>> By the way, I am tracking this as an issue on Github: >>>> https://github.com/nipy/mindboggle/issues/69 >>>> >>>> Cheers, >>>> @rno >>>> >>>> >>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi >>>> wrote: >>>> >>>>> Hi Arno, >>>>> >>>>> Using the macosx10.11 SDK is fine as long as it allows you to set this >>>>> desired deployment target. So if you are able to compile with the >>>>> following settings, then the result should run on OS X 10.7: >>>>> >>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>> >>>>> I'm not sure how far back you can set the deployment target with this >>>>> SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9. >>>>> >>>>> If if gives errors for the AGL.framework, then make sure that your >>>>> code has no calls to Carbon APIs. >>>>> >>>>> - David >>>>> >>>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Wed Jan 6 19:56:52 2016 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Wed, 6 Jan 2016 17:56:52 -0700 (MST) Subject: [vtkusers] how can make the surface rendering result more beautiful In-Reply-To: References: <1452079522528-5735809.post@n5.nabble.com> Message-ID: <1452128212377-5735831.post@n5.nabble.com> The unnecessary is highlighted with blue pens. Please see the attached image. And I used the vtkMarchingCubes to render the surface,and then used the vtkSmoothPolydataMapper to smooth the surface. -- View this message in context: http://vtk.1045678.n5.nabble.com/how-can-make-the-surface-rendering-result-more-beautiful-tp5735809p5735831.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Jan 6 20:48:51 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 6 Jan 2016 18:48:51 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Hi Arno, It could be a stale dependency. Remove everything after the "INTERNAL cache entries" comment in your CMakeCache.txt, and also search your cache to make sure that 10.7 does not appear anywhere. Also do an "ls -l /System/Library/Frameworks/" to make sure that the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I don't see how that could happen). - David On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein wrote: > David -- > > There was no instance of "AGL" in CMakeCache.txt, but I replaced every > instance of "AGL" with OpenGL" in all of the build.make files. Without > cmake, but with make I got the following error: > > make[2]: *** No rule to make target > `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', > needed by `travel_depth/TravelDepthMain'. Stop. > > It still calls 10.7 even though I have 10.11 installed on my Mac. > > Cheers, > @rno > > On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi wrote: > >> Hi Arno, >> >> Look for the following line in your CMakeCache.txt: >> >> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >> >> Change it to the following and then recompile: >> >> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >> >> That should keep the problematic AGL library out of your build. >> >> Please let me know if this works. >> >> Cheers, >> - David >> >> >> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein >> wrote: >> >>> Thank you all so much for your kind help. Unfortunately, I am still >>> unable to compile the C++ code in my project on MacOSX, even after setting >>> the following in my top-level CMakeLists.txt file: >>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>> >>> When I type: >>> $ export VERBOSE=1 >>> $ make >>> >>> I get the following even though I don't have >>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>> but instead have >>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>> on my computer: >>> >>> ------------------ >>> ... >>> >>> *Scanning dependencies of target TravelDepthMain* >>> >>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>> >>> [ 57%] Building CXX object >>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>> >>> cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>> -I/software/install/miniconda2/include/vtk-6.3 >>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>> -isystem /software/install/miniconda2/include -isysroot >>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>> >>> make[2]: *** No rule to make target >>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>> needed by `travel_depth/TravelDepthMain'. Stop. >>> >>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>> >>> make: *** [all] Error 2 >>> ------------------- >>> >>> >>> Cheers, >>> @rno >>> >>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi >>> wrote: >>> >>>> Hi Arno, >>>> >>>> I think that I've found out where the AGL link is coming from. It >>>> isn't via Carbon, it looks like it was linked directly into the VTK that >>>> you're using. And it looks like a bug within CMake itself. >>>> >>>> CMake has a module called FindOpenGL.cmake that VTK uses to find >>>> OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>> both, even though AGL.framework is really not needed for any modern >>>> software. >>>> >>>> This means that a VTK that is built with (for example) Xcode 6 and its >>>> SDKs becomes linked to AGL, because AGL.framework is present in those older >>>> SDKs. It's a private link, though, so I'm surprised that it would cause >>>> the error. But you are building with Xcode 7 and you are seeing an >>>> error... that much is indisputable. >>>> >>>> I suggest that you enable verbose error reporting so that you can see >>>> exactly what is being linked when the error occurs: >>>> >>>> export VERBOSE=1 >>>> make >>>> ... >>>> >>>> Use "unset VERBOSE" to turn off the verbosity. >>>> >>>> - David >>>> >>>> >>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein >>>> wrote: >>>> >>>>> I tried again, and am still getting the AGL.framework error even when >>>>> I set to 10.9 and the SDK to 10.11 (see: >>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>> ): >>>>> >>>>> > [ 57%] Building CXX object >>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>> > make[2]: *** No rule to make target >>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error >>>>> 2 >>>>> > make: *** [all] Error 2 >>>>> >>>>> Could you please tell me how to ensure that there are no calls to >>>>> Carbon APIs? >>>>> >>>>> By the way, I am tracking this as an issue on Github: >>>>> https://github.com/nipy/mindboggle/issues/69 >>>>> >>>>> Cheers, >>>>> @rno >>>>> >>>>> >>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi >>>>> wrote: >>>>> >>>>>> Hi Arno, >>>>>> >>>>>> Using the macosx10.11 SDK is fine as long as it allows you to set >>>>>> this desired deployment target. So if you are able to compile with the >>>>>> following settings, then the result should run on OS X 10.7: >>>>>> >>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>> >>>>>> I'm not sure how far back you can set the deployment target with this >>>>>> SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9. >>>>>> >>>>>> If if gives errors for the AGL.framework, then make sure that your >>>>>> code has no calls to Carbon APIs. >>>>>> >>>>>> - David >>>>>> >>>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From binarybottle at gmail.com Wed Jan 6 21:19:38 2016 From: binarybottle at gmail.com (Arno Klein) Date: Wed, 6 Jan 2016 21:19:38 -0500 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Dear David, When I clear the bin directory, then run "cmake .." and "make" I don't find any instance of 10.7 mentioned in any file, but still get "AGL.framework" in every subdirectory's build.make file. The CMakeCache.txt file contains the following line: CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk And yet I am still receiving the following error: make[2]: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', needed by `travel_depth/TravelDepthMain'. Stop. Cheers, @rno On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi wrote: > Hi Arno, > > It could be a stale dependency. Remove everything after the "INTERNAL > cache entries" comment in your CMakeCache.txt, and also search your cache > to make sure that 10.7 does not appear anywhere. > > Also do an "ls -l /System/Library/Frameworks/" to make sure that the > OpenGL framework isn't a link to a non-existent 10.7 SDK (though I don't > see how that could happen). > > - David > > > On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein wrote: > >> David -- >> >> There was no instance of "AGL" in CMakeCache.txt, but I replaced every >> instance of "AGL" with OpenGL" in all of the build.make files. Without >> cmake, but with make I got the following error: >> >> make[2]: *** No rule to make target >> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >> needed by `travel_depth/TravelDepthMain'. Stop. >> >> It still calls 10.7 even though I have 10.11 installed on my Mac. >> >> Cheers, >> @rno >> >> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi >> wrote: >> >>> Hi Arno, >>> >>> Look for the following line in your CMakeCache.txt: >>> >>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>> >>> Change it to the following and then recompile: >>> >>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>> >>> That should keep the problematic AGL library out of your build. >>> >>> Please let me know if this works. >>> >>> Cheers, >>> - David >>> >>> >>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein >>> wrote: >>> >>>> Thank you all so much for your kind help. Unfortunately, I am still >>>> unable to compile the C++ code in my project on MacOSX, even after setting >>>> the following in my top-level CMakeLists.txt file: >>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>> >>>> When I type: >>>> $ export VERBOSE=1 >>>> $ make >>>> >>>> I get the following even though I don't have >>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>> but instead have >>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>> on my computer: >>>> >>>> ------------------ >>>> ... >>>> >>>> *Scanning dependencies of target TravelDepthMain* >>>> >>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>> >>>> [ 57%] Building CXX object >>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>> >>>> cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>> -I/software/install/miniconda2/include/vtk-6.3 >>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>> -isystem /software/install/miniconda2/include -isysroot >>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>> >>>> make[2]: *** No rule to make target >>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>> >>>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>> >>>> make: *** [all] Error 2 >>>> ------------------- >>>> >>>> >>>> Cheers, >>>> @rno >>>> >>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi >>>> wrote: >>>> >>>>> Hi Arno, >>>>> >>>>> I think that I've found out where the AGL link is coming from. It >>>>> isn't via Carbon, it looks like it was linked directly into the VTK that >>>>> you're using. And it looks like a bug within CMake itself. >>>>> >>>>> CMake has a module called FindOpenGL.cmake that VTK uses to find >>>>> OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>> both, even though AGL.framework is really not needed for any modern >>>>> software. >>>>> >>>>> This means that a VTK that is built with (for example) Xcode 6 and its >>>>> SDKs becomes linked to AGL, because AGL.framework is present in those older >>>>> SDKs. It's a private link, though, so I'm surprised that it would cause >>>>> the error. But you are building with Xcode 7 and you are seeing an >>>>> error... that much is indisputable. >>>>> >>>>> I suggest that you enable verbose error reporting so that you can see >>>>> exactly what is being linked when the error occurs: >>>>> >>>>> export VERBOSE=1 >>>>> make >>>>> ... >>>>> >>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>> >>>>> - David >>>>> >>>>> >>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein >>>>> wrote: >>>>> >>>>>> I tried again, and am still getting the AGL.framework error even when >>>>>> I set to 10.9 and the SDK to 10.11 (see: >>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>> ): >>>>>> >>>>>> > [ 57%] Building CXX object >>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>> > make[2]: *** No rule to make target >>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>> Error 2 >>>>>> > make: *** [all] Error 2 >>>>>> >>>>>> Could you please tell me how to ensure that there are no calls to >>>>>> Carbon APIs? >>>>>> >>>>>> By the way, I am tracking this as an issue on Github: >>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>> >>>>>> Cheers, >>>>>> @rno >>>>>> >>>>>> >>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi >>>>>> wrote: >>>>>> >>>>>>> Hi Arno, >>>>>>> >>>>>>> Using the macosx10.11 SDK is fine as long as it allows you to set >>>>>>> this desired deployment target. So if you are able to compile with the >>>>>>> following settings, then the result should run on OS X 10.7: >>>>>>> >>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>> >>>>>>> I'm not sure how far back you can set the deployment target with >>>>>>> this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9. >>>>>>> >>>>>>> If if gives errors for the AGL.framework, then make sure that your >>>>>>> code has no calls to Carbon APIs. >>>>>>> >>>>>>> - David >>>>>>> >>>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jan 6 21:36:08 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 6 Jan 2016 19:36:08 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Hi Arno, Are you still building against the Anaconda python? The build has to be picking up the AGL and the 10.7 SDK from somewhere, and if it isn't in your CMakeCache.txt, then it must be coming from somewhere. - David On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein wrote: > Dear David, > > When I clear the bin directory, then run "cmake .." and "make" I don't > find any instance of 10.7 mentioned in any file, but still get > "AGL.framework" in every subdirectory's build.make file. The > CMakeCache.txt file contains the following line: > > > CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk > > And yet I am still receiving the following error: > > make[2]: *** No rule to make target > `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', > needed by `travel_depth/TravelDepthMain'. Stop. > > Cheers, > @rno > > On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi wrote: > >> Hi Arno, >> >> It could be a stale dependency. Remove everything after the "INTERNAL >> cache entries" comment in your CMakeCache.txt, and also search your cache >> to make sure that 10.7 does not appear anywhere. >> >> Also do an "ls -l /System/Library/Frameworks/" to make sure that the >> OpenGL framework isn't a link to a non-existent 10.7 SDK (though I don't >> see how that could happen). >> >> - David >> >> >> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein >> wrote: >> >>> David -- >>> >>> There was no instance of "AGL" in CMakeCache.txt, but I replaced every >>> instance of "AGL" with OpenGL" in all of the build.make files. Without >>> cmake, but with make I got the following error: >>> >>> make[2]: *** No rule to make target >>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>> needed by `travel_depth/TravelDepthMain'. Stop. >>> >>> It still calls 10.7 even though I have 10.11 installed on my Mac. >>> >>> Cheers, >>> @rno >>> >>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi >>> wrote: >>> >>>> Hi Arno, >>>> >>>> Look for the following line in your CMakeCache.txt: >>>> >>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>> >>>> Change it to the following and then recompile: >>>> >>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>> >>>> That should keep the problematic AGL library out of your build. >>>> >>>> Please let me know if this works. >>>> >>>> Cheers, >>>> - David >>>> >>>> >>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein >>>> wrote: >>>> >>>>> Thank you all so much for your kind help. Unfortunately, I am still >>>>> unable to compile the C++ code in my project on MacOSX, even after setting >>>>> the following in my top-level CMakeLists.txt file: >>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>> >>>>> When I type: >>>>> $ export VERBOSE=1 >>>>> $ make >>>>> >>>>> I get the following even though I don't have >>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>> but instead have >>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>> on my computer: >>>>> >>>>> ------------------ >>>>> ... >>>>> >>>>> *Scanning dependencies of target TravelDepthMain* >>>>> >>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>> >>>>> [ 57%] Building CXX object >>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>> >>>>> cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>> -isystem /software/install/miniconda2/include -isysroot >>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>> >>>>> make[2]: *** No rule to make target >>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>> >>>>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>> >>>>> make: *** [all] Error 2 >>>>> ------------------- >>>>> >>>>> >>>>> Cheers, >>>>> @rno >>>>> >>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi >>>>> wrote: >>>>> >>>>>> Hi Arno, >>>>>> >>>>>> I think that I've found out where the AGL link is coming from. It >>>>>> isn't via Carbon, it looks like it was linked directly into the VTK that >>>>>> you're using. And it looks like a bug within CMake itself. >>>>>> >>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to find >>>>>> OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>> both, even though AGL.framework is really not needed for any modern >>>>>> software. >>>>>> >>>>>> This means that a VTK that is built with (for example) Xcode 6 and >>>>>> its SDKs becomes linked to AGL, because AGL.framework is present in those >>>>>> older SDKs. It's a private link, though, so I'm surprised that it would >>>>>> cause the error. But you are building with Xcode 7 and you are seeing an >>>>>> error... that much is indisputable. >>>>>> >>>>>> I suggest that you enable verbose error reporting so that you can see >>>>>> exactly what is being linked when the error occurs: >>>>>> >>>>>> export VERBOSE=1 >>>>>> make >>>>>> ... >>>>>> >>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>> >>>>>> - David >>>>>> >>>>>> >>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein >>>>>> wrote: >>>>>> >>>>>>> I tried again, and am still getting the AGL.framework error even >>>>>>> when I set to 10.9 and the SDK to 10.11 (see: >>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>> ): >>>>>>> >>>>>>> > [ 57%] Building CXX object >>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>> > make[2]: *** No rule to make target >>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>> Error 2 >>>>>>> > make: *** [all] Error 2 >>>>>>> >>>>>>> Could you please tell me how to ensure that there are no calls to >>>>>>> Carbon APIs? >>>>>>> >>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>> >>>>>>> Cheers, >>>>>>> @rno >>>>>>> >>>>>>> >>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Arno, >>>>>>>> >>>>>>>> Using the macosx10.11 SDK is fine as long as it allows you to set >>>>>>>> this desired deployment target. So if you are able to compile with the >>>>>>>> following settings, then the result should run on OS X 10.7: >>>>>>>> >>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>> >>>>>>>> I'm not sure how far back you can set the deployment target with >>>>>>>> this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9. >>>>>>>> >>>>>>>> If if gives errors for the AGL.framework, then make sure that your >>>>>>>> code has no calls to Carbon APIs. >>>>>>>> >>>>>>>> - David >>>>>>>> >>>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Jan 6 22:56:51 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 6 Jan 2016 22:56:51 -0500 Subject: [vtkusers] how can make the surface rendering result more beautiful In-Reply-To: <1452128212377-5735831.post@n5.nabble.com> References: <1452079522528-5735809.post@n5.nabble.com> <1452128212377-5735831.post@n5.nabble.com> Message-ID: Is the surface closed near those triangles? It's unclear from the rendering. It's hard to say what is going on without the data or code. On Wed, Jan 6, 2016 at 7:56 PM, Emptystack wrote: > The unnecessary is highlighted with blue pens. Please see the attached image. > And I used the vtkMarchingCubes to render the surface,and then used the > vtkSmoothPolydataMapper to smooth the surface. > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/how-can-make-the-surface-rendering-result-more-beautiful-tp5735809p5735831.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 jeanmichael.celerier at gmail.com Thu Jan 7 04:36:12 2016 From: jeanmichael.celerier at gmail.com (=?UTF-8?Q?Jean=2DMicha=C3=ABl_Celerier?=) Date: Thu, 7 Jan 2016 10:36:12 +0100 Subject: [vtkusers] GraphicsView example crashes on start In-Reply-To: References: Message-ID: bump ? >From searching the web it seems that this is a common problem :( On Sun, Jan 3, 2016 at 11:22 PM, Jean-Micha?l Celerier < jeanmichael.celerier at gmail.com> wrote: > Hello, > > When I build and run the Qt GraphicsView example, I get the following > stack trace : > > > > #0 0x0000000000ad53a8 in ?? () > #1 0x00007ffff72ac3e3 in QVTKGraphicsItem::MakeCurrent() () from > /usr/lib/libvtkGUISupportQtOpenGL.so.1 > #2 0x00007ffff021a31a in QMetaObject::activate(QObject*, int, int, > void**) () from /usr/lib/libQt5Core.so.5 > #3 0x00007ffff1041d67 in ?? () from /usr/lib/libvtkGUISupportQt.so.1 > #4 0x00007ffff102c96c in ?? () from /usr/lib/libvtkGUISupportQt.so.1 > #5 0x00007fffe8cc2049 in vtkCallbackCommand::Execute(vtkObject*, unsigned > long, void*) () from /usr/lib/libvtkCommonCore.so.1 > #6 0x00007fffe8e1ad19 in ?? () from /usr/lib/libvtkCommonCore.so.1 > #7 0x00007ffff5df60a1 in vtkRenderView::UpdateHoverWidgetState() () from > /usr/lib/libvtkViewsInfovis.so.1 > #8 0x00007ffff5df5b2f in vtkRenderView::PrepareForRendering() () from > /usr/lib/libvtkViewsInfovis.so.1 > #9 0x00007ffff5df5c97 in vtkRenderView::Render() () from > /usr/lib/libvtkViewsInfovis.so.1 > #10 0x00007ffff5df900c in vtkRenderView::ProcessEvents(vtkObject*, > unsigned long, void*) () from /usr/lib/libvtkViewsInfovis.so.1 > #11 0x00007fffe8e1ad19 in ?? () from /usr/lib/libvtkCommonCore.so.1 > #12 0x00007ffff72ac6f8 in QVTKGraphicsItem::paint(QPainter*, > QStyleOptionGraphicsItem const*, QWidget*) () from > /usr/lib/libvtkGUISupportQtOpenGL.so.1 > > #18 0x00007ffff0e32677 in QGraphicsView::paintEvent(QPaintEvent*) () from > /usr/lib/libQt5Widgets.so.5 > > (I can put the rest of the stack trace but only this seems relevant to me). > > Any idea of what's wrong ? Qt 5.5.1 on x64 linux. > > Best regards > Jean-Micha?l > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joaorobertojr88 at gmail.com Thu Jan 7 06:10:20 2016 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Thu, 7 Jan 2016 04:10:20 -0700 (MST) Subject: [vtkusers] Using string labels on vtkCubeAxesActor2D In-Reply-To: <1452008939940-5735789.post@n5.nabble.com> References: <1452008939940-5735789.post@n5.nabble.com> Message-ID: <1452165020783-5735837.post@n5.nabble.com> I made a mistake. The method vtkCubeAxesActor ::SetAxisLabels does the job. Thanks anyway. Joao. -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-string-labels-on-vtkCubeAxesActor2D-tp5735789p5735837.html Sent from the VTK - Users mailing list archive at Nabble.com. From binarybottle at gmail.com Thu Jan 7 07:37:57 2016 From: binarybottle at gmail.com (Arno Klein) Date: Thu, 07 Jan 2016 12:37:57 +0000 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Yes, it should be building from miniconda2. However, I can't find any instance of "AGL" or of "10.7" anywhere in the code base (only within the bin directory after running cmake). I am baffled and stuck. On Wed, Jan 6, 2016 at 9:36 PM David Gobbi wrote: > Hi Arno, > > Are you still building against the Anaconda python? The build has to be > picking up the AGL and the 10.7 SDK from somewhere, and if it isn't in your > CMakeCache.txt, then it must be coming from somewhere. > > - David > > On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein wrote: > >> Dear David, >> >> When I clear the bin directory, then run "cmake .." and "make" I don't >> find any instance of 10.7 mentioned in any file, but still get >> "AGL.framework" in every subdirectory's build.make file. The >> CMakeCache.txt file contains the following line: >> >> >> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >> >> And yet I am still receiving the following error: >> >> make[2]: *** No rule to make target >> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >> needed by `travel_depth/TravelDepthMain'. Stop. >> >> Cheers, >> @rno >> >> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi >> wrote: >> >>> Hi Arno, >>> >>> It could be a stale dependency. Remove everything after the "INTERNAL >>> cache entries" comment in your CMakeCache.txt, and also search your cache >>> to make sure that 10.7 does not appear anywhere. >>> >>> Also do an "ls -l /System/Library/Frameworks/" to make sure that the >>> OpenGL framework isn't a link to a non-existent 10.7 SDK (though I don't >>> see how that could happen). >>> >>> - David >>> >>> >>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein >>> wrote: >>> >>>> David -- >>>> >>>> There was no instance of "AGL" in CMakeCache.txt, but I replaced every >>>> instance of "AGL" with OpenGL" in all of the build.make files. Without >>>> cmake, but with make I got the following error: >>>> >>>> make[2]: *** No rule to make target >>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>> >>>> It still calls 10.7 even though I have 10.11 installed on my Mac. >>>> >>>> Cheers, >>>> @rno >>>> >>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi >>>> wrote: >>>> >>>>> Hi Arno, >>>>> >>>>> Look for the following line in your CMakeCache.txt: >>>>> >>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>> >>>>> Change it to the following and then recompile: >>>>> >>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>> >>>>> That should keep the problematic AGL library out of your build. >>>>> >>>>> Please let me know if this works. >>>>> >>>>> Cheers, >>>>> - David >>>>> >>>>> >>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein >>>>> wrote: >>>>> >>>>>> Thank you all so much for your kind help. Unfortunately, I am still >>>>>> unable to compile the C++ code in my project on MacOSX, even after setting >>>>>> the following in my top-level CMakeLists.txt file: >>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>> >>>>>> When I type: >>>>>> $ export VERBOSE=1 >>>>>> $ make >>>>>> >>>>>> I get the following even though I don't have >>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>> but instead have >>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>> on my computer: >>>>>> >>>>>> ------------------ >>>>>> ... >>>>>> >>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>> >>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>> >>>>>> [ 57%] Building CXX object >>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>> >>>>>> cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>> >>>>>> make[2]: *** No rule to make target >>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>> >>>>>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>> >>>>>> make: *** [all] Error 2 >>>>>> ------------------- >>>>>> >>>>>> >>>>>> Cheers, >>>>>> @rno >>>>>> >>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi >>>>>> wrote: >>>>>> >>>>>>> Hi Arno, >>>>>>> >>>>>>> I think that I've found out where the AGL link is coming from. It >>>>>>> isn't via Carbon, it looks like it was linked directly into the VTK that >>>>>>> you're using. And it looks like a bug within CMake itself. >>>>>>> >>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to find >>>>>>> OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>>> both, even though AGL.framework is really not needed for any modern >>>>>>> software. >>>>>>> >>>>>>> This means that a VTK that is built with (for example) Xcode 6 and >>>>>>> its SDKs becomes linked to AGL, because AGL.framework is present in those >>>>>>> older SDKs. It's a private link, though, so I'm surprised that it would >>>>>>> cause the error. But you are building with Xcode 7 and you are seeing an >>>>>>> error... that much is indisputable. >>>>>>> >>>>>>> I suggest that you enable verbose error reporting so that you can >>>>>>> see exactly what is being linked when the error occurs: >>>>>>> >>>>>>> export VERBOSE=1 >>>>>>> make >>>>>>> ... >>>>>>> >>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>> >>>>>>> - David >>>>>>> >>>>>>> >>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein >>>>>>> wrote: >>>>>>> >>>>>>>> I tried again, and am still getting the AGL.framework error even >>>>>>>> when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>> ): >>>>>>>> >>>>>>>> > [ 57%] Building CXX object >>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>> > make[2]: *** No rule to make target >>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>>> Error 2 >>>>>>>> > make: *** [all] Error 2 >>>>>>>> >>>>>>>> Could you please tell me how to ensure that there are no calls to >>>>>>>> Carbon APIs? >>>>>>>> >>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>> >>>>>>>> Cheers, >>>>>>>> @rno >>>>>>>> >>>>>>>> >>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi >>>>>>> > wrote: >>>>>>>> >>>>>>>>> Hi Arno, >>>>>>>>> >>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows you to set >>>>>>>>> this desired deployment target. So if you are able to compile with the >>>>>>>>> following settings, then the result should run on OS X 10.7: >>>>>>>>> >>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>> >>>>>>>>> I'm not sure how far back you can set the deployment target with >>>>>>>>> this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9. >>>>>>>>> >>>>>>>>> If if gives errors for the AGL.framework, then make sure that your >>>>>>>>> code has no calls to Carbon APIs. >>>>>>>>> >>>>>>>>> - David >>>>>>>>> >>>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Jan 7 07:52:14 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 7 Jan 2016 07:52:14 -0500 Subject: [vtkusers] VTK-7.0.0 RC1: vtkProperty2D LineStipplePattern with OpenGL2 In-Reply-To: <10285631702C4D4CB5C4921DC14337954EEA0563@neocoilexch01> References: <10285631702C4D4CB5C4921DC14337954EEA0563@neocoilexch01> Message-ID: Unfortunately line stipple was deprecated and removed from more recent versions of OpenGL. That means to support it we have to implement it ourselves. I have recently done that for the 2D charts and that has been merged. For everything else it is not supported currently. Thanks Ken On Wed, Jan 6, 2016 at 1:31 PM, Kenji Tsumura < kenji.tsumura at neosoftmedical.com> wrote: > Hi, > > > > I have posted a bug on vtkProperty2D LineStipplePattern. > > http://www.vtk.org/Bug/view.php?id=15918 > > > > The description of the bug is: > > > > vtkProperty2D LineStipplePattern doesn't work with OpenGL2 setting. When I > use OpenGL setting, it worked. I can reproduce the bug using the attached > modified example code. > > > > My environment is: > > VTK-7.0.0 RC1 > > CMake 3.1.1 > > Visual Studio 12 2013 Win 64 > > VTK_RENDERING_BACKEND OpenGL2 > > > > Thank you, > > > > Kenji > > > Disclaimer: The information contained in this communication may be > confidential, is intended only for the use of the recipient(s) named above, > and may be legally privileged. If the reader of this message is not the > intended recipient, you are hereby notified that any dissemination, > distribution, or copying of this communication, or any of its contents, is > strictly prohibited. If you have received this communication in error, > please return it to the sender immediately and delete the original message > and any copy of it from your computer system. If you have any questions > concerning this message, please contact the sender. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 giorgosragos at gmail.com Thu Jan 7 07:53:10 2016 From: giorgosragos at gmail.com (Giorgos Ragkousis) Date: Thu, 7 Jan 2016 12:53:10 +0000 Subject: [vtkusers] best_way_of_writing_transient_multiblocks(unstructured grid dataSets) Message-ID: Dear vtkusers, I am trying to develop an efficient method for writing different vtk unstructured grid datasets which change with time in a single vtk file. In particular, we have an in-house Boundary Element solver and we would like to save element and node information (unstructured grid DataSets) in a single file. Then, by using vtk methods we would like to visualise the results. The main question I would like to ask is whether any of you have developed similar vtk applications and what would be the optimal way. I found that multiblocks can be saved in either exodus or vtm file. What is the difference? Is there any other way? How could I save different time steps of these multiblocks? Is there any simple example of creating such a file? Moreover, I found that vtkHierrarchicalBoxDataSet is for Adaptive Meshing. Is there any example? Lastly, how I could extract a specific block from a multiblock by giving its name. In the following code I have managed to extract a certain block by giving its index only. Is it possible to call a block from each name? > > private void MultiBlockDisplay() > { > string path; > string domainName; > string fileName; > > vtkRenderer ren = vtkRenderer.New(); > ren.SetBackground(0.2, 0.3, 0.4); > vtkRenderWindow renWin = renderWindowControl1.RenderWindow; > renWin.AddRenderer(ren); > vtkRenderWindowInteractor iren = > vtkRenderWindowInteractor.New(); > iren.SetRenderWindow(renWin); > > uint number = 2; > vtkMultiBlockDataSet mbset = vtkMultiBlockDataSet.New(); > mbset.SetNumberOfBlocks(number); > > for (uint i = 0; i < number; i++) > { > vtkUnstructuredGridReader reader = > vtkUnstructuredGridReader.New(); > > path = @"C:\\A_directory\\"; > domainName = "MultiBlock_" + i.ToString(); > fileName = path + domainName + ".vtk"; > > reader.SetFileName(fileName); > reader.SetReadAllScalars(1); > reader.SetReadAllVectors(1); > reader.Update(); > > mbset.SetBlock(i, reader.GetOutput()); > > mbset.GetMetaData(i).Set(vtkCompositeDataSet.NAME(), > domainName); > > //The following bit prints the name for each block > string nameDOM = > mbset.GetMetaData(i).Get(vtkCompositeDataSet.NAME()); > Debug.Print(nameDOM); > > } > > vtkUnstructuredGrid ug = > vtkUnstructuredGrid.SafeDownCast(mbset.GetBlock(1)); > > vtkDataSetMapper mapper = vtkDataSetMapper.New(); > mapper.SetInput(ug); > > vtkActor actor = vtkActor.New(); > actor.SetMapper(mapper); > > ren.AddActor(actor); > > ren.SetBackground(0.2, 0.3, 0.4); > > } > Many thanks in advance. Kindest regards, Giorgos -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 7 08:34:15 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 7 Jan 2016 06:34:15 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Hi Arno, You can try replacing FindOpenGL.cmake with the latest one from the cmake master branch: https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake On my machine, for example, the file is located here: /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake That might help with AGL. - David On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein wrote: > Yes, it should be building from miniconda2. However, I can't find any > instance of "AGL" or of "10.7" anywhere in the code base (only within the > bin directory after running cmake). I am baffled and stuck. > > On Wed, Jan 6, 2016 at 9:36 PM David Gobbi wrote: > >> Hi Arno, >> >> Are you still building against the Anaconda python? The build has to be >> picking up the AGL and the 10.7 SDK from somewhere, and if it isn't in your >> CMakeCache.txt, then it must be coming from somewhere. >> >> - David >> >> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein >> wrote: >> >>> Dear David, >>> >>> When I clear the bin directory, then run "cmake .." and "make" I don't >>> find any instance of 10.7 mentioned in any file, but still get >>> "AGL.framework" in every subdirectory's build.make file. The >>> CMakeCache.txt file contains the following line: >>> >>> >>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>> >>> And yet I am still receiving the following error: >>> >>> make[2]: *** No rule to make target >>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>> needed by `travel_depth/TravelDepthMain'. Stop. >>> >>> Cheers, >>> @rno >>> >>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi >>> wrote: >>> >>>> Hi Arno, >>>> >>>> It could be a stale dependency. Remove everything after the "INTERNAL >>>> cache entries" comment in your CMakeCache.txt, and also search your cache >>>> to make sure that 10.7 does not appear anywhere. >>>> >>>> Also do an "ls -l /System/Library/Frameworks/" to make sure that the >>>> OpenGL framework isn't a link to a non-existent 10.7 SDK (though I don't >>>> see how that could happen). >>>> >>>> - David >>>> >>>> >>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein >>>> wrote: >>>> >>>>> David -- >>>>> >>>>> There was no instance of "AGL" in CMakeCache.txt, but I replaced every >>>>> instance of "AGL" with OpenGL" in all of the build.make files. Without >>>>> cmake, but with make I got the following error: >>>>> >>>>> make[2]: *** No rule to make target >>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>> >>>>> It still calls 10.7 even though I have 10.11 installed on my Mac. >>>>> >>>>> Cheers, >>>>> @rno >>>>> >>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi >>>>> wrote: >>>>> >>>>>> Hi Arno, >>>>>> >>>>>> Look for the following line in your CMakeCache.txt: >>>>>> >>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>> >>>>>> Change it to the following and then recompile: >>>>>> >>>>>> >>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>> >>>>>> That should keep the problematic AGL library out of your build. >>>>>> >>>>>> Please let me know if this works. >>>>>> >>>>>> Cheers, >>>>>> - David >>>>>> >>>>>> >>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein >>>>>> wrote: >>>>>> >>>>>>> Thank you all so much for your kind help. Unfortunately, I am still >>>>>>> unable to compile the C++ code in my project on MacOSX, even after setting >>>>>>> the following in my top-level CMakeLists.txt file: >>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>> >>>>>>> When I type: >>>>>>> $ export VERBOSE=1 >>>>>>> $ make >>>>>>> >>>>>>> I get the following even though I don't have >>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>> but instead have >>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>> on my computer: >>>>>>> >>>>>>> ------------------ >>>>>>> ... >>>>>>> >>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>> >>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>> >>>>>>> [ 57%] Building CXX object >>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>> >>>>>>> cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth >>>>>>> && >>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>> >>>>>>> make[2]: *** No rule to make target >>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>> >>>>>>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error >>>>>>> 2 >>>>>>> >>>>>>> make: *** [all] Error 2 >>>>>>> ------------------- >>>>>>> >>>>>>> >>>>>>> Cheers, >>>>>>> @rno >>>>>>> >>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Arno, >>>>>>>> >>>>>>>> I think that I've found out where the AGL link is coming from. It >>>>>>>> isn't via Carbon, it looks like it was linked directly into the VTK that >>>>>>>> you're using. And it looks like a bug within CMake itself. >>>>>>>> >>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to find >>>>>>>> OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>>>> both, even though AGL.framework is really not needed for any modern >>>>>>>> software. >>>>>>>> >>>>>>>> This means that a VTK that is built with (for example) Xcode 6 and >>>>>>>> its SDKs becomes linked to AGL, because AGL.framework is present in those >>>>>>>> older SDKs. It's a private link, though, so I'm surprised that it would >>>>>>>> cause the error. But you are building with Xcode 7 and you are seeing an >>>>>>>> error... that much is indisputable. >>>>>>>> >>>>>>>> I suggest that you enable verbose error reporting so that you can >>>>>>>> see exactly what is being linked when the error occurs: >>>>>>>> >>>>>>>> export VERBOSE=1 >>>>>>>> make >>>>>>>> ... >>>>>>>> >>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>> >>>>>>>> - David >>>>>>>> >>>>>>>> >>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein >>>>>>> > wrote: >>>>>>>> >>>>>>>>> I tried again, and am still getting the AGL.framework error even >>>>>>>>> when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>> ): >>>>>>>>> >>>>>>>>> > [ 57%] Building CXX object >>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>>>> Error 2 >>>>>>>>> > make: *** [all] Error 2 >>>>>>>>> >>>>>>>>> Could you please tell me how to ensure that there are no calls to >>>>>>>>> Carbon APIs? >>>>>>>>> >>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> @rno >>>>>>>>> >>>>>>>>> >>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Hi Arno, >>>>>>>>>> >>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows you to set >>>>>>>>>> this desired deployment target. So if you are able to compile with the >>>>>>>>>> following settings, then the result should run on OS X 10.7: >>>>>>>>>> >>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>> >>>>>>>>>> I'm not sure how far back you can set the deployment target with >>>>>>>>>> this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9. >>>>>>>>>> >>>>>>>>>> If if gives errors for the AGL.framework, then make sure that >>>>>>>>>> your code has no calls to Carbon APIs. >>>>>>>>>> >>>>>>>>>> - David >>>>>>>>>> >>>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From kenji.tsumura at neosoftmedical.com Thu Jan 7 08:56:45 2016 From: kenji.tsumura at neosoftmedical.com (Kenji Tsumura) Date: Thu, 7 Jan 2016 13:56:45 +0000 Subject: [vtkusers] VTK-7.0.0 RC1: vtkProperty2D LineStipplePattern with OpenGL2 In-Reply-To: References: <10285631702C4D4CB5C4921DC14337954EEA0563@neocoilexch01> Message-ID: <10285631702C4D4CB5C4921DC14337954EEA067D@neocoilexch01> Hi Ken, Thank you for the information. Then, probably we will implement line stipple on our application side by creating many small lines for the moment. Kenji From: Ken Martin [mailto:ken.martin at kitware.com] Sent: Thursday, January 07, 2016 6:52 AM To: Kenji Tsumura Cc: vtkusers at vtk.org Subject: Re: [vtkusers] VTK-7.0.0 RC1: vtkProperty2D LineStipplePattern with OpenGL2 Unfortunately line stipple was deprecated and removed from more recent versions of OpenGL. That means to support it we have to implement it ourselves. I have recently done that for the 2D charts and that has been merged. For everything else it is not supported currently. Thanks Ken On Wed, Jan 6, 2016 at 1:31 PM, Kenji Tsumura > wrote: Hi, I have posted a bug on vtkProperty2D LineStipplePattern. http://www.vtk.org/Bug/view.php?id=15918 The description of the bug is: vtkProperty2D LineStipplePattern doesn't work with OpenGL2 setting. When I use OpenGL setting, it worked. I can reproduce the bug using the attached modified example code. My environment is: VTK-7.0.0 RC1 CMake 3.1.1 Visual Studio 12 2013 Win 64 VTK_RENDERING_BACKEND OpenGL2 Thank you, Kenji Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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. Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregory.baert at inserm.fr Thu Jan 7 09:03:16 2016 From: gregory.baert at inserm.fr (Mercusyo) Date: Thu, 7 Jan 2016 07:03:16 -0700 (MST) Subject: [vtkusers] Create vtkVolume from a dicom series files In-Reply-To: <1452093919271-5735817.post@n5.nabble.com> References: <1451990019314-5735781.post@n5.nabble.com> <1452072596299-5735808.post@n5.nabble.com> <1452093919271-5735817.post@n5.nabble.com> Message-ID: <1452175396144-5735844.post@n5.nabble.com> Hello, I found my problem. The attached file is my test with a serie of dicom files. At this moment, it's just a technical test, so it's only visualisation. So, if I want to use the different slices of this volume, I have to use the "vtkVolume" ? Thanks, Best regards, -- View this message in context: http://vtk.1045678.n5.nabble.com/Create-vtkVolume-from-a-dicom-series-files-tp5735781p5735844.html Sent from the VTK - Users mailing list archive at Nabble.com. From binarybottle at gmail.com Thu Jan 7 09:11:57 2016 From: binarybottle at gmail.com (Arno Klein) Date: Thu, 07 Jan 2016 14:11:57 +0000 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: That was an excellent suggestion, but alas, even after replacing that file with the newer one from the link you shared I am still getting the same error! On Thu, Jan 7, 2016 at 8:34 AM David Gobbi wrote: > Hi Arno, > > You can try replacing FindOpenGL.cmake with the latest one from the cmake > master branch: > > https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake > On my machine, for example, the file is located here: > /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake > That might help with AGL. > > - David > > > On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein wrote: > >> Yes, it should be building from miniconda2. However, I can't find any >> instance of "AGL" or of "10.7" anywhere in the code base (only within the >> bin directory after running cmake). I am baffled and stuck. >> >> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi wrote: >> >>> Hi Arno, >>> >>> Are you still building against the Anaconda python? The build has to be >>> picking up the AGL and the 10.7 SDK from somewhere, and if it isn't in your >>> CMakeCache.txt, then it must be coming from somewhere. >>> >>> - David >>> >>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein >>> wrote: >>> >>>> Dear David, >>>> >>>> When I clear the bin directory, then run "cmake .." and "make" I don't >>>> find any instance of 10.7 mentioned in any file, but still get >>>> "AGL.framework" in every subdirectory's build.make file. The >>>> CMakeCache.txt file contains the following line: >>>> >>>> >>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>> >>>> And yet I am still receiving the following error: >>>> >>>> make[2]: *** No rule to make target >>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>> >>>> Cheers, >>>> @rno >>>> >>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi >>>> wrote: >>>> >>>>> Hi Arno, >>>>> >>>>> It could be a stale dependency. Remove everything after the "INTERNAL >>>>> cache entries" comment in your CMakeCache.txt, and also search your cache >>>>> to make sure that 10.7 does not appear anywhere. >>>>> >>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure that the >>>>> OpenGL framework isn't a link to a non-existent 10.7 SDK (though I don't >>>>> see how that could happen). >>>>> >>>>> - David >>>>> >>>>> >>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein >>>>> wrote: >>>>> >>>>>> David -- >>>>>> >>>>>> There was no instance of "AGL" in CMakeCache.txt, but I replaced >>>>>> every instance of "AGL" with OpenGL" in all of the build.make files. >>>>>> Without cmake, but with make I got the following error: >>>>>> >>>>>> make[2]: *** No rule to make target >>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>> >>>>>> It still calls 10.7 even though I have 10.11 installed on my Mac. >>>>>> >>>>>> Cheers, >>>>>> @rno >>>>>> >>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi >>>>>> wrote: >>>>>> >>>>>>> Hi Arno, >>>>>>> >>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>> >>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>> >>>>>>> Change it to the following and then recompile: >>>>>>> >>>>>>> >>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>> >>>>>>> That should keep the problematic AGL library out of your build. >>>>>>> >>>>>>> Please let me know if this works. >>>>>>> >>>>>>> Cheers, >>>>>>> - David >>>>>>> >>>>>>> >>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein >>>>>>> wrote: >>>>>>> >>>>>>>> Thank you all so much for your kind help. Unfortunately, I am >>>>>>>> still unable to compile the C++ code in my project on MacOSX, even after >>>>>>>> setting the following in my top-level CMakeLists.txt file: >>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>> >>>>>>>> When I type: >>>>>>>> $ export VERBOSE=1 >>>>>>>> $ make >>>>>>>> >>>>>>>> I get the following even though I don't have >>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>> but instead have >>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>> on my computer: >>>>>>>> >>>>>>>> ------------------ >>>>>>>> ... >>>>>>>> >>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>> >>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>> >>>>>>>> [ 57%] Building CXX object >>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>> >>>>>>>> cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth >>>>>>>> && >>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>> >>>>>>>> make[2]: *** No rule to make target >>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>> >>>>>>>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>>> Error 2 >>>>>>>> >>>>>>>> make: *** [all] Error 2 >>>>>>>> ------------------- >>>>>>>> >>>>>>>> >>>>>>>> Cheers, >>>>>>>> @rno >>>>>>>> >>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi >>>>>>> > wrote: >>>>>>>> >>>>>>>>> Hi Arno, >>>>>>>>> >>>>>>>>> I think that I've found out where the AGL link is coming from. It >>>>>>>>> isn't via Carbon, it looks like it was linked directly into the VTK that >>>>>>>>> you're using. And it looks like a bug within CMake itself. >>>>>>>>> >>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to find >>>>>>>>> OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>>>>> both, even though AGL.framework is really not needed for any modern >>>>>>>>> software. >>>>>>>>> >>>>>>>>> This means that a VTK that is built with (for example) Xcode 6 and >>>>>>>>> its SDKs becomes linked to AGL, because AGL.framework is present in those >>>>>>>>> older SDKs. It's a private link, though, so I'm surprised that it would >>>>>>>>> cause the error. But you are building with Xcode 7 and you are seeing an >>>>>>>>> error... that much is indisputable. >>>>>>>>> >>>>>>>>> I suggest that you enable verbose error reporting so that you can >>>>>>>>> see exactly what is being linked when the error occurs: >>>>>>>>> >>>>>>>>> export VERBOSE=1 >>>>>>>>> make >>>>>>>>> ... >>>>>>>>> >>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>> >>>>>>>>> - David >>>>>>>>> >>>>>>>>> >>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> I tried again, and am still getting the AGL.framework error even >>>>>>>>>> when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>> ): >>>>>>>>>> >>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>>>>> Error 2 >>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>> >>>>>>>>>> Could you please tell me how to ensure that there are no calls to >>>>>>>>>> Carbon APIs? >>>>>>>>>> >>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>> >>>>>>>>>> Cheers, >>>>>>>>>> @rno >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Arno, >>>>>>>>>>> >>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows you to >>>>>>>>>>> set this desired deployment target. So if you are able to compile with the >>>>>>>>>>> following settings, then the result should run on OS X 10.7: >>>>>>>>>>> >>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>> >>>>>>>>>>> I'm not sure how far back you can set the deployment target with >>>>>>>>>>> this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or 10.9. >>>>>>>>>>> >>>>>>>>>>> If if gives errors for the AGL.framework, then make sure that >>>>>>>>>>> your code has no calls to Carbon APIs. >>>>>>>>>>> >>>>>>>>>>> - David >>>>>>>>>>> >>>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Jan 7 09:56:38 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 7 Jan 2016 09:56:38 -0500 Subject: [vtkusers] Using string labels on vtkCubeAxesActor2D In-Reply-To: <1452165020783-5735837.post@n5.nabble.com> References: <1452008939940-5735789.post@n5.nabble.com> <1452165020783-5735837.post@n5.nabble.com> Message-ID: Thanks for following up, Joao. On Thu, Jan 7, 2016 at 6:10 AM, joaoroberto88 wrote: > I made a mistake. The method vtkCubeAxesActor ::SetAxisLabels does the job. > > Thanks anyway. > > Joao. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Using-string-labels-on-vtkCubeAxesActor2D-tp5735789p5735837.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 theryame at gmail.com Thu Jan 7 10:09:16 2016 From: theryame at gmail.com (=?UTF-8?Q?Am=C3=A9lie_Thery?=) Date: Thu, 7 Jan 2016 16:09:16 +0100 Subject: [vtkusers] vtkBoxWidget::Points values change between Debug and Release mode Message-ID: Hi everybody, I am using vtkBoxWidget, and I use Points to control it size. I defined a public function vtkPoints * GetPoints(){return Points;}to access this protected member. For example, when my vtkBoxWidget is defined by {-1,0,0, 1,0,0, 1,0,1, -1,0,1, -1,1,0, 1,1,0, 1,1,1, -1,1,1} with one face under 0 and the opposite over 0 in x-axis, I do: vtkPoints* pts=GetPoints(); double a[3],b[3]; pts->GetPoint(0,a); //face under 0 pts->GetPoint(2,b); //face over 0 In debug mode, a[0]= -1 and b[0]= 1 as it is supposed to be, In release mode, a[0]= 1 and b[0]= 1 so I can not check the size of the box. I didn't change anything between both tests, if anyone has any idea it would be grateful :) Thank you for reading, Am?lie -------------- next part -------------- An HTML attachment was scrubbed... URL: From joaorobertojr88 at gmail.com Thu Jan 7 10:24:24 2016 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Thu, 7 Jan 2016 08:24:24 -0700 (MST) Subject: [vtkusers] Issue when setting number of ticks on a vtkAxis In-Reply-To: <1451524333068-5735712.post@n5.nabble.com> References: <1450957386793-5735645.post@n5.nabble.com> <1451311798109-5735657.post@n5.nabble.com> <1451462142642-5735701.post@n5.nabble.com> <1451524333068-5735712.post@n5.nabble.com> Message-ID: <1452180264046-5735848.post@n5.nabble.com> Hi VTK Users, Analyzing vtkAxis class implementation, I saw there is a offset float variable that defines the relative position of a axis labels. I'm making it a class field attribute so it can be configured via API. Also I'll do a merge request when it becomes ready. Thanks, Joao. -- View this message in context: http://vtk.1045678.n5.nabble.com/Issue-when-setting-number-of-ticks-on-a-vtkAxis-tp5735645p5735848.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Thu Jan 7 10:25:10 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 7 Jan 2016 10:25:10 -0500 Subject: [vtkusers] vtkBoxWidget::Points values change between Debug and Release mode In-Reply-To: References: Message-ID: Am?lie, Two thoughts: 1). Some of the points may not be initialized. Could you post your initialization code for the vtkPoints object? 2). You are accidentally mixing Release and Debug mode libraries. You must link against either all Release or all Debug libraries - mixing them will lead to a world of hurt. Cory On Thu, Jan 7, 2016 at 10:09 AM, Am?lie Thery wrote: > Hi everybody, > I am using vtkBoxWidget, and I use Points to control it size. > I defined a public function vtkPoints * GetPoints(){return Points;}to access > this protected member. > For example, when my vtkBoxWidget is defined by > {-1,0,0, > 1,0,0, > 1,0,1, > -1,0,1, > > -1,1,0, > 1,1,0, > 1,1,1, > -1,1,1} > > with one face under 0 and the opposite over 0 in x-axis, > I do: > vtkPoints* pts=GetPoints(); > double a[3],b[3]; > pts->GetPoint(0,a); //face under 0 > pts->GetPoint(2,b); //face over 0 > > In debug mode, a[0]= -1 and b[0]= 1 as it is supposed to be, > In release mode, a[0]= 1 and b[0]= 1 so I can not check the size of the box. > > I didn't change anything between both tests, if anyone has any idea it would > be grateful :) > > Thank you for reading, > Am?lie > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 David.MOUSSAUD at cea.fr Thu Jan 7 09:55:20 2016 From: David.MOUSSAUD at cea.fr (MOUSSAUD David 244079) Date: Thu, 7 Jan 2016 14:55:20 +0000 Subject: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file Message-ID: <7A18A422C44BE34E947C1F96625E60BD089512B6@EXDAG0-A1.intra.cea.fr> Hi all, I've got a problem to generate a simple ply file with 4 vertices. Here how i proceed : // Setup points points = vtkSmartPointer::New(); // Setup the colors array colors = vtkSmartPointer::New(); colors->SetNumberOfComponents(3); colors->SetName("Colors"); // create a vertex vertex = vtkSmartPointer::New(); // list of all the vertices vertices= vtkSmartPointer::New(); /* Create a PLY Writer */ plyWriter = vtkSmartPointer::New(); // Create a polydata object and add everything to it polydata = vtkSmartPointer::New(); polydata->SetPoints(points); polydata->SetVerts(vertices); polydata->GetPointData()->SetScalars(colors); Then here how i create my vertices and how i set them : points->Resize(4); points->SetPoint(0, 0.0, 0.0, 0.0); points->SetPoint(1, 1.0, 0.0, 0.0); points->SetPoint(2, 0.0, 1.0, 0.0); points->SetPoint(3, 0.0, 0.0, 1.0); vertices->Initialize(); vertex->GetPointIds()->SetId(0,0); vertices->InsertNextCell(vertex); vertex->GetPointIds()->SetId(0,1); vertices->InsertNextCell(vertex); vertex->GetPointIds()->SetId(0,2); vertices->InsertNextCell(vertex); vertex->GetPointIds()->SetId(0,3); vertices->InsertNextCell(vertex); colors->Initialize(); colors->InsertNextTuple3(255,0,0); colors->InsertNextTuple3(0,255,0); colors->InsertNextTuple3(0,0,255); colors->InsertNextTuple3(255,255,255); QString plyFilePath = "output.ply"; std::string filename = plyFilePath.toStdString(); plyWriter->SetFileName(filename.c_str()); plyWriter->SetInputData(polydata); plyWriter->SetColorModeToUniformPointColor(); plyWriter->SetArrayName("Colors"); plyWriter->SetFileTypeToASCII(); plyWriter->Write(); I've checked that the 4 vertex are well displayed (cf screenshot). Unfortunately, my ply file shows 0 vertex. ply format ascii 1.0 comment VTK generated PLY File obj_info vtkPolyData points and polygons: vtk4.0 element vertex 0 property float x property float y property float z property uchar red property uchar green property uchar blue element face 0 property list uchar int vertex_indices end_header I'm using vtk 6.3. If someone has already meet this problem or know the solution ... Thanks for your time, Best regards, David MOUSSAUD. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 4Vertices_PlyWriter.png Type: image/png Size: 25232 bytes Desc: 4Vertices_PlyWriter.png URL: From cory.quammen at kitware.com Thu Jan 7 10:58:50 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 7 Jan 2016 10:58:50 -0500 Subject: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file In-Reply-To: <7A18A422C44BE34E947C1F96625E60BD089512B6@EXDAG0-A1.intra.cea.fr> References: <7A18A422C44BE34E947C1F96625E60BD089512B6@EXDAG0-A1.intra.cea.fr> Message-ID: Hi David, Can you confirm that the PLY file format supports single-vertex cells like this? My perusal of the PLY documentation didn't reveal anything. Thanks, Cory On Thu, Jan 7, 2016 at 9:55 AM, MOUSSAUD David 244079 wrote: > Hi all, > > > > I've got a problem to generate a simple ply file with 4 vertices. > > Here how i proceed : > > > > // Setup points > > points = vtkSmartPointer::New(); > > > // Setup the colors array > > colors = vtkSmartPointer::New(); > > colors->SetNumberOfComponents(3); > > colors->SetName("Colors"); > > > // create a vertex > > vertex = vtkSmartPointer::New(); > > > // list of all the vertices > > vertices= vtkSmartPointer::New(); > > > /* Create a PLY Writer */ > > plyWriter = vtkSmartPointer::New(); > > > // Create a polydata object and add everything to it > > polydata = vtkSmartPointer::New(); > > polydata->SetPoints(points); > > polydata->SetVerts(vertices); > > polydata->GetPointData()->SetScalars(colors); > > > > Then here how i create my vertices and how i set them : > > > > points->Resize(4); > > points->SetPoint(0, 0.0, 0.0, 0.0); > > points->SetPoint(1, 1.0, 0.0, 0.0); > > points->SetPoint(2, 0.0, 1.0, 0.0); > > points->SetPoint(3, 0.0, 0.0, 1.0); > > > vertices->Initialize(); > > > vertex->GetPointIds()->SetId(0,0); > > vertices->InsertNextCell(vertex); > > > vertex->GetPointIds()->SetId(0,1); > > vertices->InsertNextCell(vertex); > > > vertex->GetPointIds()->SetId(0,2); > > vertices->InsertNextCell(vertex); > > > vertex->GetPointIds()->SetId(0,3); > > vertices->InsertNextCell(vertex); > > > colors->Initialize(); > > colors->InsertNextTuple3(255,0,0); > > colors->InsertNextTuple3(0,255,0); > > colors->InsertNextTuple3(0,0,255); > > colors->InsertNextTuple3(255,255,255); > > > > QString plyFilePath = "output.ply"; > > > std::string filename = plyFilePath.toStdString(); > > plyWriter->SetFileName(filename.c_str()); > > > plyWriter->SetInputData(polydata); > > > > plyWriter->SetColorModeToUniformPointColor(); > > plyWriter->SetArrayName("Colors"); > > plyWriter->SetFileTypeToASCII(); > > plyWriter->Write(); > > > > I've checked that the 4 vertex are well displayed (cf screenshot). > > > > Unfortunately, my ply file shows 0 vertex. > > > > ply > format ascii 1.0 > comment VTK generated PLY File > obj_info vtkPolyData points and polygons: vtk4.0 > element vertex 0 > property float x > property float y > property float z > property uchar red > property uchar green > property uchar blue > element face 0 > property list uchar int vertex_indices > end_header > > > > I'm using vtk 6.3. > > > > If someone has already meet this problem or know the solution ... > > > > Thanks for your time, > > Best regards, > > > > David MOUSSAUD. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 cory.quammen at kitware.com Thu Jan 7 11:09:48 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 7 Jan 2016 11:09:48 -0500 Subject: [vtkusers] vtkBoxWidget::Points values change between Debug and Release mode In-Reply-To: References: Message-ID: Sorry, I don't see anything obvious. vtkBox must be initializing the points? Please include the vtkusers list when replying in case anyone else can help. Thanks, Cory On Thu, Jan 7, 2016 at 11:02 AM, Am?lie Thery wrote: > This is the function where I use it : > void PositionHandles(){ > vtkPoints* pts=vtkPoints::New(); > pts=GetPoints(); > //verifie que le widget n'est pas retourne > double p[3],o[3],u[3],t[3],g[3],r[3],v[3],h[3]; > pts->GetPoint(0,p); > pts->GetPoint(1,r); > pts->GetPoint(2,o); > pts->GetPoint(3,t); > pts->GetPoint(4,v); > pts->GetPoint(5,u); > pts->GetPoint(6,g); > pts->GetPoint(7,h); > > if (p[0]+limiteprofondeur>=o[0]) { > pts->SetPoint(1,o[0]+limiteprofondeur,r[1],r[2]); > pts->SetPoint(2,o[0]+limiteprofondeur,o[1],o[2]); > pts->SetPoint(5,o[0]+limiteprofondeur,u[1],u[2]); > pts->SetPoint(6,o[0]+limiteprofondeur,g[1],g[2]); > } > if (u[1]+limitehauteur>=t[1]){ > pts->SetPoint(2,o[0],t[1]+limitehauteur,o[2]); > pts->SetPoint(3,t[0],t[1]+limitehauteur,t[2]); > pts->SetPoint(6,g[0],t[1]+limitehauteur,g[2]); > pts->SetPoint(7,h[0],t[1]+limitehauteur,h[2]); > > } > if (r[2]+limitelargeur>=g[2]) { > pts->SetPoint(4,v[0],v[1],g[2]+limitelargeur); > pts->SetPoint(5,u[0],u[1],g[2]+limitelargeur); > pts->SetPoint(6,g[0],g[1],g[2]+limitelargeur); > pts->SetPoint(7,h[0],h[1],g[2]+limitelargeur); > } > > vtkBoxWidget::PositionHandles(); > } > > 2016-01-07 16:25 GMT+01:00 Cory Quammen : >> >> Am?lie, >> >> Two thoughts: >> >> 1). Some of the points may not be initialized. Could you post your >> initialization code for the vtkPoints object? >> >> 2). You are accidentally mixing Release and Debug mode libraries. You >> must link against either all Release or all Debug libraries - mixing >> them will lead to a world of hurt. >> >> Cory >> >> On Thu, Jan 7, 2016 at 10:09 AM, Am?lie Thery wrote: >> > Hi everybody, >> > I am using vtkBoxWidget, and I use Points to control it size. >> > I defined a public function vtkPoints * GetPoints(){return Points;}to >> > access >> > this protected member. >> > For example, when my vtkBoxWidget is defined by >> > {-1,0,0, >> > 1,0,0, >> > 1,0,1, >> > -1,0,1, >> > >> > -1,1,0, >> > 1,1,0, >> > 1,1,1, >> > -1,1,1} >> > >> > with one face under 0 and the opposite over 0 in x-axis, >> > I do: >> > vtkPoints* pts=GetPoints(); >> > double a[3],b[3]; >> > pts->GetPoint(0,a); //face under 0 >> > pts->GetPoint(2,b); //face over 0 >> > >> > In debug mode, a[0]= -1 and b[0]= 1 as it is supposed to be, >> > In release mode, a[0]= 1 and b[0]= 1 so I can not check the size of the >> > box. >> > >> > I didn't change anything between both tests, if anyone has any idea it >> > would >> > be grateful :) >> > >> > Thank you for reading, >> > Am?lie >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > 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. From david.gobbi at gmail.com Thu Jan 7 11:44:25 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 7 Jan 2016 09:44:25 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: There's also this patch to vtkOpenGL.cmake that you can try: https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe - David On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein wrote: > That was an excellent suggestion, but alas, even after replacing that file > with the newer one from the link you shared I am still getting the same > error! > > On Thu, Jan 7, 2016 at 8:34 AM David Gobbi wrote: > >> Hi Arno, >> >> You can try replacing FindOpenGL.cmake with the latest one from the cmake >> master branch: >> >> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >> On my machine, for example, the file is located here: >> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >> That might help with AGL. >> >> - David >> >> >> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein >> wrote: >> >>> Yes, it should be building from miniconda2. However, I can't find any >>> instance of "AGL" or of "10.7" anywhere in the code base (only within the >>> bin directory after running cmake). I am baffled and stuck. >>> >>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi >>> wrote: >>> >>>> Hi Arno, >>>> >>>> Are you still building against the Anaconda python? The build has to >>>> be picking up the AGL and the 10.7 SDK from somewhere, and if it isn't in >>>> your CMakeCache.txt, then it must be coming from somewhere. >>>> >>>> - David >>>> >>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein >>>> wrote: >>>> >>>>> Dear David, >>>>> >>>>> When I clear the bin directory, then run "cmake .." and "make" I don't >>>>> find any instance of 10.7 mentioned in any file, but still get >>>>> "AGL.framework" in every subdirectory's build.make file. The >>>>> CMakeCache.txt file contains the following line: >>>>> >>>>> >>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>> >>>>> And yet I am still receiving the following error: >>>>> >>>>> make[2]: *** No rule to make target >>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>> >>>>> Cheers, >>>>> @rno >>>>> >>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi >>>>> wrote: >>>>> >>>>>> Hi Arno, >>>>>> >>>>>> It could be a stale dependency. Remove everything after the >>>>>> "INTERNAL cache entries" comment in your CMakeCache.txt, and also search >>>>>> your cache to make sure that 10.7 does not appear anywhere. >>>>>> >>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure that the >>>>>> OpenGL framework isn't a link to a non-existent 10.7 SDK (though I don't >>>>>> see how that could happen). >>>>>> >>>>>> - David >>>>>> >>>>>> >>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein >>>>>> wrote: >>>>>> >>>>>>> David -- >>>>>>> >>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I replaced >>>>>>> every instance of "AGL" with OpenGL" in all of the build.make files. >>>>>>> Without cmake, but with make I got the following error: >>>>>>> >>>>>>> make[2]: *** No rule to make target >>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>> >>>>>>> It still calls 10.7 even though I have 10.11 installed on my Mac. >>>>>>> >>>>>>> Cheers, >>>>>>> @rno >>>>>>> >>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Arno, >>>>>>>> >>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>> >>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>> >>>>>>>> Change it to the following and then recompile: >>>>>>>> >>>>>>>> >>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>> >>>>>>>> That should keep the problematic AGL library out of your build. >>>>>>>> >>>>>>>> Please let me know if this works. >>>>>>>> >>>>>>>> Cheers, >>>>>>>> - David >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Thank you all so much for your kind help. Unfortunately, I am >>>>>>>>> still unable to compile the C++ code in my project on MacOSX, even after >>>>>>>>> setting the following in my top-level CMakeLists.txt file: >>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>> >>>>>>>>> When I type: >>>>>>>>> $ export VERBOSE=1 >>>>>>>>> $ make >>>>>>>>> >>>>>>>>> I get the following even though I don't have >>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>> but instead have >>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>> on my computer: >>>>>>>>> >>>>>>>>> ------------------ >>>>>>>>> ... >>>>>>>>> >>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>> >>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>> >>>>>>>>> [ 57%] Building CXX object >>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>> >>>>>>>>> cd /software/install/mindboggle/surface_cpp_tools/bin/travel_depth >>>>>>>>> && >>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>> >>>>>>>>> make[2]: *** No rule to make target >>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>> >>>>>>>>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>>>> Error 2 >>>>>>>>> >>>>>>>>> make: *** [all] Error 2 >>>>>>>>> ------------------- >>>>>>>>> >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> @rno >>>>>>>>> >>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Hi Arno, >>>>>>>>>> >>>>>>>>>> I think that I've found out where the AGL link is coming from. >>>>>>>>>> It isn't via Carbon, it looks like it was linked directly into the VTK that >>>>>>>>>> you're using. And it looks like a bug within CMake itself. >>>>>>>>>> >>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to find >>>>>>>>>> OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>>>>>> both, even though AGL.framework is really not needed for any modern >>>>>>>>>> software. >>>>>>>>>> >>>>>>>>>> This means that a VTK that is built with (for example) Xcode 6 >>>>>>>>>> and its SDKs becomes linked to AGL, because AGL.framework is present in >>>>>>>>>> those older SDKs. It's a private link, though, so I'm surprised that it >>>>>>>>>> would cause the error. But you are building with Xcode 7 and you are >>>>>>>>>> seeing an error... that much is indisputable. >>>>>>>>>> >>>>>>>>>> I suggest that you enable verbose error reporting so that you can >>>>>>>>>> see exactly what is being linked when the error occurs: >>>>>>>>>> >>>>>>>>>> export VERBOSE=1 >>>>>>>>>> make >>>>>>>>>> ... >>>>>>>>>> >>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>> >>>>>>>>>> - David >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> I tried again, and am still getting the AGL.framework error even >>>>>>>>>>> when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>> ): >>>>>>>>>>> >>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>> > make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>>>>>> Error 2 >>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>> >>>>>>>>>>> Could you please tell me how to ensure that there are no calls >>>>>>>>>>> to Carbon APIs? >>>>>>>>>>> >>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>> >>>>>>>>>>> Cheers, >>>>>>>>>>> @rno >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Arno, >>>>>>>>>>>> >>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows you to >>>>>>>>>>>> set this desired deployment target. So if you are able to compile with the >>>>>>>>>>>> following settings, then the result should run on OS X 10.7: >>>>>>>>>>>> >>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>> >>>>>>>>>>>> I'm not sure how far back you can set the deployment target >>>>>>>>>>>> with this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or >>>>>>>>>>>> 10.9. >>>>>>>>>>>> >>>>>>>>>>>> If if gives errors for the AGL.framework, then make sure that >>>>>>>>>>>> your code has no calls to Carbon APIs. >>>>>>>>>>>> >>>>>>>>>>>> - David >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.MOUSSAUD at cea.fr Thu Jan 7 11:44:34 2016 From: David.MOUSSAUD at cea.fr (MOUSSAUD David 244079) Date: Thu, 7 Jan 2016 16:44:34 +0000 Subject: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file In-Reply-To: References: <7A18A422C44BE34E947C1F96625E60BD089512B6@EXDAG0-A1.intra.cea.fr>, Message-ID: <7A18A422C44BE34E947C1F96625E60BD0895453B@EXDAG0-A1.intra.cea.fr> Yes it works, I have already success to generate one (without using vtk library). After the line "end_header', you have to write line by line the 3 coordinates of the vertices and theirs RGB colors (3 more numbers) You don't need to generate the faces if it is set to the 0 value in the header. Best Regards, David MOUSSAUD ________________________________________ De : Cory Quammen [cory.quammen at kitware.com] Envoy? : jeudi 7 janvier 2016 16:58 ? : MOUSSAUD David 244079 Cc : vtkusers at vtk.org Objet : Re: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file Hi David, Can you confirm that the PLY file format supports single-vertex cells like this? My perusal of the PLY documentation didn't reveal anything. Thanks, Cory On Thu, Jan 7, 2016 at 9:55 AM, MOUSSAUD David 244079 wrote: > Hi all, > > > > I've got a problem to generate a simple ply file with 4 vertices. > > Here how i proceed : > > > > // Setup points > > points = vtkSmartPointer::New(); > > > // Setup the colors array > > colors = vtkSmartPointer::New(); > > colors->SetNumberOfComponents(3); > > colors->SetName("Colors"); > > > // create a vertex > > vertex = vtkSmartPointer::New(); > > > // list of all the vertices > > vertices= vtkSmartPointer::New(); > > > /* Create a PLY Writer */ > > plyWriter = vtkSmartPointer::New(); > > > // Create a polydata object and add everything to it > > polydata = vtkSmartPointer::New(); > > polydata->SetPoints(points); > > polydata->SetVerts(vertices); > > polydata->GetPointData()->SetScalars(colors); > > > > Then here how i create my vertices and how i set them : > > > > points->Resize(4); > > points->SetPoint(0, 0.0, 0.0, 0.0); > > points->SetPoint(1, 1.0, 0.0, 0.0); > > points->SetPoint(2, 0.0, 1.0, 0.0); > > points->SetPoint(3, 0.0, 0.0, 1.0); > > > vertices->Initialize(); > > > vertex->GetPointIds()->SetId(0,0); > > vertices->InsertNextCell(vertex); > > > vertex->GetPointIds()->SetId(0,1); > > vertices->InsertNextCell(vertex); > > > vertex->GetPointIds()->SetId(0,2); > > vertices->InsertNextCell(vertex); > > > vertex->GetPointIds()->SetId(0,3); > > vertices->InsertNextCell(vertex); > > > colors->Initialize(); > > colors->InsertNextTuple3(255,0,0); > > colors->InsertNextTuple3(0,255,0); > > colors->InsertNextTuple3(0,0,255); > > colors->InsertNextTuple3(255,255,255); > > > > QString plyFilePath = "output.ply"; > > > std::string filename = plyFilePath.toStdString(); > > plyWriter->SetFileName(filename.c_str()); > > > plyWriter->SetInputData(polydata); > > > > plyWriter->SetColorModeToUniformPointColor(); > > plyWriter->SetArrayName("Colors"); > > plyWriter->SetFileTypeToASCII(); > > plyWriter->Write(); > > > > I've checked that the 4 vertex are well displayed (cf screenshot). > > > > Unfortunately, my ply file shows 0 vertex. > > > > ply > format ascii 1.0 > comment VTK generated PLY File > obj_info vtkPolyData points and polygons: vtk4.0 > element vertex 0 > property float x > property float y > property float z > property uchar red > property uchar green > property uchar blue > element face 0 > property list uchar int vertex_indices > end_header > > > > I'm using vtk 6.3. > > > > If someone has already meet this problem or know the solution ... > > > > Thanks for your time, > > Best regards, > > > > David MOUSSAUD. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 serge at infolytica.com Thu Jan 7 11:52:26 2016 From: serge at infolytica.com (Serge Lalonde) Date: Thu, 7 Jan 2016 11:52:26 -0500 Subject: [vtkusers] OpenGL2 backend and Remote Desktop Message-ID: <568E97CA.2070208@infolytica.com> An HTML attachment was scrubbed... URL: From binarybottle at gmail.com Thu Jan 7 11:59:58 2016 From: binarybottle at gmail.com (Arno Klein) Date: Thu, 07 Jan 2016 16:59:58 +0000 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Thank you for the suggestion, David. I placed the vtkOpenGL.cmake file in /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules but still receive the same error. On Thu, Jan 7, 2016 at 11:44 AM David Gobbi wrote: > There's also this patch to vtkOpenGL.cmake that you can try: > > https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe > > - David > > > On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein wrote: > >> That was an excellent suggestion, but alas, even after replacing that >> file with the newer one from the link you shared I am still getting the >> same error! >> >> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi wrote: >> >>> Hi Arno, >>> >>> You can try replacing FindOpenGL.cmake with the latest one from the >>> cmake master branch: >>> >>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>> On my machine, for example, the file is located here: >>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>> That might help with AGL. >>> >>> - David >>> >>> >>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein >>> wrote: >>> >>>> Yes, it should be building from miniconda2. However, I can't find any >>>> instance of "AGL" or of "10.7" anywhere in the code base (only within the >>>> bin directory after running cmake). I am baffled and stuck. >>>> >>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi >>>> wrote: >>>> >>>>> Hi Arno, >>>>> >>>>> Are you still building against the Anaconda python? The build has to >>>>> be picking up the AGL and the 10.7 SDK from somewhere, and if it isn't in >>>>> your CMakeCache.txt, then it must be coming from somewhere. >>>>> >>>>> - David >>>>> >>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein >>>>> wrote: >>>>> >>>>>> Dear David, >>>>>> >>>>>> When I clear the bin directory, then run "cmake .." and "make" I >>>>>> don't find any instance of 10.7 mentioned in any file, but still get >>>>>> "AGL.framework" in every subdirectory's build.make file. The >>>>>> CMakeCache.txt file contains the following line: >>>>>> >>>>>> >>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>> >>>>>> And yet I am still receiving the following error: >>>>>> >>>>>> make[2]: *** No rule to make target >>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>> >>>>>> Cheers, >>>>>> @rno >>>>>> >>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi >>>>>> wrote: >>>>>> >>>>>>> Hi Arno, >>>>>>> >>>>>>> It could be a stale dependency. Remove everything after the >>>>>>> "INTERNAL cache entries" comment in your CMakeCache.txt, and also search >>>>>>> your cache to make sure that 10.7 does not appear anywhere. >>>>>>> >>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure that the >>>>>>> OpenGL framework isn't a link to a non-existent 10.7 SDK (though I don't >>>>>>> see how that could happen). >>>>>>> >>>>>>> - David >>>>>>> >>>>>>> >>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein >>>>>>> wrote: >>>>>>> >>>>>>>> David -- >>>>>>>> >>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I replaced >>>>>>>> every instance of "AGL" with OpenGL" in all of the build.make files. >>>>>>>> Without cmake, but with make I got the following error: >>>>>>>> >>>>>>>> make[2]: *** No rule to make target >>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>> >>>>>>>> It still calls 10.7 even though I have 10.11 installed on my Mac. >>>>>>>> >>>>>>>> Cheers, >>>>>>>> @rno >>>>>>>> >>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi Arno, >>>>>>>>> >>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>> >>>>>>>>> >>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>> >>>>>>>>> Change it to the following and then recompile: >>>>>>>>> >>>>>>>>> >>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>> >>>>>>>>> That should keep the problematic AGL library out of your build. >>>>>>>>> >>>>>>>>> Please let me know if this works. >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> - David >>>>>>>>> >>>>>>>>> >>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein >>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> Thank you all so much for your kind help. Unfortunately, I am >>>>>>>>>> still unable to compile the C++ code in my project on MacOSX, even after >>>>>>>>>> setting the following in my top-level CMakeLists.txt file: >>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>> >>>>>>>>>> When I type: >>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>> $ make >>>>>>>>>> >>>>>>>>>> I get the following even though I don't have >>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>> but instead have >>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>> on my computer: >>>>>>>>>> >>>>>>>>>> ------------------ >>>>>>>>>> ... >>>>>>>>>> >>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>> >>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>> >>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>> >>>>>>>>>> cd >>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>> >>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>> >>>>>>>>>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>>>>> Error 2 >>>>>>>>>> >>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>> ------------------- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Cheers, >>>>>>>>>> @rno >>>>>>>>>> >>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Arno, >>>>>>>>>>> >>>>>>>>>>> I think that I've found out where the AGL link is coming from. >>>>>>>>>>> It isn't via Carbon, it looks like it was linked directly into the VTK that >>>>>>>>>>> you're using. And it looks like a bug within CMake itself. >>>>>>>>>>> >>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to find >>>>>>>>>>> OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>>>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>>>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>>>>>>> both, even though AGL.framework is really not needed for any modern >>>>>>>>>>> software. >>>>>>>>>>> >>>>>>>>>>> This means that a VTK that is built with (for example) Xcode 6 >>>>>>>>>>> and its SDKs becomes linked to AGL, because AGL.framework is present in >>>>>>>>>>> those older SDKs. It's a private link, though, so I'm surprised that it >>>>>>>>>>> would cause the error. But you are building with Xcode 7 and you are >>>>>>>>>>> seeing an error... that much is indisputable. >>>>>>>>>>> >>>>>>>>>>> I suggest that you enable verbose error reporting so that you >>>>>>>>>>> can see exactly what is being linked when the error occurs: >>>>>>>>>>> >>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>> make >>>>>>>>>>> ... >>>>>>>>>>> >>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>> >>>>>>>>>>> - David >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> I tried again, and am still getting the AGL.framework error >>>>>>>>>>>> even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>> ): >>>>>>>>>>>> >>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>> >>>>>>>>>>>> Could you please tell me how to ensure that there are no calls >>>>>>>>>>>> to Carbon APIs? >>>>>>>>>>>> >>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>> >>>>>>>>>>>> Cheers, >>>>>>>>>>>> @rno >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>> >>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows you to >>>>>>>>>>>>> set this desired deployment target. So if you are able to compile with the >>>>>>>>>>>>> following settings, then the result should run on OS X 10.7: >>>>>>>>>>>>> >>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>> >>>>>>>>>>>>> I'm not sure how far back you can set the deployment target >>>>>>>>>>>>> with this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or >>>>>>>>>>>>> 10.9. >>>>>>>>>>>>> >>>>>>>>>>>>> If if gives errors for the AGL.framework, then make sure that >>>>>>>>>>>>> your code has no calls to Carbon APIs. >>>>>>>>>>>>> >>>>>>>>>>>>> - David >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 7 12:14:58 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 7 Jan 2016 10:14:58 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Hi Arno, My fault, I should have mentioned that it needs to be in /CMake/vtkOpenGL.cmake in order be used during the VTK build. - David On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein wrote: > Thank you for the suggestion, David. I placed the vtkOpenGL.cmake file > in > > /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules > but still receive the same error. > > On Thu, Jan 7, 2016 at 11:44 AM David Gobbi wrote: > >> There's also this patch to vtkOpenGL.cmake that you can try: >> >> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe >> >> - David >> >> >> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein >> wrote: >> >>> That was an excellent suggestion, but alas, even after replacing that >>> file with the newer one from the link you shared I am still getting the >>> same error! >>> >>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi >>> wrote: >>> >>>> Hi Arno, >>>> >>>> You can try replacing FindOpenGL.cmake with the latest one from the >>>> cmake master branch: >>>> >>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>>> On my machine, for example, the file is located here: >>>> >>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>>> That might help with AGL. >>>> >>>> - David >>>> >>>> >>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein >>>> wrote: >>>> >>>>> Yes, it should be building from miniconda2. However, I can't find any >>>>> instance of "AGL" or of "10.7" anywhere in the code base (only within the >>>>> bin directory after running cmake). I am baffled and stuck. >>>>> >>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi >>>>> wrote: >>>>> >>>>>> Hi Arno, >>>>>> >>>>>> Are you still building against the Anaconda python? The build has to >>>>>> be picking up the AGL and the 10.7 SDK from somewhere, and if it isn't in >>>>>> your CMakeCache.txt, then it must be coming from somewhere. >>>>>> >>>>>> - David >>>>>> >>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein >>>>>> wrote: >>>>>> >>>>>>> Dear David, >>>>>>> >>>>>>> When I clear the bin directory, then run "cmake .." and "make" I >>>>>>> don't find any instance of 10.7 mentioned in any file, but still get >>>>>>> "AGL.framework" in every subdirectory's build.make file. The >>>>>>> CMakeCache.txt file contains the following line: >>>>>>> >>>>>>> >>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>> >>>>>>> And yet I am still receiving the following error: >>>>>>> >>>>>>> make[2]: *** No rule to make target >>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>> >>>>>>> Cheers, >>>>>>> @rno >>>>>>> >>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Arno, >>>>>>>> >>>>>>>> It could be a stale dependency. Remove everything after the >>>>>>>> "INTERNAL cache entries" comment in your CMakeCache.txt, and also search >>>>>>>> your cache to make sure that 10.7 does not appear anywhere. >>>>>>>> >>>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure that >>>>>>>> the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I >>>>>>>> don't see how that could happen). >>>>>>>> >>>>>>>> - David >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein >>>>>>>> wrote: >>>>>>>> >>>>>>>>> David -- >>>>>>>>> >>>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I replaced >>>>>>>>> every instance of "AGL" with OpenGL" in all of the build.make files. >>>>>>>>> Without cmake, but with make I got the following error: >>>>>>>>> >>>>>>>>> make[2]: *** No rule to make target >>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>> >>>>>>>>> It still calls 10.7 even though I have 10.11 installed on my Mac. >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> @rno >>>>>>>>> >>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi >>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> Hi Arno, >>>>>>>>>> >>>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>>> >>>>>>>>>> Change it to the following and then recompile: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>>> >>>>>>>>>> That should keep the problematic AGL library out of your build. >>>>>>>>>> >>>>>>>>>> Please let me know if this works. >>>>>>>>>> >>>>>>>>>> Cheers, >>>>>>>>>> - David >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein < >>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Thank you all so much for your kind help. Unfortunately, I am >>>>>>>>>>> still unable to compile the C++ code in my project on MacOSX, even after >>>>>>>>>>> setting the following in my top-level CMakeLists.txt file: >>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>>> >>>>>>>>>>> When I type: >>>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>>> $ make >>>>>>>>>>> >>>>>>>>>>> I get the following even though I don't have >>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>>> but instead have >>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>>> on my computer: >>>>>>>>>>> >>>>>>>>>>> ------------------ >>>>>>>>>>> ... >>>>>>>>>>> >>>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>>> >>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>>> >>>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>> >>>>>>>>>>> cd >>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>>> >>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>> >>>>>>>>>>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>>>>>> Error 2 >>>>>>>>>>> >>>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>>> ------------------- >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Cheers, >>>>>>>>>>> @rno >>>>>>>>>>> >>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Arno, >>>>>>>>>>>> >>>>>>>>>>>> I think that I've found out where the AGL link is coming from. >>>>>>>>>>>> It isn't via Carbon, it looks like it was linked directly into the VTK that >>>>>>>>>>>> you're using. And it looks like a bug within CMake itself. >>>>>>>>>>>> >>>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to >>>>>>>>>>>> find OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>>>>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>>>>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>>>>>>>> both, even though AGL.framework is really not needed for any modern >>>>>>>>>>>> software. >>>>>>>>>>>> >>>>>>>>>>>> This means that a VTK that is built with (for example) Xcode 6 >>>>>>>>>>>> and its SDKs becomes linked to AGL, because AGL.framework is present in >>>>>>>>>>>> those older SDKs. It's a private link, though, so I'm surprised that it >>>>>>>>>>>> would cause the error. But you are building with Xcode 7 and you are >>>>>>>>>>>> seeing an error... that much is indisputable. >>>>>>>>>>>> >>>>>>>>>>>> I suggest that you enable verbose error reporting so that you >>>>>>>>>>>> can see exactly what is being linked when the error occurs: >>>>>>>>>>>> >>>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>>> make >>>>>>>>>>>> ... >>>>>>>>>>>> >>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>>> >>>>>>>>>>>> - David >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> I tried again, and am still getting the AGL.framework error >>>>>>>>>>>>> even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>>> ): >>>>>>>>>>>>> >>>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>>> >>>>>>>>>>>>> Could you please tell me how to ensure that there are no calls >>>>>>>>>>>>> to Carbon APIs? >>>>>>>>>>>>> >>>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>>> >>>>>>>>>>>>> Cheers, >>>>>>>>>>>>> @rno >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows you to >>>>>>>>>>>>>> set this desired deployment target. So if you are able to compile with the >>>>>>>>>>>>>> following settings, then the result should run on OS X 10.7: >>>>>>>>>>>>>> >>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>>> >>>>>>>>>>>>>> I'm not sure how far back you can set the deployment target >>>>>>>>>>>>>> with this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or >>>>>>>>>>>>>> 10.9. >>>>>>>>>>>>>> >>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make sure that >>>>>>>>>>>>>> your code has no calls to Carbon APIs. >>>>>>>>>>>>>> >>>>>>>>>>>>>> - David >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From binarybottle at gmail.com Thu Jan 7 14:50:41 2016 From: binarybottle at gmail.com (Arno Klein) Date: Thu, 07 Jan 2016 19:50:41 +0000 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: If that is the same directory that FindOpenGL.cmake is in, then the path I sent should be correct, yes? I installed cmake using Anaconda: "conda install --yes cmake" On Thu, Jan 7, 2016 at 12:15 PM David Gobbi wrote: > Hi Arno, > > My fault, I should have mentioned that it needs to be in > /CMake/vtkOpenGL.cmake in order be used during the VTK build. > > - David > > On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein wrote: > >> Thank you for the suggestion, David. I placed the vtkOpenGL.cmake file >> in >> >> /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules >> but still receive the same error. >> >> On Thu, Jan 7, 2016 at 11:44 AM David Gobbi >> wrote: >> >>> There's also this patch to vtkOpenGL.cmake that you can try: >>> >>> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe >>> >>> - David >>> >>> >>> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein >>> wrote: >>> >>>> That was an excellent suggestion, but alas, even after replacing that >>>> file with the newer one from the link you shared I am still getting the >>>> same error! >>>> >>>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi >>>> wrote: >>>> >>>>> Hi Arno, >>>>> >>>>> You can try replacing FindOpenGL.cmake with the latest one from the >>>>> cmake master branch: >>>>> >>>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>>>> On my machine, for example, the file is located here: >>>>> >>>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>>>> That might help with AGL. >>>>> >>>>> - David >>>>> >>>>> >>>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein >>>>> wrote: >>>>> >>>>>> Yes, it should be building from miniconda2. However, I can't find >>>>>> any instance of "AGL" or of "10.7" anywhere in the code base (only within >>>>>> the bin directory after running cmake). I am baffled and stuck. >>>>>> >>>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi >>>>>> wrote: >>>>>> >>>>>>> Hi Arno, >>>>>>> >>>>>>> Are you still building against the Anaconda python? The build has >>>>>>> to be picking up the AGL and the 10.7 SDK from somewhere, and if it isn't >>>>>>> in your CMakeCache.txt, then it must be coming from somewhere. >>>>>>> >>>>>>> - David >>>>>>> >>>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein >>>>>>> wrote: >>>>>>> >>>>>>>> Dear David, >>>>>>>> >>>>>>>> When I clear the bin directory, then run "cmake .." and "make" I >>>>>>>> don't find any instance of 10.7 mentioned in any file, but still get >>>>>>>> "AGL.framework" in every subdirectory's build.make file. The >>>>>>>> CMakeCache.txt file contains the following line: >>>>>>>> >>>>>>>> >>>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>> >>>>>>>> And yet I am still receiving the following error: >>>>>>>> >>>>>>>> make[2]: *** No rule to make target >>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>> >>>>>>>> Cheers, >>>>>>>> @rno >>>>>>>> >>>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi Arno, >>>>>>>>> >>>>>>>>> It could be a stale dependency. Remove everything after the >>>>>>>>> "INTERNAL cache entries" comment in your CMakeCache.txt, and also search >>>>>>>>> your cache to make sure that 10.7 does not appear anywhere. >>>>>>>>> >>>>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure that >>>>>>>>> the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I >>>>>>>>> don't see how that could happen). >>>>>>>>> >>>>>>>>> - David >>>>>>>>> >>>>>>>>> >>>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein >>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> David -- >>>>>>>>>> >>>>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I replaced >>>>>>>>>> every instance of "AGL" with OpenGL" in all of the build.make files. >>>>>>>>>> Without cmake, but with make I got the following error: >>>>>>>>>> >>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>> >>>>>>>>>> It still calls 10.7 even though I have 10.11 installed on my Mac. >>>>>>>>>> >>>>>>>>>> Cheers, >>>>>>>>>> @rno >>>>>>>>>> >>>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi < >>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Arno, >>>>>>>>>>> >>>>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>>>> >>>>>>>>>>> Change it to the following and then recompile: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>>>> >>>>>>>>>>> That should keep the problematic AGL library out of your build. >>>>>>>>>>> >>>>>>>>>>> Please let me know if this works. >>>>>>>>>>> >>>>>>>>>>> Cheers, >>>>>>>>>>> - David >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein < >>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Thank you all so much for your kind help. Unfortunately, I am >>>>>>>>>>>> still unable to compile the C++ code in my project on MacOSX, even after >>>>>>>>>>>> setting the following in my top-level CMakeLists.txt file: >>>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>>>> >>>>>>>>>>>> When I type: >>>>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>>>> $ make >>>>>>>>>>>> >>>>>>>>>>>> I get the following even though I don't have >>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>>>> but instead have >>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>>>> on my computer: >>>>>>>>>>>> >>>>>>>>>>>> ------------------ >>>>>>>>>>>> ... >>>>>>>>>>>> >>>>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>>>> >>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>>>> >>>>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>> >>>>>>>>>>>> cd >>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>>>> >>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>> >>>>>>>>>>>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>>>>>>> Error 2 >>>>>>>>>>>> >>>>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>>>> ------------------- >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Cheers, >>>>>>>>>>>> @rno >>>>>>>>>>>> >>>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>> >>>>>>>>>>>>> I think that I've found out where the AGL link is coming >>>>>>>>>>>>> from. It isn't via Carbon, it looks like it was linked directly into the >>>>>>>>>>>>> VTK that you're using. And it looks like a bug within CMake itself. >>>>>>>>>>>>> >>>>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to >>>>>>>>>>>>> find OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>>>>>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>>>>>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>>>>>>>>> both, even though AGL.framework is really not needed for any modern >>>>>>>>>>>>> software. >>>>>>>>>>>>> >>>>>>>>>>>>> This means that a VTK that is built with (for example) Xcode 6 >>>>>>>>>>>>> and its SDKs becomes linked to AGL, because AGL.framework is present in >>>>>>>>>>>>> those older SDKs. It's a private link, though, so I'm surprised that it >>>>>>>>>>>>> would cause the error. But you are building with Xcode 7 and you are >>>>>>>>>>>>> seeing an error... that much is indisputable. >>>>>>>>>>>>> >>>>>>>>>>>>> I suggest that you enable verbose error reporting so that you >>>>>>>>>>>>> can see exactly what is being linked when the error occurs: >>>>>>>>>>>>> >>>>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>>>> make >>>>>>>>>>>>> ... >>>>>>>>>>>>> >>>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>>>> >>>>>>>>>>>>> - David >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> I tried again, and am still getting the AGL.framework error >>>>>>>>>>>>>> even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>>>> ): >>>>>>>>>>>>>> >>>>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Could you please tell me how to ensure that there are no >>>>>>>>>>>>>> calls to Carbon APIs? >>>>>>>>>>>>>> >>>>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>> @rno >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows you >>>>>>>>>>>>>>> to set this desired deployment target. So if you are able to compile with >>>>>>>>>>>>>>> the following settings, then the result should run on OS X 10.7: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I'm not sure how far back you can set the deployment target >>>>>>>>>>>>>>> with this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or >>>>>>>>>>>>>>> 10.9. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make sure >>>>>>>>>>>>>>> that your code has no calls to Carbon APIs. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 7 15:16:35 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 7 Jan 2016 13:16:35 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: It is not the same directory. FindOpenGL.cmake is part of cmake, but vtkOpenGL.cmake is part of VTK. On Thu, Jan 7, 2016 at 12:50 PM, Arno Klein wrote: > If that is the same directory that FindOpenGL.cmake is in, then the path I > sent should be correct, yes? I installed cmake using Anaconda: "conda > install --yes cmake" > > On Thu, Jan 7, 2016 at 12:15 PM David Gobbi wrote: > >> Hi Arno, >> >> My fault, I should have mentioned that it needs to be in >> /CMake/vtkOpenGL.cmake in order be used during the VTK build. >> >> - David >> >> On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein >> wrote: >> >>> Thank you for the suggestion, David. I placed the vtkOpenGL.cmake file >>> in >>> >>> /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules >>> but still receive the same error. >>> >>> On Thu, Jan 7, 2016 at 11:44 AM David Gobbi >>> wrote: >>> >>>> There's also this patch to vtkOpenGL.cmake that you can try: >>>> >>>> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe >>>> >>>> - David >>>> >>>> >>>> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein >>>> wrote: >>>> >>>>> That was an excellent suggestion, but alas, even after replacing that >>>>> file with the newer one from the link you shared I am still getting the >>>>> same error! >>>>> >>>>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi >>>>> wrote: >>>>> >>>>>> Hi Arno, >>>>>> >>>>>> You can try replacing FindOpenGL.cmake with the latest one from the >>>>>> cmake master branch: >>>>>> >>>>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>>>>> On my machine, for example, the file is located here: >>>>>> >>>>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>>>>> That might help with AGL. >>>>>> >>>>>> - David >>>>>> >>>>>> >>>>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein >>>>>> wrote: >>>>>> >>>>>>> Yes, it should be building from miniconda2. However, I can't find >>>>>>> any instance of "AGL" or of "10.7" anywhere in the code base (only within >>>>>>> the bin directory after running cmake). I am baffled and stuck. >>>>>>> >>>>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Arno, >>>>>>>> >>>>>>>> Are you still building against the Anaconda python? The build has >>>>>>>> to be picking up the AGL and the 10.7 SDK from somewhere, and if it isn't >>>>>>>> in your CMakeCache.txt, then it must be coming from somewhere. >>>>>>>> >>>>>>>> - David >>>>>>>> >>>>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Dear David, >>>>>>>>> >>>>>>>>> When I clear the bin directory, then run "cmake .." and "make" I >>>>>>>>> don't find any instance of 10.7 mentioned in any file, but still get >>>>>>>>> "AGL.framework" in every subdirectory's build.make file. The >>>>>>>>> CMakeCache.txt file contains the following line: >>>>>>>>> >>>>>>>>> >>>>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>> >>>>>>>>> And yet I am still receiving the following error: >>>>>>>>> >>>>>>>>> make[2]: *** No rule to make target >>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> @rno >>>>>>>>> >>>>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi >>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> Hi Arno, >>>>>>>>>> >>>>>>>>>> It could be a stale dependency. Remove everything after the >>>>>>>>>> "INTERNAL cache entries" comment in your CMakeCache.txt, and also search >>>>>>>>>> your cache to make sure that 10.7 does not appear anywhere. >>>>>>>>>> >>>>>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure that >>>>>>>>>> the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I >>>>>>>>>> don't see how that could happen). >>>>>>>>>> >>>>>>>>>> - David >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein < >>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> David -- >>>>>>>>>>> >>>>>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I replaced >>>>>>>>>>> every instance of "AGL" with OpenGL" in all of the build.make files. >>>>>>>>>>> Without cmake, but with make I got the following error: >>>>>>>>>>> >>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>> >>>>>>>>>>> It still calls 10.7 even though I have 10.11 installed on my Mac. >>>>>>>>>>> >>>>>>>>>>> Cheers, >>>>>>>>>>> @rno >>>>>>>>>>> >>>>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi < >>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Arno, >>>>>>>>>>>> >>>>>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>>>>> >>>>>>>>>>>> Change it to the following and then recompile: >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>>>>> >>>>>>>>>>>> That should keep the problematic AGL library out of your build. >>>>>>>>>>>> >>>>>>>>>>>> Please let me know if this works. >>>>>>>>>>>> >>>>>>>>>>>> Cheers, >>>>>>>>>>>> - David >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein < >>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Thank you all so much for your kind help. Unfortunately, I am >>>>>>>>>>>>> still unable to compile the C++ code in my project on MacOSX, even after >>>>>>>>>>>>> setting the following in my top-level CMakeLists.txt file: >>>>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>>>>> >>>>>>>>>>>>> When I type: >>>>>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>>>>> $ make >>>>>>>>>>>>> >>>>>>>>>>>>> I get the following even though I don't have >>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>>>>> but instead have >>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>>>>> on my computer: >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------ >>>>>>>>>>>>> ... >>>>>>>>>>>>> >>>>>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>>>>> >>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>>>>> >>>>>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>> >>>>>>>>>>>>> cd >>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>>>>> >>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>> >>>>>>>>>>>>> make[1]: *** [travel_depth/CMakeFiles/TravelDepthMain.dir/all] >>>>>>>>>>>>> Error 2 >>>>>>>>>>>>> >>>>>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>>>>> ------------------- >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Cheers, >>>>>>>>>>>>> @rno >>>>>>>>>>>>> >>>>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I think that I've found out where the AGL link is coming >>>>>>>>>>>>>> from. It isn't via Carbon, it looks like it was linked directly into the >>>>>>>>>>>>>> VTK that you're using. And it looks like a bug within CMake itself. >>>>>>>>>>>>>> >>>>>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to >>>>>>>>>>>>>> find OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>>>>>>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>>>>>>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>>>>>>>>>> both, even though AGL.framework is really not needed for any modern >>>>>>>>>>>>>> software. >>>>>>>>>>>>>> >>>>>>>>>>>>>> This means that a VTK that is built with (for example) Xcode >>>>>>>>>>>>>> 6 and its SDKs becomes linked to AGL, because AGL.framework is present in >>>>>>>>>>>>>> those older SDKs. It's a private link, though, so I'm surprised that it >>>>>>>>>>>>>> would cause the error. But you are building with Xcode 7 and you are >>>>>>>>>>>>>> seeing an error... that much is indisputable. >>>>>>>>>>>>>> >>>>>>>>>>>>>> I suggest that you enable verbose error reporting so that you >>>>>>>>>>>>>> can see exactly what is being linked when the error occurs: >>>>>>>>>>>>>> >>>>>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>>>>> make >>>>>>>>>>>>>> ... >>>>>>>>>>>>>> >>>>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>>>>> >>>>>>>>>>>>>> - David >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> I tried again, and am still getting the AGL.framework error >>>>>>>>>>>>>>> even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>>>>> ): >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Could you please tell me how to ensure that there are no >>>>>>>>>>>>>>> calls to Carbon APIs? >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows you >>>>>>>>>>>>>>>> to set this desired deployment target. So if you are able to compile with >>>>>>>>>>>>>>>> the following settings, then the result should run on OS X 10.7: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I'm not sure how far back you can set the deployment target >>>>>>>>>>>>>>>> with this SDK, but if the 10.7 target doesn't compile, you can try 10.8 or >>>>>>>>>>>>>>>> 10.9. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make sure >>>>>>>>>>>>>>>> that your code has no calls to Carbon APIs. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>> >>>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From binarybottle at gmail.com Thu Jan 7 15:39:29 2016 From: binarybottle at gmail.com (Arno Klein) Date: Thu, 07 Jan 2016 20:39:29 +0000 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Thank you! I am afraid I still don't know where it goes, given the conda installation of vtk doesn't have a CMake subdirectory (miniconda2/pkgs/vtk-6.3.0-py27_1/). Any suggestions how to proceed? On Thu, Jan 7, 2016 at 3:16 PM David Gobbi wrote: > It is not the same directory. FindOpenGL.cmake is part of cmake, but > vtkOpenGL.cmake is part of VTK. > > On Thu, Jan 7, 2016 at 12:50 PM, Arno Klein > wrote: > >> If that is the same directory that FindOpenGL.cmake is in, then the path >> I sent should be correct, yes? I installed cmake using Anaconda: "conda >> install --yes cmake" >> >> On Thu, Jan 7, 2016 at 12:15 PM David Gobbi >> wrote: >> >>> Hi Arno, >>> >>> My fault, I should have mentioned that it needs to be in >>> /CMake/vtkOpenGL.cmake in order be used during the VTK build. >>> >>> - David >>> >>> On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein >>> wrote: >>> >>>> Thank you for the suggestion, David. I placed the vtkOpenGL.cmake file >>>> in >>>> >>>> /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules >>>> but still receive the same error. >>>> >>>> On Thu, Jan 7, 2016 at 11:44 AM David Gobbi >>>> wrote: >>>> >>>>> There's also this patch to vtkOpenGL.cmake that you can try: >>>>> >>>>> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe >>>>> >>>>> - David >>>>> >>>>> >>>>> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein >>>>> wrote: >>>>> >>>>>> That was an excellent suggestion, but alas, even after replacing that >>>>>> file with the newer one from the link you shared I am still getting the >>>>>> same error! >>>>>> >>>>>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi >>>>>> wrote: >>>>>> >>>>>>> Hi Arno, >>>>>>> >>>>>>> You can try replacing FindOpenGL.cmake with the latest one from the >>>>>>> cmake master branch: >>>>>>> >>>>>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>>>>>> On my machine, for example, the file is located here: >>>>>>> >>>>>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>>>>>> That might help with AGL. >>>>>>> >>>>>>> - David >>>>>>> >>>>>>> >>>>>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein >>>>>>> wrote: >>>>>>> >>>>>>>> Yes, it should be building from miniconda2. However, I can't find >>>>>>>> any instance of "AGL" or of "10.7" anywhere in the code base (only within >>>>>>>> the bin directory after running cmake). I am baffled and stuck. >>>>>>>> >>>>>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi Arno, >>>>>>>>> >>>>>>>>> Are you still building against the Anaconda python? The build has >>>>>>>>> to be picking up the AGL and the 10.7 SDK from somewhere, and if it isn't >>>>>>>>> in your CMakeCache.txt, then it must be coming from somewhere. >>>>>>>>> >>>>>>>>> - David >>>>>>>>> >>>>>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein >>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> Dear David, >>>>>>>>>> >>>>>>>>>> When I clear the bin directory, then run "cmake .." and "make" I >>>>>>>>>> don't find any instance of 10.7 mentioned in any file, but still get >>>>>>>>>> "AGL.framework" in every subdirectory's build.make file. The >>>>>>>>>> CMakeCache.txt file contains the following line: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>> >>>>>>>>>> And yet I am still receiving the following error: >>>>>>>>>> >>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>> >>>>>>>>>> Cheers, >>>>>>>>>> @rno >>>>>>>>>> >>>>>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi < >>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Arno, >>>>>>>>>>> >>>>>>>>>>> It could be a stale dependency. Remove everything after the >>>>>>>>>>> "INTERNAL cache entries" comment in your CMakeCache.txt, and also search >>>>>>>>>>> your cache to make sure that 10.7 does not appear anywhere. >>>>>>>>>>> >>>>>>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure that >>>>>>>>>>> the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I >>>>>>>>>>> don't see how that could happen). >>>>>>>>>>> >>>>>>>>>>> - David >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein < >>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> David -- >>>>>>>>>>>> >>>>>>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I >>>>>>>>>>>> replaced every instance of "AGL" with OpenGL" in all of the build.make >>>>>>>>>>>> files. Without cmake, but with make I got the following error: >>>>>>>>>>>> >>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>> >>>>>>>>>>>> It still calls 10.7 even though I have 10.11 installed on my >>>>>>>>>>>> Mac. >>>>>>>>>>>> >>>>>>>>>>>> Cheers, >>>>>>>>>>>> @rno >>>>>>>>>>>> >>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi < >>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>> >>>>>>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>>>>>> >>>>>>>>>>>>> Change it to the following and then recompile: >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>>>>>> >>>>>>>>>>>>> That should keep the problematic AGL library out of your build. >>>>>>>>>>>>> >>>>>>>>>>>>> Please let me know if this works. >>>>>>>>>>>>> >>>>>>>>>>>>> Cheers, >>>>>>>>>>>>> - David >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein < >>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Thank you all so much for your kind help. Unfortunately, I >>>>>>>>>>>>>> am still unable to compile the C++ code in my project on MacOSX, even after >>>>>>>>>>>>>> setting the following in my top-level CMakeLists.txt file: >>>>>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>>>>>> >>>>>>>>>>>>>> When I type: >>>>>>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>>>>>> $ make >>>>>>>>>>>>>> >>>>>>>>>>>>>> I get the following even though I don't have >>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>>>>>> but instead have >>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>>>>>> on my computer: >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>>> ... >>>>>>>>>>>>>> >>>>>>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>>>>>> >>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>>>>>> >>>>>>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>> >>>>>>>>>>>>>> cd >>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>>>>>> >>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>> >>>>>>>>>>>>>> make[1]: *** >>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>> >>>>>>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>>>>>> ------------------- >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>> @rno >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I think that I've found out where the AGL link is coming >>>>>>>>>>>>>>> from. It isn't via Carbon, it looks like it was linked directly into the >>>>>>>>>>>>>>> VTK that you're using. And it looks like a bug within CMake itself. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to >>>>>>>>>>>>>>> find OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>>>>>>>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>>>>>>>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>>>>>>>>>>> both, even though AGL.framework is really not needed for any modern >>>>>>>>>>>>>>> software. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This means that a VTK that is built with (for example) Xcode >>>>>>>>>>>>>>> 6 and its SDKs becomes linked to AGL, because AGL.framework is present in >>>>>>>>>>>>>>> those older SDKs. It's a private link, though, so I'm surprised that it >>>>>>>>>>>>>>> would cause the error. But you are building with Xcode 7 and you are >>>>>>>>>>>>>>> seeing an error... that much is indisputable. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I suggest that you enable verbose error reporting so that >>>>>>>>>>>>>>> you can see exactly what is being linked when the error occurs: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>>>>>> make >>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I tried again, and am still getting the AGL.framework error >>>>>>>>>>>>>>>> even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>>>>>> ): >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Could you please tell me how to ensure that there are no >>>>>>>>>>>>>>>> calls to Carbon APIs? >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows you >>>>>>>>>>>>>>>>> to set this desired deployment target. So if you are able to compile with >>>>>>>>>>>>>>>>> the following settings, then the result should run on OS X 10.7: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> I'm not sure how far back you can set the deployment >>>>>>>>>>>>>>>>> target with this SDK, but if the 10.7 target doesn't compile, you can try >>>>>>>>>>>>>>>>> 10.8 or 10.9. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make sure >>>>>>>>>>>>>>>>> that your code has no calls to Carbon APIs. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>> >>>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 7 16:17:03 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 7 Jan 2016 14:17:03 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: I apologize for that... I had forgotten that you were using a binary distribution of VTK rather than building VTK from source. My recent thinking was that the only binary piece you were using from Anaconda was python itself, I didn't go back and re-read our entire conversation. This means that all of my recent advice to you has been totally irrelevant. (It would be very relevant to the Anaconda folks if they plan to put out a new vtk package soon... they could save people like yourself a lot of difficulty.) If you're using a binary vtk, then you'll have to dig into the cmake exports for VTK and perform some surgical changes to them. Somewhere in your Anaconda VTK, there should be a directory called the following: cmake/vtk-6.3 Once you find that directory, "cd" into it, and it should be full of cmake files. These cmake files list the dependencies for your VTK package. If you edit these files to remove all references to "AGL" and the problematic SDK, then your compile difficulties should go away. For example, use this to find all the files that reference AGL: find . -name "*.cmake" -exec fgrep -l AGL {} + But it might be easier if you find a Mac with OS X 10.9 and Xcode 6.1, and then re-do your build there. - David On Thu, Jan 7, 2016 at 1:39 PM, Arno Klein wrote: > Thank you! I am afraid I still don't know where it goes, given the conda > installation of vtk doesn't have a CMake subdirectory (miniconda2/pkgs/vtk-6.3.0-py27_1/). > Any suggestions how to proceed? > > On Thu, Jan 7, 2016 at 3:16 PM David Gobbi wrote: > >> It is not the same directory. FindOpenGL.cmake is part of cmake, but >> vtkOpenGL.cmake is part of VTK. >> >> On Thu, Jan 7, 2016 at 12:50 PM, Arno Klein >> wrote: >> >>> If that is the same directory that FindOpenGL.cmake is in, then the path >>> I sent should be correct, yes? I installed cmake using Anaconda: "conda >>> install --yes cmake" >>> >>> On Thu, Jan 7, 2016 at 12:15 PM David Gobbi >>> wrote: >>> >>>> Hi Arno, >>>> >>>> My fault, I should have mentioned that it needs to be in >>>> /CMake/vtkOpenGL.cmake in order be used during the VTK build. >>>> >>>> - David >>>> >>>> On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein >>>> wrote: >>>> >>>>> Thank you for the suggestion, David. I placed the vtkOpenGL.cmake >>>>> file in >>>>> >>>>> /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules >>>>> but still receive the same error. >>>>> >>>>> On Thu, Jan 7, 2016 at 11:44 AM David Gobbi >>>>> wrote: >>>>> >>>>>> There's also this patch to vtkOpenGL.cmake that you can try: >>>>>> >>>>>> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe >>>>>> >>>>>> - David >>>>>> >>>>>> >>>>>> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein >>>>>> wrote: >>>>>> >>>>>>> That was an excellent suggestion, but alas, even after replacing >>>>>>> that file with the newer one from the link you shared I am still getting >>>>>>> the same error! >>>>>>> >>>>>>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Arno, >>>>>>>> >>>>>>>> You can try replacing FindOpenGL.cmake with the latest one from the >>>>>>>> cmake master branch: >>>>>>>> >>>>>>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>>>>>>> On my machine, for example, the file is located here: >>>>>>>> >>>>>>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>>>>>>> That might help with AGL. >>>>>>>> >>>>>>>> - David >>>>>>>> >>>>>>>> >>>>>>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Yes, it should be building from miniconda2. However, I can't find >>>>>>>>> any instance of "AGL" or of "10.7" anywhere in the code base (only within >>>>>>>>> the bin directory after running cmake). I am baffled and stuck. >>>>>>>>> >>>>>>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> Hi Arno, >>>>>>>>>> >>>>>>>>>> Are you still building against the Anaconda python? The build >>>>>>>>>> has to be picking up the AGL and the 10.7 SDK from somewhere, and if it >>>>>>>>>> isn't in your CMakeCache.txt, then it must be coming from somewhere. >>>>>>>>>> >>>>>>>>>> - David >>>>>>>>>> >>>>>>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein < >>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Dear David, >>>>>>>>>>> >>>>>>>>>>> When I clear the bin directory, then run "cmake .." and "make" I >>>>>>>>>>> don't find any instance of 10.7 mentioned in any file, but still get >>>>>>>>>>> "AGL.framework" in every subdirectory's build.make file. The >>>>>>>>>>> CMakeCache.txt file contains the following line: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>> >>>>>>>>>>> And yet I am still receiving the following error: >>>>>>>>>>> >>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>> >>>>>>>>>>> Cheers, >>>>>>>>>>> @rno >>>>>>>>>>> >>>>>>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi < >>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Arno, >>>>>>>>>>>> >>>>>>>>>>>> It could be a stale dependency. Remove everything after the >>>>>>>>>>>> "INTERNAL cache entries" comment in your CMakeCache.txt, and also search >>>>>>>>>>>> your cache to make sure that 10.7 does not appear anywhere. >>>>>>>>>>>> >>>>>>>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure >>>>>>>>>>>> that the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I >>>>>>>>>>>> don't see how that could happen). >>>>>>>>>>>> >>>>>>>>>>>> - David >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein < >>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> David -- >>>>>>>>>>>>> >>>>>>>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I >>>>>>>>>>>>> replaced every instance of "AGL" with OpenGL" in all of the build.make >>>>>>>>>>>>> files. Without cmake, but with make I got the following error: >>>>>>>>>>>>> >>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>> >>>>>>>>>>>>> It still calls 10.7 even though I have 10.11 installed on my >>>>>>>>>>>>> Mac. >>>>>>>>>>>>> >>>>>>>>>>>>> Cheers, >>>>>>>>>>>>> @rno >>>>>>>>>>>>> >>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi < >>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>>>>>>> >>>>>>>>>>>>>> Change it to the following and then recompile: >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>>>>>>> >>>>>>>>>>>>>> That should keep the problematic AGL library out of your >>>>>>>>>>>>>> build. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Please let me know if this works. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>> - David >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein < >>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thank you all so much for your kind help. Unfortunately, I >>>>>>>>>>>>>>> am still unable to compile the C++ code in my project on MacOSX, even after >>>>>>>>>>>>>>> setting the following in my top-level CMakeLists.txt file: >>>>>>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> When I type: >>>>>>>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>>>>>>> $ make >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I get the following even though I don't have >>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>>>>>>> but instead have >>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>>>>>>> on my computer: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> cd >>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> make[1]: *** >>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>>>>>>> ------------------- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I think that I've found out where the AGL link is coming >>>>>>>>>>>>>>>> from. It isn't via Carbon, it looks like it was linked directly into the >>>>>>>>>>>>>>>> VTK that you're using. And it looks like a bug within CMake itself. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses to >>>>>>>>>>>>>>>> find OpenGL. It looks for both the OpenGL.framework and for the obsolete >>>>>>>>>>>>>>>> AGL.framework (which is only for Carbon, and is deprecated by Apple). If >>>>>>>>>>>>>>>> it finds both (e.g. with an older SDK and XCode 6 or earlier), then it uses >>>>>>>>>>>>>>>> both, even though AGL.framework is really not needed for any modern >>>>>>>>>>>>>>>> software. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> This means that a VTK that is built with (for example) >>>>>>>>>>>>>>>> Xcode 6 and its SDKs becomes linked to AGL, because AGL.framework is >>>>>>>>>>>>>>>> present in those older SDKs. It's a private link, though, so I'm surprised >>>>>>>>>>>>>>>> that it would cause the error. But you are building with Xcode 7 and you >>>>>>>>>>>>>>>> are seeing an error... that much is indisputable. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I suggest that you enable verbose error reporting so that >>>>>>>>>>>>>>>> you can see exactly what is being linked when the error occurs: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>>>>>>> make >>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> I tried again, and am still getting the AGL.framework >>>>>>>>>>>>>>>>> error even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>>>>>>> ): >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Could you please tell me how to ensure that there are no >>>>>>>>>>>>>>>>> calls to Carbon APIs? >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows >>>>>>>>>>>>>>>>>> you to set this desired deployment target. So if you are able to compile >>>>>>>>>>>>>>>>>> with the following settings, then the result should run on OS X 10.7: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> I'm not sure how far back you can set the deployment >>>>>>>>>>>>>>>>>> target with this SDK, but if the 10.7 target doesn't compile, you can try >>>>>>>>>>>>>>>>>> 10.8 or 10.9. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make sure >>>>>>>>>>>>>>>>>> that your code has no calls to Carbon APIs. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>> >>>>>> >>>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 7 18:45:39 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 7 Jan 2016 16:45:39 -0700 Subject: [vtkusers] Problems with vtkClipPolyData and vtkImplicitBoolean In-Reply-To: References: <1451525713172-5735713.post@n5.nabble.com> <1451526366773-5735714.post@n5.nabble.com> <1451653831796-5735721.post@n5.nabble.com> Message-ID: Hi Normanius, Yes, accuracy is a definite concern when clipping with curved implicit surfaces. Which is why I usually stick to planes. Regarding the the use of squared metric for the implicit cylinder and sphere, maybe it was done for the sake of computational efficiency (avoiding the square root). Yes, a linear measure would be more accurate, and I'd definitely prefer it if the implicit functions used linear measures. Implicit functions can fail in two ways that I'm aware of: 1) they clip the edge at the wrong position (i.e. the accuracy issue that you mention) 2) the implicit surface can intersect the polygon face without intersecting any edges Your bisection search is a good way to can be used to fix issue (1), though Newton's method would be faster. Issue (2) is much more difficult to fix, because it requires a two-dimensional search rather than a one-dimensional search. I think that implementing the bisection search as a direction replacement for VTK's current Clip() method is a non-starter because of efficiency issues. It would have to be implemented as an alternative method, so that people would have a choice of which method to use. For example, a few years ago I wrote a class called vtkClipClosedSurface (see http://www.vtk.org/Wiki/index.php?title=VTK/Closed_Surface_Clipping) that implemented a new clipping method specifically for polydata cells (polygons, triangle strips, and lines). The fact that this change was done in a single class made it much easier to integrate into VTK. If I'd tried to change all of the vtkCell classes, my chances of getting the change into VTK would have been very low. Also, by writing my own class, it meant that I could use std::vector as the container in my algorithms. So that's my advice: write a new filter class, rather than modifying vtkTriangle or the other cell classes right off the bat. - David On Mon, Jan 4, 2016 at 8:20 AM, Cory Quammen wrote: > Hi Normanius, > > I'm CC'ing David Gobbi for his expertise in geometry operations in VTK as > he likely has some insight in the issue and what you've done. > > Looking at the other implicit functions besides vtkPlane, it looks like > most evaluate the squared distance rather than the linear distance, so this > appears to be by design. I'm not familiar with the history of the classes, > but, as you suspect, I wouldn't recommend changing the current behavior of > vtkCylinder because it would be a backwards-incompatible change. Instead, > for your application, I would recommend subclassing vtkCylinder and > overriding the EvaluateFunction() and possibly EvaluateGradient() if you > need it to compute the non-squared distances. > > Regarding your second patch, I am intrigued by using a bisection method or > other solver to find the zero-crossing of the implicit function. Your > results with the combined cylinder and planes look very nice. I might > recommend changing from specifying the clipping function from > vtkImplicitFunction to something more general, like a callback function, > though I'm not completely sold on that, and moving the setting/getter to > vtkCell so that other cells might someday make use of the zero-crossing > function. > > Thanks for the interesting work, > Cory > > On Fri, Jan 1, 2016 at 8:10 AM, normanius wrote: > >> Hi VTK-developers >> >> I implemented a hack that solves the above problem for me. See the result >> (before and after): >> >> >> >> Below the two patches. The second patch is the important one. The first >> one >> just implements the suggested linear distance metric for vtkCylinder. (I >> branched off from the revision git-hash ac7a28f). >> patch-001-linear-cylinder-function.diff >> < >> http://vtk.1045678.n5.nabble.com/file/n5735721/patch-001-linear-cylinder-function.diff >> > >> patch-002-clippolydata-triangle-clipping-fix.diff >> < >> http://vtk.1045678.n5.nabble.com/file/n5735721/patch-002-clippolydata-triangle-clipping-fix.diff >> > >> >> Here is what I did roughly: In vtkTriangle::Clip(), use the bisection >> method >> to correctly find the "zero-crossing", as an alternative to the linear >> interpolation that is the method of choice in the current release. The >> bisection method requires a handle to the implicit function and the >> iso-value used in vtkClipPolyData. If in the cell traversal in >> vtkClipPolyData::RequestData() the current vtkGenericCell turns out to be >> of >> triangular type, it gets dirty-casted into vtkTriangle and the implicit >> function and the iso-value are set. This will trigger the advanced >> interpolation scheme in vtkTriangle::Clip(). >> >> Obviously, my fix works only for triangular meshes. I haven't spent a >> thought on how to generalise and implement this properly. Let me know what >> you think. Shall create an issue in your bug-tracker? >> >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Problems-with-vtkClipPolyData-and-vtkImplicitBoolean-tp5735713p5735721.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. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eduardo.hssi at gmail.com Thu Jan 7 19:29:46 2016 From: eduardo.hssi at gmail.com (eduardo) Date: Thu, 7 Jan 2016 17:29:46 -0700 (MST) Subject: [vtkusers] MassProperties in micrometer Message-ID: <1452212986652-5735865.post@n5.nabble.com> Hello, I am creating a volume as an image stack as the code: reader = vtk.vtkPNGReader () reader.SetFilePrefix (path) reader.SetFilePattern (pattern) reader.SetFileNameSliceOffset (0) reader.SetFileNameSliceSpacing (1) reader.SetDataSpacing (1, 1, 1) reader.SetDataOrigin (0, 0, 0) reader.SetDataExtent (0, 499, 0, 499, 1 70) With MassProperties and MachingCubes recover the volume. How to recover the volume measure micrometer or millimeter? Would be setting the parameter SetDataSpacing? thank you -- View this message in context: http://vtk.1045678.n5.nabble.com/MassProperties-in-micrometer-tp5735865.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Jan 7 19:36:41 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 7 Jan 2016 17:36:41 -0700 Subject: [vtkusers] MassProperties in micrometer In-Reply-To: <1452212986652-5735865.post@n5.nabble.com> References: <1452212986652-5735865.post@n5.nabble.com> Message-ID: Yes, if you want to compute volumes then you must set the DataSpacing. Do you know the correct spacing for these images? If you set the spacing in millimetres, then VTK will compute the volume in mm^3. If you set the spacing in kilometres, it will compute the volume in km^3. - David On Thu, Jan 7, 2016 at 5:29 PM, eduardo wrote: > Hello, > I am creating a volume as an image stack as the code: > > reader = vtk.vtkPNGReader () > reader.SetFilePrefix (path) > reader.SetFilePattern (pattern) > reader.SetFileNameSliceOffset (0) > reader.SetFileNameSliceSpacing (1) > reader.SetDataSpacing (1, 1, 1) > reader.SetDataOrigin (0, 0, 0) > reader.SetDataExtent (0, 499, 0, 499, 1 70) > > With MassProperties and MachingCubes recover the volume. How to recover the > volume measure micrometer or millimeter? > > Would be setting the parameter SetDataSpacing? > > thank you > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eduardo.hssi at gmail.com Thu Jan 7 19:51:26 2016 From: eduardo.hssi at gmail.com (eduardo) Date: Thu, 7 Jan 2016 17:51:26 -0700 (MST) Subject: [vtkusers] MassProperties in micrometer In-Reply-To: References: <1452212986652-5735865.post@n5.nabble.com> Message-ID: <1452214286529-5735867.post@n5.nabble.com> How to set the correct spacing in millimeters? Is there any formula? -- View this message in context: http://vtk.1045678.n5.nabble.com/MassProperties-in-micrometer-tp5735865p5735867.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Jan 7 20:30:17 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 7 Jan 2016 18:30:17 -0700 Subject: [vtkusers] MassProperties in micrometer In-Reply-To: <1452214286529-5735867.post@n5.nabble.com> References: <1452212986652-5735865.post@n5.nabble.com> <1452214286529-5735867.post@n5.nabble.com> Message-ID: Here is an example. If the pixel spacing is (0.4mm, 0.4mm) and the spacing between slices is 1.0 mm then do this: reader.SetDataSpacing (0.4, 0.4, 1.0) There is no formula. VTK does not use units. So if you give VTK millimetres, then it gives you millimetres back again. If you give VTK micrometers, then it gives you micrometers back again. - David On Thu, Jan 7, 2016 at 5:51 PM, eduardo wrote: > How to set the correct spacing in millimeters? Is there any formula? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/MassProperties-in-micrometer-tp5735865p5735867.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 binarybottle at gmail.com Thu Jan 7 23:40:27 2016 From: binarybottle at gmail.com (Arno Klein) Date: Fri, 08 Jan 2016 04:40:27 +0000 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Thank you again, David. The find command turned up one file within the miniconda2/lib/cmake/vtk-6.3 directory: "VTKTargets.cmake" Within this file, I commented out lines with AGL and 10.7 (see below), but I still get the same error! # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion: # find . -name "*.cmake" -exec fgrep -l AGL {} + set_target_properties(vtkRenderingOpenGL PROPERTIES INTERFACE_LINK_LIBRARIES "vtkRenderingCore;-framework Cocoa" ) #set_target_properties(vtkRenderingOpenGL PROPERTIES # INTERFACE_LINK_LIBRARIES "vtkRenderingCore;/Applications/Xcode.app/Contents/Developer/P\ latforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.frame\ work;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/M\ acOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework;-framework Cocoa" #) # Create imported target vtkRenderingContextOpenGL add_library(vtkRenderingContextOpenGL SHARED IMPORTED) set_target_properties(vtkRenderingContextOpenGL PROPERTIES INTERFACE_LINK_LIBRARIES "vtkRenderingContext2D;vtkRenderingOpenGL" ) # Create imported target vtkgl2ps add_library(vtkgl2ps SHARED IMPORTED) # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion: # find . -name "*.cmake" -exec fgrep -l AGL {} + set_target_properties(vtkgl2ps PROPERTIES INTERFACE_LINK_LIBRARIES "vtkzlib;vtkpng;" ) #set_target_properties(vtkgl2ps PROPERTIES # INTERFACE_LINK_LIBRARIES "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p\ latform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework;/Application\ s/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Sys\ tem/Library/Frameworks/OpenGL.framework;m;vtkzlib;vtkpng;m" #) On Thu, Jan 7, 2016 at 4:17 PM David Gobbi wrote: > I apologize for that... I had forgotten that you were using a binary > distribution of VTK rather than building VTK from source. My recent > thinking was that the only binary piece you were using from Anaconda was > python itself, I didn't go back and re-read our entire conversation. > > This means that all of my recent advice to you has been totally > irrelevant. (It would be very relevant to the Anaconda folks if they plan > to put out a new vtk package soon... they could save people like yourself a > lot of difficulty.) > > If you're using a binary vtk, then you'll have to dig into the cmake > exports for VTK and perform some surgical changes to them. Somewhere in > your Anaconda VTK, there should be a directory called the following: > > cmake/vtk-6.3 > > Once you find that directory, "cd" into it, and it should be full of cmake > files. These cmake files list the dependencies for your VTK package. If > you edit these files to remove all references to "AGL" and the problematic > SDK, then your compile difficulties should go away. For example, use this > to find all the files that reference AGL: > > find . -name "*.cmake" -exec fgrep -l AGL {} + > > But it might be easier if you find a Mac with OS X 10.9 and Xcode 6.1, and > then re-do your build there. > > - David > > > On Thu, Jan 7, 2016 at 1:39 PM, Arno Klein wrote: > >> Thank you! I am afraid I still don't know where it goes, given the conda >> installation of vtk doesn't have a CMake subdirectory (miniconda2/pkgs/vtk-6.3.0-py27_1/). >> Any suggestions how to proceed? >> >> On Thu, Jan 7, 2016 at 3:16 PM David Gobbi wrote: >> >>> It is not the same directory. FindOpenGL.cmake is part of cmake, but >>> vtkOpenGL.cmake is part of VTK. >>> >>> On Thu, Jan 7, 2016 at 12:50 PM, Arno Klein >>> wrote: >>> >>>> If that is the same directory that FindOpenGL.cmake is in, then the >>>> path I sent should be correct, yes? I installed cmake using Anaconda: >>>> "conda install --yes cmake" >>>> >>>> On Thu, Jan 7, 2016 at 12:15 PM David Gobbi >>>> wrote: >>>> >>>>> Hi Arno, >>>>> >>>>> My fault, I should have mentioned that it needs to be in >>>>> /CMake/vtkOpenGL.cmake in order be used during the VTK build. >>>>> >>>>> - David >>>>> >>>>> On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein >>>>> wrote: >>>>> >>>>>> Thank you for the suggestion, David. I placed the vtkOpenGL.cmake >>>>>> file in >>>>>> >>>>>> /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules >>>>>> but still receive the same error. >>>>>> >>>>>> On Thu, Jan 7, 2016 at 11:44 AM David Gobbi >>>>>> wrote: >>>>>> >>>>>>> There's also this patch to vtkOpenGL.cmake that you can try: >>>>>>> >>>>>>> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe >>>>>>> >>>>>>> - David >>>>>>> >>>>>>> >>>>>>> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein >>>>>>> wrote: >>>>>>> >>>>>>>> That was an excellent suggestion, but alas, even after replacing >>>>>>>> that file with the newer one from the link you shared I am still getting >>>>>>>> the same error! >>>>>>>> >>>>>>>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi Arno, >>>>>>>>> >>>>>>>>> You can try replacing FindOpenGL.cmake with the latest one from >>>>>>>>> the cmake master branch: >>>>>>>>> >>>>>>>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>>>>>>>> On my machine, for example, the file is located here: >>>>>>>>> >>>>>>>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>>>>>>>> That might help with AGL. >>>>>>>>> >>>>>>>>> - David >>>>>>>>> >>>>>>>>> >>>>>>>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein >>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> Yes, it should be building from miniconda2. However, I can't >>>>>>>>>> find any instance of "AGL" or of "10.7" anywhere in the code base (only >>>>>>>>>> within the bin directory after running cmake). I am baffled and stuck. >>>>>>>>>> >>>>>>>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Arno, >>>>>>>>>>> >>>>>>>>>>> Are you still building against the Anaconda python? The build >>>>>>>>>>> has to be picking up the AGL and the 10.7 SDK from somewhere, and if it >>>>>>>>>>> isn't in your CMakeCache.txt, then it must be coming from somewhere. >>>>>>>>>>> >>>>>>>>>>> - David >>>>>>>>>>> >>>>>>>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein < >>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Dear David, >>>>>>>>>>>> >>>>>>>>>>>> When I clear the bin directory, then run "cmake .." and "make" >>>>>>>>>>>> I don't find any instance of 10.7 mentioned in any file, but still get >>>>>>>>>>>> "AGL.framework" in every subdirectory's build.make file. The >>>>>>>>>>>> CMakeCache.txt file contains the following line: >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>> >>>>>>>>>>>> And yet I am still receiving the following error: >>>>>>>>>>>> >>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>> >>>>>>>>>>>> Cheers, >>>>>>>>>>>> @rno >>>>>>>>>>>> >>>>>>>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi < >>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>> >>>>>>>>>>>>> It could be a stale dependency. Remove everything after the >>>>>>>>>>>>> "INTERNAL cache entries" comment in your CMakeCache.txt, and also search >>>>>>>>>>>>> your cache to make sure that 10.7 does not appear anywhere. >>>>>>>>>>>>> >>>>>>>>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure >>>>>>>>>>>>> that the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I >>>>>>>>>>>>> don't see how that could happen). >>>>>>>>>>>>> >>>>>>>>>>>>> - David >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein < >>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> David -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I >>>>>>>>>>>>>> replaced every instance of "AGL" with OpenGL" in all of the build.make >>>>>>>>>>>>>> files. Without cmake, but with make I got the following error: >>>>>>>>>>>>>> >>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>> >>>>>>>>>>>>>> It still calls 10.7 even though I have 10.11 installed on my >>>>>>>>>>>>>> Mac. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>> @rno >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi < >>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Change it to the following and then recompile: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> That should keep the problematic AGL library out of your >>>>>>>>>>>>>>> build. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Please let me know if this works. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein < >>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thank you all so much for your kind help. Unfortunately, I >>>>>>>>>>>>>>>> am still unable to compile the C++ code in my project on MacOSX, even after >>>>>>>>>>>>>>>> setting the following in my top-level CMakeLists.txt file: >>>>>>>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> When I type: >>>>>>>>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>>>>>>>> $ make >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I get the following even though I don't have >>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>>>>>>>> but instead have >>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>>>>>>>> on my computer: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> cd >>>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> make[1]: *** >>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>>>>>>>> ------------------- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> I think that I've found out where the AGL link is coming >>>>>>>>>>>>>>>>> from. It isn't via Carbon, it looks like it was linked directly into the >>>>>>>>>>>>>>>>> VTK that you're using. And it looks like a bug within CMake itself. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses >>>>>>>>>>>>>>>>> to find OpenGL. It looks for both the OpenGL.framework and for the >>>>>>>>>>>>>>>>> obsolete AGL.framework (which is only for Carbon, and is deprecated by >>>>>>>>>>>>>>>>> Apple). If it finds both (e.g. with an older SDK and XCode 6 or earlier), >>>>>>>>>>>>>>>>> then it uses both, even though AGL.framework is really not needed for any >>>>>>>>>>>>>>>>> modern software. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> This means that a VTK that is built with (for example) >>>>>>>>>>>>>>>>> Xcode 6 and its SDKs becomes linked to AGL, because AGL.framework is >>>>>>>>>>>>>>>>> present in those older SDKs. It's a private link, though, so I'm surprised >>>>>>>>>>>>>>>>> that it would cause the error. But you are building with Xcode 7 and you >>>>>>>>>>>>>>>>> are seeing an error... that much is indisputable. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> I suggest that you enable verbose error reporting so that >>>>>>>>>>>>>>>>> you can see exactly what is being linked when the error occurs: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>>>>>>>> make >>>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> I tried again, and am still getting the AGL.framework >>>>>>>>>>>>>>>>>> error even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>>>>>>>> ): >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Could you please tell me how to ensure that there are no >>>>>>>>>>>>>>>>>> calls to Carbon APIs? >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows >>>>>>>>>>>>>>>>>>> you to set this desired deployment target. So if you are able to compile >>>>>>>>>>>>>>>>>>> with the following settings, then the result should run on OS X 10.7: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> I'm not sure how far back you can set the deployment >>>>>>>>>>>>>>>>>>> target with this SDK, but if the 10.7 target doesn't compile, you can try >>>>>>>>>>>>>>>>>>> 10.8 or 10.9. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make sure >>>>>>>>>>>>>>>>>>> that your code has no calls to Carbon APIs. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>> >>>>>>> >>>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jan 8 00:10:08 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 7 Jan 2016 22:10:08 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Hi Arno, The fact that a specific SDK has been hard-coded into all those dependency paths is very, very ugly. The Anaconda folks should know better than that. You can't get away with just commenting out those lines. Instead, I recommend that you do the following search and replace within each of those files: 1) replace 10.7.sdk with an SDK that you actually have on your system 2) replace AGL.framework with OpenGL.framework However, the fact that you got the _same_ error after commenting out those lines, instead of getting a different error, suggests that your build did not pick up the change. After changing the files, did you erase your build directory and do a full rebuild? - David On Thu, Jan 7, 2016 at 9:40 PM, Arno Klein wrote: > Thank you again, David. > > The find command turned up one file within the > miniconda2/lib/cmake/vtk-6.3 directory: "VTKTargets.cmake" > Within this file, I commented out lines with AGL and 10.7 (see below), but > I still get the same error! > > > # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion: > > # find . -name "*.cmake" -exec fgrep -l AGL {} + > > set_target_properties(vtkRenderingOpenGL PROPERTIES > > INTERFACE_LINK_LIBRARIES "vtkRenderingCore;-framework Cocoa" > > ) > > #set_target_properties(vtkRenderingOpenGL PROPERTIES > > # INTERFACE_LINK_LIBRARIES > "vtkRenderingCore;/Applications/Xcode.app/Contents/Developer/P\ > > > latforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.frame\ > > > work;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/M\ > > acOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework;-framework Cocoa" > > #) > > > # Create imported target vtkRenderingContextOpenGL > > add_library(vtkRenderingContextOpenGL SHARED IMPORTED) > > > set_target_properties(vtkRenderingContextOpenGL PROPERTIES > > INTERFACE_LINK_LIBRARIES "vtkRenderingContext2D;vtkRenderingOpenGL" > > ) > > > # Create imported target vtkgl2ps > > add_library(vtkgl2ps SHARED IMPORTED) > > > # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion: > > # find . -name "*.cmake" -exec fgrep -l AGL {} + > > set_target_properties(vtkgl2ps PROPERTIES > > INTERFACE_LINK_LIBRARIES "vtkzlib;vtkpng;" > > ) > > #set_target_properties(vtkgl2ps PROPERTIES > > # INTERFACE_LINK_LIBRARIES > "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p\ > > > latform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework;/Application\ > > > s/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Sys\ > > tem/Library/Frameworks/OpenGL.framework;m;vtkzlib;vtkpng;m" > > #) > > On Thu, Jan 7, 2016 at 4:17 PM David Gobbi wrote: > >> I apologize for that... I had forgotten that you were using a binary >> distribution of VTK rather than building VTK from source. My recent >> thinking was that the only binary piece you were using from Anaconda was >> python itself, I didn't go back and re-read our entire conversation. >> >> This means that all of my recent advice to you has been totally >> irrelevant. (It would be very relevant to the Anaconda folks if they plan >> to put out a new vtk package soon... they could save people like yourself a >> lot of difficulty.) >> >> If you're using a binary vtk, then you'll have to dig into the cmake >> exports for VTK and perform some surgical changes to them. Somewhere in >> your Anaconda VTK, there should be a directory called the following: >> >> cmake/vtk-6.3 >> >> Once you find that directory, "cd" into it, and it should be full of >> cmake files. These cmake files list the dependencies for your VTK >> package. If you edit these files to remove all references to "AGL" and the >> problematic SDK, then your compile difficulties should go away. For >> example, use this to find all the files that reference AGL: >> >> find . -name "*.cmake" -exec fgrep -l AGL {} + >> >> But it might be easier if you find a Mac with OS X 10.9 and Xcode 6.1, >> and then re-do your build there. >> >> - David >> >> >> On Thu, Jan 7, 2016 at 1:39 PM, Arno Klein >> wrote: >> >>> Thank you! I am afraid I still don't know where it goes, given the >>> conda installation of vtk doesn't have a CMake subdirectory (miniconda2/pkgs/vtk-6.3.0-py27_1/). >>> Any suggestions how to proceed? >>> >>> On Thu, Jan 7, 2016 at 3:16 PM David Gobbi >>> wrote: >>> >>>> It is not the same directory. FindOpenGL.cmake is part of cmake, but >>>> vtkOpenGL.cmake is part of VTK. >>>> >>>> On Thu, Jan 7, 2016 at 12:50 PM, Arno Klein >>>> wrote: >>>> >>>>> If that is the same directory that FindOpenGL.cmake is in, then the >>>>> path I sent should be correct, yes? I installed cmake using Anaconda: >>>>> "conda install --yes cmake" >>>>> >>>>> On Thu, Jan 7, 2016 at 12:15 PM David Gobbi >>>>> wrote: >>>>> >>>>>> Hi Arno, >>>>>> >>>>>> My fault, I should have mentioned that it needs to be in >>>>>> /CMake/vtkOpenGL.cmake in order be used during the VTK build. >>>>>> >>>>>> - David >>>>>> >>>>>> On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein >>>>>> wrote: >>>>>> >>>>>>> Thank you for the suggestion, David. I placed the vtkOpenGL.cmake >>>>>>> file in >>>>>>> >>>>>>> /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules >>>>>>> but still receive the same error. >>>>>>> >>>>>>> On Thu, Jan 7, 2016 at 11:44 AM David Gobbi >>>>>>> wrote: >>>>>>> >>>>>>>> There's also this patch to vtkOpenGL.cmake that you can try: >>>>>>>> >>>>>>>> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe >>>>>>>> >>>>>>>> - David >>>>>>>> >>>>>>>> >>>>>>>> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein >>>>>>>> wrote: >>>>>>>> >>>>>>>>> That was an excellent suggestion, but alas, even after replacing >>>>>>>>> that file with the newer one from the link you shared I am still getting >>>>>>>>> the same error! >>>>>>>>> >>>>>>>>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> Hi Arno, >>>>>>>>>> >>>>>>>>>> You can try replacing FindOpenGL.cmake with the latest one from >>>>>>>>>> the cmake master branch: >>>>>>>>>> >>>>>>>>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>>>>>>>>> On my machine, for example, the file is located here: >>>>>>>>>> >>>>>>>>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>>>>>>>>> That might help with AGL. >>>>>>>>>> >>>>>>>>>> - David >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein < >>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Yes, it should be building from miniconda2. However, I can't >>>>>>>>>>> find any instance of "AGL" or of "10.7" anywhere in the code base (only >>>>>>>>>>> within the bin directory after running cmake). I am baffled and stuck. >>>>>>>>>>> >>>>>>>>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi < >>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Arno, >>>>>>>>>>>> >>>>>>>>>>>> Are you still building against the Anaconda python? The build >>>>>>>>>>>> has to be picking up the AGL and the 10.7 SDK from somewhere, and if it >>>>>>>>>>>> isn't in your CMakeCache.txt, then it must be coming from somewhere. >>>>>>>>>>>> >>>>>>>>>>>> - David >>>>>>>>>>>> >>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein < >>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Dear David, >>>>>>>>>>>>> >>>>>>>>>>>>> When I clear the bin directory, then run "cmake .." and "make" >>>>>>>>>>>>> I don't find any instance of 10.7 mentioned in any file, but still get >>>>>>>>>>>>> "AGL.framework" in every subdirectory's build.make file. The >>>>>>>>>>>>> CMakeCache.txt file contains the following line: >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>> >>>>>>>>>>>>> And yet I am still receiving the following error: >>>>>>>>>>>>> >>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>> >>>>>>>>>>>>> Cheers, >>>>>>>>>>>>> @rno >>>>>>>>>>>>> >>>>>>>>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi < >>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>> >>>>>>>>>>>>>> It could be a stale dependency. Remove everything after the >>>>>>>>>>>>>> "INTERNAL cache entries" comment in your CMakeCache.txt, and also search >>>>>>>>>>>>>> your cache to make sure that 10.7 does not appear anywhere. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure >>>>>>>>>>>>>> that the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I >>>>>>>>>>>>>> don't see how that could happen). >>>>>>>>>>>>>> >>>>>>>>>>>>>> - David >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein < >>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> David -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I >>>>>>>>>>>>>>> replaced every instance of "AGL" with OpenGL" in all of the build.make >>>>>>>>>>>>>>> files. Without cmake, but with make I got the following error: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> It still calls 10.7 even though I have 10.11 installed on my >>>>>>>>>>>>>>> Mac. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi < >>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Change it to the following and then recompile: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> That should keep the problematic AGL library out of your >>>>>>>>>>>>>>>> build. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Please let me know if this works. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein < >>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Thank you all so much for your kind help. Unfortunately, >>>>>>>>>>>>>>>>> I am still unable to compile the C++ code in my project on MacOSX, even >>>>>>>>>>>>>>>>> after setting the following in my top-level CMakeLists.txt file: >>>>>>>>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> When I type: >>>>>>>>>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>>>>>>>>> $ make >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> I get the following even though I don't have >>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>>>>>>>>> but instead have >>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>>>>>>>>> on my computer: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make -f >>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> cd >>>>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> make[1]: *** >>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>>>>>>>>> ------------------- >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> I think that I've found out where the AGL link is coming >>>>>>>>>>>>>>>>>> from. It isn't via Carbon, it looks like it was linked directly into the >>>>>>>>>>>>>>>>>> VTK that you're using. And it looks like a bug within CMake itself. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses >>>>>>>>>>>>>>>>>> to find OpenGL. It looks for both the OpenGL.framework and for the >>>>>>>>>>>>>>>>>> obsolete AGL.framework (which is only for Carbon, and is deprecated by >>>>>>>>>>>>>>>>>> Apple). If it finds both (e.g. with an older SDK and XCode 6 or earlier), >>>>>>>>>>>>>>>>>> then it uses both, even though AGL.framework is really not needed for any >>>>>>>>>>>>>>>>>> modern software. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> This means that a VTK that is built with (for example) >>>>>>>>>>>>>>>>>> Xcode 6 and its SDKs becomes linked to AGL, because AGL.framework is >>>>>>>>>>>>>>>>>> present in those older SDKs. It's a private link, though, so I'm surprised >>>>>>>>>>>>>>>>>> that it would cause the error. But you are building with Xcode 7 and you >>>>>>>>>>>>>>>>>> are seeing an error... that much is indisputable. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> I suggest that you enable verbose error reporting so that >>>>>>>>>>>>>>>>>> you can see exactly what is being linked when the error occurs: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>>>>>>>>> make >>>>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> I tried again, and am still getting the AGL.framework >>>>>>>>>>>>>>>>>>> error even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>>>>>>>>> ): >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Could you please tell me how to ensure that there are no >>>>>>>>>>>>>>>>>>> calls to Carbon APIs? >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows >>>>>>>>>>>>>>>>>>>> you to set this desired deployment target. So if you are able to compile >>>>>>>>>>>>>>>>>>>> with the following settings, then the result should run on OS X 10.7: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> I'm not sure how far back you can set the deployment >>>>>>>>>>>>>>>>>>>> target with this SDK, but if the 10.7 target doesn't compile, you can try >>>>>>>>>>>>>>>>>>>> 10.8 or 10.9. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make >>>>>>>>>>>>>>>>>>>> sure that your code has no calls to Carbon APIs. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>> >>>>>>>> >>>>>> >>>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Fri Jan 8 05:36:18 2016 From: juch at zhaw.ch (normanius) Date: Fri, 8 Jan 2016 03:36:18 -0700 (MST) Subject: [vtkusers] Problems with vtkClipPolyData and vtkImplicitBoolean In-Reply-To: References: <1451525713172-5735713.post@n5.nabble.com> <1451526366773-5735714.post@n5.nabble.com> <1451653831796-5735721.post@n5.nabble.com> Message-ID: <1452249378190-5735871.post@n5.nabble.com> Hi David Thanks for the suggestions. I completely understand your concerns regarding complexity and difficulties to implement my suggestions properly. I don't know VTK so well to write my own algorithm, my hack was the most feasible way to go, given the resources. I had a look at vtkClosedSurfaceClipping - good work. It will serve me as a source of inspiration. Thanks for the hint. As for now, I will go with Cory's suggestion to subclass vtkCylinder for issue 1). And for the accuracy problem, I will stick to my hack. If I will have time, I will look at it in more detail. Just a small correction: I don't fully agree with your statement that it is just a matter of curved implicit functions. The problem I described relates to combined implicit functions, I think one will face the same issues with a vtkPlaneCollection as well. Anyhow - thanks for the detailed answers. Cheers Norman -- View this message in context: http://vtk.1045678.n5.nabble.com/Problems-with-vtkClipPolyData-and-vtkImplicitBoolean-tp5735713p5735871.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Jan 8 07:55:55 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 8 Jan 2016 05:55:55 -0700 Subject: [vtkusers] Problems with vtkClipPolyData and vtkImplicitBoolean In-Reply-To: <1452249378190-5735871.post@n5.nabble.com> References: <1451525713172-5735713.post@n5.nabble.com> <1451526366773-5735714.post@n5.nabble.com> <1451653831796-5735721.post@n5.nabble.com> <1452249378190-5735871.post@n5.nabble.com> Message-ID: Hi Normanius, When a vtkPlaneCollection is used for clipping, the clipping is done once for each plane (so if there are six planes, then the data is clipped six times). In general, you can always combine implicit functions in this way: clip the data with each function (keeping both the "inside" part and the "outside" part), and then use a boolean to combine the data pieces back together again. By properly merging points when combining the pieces back together, it's possible to do this seamlessly even for "or" operations. - David On Fri, Jan 8, 2016 at 3:36 AM, normanius wrote: > Hi David > > Thanks for the suggestions. I completely understand your concerns regarding > complexity and difficulties to implement my suggestions properly. I don't > know VTK so well to write my own algorithm, my hack was the most feasible > way to go, given the resources. > > I had a look at vtkClosedSurfaceClipping - good work. It will serve me as a > source of inspiration. Thanks for the hint. > > As for now, I will go with Cory's suggestion to subclass vtkCylinder for > issue 1). And for the accuracy problem, I will stick to my hack. If I will > have time, I will look at it in more detail. > > Just a small correction: I don't fully agree with your statement that it is > just a matter of curved implicit functions. The problem I described relates > to combined implicit functions, I think one will face the same issues with > a > vtkPlaneCollection as well. > > Anyhow - thanks for the detailed answers. > > Cheers > Norman > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Problems-with-vtkClipPolyData-and-vtkImplicitBoolean-tp5735713p5735871.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 Fri Jan 8 08:09:50 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 8 Jan 2016 06:09:50 -0700 Subject: [vtkusers] Problems with vtkClipPolyData and vtkImplicitBoolean In-Reply-To: References: <1451525713172-5735713.post@n5.nabble.com> <1451526366773-5735714.post@n5.nabble.com> <1451653831796-5735721.post@n5.nabble.com> <1452249378190-5735871.post@n5.nabble.com> Message-ID: On Fri, Jan 8, 2016 at 5:55 AM, David Gobbi wrote: > > When a vtkPlaneCollection is used for clipping, the clipping is done once > for each plane (so if there are six planes, then the data is clipped six > times). In general, you can always combine implicit functions in this way: > clip the data with each function (keeping both the "inside" part and the > "outside" part), and then use a boolean to combine the data pieces back > together again. By properly merging points when combining the pieces back > together, it's possible to do this seamlessly even for "or" operations. > Hmm, I don't think I did a good job of describing this, so I'll try again, using just two implicit functions to keep it simple: 1) clip the data with the 1st implicit function, keep both the inside and outside parts. 2) clip each output with the 2nd implicit function, again keep the inside and outside 3) at this point, there will be 4 data sets (some may be empty), and the boolean operation can be used to decide which ones to keep and which to throw away 4) the "kept" data sets can be appended to put them back together again 5) line segments that had been cut and then put back together can be re-combined to make the result seamless - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jan 8 08:19:33 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 8 Jan 2016 06:19:33 -0700 Subject: [vtkusers] VTK-7.0.0 RC1: Image reslice with OpenGL2 In-Reply-To: References: <10285631702C4D4CB5C4921DC14337954EEA0455@neocoilexch01> Message-ID: Hi Kenji, This bug should be fixed by the following patch, which was merged yesterday: https://gitlab.kitware.com/vtk/vtk/commit/46a54e5a Can you confirm the fix? Thanks, - David On Wed, Jan 6, 2016 at 5:12 PM, David Gobbi wrote: > Hi Kenji, > > I've confirmed that the bug is present for vtk-7.0.0.rc1 (Dec 10) but was > absent at commit 06ad5dec (Tue Oct 27). I share your opinion that this is > a critical bug. > > - David > > On Wed, Jan 6, 2016 at 7:53 AM, David Gobbi wrote: > >> Hi Kenji, >> >> Thanks for the bug report, I'll look into this. >> >> - David >> >> >> On Wed, Jan 6, 2016 at 7:11 AM, Kenji Tsumura < >> kenji.tsumura at neosoftmedical.com> wrote: >> >>> Hi, >>> >>> >>> >>> I have posted a bug on image re-slice using vtkImageResliceMapper. >>> >>> http://www.vtk.org/Bug/view.php?id=15914 >>> >>> >>> >>> The description of the bug is: >>> >>> >>> >>> When I rotated a volume image, a portion of the resliced image is >>> missing sometimes. The bug can be reproducible using the attached test >>> code. As far as I can tell, the bug doesn't occur with >>> VTK_RENDERING_BACKEND OpenGL setting. >>> >>> >>> >>> My environment is: >>> >>> VTK-7.0.0 RC1 >>> >>> CMake 3.1.1 >>> >>> Visual Studio 12 2013 Win 64 >>> >>> >>> >>> Thank you, >>> >>> >>> >>> Kenji >>> Disclaimer: The information contained in this communication may be >>> confidential, is intended only for the use of the recipient(s) named above, >>> and may be legally privileged. If the reader of this message is not the >>> intended recipient, you are hereby notified that any dissemination, >>> distribution, or copying of this communication, or any of its contents, is >>> strictly prohibited. If you have received this communication in error, >>> please return it to the sender immediately and delete the original message >>> and any copy of it from your computer system. If you have any questions >>> concerning this message, please contact the sender. >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Fri Jan 8 08:36:34 2016 From: juch at zhaw.ch (normanius) Date: Fri, 8 Jan 2016 06:36:34 -0700 (MST) Subject: [vtkusers] Problems with vtkClipPolyData and vtkImplicitBoolean In-Reply-To: References: <1451525713172-5735713.post@n5.nabble.com> <1451526366773-5735714.post@n5.nabble.com> <1451653831796-5735721.post@n5.nabble.com> <1452249378190-5735871.post@n5.nabble.com> Message-ID: <1452260194509-5735875.post@n5.nabble.com> Hi David Thanks a lot for the clarifications. Then your original statement was right. The one-by-one approach would solve the problem. So, if I understand correctly, I could approximate my circular cylinders with a hexagonal or octagonal cylinder, by simply using a vtkPlaneCollection and use that collection to apply planar cuts one by one. It's maybe worth going one step back here: The reason why I use 3D objects (cylinders in my case) for cutting is that I want to apply a planar cut, but restrict the active cut plane to a certain circular region. Think of a 3D model of a blood vessel (I'm working on a cut tool to cut arteries). That's why I ended up with cylinders, implicit functions and vtkClipPolyData (before I tried vtkBooleanOperation, but had some problems there as well). The planar cut should cut only one artery of the vessel tree and should not affect the others. From the screenshots above, you might get the idea. I belief that using cylinders is inapt, but I did not find a better way in vtk. Could you sketch a better idea to this? Or is this feature already implemented in vtk and I just missed it? Thanks again for the input. Norman -- View this message in context: http://vtk.1045678.n5.nabble.com/Problems-with-vtkClipPolyData-and-vtkImplicitBoolean-tp5735713p5735875.html Sent from the VTK - Users mailing list archive at Nabble.com. From kenji.tsumura at neosoftmedical.com Fri Jan 8 08:39:18 2016 From: kenji.tsumura at neosoftmedical.com (Kenji Tsumura) Date: Fri, 8 Jan 2016 13:39:18 +0000 Subject: [vtkusers] VTK-7.0.0 RC1: Image reslice with OpenGL2 In-Reply-To: References: <10285631702C4D4CB5C4921DC14337954EEA0455@neocoilexch01> Message-ID: <10285631702C4D4CB5C4921DC14337954EEA084E@neocoilexch01> David, Thank you very much. I will try today. Kenji From: David Gobbi [mailto:david.gobbi at gmail.com] Sent: Friday, January 08, 2016 7:20 AM To: Kenji Tsumura Cc: vtkusers at vtk.org Subject: Re: [vtkusers] VTK-7.0.0 RC1: Image reslice with OpenGL2 Hi Kenji, This bug should be fixed by the following patch, which was merged yesterday: https://gitlab.kitware.com/vtk/vtk/commit/46a54e5a Can you confirm the fix? Thanks, - David On Wed, Jan 6, 2016 at 5:12 PM, David Gobbi > wrote: Hi Kenji, I've confirmed that the bug is present for vtk-7.0.0.rc1 (Dec 10) but was absent at commit 06ad5dec (Tue Oct 27). I share your opinion that this is a critical bug. - David On Wed, Jan 6, 2016 at 7:53 AM, David Gobbi > wrote: Hi Kenji, Thanks for the bug report, I'll look into this. - David On Wed, Jan 6, 2016 at 7:11 AM, Kenji Tsumura > wrote: Hi, I have posted a bug on image re-slice using vtkImageResliceMapper. http://www.vtk.org/Bug/view.php?id=15914 The description of the bug is: When I rotated a volume image, a portion of the resliced image is missing sometimes. The bug can be reproducible using the attached test code. As far as I can tell, the bug doesn't occur with VTK_RENDERING_BACKEND OpenGL setting. My environment is: VTK-7.0.0 RC1 CMake 3.1.1 Visual Studio 12 2013 Win 64 Thank you, Kenji Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jan 8 09:04:59 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 8 Jan 2016 07:04:59 -0700 Subject: [vtkusers] Problems with vtkClipPolyData and vtkImplicitBoolean In-Reply-To: <1452260194509-5735875.post@n5.nabble.com> References: <1451525713172-5735713.post@n5.nabble.com> <1451526366773-5735714.post@n5.nabble.com> <1451653831796-5735721.post@n5.nabble.com> <1452249378190-5735871.post@n5.nabble.com> <1452260194509-5735875.post@n5.nabble.com> Message-ID: Hi Normanius, I don't know of any good way to make a clip plane that is limited to a specific region. It seems to me that the ideal solution would be to use a hierarchical data set for your vessel tree, where each branch was a different data object. Then you could select the vessel you want to cut (VTK has lots of good selection and picking tools), and apply the cut to just that one vessel. You should look at http://www.vmtk.org/ if you haven't seen it yet, they might already have a solution for this. - David On Fri, Jan 8, 2016 at 6:36 AM, normanius wrote: > Hi David > > Thanks a lot for the clarifications. Then your original statement was > right. > The one-by-one approach would solve the problem. > > So, if I understand correctly, I could approximate my circular cylinders > with a hexagonal or octagonal cylinder, by simply using a > vtkPlaneCollection > and use that collection to apply planar cuts one by one. > > It's maybe worth going one step back here: The reason why I use 3D objects > (cylinders in my case) for cutting is that I want to apply a planar cut, > but > restrict the active cut plane to a certain circular region. Think of a 3D > model of a blood vessel (I'm working on a cut tool to cut arteries). That's > why I ended up with cylinders, implicit functions and vtkClipPolyData > (before I tried vtkBooleanOperation, but had some problems there as well). > The planar cut should cut only one artery of the vessel tree and should not > affect the others. From the screenshots above, you might get the idea. I > belief that using cylinders is inapt, but I did not find a better way in > vtk. Could you sketch a better idea to this? Or is this feature already > implemented in vtk and I just missed it? > > Thanks again for the input. > Norman > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Problems-with-vtkClipPolyData-and-vtkImplicitBoolean-tp5735713p5735875.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 kenji.tsumura at neosoftmedical.com Fri Jan 8 09:15:59 2016 From: kenji.tsumura at neosoftmedical.com (Kenji Tsumura) Date: Fri, 8 Jan 2016 14:15:59 +0000 Subject: [vtkusers] VTK-7.0.0 RC1: Image reslice with OpenGL2 In-Reply-To: <10285631702C4D4CB5C4921DC14337954EEA084E@neocoilexch01> References: <10285631702C4D4CB5C4921DC14337954EEA0455@neocoilexch01> <10285631702C4D4CB5C4921DC14337954EEA084E@neocoilexch01> Message-ID: <10285631702C4D4CB5C4921DC14337954EEA0885@neocoilexch01> David, It works! Thank you! Kenji From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Kenji Tsumura Sent: Friday, January 08, 2016 7:39 AM To: David Gobbi Cc: vtkusers at vtk.org Subject: Re: [vtkusers] VTK-7.0.0 RC1: Image reslice with OpenGL2 David, Thank you very much. I will try today. Kenji From: David Gobbi [mailto:david.gobbi at gmail.com] Sent: Friday, January 08, 2016 7:20 AM To: Kenji Tsumura Cc: vtkusers at vtk.org Subject: Re: [vtkusers] VTK-7.0.0 RC1: Image reslice with OpenGL2 Hi Kenji, This bug should be fixed by the following patch, which was merged yesterday: https://gitlab.kitware.com/vtk/vtk/commit/46a54e5a Can you confirm the fix? Thanks, - David On Wed, Jan 6, 2016 at 5:12 PM, David Gobbi > wrote: Hi Kenji, I've confirmed that the bug is present for vtk-7.0.0.rc1 (Dec 10) but was absent at commit 06ad5dec (Tue Oct 27). I share your opinion that this is a critical bug. - David On Wed, Jan 6, 2016 at 7:53 AM, David Gobbi > wrote: Hi Kenji, Thanks for the bug report, I'll look into this. - David On Wed, Jan 6, 2016 at 7:11 AM, Kenji Tsumura > wrote: Hi, I have posted a bug on image re-slice using vtkImageResliceMapper. http://www.vtk.org/Bug/view.php?id=15914 The description of the bug is: When I rotated a volume image, a portion of the resliced image is missing sometimes. The bug can be reproducible using the attached test code. As far as I can tell, the bug doesn't occur with VTK_RENDERING_BACKEND OpenGL setting. My environment is: VTK-7.0.0 RC1 CMake 3.1.1 Visual Studio 12 2013 Win 64 Thank you, Kenji Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Jan 8 09:36:25 2016 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 8 Jan 2016 09:36:25 -0500 Subject: [vtkusers] OpenGL2 backend and Remote Desktop In-Reply-To: <568E97CA.2070208@infolytica.com> References: <568E97CA.2070208@infolytica.com> Message-ID: I doubt it will ever work with remote desktop unless MS decides to update their opengl from the decade old version they have. I use Nomachine which works in a different way so it may not be what you are shooting for but it might work for you. Thanks Ken On Thu, Jan 7, 2016 at 11:52 AM, Serge Lalonde wrote: > With the OpenGL2 backend being the default as of VTK 7.0, does anyone know > how a VTK-enabled program will behave with Remote Desktop? > Remote Desktop only supports OpenGL 1.1. Will it automatically revert to > the legacy OpenGL backend? > Has anyone thought of a solution to this or are you thinking of simply not > supporting Remote Desktop? > I think the same will apply to offscreen rendering on Windows if rendering > to a bitmap (no problem if copying the back buffer to the bitmap though). > > Thanks. > -- > www.infolytica.com > 300 Leo Pariseau, Suite 2222, Montreal, QC, Canada, H2X 4B3 > (514) 849-8752 x236, Fax: (514) 849-4239 > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 ken.martin at kitware.com Fri Jan 8 09:44:35 2016 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 8 Jan 2016 09:44:35 -0500 Subject: [vtkusers] How to solve MakeCurrent error? In-Reply-To: References: Message-ID: Can you include a stack trace for when it hits that error? Thanks Ken On Tue, Dec 29, 2015 at 10:38 PM, Rakesh Patil wrote: > Hi, > > > I am not able to find any help related to this issue. Is there no solution > for this? > > > Thanks > > Rakesh Patil > > ------------------------------ > *From:* vtkusers on behalf of Rakesh Patil < > rakesh.p at tataelxsi.co.in> > *Sent:* Tuesday, December 29, 2015 5:59 PM > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] How to solve MakeCurrent error? > > > Dear VTK users, > > > I am using VTK 6.3 version. I am using four QVTKWidgets in my application, > say rightTopWidget, rightBottomWidget, leftTopWidget, and leftBottomWidget. > If I add actor in one render window, say leftTopWidget, all the > renderwindows display actors. Later if I perform selection in anther window > then it shows me this error: > > > vtkWin32OpenGLRenderWindow (000000EB5FD666A0): Attempting to call > MakeCurrent for a different window than the one doing the picking, this can > causes crashes and/or bad pick results > > > Kindly let me know how do I solve this. > > > Thanks in advance > > > Warm Regards > > > Rakesh Patil > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 binarybottle at gmail.com Fri Jan 8 10:18:51 2016 From: binarybottle at gmail.com (Arno Klein) Date: Fri, 08 Jan 2016 15:18:51 +0000 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: I made the edits you recommended (AGL to OpenGL and 10.7 to 10.11) in all miniconda2 files and rebuilt my mindboggle package, and still get the same error! Should I have done something more with miniconda2's cmake or vtk? On Fri, Jan 8, 2016, 12:10 AM David Gobbi wrote: > Hi Arno, > > The fact that a specific SDK has been hard-coded into all those dependency > paths is very, very ugly. The Anaconda folks should know better than that. > > You can't get away with just commenting out those lines. Instead, I > recommend that you do the following search and replace within each of those > files: > 1) replace 10.7.sdk with an SDK that you actually have on your system > 2) replace AGL.framework with OpenGL.framework > > However, the fact that you got the _same_ error after commenting out those > lines, instead of getting a different error, suggests that your build did > not pick up the change. After changing the files, did you erase your build > directory and do a full rebuild? > > - David > > > On Thu, Jan 7, 2016 at 9:40 PM, Arno Klein wrote: > >> Thank you again, David. >> >> The find command turned up one file within the >> miniconda2/lib/cmake/vtk-6.3 directory: "VTKTargets.cmake" >> Within this file, I commented out lines with AGL and 10.7 (see below), >> but I still get the same error! >> >> >> # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion: >> >> # find . -name "*.cmake" -exec fgrep -l AGL {} + >> >> set_target_properties(vtkRenderingOpenGL PROPERTIES >> >> INTERFACE_LINK_LIBRARIES "vtkRenderingCore;-framework Cocoa" >> >> ) >> >> #set_target_properties(vtkRenderingOpenGL PROPERTIES >> >> # INTERFACE_LINK_LIBRARIES >> "vtkRenderingCore;/Applications/Xcode.app/Contents/Developer/P\ >> >> >> latforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.frame\ >> >> >> work;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/M\ >> >> acOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework;-framework Cocoa" >> >> #) >> >> >> # Create imported target vtkRenderingContextOpenGL >> >> add_library(vtkRenderingContextOpenGL SHARED IMPORTED) >> >> >> set_target_properties(vtkRenderingContextOpenGL PROPERTIES >> >> INTERFACE_LINK_LIBRARIES "vtkRenderingContext2D;vtkRenderingOpenGL" >> >> ) >> >> >> # Create imported target vtkgl2ps >> >> add_library(vtkgl2ps SHARED IMPORTED) >> >> >> # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion: >> >> # find . -name "*.cmake" -exec fgrep -l AGL {} + >> >> set_target_properties(vtkgl2ps PROPERTIES >> >> INTERFACE_LINK_LIBRARIES "vtkzlib;vtkpng;" >> >> ) >> >> #set_target_properties(vtkgl2ps PROPERTIES >> >> # INTERFACE_LINK_LIBRARIES >> "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p\ >> >> >> latform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework;/Application\ >> >> >> s/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Sys\ >> >> tem/Library/Frameworks/OpenGL.framework;m;vtkzlib;vtkpng;m" >> >> #) >> >> On Thu, Jan 7, 2016 at 4:17 PM David Gobbi wrote: >> >>> I apologize for that... I had forgotten that you were using a binary >>> distribution of VTK rather than building VTK from source. My recent >>> thinking was that the only binary piece you were using from Anaconda was >>> python itself, I didn't go back and re-read our entire conversation. >>> >>> This means that all of my recent advice to you has been totally >>> irrelevant. (It would be very relevant to the Anaconda folks if they plan >>> to put out a new vtk package soon... they could save people like yourself a >>> lot of difficulty.) >>> >>> If you're using a binary vtk, then you'll have to dig into the cmake >>> exports for VTK and perform some surgical changes to them. Somewhere in >>> your Anaconda VTK, there should be a directory called the following: >>> >>> cmake/vtk-6.3 >>> >>> Once you find that directory, "cd" into it, and it should be full of >>> cmake files. These cmake files list the dependencies for your VTK >>> package. If you edit these files to remove all references to "AGL" and the >>> problematic SDK, then your compile difficulties should go away. For >>> example, use this to find all the files that reference AGL: >>> >>> find . -name "*.cmake" -exec fgrep -l AGL {} + >>> >>> But it might be easier if you find a Mac with OS X 10.9 and Xcode 6.1, >>> and then re-do your build there. >>> >>> - David >>> >>> >>> On Thu, Jan 7, 2016 at 1:39 PM, Arno Klein >>> wrote: >>> >>>> Thank you! I am afraid I still don't know where it goes, given the >>>> conda installation of vtk doesn't have a CMake subdirectory (miniconda2/pkgs/vtk-6.3.0-py27_1/). >>>> Any suggestions how to proceed? >>>> >>>> On Thu, Jan 7, 2016 at 3:16 PM David Gobbi >>>> wrote: >>>> >>>>> It is not the same directory. FindOpenGL.cmake is part of cmake, but >>>>> vtkOpenGL.cmake is part of VTK. >>>>> >>>>> On Thu, Jan 7, 2016 at 12:50 PM, Arno Klein >>>>> wrote: >>>>> >>>>>> If that is the same directory that FindOpenGL.cmake is in, then the >>>>>> path I sent should be correct, yes? I installed cmake using Anaconda: >>>>>> "conda install --yes cmake" >>>>>> >>>>>> On Thu, Jan 7, 2016 at 12:15 PM David Gobbi >>>>>> wrote: >>>>>> >>>>>>> Hi Arno, >>>>>>> >>>>>>> My fault, I should have mentioned that it needs to be in >>>>>>> /CMake/vtkOpenGL.cmake in order be used during the VTK build. >>>>>>> >>>>>>> - David >>>>>>> >>>>>>> On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein >>>>>>> wrote: >>>>>>> >>>>>>>> Thank you for the suggestion, David. I placed the vtkOpenGL.cmake >>>>>>>> file in >>>>>>>> >>>>>>>> /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules >>>>>>>> but still receive the same error. >>>>>>>> >>>>>>>> On Thu, Jan 7, 2016 at 11:44 AM David Gobbi >>>>>>>> wrote: >>>>>>>> >>>>>>>>> There's also this patch to vtkOpenGL.cmake that you can try: >>>>>>>>> >>>>>>>>> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe >>>>>>>>> >>>>>>>>> - David >>>>>>>>> >>>>>>>>> >>>>>>>>> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein >>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> That was an excellent suggestion, but alas, even after replacing >>>>>>>>>> that file with the newer one from the link you shared I am still getting >>>>>>>>>> the same error! >>>>>>>>>> >>>>>>>>>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi Arno, >>>>>>>>>>> >>>>>>>>>>> You can try replacing FindOpenGL.cmake with the latest one from >>>>>>>>>>> the cmake master branch: >>>>>>>>>>> >>>>>>>>>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>>>>>>>>>> On my machine, for example, the file is located here: >>>>>>>>>>> >>>>>>>>>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>>>>>>>>>> That might help with AGL. >>>>>>>>>>> >>>>>>>>>>> - David >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein < >>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Yes, it should be building from miniconda2. However, I can't >>>>>>>>>>>> find any instance of "AGL" or of "10.7" anywhere in the code base (only >>>>>>>>>>>> within the bin directory after running cmake). I am baffled and stuck. >>>>>>>>>>>> >>>>>>>>>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi < >>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>> >>>>>>>>>>>>> Are you still building against the Anaconda python? The build >>>>>>>>>>>>> has to be picking up the AGL and the 10.7 SDK from somewhere, and if it >>>>>>>>>>>>> isn't in your CMakeCache.txt, then it must be coming from somewhere. >>>>>>>>>>>>> >>>>>>>>>>>>> - David >>>>>>>>>>>>> >>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein < >>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear David, >>>>>>>>>>>>>> >>>>>>>>>>>>>> When I clear the bin directory, then run "cmake .." and >>>>>>>>>>>>>> "make" I don't find any instance of 10.7 mentioned in any file, but still >>>>>>>>>>>>>> get "AGL.framework" in every subdirectory's build.make file. The >>>>>>>>>>>>>> CMakeCache.txt file contains the following line: >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>>> >>>>>>>>>>>>>> And yet I am still receiving the following error: >>>>>>>>>>>>>> >>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>> @rno >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi < >>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> It could be a stale dependency. Remove everything after the >>>>>>>>>>>>>>> "INTERNAL cache entries" comment in your CMakeCache.txt, and also search >>>>>>>>>>>>>>> your cache to make sure that 10.7 does not appear anywhere. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure >>>>>>>>>>>>>>> that the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I >>>>>>>>>>>>>>> don't see how that could happen). >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein < >>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> David -- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I >>>>>>>>>>>>>>>> replaced every instance of "AGL" with OpenGL" in all of the build.make >>>>>>>>>>>>>>>> files. Without cmake, but with make I got the following error: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> It still calls 10.7 even though I have 10.11 installed on >>>>>>>>>>>>>>>> my Mac. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi < >>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Change it to the following and then recompile: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> That should keep the problematic AGL library out of your >>>>>>>>>>>>>>>>> build. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Please let me know if this works. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein < >>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thank you all so much for your kind help. Unfortunately, >>>>>>>>>>>>>>>>>> I am still unable to compile the C++ code in my project on MacOSX, even >>>>>>>>>>>>>>>>>> after setting the following in my top-level CMakeLists.txt file: >>>>>>>>>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> When I type: >>>>>>>>>>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>>>>>>>>>> $ make >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> I get the following even though I don't have >>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>>>>>>>>>> but instead have >>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>>>>>>>>>> on my computer: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make >>>>>>>>>>>>>>>>>> -f travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> cd >>>>>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> make[1]: *** >>>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>>>>>>>>>> ------------------- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> I think that I've found out where the AGL link is coming >>>>>>>>>>>>>>>>>>> from. It isn't via Carbon, it looks like it was linked directly into the >>>>>>>>>>>>>>>>>>> VTK that you're using. And it looks like a bug within CMake itself. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK uses >>>>>>>>>>>>>>>>>>> to find OpenGL. It looks for both the OpenGL.framework and for the >>>>>>>>>>>>>>>>>>> obsolete AGL.framework (which is only for Carbon, and is deprecated by >>>>>>>>>>>>>>>>>>> Apple). If it finds both (e.g. with an older SDK and XCode 6 or earlier), >>>>>>>>>>>>>>>>>>> then it uses both, even though AGL.framework is really not needed for any >>>>>>>>>>>>>>>>>>> modern software. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> This means that a VTK that is built with (for example) >>>>>>>>>>>>>>>>>>> Xcode 6 and its SDKs becomes linked to AGL, because AGL.framework is >>>>>>>>>>>>>>>>>>> present in those older SDKs. It's a private link, though, so I'm surprised >>>>>>>>>>>>>>>>>>> that it would cause the error. But you are building with Xcode 7 and you >>>>>>>>>>>>>>>>>>> are seeing an error... that much is indisputable. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> I suggest that you enable verbose error reporting so >>>>>>>>>>>>>>>>>>> that you can see exactly what is being linked when the error occurs: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>>>>>>>>>> make >>>>>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> I tried again, and am still getting the AGL.framework >>>>>>>>>>>>>>>>>>>> error even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>>>>>>>>>> ): >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Could you please tell me how to ensure that there are >>>>>>>>>>>>>>>>>>>> no calls to Carbon APIs? >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it allows >>>>>>>>>>>>>>>>>>>>> you to set this desired deployment target. So if you are able to compile >>>>>>>>>>>>>>>>>>>>> with the following settings, then the result should run on OS X 10.7: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> I'm not sure how far back you can set the deployment >>>>>>>>>>>>>>>>>>>>> target with this SDK, but if the 10.7 target doesn't compile, you can try >>>>>>>>>>>>>>>>>>>>> 10.8 or 10.9. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make >>>>>>>>>>>>>>>>>>>>> sure that your code has no calls to Carbon APIs. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>> >>>>>>> >>>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jan 8 10:46:28 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 8 Jan 2016 08:46:28 -0700 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Hi Arno, I'm afraid you're on your own at this point. I have no real experience with Anaconda, all my experience is purely with CMake and VTK, and I'm not going to go so far as to install miniconda on my own system to investigate. - David On Fri, Jan 8, 2016 at 8:18 AM, Arno Klein wrote: > I made the edits you recommended (AGL to OpenGL and 10.7 to 10.11) in all > miniconda2 files and rebuilt my mindboggle package, and still get the same > error! Should I have done something more with miniconda2's cmake or vtk? > > On Fri, Jan 8, 2016, 12:10 AM David Gobbi wrote: > >> Hi Arno, >> >> The fact that a specific SDK has been hard-coded into all those >> dependency paths is very, very ugly. The Anaconda folks should know better >> than that. >> >> You can't get away with just commenting out those lines. Instead, I >> recommend that you do the following search and replace within each of those >> files: >> 1) replace 10.7.sdk with an SDK that you actually have on your system >> 2) replace AGL.framework with OpenGL.framework >> >> However, the fact that you got the _same_ error after commenting out >> those lines, instead of getting a different error, suggests that your build >> did not pick up the change. After changing the files, did you erase your >> build directory and do a full rebuild? >> >> - David >> >> >> On Thu, Jan 7, 2016 at 9:40 PM, Arno Klein >> wrote: >> >>> Thank you again, David. >>> >>> The find command turned up one file within the >>> miniconda2/lib/cmake/vtk-6.3 directory: "VTKTargets.cmake" >>> Within this file, I commented out lines with AGL and 10.7 (see below), >>> but I still get the same error! >>> >>> >>> # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion: >>> >>> # find . -name "*.cmake" -exec fgrep -l AGL {} + >>> >>> set_target_properties(vtkRenderingOpenGL PROPERTIES >>> >>> INTERFACE_LINK_LIBRARIES "vtkRenderingCore;-framework Cocoa" >>> >>> ) >>> >>> #set_target_properties(vtkRenderingOpenGL PROPERTIES >>> >>> # INTERFACE_LINK_LIBRARIES >>> "vtkRenderingCore;/Applications/Xcode.app/Contents/Developer/P\ >>> >>> >>> latforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.frame\ >>> >>> >>> work;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/M\ >>> >>> acOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework;-framework >>> Cocoa" >>> >>> #) >>> >>> >>> # Create imported target vtkRenderingContextOpenGL >>> >>> add_library(vtkRenderingContextOpenGL SHARED IMPORTED) >>> >>> >>> set_target_properties(vtkRenderingContextOpenGL PROPERTIES >>> >>> INTERFACE_LINK_LIBRARIES "vtkRenderingContext2D;vtkRenderingOpenGL" >>> >>> ) >>> >>> >>> # Create imported target vtkgl2ps >>> >>> add_library(vtkgl2ps SHARED IMPORTED) >>> >>> >>> # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion: >>> >>> # find . -name "*.cmake" -exec fgrep -l AGL {} + >>> >>> set_target_properties(vtkgl2ps PROPERTIES >>> >>> INTERFACE_LINK_LIBRARIES "vtkzlib;vtkpng;" >>> >>> ) >>> >>> #set_target_properties(vtkgl2ps PROPERTIES >>> >>> # INTERFACE_LINK_LIBRARIES >>> "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p\ >>> >>> >>> latform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework;/Application\ >>> >>> >>> s/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Sys\ >>> >>> tem/Library/Frameworks/OpenGL.framework;m;vtkzlib;vtkpng;m" >>> >>> #) >>> >>> On Thu, Jan 7, 2016 at 4:17 PM David Gobbi >>> wrote: >>> >>>> I apologize for that... I had forgotten that you were using a binary >>>> distribution of VTK rather than building VTK from source. My recent >>>> thinking was that the only binary piece you were using from Anaconda was >>>> python itself, I didn't go back and re-read our entire conversation. >>>> >>>> This means that all of my recent advice to you has been totally >>>> irrelevant. (It would be very relevant to the Anaconda folks if they plan >>>> to put out a new vtk package soon... they could save people like yourself a >>>> lot of difficulty.) >>>> >>>> If you're using a binary vtk, then you'll have to dig into the cmake >>>> exports for VTK and perform some surgical changes to them. Somewhere in >>>> your Anaconda VTK, there should be a directory called the following: >>>> >>>> cmake/vtk-6.3 >>>> >>>> Once you find that directory, "cd" into it, and it should be full of >>>> cmake files. These cmake files list the dependencies for your VTK >>>> package. If you edit these files to remove all references to "AGL" and the >>>> problematic SDK, then your compile difficulties should go away. For >>>> example, use this to find all the files that reference AGL: >>>> >>>> find . -name "*.cmake" -exec fgrep -l AGL {} + >>>> >>>> But it might be easier if you find a Mac with OS X 10.9 and Xcode 6.1, >>>> and then re-do your build there. >>>> >>>> - David >>>> >>>> >>>> On Thu, Jan 7, 2016 at 1:39 PM, Arno Klein >>>> wrote: >>>> >>>>> Thank you! I am afraid I still don't know where it goes, given the >>>>> conda installation of vtk doesn't have a CMake subdirectory (miniconda2/pkgs/vtk-6.3.0-py27_1/). >>>>> Any suggestions how to proceed? >>>>> >>>>> On Thu, Jan 7, 2016 at 3:16 PM David Gobbi >>>>> wrote: >>>>> >>>>>> It is not the same directory. FindOpenGL.cmake is part of cmake, but >>>>>> vtkOpenGL.cmake is part of VTK. >>>>>> >>>>>> On Thu, Jan 7, 2016 at 12:50 PM, Arno Klein >>>>>> wrote: >>>>>> >>>>>>> If that is the same directory that FindOpenGL.cmake is in, then the >>>>>>> path I sent should be correct, yes? I installed cmake using Anaconda: >>>>>>> "conda install --yes cmake" >>>>>>> >>>>>>> On Thu, Jan 7, 2016 at 12:15 PM David Gobbi >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Arno, >>>>>>>> >>>>>>>> My fault, I should have mentioned that it needs to be in >>>>>>>> /CMake/vtkOpenGL.cmake in order be used during the VTK build. >>>>>>>> >>>>>>>> - David >>>>>>>> >>>>>>>> On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Thank you for the suggestion, David. I placed the vtkOpenGL.cmake >>>>>>>>> file in >>>>>>>>> >>>>>>>>> /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules >>>>>>>>> but still receive the same error. >>>>>>>>> >>>>>>>>> On Thu, Jan 7, 2016 at 11:44 AM David Gobbi >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> There's also this patch to vtkOpenGL.cmake that you can try: >>>>>>>>>> >>>>>>>>>> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe >>>>>>>>>> >>>>>>>>>> - David >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein < >>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> That was an excellent suggestion, but alas, even after replacing >>>>>>>>>>> that file with the newer one from the link you shared I am still getting >>>>>>>>>>> the same error! >>>>>>>>>>> >>>>>>>>>>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi < >>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Arno, >>>>>>>>>>>> >>>>>>>>>>>> You can try replacing FindOpenGL.cmake with the latest one from >>>>>>>>>>>> the cmake master branch: >>>>>>>>>>>> >>>>>>>>>>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>>>>>>>>>>> On my machine, for example, the file is located here: >>>>>>>>>>>> >>>>>>>>>>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>>>>>>>>>>> That might help with AGL. >>>>>>>>>>>> >>>>>>>>>>>> - David >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein < >>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Yes, it should be building from miniconda2. However, I can't >>>>>>>>>>>>> find any instance of "AGL" or of "10.7" anywhere in the code base (only >>>>>>>>>>>>> within the bin directory after running cmake). I am baffled and stuck. >>>>>>>>>>>>> >>>>>>>>>>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi < >>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Are you still building against the Anaconda python? The >>>>>>>>>>>>>> build has to be picking up the AGL and the 10.7 SDK from somewhere, and if >>>>>>>>>>>>>> it isn't in your CMakeCache.txt, then it must be coming from somewhere. >>>>>>>>>>>>>> >>>>>>>>>>>>>> - David >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein < >>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Dear David, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> When I clear the bin directory, then run "cmake .." and >>>>>>>>>>>>>>> "make" I don't find any instance of 10.7 mentioned in any file, but still >>>>>>>>>>>>>>> get "AGL.framework" in every subdirectory's build.make file. The >>>>>>>>>>>>>>> CMakeCache.txt file contains the following line: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> And yet I am still receiving the following error: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi < >>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> It could be a stale dependency. Remove everything after >>>>>>>>>>>>>>>> the "INTERNAL cache entries" comment in your CMakeCache.txt, and also >>>>>>>>>>>>>>>> search your cache to make sure that 10.7 does not appear anywhere. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make sure >>>>>>>>>>>>>>>> that the OpenGL framework isn't a link to a non-existent 10.7 SDK (though I >>>>>>>>>>>>>>>> don't see how that could happen). >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein < >>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> David -- >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I >>>>>>>>>>>>>>>>> replaced every instance of "AGL" with OpenGL" in all of the build.make >>>>>>>>>>>>>>>>> files. Without cmake, but with make I got the following error: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> It still calls 10.7 even though I have 10.11 installed on >>>>>>>>>>>>>>>>> my Mac. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi < >>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Change it to the following and then recompile: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> That should keep the problematic AGL library out of your >>>>>>>>>>>>>>>>>> build. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Please let me know if this works. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein < >>>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Thank you all so much for your kind help. >>>>>>>>>>>>>>>>>>> Unfortunately, I am still unable to compile the C++ code in my project on >>>>>>>>>>>>>>>>>>> MacOSX, even after setting the following in my top-level CMakeLists.txt >>>>>>>>>>>>>>>>>>> file: >>>>>>>>>>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> When I type: >>>>>>>>>>>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>>>>>>>>>>> $ make >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> I get the following even though I don't have >>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>>>>>>>>>>> but instead have >>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>>>>>>>>>>> on my computer: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make >>>>>>>>>>>>>>>>>>> -f travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> cd >>>>>>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>>>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>>>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>>>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>>>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>>>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>>>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>>>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> make[1]: *** >>>>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>>>>>>>>>>> ------------------- >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> I think that I've found out where the AGL link is >>>>>>>>>>>>>>>>>>>> coming from. It isn't via Carbon, it looks like it was linked directly >>>>>>>>>>>>>>>>>>>> into the VTK that you're using. And it looks like a bug within CMake >>>>>>>>>>>>>>>>>>>> itself. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK >>>>>>>>>>>>>>>>>>>> uses to find OpenGL. It looks for both the OpenGL.framework and for the >>>>>>>>>>>>>>>>>>>> obsolete AGL.framework (which is only for Carbon, and is deprecated by >>>>>>>>>>>>>>>>>>>> Apple). If it finds both (e.g. with an older SDK and XCode 6 or earlier), >>>>>>>>>>>>>>>>>>>> then it uses both, even though AGL.framework is really not needed for any >>>>>>>>>>>>>>>>>>>> modern software. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> This means that a VTK that is built with (for example) >>>>>>>>>>>>>>>>>>>> Xcode 6 and its SDKs becomes linked to AGL, because AGL.framework is >>>>>>>>>>>>>>>>>>>> present in those older SDKs. It's a private link, though, so I'm surprised >>>>>>>>>>>>>>>>>>>> that it would cause the error. But you are building with Xcode 7 and you >>>>>>>>>>>>>>>>>>>> are seeing an error... that much is indisputable. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> I suggest that you enable verbose error reporting so >>>>>>>>>>>>>>>>>>>> that you can see exactly what is being linked when the error occurs: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>>>>>>>>>>> make >>>>>>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> I tried again, and am still getting the AGL.framework >>>>>>>>>>>>>>>>>>>>> error even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>>>>>>>>>>> ): >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Could you please tell me how to ensure that there are >>>>>>>>>>>>>>>>>>>>> no calls to Carbon APIs? >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it >>>>>>>>>>>>>>>>>>>>>> allows you to set this desired deployment target. So if you are able to >>>>>>>>>>>>>>>>>>>>>> compile with the following settings, then the result should run on OS X >>>>>>>>>>>>>>>>>>>>>> 10.7: >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> I'm not sure how far back you can set the deployment >>>>>>>>>>>>>>>>>>>>>> target with this SDK, but if the 10.7 target doesn't compile, you can try >>>>>>>>>>>>>>>>>>>>>> 10.8 or 10.9. >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make >>>>>>>>>>>>>>>>>>>>>> sure that your code has no calls to Carbon APIs. >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>> >>>>>>>> >>>>>> >>>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Fri Jan 8 11:44:03 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Fri, 8 Jan 2016 11:44:03 -0500 Subject: [vtkusers] Off screen rendering and video generation In-Reply-To: References: Message-ID: For a VTK-only solution, consider looking at vtkFFMPEGWriter or vtkAVIWriter. Warm regards, Sankhesh On Mon, Dec 28, 2015 at 5:26 PM, Mengda Wu wrote: > Hi vtkusers, > > I would like to perform off screen rendering with VTK and output the > rendered content (e.g. interaction with a mouse) into a video (e.g. .avi). > How to achieve this? > > I know that there is a vtkWindowToImageFilter filter, but it seems > that this filter is designed to save individual images instead of a video > sequence. Is there a better way? > > Thanks, > WX > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Jan 8 12:51:38 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 8 Jan 2016 12:51:38 -0500 Subject: [vtkusers] Success: Building VTK 7.0.0rc1 for Anaconda 3.5 In-Reply-To: <393676973.9479178.1451829185794.JavaMail.yahoo@mail.yahoo.com> References: <393676973.9479178.1451829185794.JavaMail.yahoo.ref@mail.yahoo.com> <393676973.9479178.1451829185794.JavaMail.yahoo@mail.yahoo.com> Message-ID: Leonid, Glad you got it compiled too. Earlier you said you ran into problems with AUTOMOC and Examples/Infovis. What was the resolution for that? I don't see anything obviously wrong but I so I'm trying to estimate if I should dig into it before the release. thanks David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sun, Jan 3, 2016 at 8:53 AM, Leonid Dulman wrote: > I built VTK 7.0. RC1 with Qt 5.6.0, Python 2.7.11, TCl/Tk 8.6.3 in windows > 10 with VC 2015 too > -------------------------------------------- > On Sun, 1/3/16, Matthias Blaicher wrote: > > Subject: [vtkusers] Success: Building VTK 7.0.0rc1 for Anaconda 3.5 > To: vtkusers at vtk.org > Received: Sunday, January 3, 2016, 10:07 AM > > Hi all, > > I'd like to provide a short report on a successful > compilation of VTK > 7.0.0rc1 for Anaconda 3.5 on Windows 10, including the conda > build > script. Hopefully it is a good starting point for others to > improve upon. > > You will need: > - Anaconda Python 3.5 > - Visual Studio 2015 Community edition to compile against > Python 3.5 > (about 10GB of Download. It's > unbelievable... But there is no other > matching version of the compiler on the > interwebs. You'll get SQL > Server for free...) > - conda-build installed, see [1] > > The build files are attached to this mail, a simple conda > build should > suffice to give you working vtk in python 3.5. > Alternatively, I've also > uploaded the resulting binary to my server [2], if you so > choose to > trust my binaries ;-). Install it simply with conda > install. > > Potentially, the script should also work for OSX and Linux, > I'd be happy > to get feedback on this. > > Very best, > Matthias > > > [1] http://conda.pydata.org/docs/building/recipe.html > [2] http://static.blaicher.com/msc/vtk/vtk-7.0.0.rc1-py35_1.tar.bz2 > > -----Inline Attachment Follows----- > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 newcfd at yahoo.com Fri Jan 8 13:39:00 2016 From: newcfd at yahoo.com (cfd new) Date: Fri, 8 Jan 2016 18:39:00 +0000 (UTC) Subject: [vtkusers] Null pointer with Visual Studio 2010 References: <1232010237.1799987.1452278340162.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1232010237.1799987.1452278340162.JavaMail.yahoo@mail.yahoo.com> I compiled vtk 6.3 with VS 2010.I had a few crashes when my GUI Is launched.I added the following code in my application program#include VTK_MODULE_INIT(vtkRenderingOpenGL);? VTK_MODULE_INIT(vtkRenderingContextOpenGL);? VTK_MODULE_INIT(vtkInteractionStyle);? to avoid these crashes. Then?when my code starts from?QApplication app(argc, argv);? MyQTGUI mygui;? mygui.show();? app.exec(); <==crashes from here.? call stack shows this->Implementation->TextRenderer is?NULLin the following code.? what is the reason? vtkVector2i vtkTextRendererStringToImage::GetBounds(? ? ? vtkTextProperty *property, const vtkUnicodeString& string, int dpi)? {? ? int tmp[4] = { 0, 0, 0, 0 };? ? vtkVector2i recti(tmp);? ? if (!property)? ? ? {? ? ? return recti;? ? ? }? ? this->Implementation->TextRenderer->GetBoundingBox(property, string, tmp,? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?dpi);? ? recti.Set(tmp[1] - tmp[0],? ? ? ? ? ? ? tmp[3] - tmp[2]);? ? return recti;? }? ======================call statck output=======================================? vtkRenderingCore-6.3.dll!vtkTextRenderer::GetBoundingBox(vtkTextProperty * tprop, const vtkUnicodeString & str, int * bbox, int dpi, int backend) ?Line 158 + 0x5 bytes C++? ? vtkRenderingFreeType-6.3.dll!vtkTextRendererStringToImage::GetBounds(vtkTextProperty * property, const vtkUnicodeString & string, int dpi) ?Line 66 C++? ? vtkRenderingContextOpenGL-6.3.dll!vtkOpenGLContextDevice2D::ComputeStringBounds(const vtkUnicodeString & string, float * bounds) ?Line 947 C++? ? vtkRenderingContextOpenGL-6.3.dll!vtkOpenGLContextDevice2D::ComputeStringBounds(const vtkStdString & string, float * bounds) ?Line 849 + 0x48 bytes C++? ? vtkRenderingContext2D-6.3.dll!vtkContext2D::ComputeStringBounds(const vtkStdString & string, float * bounds) ?Line 646 C++? ? vtkChartsCore-6.3.dll!vtkAxis::GetBoundingRect(vtkContext2D * painter) ?Line 845 C++? ? vtkChartsCore-6.3.dll!vtkChartXY::UpdateLayout(vtkContext2D * painter) ?Line 851 C++? ? vtkChartsCore-6.3.dll!vtkChartXY::Paint(vtkContext2D * painter) ?Line 395 C++? ? vtkRenderingContext2D-6.3.dll!vtkContextScenePrivate::PaintItems(vtkContext2D * context) ?Line 81 C++? ? vtkRenderingContext2D-6.3.dll!vtkContextScene::Paint(vtkContext2D * painter) ?Line 120 C++? ? vtkRenderingContext2D-6.3.dll!vtkContextActor::RenderOverlay(vtkViewport * viewport) ?Line 221 C++? ? vtkRenderingCore-6.3.dll!vtkRenderer::UpdateGeometry() ?Line 585 + 0x41 bytes C++? ? vtkRenderingOpenGL-6.3.dll!vtkOpenGLRenderer::DeviceRender() ?Line 273 C++? ? vtkRenderingCore-6.3.dll!vtkRenderer::Render() ?Line 298 C++? ? vtkRenderingCore-6.3.dll!vtkRendererCollection::Render() ?Line 53 C++? ? vtkRenderingCore-6.3.dll!vtkRenderWindow::DoStereoRender() ?Line 771 C++? ? vtkRenderingCore-6.3.dll!vtkRenderWindow::DoFDRender() ?Line 739 C++? ? vtkRenderingCore-6.3.dll!vtkRenderWindow::DoAARender() ?Line 618 C++? ? vtkRenderingCore-6.3.dll!vtkRenderWindow::Render() ?Line 434 C++? ? vtkRenderingCore-6.3.dll!vtkRenderWindowInteractor::Render() ?Line 175 C++? ? vtkViewsContext2D-6.3.dll!vtkContextInteractorStyle::RenderNow() ?Line 147 C++? ? vtkViewsContext2D-6.3.dll!vtkContextInteractorStyle::ProcessInteractorEvents(vtkObject * __formal, unsigned long eventId, void * clientdata, vtkObject * __formal) ?Line 132 C++? ? vtkCommonCore-6.3.dll!vtkCallbackCommand::Execute(vtkObject * caller, unsigned long event, void * callData) ?Line 43 C++? ? vtkCommonCore-6.3.dll!vtkSubjectHelper::InvokeEvent(unsigned long event, void * callData, vtkObject * self) ?Line 619 C++? ? vtkCommonCore-6.3.dll!vtkObject::InvokeEvent(unsigned long event, void * callData) ?Line 785 + 0x1c bytes C++? ? vtkGUISupportQt-6.3.dll!QVTKInteractor::TimerEvent(int timerId) ?Line 217 C++? ? vtkGUISupportQt-6.3.dll!QVTKInteractorInternal::TimerEvent(int id) ?Line 73 C++? ? vtkGUISupportQt-6.3.dll!QVTKInteractorInternal::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) ?Line 52 C++? -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Jan 8 13:57:52 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 8 Jan 2016 13:57:52 -0500 Subject: [vtkusers] Null pointer with Visual Studio 2010 In-Reply-To: <1232010237.1799987.1452278340162.JavaMail.yahoo@mail.yahoo.com> References: <1232010237.1799987.1452278340162.JavaMail.yahoo.ref@mail.yahoo.com> <1232010237.1799987.1452278340162.JavaMail.yahoo@mail.yahoo.com> Message-ID: Try throwing in a VTK_MODULE_INIT(vtkRenderingFreeType) in there. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Jan 8, 2016 at 1:39 PM, cfd new via vtkusers wrote: > I compiled vtk 6.3 with VS 2010. > I had a few crashes when my GUI Is launched. > I added the following code in my application program > #include > VTK_MODULE_INIT(vtkRenderingOpenGL); > VTK_MODULE_INIT(vtkRenderingContextOpenGL); > VTK_MODULE_INIT(vtkInteractionStyle); > > to avoid these crashes. > > Then when my code starts from > QApplication app(argc, argv); > MyQTGUI mygui; > mygui.show(); > app.exec(); <==crashes from here. > > call stack shows this->Implementation->TextRenderer is NULL > in the following code. > what is the reason? > > vtkVector2i vtkTextRendererStringToImage::GetBounds( > vtkTextProperty *property, const vtkUnicodeString& string, int dpi) > { > int tmp[4] = { 0, 0, 0, 0 }; > vtkVector2i recti(tmp); > if (!property) > { > return recti; > } > > this->Implementation->TextRenderer->GetBoundingBox(property, string, > tmp, > dpi); > > recti.Set(tmp[1] - tmp[0], > tmp[3] - tmp[2]); > > return recti; > } > > ======================call statck > output======================================= > vtkRenderingCore-6.3.dll!vtkTextRenderer::GetBoundingBox(vtkTextProperty > * tprop, const vtkUnicodeString & str, int * bbox, int dpi, int backend) > Line 158 + 0x5 bytes C++ > > vtkRenderingFreeType-6.3.dll!vtkTextRendererStringToImage::GetBounds(vtkTextProperty > * property, const vtkUnicodeString & string, int dpi) Line 66 C++ > > vtkRenderingContextOpenGL-6.3.dll!vtkOpenGLContextDevice2D::ComputeStringBounds(const > vtkUnicodeString & string, float * bounds) Line 947 C++ > > vtkRenderingContextOpenGL-6.3.dll!vtkOpenGLContextDevice2D::ComputeStringBounds(const > vtkStdString & string, float * bounds) Line 849 + 0x48 bytes C++ > vtkRenderingContext2D-6.3.dll!vtkContext2D::ComputeStringBounds(const > vtkStdString & string, float * bounds) Line 646 C++ > vtkChartsCore-6.3.dll!vtkAxis::GetBoundingRect(vtkContext2D * painter) > Line 845 C++ > vtkChartsCore-6.3.dll!vtkChartXY::UpdateLayout(vtkContext2D * painter) > Line 851 C++ > vtkChartsCore-6.3.dll!vtkChartXY::Paint(vtkContext2D * painter) Line > 395 C++ > > vtkRenderingContext2D-6.3.dll!vtkContextScenePrivate::PaintItems(vtkContext2D > * context) Line 81 C++ > vtkRenderingContext2D-6.3.dll!vtkContextScene::Paint(vtkContext2D * > painter) Line 120 C++ > vtkRenderingContext2D-6.3.dll!vtkContextActor::RenderOverlay(vtkViewport > * viewport) Line 221 C++ > vtkRenderingCore-6.3.dll!vtkRenderer::UpdateGeometry() Line 585 + 0x41 > bytes C++ > vtkRenderingOpenGL-6.3.dll!vtkOpenGLRenderer::DeviceRender() Line 273 > C++ > vtkRenderingCore-6.3.dll!vtkRenderer::Render() Line 298 C++ > vtkRenderingCore-6.3.dll!vtkRendererCollection::Render() Line 53 C++ > vtkRenderingCore-6.3.dll!vtkRenderWindow::DoStereoRender() Line 771 C++ > vtkRenderingCore-6.3.dll!vtkRenderWindow::DoFDRender() Line 739 C++ > vtkRenderingCore-6.3.dll!vtkRenderWindow::DoAARender() Line 618 C++ > vtkRenderingCore-6.3.dll!vtkRenderWindow::Render() Line 434 C++ > vtkRenderingCore-6.3.dll!vtkRenderWindowInteractor::Render() Line 175 > C++ > vtkViewsContext2D-6.3.dll!vtkContextInteractorStyle::RenderNow() Line > 147 C++ > > vtkViewsContext2D-6.3.dll!vtkContextInteractorStyle::ProcessInteractorEvents(vtkObject > * __formal, unsigned long eventId, void * clientdata, vtkObject * __formal) > Line 132 C++ > vtkCommonCore-6.3.dll!vtkCallbackCommand::Execute(vtkObject * caller, > unsigned long event, void * callData) Line 43 C++ > vtkCommonCore-6.3.dll!vtkSubjectHelper::InvokeEvent(unsigned long event, > void * callData, vtkObject * self) Line 619 C++ > vtkCommonCore-6.3.dll!vtkObject::InvokeEvent(unsigned long event, void * > callData) Line 785 + 0x1c bytes C++ > vtkGUISupportQt-6.3.dll!QVTKInteractor::TimerEvent(int timerId) Line > 217 C++ > vtkGUISupportQt-6.3.dll!QVTKInteractorInternal::TimerEvent(int id) Line > 73 C++ > > vtkGUISupportQt-6.3.dll!QVTKInteractorInternal::qt_static_metacall(QObject > * _o, QMetaObject::Call _c, int _id, void * * _a) Line 52 C++ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 newcfd at yahoo.com Fri Jan 8 14:08:49 2016 From: newcfd at yahoo.com (newcfd) Date: Fri, 8 Jan 2016 12:08:49 -0700 (MST) Subject: [vtkusers] Null pointer with Visual Studio 2010 In-Reply-To: References: <1232010237.1799987.1452278340162.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1452280129873-5735892.post@n5.nabble.com> works. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/Null-pointer-with-Visual-Studio-2010-tp5735890p5735892.html Sent from the VTK - Users mailing list archive at Nabble.com. From joaorobertojr88 at gmail.com Fri Jan 8 14:21:26 2016 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Fri, 8 Jan 2016 12:21:26 -0700 (MST) Subject: [vtkusers] Actor scaling Message-ID: <1452280886851-5735893.post@n5.nabble.com> Hi VTK Users, Maybe this is a newbie question, but here it goes. I'm rendering a vtkPolyData in the screen with aprox. dimensions (1, 39, 0.00001, 0.001). How can I fit it (both vertical and horizontal) to my rendering window (QVTKWidget)? I've tried the following approaches: 1. Setting parallel scale on vtkCamera: I had luck fitting width only. How can I fit height also? 2. vtkActor::SetScale method: how can I correctly calculate the x and y scale factors to fit the screen? I've used the world coordinate proportion related to the display coordinate, but something stills wrong since the object isn't displayed as it should. Thanks for any help. Joao. -- View this message in context: http://vtk.1045678.n5.nabble.com/Actor-scaling-tp5735893.html Sent from the VTK - Users mailing list archive at Nabble.com. From binarybottle at gmail.com Fri Jan 8 14:27:10 2016 From: binarybottle at gmail.com (Arno Klein) Date: Fri, 08 Jan 2016 19:27:10 +0000 Subject: [vtkusers] Migration to VTK6 In-Reply-To: References: Message-ID: Thank you for all of your help, David! I really appreciate it. I have written to the anaconda forum and will tell you what I learn... On Fri, Jan 8, 2016, 10:46 AM David Gobbi wrote: > Hi Arno, > > I'm afraid you're on your own at this point. I have no real experience > with Anaconda, all my experience is purely with CMake and VTK, and I'm not > going to go so far as to install miniconda on my own system to investigate. > > - David > > > On Fri, Jan 8, 2016 at 8:18 AM, Arno Klein wrote: > >> I made the edits you recommended (AGL to OpenGL and 10.7 to 10.11) in all >> miniconda2 files and rebuilt my mindboggle package, and still get the same >> error! Should I have done something more with miniconda2's cmake or vtk? >> >> On Fri, Jan 8, 2016, 12:10 AM David Gobbi wrote: >> >>> Hi Arno, >>> >>> The fact that a specific SDK has been hard-coded into all those >>> dependency paths is very, very ugly. The Anaconda folks should know better >>> than that. >>> >>> You can't get away with just commenting out those lines. Instead, I >>> recommend that you do the following search and replace within each of those >>> files: >>> 1) replace 10.7.sdk with an SDK that you actually have on your system >>> 2) replace AGL.framework with OpenGL.framework >>> >>> However, the fact that you got the _same_ error after commenting out >>> those lines, instead of getting a different error, suggests that your build >>> did not pick up the change. After changing the files, did you erase your >>> build directory and do a full rebuild? >>> >>> - David >>> >>> >>> On Thu, Jan 7, 2016 at 9:40 PM, Arno Klein >>> wrote: >>> >>>> Thank you again, David. >>>> >>>> The find command turned up one file within the >>>> miniconda2/lib/cmake/vtk-6.3 directory: "VTKTargets.cmake" >>>> Within this file, I commented out lines with AGL and 10.7 (see below), >>>> but I still get the same error! >>>> >>>> >>>> # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion: >>>> >>>> # find . -name "*.cmake" -exec fgrep -l AGL {} + >>>> >>>> set_target_properties(vtkRenderingOpenGL PROPERTIES >>>> >>>> INTERFACE_LINK_LIBRARIES "vtkRenderingCore;-framework Cocoa" >>>> >>>> ) >>>> >>>> #set_target_properties(vtkRenderingOpenGL PROPERTIES >>>> >>>> # INTERFACE_LINK_LIBRARIES >>>> "vtkRenderingCore;/Applications/Xcode.app/Contents/Developer/P\ >>>> >>>> >>>> latforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.frame\ >>>> >>>> >>>> work;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/M\ >>>> >>>> acOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework;-framework >>>> Cocoa" >>>> >>>> #) >>>> >>>> >>>> # Create imported target vtkRenderingContextOpenGL >>>> >>>> add_library(vtkRenderingContextOpenGL SHARED IMPORTED) >>>> >>>> >>>> set_target_properties(vtkRenderingContextOpenGL PROPERTIES >>>> >>>> INTERFACE_LINK_LIBRARIES "vtkRenderingContext2D;vtkRenderingOpenGL" >>>> >>>> ) >>>> >>>> >>>> # Create imported target vtkgl2ps >>>> >>>> add_library(vtkgl2ps SHARED IMPORTED) >>>> >>>> >>>> # @rno: Removed AGL and SDK 10.7 as per David Gobbi's suggestion: >>>> >>>> # find . -name "*.cmake" -exec fgrep -l AGL {} + >>>> >>>> set_target_properties(vtkgl2ps PROPERTIES >>>> >>>> INTERFACE_LINK_LIBRARIES "vtkzlib;vtkpng;" >>>> >>>> ) >>>> >>>> #set_target_properties(vtkgl2ps PROPERTIES >>>> >>>> # INTERFACE_LINK_LIBRARIES >>>> "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p\ >>>> >>>> >>>> latform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework;/Application\ >>>> >>>> >>>> s/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Sys\ >>>> >>>> tem/Library/Frameworks/OpenGL.framework;m;vtkzlib;vtkpng;m" >>>> >>>> #) >>>> >>>> On Thu, Jan 7, 2016 at 4:17 PM David Gobbi >>>> wrote: >>>> >>>>> I apologize for that... I had forgotten that you were using a binary >>>>> distribution of VTK rather than building VTK from source. My recent >>>>> thinking was that the only binary piece you were using from Anaconda was >>>>> python itself, I didn't go back and re-read our entire conversation. >>>>> >>>>> This means that all of my recent advice to you has been totally >>>>> irrelevant. (It would be very relevant to the Anaconda folks if they plan >>>>> to put out a new vtk package soon... they could save people like yourself a >>>>> lot of difficulty.) >>>>> >>>>> If you're using a binary vtk, then you'll have to dig into the cmake >>>>> exports for VTK and perform some surgical changes to them. Somewhere in >>>>> your Anaconda VTK, there should be a directory called the following: >>>>> >>>>> cmake/vtk-6.3 >>>>> >>>>> Once you find that directory, "cd" into it, and it should be full of >>>>> cmake files. These cmake files list the dependencies for your VTK >>>>> package. If you edit these files to remove all references to "AGL" and the >>>>> problematic SDK, then your compile difficulties should go away. For >>>>> example, use this to find all the files that reference AGL: >>>>> >>>>> find . -name "*.cmake" -exec fgrep -l AGL {} + >>>>> >>>>> But it might be easier if you find a Mac with OS X 10.9 and Xcode 6.1, >>>>> and then re-do your build there. >>>>> >>>>> - David >>>>> >>>>> >>>>> On Thu, Jan 7, 2016 at 1:39 PM, Arno Klein >>>>> wrote: >>>>> >>>>>> Thank you! I am afraid I still don't know where it goes, given the >>>>>> conda installation of vtk doesn't have a CMake subdirectory (miniconda2/pkgs/vtk-6.3.0-py27_1/). >>>>>> Any suggestions how to proceed? >>>>>> >>>>>> On Thu, Jan 7, 2016 at 3:16 PM David Gobbi >>>>>> wrote: >>>>>> >>>>>>> It is not the same directory. FindOpenGL.cmake is part of cmake, >>>>>>> but vtkOpenGL.cmake is part of VTK. >>>>>>> >>>>>>> On Thu, Jan 7, 2016 at 12:50 PM, Arno Klein >>>>>>> wrote: >>>>>>> >>>>>>>> If that is the same directory that FindOpenGL.cmake is in, then the >>>>>>>> path I sent should be correct, yes? I installed cmake using Anaconda: >>>>>>>> "conda install --yes cmake" >>>>>>>> >>>>>>>> On Thu, Jan 7, 2016 at 12:15 PM David Gobbi >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi Arno, >>>>>>>>> >>>>>>>>> My fault, I should have mentioned that it needs to be in >>>>>>>>> /CMake/vtkOpenGL.cmake in order be used during the VTK build. >>>>>>>>> >>>>>>>>> - David >>>>>>>>> >>>>>>>>> On Thu, Jan 7, 2016 at 9:59 AM, Arno Klein >>>>>>>> > wrote: >>>>>>>>> >>>>>>>>>> Thank you for the suggestion, David. I placed the >>>>>>>>>> vtkOpenGL.cmake file in >>>>>>>>>> >>>>>>>>>> /Users/arno/Software/install/miniconda2/pkgs/cmake-3.3.1-0/share/cmake-3.3/Modules >>>>>>>>>> but still receive the same error. >>>>>>>>>> >>>>>>>>>> On Thu, Jan 7, 2016 at 11:44 AM David Gobbi < >>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> There's also this patch to vtkOpenGL.cmake that you can try: >>>>>>>>>>> >>>>>>>>>>> https://gitlab.kitware.com/vtk/vtk/commit/4a1fbefe >>>>>>>>>>> >>>>>>>>>>> - David >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Thu, Jan 7, 2016 at 7:11 AM, Arno Klein < >>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> That was an excellent suggestion, but alas, even after >>>>>>>>>>>> replacing that file with the newer one from the link you shared I am still >>>>>>>>>>>> getting the same error! >>>>>>>>>>>> >>>>>>>>>>>> On Thu, Jan 7, 2016 at 8:34 AM David Gobbi < >>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>> >>>>>>>>>>>>> You can try replacing FindOpenGL.cmake with the latest one >>>>>>>>>>>>> from the cmake master branch: >>>>>>>>>>>>> >>>>>>>>>>>>> https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindOpenGL.cmake >>>>>>>>>>>>> On my machine, for example, the file is located here: >>>>>>>>>>>>> >>>>>>>>>>>>> /Applications/CMake.app/Contents/share/cmake-3.4/Modules/FindOpenGL.cmake >>>>>>>>>>>>> That might help with AGL. >>>>>>>>>>>>> >>>>>>>>>>>>> - David >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Thu, Jan 7, 2016 at 5:37 AM, Arno Klein < >>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Yes, it should be building from miniconda2. However, I can't >>>>>>>>>>>>>> find any instance of "AGL" or of "10.7" anywhere in the code base (only >>>>>>>>>>>>>> within the bin directory after running cmake). I am baffled and stuck. >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 9:36 PM David Gobbi < >>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Are you still building against the Anaconda python? The >>>>>>>>>>>>>>> build has to be picking up the AGL and the 10.7 SDK from somewhere, and if >>>>>>>>>>>>>>> it isn't in your CMakeCache.txt, then it must be coming from somewhere. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:19 PM, Arno Klein < >>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear David, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> When I clear the bin directory, then run "cmake .." and >>>>>>>>>>>>>>>> "make" I don't find any instance of 10.7 mentioned in any file, but still >>>>>>>>>>>>>>>> get "AGL.framework" in every subdirectory's build.make file. The >>>>>>>>>>>>>>>> CMakeCache.txt file contains the following line: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> And yet I am still receiving the following error: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 8:48 PM, David Gobbi < >>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> It could be a stale dependency. Remove everything after >>>>>>>>>>>>>>>>> the "INTERNAL cache entries" comment in your CMakeCache.txt, and also >>>>>>>>>>>>>>>>> search your cache to make sure that 10.7 does not appear anywhere. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Also do an "ls -l /System/Library/Frameworks/" to make >>>>>>>>>>>>>>>>> sure that the OpenGL framework isn't a link to a non-existent 10.7 SDK >>>>>>>>>>>>>>>>> (though I don't see how that could happen). >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 5:34 PM, Arno Klein < >>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> David -- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> There was no instance of "AGL" in CMakeCache.txt, but I >>>>>>>>>>>>>>>>>> replaced every instance of "AGL" with OpenGL" in all of the build.make >>>>>>>>>>>>>>>>>> files. Without cmake, but with make I got the following error: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework', >>>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> It still calls 10.7 even though I have 10.11 installed on >>>>>>>>>>>>>>>>>> my Mac. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 7:02 PM, David Gobbi < >>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Look for the following line in your CMakeCache.txt: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/AGL.framework >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Change it to the following and then recompile: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> OPENGL_glu_LIBRARY:FILEPATH=/System/Library/Frameworks/OpenGL.framework >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> That should keep the problematic AGL library out of your >>>>>>>>>>>>>>>>>>> build. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Please let me know if this works. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Wed, Jan 6, 2016 at 4:45 PM, Arno Klein < >>>>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Thank you all so much for your kind help. >>>>>>>>>>>>>>>>>>>> Unfortunately, I am still unable to compile the C++ code in my project on >>>>>>>>>>>>>>>>>>>> MacOSX, even after setting the following in my top-level CMakeLists.txt >>>>>>>>>>>>>>>>>>>> file: >>>>>>>>>>>>>>>>>>>> SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.7") >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> When I type: >>>>>>>>>>>>>>>>>>>> $ export VERBOSE=1 >>>>>>>>>>>>>>>>>>>> $ make >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> I get the following even though I don't have >>>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ >>>>>>>>>>>>>>>>>>>> but instead have >>>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ >>>>>>>>>>>>>>>>>>>> on my computer: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ------------------ >>>>>>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> *Scanning dependencies of target TravelDepthMain* >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/usr/bin/make >>>>>>>>>>>>>>>>>>>> -f travel_depth/CMakeFiles/TravelDepthMain.dir/build.make >>>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/build >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> [ 57%] Building CXX object >>>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> cd >>>>>>>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/bin/travel_depth && >>>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ >>>>>>>>>>>>>>>>>>>> -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL)" >>>>>>>>>>>>>>>>>>>> -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL)" >>>>>>>>>>>>>>>>>>>> -DvtkRenderingFreeType_AUTOINIT="1(vtkRenderingMatplotlib)" >>>>>>>>>>>>>>>>>>>> -DvtkRenderingVolume_AUTOINIT="1(vtkRenderingVolumeOpenGL)" >>>>>>>>>>>>>>>>>>>> -I/software/install/miniconda2/include/vtk-6.3 >>>>>>>>>>>>>>>>>>>> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >>>>>>>>>>>>>>>>>>>> -isystem /software/install/miniconda2/include -isysroot >>>>>>>>>>>>>>>>>>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk >>>>>>>>>>>>>>>>>>>> -o CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o -c >>>>>>>>>>>>>>>>>>>> /software/install/mindboggle/surface_cpp_tools/travel_depth/TravelDepthMain.cpp >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> make[2]: *** No rule to make target >>>>>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> make[1]: *** >>>>>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> make: *** [all] Error 2 >>>>>>>>>>>>>>>>>>>> ------------------- >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 9:36 PM, David Gobbi < >>>>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> I think that I've found out where the AGL link is >>>>>>>>>>>>>>>>>>>>> coming from. It isn't via Carbon, it looks like it was linked directly >>>>>>>>>>>>>>>>>>>>> into the VTK that you're using. And it looks like a bug within CMake >>>>>>>>>>>>>>>>>>>>> itself. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> CMake has a module called FindOpenGL.cmake that VTK >>>>>>>>>>>>>>>>>>>>> uses to find OpenGL. It looks for both the OpenGL.framework and for the >>>>>>>>>>>>>>>>>>>>> obsolete AGL.framework (which is only for Carbon, and is deprecated by >>>>>>>>>>>>>>>>>>>>> Apple). If it finds both (e.g. with an older SDK and XCode 6 or earlier), >>>>>>>>>>>>>>>>>>>>> then it uses both, even though AGL.framework is really not needed for any >>>>>>>>>>>>>>>>>>>>> modern software. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> This means that a VTK that is built with (for example) >>>>>>>>>>>>>>>>>>>>> Xcode 6 and its SDKs becomes linked to AGL, because AGL.framework is >>>>>>>>>>>>>>>>>>>>> present in those older SDKs. It's a private link, though, so I'm surprised >>>>>>>>>>>>>>>>>>>>> that it would cause the error. But you are building with Xcode 7 and you >>>>>>>>>>>>>>>>>>>>> are seeing an error... that much is indisputable. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> I suggest that you enable verbose error reporting so >>>>>>>>>>>>>>>>>>>>> that you can see exactly what is being linked when the error occurs: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> export VERBOSE=1 >>>>>>>>>>>>>>>>>>>>> make >>>>>>>>>>>>>>>>>>>>> ... >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Use "unset VERBOSE" to turn off the verbosity. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 3:57 PM, Arno Klein < >>>>>>>>>>>>>>>>>>>>> binarybottle at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> I tried again, and am still getting the AGL.framework >>>>>>>>>>>>>>>>>>>>>> error even when I set to 10.9 and the SDK to 10.11 (see: >>>>>>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/blob/master/surface_cpp_tools/CMakeLists.txt >>>>>>>>>>>>>>>>>>>>>> ): >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> > [ 57%] Building CXX object >>>>>>>>>>>>>>>>>>>>>> travel_depth/CMakeFiles/TravelDepthMain.dir/TravelDepthMain.cpp.o >>>>>>>>>>>>>>>>>>>>>> > make[2]: *** No rule to make target >>>>>>>>>>>>>>>>>>>>>> `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AGL.framework', >>>>>>>>>>>>>>>>>>>>>> needed by `travel_depth/TravelDepthMain'. Stop. >>>>>>>>>>>>>>>>>>>>>> > make[1]: *** >>>>>>>>>>>>>>>>>>>>>> [travel_depth/CMakeFiles/TravelDepthMain.dir/all] Error 2 >>>>>>>>>>>>>>>>>>>>>> > make: *** [all] Error 2 >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Could you please tell me how to ensure that there are >>>>>>>>>>>>>>>>>>>>>> no calls to Carbon APIs? >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> By the way, I am tracking this as an issue on Github: >>>>>>>>>>>>>>>>>>>>>> https://github.com/nipy/mindboggle/issues/69 >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Cheers, >>>>>>>>>>>>>>>>>>>>>> @rno >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> On Fri, Dec 11, 2015 at 5:27 AM, David Gobbi < >>>>>>>>>>>>>>>>>>>>>> david.gobbi at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Hi Arno, >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Using the macosx10.11 SDK is fine as long as it >>>>>>>>>>>>>>>>>>>>>>> allows you to set this desired deployment target. So if you are able to >>>>>>>>>>>>>>>>>>>>>>> compile with the following settings, then the result should run on OS X >>>>>>>>>>>>>>>>>>>>>>> 10.7: >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7 >>>>>>>>>>>>>>>>>>>>>>> CMAKE_OSX_SYSROOT:STRING=macosx10.11 >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> I'm not sure how far back you can set the deployment >>>>>>>>>>>>>>>>>>>>>>> target with this SDK, but if the 10.7 target doesn't compile, you can try >>>>>>>>>>>>>>>>>>>>>>> 10.8 or 10.9. >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> If if gives errors for the AGL.framework, then make >>>>>>>>>>>>>>>>>>>>>>> sure that your code has no calls to Carbon APIs. >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> - David >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>> >>>>>>> >>>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joaorobertojr88 at gmail.com Fri Jan 8 17:33:41 2016 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Fri, 8 Jan 2016 15:33:41 -0700 (MST) Subject: [vtkusers] Actor scaling In-Reply-To: <1452280886851-5735893.post@n5.nabble.com> References: <1452280886851-5735893.post@n5.nabble.com> Message-ID: <1452292421834-5735895.post@n5.nabble.com> I meant dimensions (1, 39, 0.00001, 0.001, 0, 0) -- View this message in context: http://vtk.1045678.n5.nabble.com/Actor-scaling-tp5735893p5735895.html Sent from the VTK - Users mailing list archive at Nabble.com. From 707919138 at qq.com Fri Jan 8 20:33:07 2016 From: 707919138 at qq.com (=?gb18030?B?6dzPwsz90ak=?=) Date: Sat, 9 Jan 2016 09:33:07 +0800 Subject: [vtkusers] vtkVolumeRayCastMapper in vtk7.1 Message-ID: When I changed my vtk6.3 to vtk7.1, i found some problems in using volume in my project. The problems like this: Generic Warning: In c:\vtk source\vtk-7.1-master\vtk-master\rendering\volume\vtkVolumeRayCastFunction.h, line 162 vtkVolumeRayCastMapper::vtkVolumeRayCastMapper was deprecated for VTK 7.0 and will be removed in a future version. Generic Warning: In C:\VTK Source\VTK-7.1-master\VTK-master\Rendering\Volume\vtkVolumeRayCastCompositeFunction.cxx, line 2350 vtkVolumeRayCastCompositeFunction::vtkVolumeRayCastCompositeFunction was deprecated for VTK 7.0 and will be removed in a future version. Generic Warning: In C:\VTK Source\VTK-7.1-master\VTK-master\Rendering\Volume\vtkVolumeRayCastIsosurfaceFunction.cxx, line 1044 vtkVolumeRayCastIsosurfaceFunction::vtkVolumeRayCastIsosurfaceFunction was deprecated for VTK 7.0 and will be removed in a future version. so,I wonder what can I change my project to solve this problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Jan 8 20:48:36 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 8 Jan 2016 20:48:36 -0500 Subject: [vtkusers] vtkVolumeRayCastMapper in vtk7.1 In-Reply-To: References: Message-ID: Hi There, On Fri, Jan 8, 2016 at 8:33 PM, ???? <707919138 at qq.com> wrote: > When I changed my vtk6.3 to vtk7.1, i found some problems in using volume > in my project. > The problems like this: > > Generic Warning: In c:\vtk > source\vtk-7.1-master\vtk-master\rendering\volume\vtkVolumeRayCastFunction.h, > line 162 > vtkVolumeRayCastMapper::vtkVolumeRayCastMapper was deprecated for VTK 7.0 > and will be removed in a future version. > You are attempting to use an old and now deprecated code. May I ask why you are using vtkVolumeRayCastMapper and not vtkFixedPointVolumeRayCastMapper or its GPU sibling? - Aashish > > Generic Warning: In C:\VTK > Source\VTK-7.1-master\VTK-master\Rendering\Volume\vtkVolumeRayCastCompositeFunction.cxx, > line 2350 > vtkVolumeRayCastCompositeFunction::vtkVolumeRayCastCompositeFunction was > deprecated for VTK 7.0 and will be removed in a future version. > > Generic Warning: In C:\VTK > Source\VTK-7.1-master\VTK-master\Rendering\Volume\vtkVolumeRayCastIsosurfaceFunction.cxx, > line 1044 > vtkVolumeRayCastIsosurfaceFunction::vtkVolumeRayCastIsosurfaceFunction was > deprecated for VTK 7.0 and will be removed in a future version. > > so,I wonder what can I change my project to solve this problem. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Jan 8 21:11:42 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 8 Jan 2016 21:11:42 -0500 Subject: [vtkusers] vtkVolumeRayCastMapper in vtk7.1 In-Reply-To: References: Message-ID: Also, you want to look at the GPU version of it vtkGPUVolumeRayCastMapper. We have plenty of tests in VTK repository. For example look here: https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastVolumeRotation.cxx Thanks, On Fri, Jan 8, 2016 at 9:07 PM, ???? <707919138 at qq.com> wrote: > Thank you for your reponse. > I just got an old volume rendering demo like this ,and I begin to learn > it by this demo. > I don't know the class vtkFixedPointVolumeRayCastMapper existing, and now > I learn it. > Thank you for your help again! > > > ------------------ ???? ------------------ > *???:* "Aashish Chaudhary"; > *????:* 2016?1?9?(???) ??9:48 > *???:* "????"<707919138 at qq.com>; > *??:* "vtkusers"; > *??:* Re: [vtkusers] vtkVolumeRayCastMapper in vtk7.1 > > Hi There, > > On Fri, Jan 8, 2016 at 8:33 PM, ???? <707919138 at qq.com> wrote: > >> When I changed my vtk6.3 to vtk7.1, i found some problems in using volume >> in my project. >> The problems like this: >> >> Generic Warning: In c:\vtk >> source\vtk-7.1-master\vtk-master\rendering\volume\vtkVolumeRayCastFunction.h, >> line 162 >> vtkVolumeRayCastMapper::vtkVolumeRayCastMapper was deprecated for VTK 7.0 >> and will be removed in a future version. >> > > You are attempting to use an old and now deprecated code. May I ask why > you are using vtkVolumeRayCastMapper and > not vtkFixedPointVolumeRayCastMapper or its GPU sibling? > > - Aashish > > >> >> Generic Warning: In C:\VTK >> Source\VTK-7.1-master\VTK-master\Rendering\Volume\vtkVolumeRayCastCompositeFunction.cxx, >> line 2350 >> vtkVolumeRayCastCompositeFunction::vtkVolumeRayCastCompositeFunction was >> deprecated for VTK 7.0 and will be removed in a future version. >> >> Generic Warning: In C:\VTK >> Source\VTK-7.1-master\VTK-master\Rendering\Volume\vtkVolumeRayCastIsosurfaceFunction.cxx, >> line 1044 >> vtkVolumeRayCastIsosurfaceFunction::vtkVolumeRayCastIsosurfaceFunction >> was deprecated for VTK 7.0 and will be removed in a future version. >> >> so,I wonder what can I change my project to solve this problem. >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From 707919138 at qq.com Fri Jan 8 21:07:48 2016 From: 707919138 at qq.com (=?gb18030?B?6dzPwsz90ak=?=) Date: Sat, 9 Jan 2016 10:07:48 +0800 Subject: [vtkusers] =?gb18030?b?u9i4tKO6ICB2dGtWb2x1bWVSYXlDYXN0TWFwcGVy?= =?gb18030?q?_in_vtk7=2E1?= In-Reply-To: References: Message-ID: Thank you for your reponse. I just got an old volume rendering demo like this ,and I begin to learn it by this demo. I don't know the class vtkFixedPointVolumeRayCastMapper existing, and now I learn it. Thank you for your help again! ------------------ ???? ------------------ ???: "Aashish Chaudhary"; ????: 2016?1?9?(???) ??9:48 ???: "????"<707919138 at qq.com>; ??: "vtkusers"; ??: Re: [vtkusers] vtkVolumeRayCastMapper in vtk7.1 Hi There, On Fri, Jan 8, 2016 at 8:33 PM, ???? <707919138 at qq.com> wrote: When I changed my vtk6.3 to vtk7.1, i found some problems in using volume in my project. The problems like this: Generic Warning: In c:\vtk source\vtk-7.1-master\vtk-master\rendering\volume\vtkVolumeRayCastFunction.h, line 162 vtkVolumeRayCastMapper::vtkVolumeRayCastMapper was deprecated for VTK 7.0 and will be removed in a future version. You are attempting to use an old and now deprecated code. May I ask why you are using vtkVolumeRayCastMapper and not vtkFixedPointVolumeRayCastMapper or its GPU sibling? - Aashish Generic Warning: In C:\VTK Source\VTK-7.1-master\VTK-master\Rendering\Volume\vtkVolumeRayCastCompositeFunction.cxx, line 2350 vtkVolumeRayCastCompositeFunction::vtkVolumeRayCastCompositeFunction was deprecated for VTK 7.0 and will be removed in a future version. Generic Warning: In C:\VTK Source\VTK-7.1-master\VTK-master\Rendering\Volume\vtkVolumeRayCastIsosurfaceFunction.cxx, line 1044 vtkVolumeRayCastIsosurfaceFunction::vtkVolumeRayCastIsosurfaceFunction was deprecated for VTK 7.0 and will be removed in a future version. so,I wonder what can I change my project to solve this problem. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- | Aashish Chaudhary | Technical Leader | Kitware Inc. | http://www.kitware.com/company/team/chaudhary.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From newcfd at yahoo.com Fri Jan 8 21:23:12 2016 From: newcfd at yahoo.com (newcfd) Date: Fri, 8 Jan 2016 19:23:12 -0700 (MST) Subject: [vtkusers] Memory leak of vtkMultiBlockPlot3D reader and dataset on Ubuntu Message-ID: <1452306192591-5735900.post@n5.nabble.com> vtkMultiBlockPlot3D reader is used in an application to load a plot3D file and the multiblock dataset is rendered. Then the view is deleted. On Windows memory is cleaned up nicely. But on Ubuntu the memory use is leaked. Exactly the same code. -- View this message in context: http://vtk.1045678.n5.nabble.com/Memory-leak-of-vtkMultiBlockPlot3D-reader-and-dataset-on-Ubuntu-tp5735900.html Sent from the VTK - Users mailing list archive at Nabble.com. From andy.bauer at kitware.com Sat Jan 9 14:03:01 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Sat, 9 Jan 2016 14:03:01 -0500 Subject: [vtkusers] Memory leak of vtkMultiBlockPlot3D reader and dataset on Ubuntu In-Reply-To: <1452306192591-5735900.post@n5.nabble.com> References: <1452306192591-5735900.post@n5.nabble.com> Message-ID: Any chance you can share some code to replicate the issue? Also, the a list of the leaked class would be useful. Best, Andy On Fri, Jan 8, 2016 at 9:23 PM, newcfd via vtkusers wrote: > vtkMultiBlockPlot3D reader is used in an application to load a plot3D file > and the multiblock dataset is rendered. > Then the view is deleted. On Windows memory is cleaned up nicely. But on > Ubuntu the memory use is leaked. > Exactly the same code. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Memory-leak-of-vtkMultiBlockPlot3D-reader-and-dataset-on-Ubuntu-tp5735900.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 newcfd at yahoo.com Sun Jan 10 15:25:07 2016 From: newcfd at yahoo.com (newcfd) Date: Sun, 10 Jan 2016 13:25:07 -0700 (MST) Subject: [vtkusers] Memory leak of vtkMultiBlockPlot3D reader and dataset on Ubuntu In-Reply-To: References: <1452306192591-5735900.post@n5.nabble.com> Message-ID: <1452457507663-5735902.post@n5.nabble.com> I need to write a smaller code to test it. -- View this message in context: http://vtk.1045678.n5.nabble.com/Memory-leak-of-vtkMultiBlockPlot3D-reader-and-dataset-on-Ubuntu-tp5735900p5735902.html Sent from the VTK - Users mailing list archive at Nabble.com. From paulo.waelkens at gmail.com Sun Jan 10 16:34:38 2016 From: paulo.waelkens at gmail.com (Paulo Waelkens) Date: Sun, 10 Jan 2016 22:34:38 +0100 Subject: [vtkusers] VTK with NVidia Optimus In-Reply-To: References: Message-ID: Hi Chiang, indeed, there SHOULD be a soft trigger for the graphic card switch. As far as I understood the vague, incorrect and absolutely infuriating!!! NVIDIA optimus documentation, there are a few approaches to trigger a switch between GPUs, as already mentioned. Unfortunately, they do not work for my current setup GTX970m on Windows Server 2012R2 (==Win 8.1, I believe). I ran a CUDA kernel prior to calling any rendering routines in my main function, and while I got GPU activity on the nvidia control panel for my executable, the rendering was still performed by the IGP, in defiance of the empty claims in the NVIDIA documentation. Sigh... I did discover one workaround, though: if you connect an external monitor to the laptop (HDMI port, in my case), and set this as the primary monitor, then the discrete GPU is always used, for everything. Including VTK. Problem, sort of, solved =P Also, I've tried running the same executable on another laptop with NVIDIA optimus (using the latest NVIDIA drivers), and the switch worked there. What?!?! That laptop had windows 10, instead of windows 8.1 and a different GPU model (GT740m). So either the windows 8.1 drivers are not working properly and/or the GPU switch works for the 700m GPU series but not for the 900m GPU series (since they must have different drivers, given their different hardware architecture and features). Hopefully NVidia will get their act together at some point and fix their drivers... Anyway, thanks for your help, Chiang! I'm sort of dropping this issue for now, since the external monitor solution is a (dreadful) fix, and I cannot install windows 10 right now (because you cannot install VS2013 on windows 10; only if you upgrade from windows 8.1. Darned!) Cheers! Paulo On 4 January 2016 at 01:57, WangQ wrote: > Hi Paulo, > > It is quite strange. Suppose to have hard or soft trigger for graphic card > switch. You may also try a simple CUDA program to see if the dedicated > graphic card is used. If you get CUDA installed, there is an example about > cuda with opengl rendering. If successfully executed, the dedicated one > should be used. > > Cheers, > > Chiang > > ------------------------------ > Date: Sun, 3 Jan 2016 18:26:37 +0100 > > Subject: Re: [vtkusers] VTK with NVidia Optimus > From: paulo.waelkens at gmail.com > To: wangq1979 at outlook.com > CC: vtkusers at vtk.org > > Hi Chiang, > I also found this video, but my BIOS does look different. Apparently my > laptop has a hybrid graphics with a dynamic switching model ( > https://wiki.archlinux.org/index.php/Hybrid_graphics), meaning it is > impossible to disable the IGP, since the IGP's framebuffer provides the > only interface to the screen. The discrete GPU, when in use, will write its > output to the IGP's framebuffer. > In the coming days I'll try writing a "pure" OpenGL win32 application > (i.e. a program that uses the window manager of the OS, unlike a console > application), and try out the solutions nvidia gives in the > OptimusRenderingPolicies. > > I suspect the real problem is that I'm starting all the rendering stuff > from a console application (i.e. not a win32 application, that explicitly > uses the window manager of the OS). *Maybe* the optimus driver always > assigns the IGP to console applications, since in windows you would usually > create a win32 application if you wanted to do rendering. To test this I'll > do the following: > - create a win32 application with simple OpenGL code (e.g. draw a sphere) > => play with nvidia settings until it uses the discrete GPU. This should > work, I hope > - create a console application, that links to a dll with OpenGL code, that > draws a sphere => this is basically analogous to what VTK is doing in my > application right now. I get the feeling, this will always default to the > IGP > - create a win32 application, that links to the same OpenGL dll => if I > get this to work with the discrete GPU, this is the solution! > > I'm no OpenGL expert though; maybe what I'm planning here is not possible. > Guess I'll find out =D > > Cheers, > Paulo > > > On 2 January 2016 at 03:54, WangQ wrote: > > Hi Paulo, > > Not sure about alienware, but my m4700 is able to disable IGP through bios > setting. I always switch it off since I need CUDA, and my opengl code works > well when the IGP is switched off. But i did not try the suggestion in WP. > > I just googled it and found this > https://www.youtube.com/watch?v=HuqyR-496Sw > > Check it to see if you are luck. > > Cheers, > > Chiang > > ------------------------------ > Date: Sat, 2 Jan 2016 00:02:01 +0100 > Subject: Re: [vtkusers] VTK with NVidia Optimus > From: paulo.waelkens at gmail.com > To: wangq1979 at outlook.com > CC: vtkusers at vtk.org > > > Dear Chiang, > thank you for your suggestion. It is not possible to disable the IGP in > the BIOS of my laptop (Alienware17 r3), even after getting the newest BIOS > from dell. I *guess* this means the laptop does not have a hardware > multiplexer(?), whilst your M4700 has one(?). So this approach won't work, > I think. > Did you perhaps try the programmatic solutions suggested by nvidia (e.g. > NvOptimusEnablement export thing) when doing your OpenGL programming? > Thanks! Regards, > Paulo > > On 1 January 2016 at 19:54, WangQ wrote: > > > Hi, > > You may try disabling optimus in bios setting to see if works. At least > this works with my DELL M4700 and direct opengl programming. Not 100% sure > whether for VTK. > > Cheers, > > Chiang > ------------------------------ > Date: Fri, 1 Jan 2016 18:42:17 +0100 > From: paulo.waelkens at gmail.com > To: vtkusers at vtk.org > Subject: [vtkusers] VTK with NVidia Optimus > > Dear all, > > I'm trying to get my VTK 6.3 application to use the NVidia GPU on my > laptop. The laptop (Dell Alienware) combines an intel HD530 with an Nvidia > GTX970m using the NVidia Optimus technology. At the moment, my application > always uses the integrated GPU, which is slow and horrible. Did any of you > figure out how to make the NVidia Optimus driver choose the discrete GPU > instead??? The laptop uses the discrete GPU for games, so it's not a > hardware problem, I'd say. > > NOTE: I have both the latest intel and nvidia GPU drivers, and installed > the intel driver first (as suggested somewhere). I've built VTK 6.3 with > shared libraries and using the OpenGL2 flag. > > I've followed the solutions described by nvidia, without success: > > http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf > - set the discrete GPU as the "Preferred graphics processor" => no effect > - adding this line to my main.cpp > extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; > } //=>no effect > > To check if the discrete GPU is being used, I use the GPU activity icon of > the nvidia control panel ( > http://acer--uk.custhelp.com/app/answers/detail/a_id/9075/~/determining-which-graphics-card-is-used-with-nvidia-optimus). > The icon does work correctly, since it shows activity when games are > running (e.g. Starcraft 2). > > I figured maybe I need to add the *extern "C" { _declspec(dllexport) > DWORD NvOptimusEnablement = 0x00000001; }* line in the VTK source code > somewhere. This is a bit of a wild guess, but maybe, since I'm linking to > VTK dynamically, all the OpenGL stuff is done withing the VTK dll > boundaries, so NVidia Optimus needs a hint from VTK, not from my (console) > application that uses VTK. > > I'm really running out of tricks here, and was wondering if one of you > knows how to proceed. > Thanks! > > _______________________________________________ Powered by www.kitware.com > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html Please keep messages > on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 itkhelpacc at gmail.com Mon Jan 11 01:04:57 2016 From: itkhelpacc at gmail.com (vishal) Date: Sun, 10 Jan 2016 23:04:57 -0700 (MST) Subject: [vtkusers] Problem with Callback function Message-ID: <1452492297398-5735905.post@n5.nabble.com> hi, Im trying to printout the rotation values(rotation abt x,y,z) of a volume using callback function... im follwing the example [1]http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/ClientData .... the flow of mycode goes something like this.. read 3D volume in ITK--> Visualize in VTK(using itkImageToVTKImageFilter.h)--> interact with volume -> upon press any key through callbackFunction called and using volume->GetOrientation() method in the callback function....I can get the angles values-> print to console... upon building the example code the radius was printed out ... but then i did some changes so that it matches my requirements the angles are not printed out... no errors were found during building the code is found below-> #include #include #include #include #include #include #include #include #include #include //////////////////////////// #include #include "itkImageToVTKImageFilter.h" #include #include #include #include #include #include #include #include #include #include #include "vtkSmartVolumeMapper.h" #include #include #include #include #include #include #include /////////////////////////// static void KeypressCallbackFunction ( vtkObject* caller, long unsigned int eventId, void* clientData, void* callData ); double printOrient[3]; double org[3]; int main(int argc, char *argv[]) { argv[1] ="OS_Volume.dcm"; // 3D volume that i want to display typedef itk::Image VisualizingImageType; typedef itk::ImageFileReader< VisualizingImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName( argv[1] ); reader->Update(); VisualizingImageType::Pointer image=reader->GetOutput(); vtkSmartPointer renWin = vtkSmartPointer::New(); vtkSmartPointer ren1 = vtkSmartPointer::New(); ren1->SetBackground(0.5f,0.5f,1.0f); renWin->AddRenderer(ren1); renWin->SetSize(1280,1024); vtkSmartPointer iren = vtkSmartPointer::New(); iren->SetRenderWindow(renWin); renWin->Render(); // make sure we have an OpenGL context. typedef itk::ImageToVTKImageFilter itkVtkConverter; itkVtkConverter::Pointer conv=itkVtkConverter::New(); conv->SetInput(image); conv->Update(); vtkSmartPointer image2=vtkSmartPointer::New(); image2->ShallowCopy(conv->GetOutput()); //shallow copy is vtk's equivalent of disconnect pipeline vtkSmartPointer volumeMapper = vtkSmartPointer::New(); volumeMapper->SetInputData(image2); vtkSmartPointer volumeProperty = vtkSmartPointer::New(); vtkSmartPointer compositeOpacity = vtkSmartPointer::New(); compositeOpacity->AddPoint(-3024, 0, 0.5, 0.0 ); compositeOpacity->AddPoint(-16, 0, .49, .61 ); compositeOpacity->AddPoint(641, .72, .5, 0.0 ); compositeOpacity->AddPoint(3071, .71, 0.5, 0.0); volumeProperty->SetScalarOpacity(compositeOpacity); volumeMapper->SetBlendModeToComposite(); vtkSmartPointer color = vtkSmartPointer::New(); color->AddRGBPoint( -3024, 0, 0, 0, 0.5, 0.0 ); color->AddRGBPoint( -16, 0.73, 0.25, 0.30, 0.49, .61 ); color->AddRGBPoint( 641, .90, .82, .56, .5, 0.0 ); color->AddRGBPoint( 3071, 1, 1, 1, .5, 0.0 ); volumeProperty->SetColor(color); //changes volumeProperty->SetInterpolationTypeToLinear(); volumeProperty->ShadeOn(); volumeProperty->SetAmbient(0.1); volumeProperty->SetDiffuse(0.9); volumeProperty->SetSpecular(0.2); volumeProperty->SetSpecularPower(10.0); volumeProperty->SetScalarOpacityUnitDistance(0.8919); vtkSmartPointer volume = vtkSmartPointer::New(); volume->SetMapper(volumeMapper); volume->SetProperty(volumeProperty); volume->SetScale(1.5); //Here we take care of position and orientation //so that volume is in DICOM patient physical space VisualizingImageType::DirectionType d=image->GetDirection(); vtkMatrix4x4 *mat=vtkMatrix4x4::New(); //start with identity matrix for (int i=0; i<3; i++) for (int k=0; k<3; k++) mat->SetElement(i,k, d(i,k)); //counteract the built-in translation by origin VisualizingImageType::PointType origin=image->GetOrigin(); volume->SetPosition(-origin[0], -origin[1], -origin[2]); //add translation to the user matrix for (int i=0; i<3; i++) mat->SetElement(i,3, origin[i]); volume->SetUserMatrix(mat); vtkSmartPointer keypressCallback = vtkSmartPointer::New(); // // Allow the observer to access the sphereSource keypressCallback->SetClientData(volume); keypressCallback->SetCallback(KeypressCallbackFunction ); renWin->AddObserver(vtkCommand::KeyPressEvent, keypressCallback); //Add coordinate system axes, so we have a reference for position and orientation vtkSmartPointer axes = vtkSmartPointer::New(); axes->SetTotalLength(250,250,250); //ORIGINAL axes->SetShaftTypeToCylinder(); axes->SetCylinderRadius(0.01); ren1->AddActor(axes); ren1->AddVolume( volume ); ren1->ResetCamera(); renWin->Render(); iren->Start(); return EXIT_SUCCESS; } void KeypressCallbackFunction(vtkObject *, long unsigned int vtkNotUsed(eventId), void* clientData, void* vtkNotUsed(callData) ) { // Prove that we can access the sphere source vtkVolume* volume = static_cast(clientData); volume->GetOrigin(org); volume->GetOrientation(printOrient); std::cout << "Radius is " << printOrient[1]<<" "< References: <1452492297398-5735905.post@n5.nabble.com> Message-ID: <1452496162462-5735906.post@n5.nabble.com> hi, I retified the error that i have made... // // Allow the observer to access the sphereSource keypressCallback->SetClientData(volume); keypressCallback->SetCallback(KeypressCallbackFunction ); renWin->AddObserver(vtkCommand::KeyPressEvent, keypressCallback); the last line should actually be: iren->AddObserver(vtkCommand::KeyPressEvent, keypressCallback); now the radius values are appearing BUT they are not updating after the first keypress... I have attached the result with this mail.. please advice...thank you Regards Vishal -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-Callback-function-tp5735905p5735906.html Sent from the VTK - Users mailing list archive at Nabble.com. From m4tu at yandex.ru Mon Jan 11 05:11:05 2016 From: m4tu at yandex.ru (- -) Date: Mon, 11 Jan 2016 13:11:05 +0300 Subject: [vtkusers] vtkCompositeRenderManager and several graphics cards Message-ID: <610821452507065@web21j.yandex.ru> An HTML attachment was scrubbed... URL: From csaravanakumar2010 at gmail.com Mon Jan 11 06:36:25 2016 From: csaravanakumar2010 at gmail.com (saravanakumar) Date: Mon, 11 Jan 2016 04:36:25 -0700 (MST) Subject: [vtkusers] rendering two vtkClipPolyData Message-ID: <1452512185701-5735908.post@n5.nabble.com> Hi to all, I am new to VTK. In my program, I am trying to clip a vtp file (Polydata) using two sliders.one slider is used to clip the data in vertical and another slider is used to clip the data in Horizontal. Both are working individually.I moved the one slider(slider 1) to some position, then i am moving the another slider(slider 2) to clip. But I am getting the one actor to view in renderer. (i.e second clipper property is rendering). I need both slider (clipper) properties to clip. I snippet the image below. -- View this message in context: http://vtk.1045678.n5.nabble.com/rendering-two-vtkClipPolyData-tp5735908.html Sent from the VTK - Users mailing list archive at Nabble.com. From ocomas at apelem.com Mon Jan 11 07:12:34 2016 From: ocomas at apelem.com (Olivier Comas) Date: Mon, 11 Jan 2016 13:12:34 +0100 Subject: [vtkusers] VTK and QtQuick 2 Message-ID: <201601111212.u0BCCYnN009098@dms.nfrance.com> Hi everyone, I was wondering if anyone managed to integrate VTK and Qt Quick 2. I found this post: https://gist.github.com/nocnokneo/c3fb01bb7ecaf437f7d6 which gives an example of integration. And it works great with VTK 6.3. But using the OpenGL2 backend in 6.3 or using VTK 7.0 rc, it crashes in OpenGLInitState() at the first OpenGL call. Even a call to ?glEnable(GL_DEBUG_OUTPUT);? crashes. I checked the handle returned by wglGetCurrentContext() and it?s not NULL so it seems to have a valid OpenGL context. That would be awesome to be able to use the ?new? VTK rendering backend along with a GUI made with Qt Quick 2. I also found this post from Kitware: http://www.kitware.com/blog/home/post/688. If I understand correctly, ExternalVTKWidget seems to be a helper class for making it easier to use vtkExternalOpenGLRenderWindow, vtkExternalOpenGLRender and vtkExternalOpenGLCamera. But I could not find any working example. How is it supposed to be used? Could we use those classes in a class inheriting from QWindow so VTK can use the OpenGL context created by Qt? It is how those classes are intented to be used? Do you intend to release a QVTKQuickItem or QVTKWindow at some point? I know there is a QVTKWidget but there is nothing for Qt Quick. From my understanding, ExternalVTKWidget could be used for QtQuick integration. So do you intent to release a class to support QtQuick? An example on how to use ExternalVTKWidget would be great already. Any help would be greatly appreciated. Regards, Olivier -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Jan 11 09:17:36 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 11 Jan 2016 09:17:36 -0500 Subject: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file In-Reply-To: <7A18A422C44BE34E947C1F96625E60BD0895453B@EXDAG0-A1.intra.cea.fr> References: <7A18A422C44BE34E947C1F96625E60BD089512B6@EXDAG0-A1.intra.cea.fr> <7A18A422C44BE34E947C1F96625E60BD0895453B@EXDAG0-A1.intra.cea.fr> Message-ID: David, Have you made any progress on this issue? I can generate a Point Source in ParaView and save it to a PLY file. It saved the point locations just fine. By the way, ParaView uses the vtkPLYWriter to write points. I don't see anything odd in the reader that would cause me to think your points wouldn't get written. If you are still having trouble, could you post a self-contained .cxx file and CMakeLists.txt file? That will make it easier for us to diagnose what is going on. Thanks, Cory On Thu, Jan 7, 2016 at 11:44 AM, MOUSSAUD David 244079 wrote: > Yes it works, I have already success to generate one (without using vtk library). > After the line "end_header', you have to write line by line the 3 coordinates of the vertices and theirs RGB colors (3 more numbers) > You don't need to generate the faces if it is set to the 0 value in the header. > Best Regards, > > David MOUSSAUD > > ________________________________________ > De : Cory Quammen [cory.quammen at kitware.com] > Envoy? : jeudi 7 janvier 2016 16:58 > ? : MOUSSAUD David 244079 > Cc : vtkusers at vtk.org > Objet : Re: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file > > Hi David, > > Can you confirm that the PLY file format supports single-vertex cells > like this? My perusal of the PLY documentation didn't reveal anything. > > Thanks, > Cory > > On Thu, Jan 7, 2016 at 9:55 AM, MOUSSAUD David 244079 > wrote: >> Hi all, >> >> >> >> I've got a problem to generate a simple ply file with 4 vertices. >> >> Here how i proceed : >> >> >> >> // Setup points >> >> points = vtkSmartPointer::New(); >> >> >> // Setup the colors array >> >> colors = vtkSmartPointer::New(); >> >> colors->SetNumberOfComponents(3); >> >> colors->SetName("Colors"); >> >> >> // create a vertex >> >> vertex = vtkSmartPointer::New(); >> >> >> // list of all the vertices >> >> vertices= vtkSmartPointer::New(); >> >> >> /* Create a PLY Writer */ >> >> plyWriter = vtkSmartPointer::New(); >> >> >> // Create a polydata object and add everything to it >> >> polydata = vtkSmartPointer::New(); >> >> polydata->SetPoints(points); >> >> polydata->SetVerts(vertices); >> >> polydata->GetPointData()->SetScalars(colors); >> >> >> >> Then here how i create my vertices and how i set them : >> >> >> >> points->Resize(4); >> >> points->SetPoint(0, 0.0, 0.0, 0.0); >> >> points->SetPoint(1, 1.0, 0.0, 0.0); >> >> points->SetPoint(2, 0.0, 1.0, 0.0); >> >> points->SetPoint(3, 0.0, 0.0, 1.0); >> >> >> vertices->Initialize(); >> >> >> vertex->GetPointIds()->SetId(0,0); >> >> vertices->InsertNextCell(vertex); >> >> >> vertex->GetPointIds()->SetId(0,1); >> >> vertices->InsertNextCell(vertex); >> >> >> vertex->GetPointIds()->SetId(0,2); >> >> vertices->InsertNextCell(vertex); >> >> >> vertex->GetPointIds()->SetId(0,3); >> >> vertices->InsertNextCell(vertex); >> >> >> colors->Initialize(); >> >> colors->InsertNextTuple3(255,0,0); >> >> colors->InsertNextTuple3(0,255,0); >> >> colors->InsertNextTuple3(0,0,255); >> >> colors->InsertNextTuple3(255,255,255); >> >> >> >> QString plyFilePath = "output.ply"; >> >> >> std::string filename = plyFilePath.toStdString(); >> >> plyWriter->SetFileName(filename.c_str()); >> >> >> plyWriter->SetInputData(polydata); >> >> >> >> plyWriter->SetColorModeToUniformPointColor(); >> >> plyWriter->SetArrayName("Colors"); >> >> plyWriter->SetFileTypeToASCII(); >> >> plyWriter->Write(); >> >> >> >> I've checked that the 4 vertex are well displayed (cf screenshot). >> >> >> >> Unfortunately, my ply file shows 0 vertex. >> >> >> >> ply >> format ascii 1.0 >> comment VTK generated PLY File >> obj_info vtkPolyData points and polygons: vtk4.0 >> element vertex 0 >> property float x >> property float y >> property float z >> property uchar red >> property uchar green >> property uchar blue >> element face 0 >> property list uchar int vertex_indices >> end_header >> >> >> >> I'm using vtk 6.3. >> >> >> >> If someone has already meet this problem or know the solution ... >> >> >> >> Thanks for your time, >> >> Best regards, >> >> >> >> David MOUSSAUD. >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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. From gregory.baert at inserm.fr Mon Jan 11 10:50:59 2016 From: gregory.baert at inserm.fr (Mercusyo) Date: Mon, 11 Jan 2016 08:50:59 -0700 (MST) Subject: [vtkusers] Use vtkDistanceWidget with dicom series Message-ID: <1452527459805-5735911.post@n5.nabble.com> Hello, I use a vtkDistanceWidget in a dicom series files. It works with the code : m_HandleDistance = vtkPointHandleRepresentation2D::New(); m_HandleDistance->GetProperty()->SetColor(1.0, 0.0, 0.0); // Red m_DistanceRep = vtkDistanceRepresentation2D::New(); m_DistanceRep->SetHandleRepresentation(m_HandleDistance); m_DistanceWidget = vtkDistanceWidget::New(); m_DistanceWidget->SetInteractor(vtkWindow1->GetInteractor()); m_DistanceWidget->SetRepresentation(m_DistanceRep); static_cast(m_DistanceWidget->GetRepresentation())->SetLabelFormat("%-#6.3g mm"); m_DistanceWidget->On(); In runtime, the distance is visible in all the slices of the series ... Thanks, Best regards, -- View this message in context: http://vtk.1045678.n5.nabble.com/Use-vtkDistanceWidget-with-dicom-series-tp5735911.html Sent from the VTK - Users mailing list archive at Nabble.com. From David.MOUSSAUD at cea.fr Mon Jan 11 11:13:35 2016 From: David.MOUSSAUD at cea.fr (MOUSSAUD David 244079) Date: Mon, 11 Jan 2016 16:13:35 +0000 Subject: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file In-Reply-To: References: <7A18A422C44BE34E947C1F96625E60BD089512B6@EXDAG0-A1.intra.cea.fr> <7A18A422C44BE34E947C1F96625E60BD0895453B@EXDAG0-A1.intra.cea.fr>, Message-ID: <7A18A422C44BE34E947C1F96625E60BD0895B1EE@EXDAG0-A1.intra.cea.fr> Hello, No, due to project time constraint, i had to implement my method to generate the PLY file. By the way, the stlWriter works very well. It uses the same vtkPolyData that my plyWriter. stlWriter->SetFileName(filename.c_str()); stlWriter->SetInputData(polydata); stlWriter->SetFileTypeToBinary(); stlWriter->Write(); I have a small example that figure out that problem but it is based on Qt widgets and qmake. Are you interested in ? Otherwise, maybe you could enhance the examples for C++ that shows how a plyWriter can be used with a vtkPolyData ? Best regards, David. ________________________________________ De : Cory Quammen [cory.quammen at kitware.com] Envoy? : lundi 11 janvier 2016 15:17 ? : MOUSSAUD David 244079 Cc : vtkusers at vtk.org Objet : Re: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file David, Have you made any progress on this issue? I can generate a Point Source in ParaView and save it to a PLY file. It saved the point locations just fine. By the way, ParaView uses the vtkPLYWriter to write points. I don't see anything odd in the reader that would cause me to think your points wouldn't get written. If you are still having trouble, could you post a self-contained .cxx file and CMakeLists.txt file? That will make it easier for us to diagnose what is going on. Thanks, Cory On Thu, Jan 7, 2016 at 11:44 AM, MOUSSAUD David 244079 wrote: > Yes it works, I have already success to generate one (without using vtk library). > After the line "end_header', you have to write line by line the 3 coordinates of the vertices and theirs RGB colors (3 more numbers) > You don't need to generate the faces if it is set to the 0 value in the header. > Best Regards, > > David MOUSSAUD > > ________________________________________ > De : Cory Quammen [cory.quammen at kitware.com] > Envoy? : jeudi 7 janvier 2016 16:58 > ? : MOUSSAUD David 244079 > Cc : vtkusers at vtk.org > Objet : Re: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file > > Hi David, > > Can you confirm that the PLY file format supports single-vertex cells > like this? My perusal of the PLY documentation didn't reveal anything. > > Thanks, > Cory > > On Thu, Jan 7, 2016 at 9:55 AM, MOUSSAUD David 244079 > wrote: >> Hi all, >> >> >> >> I've got a problem to generate a simple ply file with 4 vertices. >> >> Here how i proceed : >> >> >> >> // Setup points >> >> points = vtkSmartPointer::New(); >> >> >> // Setup the colors array >> >> colors = vtkSmartPointer::New(); >> >> colors->SetNumberOfComponents(3); >> >> colors->SetName("Colors"); >> >> >> // create a vertex >> >> vertex = vtkSmartPointer::New(); >> >> >> // list of all the vertices >> >> vertices= vtkSmartPointer::New(); >> >> >> /* Create a PLY Writer */ >> >> plyWriter = vtkSmartPointer::New(); >> >> >> // Create a polydata object and add everything to it >> >> polydata = vtkSmartPointer::New(); >> >> polydata->SetPoints(points); >> >> polydata->SetVerts(vertices); >> >> polydata->GetPointData()->SetScalars(colors); >> >> >> >> Then here how i create my vertices and how i set them : >> >> >> >> points->Resize(4); >> >> points->SetPoint(0, 0.0, 0.0, 0.0); >> >> points->SetPoint(1, 1.0, 0.0, 0.0); >> >> points->SetPoint(2, 0.0, 1.0, 0.0); >> >> points->SetPoint(3, 0.0, 0.0, 1.0); >> >> >> vertices->Initialize(); >> >> >> vertex->GetPointIds()->SetId(0,0); >> >> vertices->InsertNextCell(vertex); >> >> >> vertex->GetPointIds()->SetId(0,1); >> >> vertices->InsertNextCell(vertex); >> >> >> vertex->GetPointIds()->SetId(0,2); >> >> vertices->InsertNextCell(vertex); >> >> >> vertex->GetPointIds()->SetId(0,3); >> >> vertices->InsertNextCell(vertex); >> >> >> colors->Initialize(); >> >> colors->InsertNextTuple3(255,0,0); >> >> colors->InsertNextTuple3(0,255,0); >> >> colors->InsertNextTuple3(0,0,255); >> >> colors->InsertNextTuple3(255,255,255); >> >> >> >> QString plyFilePath = "output.ply"; >> >> >> std::string filename = plyFilePath.toStdString(); >> >> plyWriter->SetFileName(filename.c_str()); >> >> >> plyWriter->SetInputData(polydata); >> >> >> >> plyWriter->SetColorModeToUniformPointColor(); >> >> plyWriter->SetArrayName("Colors"); >> >> plyWriter->SetFileTypeToASCII(); >> >> plyWriter->Write(); >> >> >> >> I've checked that the 4 vertex are well displayed (cf screenshot). >> >> >> >> Unfortunately, my ply file shows 0 vertex. >> >> >> >> ply >> format ascii 1.0 >> comment VTK generated PLY File >> obj_info vtkPolyData points and polygons: vtk4.0 >> element vertex 0 >> property float x >> property float y >> property float z >> property uchar red >> property uchar green >> property uchar blue >> element face 0 >> property list uchar int vertex_indices >> end_header >> >> >> >> I'm using vtk 6.3. >> >> >> >> If someone has already meet this problem or know the solution ... >> >> >> >> Thanks for your time, >> >> Best regards, >> >> >> >> David MOUSSAUD. >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 cory.quammen at kitware.com Mon Jan 11 11:17:11 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 11 Jan 2016 11:17:11 -0500 Subject: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file In-Reply-To: <7A18A422C44BE34E947C1F96625E60BD0895B1EE@EXDAG0-A1.intra.cea.fr> References: <7A18A422C44BE34E947C1F96625E60BD089512B6@EXDAG0-A1.intra.cea.fr> <7A18A422C44BE34E947C1F96625E60BD0895453B@EXDAG0-A1.intra.cea.fr> <7A18A422C44BE34E947C1F96625E60BD0895B1EE@EXDAG0-A1.intra.cea.fr> Message-ID: An example with Qt would be fine. Thanks, Cory On Mon, Jan 11, 2016 at 11:13 AM, MOUSSAUD David 244079 wrote: > Hello, > > No, due to project time constraint, i had to implement my method to generate > the PLY file. > By the way, the stlWriter works very well. It uses the same vtkPolyData that > my plyWriter. > > stlWriter->SetFileName(filename.c_str()); > stlWriter->SetInputData(polydata); > stlWriter->SetFileTypeToBinary(); > stlWriter->Write(); > > I have a small example that figure out that problem but it is based on Qt > widgets and qmake. Are you interested in ? > Otherwise, maybe you could enhance the examples for C++ that shows how a > plyWriter can be used with a vtkPolyData ? > > Best regards, > David. > > > ________________________________________ > De : Cory Quammen [cory.quammen at kitware.com] > Envoy? : lundi 11 janvier 2016 15:17 > > > ? : MOUSSAUD David 244079 > Cc : vtkusers at vtk.org > Objet : Re: [vtkusers] vtkPLYWriter : vertices are not generated in a the > PLY file > > David, > > Have you made any progress on this issue? > > I can generate a Point Source in ParaView and save it to a PLY file. > It saved the point locations just fine. By the way, ParaView uses the > vtkPLYWriter to write points. > > I don't see anything odd in the reader that would cause me to think > your points wouldn't get written. > > If you are still having trouble, could you post a self-contained .cxx > file and CMakeLists.txt file? That will make it easier for us to > diagnose what is going on. > > Thanks, > Cory > > On Thu, Jan 7, 2016 at 11:44 AM, MOUSSAUD David 244079 > wrote: >> Yes it works, I have already success to generate one (without using vtk >> library). >> After the line "end_header', you have to write line by line the 3 >> coordinates of the vertices and theirs RGB colors (3 more numbers) >> You don't need to generate the faces if it is set to the 0 value in the >> header. >> Best Regards, >> >> David MOUSSAUD >> >> ________________________________________ >> De : Cory Quammen [cory.quammen at kitware.com] >> Envoy? : jeudi 7 janvier 2016 16:58 >> ? : MOUSSAUD David 244079 >> Cc : vtkusers at vtk.org >> Objet : Re: [vtkusers] vtkPLYWriter : vertices are not generated in a the >> PLY file >> >> Hi David, >> >> Can you confirm that the PLY file format supports single-vertex cells >> like this? My perusal of the PLY documentation didn't reveal anything. >> >> Thanks, >> Cory >> >> On Thu, Jan 7, 2016 at 9:55 AM, MOUSSAUD David 244079 >> wrote: >>> Hi all, >>> >>> >>> >>> I've got a problem to generate a simple ply file with 4 vertices. >>> >>> Here how i proceed : >>> >>> >>> >>> // Setup points >>> >>> points = vtkSmartPointer::New(); >>> >>> >>> // Setup the colors array >>> >>> colors = vtkSmartPointer::New(); >>> >>> colors->SetNumberOfComponents(3); >>> >>> colors->SetName("Colors"); >>> >>> >>> // create a vertex >>> >>> vertex = vtkSmartPointer::New(); >>> >>> >>> // list of all the vertices >>> >>> vertices= vtkSmartPointer::New(); >>> >>> >>> /* Create a PLY Writer */ >>> >>> plyWriter = vtkSmartPointer::New(); >>> >>> >>> // Create a polydata object and add everything to it >>> >>> polydata = vtkSmartPointer::New(); >>> >>> polydata->SetPoints(points); >>> >>> polydata->SetVerts(vertices); >>> >>> polydata->GetPointData()->SetScalars(colors); >>> >>> >>> >>> Then here how i create my vertices and how i set them : >>> >>> >>> >>> points->Resize(4); >>> >>> points->SetPoint(0, 0.0, 0.0, 0.0); >>> >>> points->SetPoint(1, 1.0, 0.0, 0.0); >>> >>> points->SetPoint(2, 0.0, 1.0, 0.0); >>> >>> points->SetPoint(3, 0.0, 0.0, 1.0); >>> >>> >>> vertices->Initialize(); >>> >>> >>> vertex->GetPointIds()->SetId(0,0); >>> >>> vertices->InsertNextCell(vertex); >>> >>> >>> vertex->GetPointIds()->SetId(0,1); >>> >>> vertices->InsertNextCell(vertex); >>> >>> >>> vertex->GetPointIds()->SetId(0,2); >>> >>> vertices->InsertNextCell(vertex); >>> >>> >>> vertex->GetPointIds()->SetId(0,3); >>> >>> vertices->InsertNextCell(vertex); >>> >>> >>> colors->Initialize(); >>> >>> colors->InsertNextTuple3(255,0,0); >>> >>> colors->InsertNextTuple3(0,255,0); >>> >>> colors->InsertNextTuple3(0,0,255); >>> >>> colors->InsertNextTuple3(255,255,255); >>> >>> >>> >>> QString plyFilePath = "output.ply"; >>> >>> >>> std::string filename = plyFilePath.toStdString(); >>> >>> plyWriter->SetFileName(filename.c_str()); >>> >>> >>> plyWriter->SetInputData(polydata); >>> >>> >>> >>> plyWriter->SetColorModeToUniformPointColor(); >>> >>> plyWriter->SetArrayName("Colors"); >>> >>> plyWriter->SetFileTypeToASCII(); >>> >>> plyWriter->Write(); >>> >>> >>> >>> I've checked that the 4 vertex are well displayed (cf screenshot). >>> >>> >>> >>> Unfortunately, my ply file shows 0 vertex. >>> >>> >>> >>> ply >>> format ascii 1.0 >>> comment VTK generated PLY File >>> obj_info vtkPolyData points and polygons: vtk4.0 >>> element vertex 0 >>> property float x >>> property float y >>> property float z >>> property uchar red >>> property uchar green >>> property uchar blue >>> element face 0 >>> property list uchar int vertex_indices >>> end_header >>> >>> >>> >>> I'm using vtk 6.3. >>> >>> >>> >>> If someone has already meet this problem or know the solution ... >>> >>> >>> >>> Thanks for your time, >>> >>> Best regards, >>> >>> >>> >>> David MOUSSAUD. >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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. -- Cory Quammen R&D Engineer Kitware, Inc. From newcfd at yahoo.com Mon Jan 11 11:23:39 2016 From: newcfd at yahoo.com (newcfd) Date: Mon, 11 Jan 2016 09:23:39 -0700 (MST) Subject: [vtkusers] vtk linking errors on Ubuntu Message-ID: <1452529419736-5735914.post@n5.nabble.com> VTK 6.3 is compiled without MPI. Following error messages showed up in my application undefined reference to `vtkIOMPIImage_AutoInit_Destruct()' undefined reference to `vtkIOMPIParallel_AutoInit_Construct()' undefined reference to `vtkIOMPIParallel_AutoInit_Destruct()' undefined reference to `vtkIOMPIImage_AutoInit_Construct()' I am using Ubuntu 14.04.3 LTS and Linux 3.19.0-43-generic No issue on Windows. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-linking-errors-on-Ubuntu-tp5735914.html Sent from the VTK - Users mailing list archive at Nabble.com. From newcfd at yahoo.com Mon Jan 11 13:14:54 2016 From: newcfd at yahoo.com (newcfd) Date: Mon, 11 Jan 2016 11:14:54 -0700 (MST) Subject: [vtkusers] vtk linking errors on Ubuntu In-Reply-To: <1452529419736-5735914.post@n5.nabble.com> References: <1452529419736-5735914.post@n5.nabble.com> Message-ID: <1452536094382-5735915.post@n5.nabble.com> I can recompile vtk with addition of the two modules vtkIOMPIImage and vtkIOMPIParallel to solve the problem. But it should not be necessary, right? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-linking-errors-on-Ubuntu-tp5735914p5735915.html Sent from the VTK - Users mailing list archive at Nabble.com. From simonp at fullspectrumsw.com Mon Jan 11 15:02:28 2016 From: simonp at fullspectrumsw.com (Simon Pogrebinsky) Date: Mon, 11 Jan 2016 15:02:28 -0500 Subject: [vtkusers] 2D vtkDistanceWidge on 3D view Message-ID: <2E21E23D7AFCAF4A8D5E66585128FAD5E585E6@sydney.fullspectrumsw.com> I need to use vtkDistanceWidget while doing 2D measurements on 3D view. (the widget shouldn't be rotated with 3D image) Any help will be greatly appreciated. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Tue Jan 12 04:15:39 2016 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Tue, 12 Jan 2016 10:15:39 +0100 Subject: [vtkusers] qcombobox as a child of qvtkwidget doesn't show up on mac. In-Reply-To: References: Message-ID: Hello, Sorry I got no time to give you a full example but this http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/TexturedButtonWidget As well as this class vtkEventQtSlotConnect should point you to the right direction, just connect the button widget vtkCommand::StateChangedEvent to a slot and popup the menu inside the slot : vtkButtonWidget* l_button_widget = vtkButtonWidget::New(); // Configure the button widget here, create a representation, map it to a Viewport vtkEventQtSlotConnect* l_connection = vtkEventQtSlotConnect::New(); l_connection->Connect( l_button_widget, vtkCommand::StateChangedEvent, this, SLOT( update() ) ); Something like this Good luck, sorry for the late reply Simon 2016-01-06 1:06 GMT+01:00 rakesh patil : > Hi Simon, > > Thank you for the reply. Can you point me to some links to examples > related to this (texture button for popup) ? > > Thanks > > > On Tuesday, January 5, 2016, Simon ESNEAULT > wrote: > >> Hello, >> >> Well from my experience, it's is not easy to draw a qt widget on top of a >> QVTKWidget, especially on OSX. >> You can try to add some Qt flags (Qt::Tool or Qt::WindowStaysOnTopHint) >> to the combobox. This may or not work, depending the version of Qt you're >> running, and it may also introduce some weird behavior ... >> >> I would rather advice you put the widget beside the QVTKWidget, in a >> vertical/horizontal layout, or you use some of VTK widget if you really >> want to draw within the view (use a TextureButton together with a qt popup >> menu for example) >> >> Good luck >> Simon >> >> 2016-01-05 18:52 GMT+01:00 rakesh patil : >> >>> Hello, >>> >>> I have derived my own class from QVTKwidget class. In the constructor of >>> the class I am creating a combo box whose parent will be QVTKwidget. >>> Example: >>> >>> Class mywidget : public QVTKwidget >>> { >>> public: >>> mywidget (); >>> }; >>> >>> mywidget::mywidget () >>> { >>> ... >>> ... >>> >>> mycombo = new QCombobox (this); >>> mycombo->setGeometry (0, 0, width, height); >>> ... >>> } >>> >>> on MAC, the combo box appears below QVTKwidget and all vtk objects are >>> rendered on top of the combo box, thus hiding it behind QVTKwidget. I need >>> the combo box to appear above(on top of) QVTKwidget at top left corner. Can >>> anyone help me to overcome this problem. ? >>> >>> Thanks >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakopoulos at gmail.com Tue Jan 12 05:34:50 2016 From: dakopoulos at gmail.com (dakopoulos) Date: Tue, 12 Jan 2016 03:34:50 -0700 (MST) Subject: [vtkusers] vtkDistanceWidget behaviour In-Reply-To: <1434941807553-5732469.post@n5.nabble.com> References: <1409138652869-5728444.post@n5.nabble.com> <1409212178656-5728476.post@n5.nabble.com> <1434941807553-5732469.post@n5.nabble.com> Message-ID: <1452594890884-5735920.post@n5.nabble.com> A little old thread but I just had the same question.. SetWidgetStateToStart() -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDistanceWidget-behaviour-tp5728444p5735920.html Sent from the VTK - Users mailing list archive at Nabble.com. From rickfrank at me.com Tue Jan 12 08:32:54 2016 From: rickfrank at me.com (Richard Frank) Date: Tue, 12 Jan 2016 08:32:54 -0500 Subject: [vtkusers] Use vtkDistanceWidget with dicom series In-Reply-To: References: Message-ID: <7963AA3A-7A62-46EA-8E41-37EBABCAC249@me.com> I am trying to do the same thing - that is, use the vtkdistance measure tool so that it stays facing the camera like a vtkfollower - and only use a parallel projection. The documentation says that the VTK distance to the representation will stay in the upper layer, but I guess it's really only valid for 2D? The VTK measure distance widget seems to always behave in a 3-D fashion. Our client finds the placing of the widget difficult in 3-D, or perhaps I should say confusing, once they move the camera around the widget is floating in space somewhere. If anyone knows a way to change the behavior of the widget let me know.... Thanks Rick > Message: 9 > Date: Mon, 11 Jan 2016 08:50:59 -0700 (MST) > From: Mercusyo > To: vtkusers at vtk.org > Subject: [vtkusers] Use vtkDistanceWidget with dicom series > Message-ID: <1452527459805-5735911.post at n5.nabble.com> > Content-Type: text/plain; charset=us-ascii > > Hello, > > I use a vtkDistanceWidget in a dicom series files. It works with the code : > > m_HandleDistance = vtkPointHandleRepresentation2D::New(); > m_HandleDistance->GetProperty()->SetColor(1.0, 0.0, 0.0); // Red > m_DistanceRep = vtkDistanceRepresentation2D::New(); > m_DistanceRep->SetHandleRepresentation(m_HandleDistance); > m_DistanceWidget = vtkDistanceWidget::New(); > m_DistanceWidget->SetInteractor(vtkWindow1->GetInteractor()); > m_DistanceWidget->SetRepresentation(m_DistanceRep); > static_cast *>(m_DistanceWidget->GetRepresentation())->SetLabelFormat("%-#6.3g mm"); > m_DistanceWidget->On(); > > In runtime, the distance is visible in all the slices of the series ... > > Thanks, > > Best regards, > > From berk.geveci at kitware.com Tue Jan 12 10:46:35 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 12 Jan 2016 10:46:35 -0500 Subject: [vtkusers] Fwd: [hpdav-pc] extended submission deadline: IPDPS workshop High Performance Data Analysis and Visualization 2016 In-Reply-To: <56942E39.1040907@lbl.gov> References: <56942E39.1040907@lbl.gov> Message-ID: ---------- Forwarded message ---------- From: Wes Bethel Date: Mon, Jan 11, 2016 at 5:35 PM Subject: [hpdav-pc] extended submission deadline: IPDPS workshop High Performance Data Analysis and Visualization 2016 To: hpdav-pc at lists.lbl.gov Apologies if you receive multiple copies of this notice, it is being cross-posted to multiple lists. Summary: the submission date for papers is being extended two weeks, to 25 Jan 2016, 23:59AOE. See below for more information. ____________________________________________________________________________________ HPDAV 2016 Call for papers ____________________________________________________________________________________ The workshop on High Performance Data Analysis and Visualization (HPDAV) 2016 http://vis.lbl.gov/Events/HPDAV-IPDPS-2016/ May 23, 2016 To be held in conjunction with 30th IEEE International Parallel and Distributed Processing Symposium http://www.ipdps.org/ May 23-26, 2016 Chicago Hyatt Regency, Chicago, Illinois, USA Important Dates ____________________________________________________________________________________ Paper Submission: (new date) 25 Jan 2016, 23:59 AOE Author Notification: (new date) 12 Feb 2016 Camera-Ready: 21 Feb 2016, 23:59 AOE Workshop Scope and Goals ____________________________________________________________________________________ While the purpose of visualization and analysis is insight, realizing that objective requires solving complex problems related to crafting or adapting algorithms and applications to take advantage of evolving architectures, and to solve increasingly complex data understanding problems for ever larger and more complex data. These architectures, and the systems from which they are built, have increasingly deep memory hierarchies, increasing concurrency, decreasing relative per-core/per-node I/O capacity, lessening memory per core, are increasingly prone to failures, and face power limitations. The purpose of this workshop is to bring together researchers, engineers, and architects of data-intensive computing technologies, which span visualization, analysis, and data management, to present and discuss research topics germane to high performance data analysis and visualization. Specifically, this workshop focuses on research topics related to adapting/creating algorithms, technologies, and applications for use on emerging computational architectures and platforms. The workshop format includes traditional research papers (8-10 pages) for in-depth topics, short papers (4 pages) for works in progress, and a panel discussion. Proceedings of the workshops are distributed at the conference and are submitted for inclusion in the IEEE Xplore Digital Library after the conference. We invite papers on original, unpublished research in the following topic areas under the general umbrella of high performance visualization and analysis: - Increasing concurrency at the node level, and at the systemwide level. - Optimizations for improving performance, e.g., decreasing runtime, leveraging a deepening memory hierarchy, reducing data movement, reducing power consumption. - Applications of visualization and analysis, where there is a strong thematic element related to being able to solve a larger or more complex problem because of algorithmic or design advances that take advantage of increasing concurrency, architectural features, etc. - Data analysis and/or visualization systems/designs/architectures having an emphasis upon scalability, resilience, high-throughput/high-capacity, and that are able to take advantage of emerging architectures. Paper submission guidelines: see http://vis.lbl.gov/Events/HPDAV-IPDPS-2016 Program Committee ____________________________________________________________________________________ Jeff Baumes, Kitware Janine Bennett, Sandia National Laboratory Wes Bethel, Lawrence Berkeley National Laboratory Randall Frank, Applied Research Associates Kelly Gaither, Texas Advanced Computing Center Christoph Garth, University of Kaiserslautern Berk Geveci, Kitware Pat McCormick, Los Alamos National Laboratory Vijay Natarajan, Indian Institute of Science Paul Navratil, Texas Advanced Computing Center Sang-Yun Oh, University of California -- Santa Barbara Rob Ross, Argonne National Laboratory Yogesh Simmhan, Indian Institute of Science Venkat Vishwanath, Argonne National Laboratory Johann Won, Seoul National University John Wu, Lawrence Berkeley National Laboratory -- Wes Bethel -- voice (510) 486-7353 -- fax (510) 486-5812 -- vis.lbl.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.spasyuk at gmail.com Tue Jan 12 11:40:08 2016 From: denis.spasyuk at gmail.com (deonis) Date: Tue, 12 Jan 2016 09:40:08 -0700 (MST) Subject: [vtkusers] vtkAreaPicker, select a bunch of glyth speres and extract them into another actor, python Message-ID: <1452616808100-5735924.post@n5.nabble.com> Hell all, I am looking for a method to select a bunch of glyph objects (spheres) using vtkAreaPicker and then extract those spheres into another actor. The goal is to pick an object, move it to another actor and highlight it. I cannot seem to find any python example of this operation. Here is my interactor class: class MyInteractorStyle(vtk.vtkInteractorStyleRubberBandPick): def __init__(self,parent=None): self.AddObserver("MiddleButtonPressEvent",self.middleButtonPressEvent) self.AddObserver("RightButtonPressEvent",self.RightButtonPressEvent) self.AddObserver("MiddleButtonReleaseEvent",self.middleButtonReleaseEvent) self.AddObserver("LeftButtonReleaseEvent",self.OnLeftButtonUpEvent) self.AddObserver("LeftButtonDownEvent",self.OnLeftButtonDownEvent) def OnLeftButtonDownEvent(self,obj,event): print("Left Button pressed") self.OnLeftButtonDown() def OnLeftButtonUpEvent(self,obj,event): print("Left Button pressed") self.SelectedMapper = vtk.vtkDataSetMapper() self.SelectedActor = vtk.vtkActor() self.SelectedActor.SetMapper(self.SelectedMapper) self.OnLeftButtonUp() frustum=self.GetInteractor().GetPicker().GetFrustum() extractGeometry = vtk.vtkExtractPolyDataGeometry() extractGeometry.SetImplicitFunction(frustum) extractGeometry.SetInputData(polydata) extractGeometry.Update() print(extractGeometry.GetOutput().GetNumberOfCells()) self.SelectedMapper.SetInputConnection(extractGeometry.GetOutputPort()) self.SelectedMapper.ScalarVisibilityOff() self.SelectedActor.GetProperty().SetColor(1.0, 0.0, 0.0); #(R,G,B) self.SelectedActor.GetProperty().SetPointSize(5) any help appreciated!, cheers, Denis -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkAreaPicker-select-a-bunch-of-glyth-speres-and-extract-them-into-another-actor-python-tp5735924.html Sent from the VTK - Users mailing list archive at Nabble.com. From David.MOUSSAUD at cea.fr Tue Jan 12 11:50:41 2016 From: David.MOUSSAUD at cea.fr (MOUSSAUD David 244079) Date: Tue, 12 Jan 2016 16:50:41 +0000 Subject: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file In-Reply-To: References: <7A18A422C44BE34E947C1F96625E60BD089512B6@EXDAG0-A1.intra.cea.fr> <7A18A422C44BE34E947C1F96625E60BD0895453B@EXDAG0-A1.intra.cea.fr> <7A18A422C44BE34E947C1F96625E60BD0895B1EE@EXDAG0-A1.intra.cea.fr> Message-ID: <7A18A422C44BE34E947C1F96625E60BD0895E7FF@EXDAG0-A1.intra.cea.fr> Here are the files ! Just change the path to the VTK libs. Best regards, David -----Message d'origine----- De?: Cory Quammen [mailto:cory.quammen at kitware.com] Envoy??: lundi 11 janvier 2016 17:17 ??: MOUSSAUD David 244079 Cc?: vtkusers at vtk.org Objet?: Re: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY file An example with Qt would be fine. Thanks, Cory On Mon, Jan 11, 2016 at 11:13 AM, MOUSSAUD David 244079 wrote: > Hello, > > No, due to project time constraint, i had to implement my method to > generate the PLY file. > By the way, the stlWriter works very well. It uses the same > vtkPolyData that my plyWriter. > > stlWriter->SetFileName(filename.c_str()); > stlWriter->SetInputData(polydata); > stlWriter->SetFileTypeToBinary(); > stlWriter->Write(); > > I have a small example that figure out that problem but it is based on > Qt widgets and qmake. Are you interested in ? > Otherwise, maybe you could enhance the examples for C++ that shows how > a plyWriter can be used with a vtkPolyData ? > > Best regards, > David. > > > ________________________________________ > De : Cory Quammen [cory.quammen at kitware.com] Envoy? : lundi 11 janvier > 2016 15:17 > > > ? : MOUSSAUD David 244079 > Cc : vtkusers at vtk.org > Objet : Re: [vtkusers] vtkPLYWriter : vertices are not generated in a > the PLY file > > David, > > Have you made any progress on this issue? > > I can generate a Point Source in ParaView and save it to a PLY file. > It saved the point locations just fine. By the way, ParaView uses the > vtkPLYWriter to write points. > > I don't see anything odd in the reader that would cause me to think > your points wouldn't get written. > > If you are still having trouble, could you post a self-contained .cxx > file and CMakeLists.txt file? That will make it easier for us to > diagnose what is going on. > > Thanks, > Cory > > On Thu, Jan 7, 2016 at 11:44 AM, MOUSSAUD David 244079 > wrote: >> Yes it works, I have already success to generate one (without using >> vtk library). >> After the line "end_header', you have to write line by line the 3 >> coordinates of the vertices and theirs RGB colors (3 more numbers) >> You don't need to generate the faces if it is set to the 0 value in >> the header. >> Best Regards, >> >> David MOUSSAUD >> >> ________________________________________ >> De : Cory Quammen [cory.quammen at kitware.com] Envoy? : jeudi 7 janvier >> 2016 16:58 ? : MOUSSAUD David 244079 Cc : vtkusers at vtk.org Objet : >> Re: [vtkusers] vtkPLYWriter : vertices are not generated in a the PLY >> file >> >> Hi David, >> >> Can you confirm that the PLY file format supports single-vertex cells >> like this? My perusal of the PLY documentation didn't reveal anything. >> >> Thanks, >> Cory >> >> On Thu, Jan 7, 2016 at 9:55 AM, MOUSSAUD David 244079 >> wrote: >>> Hi all, >>> >>> >>> >>> I've got a problem to generate a simple ply file with 4 vertices. >>> >>> Here how i proceed : >>> >>> >>> >>> // Setup points >>> >>> points = vtkSmartPointer::New(); >>> >>> >>> // Setup the colors array >>> >>> colors = vtkSmartPointer::New(); >>> >>> colors->SetNumberOfComponents(3); >>> >>> colors->SetName("Colors"); >>> >>> >>> // create a vertex >>> >>> vertex = vtkSmartPointer::New(); >>> >>> >>> // list of all the vertices >>> >>> vertices= vtkSmartPointer::New(); >>> >>> >>> /* Create a PLY Writer */ >>> >>> plyWriter = vtkSmartPointer::New(); >>> >>> >>> // Create a polydata object and add everything to it >>> >>> polydata = vtkSmartPointer::New(); >>> >>> polydata->SetPoints(points); >>> >>> polydata->SetVerts(vertices); >>> >>> polydata->GetPointData()->SetScalars(colors); >>> >>> >>> >>> Then here how i create my vertices and how i set them : >>> >>> >>> >>> points->Resize(4); >>> >>> points->SetPoint(0, 0.0, 0.0, 0.0); >>> >>> points->SetPoint(1, 1.0, 0.0, 0.0); >>> >>> points->SetPoint(2, 0.0, 1.0, 0.0); >>> >>> points->SetPoint(3, 0.0, 0.0, 1.0); >>> >>> >>> vertices->Initialize(); >>> >>> >>> vertex->GetPointIds()->SetId(0,0); >>> >>> vertices->InsertNextCell(vertex); >>> >>> >>> vertex->GetPointIds()->SetId(0,1); >>> >>> vertices->InsertNextCell(vertex); >>> >>> >>> vertex->GetPointIds()->SetId(0,2); >>> >>> vertices->InsertNextCell(vertex); >>> >>> >>> vertex->GetPointIds()->SetId(0,3); >>> >>> vertices->InsertNextCell(vertex); >>> >>> >>> colors->Initialize(); >>> >>> colors->InsertNextTuple3(255,0,0); >>> >>> colors->InsertNextTuple3(0,255,0); >>> >>> colors->InsertNextTuple3(0,0,255); >>> >>> colors->InsertNextTuple3(255,255,255); >>> >>> >>> >>> QString plyFilePath = "output.ply"; >>> >>> >>> std::string filename = plyFilePath.toStdString(); >>> >>> plyWriter->SetFileName(filename.c_str()); >>> >>> >>> plyWriter->SetInputData(polydata); >>> >>> >>> >>> plyWriter->SetColorModeToUniformPointColor(); >>> >>> plyWriter->SetArrayName("Colors"); >>> >>> plyWriter->SetFileTypeToASCII(); >>> >>> plyWriter->Write(); >>> >>> >>> >>> I've checked that the 4 vertex are well displayed (cf screenshot). >>> >>> >>> >>> Unfortunately, my ply file shows 0 vertex. >>> >>> >>> >>> ply >>> format ascii 1.0 >>> comment VTK generated PLY File >>> obj_info vtkPolyData points and polygons: vtk4.0 element vertex 0 >>> property float x property float y property float z property uchar >>> red property uchar green property uchar blue element face 0 property >>> list uchar int vertex_indices end_header >>> >>> >>> >>> I'm using vtk 6.3. >>> >>> >>> >>> If someone has already meet this problem or know the solution ... >>> >>> >>> >>> Thanks for your time, >>> >>> Best regards, >>> >>> >>> >>> David MOUSSAUD. >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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. -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: main.cpp URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: qvtkwidgetrendu3d.cpp URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: qvtkwidgetrendu3d.h URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkQt2.pro Type: application/octet-stream Size: 916 bytes Desc: vtkQt2.pro URL: From newcfd at yahoo.com Tue Jan 12 12:26:57 2016 From: newcfd at yahoo.com (newcfd) Date: Tue, 12 Jan 2016 10:26:57 -0700 (MST) Subject: [vtkusers] Problem with vtk STL reader Message-ID: <1452619617408-5735926.post@n5.nabble.com> Does vtk STL reader check key word "Color" (not "Solid" ) in a STL file? line 354 in vtkSTLReader.cxx if ((strcmp(line, "COLOR") == 0) || (strcmp(line, "color") == 0)) All STL files I have start with "solid" not "color". -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-vtk-STL-reader-tp5735926.html Sent from the VTK - Users mailing list archive at Nabble.com. From dennisnguy at yahoo.com Tue Jan 12 16:16:59 2016 From: dennisnguy at yahoo.com (dieutan) Date: Tue, 12 Jan 2016 14:16:59 -0700 (MST) Subject: [vtkusers] Migrate from VTK 4.2 to 7.0, supporting functions and libraries In-Reply-To: References: <1450476059781-5735590.post@n5.nabble.com> <1451325809547-5735662.post@n5.nabble.com> Message-ID: <1452633419356-5735927.post@n5.nabble.com> Hi D?enan, Thanks for the information. I can build my application with VTK version 5.10.1. I'm trying to integrate and build my application with VTK version 6.3. I'm including VTK header and library files one at a time. Cheer, Dennis -- View this message in context: http://vtk.1045678.n5.nabble.com/Migrate-from-VTK-4-2-to-7-0-supporting-functions-and-libraries-tp5735590p5735927.html Sent from the VTK - Users mailing list archive at Nabble.com. From newcfd at yahoo.com Tue Jan 12 18:12:43 2016 From: newcfd at yahoo.com (newcfd) Date: Tue, 12 Jan 2016 16:12:43 -0700 (MST) Subject: [vtkusers] memory leak in vtk-6.3 Message-ID: <1452640363144-5735928.post@n5.nabble.com> ==4393== 3,384 (56 direct, 3,328 indirect) bytes in 1 blocks are definitely lost in loss record 456 of 533 ==4393== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==4393== by 0x25B987CC: ??? (in /usr/lib/x86_64-linux-gnu/dri/i915_dri.so) ==4393== by 0x115546AC: ??? (in /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0) ==4393== by 0x11551477: ??? (in /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0) ==4393== by 0x115558F2: ??? (in /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0) ==4393== by 0x1153012B: glXMakeContextCurrent (in /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0) ==4393== by 0x8A1E858: vtkXOpenGLRenderWindow::MakeCurrent() (vtkXOpenGLRenderWindow.cxx:1360) ==4393== by 0x8A1DD4B: vtkXOpenGLRenderWindow::WindowInitialize() (vtkXOpenGLRenderWindow.cxx:1042) ==4393== by 0x8A1DE06: vtkXOpenGLRenderWindow::Initialize() (vtkXOpenGLRenderWindow.cxx:1062) ==4393== by 0x8A1E24C: vtkXOpenGLRenderWindow::Start() (vtkXOpenGLRenderWindow.cxx:1189) ==4393== by 0xA73A05C: vtkRenderWindow::DoStereoRender() (vtkRenderWindow.cxx:748) ==4393== by 0xA73A035: vtkRenderWindow::DoFDRender() (vtkRenderWindow.cxx:737) -- View this message in context: http://vtk.1045678.n5.nabble.com/memory-leak-in-vtk-6-3-tp5735928.html Sent from the VTK - Users mailing list archive at Nabble.com. From newcfd at yahoo.com Tue Jan 12 18:24:38 2016 From: newcfd at yahoo.com (newcfd) Date: Tue, 12 Jan 2016 16:24:38 -0700 (MST) Subject: [vtkusers] query the coordinates of a point on a 3D surface wth mouse click Message-ID: <1452641078974-5735929.post@n5.nabble.com> is it possible to get the coordinates of a point on a 3D surface with mouse click? vtkPointPicker seems to find the nearest vertex. -- View this message in context: http://vtk.1045678.n5.nabble.com/query-the-coordinates-of-a-point-on-a-3D-surface-wth-mouse-click-tp5735929.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Jan 12 18:36:21 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 12 Jan 2016 16:36:21 -0700 Subject: [vtkusers] memory leak in vtk-6.3 In-Reply-To: <1452640363144-5735928.post@n5.nabble.com> References: <1452640363144-5735928.post@n5.nabble.com> Message-ID: The reported leak is in the graphics driver, not in VTK itself. It's common for graphics drivers to allocate memory for the process and then leave the cleanup to the system. I wouldn't worry about it. - David On Tue, Jan 12, 2016 at 4:12 PM, newcfd via vtkusers wrote: > ==4393== 3,384 (56 direct, 3,328 indirect) bytes in 1 blocks are definitely > lost in loss record 456 of 533 > ==4393== at 0x4C2AB80: malloc (in > /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) > ==4393== by 0x25B987CC: ??? (in > /usr/lib/x86_64-linux-gnu/dri/i915_dri.so) > ==4393== by 0x115546AC: ??? (in > /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0) > ==4393== by 0x11551477: ??? (in > /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0) > ==4393== by 0x115558F2: ??? (in > /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0) > ==4393== by 0x1153012B: glXMakeContextCurrent (in > /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0) > ==4393== by 0x8A1E858: vtkXOpenGLRenderWindow::MakeCurrent() > (vtkXOpenGLRenderWindow.cxx:1360) > ==4393== by 0x8A1DD4B: vtkXOpenGLRenderWindow::WindowInitialize() > (vtkXOpenGLRenderWindow.cxx:1042) > ==4393== by 0x8A1DE06: vtkXOpenGLRenderWindow::Initialize() > (vtkXOpenGLRenderWindow.cxx:1062) > ==4393== by 0x8A1E24C: vtkXOpenGLRenderWindow::Start() > (vtkXOpenGLRenderWindow.cxx:1189) > ==4393== by 0xA73A05C: vtkRenderWindow::DoStereoRender() > (vtkRenderWindow.cxx:748) > ==4393== by 0xA73A035: vtkRenderWindow::DoFDRender() > (vtkRenderWindow.cxx:737) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Jan 12 18:47:09 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 12 Jan 2016 16:47:09 -0700 Subject: [vtkusers] query the coordinates of a point on a 3D surface wth mouse click In-Reply-To: <1452641078974-5735929.post@n5.nabble.com> References: <1452641078974-5735929.post@n5.nabble.com> Message-ID: On Tue, Jan 12, 2016 at 4:24 PM, newcfd via vtkusers wrote: > is it possible to get the coordinates of a point on a 3D surface with mouse > click? > vtkPointPicker seems to find the nearest vertex. > Use vtkCellPicker. Also, since you are posting a fair bit, can you use a name or some kind of close-off on your messages? So that I know who I am replying to. Cheers, - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From newcfd at yahoo.com Tue Jan 12 19:04:40 2016 From: newcfd at yahoo.com (newcfd) Date: Tue, 12 Jan 2016 17:04:40 -0700 (MST) Subject: [vtkusers] query the coordinates of a point on a 3D surface wth mouse click In-Reply-To: References: <1452641078974-5735929.post@n5.nabble.com> Message-ID: <1452643480075-5735932.post@n5.nabble.com> Thank you, David. joe -- View this message in context: http://vtk.1045678.n5.nabble.com/query-the-coordinates-of-a-point-on-a-3D-surface-wth-mouse-click-tp5735929p5735932.html Sent from the VTK - Users mailing list archive at Nabble.com. From newcfd at yahoo.com Tue Jan 12 21:06:42 2016 From: newcfd at yahoo.com (newcfd) Date: Tue, 12 Jan 2016 19:06:42 -0700 (MST) Subject: [vtkusers] memory leak in vtk-6.3 In-Reply-To: References: Message-ID: <1452650802522-5735933.post@n5.nabble.com> I realized that. Thanks for your reply, David. Joe -- View this message in context: http://vtk.1045678.n5.nabble.com/Re-memory-leak-in-vtk-6-3-tp5735930p5735933.html Sent from the VTK - Users mailing list archive at Nabble.com. From rickfrank at me.com Tue Jan 12 23:32:44 2016 From: rickfrank at me.com (Richard Frank) Date: Tue, 12 Jan 2016 23:32:44 -0500 Subject: [vtkusers] Moving an actor programmatically - performance issues Message-ID: Hi, We are moving a small arrow actor around 3D space driven by data from a sensor, with another somewhat dense polygon model held stationary. We are moving the actor with setusertransform. We are only getting about 10 fps. An OpenGL implementation with the same data gets 50fps. What might we be doing wrong? It seems that the call to renderwindow->Render() is just drawing everything without clipping out data that doesn't need to be updated..... Also, what is the vtkActor::Render() method for? It seems to perform all the OpenGL calls but at the end nothing is drawn on the screen. Is that only to be called from within renderwindow->Render()? Our code uses a timer to read the data from the sensor, and parse the data, and then move the actor. Thanks, Rick Sent from my iPad From rakesh.p at tataelxsi.co.in Wed Jan 13 03:29:19 2016 From: rakesh.p at tataelxsi.co.in (Rakesh Patil) Date: Wed, 13 Jan 2016 08:29:19 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. Message-ID: Dear users, I am trying to implement UNION, INTERSECTION & SUBTRACTION operations using vtkBooleanOperationPolyDataFilter. I succeeded in performing these operations for polydata coming from vtkCubeSource and vtkCylinderSource. I have created another class called My3DPolygonSource which is similar to vtkRegularPolygonSource, but it computes 'n' sided 3D objects. The polydata coming from My3DPolygonSource gives opposite results. i.e. for UNION, it produces output of INTERSECTION. For INTERSECION,the output is of UNION, and for SUBTRACTION, the output is B-A (actual output should be A-B). I would like to know what are the prerequisite criteria to be considered before performing these operations. In which scenarios, the behavior gets reversed (as mentioned above)? Thanks Warm Regards Rakesh Patil -------------- next part -------------- An HTML attachment was scrubbed... URL: From paulo.waelkens at gmail.com Wed Jan 13 04:17:42 2016 From: paulo.waelkens at gmail.com (Paulo Waelkens) Date: Wed, 13 Jan 2016 10:17:42 +0100 Subject: [vtkusers] VTK with NVidia Optimus In-Reply-To: References: Message-ID: Hello! >From my previous message "So either the windows 8.1 drivers are not working properly and/or the GPU switch works for the 700m GPU series but not for the 900m GPU series". => It turns out, the windows 8.1 drivers are at fault. Yesterday I've installed windows 10, then the newest intel HD530, then the newest nvidia drivers, and now the GPU switching works. In conclusion, the nvidia optimus GPU switching does not work on windows server 2012 R2 (==windows 8.1), but works on Windows 10. Hope this helps anyone else stuck with this problem. Cheers! Paulo On 10 January 2016 at 22:34, Paulo Waelkens wrote: > Hi Chiang, > > indeed, there SHOULD be a soft trigger for the graphic card switch. As far > as I understood the vague, incorrect and absolutely infuriating!!! > NVIDIA optimus documentation, there are a few approaches to trigger > a switch between GPUs, as already mentioned. Unfortunately, they do not > work for my current setup GTX970m on Windows Server 2012R2 (==Win 8.1, I > believe). I ran a CUDA kernel prior to calling any rendering routines in my > main function, and while I got GPU activity on the nvidia control panel for > my executable, the rendering was still performed by the IGP, in defiance of > the empty claims in the NVIDIA documentation. Sigh... > > I did discover one workaround, though: if you connect an external monitor > to the laptop (HDMI port, in my case), and set this as the primary monitor, > then the discrete GPU is always used, for everything. Including VTK. > Problem, sort of, solved =P Also, I've tried running the same executable on > another laptop with NVIDIA optimus (using the latest NVIDIA drivers), and > the switch worked there. What?!?! That laptop had windows 10, instead of > windows 8.1 and a different GPU model (GT740m). So either the windows 8.1 > drivers are not working properly and/or the GPU switch works for the 700m > GPU series but not for the 900m GPU series (since they must have different > drivers, given their different hardware architecture and features). > Hopefully NVidia will get their act together at some point and fix their > drivers... > > Anyway, thanks for your help, Chiang! I'm sort of dropping this issue for > now, since the external monitor solution is a (dreadful) fix, and I cannot > install windows 10 right now (because you cannot install VS2013 on windows > 10; only if you upgrade from windows 8.1. Darned!) > > Cheers! > Paulo > > On 4 January 2016 at 01:57, WangQ wrote: > >> Hi Paulo, >> >> It is quite strange. Suppose to have hard or soft trigger for graphic >> card switch. You may also try a simple CUDA program to see if the dedicated >> graphic card is used. If you get CUDA installed, there is an example about >> cuda with opengl rendering. If successfully executed, the dedicated one >> should be used. >> >> Cheers, >> >> Chiang >> >> ------------------------------ >> Date: Sun, 3 Jan 2016 18:26:37 +0100 >> >> Subject: Re: [vtkusers] VTK with NVidia Optimus >> From: paulo.waelkens at gmail.com >> To: wangq1979 at outlook.com >> CC: vtkusers at vtk.org >> >> Hi Chiang, >> I also found this video, but my BIOS does look different. Apparently my >> laptop has a hybrid graphics with a dynamic switching model ( >> https://wiki.archlinux.org/index.php/Hybrid_graphics), meaning it is >> impossible to disable the IGP, since the IGP's framebuffer provides the >> only interface to the screen. The discrete GPU, when in use, will write its >> output to the IGP's framebuffer. >> In the coming days I'll try writing a "pure" OpenGL win32 application >> (i.e. a program that uses the window manager of the OS, unlike a console >> application), and try out the solutions nvidia gives in the >> OptimusRenderingPolicies. >> >> I suspect the real problem is that I'm starting all the rendering stuff >> from a console application (i.e. not a win32 application, that explicitly >> uses the window manager of the OS). *Maybe* the optimus driver always >> assigns the IGP to console applications, since in windows you would usually >> create a win32 application if you wanted to do rendering. To test this I'll >> do the following: >> - create a win32 application with simple OpenGL code (e.g. draw a sphere) >> => play with nvidia settings until it uses the discrete GPU. This should >> work, I hope >> - create a console application, that links to a dll with OpenGL code, >> that draws a sphere => this is basically analogous to what VTK is doing in >> my application right now. I get the feeling, this will always default to >> the IGP >> - create a win32 application, that links to the same OpenGL dll => if I >> get this to work with the discrete GPU, this is the solution! >> >> I'm no OpenGL expert though; maybe what I'm planning here is not >> possible. Guess I'll find out =D >> >> Cheers, >> Paulo >> >> >> On 2 January 2016 at 03:54, WangQ wrote: >> >> Hi Paulo, >> >> Not sure about alienware, but my m4700 is able to disable IGP through >> bios setting. I always switch it off since I need CUDA, and my opengl code >> works well when the IGP is switched off. But i did not try the suggestion >> in WP. >> >> I just googled it and found this >> https://www.youtube.com/watch?v=HuqyR-496Sw >> >> Check it to see if you are luck. >> >> Cheers, >> >> Chiang >> >> ------------------------------ >> Date: Sat, 2 Jan 2016 00:02:01 +0100 >> Subject: Re: [vtkusers] VTK with NVidia Optimus >> From: paulo.waelkens at gmail.com >> To: wangq1979 at outlook.com >> CC: vtkusers at vtk.org >> >> >> Dear Chiang, >> thank you for your suggestion. It is not possible to disable the IGP in >> the BIOS of my laptop (Alienware17 r3), even after getting the newest BIOS >> from dell. I *guess* this means the laptop does not have a hardware >> multiplexer(?), whilst your M4700 has one(?). So this approach won't work, >> I think. >> Did you perhaps try the programmatic solutions suggested by nvidia (e.g. >> NvOptimusEnablement export thing) when doing your OpenGL programming? >> Thanks! Regards, >> Paulo >> >> On 1 January 2016 at 19:54, WangQ wrote: >> >> >> Hi, >> >> You may try disabling optimus in bios setting to see if works. At least >> this works with my DELL M4700 and direct opengl programming. Not 100% sure >> whether for VTK. >> >> Cheers, >> >> Chiang >> ------------------------------ >> Date: Fri, 1 Jan 2016 18:42:17 +0100 >> From: paulo.waelkens at gmail.com >> To: vtkusers at vtk.org >> Subject: [vtkusers] VTK with NVidia Optimus >> >> Dear all, >> >> I'm trying to get my VTK 6.3 application to use the NVidia GPU on my >> laptop. The laptop (Dell Alienware) combines an intel HD530 with an Nvidia >> GTX970m using the NVidia Optimus technology. At the moment, my application >> always uses the integrated GPU, which is slow and horrible. Did any of you >> figure out how to make the NVidia Optimus driver choose the discrete GPU >> instead??? The laptop uses the discrete GPU for games, so it's not a >> hardware problem, I'd say. >> >> NOTE: I have both the latest intel and nvidia GPU drivers, and installed >> the intel driver first (as suggested somewhere). I've built VTK 6.3 with >> shared libraries and using the OpenGL2 flag. >> >> I've followed the solutions described by nvidia, without success: >> >> http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf >> - set the discrete GPU as the "Preferred graphics processor" => no effect >> - adding this line to my main.cpp >> extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; >> } //=>no effect >> >> To check if the discrete GPU is being used, I use the GPU activity icon >> of the nvidia control panel ( >> http://acer--uk.custhelp.com/app/answers/detail/a_id/9075/~/determining-which-graphics-card-is-used-with-nvidia-optimus). >> The icon does work correctly, since it shows activity when games are >> running (e.g. Starcraft 2). >> >> I figured maybe I need to add the *extern "C" { _declspec(dllexport) >> DWORD NvOptimusEnablement = 0x00000001; }* line in the VTK source code >> somewhere. This is a bit of a wild guess, but maybe, since I'm linking to >> VTK dynamically, all the OpenGL stuff is done withing the VTK dll >> boundaries, so NVidia Optimus needs a hint from VTK, not from my (console) >> application that uses VTK. >> >> I'm really running out of tricks here, and was wondering if one of you >> knows how to proceed. >> Thanks! >> >> _______________________________________________ Powered by >> www.kitware.com Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html Please keep messages >> on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> 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 Michael.Bachmann at synopsys.com Wed Jan 13 05:01:47 2016 From: Michael.Bachmann at synopsys.com (Michael Bachmann) Date: Wed, 13 Jan 2016 10:01:47 +0000 Subject: [vtkusers] vtk 7.x.x: offscreen rendering without DISPLAY variable not possible anymore with vtkXOpenGLRenderWindow Message-ID: Hi all! Using vtk 6 it was still possible to render images offscreen on a headless machine on Linux (no DISPLAY) with a vtkXOpenGLRenderWindow instance. The only things which were necessary were a working version of osmesa library in the OpenGL installation and the function OffscreenRenderingOn() needed to be called on the vtkRenderWindow instance. Using VTK 7 (7.0.0.rc1 and the latest development version (7.1.0)) this is not possible anymore. In VTK 6 the pre-processor define VTK_OPENGL_HAS_OSMESA was used in vtkXOpenGLRenderWindow.cxx, which allowed to perform offscreen rendering on headless machines. In VTK 7 the pre-processor define VTK_OPENGL_HAS_OSMESA has been replaced by VTK_USE_OSMESA such that it is only possible to do offscreen rendering via vtkOSOpenGLRenderWindow. Is there by any chance a possibility perform onscreen and offscreen rendering with a single build of VTK 7 similar to VTK 6 and previous versions? Best regards Michael From cory.quammen at kitware.com Wed Jan 13 09:01:32 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 13 Jan 2016 09:01:32 -0500 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. In-Reply-To: References: Message-ID: Rakesh, My first guess is to check the winding order of the polygons in your custom source. My guess is that they are in reverse order of what they should be. The reason I suspect a reversal is because the boolean operations filter looks at the normal for each face to determine whether points are inside or outside the poly data. If your normals are opposite of what they should be, which would happen if your winding order is backwards, that would explain the behavior you see. HTH, Cory On Wed, Jan 13, 2016 at 3:29 AM, Rakesh Patil wrote: > Dear users, > > > I am trying to implement UNION, INTERSECTION & SUBTRACTION operations using > vtkBooleanOperationPolyDataFilter. I succeeded in performing these > operations for polydata coming from vtkCubeSource and vtkCylinderSource. I > have created another class called My3DPolygonSource which is similar to > vtkRegularPolygonSource, but it computes 'n' sided 3D objects. The polydata > coming from My3DPolygonSource gives opposite results. i.e. for UNION, it > produces output of INTERSECTION. For INTERSECION,the output is of UNION, and > for SUBTRACTION, the output is B-A (actual output should be A-B). > > > I would like to know what are the prerequisite criteria to be considered > before performing these operations. In which scenarios, the behavior gets > reversed (as mentioned above)? > > > Thanks > > Warm Regards > > > Rakesh Patil > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 rakesh.p at tataelxsi.co.in Wed Jan 13 09:17:20 2016 From: rakesh.p at tataelxsi.co.in (Rakesh Patil) Date: Wed, 13 Jan 2016 14:17:20 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. In-Reply-To: References: , Message-ID: Hey Cory, What exactly do you mean by winding order? Is it the order in which the faces are added, or the order in which node points are inserted for each face? My normals are probably facing outside the polydata. I shall confirm it once again. Thanks Rakesh Patil ________________________________________ From: Cory Quammen Sent: Wednesday, January 13, 2016 7:31 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. Rakesh, My first guess is to check the winding order of the polygons in your custom source. My guess is that they are in reverse order of what they should be. The reason I suspect a reversal is because the boolean operations filter looks at the normal for each face to determine whether points are inside or outside the poly data. If your normals are opposite of what they should be, which would happen if your winding order is backwards, that would explain the behavior you see. HTH, Cory On Wed, Jan 13, 2016 at 3:29 AM, Rakesh Patil wrote: > Dear users, > > > I am trying to implement UNION, INTERSECTION & SUBTRACTION operations using > vtkBooleanOperationPolyDataFilter. I succeeded in performing these > operations for polydata coming from vtkCubeSource and vtkCylinderSource. I > have created another class called My3DPolygonSource which is similar to > vtkRegularPolygonSource, but it computes 'n' sided 3D objects. The polydata > coming from My3DPolygonSource gives opposite results. i.e. for UNION, it > produces output of INTERSECTION. For INTERSECION,the output is of UNION, and > for SUBTRACTION, the output is B-A (actual output should be A-B). > > > I would like to know what are the prerequisite criteria to be considered > before performing these operations. In which scenarios, the behavior gets > reversed (as mentioned above)? > > > Thanks > > Warm Regards > > > Rakesh Patil > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 cory.quammen at kitware.com Wed Jan 13 09:18:24 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 13 Jan 2016 09:18:24 -0500 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. In-Reply-To: References: Message-ID: By winding order, I mean which order the node points are inserted for each face. The normals should indeed face outward, which requires a counter-clockwise insertion order. On Wed, Jan 13, 2016 at 9:17 AM, Rakesh Patil wrote: > Hey Cory, > > What exactly do you mean by winding order? Is it the order in which the faces are added, or the order in which node points are inserted for each face? My normals are probably facing outside the polydata. I shall confirm it once again. > > Thanks > > Rakesh Patil > ________________________________________ > From: Cory Quammen > Sent: Wednesday, January 13, 2016 7:31 PM > To: Rakesh Patil > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. > > Rakesh, > > My first guess is to check the winding order of the polygons in your > custom source. My guess is that they are in reverse order of what they > should be. > > The reason I suspect a reversal is because the boolean operations > filter looks at the normal for each face to determine whether points > are inside or outside the poly data. If your normals are opposite of > what they should be, which would happen if your winding order is > backwards, that would explain the behavior you see. > > HTH, > Cory > > On Wed, Jan 13, 2016 at 3:29 AM, Rakesh Patil wrote: >> Dear users, >> >> >> I am trying to implement UNION, INTERSECTION & SUBTRACTION operations using >> vtkBooleanOperationPolyDataFilter. I succeeded in performing these >> operations for polydata coming from vtkCubeSource and vtkCylinderSource. I >> have created another class called My3DPolygonSource which is similar to >> vtkRegularPolygonSource, but it computes 'n' sided 3D objects. The polydata >> coming from My3DPolygonSource gives opposite results. i.e. for UNION, it >> produces output of INTERSECTION. For INTERSECION,the output is of UNION, and >> for SUBTRACTION, the output is B-A (actual output should be A-B). >> >> >> I would like to know what are the prerequisite criteria to be considered >> before performing these operations. In which scenarios, the behavior gets >> reversed (as mentioned above)? >> >> >> Thanks >> >> Warm Regards >> >> >> Rakesh Patil >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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. From rakesh.p at tataelxsi.co.in Wed Jan 13 09:31:36 2016 From: rakesh.p at tataelxsi.co.in (Rakesh Patil) Date: Wed, 13 Jan 2016 14:31:36 +0000 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. In-Reply-To: References: , Message-ID: Ok, I shall try that and get back to you. And is it necessary to have same point to be inserted multiple times? Like in vtkCubeSource, the same set of points (8) are being inserted three times. Can't we just limit to eight points and share their indices for the faces? Thanks Rakesh Patil ________________________________________ From: Cory Quammen Sent: Wednesday, January 13, 2016 7:48 PM To: Rakesh Patil Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. By winding order, I mean which order the node points are inserted for each face. The normals should indeed face outward, which requires a counter-clockwise insertion order. On Wed, Jan 13, 2016 at 9:17 AM, Rakesh Patil wrote: > Hey Cory, > > What exactly do you mean by winding order? Is it the order in which the faces are added, or the order in which node points are inserted for each face? My normals are probably facing outside the polydata. I shall confirm it once again. > > Thanks > > Rakesh Patil > ________________________________________ > From: Cory Quammen > Sent: Wednesday, January 13, 2016 7:31 PM > To: Rakesh Patil > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. > > Rakesh, > > My first guess is to check the winding order of the polygons in your > custom source. My guess is that they are in reverse order of what they > should be. > > The reason I suspect a reversal is because the boolean operations > filter looks at the normal for each face to determine whether points > are inside or outside the poly data. If your normals are opposite of > what they should be, which would happen if your winding order is > backwards, that would explain the behavior you see. > > HTH, > Cory > > On Wed, Jan 13, 2016 at 3:29 AM, Rakesh Patil wrote: >> Dear users, >> >> >> I am trying to implement UNION, INTERSECTION & SUBTRACTION operations using >> vtkBooleanOperationPolyDataFilter. I succeeded in performing these >> operations for polydata coming from vtkCubeSource and vtkCylinderSource. I >> have created another class called My3DPolygonSource which is similar to >> vtkRegularPolygonSource, but it computes 'n' sided 3D objects. The polydata >> coming from My3DPolygonSource gives opposite results. i.e. for UNION, it >> produces output of INTERSECTION. For INTERSECION,the output is of UNION, and >> for SUBTRACTION, the output is B-A (actual output should be A-B). >> >> >> I would like to know what are the prerequisite criteria to be considered >> before performing these operations. In which scenarios, the behavior gets >> reversed (as mentioned above)? >> >> >> Thanks >> >> Warm Regards >> >> >> Rakesh Patil >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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. From cory.quammen at kitware.com Wed Jan 13 09:37:18 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 13 Jan 2016 09:37:18 -0500 Subject: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. In-Reply-To: References: Message-ID: The reason this is done for the cube source is so that you can have separate normals at each point for each face. This is commonly done in computer graphics where sharp edges are desired. If you have just one point, you can associate just one normal with the point, and normals will be interpolated across the faces, leading to an undesirable round appearance to the cube. If you don't have sharp angles between adjacent polygons in your source, then you don't need to duplicate points. On Wed, Jan 13, 2016 at 9:31 AM, Rakesh Patil wrote: > Ok, I shall try that and get back to you. And is it necessary to have same point to be inserted multiple times? Like in vtkCubeSource, the same set of points (8) are being inserted three times. Can't we just limit to eight points and share their indices for the faces? > > Thanks > > Rakesh Patil > > ________________________________________ > From: Cory Quammen > Sent: Wednesday, January 13, 2016 7:48 PM > To: Rakesh Patil > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. > > By winding order, I mean which order the node points are inserted for > each face. The normals should indeed face outward, which requires a > counter-clockwise insertion order. > > On Wed, Jan 13, 2016 at 9:17 AM, Rakesh Patil wrote: >> Hey Cory, >> >> What exactly do you mean by winding order? Is it the order in which the faces are added, or the order in which node points are inserted for each face? My normals are probably facing outside the polydata. I shall confirm it once again. >> >> Thanks >> >> Rakesh Patil >> ________________________________________ >> From: Cory Quammen >> Sent: Wednesday, January 13, 2016 7:31 PM >> To: Rakesh Patil >> Cc: vtkusers at vtk.org >> Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata. >> >> Rakesh, >> >> My first guess is to check the winding order of the polygons in your >> custom source. My guess is that they are in reverse order of what they >> should be. >> >> The reason I suspect a reversal is because the boolean operations >> filter looks at the normal for each face to determine whether points >> are inside or outside the poly data. If your normals are opposite of >> what they should be, which would happen if your winding order is >> backwards, that would explain the behavior you see. >> >> HTH, >> Cory >> >> On Wed, Jan 13, 2016 at 3:29 AM, Rakesh Patil wrote: >>> Dear users, >>> >>> >>> I am trying to implement UNION, INTERSECTION & SUBTRACTION operations using >>> vtkBooleanOperationPolyDataFilter. I succeeded in performing these >>> operations for polydata coming from vtkCubeSource and vtkCylinderSource. I >>> have created another class called My3DPolygonSource which is similar to >>> vtkRegularPolygonSource, but it computes 'n' sided 3D objects. The polydata >>> coming from My3DPolygonSource gives opposite results. i.e. for UNION, it >>> produces output of INTERSECTION. For INTERSECION,the output is of UNION, and >>> for SUBTRACTION, the output is B-A (actual output should be A-B). >>> >>> >>> I would like to know what are the prerequisite criteria to be considered >>> before performing these operations. In which scenarios, the behavior gets >>> reversed (as mentioned above)? >>> >>> >>> Thanks >>> >>> Warm Regards >>> >>> >>> Rakesh Patil >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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. -- Cory Quammen R&D Engineer Kitware, Inc. From guanw at rhpcs.mcmaster.ca Wed Jan 13 10:03:14 2016 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Wed, 13 Jan 2016 10:03:14 -0500 Subject: [vtkusers] would data type affect volume rendering? In-Reply-To: References: Message-ID: <56966732.6080009@rhpcs.mcmaster.ca> Hi VTK users, I have an integer volume dataset. I wonder if I convert it to other data type (float, for example), would rendering of the new float volume be different from that of the original integer volume in terms of speed and quality? My second question is that if I scaled down the data by dividing a scalar during the conversion, would the rendering of new volume have poorer quality? Thanks. Best, Weiguang From wumengda at gmail.com Wed Jan 13 10:44:40 2016 From: wumengda at gmail.com (Mengda Wu) Date: Wed, 13 Jan 2016 10:44:40 -0500 Subject: [vtkusers] BUG: vtkImageMapToColors does not output with input spacing and origin In-Reply-To: References: Message-ID: Has anyone tested this bug? Thanks! On Wed, Jan 6, 2016 at 4:22 PM, Mengda Wu wrote: > Hi Vtkusers, > > I found a bug in vtkImageMapToColors. It does not output with input > spacing and origin. It sets the spacing to [1,1,1] and origin to [0,0,0]. I > am using VTK 6.2 but I believe it happens also in VTK 7.0. Can you fix > this? Here is a test program and a sample image (input.mha) and its > output(input-colormap.mha): > > vtkSmartPointer inputReader = > vtkSmartPointer::New(); > inputReader->SetFileName(argv[1]); > try > { > inputReader->Update(); > } > catch(...) > { > std::cerr << "Error occurs when reading " << argv[1] << std::endl; > return EXIT_FAILURE; > } > > vtkSmartPointer lookupTable = > vtkSmartPointer::New(); > lookupTable->SetTableRange(0.0, 255.0); > lookupTable->SetNumberOfTableValues(256); > lookupTable->SetTableValue(0, 0.0, 0.0, 0.0, 0.0); > for(vtkIdType i=1; i<256; i++) > lookupTable->SetTableValue(i, 1.0, 0.0, 0.0, 0.4); > lookupTable->Build(); > vtkSmartPointer imageColor = > vtkSmartPointer::New(); > imageColor->SetInputConnection(inputReader->GetOutputPort()); > imageColor->SetOutputFormatToRGBA(); > imageColor->SetLookupTable(lookupTable); > > vtkSmartPointer< vtkMetaImageWriter > writer = vtkSmartPointer< > vtkMetaImageWriter >::New(); > writer->SetFileName(argv[2]); > writer->SetInputConnection(imageColor->GetOutputPort()); > try > { > writer->Write(); > } > catch(...) > { > std::cerr << "Error occurs when writing " << argv[2] << std::endl; > return EXIT_FAILURE; > } > > Thanks, > Mengda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed Jan 13 11:13:14 2016 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 13 Jan 2016 11:13:14 -0500 Subject: [vtkusers] would data type affect volume rendering? In-Reply-To: <56966732.6080009@rhpcs.mcmaster.ca> References: <56966732.6080009@rhpcs.mcmaster.ca> Message-ID: Data type and scaling definitely have an impact on quality and performance. Generally you want to use the smallest data type that can fully represent your data. For example if your data consisted of only integer values between 1020 and 1120 you could store it as a float volume or int volume but that would be more than you need. Better would be to use unsigned short or short as those are 16 bits as opposed to 32 bits and short can fully represent it. If you really want to maximize performance you could shift the data from (1020,1120) down to (0,100) at which point you could use unsigned char to represent the data. You just have to keep track of that shift in your GUI and transfer functions etc. Thanks Ken On Wed, Jan 13, 2016 at 10:03 AM, Weiguang guan wrote: > Hi VTK users, > > I have an integer volume dataset. I wonder if I convert it to other data > type (float, for example), would rendering of the new float volume be > different from that of the original integer volume in terms of speed and > quality? My second question is that if I scaled down the data by dividing a > scalar during the conversion, would the rendering of new volume have poorer > quality? Thanks. > > Best, > Weiguang > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 aashish.chaudhary at kitware.com Wed Jan 13 11:22:22 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 13 Jan 2016 11:22:22 -0500 Subject: [vtkusers] would data type affect volume rendering? In-Reply-To: References: <56966732.6080009@rhpcs.mcmaster.ca> Message-ID: Hi Weiguang, On Wed, Jan 13, 2016 at 10:03 AM, Weiguang guan > wrote: > >> Hi VTK users, >> >> I have an integer volume dataset. I wonder if I convert it to other data >> type (float, for example), would rendering of the new float volume be >> different from that of the original integer volume in terms of speed and >> quality? > > It will affect the speed (at least the first frame) and may affect some more if are close to the GPU memory. It may not affect the quality as much other than the fact that now you are dealing with floats vs ints. I am curious on why do you want to convert your int dataset into floats? > My second question is that if I scaled down the data by dividing a scalar >> during the conversion, would the rendering of new volume have poorer >> quality? Thanks. >> > I think Ken already answered this question. Also, can you define what do you mean by a poor quality? - Aashish > >> Best, >> Weiguang >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jan 13 11:49:59 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 13 Jan 2016 09:49:59 -0700 Subject: [vtkusers] BUG: vtkImageMapToColors does not output with input spacing and origin In-Reply-To: References: Message-ID: Hi Mengda, If the vtkImageMapToColors was changing the spacing and origin of the images, then many of the nightly VTK tests would be failing, so I was kind of suspicious about this. I tried a few things. 1) First, I ran your program as-is. And yes, the output .mha file had (1,1,1) spacing. 2) Then, I added imageColor->Update(), and the spacing of the output .mha file was correct: Spacing: (0.5, 1.12048, 1) Origin: (10, 20, 0) 3) Then, I removed imageColor->Update(), and replaced the vtkMetaImageWriter with vtkNIFTIImageWriter. The spacing in the .nii file was correct. 4) Then, I put the vtkMetaImageWriter back, and replaced vtkImageMapToColors with vtkImageCast. The resulting .mha file had spacing (1,1,1). So this tells me: A) The problem is not specific to vtkImageMapToColors. B) The problem appears to be specific to vtkMetaImageWriter C) The problem goes away if I add an Update() before the writer Mengda, can you confirm this by trying a different image writer? - David On Wed, Jan 13, 2016 at 8:44 AM, Mengda Wu wrote: > Has anyone tested this bug? > > Thanks! > > On Wed, Jan 6, 2016 at 4:22 PM, Mengda Wu wrote: > >> Hi Vtkusers, >> >> I found a bug in vtkImageMapToColors. It does not output with input >> spacing and origin. It sets the spacing to [1,1,1] and origin to [0,0,0]. I >> am using VTK 6.2 but I believe it happens also in VTK 7.0. Can you fix >> this? Here is a test program and a sample image (input.mha) and its >> output(input-colormap.mha): >> >> vtkSmartPointer inputReader = >> vtkSmartPointer::New(); >> inputReader->SetFileName(argv[1]); >> try >> { >> inputReader->Update(); >> } >> catch(...) >> { >> std::cerr << "Error occurs when reading " << argv[1] << std::endl; >> return EXIT_FAILURE; >> } >> >> vtkSmartPointer lookupTable = >> vtkSmartPointer::New(); >> lookupTable->SetTableRange(0.0, 255.0); >> lookupTable->SetNumberOfTableValues(256); >> lookupTable->SetTableValue(0, 0.0, 0.0, 0.0, 0.0); >> for(vtkIdType i=1; i<256; i++) >> lookupTable->SetTableValue(i, 1.0, 0.0, 0.0, 0.4); >> lookupTable->Build(); >> vtkSmartPointer imageColor = >> vtkSmartPointer::New(); >> imageColor->SetInputConnection(inputReader->GetOutputPort()); >> imageColor->SetOutputFormatToRGBA(); >> imageColor->SetLookupTable(lookupTable); >> >> vtkSmartPointer< vtkMetaImageWriter > writer = vtkSmartPointer< >> vtkMetaImageWriter >::New(); >> writer->SetFileName(argv[2]); >> writer->SetInputConnection(imageColor->GetOutputPort()); >> try >> { >> writer->Write(); >> } >> catch(...) >> { >> std::cerr << "Error occurs when writing " << argv[2] << std::endl; >> return EXIT_FAILURE; >> } >> >> Thanks, >> Mengda >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Wed Jan 13 12:06:23 2016 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Wed, 13 Jan 2016 12:06:23 -0500 Subject: [vtkusers] would data type affect volume rendering? In-Reply-To: References: <56966732.6080009@rhpcs.mcmaster.ca> Message-ID: <5696840F.4020604@rhpcs.mcmaster.ca> Ken and Aashish, Thank you very much for the helpful replies to my questions. The data I'm dealing with are integers and they are >=0. Most of them are in the range of ushort. However, I need to normalize multiple data with respect to their own "exposure times" (divided by exposure time, which is an integer) in order to make them scaled at the same level so that multiple data have with comparable intensities. If data type didn't affect volume rendering, I would use float for sure. Since this is not the case, I will scale up the data to match the one with the maximum exposure time and keep it as either uint or ushort. Best, Weiguang On 13/01/2016 11:22 AM, Aashish Chaudhary wrote: > I am curious on why do you want to convert your int dataset into floats? From david.gobbi at gmail.com Wed Jan 13 13:52:00 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 13 Jan 2016 11:52:00 -0700 Subject: [vtkusers] BUG: vtkImageMapToColors does not output with input spacing and origin In-Reply-To: References: Message-ID: I've posted a fix that you can try: https://gitlab.kitware.com/vtk/vtk/commit/5efcd8d2 On Wed, Jan 13, 2016 at 9:49 AM, David Gobbi wrote: > Hi Mengda, > > If the vtkImageMapToColors was changing the spacing and origin of the > images, then many of the nightly VTK tests would be failing, so I was kind > of suspicious about this. > > I tried a few things. > > 1) First, I ran your program as-is. And yes, the output .mha file had > (1,1,1) spacing. > > 2) Then, I added imageColor->Update(), and the spacing of the output .mha > file was correct: > > Spacing: (0.5, 1.12048, 1) > Origin: (10, 20, 0) > > 3) Then, I removed imageColor->Update(), and replaced the > vtkMetaImageWriter with vtkNIFTIImageWriter. The spacing in the .nii file > was correct. > > 4) Then, I put the vtkMetaImageWriter back, and replaced > vtkImageMapToColors with vtkImageCast. The resulting .mha file had spacing > (1,1,1). > > So this tells me: > > A) The problem is not specific to vtkImageMapToColors. > B) The problem appears to be specific to vtkMetaImageWriter > C) The problem goes away if I add an Update() before the writer > > Mengda, can you confirm this by trying a different image writer? > > - David > > > On Wed, Jan 13, 2016 at 8:44 AM, Mengda Wu wrote: > >> Has anyone tested this bug? >> >> Thanks! >> >> On Wed, Jan 6, 2016 at 4:22 PM, Mengda Wu wrote: >> >>> Hi Vtkusers, >>> >>> I found a bug in vtkImageMapToColors. It does not output with input >>> spacing and origin. It sets the spacing to [1,1,1] and origin to [0,0,0]. I >>> am using VTK 6.2 but I believe it happens also in VTK 7.0. Can you fix >>> this? Here is a test program and a sample image (input.mha) and its >>> output(input-colormap.mha): >>> >>> vtkSmartPointer inputReader = >>> vtkSmartPointer::New(); >>> inputReader->SetFileName(argv[1]); >>> try >>> { >>> inputReader->Update(); >>> } >>> catch(...) >>> { >>> std::cerr << "Error occurs when reading " << argv[1] << std::endl; >>> return EXIT_FAILURE; >>> } >>> >>> vtkSmartPointer lookupTable = >>> vtkSmartPointer::New(); >>> lookupTable->SetTableRange(0.0, 255.0); >>> lookupTable->SetNumberOfTableValues(256); >>> lookupTable->SetTableValue(0, 0.0, 0.0, 0.0, 0.0); >>> for(vtkIdType i=1; i<256; i++) >>> lookupTable->SetTableValue(i, 1.0, 0.0, 0.0, 0.4); >>> lookupTable->Build(); >>> vtkSmartPointer imageColor = >>> vtkSmartPointer::New(); >>> imageColor->SetInputConnection(inputReader->GetOutputPort()); >>> imageColor->SetOutputFormatToRGBA(); >>> imageColor->SetLookupTable(lookupTable); >>> >>> vtkSmartPointer< vtkMetaImageWriter > writer = vtkSmartPointer< >>> vtkMetaImageWriter >::New(); >>> writer->SetFileName(argv[2]); >>> writer->SetInputConnection(imageColor->GetOutputPort()); >>> try >>> { >>> writer->Write(); >>> } >>> catch(...) >>> { >>> std::cerr << "Error occurs when writing " << argv[2] << std::endl; >>> return EXIT_FAILURE; >>> } >>> >>> Thanks, >>> Mengda >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Wed Jan 13 13:07:43 2016 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Wed, 13 Jan 2016 19:07:43 +0100 Subject: [vtkusers] which piece-filter streams when creating pieces to convert VTP to PVTP In-Reply-To: <5656EADC.7050609@mh-hannover.de> References: <5656EADC.7050609@mh-hannover.de> Message-ID: <5696926F.3010508@mh-hannover.de> I noticed that when converting a VTP-file to a PVTP-file one must specify a filter in between the reader and the writer that actually creates pieces like vtkExtractPolyDataPiece (I guess that's why these examples are under broken: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/IO/XMLPUnstructuredGridWriter http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/IO/XMLPImageDataWriter). While my vtp2pvtp creates multiple files as expected (https://github.com/romangrothausmann/VTK-CLIs/blob/master/vtp2pvtp.cxx) I can't get it to stream the input. It seems that vtkExtractPolyDataPiece demands the whole dataset (http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Filters/Core/Testing/Python/StreamPolyData.py). So I wonder how to make this program single-threaded but streaming such that the total RAM usage scales with the number of pieces. I also found vtkDicer vtkOBBDicer and vtkDistributedDataFilter which all seem to create pieces in different ways. When to use which and when vtkStreamingDemandDrivenPipeline? Any help or hints are very much appreciated Roman On 26/11/15 12:19, Grothausmann, Roman Dr. wrote: > Dear mailing list members, > > > Due to apparent index limitations for arrays I'm in the need to process a > vtkPolyData in chunks. However, my streaming approach reads and processes all > data not just sub-extents. Therefore, I tried to write a minimal example of > streamed reading using vtkXMLPolyDataReader which is supposed to support > streaming according to the docs. However this simple example seems not to stream: > https://github.com/romangrothausmann/VTK-CLIs/blob/master/read_SDP.cxx > I've only found unanswered similar questions on the mailing list and all other > use of vtkStreamingDemandDrivenPipeline seems to be within a filter not outside. > Still, on page 14 of 4_VTK-ParallelCompositeAndTime.pdf the same exemplary use > of vtkStreamingDemandDrivenPipeline is given for "manual" updates. > Am I missing something in my example or can vtkXMLPolyDataReader not stream? > > Any help or hints are very much appreciated > Roman > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From eewing at cs.uoregon.edu Wed Jan 13 16:27:00 2016 From: eewing at cs.uoregon.edu (eewing) Date: Wed, 13 Jan 2016 13:27:00 -0800 Subject: [vtkusers] Thread-safety of New and Delete Message-ID: Hello, I'm running into some issues with VTK in a threaded environment, and it seems that the source of the problem is in VTK's New and Delete calls. So, are the New and Delete calls thread-safe? If not, is there a recommended alternative that I can use inside my threads? Best, -Elliott Ewing University of Oregon From david.gobbi at gmail.com Wed Jan 13 17:20:37 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 13 Jan 2016 15:20:37 -0700 Subject: [vtkusers] Thread-safety of New and Delete In-Reply-To: References: Message-ID: Hi Elliott, Can you describe your issue in more detail? The VTK New and Delete calls should be thread safe. The two caveats for VTK and threads are: 1) All classes that do rendering should be in the same thread (all mappers, actors, renderers, etc), and there shouldn't be multiple threads hitting the same rendering context. 2) Movement of data between threads must be locked or otherwise done in a thread-safe manner. You would not, for example, create a single pipeline that is accessed from multiple threads. Each thread would have its own pipeline segment, with locks to synchronize a copy (or move) of data from the output of one segment to the input of another segment. - David On Wed, Jan 13, 2016 at 2:27 PM, eewing wrote: > Hello, > > I'm running into some issues with VTK in a threaded environment, and it > seems that the source of the problem is in VTK's New and Delete calls. So, > are the New and Delete calls thread-safe? If not, is there a recommended > alternative that I can use inside my threads? > > Best, > -Elliott Ewing > University of Oregon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eewing at cs.uoregon.edu Wed Jan 13 17:39:50 2016 From: eewing at cs.uoregon.edu (eewing) Date: Wed, 13 Jan 2016 14:39:50 -0800 Subject: [vtkusers] Thread-safety of New and Delete In-Reply-To: References: Message-ID: <3d9632395e8b52c676e61c2065377e70@cs.uoregon.edu> Hi David, Thanks for the quick response. That actually answers my issue. I'm working on threaded I/O as part of a large pipeline, described by your first example. The pipeline is executed in parts by threads, but on a filter-by-filter basis, with no way to lock data to a specific thread. What would your recommendation be to mitigate the issue? I've seen a suggestion to create a "I'm accessing VTK" mutex for whenever you are accessing VTK, but I'd like to avoid that if possible. -Elliott On 2016-01-13 14:20, David Gobbi wrote: > Hi Elliott, > > Can you describe your issue in more detail? The VTK New and Delete > calls should be thread safe. The two caveats for VTK and threads are: > > 1) All classes that do rendering should be in the same thread (all > mappers, actors, renderers, etc), and there shouldn't be multiple > threads hitting the same rendering context. > > 2) Movement of data between threads must be locked or otherwise done > in a thread-safe manner. > > You would not, for example, create a single pipeline that is accessed > from multiple threads. Each thread would have its own pipeline > segment, with locks to synchronize a copy (or move) of data from the > output of one segment to the input of another segment. > > - David > > On Wed, Jan 13, 2016 at 2:27 PM, eewing wrote: > >> Hello, >> >> I'm running into some issues with VTK in a threaded environment, >> and it seems that the source of the problem is in VTK's New and >> Delete calls. So, are the New and Delete calls thread-safe? If not, >> is there a recommended alternative that I can use inside my threads? >> >> Best, >> -Elliott Ewing >> University of Oregon From david.gobbi at gmail.com Wed Jan 13 17:47:08 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 13 Jan 2016 15:47:08 -0700 Subject: [vtkusers] Moving an actor programmatically - performance issues In-Reply-To: References: Message-ID: Hi Richard, Does your OpenGL implementation do anything special to "clip out" the stationary data? I'm wondering whether the slowness is due to 1) the time taken to load the data onto the GPU or 2) the time taken for the GPU to render the polygons after they're in GPU memory. I'm assuming that both VTK and your OpenGL implementation do #2 on every render, since that is typical. VTK only reloads data onto the GPU when the data changes, but if something goes wrong and static data is re-loaded on every render, there is a huge performance hit. I believe that VTK's new OpenGL2 backend temporarily had some issues with unnecessarily reloading data, but those issues were fixed for VTK 7.0.0.rc1. Are you using the OpenGL2 back end? And what version of VTK? The vtkActor::Render() method should only be called by VTK itself. Applications call vtkRenderWindow::Render(). - David On Tue, Jan 12, 2016 at 9:32 PM, Richard Frank wrote: > > Hi, > > We are moving a small arrow actor around 3D space driven by data from a > sensor, with another somewhat dense polygon model held stationary. We are > moving the actor with setusertransform. > > We are only getting about 10 fps. An OpenGL implementation with the same > data gets 50fps. > > What might we be doing wrong? It seems that the call to > renderwindow->Render() is just drawing everything without clipping out data > that doesn't need to be updated..... > > Also, what is the vtkActor::Render() method for? It seems to perform all > the OpenGL calls but at the end nothing is drawn on the screen. Is that > only to be called from within renderwindow->Render()? > > Our code uses a timer to read the data from the sensor, and parse the > data, and then move the actor. > > Thanks, > > Rick > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jan 13 18:13:45 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 13 Jan 2016 16:13:45 -0700 Subject: [vtkusers] Thread-safety of New and Delete In-Reply-To: <3d9632395e8b52c676e61c2065377e70@cs.uoregon.edu> References: <3d9632395e8b52c676e61c2065377e70@cs.uoregon.edu> Message-ID: What do you mean by "filter-by-filter" basis? Each filter is in its own thread? If you need asynchronous IO, then a typical approach is to start the thread that does the IO, and then poll that thread until the IO is complete. When the IO is complete, feed the data into your pipeline. This solution is not specific to VTK in any way, of course. It's just a general approach to asynchronous IO that works as well with VTK as with anything else. You can also have the thread read the data piece-by-piece, which would be a bit more complicated. It also works for asynchronous processing. For long processing tasks, we start a QThread that does the processing and emits a signal when the processing is done. When our app receives the signal, it knows it's safe to use the result. In this case Qt is doing the polling for us as part of its mainloop. - David On Wed, Jan 13, 2016 at 3:39 PM, eewing wrote: > Hi David, > > Thanks for the quick response. That actually answers my issue. I'm working > on threaded I/O as part of a large pipeline, described by your first > example. The pipeline is executed in parts by threads, but on a > filter-by-filter basis, with no way to lock data to a specific thread. > > What would your recommendation be to mitigate the issue? I've seen a > suggestion to create a "I'm accessing VTK" mutex for whenever you are > accessing VTK, but I'd like to avoid that if possible. > > -Elliott > > > > On 2016-01-13 14:20, David Gobbi wrote: > >> Hi Elliott, >> >> Can you describe your issue in more detail? The VTK New and Delete >> calls should be thread safe. The two caveats for VTK and threads are: >> >> 1) All classes that do rendering should be in the same thread (all >> mappers, actors, renderers, etc), and there shouldn't be multiple >> threads hitting the same rendering context. >> >> 2) Movement of data between threads must be locked or otherwise done >> in a thread-safe manner. >> >> You would not, for example, create a single pipeline that is accessed >> from multiple threads. Each thread would have its own pipeline >> segment, with locks to synchronize a copy (or move) of data from the >> output of one segment to the input of another segment. >> >> - David >> >> On Wed, Jan 13, 2016 at 2:27 PM, eewing wrote: >> >> Hello, >>> >>> I'm running into some issues with VTK in a threaded environment, >>> and it seems that the source of the problem is in VTK's New and >>> Delete calls. So, are the New and Delete calls thread-safe? If not, >>> is there a recommended alternative that I can use inside my threads? >>> >>> Best, >>> -Elliott Ewing >>> University of Oregon >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rickfrank at me.com Wed Jan 13 18:24:46 2016 From: rickfrank at me.com (Richard Frank) Date: Wed, 13 Jan 2016 18:24:46 -0500 Subject: [vtkusers] Moving an actor programmatically - performance issues In-Reply-To: References: Message-ID: Hi David, It seems like the culprit, upon further investigation, is that my stationary actor is actually an assembly of approximately 100 vtkOpenGL actors. This was the result of porting OpenGL code that rendered a complicated structure, and many of the pieces are not connected together, but need to be at being as "one". Each actor is either a triangle Strip surface or a spline. The number of triangles aren't that many on each surface. However as I move the movable actor across the screen what would cause or not cause the entire assembly to redraw? For example if I add a clip box widget to the assembly the performance of that seems "real time" but when I move my small Actor across the rendering seems slower. It's clearly the stationary actor because when I make it invisible the movable actor is "real time". I'm using VTK 6.3. We did try seven but it crashed and we're on a tight deadline so were using the older render code. I have a quadro K 5200 and a quadro m5000 so plenty of juice. Immediate mode is off. I tried changing the opacity of the stationary actor but that had no impact. One idea I have is to subclass VTK actor for this stationary model. With that make sense? This single actor would be rendering all the pieces rather than multiple actors rendering each piece. Thanks for any suggestions! Rick Frank > On Jan 13, 2016, at 5:47 PM, David Gobbi wrote: > > Hi Richard, > > Does your OpenGL implementation do anything special to "clip out" the stationary data? > > I'm wondering whether the slowness is due to 1) the time taken to load the data onto the GPU or 2) the time taken for the GPU to render the polygons after they're in GPU memory. I'm assuming that both VTK and your OpenGL implementation do #2 on every render, since that is typical. > > VTK only reloads data onto the GPU when the data changes, but if something goes wrong and static data is re-loaded on every render, there is a huge performance hit. I believe that VTK's new OpenGL2 backend temporarily had some issues with unnecessarily reloading data, but those issues were fixed for VTK 7.0.0.rc1. Are you using the OpenGL2 back end? And what version of VTK? > > The vtkActor::Render() method should only be called by VTK itself. Applications call vtkRenderWindow::Render(). > > - David > > >> On Tue, Jan 12, 2016 at 9:32 PM, Richard Frank wrote: >> >> Hi, >> >> We are moving a small arrow actor around 3D space driven by data from a sensor, with another somewhat dense polygon model held stationary. We are moving the actor with setusertransform. >> >> We are only getting about 10 fps. An OpenGL implementation with the same data gets 50fps. >> >> What might we be doing wrong? It seems that the call to renderwindow->Render() is just drawing everything without clipping out data that doesn't need to be updated..... >> >> Also, what is the vtkActor::Render() method for? It seems to perform all the OpenGL calls but at the end nothing is drawn on the screen. Is that only to be called from within renderwindow->Render()? >> >> Our code uses a timer to read the data from the sensor, and parse the data, and then move the actor. >> >> Thanks, >> >> Rick -------------- next part -------------- An HTML attachment was scrubbed... URL: From eewing at cs.uoregon.edu Wed Jan 13 18:28:33 2016 From: eewing at cs.uoregon.edu (eewing) Date: Wed, 13 Jan 2016 15:28:33 -0800 Subject: [vtkusers] Thread-safety of New and Delete In-Reply-To: References: <3d9632395e8b52c676e61c2065377e70@cs.uoregon.edu> Message-ID: <93d3a37df5147bbb78f3278817f6fda5@cs.uoregon.edu> Hi David, By "Filter-by-filter", I meant that each filter threads its work separately, so threads are assigned at the beginning of the filter, and reassigned at the beginning of the next filter. Also, we're using a threadpool threading model with no direct control of the threads in the filters, which could be a problem in the future. The I/O I'm trying to thread isn't asynchronous, but rather I'm trying to thread the file readers so it can execute faster, and read multiple files simultaneously that make up a dataset. -Elliott On 2016-01-13 15:13, David Gobbi wrote: > What do you mean by "filter-by-filter" basis? Each filter is in its > own thread? > > If you need asynchronous IO, then a typical approach is to start the > thread that does the IO, and then poll that thread until the IO is > complete. When the IO is complete, feed the data into your pipeline. > This solution is not specific to VTK in any way, of course. It's just > a general approach to asynchronous IO that works as well with VTK as > with anything else. You can also have the thread read the data > piece-by-piece, which would be a bit more complicated. > > It also works for asynchronous processing. For long processing tasks, > we start a QThread that does the processing and emits a signal when > the processing is done. When our app receives the signal, it knows > it's safe to use the result. In this case Qt is doing the polling for > us as part of its mainloop. > > - David > > On Wed, Jan 13, 2016 at 3:39 PM, eewing wrote: > >> Hi David, >> >> Thanks for the quick response. That actually answers my issue. I'm >> working on threaded I/O as part of a large pipeline, described by >> your first example. The pipeline is executed in parts by threads, >> but on a filter-by-filter basis, with no way to lock data to a >> specific thread. >> >> What would your recommendation be to mitigate the issue? I've seen >> a suggestion to create a "I'm accessing VTK" mutex for whenever you >> are accessing VTK, but I'd like to avoid that if possible. >> >> -Elliott >> >> On 2016-01-13 14:20, David Gobbi wrote: >> Hi Elliott, >> >> Can you describe your issue in more detail? The VTK New and Delete >> calls should be thread safe. The two caveats for VTK and threads >> are: >> >> 1) All classes that do rendering should be in the same thread (all >> mappers, actors, renderers, etc), and there shouldn't be multiple >> threads hitting the same rendering context. >> >> 2) Movement of data between threads must be locked or otherwise >> done >> in a thread-safe manner. >> >> You would not, for example, create a single pipeline that is >> accessed >> from multiple threads. Each thread would have its own pipeline >> segment, with locks to synchronize a copy (or move) of data from >> the >> output of one segment to the input of another segment. >> >> - David >> >> On Wed, Jan 13, 2016 at 2:27 PM, eewing >> wrote: >> >> Hello, >> >> I'm running into some issues with VTK in a threaded environment, >> and it seems that the source of the problem is in VTK's New and >> Delete calls. So, are the New and Delete calls thread-safe? If not, >> is there a recommended alternative that I can use inside my >> threads? >> >> Best, >> -Elliott Ewing >> University of Oregon From david.gobbi at gmail.com Wed Jan 13 18:50:21 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 13 Jan 2016 16:50:21 -0700 Subject: [vtkusers] Thread-safety of New and Delete In-Reply-To: <93d3a37df5147bbb78f3278817f6fda5@cs.uoregon.edu> References: <3d9632395e8b52c676e61c2065377e70@cs.uoregon.edu> <93d3a37df5147bbb78f3278817f6fda5@cs.uoregon.edu> Message-ID: This should be fine as long as you never have a situation where one of these internal threads creates an object that is then accessed by one of the other internal threads. The internal threads have to be isolated from each other: they can all read the filter's input, but each thread must have its own independent chunk of memory that it writes to, i.e. no two threads should ever write to the same memory address. If each thread creates its own data object, and then these data objects are merged via a "reduce" operation after the threads are done, then that should work fine. Just remember that with a thread pool, the functor will generally be called more than once per thread, so e.g. if each functor call resulted in the creation of a new data object, you'd end up with more data objects than threads. Thread-local storage object must be designed with this in mind: each functor call gets the same thread-local storage that previous functor calls for that thread got. - David On Wed, Jan 13, 2016 at 4:28 PM, eewing wrote: > Hi David, > > By "Filter-by-filter", I meant that each filter threads its work > separately, so threads are assigned at the beginning of the filter, and > reassigned at the beginning of the next filter. Also, we're using a > threadpool threading model with no direct control of the threads in the > filters, which could be a problem in the future. The I/O I'm trying to > thread isn't asynchronous, but rather I'm trying to thread the file readers > so it can execute faster, and read multiple files simultaneously that make > up a dataset. > > -Elliott > > > On 2016-01-13 15:13, David Gobbi wrote: > >> What do you mean by "filter-by-filter" basis? Each filter is in its >> own thread? >> >> If you need asynchronous IO, then a typical approach is to start the >> thread that does the IO, and then poll that thread until the IO is >> complete. When the IO is complete, feed the data into your pipeline. >> This solution is not specific to VTK in any way, of course. It's just >> a general approach to asynchronous IO that works as well with VTK as >> with anything else. You can also have the thread read the data >> piece-by-piece, which would be a bit more complicated. >> >> It also works for asynchronous processing. For long processing tasks, >> we start a QThread that does the processing and emits a signal when >> the processing is done. When our app receives the signal, it knows >> it's safe to use the result. In this case Qt is doing the polling for >> us as part of its mainloop. >> >> - David >> >> On Wed, Jan 13, 2016 at 3:39 PM, eewing wrote: >> >> Hi David, >>> >>> Thanks for the quick response. That actually answers my issue. I'm >>> working on threaded I/O as part of a large pipeline, described by >>> your first example. The pipeline is executed in parts by threads, >>> but on a filter-by-filter basis, with no way to lock data to a >>> specific thread. >>> >>> What would your recommendation be to mitigate the issue? I've seen >>> a suggestion to create a "I'm accessing VTK" mutex for whenever you >>> are accessing VTK, but I'd like to avoid that if possible. >>> >>> -Elliott >>> >>> On 2016-01-13 14:20, David Gobbi wrote: >>> Hi Elliott, >>> >>> Can you describe your issue in more detail? The VTK New and Delete >>> calls should be thread safe. The two caveats for VTK and threads >>> are: >>> >>> 1) All classes that do rendering should be in the same thread (all >>> mappers, actors, renderers, etc), and there shouldn't be multiple >>> threads hitting the same rendering context. >>> >>> 2) Movement of data between threads must be locked or otherwise >>> done >>> in a thread-safe manner. >>> >>> You would not, for example, create a single pipeline that is >>> accessed >>> from multiple threads. Each thread would have its own pipeline >>> segment, with locks to synchronize a copy (or move) of data from >>> the >>> output of one segment to the input of another segment. >>> >>> - David >>> >>> On Wed, Jan 13, 2016 at 2:27 PM, eewing >>> wrote: >>> >>> Hello, >>> >>> I'm running into some issues with VTK in a threaded environment, >>> and it seems that the source of the problem is in VTK's New and >>> Delete calls. So, are the New and Delete calls thread-safe? If not, >>> is there a recommended alternative that I can use inside my >>> threads? >>> >>> Best, >>> -Elliott Ewing >>> University of Oregon >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jan 13 19:07:40 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 13 Jan 2016 17:07:40 -0700 Subject: [vtkusers] Moving an actor programmatically - performance issues In-Reply-To: References: Message-ID: Hi Richard, Yes, using a single actor for the stationary object should definitely speed things up, but I don't think you'd need to subclass vtkActor. You should be able to append all the stationary data into just one or two data objects (via vtkAppendPolyData) and display that data with one or two actors (you can append data even if the data is not contiguous). If there are many repeated shapes, you can use vtkGlyph3D to do the replication. I haven't used vtkAssembly much myself. - David On Wed, Jan 13, 2016 at 4:24 PM, Richard Frank wrote: > Hi David, > It seems like the culprit, upon further investigation, is that my > stationary actor is actually an assembly of approximately 100 vtkOpenGL > actors. This was the result of porting OpenGL code that rendered a > complicated structure, and many of the pieces are not connected together, > but need to be at being as "one". > Each actor is either a triangle Strip surface or a spline. The number of > triangles aren't that many on each surface. However as I move the movable > actor across the screen what would cause or not cause the entire assembly > to redraw? For example if I add a clip box widget to the assembly the > performance of that seems "real time" but when I move my small Actor across > the rendering seems slower. It's clearly the stationary actor because when > I make it invisible the movable actor is "real time". I'm using VTK 6.3. We > did try seven but it crashed and we're on a tight deadline so were using > the older render code. I have a quadro K 5200 and a quadro m5000 so plenty > of juice. Immediate mode is off. I tried changing the opacity of the > stationary actor but that had no impact. > > One idea I have is to subclass VTK actor for this stationary model. With > that make sense? This single actor would be rendering all the pieces rather > than multiple actors rendering each piece. > > Thanks for any suggestions! > > > Rick Frank > > On Jan 13, 2016, at 5:47 PM, David Gobbi wrote: > > Hi Richard, > > Does your OpenGL implementation do anything special to "clip out" the > stationary data? > > I'm wondering whether the slowness is due to 1) the time taken to load the > data onto the GPU or 2) the time taken for the GPU to render the polygons > after they're in GPU memory. I'm assuming that both VTK and your OpenGL > implementation do #2 on every render, since that is typical. > > VTK only reloads data onto the GPU when the data changes, but if something > goes wrong and static data is re-loaded on every render, there is a huge > performance hit. I believe that VTK's new OpenGL2 backend temporarily had > some issues with unnecessarily reloading data, but those issues were fixed > for VTK 7.0.0.rc1. Are you using the OpenGL2 back end? And what version > of VTK? > > The vtkActor::Render() method should only be called by VTK itself. > Applications call vtkRenderWindow::Render(). > > - David > > > On Tue, Jan 12, 2016 at 9:32 PM, Richard Frank wrote: > >> >> Hi, >> >> We are moving a small arrow actor around 3D space driven by data from a >> sensor, with another somewhat dense polygon model held stationary. We are >> moving the actor with setusertransform. >> >> We are only getting about 10 fps. An OpenGL implementation with the same >> data gets 50fps. >> >> What might we be doing wrong? It seems that the call to >> renderwindow->Render() is just drawing everything without clipping out data >> that doesn't need to be updated..... >> >> Also, what is the vtkActor::Render() method for? It seems to perform all >> the OpenGL calls but at the end nothing is drawn on the screen. Is that >> only to be called from within renderwindow->Render()? >> >> Our code uses a timer to read the data from the sensor, and parse the >> data, and then move the actor. >> >> Thanks, >> >> Rick >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rickfrank at me.com Wed Jan 13 19:09:14 2016 From: rickfrank at me.com (Richard Frank) Date: Wed, 13 Jan 2016 19:09:14 -0500 Subject: [vtkusers] Moving an actor programmatically - performance issues In-Reply-To: References: Message-ID: <90C6B499-85D8-4090-86DA-CE052A35E5F5@me.com> Thanks, sounds like a plan. Rick > On Jan 13, 2016, at 7:07 PM, David Gobbi wrote: > > Hi Richard, > > Yes, using a single actor for the stationary object should definitely speed things up, but I don't think you'd need to subclass vtkActor. > > You should be able to append all the stationary data into just one or two data objects (via vtkAppendPolyData) and display that data with one or two actors (you can append data even if the data is not contiguous). If there are many repeated shapes, you can use vtkGlyph3D to do the replication. > > I haven't used vtkAssembly much myself. > > - David > > > On Wed, Jan 13, 2016 at 4:24 PM, Richard Frank > wrote: > Hi David, > It seems like the culprit, upon further investigation, is that my stationary actor is actually an assembly of approximately 100 vtkOpenGL actors. This was the result of porting OpenGL code that rendered a complicated structure, and many of the pieces are not connected together, but need to be at being as "one". > Each actor is either a triangle Strip surface or a spline. The number of triangles aren't that many on each surface. However as I move the movable actor across the screen what would cause or not cause the entire assembly to redraw? For example if I add a clip box widget to the assembly the performance of that seems "real time" but when I move my small Actor across the rendering seems slower. It's clearly the stationary actor because when I make it invisible the movable actor is "real time". I'm using VTK 6.3. We did try seven but it crashed and we're on a tight deadline so were using the older render code. I have a quadro K 5200 and a quadro m5000 so plenty of juice. Immediate mode is off. I tried changing the opacity of the stationary actor but that had no impact. > > One idea I have is to subclass VTK actor for this stationary model. With that make sense? This single actor would be rendering all the pieces rather than multiple actors rendering each piece. > > Thanks for any suggestions! > > > Rick Frank > > On Jan 13, 2016, at 5:47 PM, David Gobbi > wrote: > >> Hi Richard, >> >> Does your OpenGL implementation do anything special to "clip out" the stationary data? >> >> I'm wondering whether the slowness is due to 1) the time taken to load the data onto the GPU or 2) the time taken for the GPU to render the polygons after they're in GPU memory. I'm assuming that both VTK and your OpenGL implementation do #2 on every render, since that is typical. >> >> VTK only reloads data onto the GPU when the data changes, but if something goes wrong and static data is re-loaded on every render, there is a huge performance hit. I believe that VTK's new OpenGL2 backend temporarily had some issues with unnecessarily reloading data, but those issues were fixed for VTK 7.0.0.rc1. Are you using the OpenGL2 back end? And what version of VTK? >> >> The vtkActor::Render() method should only be called by VTK itself. Applications call vtkRenderWindow::Render(). >> >> - David >> >> >> On Tue, Jan 12, 2016 at 9:32 PM, Richard Frank > wrote: >> >> Hi, >> >> We are moving a small arrow actor around 3D space driven by data from a sensor, with another somewhat dense polygon model held stationary. We are moving the actor with setusertransform. >> >> We are only getting about 10 fps. An OpenGL implementation with the same data gets 50fps. >> >> What might we be doing wrong? It seems that the call to renderwindow->Render() is just drawing everything without clipping out data that doesn't need to be updated..... >> >> Also, what is the vtkActor::Render() method for? It seems to perform all the OpenGL calls but at the end nothing is drawn on the screen. Is that only to be called from within renderwindow->Render()? >> >> Our code uses a timer to read the data from the sensor, and parse the data, and then move the actor. >> >> Thanks, >> >> Rick > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Wed Jan 13 21:28:33 2016 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Wed, 13 Jan 2016 19:28:33 -0700 (MST) Subject: [vtkusers] Import 3DS file and its texture Message-ID: <1452738513108-5735962.post@n5.nabble.com> Hello everyone, I am doing some works related to 3DS file. After loading the .3ds file using vtk3DSImporter, I found that the relevant texture cannot be loaded together. Anyone know how to load the texture with the .3ds file? Any advice is appreciated. Many thanks! Best Wishes! -- View this message in context: http://vtk.1045678.n5.nabble.com/Import-3DS-file-and-its-texture-tp5735962.html Sent from the VTK - Users mailing list archive at Nabble.com. From David.MOUSSAUD at cea.fr Thu Jan 14 03:51:32 2016 From: David.MOUSSAUD at cea.fr (MOUSSAUD David 244079) Date: Thu, 14 Jan 2016 08:51:32 +0000 Subject: [vtkusers] opengl2 : set the RGB color to a vertex with vtkPolyData and vtkPolyDataMapper Message-ID: <7A18A422C44BE34E947C1F96625E60BD0895FA34@EXDAG0-A1.intra.cea.fr> Dear all, I'm trying to use the opengl2 backend rendering. I am with the 6.3 release version. I have a working code to display 3 colored vertex that works with opengl1 (cf below and attached file). // Setup points points = vtkSmartPointer::New(); // Setup the colors array colors = vtkSmartPointer::New(); colors->SetNumberOfComponents(3); colors->SetName("Colors"); // create a vertex vertex = vtkSmartPointer::New(); // list of all the vertices vertices= vtkSmartPointer::New(); nb_points = 3; points->Resize(nb_points); vertices->Initialize(); colors->Initialize(); points->SetPoint(0, 0.1, 0.0, 0.0); vertex->GetPointIds()->SetId(0,0); vertices->InsertNextCell(vertex); colors->InsertNextTuple3(255,0,0); points->SetPoint(1, 0, 0.1, 0.0); vertex->GetPointIds()->SetId(0,1); vertices->InsertNextCell(vertex); colors->InsertNextTuple3(0,255,0); points->SetPoint(2, 0, 0.0, 0.1); vertex->GetPointIds()->SetId(0,2); vertices->InsertNextCell(vertex); colors->InsertNextTuple3(0,0,255); // Create a polydata object and add everything to it polydata = vtkSmartPointer::New(); polydata->SetPoints(points); polydata->SetVerts(vertices); polydata->GetPointData()->SetScalars(colors); mapper = vtkSmartPointer::New(); mapper->SetInputData(polydata); actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(5); // Setup window renderWindow = vtkSmartPointer::New(); // Setup renderer renderer = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); renderer->AddActor(actor); renderer->ResetCamera(); this->SetRenderWindow(renderWindow); When I compile the same project with my vtk library compiled with the opengl2 backend rendering, I have this error : ERROR: In C:\work\lib\vtk\VTK-6.3.0\VTK-6.3.0\Rendering\OpenGL2\vtkOpenGLPolyDataMapper.cxx, line 1223 vtkOpenGLPolyDataMapper (0000000000501B90): Error setting 'vertexMC' in shader VAO. ERROR: In C:\work\lib\vtk\VTK-6.3.0\VTK-6.3.0\Rendering\OpenGL2\vtkOpenGLPolyDataMapper.cxx, line 1250 vtkOpenGLPolyDataMapper (0000000000501B90): Error setting 'scalarColor' in shader VAO. For information, I've tried the same with a vtkPlyReader based project and I've succeed to render it with opengl2 backend (and it works very much better !) Best Regards, David. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: qvtkwidgetrendu3d.cpp URL: From wumengda at gmail.com Thu Jan 14 10:42:15 2016 From: wumengda at gmail.com (Mengda Wu) Date: Thu, 14 Jan 2016 10:42:15 -0500 Subject: [vtkusers] BUG: vtkImageMapToColors does not output with input spacing and origin In-Reply-To: References: Message-ID: I confirm this problem is NOT in vtkImageMapToColors but in vtkMetaImageWriter. Thanks a lot for your fix! It works now. On Wed, Jan 13, 2016 at 1:52 PM, David Gobbi wrote: > I've posted a fix that you can try: > > https://gitlab.kitware.com/vtk/vtk/commit/5efcd8d2 > > On Wed, Jan 13, 2016 at 9:49 AM, David Gobbi > wrote: > >> Hi Mengda, >> >> If the vtkImageMapToColors was changing the spacing and origin of the >> images, then many of the nightly VTK tests would be failing, so I was kind >> of suspicious about this. >> >> I tried a few things. >> >> 1) First, I ran your program as-is. And yes, the output .mha file had >> (1,1,1) spacing. >> >> 2) Then, I added imageColor->Update(), and the spacing of the output .mha >> file was correct: >> >> Spacing: (0.5, 1.12048, 1) >> Origin: (10, 20, 0) >> >> 3) Then, I removed imageColor->Update(), and replaced the >> vtkMetaImageWriter with vtkNIFTIImageWriter. The spacing in the .nii file >> was correct. >> >> 4) Then, I put the vtkMetaImageWriter back, and replaced >> vtkImageMapToColors with vtkImageCast. The resulting .mha file had spacing >> (1,1,1). >> >> So this tells me: >> >> A) The problem is not specific to vtkImageMapToColors. >> B) The problem appears to be specific to vtkMetaImageWriter >> C) The problem goes away if I add an Update() before the writer >> >> Mengda, can you confirm this by trying a different image writer? >> >> - David >> >> >> On Wed, Jan 13, 2016 at 8:44 AM, Mengda Wu wrote: >> >>> Has anyone tested this bug? >>> >>> Thanks! >>> >>> On Wed, Jan 6, 2016 at 4:22 PM, Mengda Wu wrote: >>> >>>> Hi Vtkusers, >>>> >>>> I found a bug in vtkImageMapToColors. It does not output with input >>>> spacing and origin. It sets the spacing to [1,1,1] and origin to [0,0,0]. I >>>> am using VTK 6.2 but I believe it happens also in VTK 7.0. Can you fix >>>> this? Here is a test program and a sample image (input.mha) and its >>>> output(input-colormap.mha): >>>> >>>> vtkSmartPointer inputReader = >>>> vtkSmartPointer::New(); >>>> inputReader->SetFileName(argv[1]); >>>> try >>>> { >>>> inputReader->Update(); >>>> } >>>> catch(...) >>>> { >>>> std::cerr << "Error occurs when reading " << argv[1] << std::endl; >>>> return EXIT_FAILURE; >>>> } >>>> >>>> vtkSmartPointer lookupTable = >>>> vtkSmartPointer::New(); >>>> lookupTable->SetTableRange(0.0, 255.0); >>>> lookupTable->SetNumberOfTableValues(256); >>>> lookupTable->SetTableValue(0, 0.0, 0.0, 0.0, 0.0); >>>> for(vtkIdType i=1; i<256; i++) >>>> lookupTable->SetTableValue(i, 1.0, 0.0, 0.0, 0.4); >>>> lookupTable->Build(); >>>> vtkSmartPointer imageColor = >>>> vtkSmartPointer::New(); >>>> imageColor->SetInputConnection(inputReader->GetOutputPort()); >>>> imageColor->SetOutputFormatToRGBA(); >>>> imageColor->SetLookupTable(lookupTable); >>>> >>>> vtkSmartPointer< vtkMetaImageWriter > writer = vtkSmartPointer< >>>> vtkMetaImageWriter >::New(); >>>> writer->SetFileName(argv[2]); >>>> writer->SetInputConnection(imageColor->GetOutputPort()); >>>> try >>>> { >>>> writer->Write(); >>>> } >>>> catch(...) >>>> { >>>> std::cerr << "Error occurs when writing " << argv[2] << std::endl; >>>> return EXIT_FAILURE; >>>> } >>>> >>>> Thanks, >>>> Mengda >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From theryame at gmail.com Thu Jan 14 10:59:44 2016 From: theryame at gmail.com (=?UTF-8?Q?Am=C3=A9lie_Thery?=) Date: Thu, 14 Jan 2016 16:59:44 +0100 Subject: [vtkusers] Issue with clipping vtkPolyhedron with vtkBoxClipDataSet Message-ID: Hi ! I am trying to clip a vtkPolyhedron in a vtkUnstructuredGrid with a vtkBoxClipDataSet, but the whole disappears after clipping. I am using : vtkSmartPointer clipper =vtkSmartPointer::New(); clipper->SetInputData(Grid); clipper->SetBoxClip(plan[1]->GetNormal(),plan[1]->GetOrigin(),plan[2]->GetNormal(),plan[2]->GetOrigin(),plan[3]->GetNormal(),plan[3]->GetOrigin(),plan[0]->GetNormal(),plan[0]->GetOrigin(),plan[4]->GetNormal(),plan[4]->GetOrigin(),plan[5]->GetNormal(),plan[5]->GetOrigin()); clipper->Update(); vtkDataSetMapper* clipMapper =vtkDataSetMapper::New(); clipMapper->ImmediateModeRenderingOn(); clipMapper->SetInputData(clipper->GetOutput()); actor->SetMapper(clipMapper); The grid is defined with this function, and without clipping it works : void CTestMDI2109Doc::MakePolyhedron(int numpiece,vtkSmartPointer uGrid,\ vtkSmartPointer hexs,int nbsommet,int neg0pos1,\ int x0y1z2, vtkSmartPointer points, float epaisseur,int nbface, int nbmaxsommetface) { int coef=1; double x=0,y=0,z=0; if (neg0pos1==0) coef=-1; if (x0y1z2==0) x=coef*epaisseur; if (x0y1z2==1) y=coef*epaisseur; if (x0y1z2==2) z=coef*epaisseur; double* pt; vtkSmartPointer Points =vtkSmartPointer::New(); for (int i=0; iInsertNextPoint(points->GetPoint(i)); } for (int j=nbmaxsommetface; jGetPoint(j-nbmaxsommetface); pt[0]+=x; pt[1]+=y; pt[2]+=z; Points->InsertNextPoint(pt); } vtkIdType PointsIds[NBSOMMETMAX]; for (int k=0; k Faces =vtkSmartPointer::New(); for (int i = 0; i < nbface; i++) { Faces->InsertNextCell(nbmaxsommetface, Face[i]); } uGrid->InsertNextCell(VTK_POLYHEDRON,nbsommet, PointsIds,nbface, Faces->GetPointer()); uGrid->SetPoints(Points); } If someone has an any idea :) Thanks, Am?lie -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk12af6bc42 at kant.sophonet.de Thu Jan 14 15:17:25 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Thu, 14 Jan 2016 21:17:25 +0100 Subject: [vtkusers] =?utf-8?q?VTK_7=2E0=2E0=2ERC1_=28and_releases_before?= =?utf-8?q?=29=3A_X-OpenGL_depth_test=28=3F=29_problems_when_using_QVTKRen?= =?utf-8?q?derWindow?= Message-ID: <73effde40706aa0ebc5aa5dc361dee12@srv19.sysproserver.de> Dear list, when trying to run a Qt Python application using the qt.QTVTKRenderWindow, there are depth test problems. Examples/Tutorial/Step1/Python/Cone.py works perfect, but with a simple QVTKRenderWindow example (based on https://gist.github.com/samueljohn/3090097, needs two more imports though), there are depth test problems, i.e. it appears that for some reason no depth test is applied (so the last drawn primitive is always visible on top). When doing export MESA_DEBUG=1 before running the two scripts, there is one warning in the Examples/Tutorial/Step1/Python/Cone.py, Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable [but everything looks fine], but many more with the QVTKRenderWindow Mesa: User error: GL_INVALID_OPERATION in glDrawBuffer(buffer=0x405) Mesa: User error: GL_INVALID_OPERATION in glReadBuffer(buffer=0x405) ... I am running Mesa 9.2.3 on my system (OpenSUSE 13.1), so I cannot switch to the OpenGL2 rendering backend (which might resolve the problem? - don't know...). Any hints? Thanks, sophonet From david.gobbi at gmail.com Thu Jan 14 15:39:51 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 14 Jan 2016 13:39:51 -0700 Subject: [vtkusers] VTK 7.0.0.RC1 (and releases before): X-OpenGL depth test(?) problems when using QVTKRenderWindow In-Reply-To: <73effde40706aa0ebc5aa5dc361dee12@srv19.sysproserver.de> References: <73effde40706aa0ebc5aa5dc361dee12@srv19.sysproserver.de> Message-ID: Hi Sophonet, QVTKRenderWindowInteractor.py has a "main" and can be run as an example. If you run it, does it show the same problem? I recently tried it with VTK 7.0.0.rc1 and didn't see any depth buffer issues (using Ubuntu 12.04). - David On Thu, Jan 14, 2016 at 1:17 PM, Sophonet wrote: > Dear list, > > when trying to run a Qt Python application using the qt.QTVTKRenderWindow, > there are depth test problems. > > Examples/Tutorial/Step1/Python/Cone.py works perfect, but with a simple > QVTKRenderWindow example (based on > https://gist.github.com/samueljohn/3090097, needs two more imports > though), there are depth test problems, i.e. it appears that for some > reason no depth test is applied (so the last drawn primitive is always > visible on top). > > When doing > > export MESA_DEBUG=1 > > before running the two scripts, there is one warning in the > Examples/Tutorial/Step1/Python/Cone.py, > > Mesa warning: couldn't open libtxc_dxtn.so, software DXTn > compression/decompression unavailable > > [but everything looks fine], > > but many more with the QVTKRenderWindow > > Mesa: User error: GL_INVALID_OPERATION in glDrawBuffer(buffer=0x405) > Mesa: User error: GL_INVALID_OPERATION in glReadBuffer(buffer=0x405) > ... > > I am running Mesa 9.2.3 on my system (OpenSUSE 13.1), so I cannot switch > to the OpenGL2 rendering backend (which might resolve the problem? - don't > know...). > > Any hints? > > Thanks, > > sophonet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jan 14 16:07:48 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 14 Jan 2016 16:07:48 -0500 Subject: [vtkusers] announce: vtk 7.0.0 release candidate 2 is ready Message-ID: I'm happy to let you know that next release candidate in the VTK 7.0 release cycle is ready for you to try. Thank you everyone who tried and provided feedback and updates based on rc1. As usual you can find the source, data, and vtkpython binary packages here: http://www.vtk.org/download/#candidate Please try this version of VTK and report any issues to the list or the bug tracker so that we can try to address them before VTK 7.0.0 final in a few weeks time. The changes from rc1 are as follows: commit bc6c71ea79dc7bd7523b81aa1d1b5e6a98d57daf Author: T.J. Corona Deprecating vtkVolumeRaycastMapper and vtkVolumeTextureMapper2D/3D. commit 6b7e888a2c2d91956af0bf8dcd8a48c9717b9d76 Author: Ken Martin update for newer versions of iOS commit a849580122154f99ab343e8ab2eb40b49c05f89d Author: Boris Nagaev Fix CMake error if in directory with ++ in name. commit 46a54e5ab8e77d817fd6bfa0816c9e987673c896 Author: David Gobbi BUG 15914: Fix corrupt image from vtkImageResliceMapper commit 69bafcd8bada56f7b307740f53635e8adc980408 Author: Ken Martin Fix some coverity issues commit fff730946a7c779fe5cb34d199a3028388e57e6f Author: Ken Martin Free up memory in the point gaussian commit 5146150ed9d33345fe7d2d606a230a86c738dc91 Author: Fabian Wenzel Fixes QTVTKRenderWindowInteractor for python3 commit 9d952e9283c66ed8c86fd92d54216504e9fe50ed Author: T.J. Corona Fix memory leak in vtkMath::SolveLeastSquares. commit e7e71c4e513b93d9879a797708cf362e3cc5bf66 Author: Ken Martin get a 3.2 context from OS mesa using new funcs commit 1cbd9fde716101d363aba9d34d96feb8ecbdd856 Author: Zlib Upstream zlib 2015-12-14 (751703ae) commit ea74dd0bfcd2ab93c8b668648693f6393d8cc93c Author: David Gobbi zlib: remove zlib1.rc from the list of used files. commit 1cb28ce76d1480efe6b11d76dd83fafc038f197e Author: David Gobbi Change deprecation warning to "VTK 7.0". commit 4a1fbefe00db0184aa088eaacdd08a023c666f9f Author: David Gobbi Remove AGL.framework from OS X OPENGL_LIBRARIES. commit 88dfac4a47cf8cdf0aca82e649753a5f5e85fe42 Author: David Gobbi Synchronize vtkMatrix3x3 with vtkMatrix4x4. commit 986d4c8b75c9a2cf85e0dc5564e652d6bd48c735 Author: David Gobbi Remove warning about deprecated method usage. commit b5af8d4bbd5d348623c2c7451a417e07e3010c9a Author: Zlib Upstream zlib 2015-12-09 (acc12639) commit 1ddf7372bd7ce3329033beea21dc0cc638e6e136 Author: David Gobbi Eliminate C-style casts from vtkMatrix4x4. commit a16e1843cf92f5159d6b002b12f0a045e9d2c161 Author: David Gobbi Rename Element parameter to element. commit d9c5ca00826dafabd8ddd87e409e1611f42ec621 Author: David Gobbi Mark legacy methods as "legacy". commit 8af584db104054a9350bb4107ada0cb1dbbb06cc Author: Brad King ThirdParty: Improve update script default merge message behavior commit d0ecfc35705267e22213297a49b23550b74ded24 Author: David Gobbi Remove the legacy BTX/ETX markers. commit 7afac239c92064750ed9bfab24a120dc26915a57 Author: David Gobbi Move some comments so they become visible to doxygen. commit 3eda5f89ae77d218ba854201fa1d02f803055f48 Author: Brad King ThirdParty: Teach update script to find upstream hash in commit message commit d8fb062a7bc89b52b40ccfc71eaca7246f19022e Author: Brad King ThirdParty: Teach update script to store upstream hash in commit message commit 51a19f27c5a03dedb35507823b0467fddf160f29 Author: MetaIO Upstream metaio 2015-11-23 (4c85a18e) commit bf1a55acb8277231d47582a756bef5b66e52f2e4 Author: JsonCpp Upstream jsoncpp 2015-10-01 (eb1ddde0) commit 0531c5612667097dc0d4244389eb2fa3ecd695d9 Author: Libpng Upstream png 2015-12-07 (63adbb10) commit 4032eee18eda3415766af236cfc5756e80bec3a6 Author: Zlib Upstream zlib 2015-11-18 (0abb295c) commit 60d6c9acdf09b7d24c456759b267ac524b2f0962 Author: Ben Boeckel ios: fix newline-at-end-of-file commit 0a5666757d84b3ad62e3fda4032dafe60d3f21f5 Author: Dave DeMarle fix a cmake warning for users of VTK thanks! David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthew.brett at gmail.com Thu Jan 14 17:03:32 2016 From: matthew.brett at gmail.com (Matthew Brett) Date: Thu, 14 Jan 2016 14:03:32 -0800 Subject: [vtkusers] [vtk-developers] announce: vtk 7.0.0 release candidate 2 is ready In-Reply-To: References: Message-ID: Hi, On Thu, Jan 14, 2016 at 1:07 PM, David E DeMarle wrote: > I'm happy to let you know that next release candidate in the VTK 7.0 release > cycle is ready for you to try. Thank you everyone who tried and provided > feedback and updates based on rc1. > > As usual you can find the source, data, and vtkpython binary packages here: > > http://www.vtk.org/download/#candidate > > Please try this version of VTK and report any issues to the list or the > bug tracker so that we can try to address them before VTK 7.0.0 final in a > few weeks time. > > The changes from rc1 are as follows: > commit bc6c71ea79dc7bd7523b81aa1d1b5e6a98d57daf > Author: T.J. Corona > > Deprecating vtkVolumeRaycastMapper and vtkVolumeTextureMapper2D/3D. > > commit 6b7e888a2c2d91956af0bf8dcd8a48c9717b9d76 > Author: Ken Martin > > update for newer versions of iOS > > commit a849580122154f99ab343e8ab2eb40b49c05f89d > Author: Boris Nagaev > > Fix CMake error if in directory with ++ in name. > > commit 46a54e5ab8e77d817fd6bfa0816c9e987673c896 > Author: David Gobbi > > BUG 15914: Fix corrupt image from vtkImageResliceMapper > > commit 69bafcd8bada56f7b307740f53635e8adc980408 > Author: Ken Martin > > Fix some coverity issues > > commit fff730946a7c779fe5cb34d199a3028388e57e6f > Author: Ken Martin > > Free up memory in the point gaussian > > commit 5146150ed9d33345fe7d2d606a230a86c738dc91 > Author: Fabian Wenzel > > Fixes QTVTKRenderWindowInteractor for python3 > > commit 9d952e9283c66ed8c86fd92d54216504e9fe50ed > Author: T.J. Corona > > Fix memory leak in vtkMath::SolveLeastSquares. > > commit e7e71c4e513b93d9879a797708cf362e3cc5bf66 > Author: Ken Martin > > get a 3.2 context from OS mesa using new funcs > > commit 1cbd9fde716101d363aba9d34d96feb8ecbdd856 > Author: Zlib Upstream > > zlib 2015-12-14 (751703ae) > > commit ea74dd0bfcd2ab93c8b668648693f6393d8cc93c > Author: David Gobbi > > zlib: remove zlib1.rc from the list of used files. > > commit 1cb28ce76d1480efe6b11d76dd83fafc038f197e > Author: David Gobbi > > Change deprecation warning to "VTK 7.0". > > commit 4a1fbefe00db0184aa088eaacdd08a023c666f9f > Author: David Gobbi > > Remove AGL.framework from OS X OPENGL_LIBRARIES. > > commit 88dfac4a47cf8cdf0aca82e649753a5f5e85fe42 > Author: David Gobbi > > Synchronize vtkMatrix3x3 with vtkMatrix4x4. > > commit 986d4c8b75c9a2cf85e0dc5564e652d6bd48c735 > Author: David Gobbi > > Remove warning about deprecated method usage. > > commit b5af8d4bbd5d348623c2c7451a417e07e3010c9a > Author: Zlib Upstream > > zlib 2015-12-09 (acc12639) > > commit 1ddf7372bd7ce3329033beea21dc0cc638e6e136 > Author: David Gobbi > > Eliminate C-style casts from vtkMatrix4x4. > > commit a16e1843cf92f5159d6b002b12f0a045e9d2c161 > Author: David Gobbi > > Rename Element parameter to element. > > commit d9c5ca00826dafabd8ddd87e409e1611f42ec621 > Author: David Gobbi > > Mark legacy methods as "legacy". > > commit 8af584db104054a9350bb4107ada0cb1dbbb06cc > Author: Brad King > > ThirdParty: Improve update script default merge message behavior > > commit d0ecfc35705267e22213297a49b23550b74ded24 > Author: David Gobbi > > Remove the legacy BTX/ETX markers. > > commit 7afac239c92064750ed9bfab24a120dc26915a57 > Author: David Gobbi > > Move some comments so they become visible to doxygen. > > commit 3eda5f89ae77d218ba854201fa1d02f803055f48 > Author: Brad King > > ThirdParty: Teach update script to find upstream hash in commit message > > commit d8fb062a7bc89b52b40ccfc71eaca7246f19022e > Author: Brad King > > ThirdParty: Teach update script to store upstream hash in commit message > > commit 51a19f27c5a03dedb35507823b0467fddf160f29 > Author: MetaIO Upstream > > metaio 2015-11-23 (4c85a18e) > > commit bf1a55acb8277231d47582a756bef5b66e52f2e4 > Author: JsonCpp Upstream > > jsoncpp 2015-10-01 (eb1ddde0) > > commit 0531c5612667097dc0d4244389eb2fa3ecd695d9 > Author: Libpng Upstream > > png 2015-12-07 (63adbb10) > > commit 4032eee18eda3415766af236cfc5756e80bec3a6 > Author: Zlib Upstream > > zlib 2015-11-18 (0abb295c) > > commit 60d6c9acdf09b7d24c456759b267ac524b2f0962 > Author: Ben Boeckel > > ios: fix newline-at-end-of-file > > commit 0a5666757d84b3ad62e3fda4032dafe60d3f21f5 > Author: Dave DeMarle > > fix a cmake warning for users of VTK I noticed y'all are still using the standalone vtkpython as your binary distribution method for OSX. Do you have any plans for making a Python wheel for VTK? It would make it much easier to install VTK into an existing Python installation, and therefore to use VTK with lots of other scientific / technical Python packages. I'm very happy to help with this, if you can give me some pointers as to how to proceed. Cheers, Matthew From dave.demarle at kitware.com Thu Jan 14 17:17:50 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 14 Jan 2016 17:17:50 -0500 Subject: [vtkusers] [vtk-developers] announce: vtk 7.0.0 release candidate 2 is ready In-Reply-To: References: Message-ID: I very much agree. The only thing holding it back on the Kitware side is that we've not found a chunk of time to sit down, think about it, and do it. Same thing goes for putting out SDKs for the major platforms. :( David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jan 14, 2016 at 5:03 PM, Matthew Brett wrote: > Hi, > > On Thu, Jan 14, 2016 at 1:07 PM, David E DeMarle > wrote: > > I'm happy to let you know that next release candidate in the VTK 7.0 > release > > cycle is ready for you to try. Thank you everyone who tried and provided > > feedback and updates based on rc1. > > > > As usual you can find the source, data, and vtkpython binary packages > here: > > > > http://www.vtk.org/download/#candidate > > > > Please try this version of VTK and report any issues to the list or the > > bug tracker so that we can try to address them before VTK 7.0.0 final in > a > > few weeks time. > > > > The changes from rc1 are as follows: > > commit bc6c71ea79dc7bd7523b81aa1d1b5e6a98d57daf > > Author: T.J. Corona > > > > Deprecating vtkVolumeRaycastMapper and vtkVolumeTextureMapper2D/3D. > > > > commit 6b7e888a2c2d91956af0bf8dcd8a48c9717b9d76 > > Author: Ken Martin > > > > update for newer versions of iOS > > > > commit a849580122154f99ab343e8ab2eb40b49c05f89d > > Author: Boris Nagaev > > > > Fix CMake error if in directory with ++ in name. > > > > commit 46a54e5ab8e77d817fd6bfa0816c9e987673c896 > > Author: David Gobbi > > > > BUG 15914: Fix corrupt image from vtkImageResliceMapper > > > > commit 69bafcd8bada56f7b307740f53635e8adc980408 > > Author: Ken Martin > > > > Fix some coverity issues > > > > commit fff730946a7c779fe5cb34d199a3028388e57e6f > > Author: Ken Martin > > > > Free up memory in the point gaussian > > > > commit 5146150ed9d33345fe7d2d606a230a86c738dc91 > > Author: Fabian Wenzel > > > > Fixes QTVTKRenderWindowInteractor for python3 > > > > commit 9d952e9283c66ed8c86fd92d54216504e9fe50ed > > Author: T.J. Corona > > > > Fix memory leak in vtkMath::SolveLeastSquares. > > > > commit e7e71c4e513b93d9879a797708cf362e3cc5bf66 > > Author: Ken Martin > > > > get a 3.2 context from OS mesa using new funcs > > > > commit 1cbd9fde716101d363aba9d34d96feb8ecbdd856 > > Author: Zlib Upstream > > > > zlib 2015-12-14 (751703ae) > > > > commit ea74dd0bfcd2ab93c8b668648693f6393d8cc93c > > Author: David Gobbi > > > > zlib: remove zlib1.rc from the list of used files. > > > > commit 1cb28ce76d1480efe6b11d76dd83fafc038f197e > > Author: David Gobbi > > > > Change deprecation warning to "VTK 7.0". > > > > commit 4a1fbefe00db0184aa088eaacdd08a023c666f9f > > Author: David Gobbi > > > > Remove AGL.framework from OS X OPENGL_LIBRARIES. > > > > commit 88dfac4a47cf8cdf0aca82e649753a5f5e85fe42 > > Author: David Gobbi > > > > Synchronize vtkMatrix3x3 with vtkMatrix4x4. > > > > commit 986d4c8b75c9a2cf85e0dc5564e652d6bd48c735 > > Author: David Gobbi > > > > Remove warning about deprecated method usage. > > > > commit b5af8d4bbd5d348623c2c7451a417e07e3010c9a > > Author: Zlib Upstream > > > > zlib 2015-12-09 (acc12639) > > > > commit 1ddf7372bd7ce3329033beea21dc0cc638e6e136 > > Author: David Gobbi > > > > Eliminate C-style casts from vtkMatrix4x4. > > > > commit a16e1843cf92f5159d6b002b12f0a045e9d2c161 > > Author: David Gobbi > > > > Rename Element parameter to element. > > > > commit d9c5ca00826dafabd8ddd87e409e1611f42ec621 > > Author: David Gobbi > > > > Mark legacy methods as "legacy". > > > > commit 8af584db104054a9350bb4107ada0cb1dbbb06cc > > Author: Brad King > > > > ThirdParty: Improve update script default merge message behavior > > > > commit d0ecfc35705267e22213297a49b23550b74ded24 > > Author: David Gobbi > > > > Remove the legacy BTX/ETX markers. > > > > commit 7afac239c92064750ed9bfab24a120dc26915a57 > > Author: David Gobbi > > > > Move some comments so they become visible to doxygen. > > > > commit 3eda5f89ae77d218ba854201fa1d02f803055f48 > > Author: Brad King > > > > ThirdParty: Teach update script to find upstream hash in commit > message > > > > commit d8fb062a7bc89b52b40ccfc71eaca7246f19022e > > Author: Brad King > > > > ThirdParty: Teach update script to store upstream hash in commit > message > > > > commit 51a19f27c5a03dedb35507823b0467fddf160f29 > > Author: MetaIO Upstream > > > > metaio 2015-11-23 (4c85a18e) > > > > commit bf1a55acb8277231d47582a756bef5b66e52f2e4 > > Author: JsonCpp Upstream > > > > jsoncpp 2015-10-01 (eb1ddde0) > > > > commit 0531c5612667097dc0d4244389eb2fa3ecd695d9 > > Author: Libpng Upstream > > > > png 2015-12-07 (63adbb10) > > > > commit 4032eee18eda3415766af236cfc5756e80bec3a6 > > Author: Zlib Upstream > > > > zlib 2015-11-18 (0abb295c) > > > > commit 60d6c9acdf09b7d24c456759b267ac524b2f0962 > > Author: Ben Boeckel > > > > ios: fix newline-at-end-of-file > > > > commit 0a5666757d84b3ad62e3fda4032dafe60d3f21f5 > > Author: Dave DeMarle > > > > fix a cmake warning for users of VTK > > I noticed y'all are still using the standalone vtkpython as your > binary distribution method for OSX. > > Do you have any plans for making a Python wheel for VTK? It would > make it much easier to install VTK into an existing Python > installation, and therefore to use VTK with lots of other scientific / > technical Python packages. > > I'm very happy to help with this, if you can give me some pointers as > to how to proceed. > > Cheers, > > Matthew > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthew.brett at gmail.com Thu Jan 14 19:47:38 2016 From: matthew.brett at gmail.com (Matthew Brett) Date: Thu, 14 Jan 2016 16:47:38 -0800 Subject: [vtkusers] [vtk-developers] announce: vtk 7.0.0 release candidate 2 is ready In-Reply-To: References: Message-ID: Hi, On Thu, Jan 14, 2016 at 2:17 PM, David E DeMarle wrote: > I very much agree. > > The only thing holding it back on the Kitware side is that we've not found a > chunk of time to sit down, think about it, and do it. Same thing goes for > putting out SDKs for the major platforms. > > :( If you do manage to solve the pip install problem, it could have a big impact on the use of VTK on OSX. At the moment, users can do: pip install numpy scipy matplotlib etc to get the standard Python scientific packages. If they could also do: pip install vtk into the same environment, this would make it very easy to get started with using VTK. I previously pointed to an approach to building Python wheels without using the (somewhat obscure) standard Python distutils mechanism : http://vtk.1045678.n5.nabble.com/Help-building-Python-wheels-for-VTK-td5728074.html#a5733760 I wonder whether something like that could work within cmake? Cheers, Matthew From yihui.cao at qq.com Thu Jan 14 23:20:08 2016 From: yihui.cao at qq.com (=?ISO-8859-1?B?WWlodWkgQ2Fv?=) Date: Fri, 15 Jan 2016 12:20:08 +0800 Subject: [vtkusers] How to make vtkResliceCursorWidget can rotate axes at the same time? Message-ID: Dear All, When I used vtkResliceCursorWidget, I need make the axes of cursor can be rotated at the same time. But I don't know how to realize it. I find there is a description in vtkResliceCursorRepresentation.h that "The widget sets the manipulation mode. This can be one of : None, PanAndRotate, RotateBothAxes, ResizeThickness". Thus, I tried as: m_ResliceCursorRep = vtkSmartPointer< vtkResliceCursorThickLineRepresentation >::New(); m_ResliceCursorRep->SetManipulationMode(vtkResliceCursorRepresentation::RotateBothAxes); But the above code is no effect. I guess it must be I used wrong. Who can help me to correct it? Many thanks! Yihui Cao -------------- next part -------------- An HTML attachment was scrubbed... URL: From m4tu at yandex.ru Fri Jan 15 02:18:35 2016 From: m4tu at yandex.ru (- -) Date: Fri, 15 Jan 2016 10:18:35 +0300 Subject: [vtkusers] Java and vtkMPIController Message-ID: <1763601452842315@web12j.yandex.ru> An HTML attachment was scrubbed... URL: From vtk12af6bc42 at kant.sophonet.de Fri Jan 15 04:55:16 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Fri, 15 Jan 2016 10:55:16 +0100 Subject: [vtkusers] =?utf-8?q?VTK_7=2E0=2E0=2ERC1_=28and_releases_before?= =?utf-8?q?=29=3A_X-OpenGL_depth_test=28=3F=29_problems_when_using_QVTKRen?= =?utf-8?q?derWindow?= In-Reply-To: References: <73effde40706aa0ebc5aa5dc361dee12@srv19.sysproserver.de> Message-ID: <5a5ae99e14499b5908e2d2c2108684bb@srv19.sysproserver.de> Hi David, The problem occurs as well when running QVTKRenderWindowInteractor.py directly. I have tried picking the Mesa software renderer to exclude a graphics driver problem by LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe python PATHTO_/QVTKRenderWindowInteractor.py, but same problem. The software renderer is chosen by setting the two variables as I could verify with LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe glxinfo: ... OpenGL renderer string: Gallium 0.4 on softpipe OpenGL version string: 2.1 Mesa 9.2.3 OpenGL shading language version string: 1.30 ... I have found a related thread here (8 years old): http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html ...but as opposed to the problem described there, I do not see warnings on a missing depth buffer when turning on MESA_DEBUG=1 - only the errors with respect to glDrawBuffer / glReadBuffer (see my previous e-mail)... and in order to rule out device driver problems, I have forced software rendering as mentioned above. I would be happy to debug further if I would know how. Thanks, sophonet Am 2016-01-14 21:39, schrieb David Gobbi: > Hi Sophonet, > > QVTKRenderWindowInteractor.py has a "main" and can be run as an > example.? If you run it, does it show the same problem? > > I recently tried it with VTK 7.0.0.rc1 and didn't see any depth buffer > issues (using Ubuntu 12.04). > > ?- David > > On Thu, Jan 14, 2016 at 1:17 PM, Sophonet > wrote: > >> Dear list, >> >> when trying to run a Qt Python application using the >> qt.QTVTKRenderWindow, there are depth test problems. >> >> Examples/Tutorial/Step1/Python/Cone.py works perfect, but with a >> simple QVTKRenderWindow example (based on >> https://gist.github.com/samueljohn/3090097 [1], needs two more >> imports though), there are depth test problems, i.e. it appears that >> for some reason no depth test is applied (so the last drawn >> primitive is always visible on top). >> >> When doing >> >> export MESA_DEBUG=1 >> >> before running the two scripts, there is one warning in the >> Examples/Tutorial/Step1/Python/Cone.py, >> >> Mesa warning: couldn't open libtxc_dxtn.so, software DXTn >> compression/decompression unavailable >> >> [but everything looks fine], >> >> but many more with the QVTKRenderWindow >> >> Mesa: User error: GL_INVALID_OPERATION in >> glDrawBuffer(buffer=0x405) >> Mesa: User error: GL_INVALID_OPERATION in >> glReadBuffer(buffer=0x405) >> ... >> >> I am running Mesa 9.2.3 on my system (OpenSUSE 13.1), so I cannot >> switch to the OpenGL2 rendering backend (which might resolve the >> problem? - don't know...). >> >> Any hints? >> >> Thanks, >> >> ? ? ?sophonet > > > Links: > ------ > [1] https://gist.github.com/samueljohn/3090097 From ocomas at apelem.com Fri Jan 15 05:26:00 2016 From: ocomas at apelem.com (Olivier COMAS) Date: Fri, 15 Jan 2016 11:26:00 +0100 Subject: [vtkusers] VTK and QtQuick 2 Message-ID: <5698C938.9030305@apelem.com> Hi, I will answer my own question. It might help someone one day. So for those interested, I managed to make it work. In the QVTKFrameBufferObjectItem class, I used a vtkExternalOpenGLRenderWindow instead of a vtkGenericOpenGLRenderWindow. I passed directly the vtkExternalOpenGLRenderWindow object to the QVTKFramebufferObjectRenderer's constructor. No need to define a vtkInternalOpenGLRenderWindow anymore. And in the render() method of QVTKFramebufferObjectRenderer I simply call Render() on this vtkExternalOpenGLRenderWindow object (no push/pop state nor OpenGlInitState). It works with VTK 7.0 rc (and therefore the "new" OpenGL2 backend of VTK). I'm not sure it's the way that QVTKFrameBufferObjectItem and vtkExternalOpenGLRenderWindow are intented to be combined, but it works... Cheers, Olivier > On 11/01/2016 13:12:35, Olivier Comas wrote: > > Hi everyone, > > I was wondering if anyone managed to integrate VTK and Qt Quick 2. I > found this post: > https://gist.github.com/nocnokneo/c3fb01bb7ecaf437f7d6 which gives an > example of integration. And it works great with VTK 6.3. But using the > OpenGL2 backend in 6.3 or using VTK 7.0 rc, it crashes in > OpenGLInitState() at the first OpenGL call. Even a call to > ?glEnable(GL_DEBUG_OUTPUT);? crashes. I checked the handle returned by > wglGetCurrentContext() and it?s not NULL so it seems to have a valid > OpenGL context. That would be awesome to be able to use the ?new? VTK > rendering backend along with a GUI made with Qt Quick 2. > > I also found this post from Kitware: > http://www.kitware.com/blog/home/post/688. If I understand correctly, > ExternalVTKWidgetseems to be a helper class for making it easier to > use vtkExternalOpenGLRenderWindow, vtkExternalOpenGLRenderand > vtkExternalOpenGLCamera. But I could not find any working example. How > is it supposed to be used? Could we use those classes in a class > inheriting from QWindow so VTK can use the OpenGL context created by > Qt? It is how those classes are intented to be used? > > Do you intend to release a QVTKQuickItem or QVTKWindow at some point? > I know there is a QVTKWidget but there is nothing for Qt Quick. From > my understanding, ExternalVTKWidgetcould be used for QtQuick > integration. So do you intent to release a class to support QtQuick? > An example on how to use ExternalVTKWidgetwould be great already. > > Any help would be greatly appreciated. > > Regards, > > Olivier > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk12af6bc42 at kant.sophonet.de Fri Jan 15 06:44:38 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Fri, 15 Jan 2016 12:44:38 +0100 Subject: [vtkusers] =?utf-8?q?Combined_on-screen_and_off-screen_possible_w?= =?utf-8?q?ith_VTK-7=2E0=2E0_on_linux/X=3F?= Message-ID: <366a176fb2a1f7ef7fd824524595b51d@srv19.sysproserver.de> Dear list, in my application, I would like to display a vtkRenderWindow for user interaction, but I also would like to use off-screen functionality simultaneously to render pre-defined views / snapshots that are shown as static images, like "thumbnails" for different datasets. This was possible in VTK 5.10 on linux (by creating a dedicated vtkRenderWindow per thumbnail, setting OffScreenRenderingOn, rendering and capturing the resulting image with a vtkWindowToImageFilter). In VTK-7.0.0.rc1, using the OpenGL rendering backend on Mesa 9.2.3, I now get a segfault with the following backtrace: (gdb) bt #0 0x00007fffd045db90 in xcb_glx_get_string_string_length () from /usr/lib64/libxcb-glx.so.0 #1 0x00007fffd0cce605 in ?? () from /usr/lib64/libGL.so.1 #2 0x00007fffd0ccc2b6 in ?? () from /usr/lib64/libGL.so.1 #3 0x00007fffd14cd086 in vtkOpenGLExtensionManager::ReadOpenGLExtensions() () from /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 #4 0x00007fffd14cbd50 in vtkOpenGLExtensionManager::Update() () from /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 #5 0x00007fffd14cafd7 in vtkOpenGLExtensionManager::ExtensionSupported(char const*) () from /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 #6 0x00007fffd14ec8ea in vtkOpenGLRenderWindow::OpenGLInitContext() () from /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 #7 0x00007fffd14eae6d in vtkOpenGLRenderWindow::OpenGLInit() () from /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 #8 0x00007fffd1576932 in vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int) () Besides a remark that probably there could be better error handling than just letting the app crash without an exception being thrown, I would like to know if joint on-screen rendering and off-screen rendering is still possible somehow with VTK-7.0.0. I have made two approaches when configuring via CMake: (i) Setting VTK_OPENGL_HAS_OSMESA=True (no effect, I think I remember that in earlier versions, this allowed OSMESA_INCLUDE_DIR etc. to be set; this is not the case anymore, so does this flag still do something? Note that for VTK 5.10 as mentioned above I did not have to set this explicitly), (ii) Setting USE_OFFSXCREEN_EGL=True - resulting in an error that this could not be combined with VTK_USE_X. On Windows, combining on-screen and off-screen rendering as described in the second paragraph is possible. Any suggestions would be welcome, the Wiki page I have found on this topic is not fully understandable to me (http://www.vtk.org/Wiki/VTK/OSMesa_Support; does this mean that I have to switch on VTK_OPENGL_HAS_OSMESA or not?...) Thanks, sophonet From bryan.cole at teraview.com Fri Jan 15 12:08:55 2016 From: bryan.cole at teraview.com (Bryan Cole) Date: Fri, 15 Jan 2016 17:08:55 +0000 Subject: [vtkusers] problems with vtKProgrammableSource Message-ID: <1452877735.2638.193.camel@bryan.teraview.com> I'm trying to use a vtkProgrammableSource to create a StructuredPoints output using python and VTK-6.0.0. My test script is below. This fails with the error "ERROR: In /builddir/build/BUILD/VTK6.0.0/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx, line 815 vtkCompositeDataPipeline (0x2253f50): Input for connection index 0 on input port index 0 for algorithm vtkClipVolume(0x224e050) is of type vtkPolyData, but a vtkImageData is required." I.e. the programmable source is always giving a vtkPolyData output to the downstream filter (vtkClipVolume) instead of the desired StructuredPoints dataset. What am I doing wrong? Thanks, BC ##############example############# import vtk src = vtk.vtkProgrammableSource() def make_grid(): sp = src.GetStructurePointsOutput() sp.SetDimensions(50,50,50) sp.SetOrigin(-10,-10,-10) sp.SetSpacing(0.4,0.4,0.4) src.SetExecuteMethod(make_grid) func = vtk.vtkSphere() func.SetCenter(0,0,0) func.SetRadius(5.0) clip = vtk.vtkClipVolume() clip.SetInputConnection(src.GetOutputPort()) clip.SetClipFunction(func) map = vtk.vtkPolyDataMapper() map.SetInputConnection(clip.GetOutputPort()) map.ScalarVisibilityOff() surfaceActor = vtk.vtkActor() surfaceActor.SetMapper(map) # Create the RenderWindow, Renderer and both Actors ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # Add the actors to the renderer, set the background and size ren.AddActor(surfaceActor) iren.Initialize() renWin.Render() iren.Start() -- Group Leader, Technical Development Group - Teraview Ltd. Platinum Building, St. John's Innovation Park, Cambridge CB4 0DS, UK. tel: +44 (0)1223 435386, fax: +44 (0)1223 435382, web: www.teraview.com Registered Number: 04126946, VAT Number: 770 8883 84 ...preferred document formats: ODF (ISO/IEC 26300:2006), PDF -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Jan 15 12:30:55 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 15 Jan 2016 12:30:55 -0500 Subject: [vtkusers] problems with vtKProgrammableSource In-Reply-To: <1452877735.2638.193.camel@bryan.teraview.com> References: <1452877735.2638.193.camel@bryan.teraview.com> Message-ID: I could be wrong but programmable source doesn't have a SetRequestDataObjectMethod or a SetFillOutputPortInformation method which is where you might change that. I recommend you use the new vtkPyhtonAlgorithm instead. http://www.kitware.com/blog/home/post/737 David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Jan 15, 2016 at 12:08 PM, Bryan Cole wrote: > > I'm trying to use a vtkProgrammableSource to create a StructuredPoints > output using python and VTK-6.0.0. My test script is below. > > This fails with the error "ERROR: In > /builddir/build/BUILD/VTK6.0.0/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx, > line 815 > vtkCompositeDataPipeline (0x2253f50): Input for connection index 0 on > input port index 0 for algorithm vtkClipVolume(0x224e050) is of type > vtkPolyData, but a vtkImageData is required." > > I.e. the programmable source is always giving a vtkPolyData output to the > downstream filter (vtkClipVolume) instead of the desired > StructuredPoints dataset. What am I doing wrong? > > Thanks, > BC > > ##############example############# > import vtk > > src = vtk.vtkProgrammableSource() > def make_grid(): > sp = src.GetStructurePointsOutput() > sp.SetDimensions(50,50,50) > sp.SetOrigin(-10,-10,-10) > sp.SetSpacing(0.4,0.4,0.4) > > src.SetExecuteMethod(make_grid) > > func = vtk.vtkSphere() > func.SetCenter(0,0,0) > func.SetRadius(5.0) > > clip = vtk.vtkClipVolume() > clip.SetInputConnection(src.GetOutputPort()) > clip.SetClipFunction(func) > > map = vtk.vtkPolyDataMapper() > map.SetInputConnection(clip.GetOutputPort()) > map.ScalarVisibilityOff() > > surfaceActor = vtk.vtkActor() > surfaceActor.SetMapper(map) > > # Create the RenderWindow, Renderer and both Actors > ren = vtk.vtkRenderer() > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren) > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > > # Add the actors to the renderer, set the background and size > ren.AddActor(surfaceActor) > > iren.Initialize() > renWin.Render() > iren.Start() > > > > -- > Group Leader, Technical Development Group - Teraview Ltd. > Platinum Building, St. John's Innovation Park, Cambridge CB4 0DS, UK. > tel: +44 (0)1223 435386, fax: +44 (0)1223 435382, web: www.teraview.com Registered > Number: 04126946, VAT Number: 770 8883 84 > > ...preferred document formats: ODF (ISO/IEC 26300:2006), PDF > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 bryan.cole at teraview.com Fri Jan 15 12:41:02 2016 From: bryan.cole at teraview.com (Bryan Cole) Date: Fri, 15 Jan 2016 17:41:02 +0000 Subject: [vtkusers] problems with vtKProgrammableSource In-Reply-To: References: <1452877735.2638.193.camel@bryan.teraview.com> Message-ID: <1452879657.2638.196.camel@bryan.teraview.com> On Fri, 2016-01-15 at 12:30 -0500, David E DeMarle wrote: I could be wrong but programmable source doesn't have a SetRequestDataObjectMethod or a SetFillOutputPortInformation method which is where you might change that. I recommend you use the new vtkPyhtonAlgorithm instead. http://www.kitware.com/blog/home/post/737 Thanks for this tip. What version was this class introduced? My system vtk version is 6.0.0 and I can't see this class. Thanks, BC -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Jan 15 12:46:11 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 15 Jan 2016 12:46:11 -0500 Subject: [vtkusers] problems with vtKProgrammableSource In-Reply-To: <1452879657.2638.196.camel@bryan.teraview.com> References: <1452877735.2638.193.camel@bryan.teraview.com> <1452879657.2638.196.camel@bryan.teraview.com> Message-ID: 6.2 On further reflection (see vtkProgrammableSource::vtkProgrammableSource) it looks like the way you are supposed to choose the type of output is to connect to a particular output port. 0 = polydata 1 = structured points 2 = structured grid 3 = unstructured grid 4 = rectilinear grid Kind of awkward though so I still recommend you use vtkPythonAlgorithm if you can update to >= 6.2. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Jan 15, 2016 at 12:41 PM, Bryan Cole wrote: > On Fri, 2016-01-15 at 12:30 -0500, David E DeMarle wrote: > > I could be wrong but programmable source doesn't have a > SetRequestDataObjectMethod or a SetFillOutputPortInformation method which > is where you might change that. > > > > I recommend you use the new vtkPyhtonAlgorithm instead. > > http://www.kitware.com/blog/home/post/737 > > > > Thanks for this tip. What version was this class introduced? My system vtk > version is 6.0.0 and I can't see this class. > > Thanks, > BC > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 bryan.cole at teraview.com Fri Jan 15 13:01:29 2016 From: bryan.cole at teraview.com (Bryan Cole) Date: Fri, 15 Jan 2016 18:01:29 +0000 Subject: [vtkusers] problems with vtKProgrammableSource In-Reply-To: References: <1452877735.2638.193.camel@bryan.teraview.com> <1452879657.2638.196.camel@bryan.teraview.com> Message-ID: <1452880889.2638.199.camel@bryan.teraview.com> On Fri, 2016-01-15 at 12:46 -0500, David E DeMarle wrote: 6.2 On further reflection (see vtkProgrammableSource::vtkProgrammableSource) it looks like the way you are supposed to choose the type of output is to connect to a particular output port. 0 = polydata 1 = structured points 2 = structured grid 3 = unstructured grid 4 = rectilinear grid Ah. How do I select a particular output port? Kind of awkward though so I still recommend you use vtkPythonAlgorithm if you can update to >= 6.2. If I can I will. Thanks again, Bryan David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Jan 15, 2016 at 12:41 PM, Bryan Cole > wrote: On Fri, 2016-01-15 at 12:30 -0500, David E DeMarle wrote: I could be wrong but programmable source doesn't have a SetRequestDataObjectMethod or a SetFillOutputPortInformation method which is where you might change that. I recommend you use the new vtkPyhtonAlgorithm instead. http://www.kitware.com/blog/home/post/737 Thanks for this tip. What version was this class introduced? My system vtk version is 6.0.0 and I can't see this class. Thanks, BC _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Group Leader, Technical Development Group - Teraview Ltd. Platinum Building, St. John's Innovation Park, Cambridge CB4 0DS, UK. tel: +44 (0)1223 435386, fax: +44 (0)1223 435382, web: www.teraview.com Registered Number: 04126946, VAT Number: 770 8883 84 ...preferred document formats: ODF (ISO/IEC 26300:2006), PDF -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Jan 15 13:06:47 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 15 Jan 2016 13:06:47 -0500 Subject: [vtkusers] problems with vtKProgrammableSource In-Reply-To: <1452880889.2638.199.camel@bryan.teraview.com> References: <1452877735.2638.193.camel@bryan.teraview.com> <1452879657.2638.196.camel@bryan.teraview.com> <1452880889.2638.199.camel@bryan.teraview.com> Message-ID: clip.SetInputConnection(src.GetOutputPort()) -> clip.SetInputConnection(src.GetOutputPort(1)) David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Jan 15, 2016 at 1:01 PM, Bryan Cole wrote: > On Fri, 2016-01-15 at 12:46 -0500, David E DeMarle wrote: > > 6.2 > > > > On further reflection (see vtkProgrammableSource::vtkProgrammableSource) > it looks like the way you are supposed to choose the type of output is to > connect to a particular output port. > > > > 0 = polydata > > 1 = structured points > > 2 = structured grid > > 3 = unstructured grid > > 4 = rectilinear grid > > > Ah. How do I select a particular output port? > > > > > Kind of awkward though so I still recommend you use vtkPythonAlgorithm if > you can update to >= 6.2. > > > If I can I will. > > Thanks again, > > Bryan > > > > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > > On Fri, Jan 15, 2016 at 12:41 PM, Bryan Cole > wrote: > > On Fri, 2016-01-15 at 12:30 -0500, David E DeMarle wrote: > > I could be wrong but programmable source doesn't have a > SetRequestDataObjectMethod or a SetFillOutputPortInformation method which > is where you might change that. > > > I recommend you use the new vtkPyhtonAlgorithm instead. > > http://www.kitware.com/blog/home/post/737 > > > > Thanks for this tip. What version was this class introduced? My system vtk > version is 6.0.0 and I can't see this class. > > Thanks, > BC > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Group Leader, Technical Development Group - Teraview Ltd. > Platinum Building, St. John's Innovation Park, Cambridge CB4 0DS, UK. > tel: +44 (0)1223 435386, fax: +44 (0)1223 435382, web: www.teraview.com Registered > Number: 04126946, VAT Number: 770 8883 84 > > ...preferred document formats: ODF (ISO/IEC 26300:2006), PDF > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jan 15 17:01:04 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 15 Jan 2016 15:01:04 -0700 Subject: [vtkusers] VTK 7.0.0.RC1 (and releases before): X-OpenGL depth test(?) problems when using QVTKRenderWindow In-Reply-To: <5a5ae99e14499b5908e2d2c2108684bb@srv19.sysproserver.de> References: <73effde40706aa0ebc5aa5dc361dee12@srv19.sysproserver.de> <5a5ae99e14499b5908e2d2c2108684bb@srv19.sysproserver.de> Message-ID: Hi Sophonet, You can try using the vtkRenderWindow to get info from the context, to see if it's different with QVTKRenderWindowInteractor than without. There are two boolean methods for vtkRenderWindow: window.SupportsOpenGL() window.IsDirect() And also this method that prints a bunch of info: print window.ReportCapabilities() You might have to all Render() once before calling these methods. - David On Fri, Jan 15, 2016 at 2:55 AM, Sophonet wrote: > Hi David, > > The problem occurs as well when running QVTKRenderWindowInteractor.py > directly. > > I have tried picking the Mesa software renderer to exclude a graphics > driver problem by > > LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe python > PATHTO_/QVTKRenderWindowInteractor.py, but same problem. > > The software renderer is chosen by setting the two variables as I could > verify with > > LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe glxinfo: > > ... > OpenGL renderer string: Gallium 0.4 on softpipe > OpenGL version string: 2.1 Mesa 9.2.3 > OpenGL shading language version string: 1.30 > ... > > I have found a related thread here (8 years old): > > http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html > > ...but as opposed to the problem described there, I do not see warnings on > a missing depth buffer when turning on MESA_DEBUG=1 - only the errors with > respect to glDrawBuffer / glReadBuffer (see my previous e-mail)... and in > order to rule out device driver problems, I have forced software rendering > as mentioned above. > > I would be happy to debug further if I would know how. > > Thanks, > > sophonet > > > Am 2016-01-14 21:39, schrieb David Gobbi: > >> Hi Sophonet, >> >> QVTKRenderWindowInteractor.py has a "main" and can be run as an >> example. If you run it, does it show the same problem? >> >> I recently tried it with VTK 7.0.0.rc1 and didn't see any depth buffer >> issues (using Ubuntu 12.04). >> >> - David >> >> On Thu, Jan 14, 2016 at 1:17 PM, Sophonet >> wrote: >> >> Dear list, >>> >>> when trying to run a Qt Python application using the >>> qt.QTVTKRenderWindow, there are depth test problems. >>> >>> Examples/Tutorial/Step1/Python/Cone.py works perfect, but with a >>> simple QVTKRenderWindow example (based on >>> https://gist.github.com/samueljohn/3090097 [1], needs two more >>> imports though), there are depth test problems, i.e. it appears that >>> for some reason no depth test is applied (so the last drawn >>> primitive is always visible on top). >>> >>> When doing >>> >>> export MESA_DEBUG=1 >>> >>> before running the two scripts, there is one warning in the >>> Examples/Tutorial/Step1/Python/Cone.py, >>> >>> Mesa warning: couldn't open libtxc_dxtn.so, software DXTn >>> compression/decompression unavailable >>> >>> [but everything looks fine], >>> >>> but many more with the QVTKRenderWindow >>> >>> Mesa: User error: GL_INVALID_OPERATION in >>> glDrawBuffer(buffer=0x405) >>> Mesa: User error: GL_INVALID_OPERATION in >>> glReadBuffer(buffer=0x405) >>> ... >>> >>> I am running Mesa 9.2.3 on my system (OpenSUSE 13.1), so I cannot >>> switch to the OpenGL2 rendering backend (which might resolve the >>> problem? - don't know...). >>> >>> Any hints? >>> >>> Thanks, >>> >>> sophonet >>> >> >> >> Links: >> ------ >> [1] https://gist.github.com/samueljohn/3090097 >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zachnap at gmail.com Fri Jan 15 22:00:19 2016 From: zachnap at gmail.com (Zach) Date: Fri, 15 Jan 2016 22:00:19 -0500 Subject: [vtkusers] vtk vs pyvtk vs coin3d memory usage Message-ID: Hello: I was reading through the IVuPy page regarding comparisons between vtk and coin3D. It mentioned that the python implementation (I assume) of vtk used significantly more memory than coin3D. Here is the statement: "A program using the Python bindings of VTK needed an order of magnitude more memory and time than a C++ program using Coin3D to display the surfaces. The author of the VTK based Python program may not have seen how to handle large dat a sets in VTK , but Coin3D got it right by default." So, I am wondering if this is simply a case of the difference in speed between C++ and Python; or if it is actually a case of proper implementation of Python wrappers, has this issue been remedied? Thanks for the help. Regards, Zach -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jan 15 22:59:28 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 15 Jan 2016 20:59:28 -0700 Subject: [vtkusers] vtk vs pyvtk vs coin3d memory usage In-Reply-To: References: Message-ID: Hi Zach, Well, most people begin their vtk-python programs with "import vtk", which loads the python bindings for every VTK class (around 2000 classes). So, yes, importing all the python bindings for VTK is going to eat a lot of time and memory compared to a lean package like Coin3D. It's possible to speed up the start time by importing only the VTK modules you need. VTK can use a lot of memory... the default is for each stage in the filter pipeline to cache a copy of the data set, and VTK provides almost no facilities to do in-place manipulation of data. The python wrappers don't add any significant weight here, though, it's the same when people write VTK programs in C++. With regards to comparing VTK and Coin3D, don't forget that VTK's role is complex pipelined data manipulation. Coin3D, as far as I understand, is focused mainly on getting the data from disk to screen, providing a scene graph, and providing interaction tools. So it's a bit of an apples to oranges comparison. - David On Fri, Jan 15, 2016 at 8:00 PM, Zach wrote: > Hello: > > I was reading through the IVuPy page > regarding comparisons between vtk and coin3D. It mentioned that the python > implementation (I assume) of vtk used significantly more memory than > coin3D. Here is the statement: > > "A program using the Python bindings of VTK needed > an order of magnitude more memory and time than a C++ program using Coin3D > to display the surfaces. The author of the VTK based Python program may not > have seen how to handle large dat > a > sets in VTK > , > but Coin3D got it right by default." > > So, I am wondering if this is simply a case of the difference in speed > between C++ and Python; or if it is actually a case of proper > implementation of Python wrappers, has this issue been remedied? Thanks for > the help. > > Regards, > > Zach > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nil.goyette at imeka.ca Fri Jan 15 11:30:38 2016 From: nil.goyette at imeka.ca (Nil Goyette) Date: Fri, 15 Jan 2016 11:30:38 -0500 Subject: [vtkusers] Cython Message-ID: <56991EAE.5060300@imeka.ca> Hi all, I tried making a part of my pytthon code faster and vtk is the only part which I can't change anything. In fact, I can't find any information on cythonizing vtk. Maybe because one should use C++ if he wants a fast version :) or maybe because there's simply not much information on the subject. Is there some specific advices to vtk? Where to find the cdef? Or it's simply the general advices like: get a pointer to the data asap to be in C mode, then cdef everything? Nil From yihui.cao at qq.com Sat Jan 16 02:16:47 2016 From: yihui.cao at qq.com (=?ISO-8859-1?B?WWlodWkgQ2Fv?=) Date: Sat, 16 Jan 2016 15:16:47 +0800 Subject: [vtkusers] How to restrict the cross cursor always vertical when rotate? Message-ID: Dear All, When I used vtkResliceCursorWidget and rotate it, I need to make the cross hairs always vertical. How to realize this? Please give me some idea. Many thanks! Yihui Cao -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Sat Jan 16 07:59:19 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Sat, 16 Jan 2016 07:59:19 -0500 Subject: [vtkusers] Cython In-Reply-To: <56991EAE.5060300@imeka.ca> References: <56991EAE.5060300@imeka.ca> Message-ID: Nil, VTK is C++ library that provides Python language bindings, so all the VTK parts you call in your Python code are invoking compiled C++ functions. There is no need to cythonize them. Cory On Fri, Jan 15, 2016 at 11:30 AM, Nil Goyette wrote: > Hi all, > > I tried making a part of my pytthon code faster and vtk is the only part > which I can't change anything. In fact, I can't find any information on > cythonizing vtk. Maybe because one should use C++ if he wants a fast version > :) or maybe because there's simply not much information on the subject. > > Is there some specific advices to vtk? Where to find the cdef? > Or it's simply the general advices like: get a pointer to the data asap to > be in C mode, then cdef everything? > > Nil > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 12eward at gmail.com Sat Jan 16 16:31:40 2016 From: 12eward at gmail.com (Edwin Ward) Date: Sat, 16 Jan 2016 16:31:40 -0500 Subject: [vtkusers] Looking for Old Version of VTK ideally ~5.10 Message-ID: <8F9F35D9-AD4A-4EA1-AA6E-AC2A5DBB1D9A@gmail.com> Hello vtk users, I?m trying to use a piece of software called MaxFEM and it requires as a dependency a version of VTK greater than 5.4 and less than 6.0. I have spent several hours trying to compile for windows the version 5.10.1 source available on the website for download with no luck. If anyone has a windows copy of a compiled version between 5.4 and before 6.0. I would be very, very, very grateful if you could email me at edward at colby.edu. Thanks in advance for your help :) From pengfeijia11 at sjtu.edu.cn Sun Jan 17 07:18:04 2016 From: pengfeijia11 at sjtu.edu.cn (=?GB2312?B?vNbF9LfJ?=) Date: Sun, 17 Jan 2016 20:18:04 +0800 Subject: [vtkusers] An error Message-ID: <201601172018035664666@sjtu.edu.cn> Hello: I am new for VTK, I met this problem and I do not know why ,hoping that youcan help me Enclosed are the error pictures Thank you VS:2010 VTK:5.10.1 Cmake:2.8.11.1 CmakeLists.txt is as follows: cmake_minimum_required(VERSION2.8) project(TestVTKInstall) find_package(VTKREQUIRED) include(${VTK_USE_FILE}) add_executable(${PROJECT_NAME}TestVTKInstall.cpp) target_link_libraries(${PROJECT_NAME}vtkRendering vtkCommon) TestVTKInstall.cpp is as follows #include"vtkRenderWindow.h" #include"vtkSmartPointer.h" intmain() { vtkSmartPointer renWin= vtkSmartPointer::New(); renWin->Render(); std::cin.get(); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Cmake interface.png Type: application/octet-stream Size: 54884 bytes Desc: not available URL: From eduardo.hssi at gmail.com Sun Jan 17 09:32:40 2016 From: eduardo.hssi at gmail.com (eduardo) Date: Sun, 17 Jan 2016 07:32:40 -0700 (MST) Subject: [vtkusers] vtk_web_cone.py Message-ID: <1453041160020-5736000.post@n5.nabble.com> I am running VTK on the web following the example vtk_web_cone.py (https://github.com/Kitware/VTK/blob/master/Web/Applications/Cone/server/vtk_web_cone.py). In this example you can render with vtkWebViewPortImageDelivery (image) and vtkWebViewPortGeometryDelivery (WebGL), it works with image, but with WebGL he does not render. Someone has something that could help me? My code in HTML to work with WebGL. var viewport = vtkWeb.createViewport ({session: session, renderer: "webgl"}); Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-web-cone-py-tp5736000.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Sun Jan 17 12:24:12 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Sun, 17 Jan 2016 12:24:12 -0500 Subject: [vtkusers] An error In-Reply-To: <201601172018035664666@sjtu.edu.cn> References: <201601172018035664666@sjtu.edu.cn> Message-ID: Hi, You are missing a space in your CMakeLists.txt file after each occurrence of ${PROJECT_NAME}. This needs to be fixed in the call to 'add_executable' and 'target_link_libraries'. - Cory On Sun, Jan 17, 2016 at 7:18 AM, ??? wrote: > Hello: > I am new for VTK, I met this problem and I do not know why ,hoping that > youcan help me > Enclosed are the error pictures > > Thank you > VS:2010 > VTK:5.10.1 > Cmake:2.8.11.1 > > > CmakeLists.txt is as follows: > > cmake_minimum_required(VERSION2.8) > > project(TestVTKInstall) > > find_package(VTKREQUIRED) > > include(${VTK_USE_FILE}) > > add_executable(${PROJECT_NAME}TestVTKInstall.cpp) > > target_link_libraries(${PROJECT_NAME}vtkRendering vtkCommon) > > > > TestVTKInstall.cpp is as follows > > #include"vtkRenderWindow.h" > > #include"vtkSmartPointer.h" > > intmain() > > { > > vtkSmartPointer renWin= > vtkSmartPointer::New(); > > renWin->Render(); > > > > std::cin.get(); > > return 0; > > } > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Jan 18 06:23:35 2016 From: martin.genet at polytechnique.edu (Martin Genet) Date: Mon, 18 Jan 2016 12:23:35 +0100 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> Message-ID: <569CCB37.7060100@polytechnique.edu> Hi Andy, I followed the directions, and submitted a patch (19 days ago), but haven't heard anything back. In GitLab the merge requests counter is at 0, but when I try to create a new merge request from my commit, it tells the merge request already exists. Is it being reviewed somewhere? Thanks! Martin On 29/12/2015 13:22, Andy Bauer wrote: > Hi Martin, > > This patch makes sense. It would need a test if you want to get your > changes into VTK. The directions for contributing to VTK are at > https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md. > > Cheers, > Andy > > On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet > > wrote: > > Thanks Andy. > > What about simply adding another mode, e.g. > SetTensorModeToComputeGreenLagrangeStrain, to the > vtkCellDerivatives filter? Would the attached patch make sense? > > Martin > > On 28/12/2015 14:12, Andy Bauer wrote: >> Hi Martin, >> >> Changing the name of the SetTensorModeToComputeStrain method to >> something else would break backward compatibility which is >> generally avoided in VTK. Other options for this include deriving >> a class to compute non-linear strain from vtkCellDerivatives if >> it shares enough of the algorithm with the linearized version or >> maybe just creating a new filter. >> >> Cheers, >> Andy >> >> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet >> > > wrote: >> >> Dear VTK users: >> >> I realize that the vtkCellDerivatives filter, when >> SetTensorModeToComputeStrain is activated, returns the >> symmetric part of the gradient of the input vector field, >> which is the linearized strain tensor, i.e., not a proper >> measure of deformation when large displacements are involved. >> Would that make sense to have two different modes, >> SetTensorModeToComputeLinearizedStrain or >> SetTensorModeToComputeSymmetricGradient, and >> SetTensorModeToComputeStrain or >> SetTensorModeToComputeGreenLagrangeStrain? 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 martin.genet at polytechnique.edu Mon Jan 18 06:27:54 2016 From: martin.genet at polytechnique.edu (Martin Genet) Date: Mon, 18 Jan 2016 12:27:54 +0100 Subject: [vtkusers] vtkImageImport -> cell data Message-ID: <569CCC3A.9050808@polytechnique.edu> Hey everyone, I'm realizing that vtkImageImport generates images with point data, not cell data?the Detailed Description says "The array applies on scalar point data only, not on cell data." I was wondering why? I would expect it to read the data as cell data, with one value per voxel. Thanks for helping to understand! Martin From vtk12af6bc42 at kant.sophonet.de Mon Jan 18 07:17:49 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Mon, 18 Jan 2016 13:17:49 +0100 Subject: [vtkusers] =?utf-8?q?VTK_7=2E0=2E0=2ERC1_=28and_releases_before?= =?utf-8?q?=29=3A_X-OpenGL_depth_test=28=3F=29_problems_when_using_QVTKRen?= =?utf-8?q?derWindow?= In-Reply-To: References: <73effde40706aa0ebc5aa5dc361dee12@srv19.sysproserver.de> <5a5ae99e14499b5908e2d2c2108684bb@srv19.sysproserver.de> Message-ID: <67148f40aa4f4c21920b77645506b457@srv19.sysproserver.de> Hi David, just tried it - the information you suggested is identical for Cone5.py (works, with vtkRenderWindowInteractor) and QVTKRenderWindow.py (depth problems). Info is attached below. Still, the error message Mesa: User error: GL_INVALID_OPERATION in glDrawBuffer(buffer=0x405) only occurs when starting QVTKRenderWindow.py (where the depth problems occur). Any more thoughts? Thanks, Fabian ---- Support OpenGL: 1 IsDirect: 1 server glx vendor string: SGI server glx version string: 1.2 server glx extensions: GLX_ARB_multisample GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_import_context GLX_OML_swap_method GLX_SGI_make_current_read GLX_SGIS_multisample GLX_SGIX_hyperpipe GLX_SGIX_swap_barrier GLX_SGIX_fbconfig client glx vendor string: Mesa Project and SGI client glx version string: 1.4 client glx extensions: GLX_ARB_create_context GLX_ARB_create_context_profile GLX_ARB_create_context_robustness GLX_ARB_fbconfig_float GLX_ARB_framebuffer_sRGB GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_fbconfig_packed_float GLX_EXT_framebuffer_sRGB GLX_EXT_create_context_es2_profile GLX_MESA_copy_sub_buffer GLX_MESA_multithread_makecurrent GLX_MESA_swap_control GLX_OML_swap_method GLX_OML_sync_control GLX_SGI_make_current_read GLX_SGI_swap_control GLX_SGI_video_sync GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGIX_visual_select_group GLX_EXT_texture_from_pixmap GLX_INTEL_swap_event glx extensions: GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context GLX_EXT_visual_info GLX_EXT_visual_rating GLX_MESA_multithread_makecurrent GLX_OML_swap_method GLX_SGI_make_current_read GLX_SGIS_multisample GLX_SGIX_fbconfig OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.3, 128 bits) OpenGL version string: 2.1 Mesa 9.2.3 OpenGL extensions: GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_fog_distance GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_NV_primitive_restart GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_ATI_texture_compression_3dc GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_rgtc GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_packed_depth_stencil GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_ATI_texture_mirror_once GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_texture_array GL_EXT_texture_compression_latc GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_MESA_texture_array GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_conservative_depth GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility GL_ARB_blend_func_extended GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_ARB_shader_texture_lod GL_ARB_texture_rgb10_a2ui GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_shader_bit_encoding GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_conservative_depth GL_ARB_internalformat_query GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_texture_storage GL_ARB_transform_feedback_instanced GL_EXT_transform_feedback GL_ARB_invalidate_subdata X Extensions: SHAPE, Extended-Visual-Information, XInputExtension, XTEST, BIG-REQUESTS, MIT-SUNDRY-NONSTANDARD, DEC-XTRAP, SYNC, XKEYBOARD, XC-MISC, RECORD, DOUBLE-BUFFER, XC-APPGROUP, SECURITY, TOG-CUP, GLX, SGI-GLX, XFIXES, RENDER, RANDR, X-Resource, XEVIE, DAMAGE Am 2016-01-15 23:01, schrieb David Gobbi: > Hi Sophonet, > > You can try using the vtkRenderWindow to get info from the context, to > see if it's different with?QVTKRenderWindowInteractor than without. > > There are two boolean methods for vtkRenderWindow: > ? ?window.SupportsOpenGL() > ? ?window.IsDirect() > > And also this method that prints a bunch of info: > ? ?print window.ReportCapabilities() > > You might have to all Render() once before calling these methods. > > ?- David > > On Fri, Jan 15, 2016 at 2:55 AM, Sophonet > wrote: > >> Hi David, >> >> The problem occurs as well when running >> QVTKRenderWindowInteractor.py directly. >> >> I have tried picking the Mesa software renderer to exclude a >> graphics driver problem by >> >> LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe python >> PATHTO_/QVTKRenderWindowInteractor.py, but same problem. >> >> The software renderer is chosen by setting the two variables as I >> could verify with >> >> LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe glxinfo: >> >> ... >> OpenGL renderer string: Gallium 0.4 on softpipe >> OpenGL version string: 2.1 Mesa 9.2.3 >> OpenGL shading language version string: 1.30 >> ... >> >> I have found a related thread here (8 years old): >> >> http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html >> [1] >> >> ...but as opposed to the problem described there, I do not see >> warnings on a missing depth buffer when turning on MESA_DEBUG=1 - >> only the errors with respect to glDrawBuffer / glReadBuffer (see my >> previous e-mail)... and in order to rule out device driver problems, >> I have forced software rendering as mentioned above. >> >> I would be happy to debug further if I would know how. >> >> Thanks, >> >> ? ? ? ?sophonet >> >> Am 2016-01-14 21:39, schrieb David Gobbi: >> Hi Sophonet, >> >> QVTKRenderWindowInteractor.py has a "main" and can be run as an >> example.? If you run it, does it show the same problem? >> >> I recently tried it with VTK 7.0.0.rc1 and didn't see any depth >> buffer >> issues (using Ubuntu 12.04). >> >> ?- David >> >> On Thu, Jan 14, 2016 at 1:17 PM, Sophonet >> wrote: >> >> Dear list, >> >> when trying to run a Qt Python application using the >> qt.QTVTKRenderWindow, there are depth test problems. >> >> Examples/Tutorial/Step1/Python/Cone.py works perfect, but with a >> simple QVTKRenderWindow example (based on >> https://gist.github.com/samueljohn/3090097 [2] [1], needs two more >> imports though), there are depth test problems, i.e. it appears >> that >> for some reason no depth test is applied (so the last drawn >> primitive is always visible on top). >> >> When doing >> >> export MESA_DEBUG=1 >> >> before running the two scripts, there is one warning in the >> Examples/Tutorial/Step1/Python/Cone.py, >> >> Mesa warning: couldn't open libtxc_dxtn.so, software DXTn >> compression/decompression unavailable >> >> [but everything looks fine], >> >> but many more with the QVTKRenderWindow >> >> Mesa: User error: GL_INVALID_OPERATION in >> glDrawBuffer(buffer=0x405) >> Mesa: User error: GL_INVALID_OPERATION in >> glReadBuffer(buffer=0x405) >> ... >> >> I am running Mesa 9.2.3 on my system (OpenSUSE 13.1), so I cannot >> switch to the OpenGL2 rendering backend (which might resolve the >> problem? - don't know...). >> >> Any hints? >> >> Thanks, >> >> ? ? ?sophonet >> >> Links: >> ------ >> [1] https://gist.github.com/samueljohn/3090097 [2] > > > > Links: > ------ > [1] http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html > [2] https://gist.github.com/samueljohn/3090097 From andy.bauer at kitware.com Mon Jan 18 07:32:34 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Mon, 18 Jan 2016 07:32:34 -0500 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: <569CCB37.7060100@polytechnique.edu> References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> Message-ID: Hi Martin, Thanks for following up on this. I found the merge request now and will look at this. In general, developers should request others to do a code review on this. This can be done via something like "@acbauer please review this" or sending an email on this VTK list with a link to the merge request. Best, Andy On Mon, Jan 18, 2016 at 6:23 AM, Martin Genet < martin.genet at polytechnique.edu> wrote: > Hi Andy, > > I followed the directions, and submitted a patch (19 days ago), but > haven't heard anything back. > > In GitLab the merge requests counter is at 0, but when I try to create a > new merge request from my commit, it tells the merge request already > exists. Is it being reviewed somewhere? Thanks! > > Martin > > > On 29/12/2015 13:22, Andy Bauer wrote: > > Hi Martin, > > This patch makes sense. It would need a test if you want to get your > changes into VTK. The directions for contributing to VTK are at > https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md > . > > Cheers, > Andy > > On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet < > martin.genet at polytechnique.edu> wrote: > >> Thanks Andy. >> >> What about simply adding another mode, e.g. >> SetTensorModeToComputeGreenLagrangeStrain, to the vtkCellDerivatives >> filter? Would the attached patch make sense? >> >> Martin >> >> On 28/12/2015 14:12, Andy Bauer wrote: >> >> Hi Martin, >> >> Changing the name of the SetTensorModeToComputeStrain method to something >> else would break backward compatibility which is generally avoided in VTK. >> Other options for this include deriving a class to compute non-linear >> strain from vtkCellDerivatives if it shares enough of the algorithm with >> the linearized version or maybe just creating a new filter. >> >> Cheers, >> Andy >> >> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet < >> martin.genet at polytechnique.edu> wrote: >> >>> Dear VTK users: >>> >>> I realize that the vtkCellDerivatives filter, when >>> SetTensorModeToComputeStrain is activated, returns the symmetric part of >>> the gradient of the input vector field, which is the linearized strain >>> tensor, i.e., not a proper measure of deformation when large displacements >>> are involved. Would that make sense to have two different modes, >>> SetTensorModeToComputeLinearizedStrain or >>> SetTensorModeToComputeSymmetricGradient, and SetTensorModeToComputeStrain >>> or SetTensorModeToComputeGreenLagrangeStrain? 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 david.gobbi at gmail.com Mon Jan 18 08:15:58 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 18 Jan 2016 06:15:58 -0700 Subject: [vtkusers] VTK 7.0.0.RC1 (and releases before): X-OpenGL depth test(?) problems when using QVTKRenderWindow In-Reply-To: <67148f40aa4f4c21920b77645506b457@srv19.sysproserver.de> References: <73effde40706aa0ebc5aa5dc361dee12@srv19.sysproserver.de> <5a5ae99e14499b5908e2d2c2108684bb@srv19.sysproserver.de> <67148f40aa4f4c21920b77645506b457@srv19.sysproserver.de> Message-ID: If you are running linux on a VM, you can try fiddling with the 3D acceleration settings in the VMWare manager (though I can't give any specific advice here, I haven't use VMWare recently). One possibility is that VMWare isn't creating a depth buffer on the client side. You can try some of the Qt OpenGL examples to see if they work, and if they do, you can try changing with the QVTKRenderWindow.py code to make it use a QGLWidget to create the VTK drawing context. - David On Mon, Jan 18, 2016 at 5:17 AM, Sophonet wrote: > Hi David, > > just tried it - the information you suggested is identical for Cone5.py > (works, with vtkRenderWindowInteractor) and QVTKRenderWindow.py (depth > problems). Info is attached below. > > Still, the error message > > Mesa: User error: GL_INVALID_OPERATION in glDrawBuffer(buffer=0x405) > > only occurs when starting QVTKRenderWindow.py (where the depth problems > occur). > > Any more thoughts? > > Thanks, > > Fabian > > ---- > > Support OpenGL: 1 > > IsDirect: 1 > > server glx vendor string: SGI > server glx version string: 1.2 > server glx extensions: GLX_ARB_multisample GLX_EXT_visual_info > GLX_EXT_visual_rating GLX_EXT_import_context GLX_OML_swap_method > GLX_SGI_make_current_read GLX_SGIS_multisample GLX_SGIX_hyperpipe > GLX_SGIX_swap_barrier GLX_SGIX_fbconfig > client glx vendor string: Mesa Project and SGI > client glx version string: 1.4 > client glx extensions: GLX_ARB_create_context > GLX_ARB_create_context_profile GLX_ARB_create_context_robustness > GLX_ARB_fbconfig_float GLX_ARB_framebuffer_sRGB GLX_ARB_get_proc_address > GLX_ARB_multisample GLX_EXT_import_context GLX_EXT_visual_info > GLX_EXT_visual_rating GLX_EXT_fbconfig_packed_float > GLX_EXT_framebuffer_sRGB GLX_EXT_create_context_es2_profile > GLX_MESA_copy_sub_buffer GLX_MESA_multithread_makecurrent > GLX_MESA_swap_control GLX_OML_swap_method GLX_OML_sync_control > GLX_SGI_make_current_read GLX_SGI_swap_control GLX_SGI_video_sync > GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_pbuffer > GLX_SGIX_visual_select_group GLX_EXT_texture_from_pixmap > GLX_INTEL_swap_event > glx extensions: GLX_ARB_get_proc_address GLX_ARB_multisample > GLX_EXT_import_context GLX_EXT_visual_info GLX_EXT_visual_rating > GLX_MESA_multithread_makecurrent GLX_OML_swap_method > GLX_SGI_make_current_read GLX_SGIS_multisample GLX_SGIX_fbconfig > OpenGL vendor string: VMware, Inc. > OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.3, 128 bits) > OpenGL version string: 2.1 Mesa 9.2.3 > OpenGL extensions: GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra > GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract > GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture > GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array > GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip > GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels > GL_EXT_point_parameters GL_EXT_rescale_normal > GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp > GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp > GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB > GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays > GL_IBM_texture_mirrored_repeat GL_ARB_texture_cube_map > GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate > GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color > GL_EXT_texture_env_add GL_EXT_texture_lod_bias GL_INGR_blend_func_separate > GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection > GL_NV_texture_env_combine4 GL_SUN_multi_draw_arrays > GL_ARB_texture_border_clamp GL_ARB_texture_compression > GL_EXT_framebuffer_object GL_EXT_texture_env_combine > GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil > GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query > GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar > GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos > GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_fog_distance > GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ARB_draw_buffers > GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects > GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers > GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs > GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture > GL_NV_primitive_restart GL_ARB_fragment_program_shadow > GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite > GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two > GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate > GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_color_buffer_float > GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc > GL_ARB_texture_float GL_ARB_texture_rectangle > GL_ATI_texture_compression_3dc GL_EXT_packed_float > GL_EXT_pixel_buffer_object GL_EXT_texture_compression_rgtc > GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle GL_EXT_texture_sRGB > GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object > GL_EXT_framebuffer_blit GL_EXT_packed_depth_stencil > GL_ARB_vertex_array_object GL_ATI_separate_stencil > GL_ATI_texture_mirror_once GL_EXT_draw_buffers2 GL_EXT_draw_instanced > GL_EXT_gpu_program_parameters GL_EXT_texture_array > GL_EXT_texture_compression_latc GL_EXT_texture_integer > GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image > GL_MESA_texture_array GL_ARB_copy_buffer GL_ARB_depth_buffer_float > GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays > GL_ARB_map_buffer_range GL_ARB_texture_rg GL_ARB_texture_swizzle > GL_ARB_vertex_array_bgra GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra > GL_NV_conditional_render GL_AMD_conservative_depth > GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility > GL_ARB_blend_func_extended GL_ARB_debug_output GL_ARB_draw_buffers_blend > GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location > GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex > GL_ARB_sampler_objects GL_ARB_shader_texture_lod GL_ARB_texture_rgb10_a2ui > GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev > GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba > GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_shader_bit_encoding > GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 > GL_ARB_conservative_depth GL_ARB_internalformat_query > GL_ARB_shading_language_420pack GL_ARB_shading_language_packing > GL_ARB_texture_storage GL_ARB_transform_feedback_instanced > GL_EXT_transform_feedback GL_ARB_invalidate_subdata > X Extensions: SHAPE, Extended-Visual-Information, XInputExtension, XTEST, > BIG-REQUESTS, MIT-SUNDRY-NONSTANDARD, DEC-XTRAP, SYNC, XKEYBOARD, XC-MISC, > RECORD, DOUBLE-BUFFER, XC-APPGROUP, SECURITY, TOG-CUP, GLX, SGI-GLX, > XFIXES, RENDER, RANDR, X-Resource, XEVIE, DAMAGE > > > Am 2016-01-15 23:01, schrieb David Gobbi: > >> Hi Sophonet, >> >> You can try using the vtkRenderWindow to get info from the context, to >> see if it's different with QVTKRenderWindowInteractor than without. >> >> There are two boolean methods for vtkRenderWindow: >> window.SupportsOpenGL() >> window.IsDirect() >> >> And also this method that prints a bunch of info: >> print window.ReportCapabilities() >> >> You might have to all Render() once before calling these methods. >> >> - David >> >> On Fri, Jan 15, 2016 at 2:55 AM, Sophonet >> wrote: >> >> Hi David, >>> >>> The problem occurs as well when running >>> QVTKRenderWindowInteractor.py directly. >>> >>> I have tried picking the Mesa software renderer to exclude a >>> graphics driver problem by >>> >>> LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe python >>> PATHTO_/QVTKRenderWindowInteractor.py, but same problem. >>> >>> The software renderer is chosen by setting the two variables as I >>> could verify with >>> >>> LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe glxinfo: >>> >>> ... >>> OpenGL renderer string: Gallium 0.4 on softpipe >>> OpenGL version string: 2.1 Mesa 9.2.3 >>> OpenGL shading language version string: 1.30 >>> ... >>> >>> I have found a related thread here (8 years old): >>> >>> http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html >>> [1] >>> >>> ...but as opposed to the problem described there, I do not see >>> warnings on a missing depth buffer when turning on MESA_DEBUG=1 - >>> only the errors with respect to glDrawBuffer / glReadBuffer (see my >>> previous e-mail)... and in order to rule out device driver problems, >>> I have forced software rendering as mentioned above. >>> >>> I would be happy to debug further if I would know how. >>> >>> Thanks, >>> >>> sophonet >>> >>> Am 2016-01-14 21:39, schrieb David Gobbi: >>> Hi Sophonet, >>> >>> QVTKRenderWindowInteractor.py has a "main" and can be run as an >>> example. If you run it, does it show the same problem? >>> >>> I recently tried it with VTK 7.0.0.rc1 and didn't see any depth >>> buffer >>> issues (using Ubuntu 12.04). >>> >>> - David >>> >>> On Thu, Jan 14, 2016 at 1:17 PM, Sophonet >>> wrote: >>> >>> Dear list, >>> >>> when trying to run a Qt Python application using the >>> qt.QTVTKRenderWindow, there are depth test problems. >>> >>> Examples/Tutorial/Step1/Python/Cone.py works perfect, but with a >>> simple QVTKRenderWindow example (based on >>> https://gist.github.com/samueljohn/3090097 [2] [1], needs two more >>> >>> imports though), there are depth test problems, i.e. it appears >>> that >>> for some reason no depth test is applied (so the last drawn >>> primitive is always visible on top). >>> >>> When doing >>> >>> export MESA_DEBUG=1 >>> >>> before running the two scripts, there is one warning in the >>> Examples/Tutorial/Step1/Python/Cone.py, >>> >>> Mesa warning: couldn't open libtxc_dxtn.so, software DXTn >>> compression/decompression unavailable >>> >>> [but everything looks fine], >>> >>> but many more with the QVTKRenderWindow >>> >>> Mesa: User error: GL_INVALID_OPERATION in >>> glDrawBuffer(buffer=0x405) >>> Mesa: User error: GL_INVALID_OPERATION in >>> glReadBuffer(buffer=0x405) >>> ... >>> >>> I am running Mesa 9.2.3 on my system (OpenSUSE 13.1), so I cannot >>> switch to the OpenGL2 rendering backend (which might resolve the >>> problem? - don't know...). >>> >>> Any hints? >>> >>> Thanks, >>> >>> sophonet >>> >>> Links: >>> ------ >>> [1] https://gist.github.com/samueljohn/3090097 [2] >>> >> >> >> >> Links: >> ------ >> [1] http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html >> [2] https://gist.github.com/samueljohn/3090097 >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eduardo.hssi at gmail.com Mon Jan 18 08:34:30 2016 From: eduardo.hssi at gmail.com (eduardo) Date: Mon, 18 Jan 2016 06:34:30 -0700 (MST) Subject: [vtkusers] vtk_web_cone.py In-Reply-To: <1453041160020-5736000.post@n5.nabble.com> References: <1453041160020-5736000.post@n5.nabble.com> Message-ID: <1453124070567-5736007.post@n5.nabble.com> I could, I downloaded the source vtk 6.0, compiled again and it worked. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-web-cone-py-tp5736000p5736007.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Mon Jan 18 08:44:21 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 18 Jan 2016 08:44:21 -0500 Subject: [vtkusers] vtkImageImport -> cell data In-Reply-To: <569CCC3A.9050808@polytechnique.edu> References: <569CCC3A.9050808@polytechnique.edu> Message-ID: Hi Martin, While your expectation is understandable, in VTK voxel data is associated with points. Cory On Mon, Jan 18, 2016 at 6:27 AM, Martin Genet wrote: > Hey everyone, > > I'm realizing that vtkImageImport generates images with point data, not cell > data?the Detailed Description says "The array applies on scalar point data > only, not on cell data." I was wondering why? I would expect it to read the > data as cell data, with one value per voxel. Thanks for helping to > understand! > > 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 -- Cory Quammen R&D Engineer Kitware, Inc. From david.gobbi at gmail.com Mon Jan 18 08:45:21 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 18 Jan 2016 06:45:21 -0700 Subject: [vtkusers] vtkImageImport -> cell data In-Reply-To: <569CCC3A.9050808@polytechnique.edu> References: <569CCC3A.9050808@polytechnique.edu> Message-ID: Hi Martin, In VTK, image data is point data, one data value per point. Cell data isn't used because the vtkVoxel cell is not a voxel in the conventional sense: a vtkVoxel is a finite element that connects 8 points, where each corner point generally has a data value (use of point scalars in VTK is much more common than the use of cell scalars). So the typical usage of vtkVoxel is contrary to the conventional definition of "voxel" which has just one data value. The VTK image processing filters work on point data, because a VTK point fits the conventional definition of "voxel" (i.e. a voxel defined as one data sample in a volumetric grid of such samples) better than vtkVoxel does. - David On Mon, Jan 18, 2016 at 4:27 AM, Martin Genet < martin.genet at polytechnique.edu> wrote: > Hey everyone, > > I'm realizing that vtkImageImport generates images with point data, not > cell data?the Detailed Description says "The array applies on scalar point > data only, not on cell data." I was wondering why? I would expect it to > read the data as cell data, with one value per voxel. Thanks for helping to > understand! > > Martin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk12af6bc42 at kant.sophonet.de Mon Jan 18 08:46:55 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Mon, 18 Jan 2016 14:46:55 +0100 Subject: [vtkusers] =?utf-8?q?VTK_7=2E0=2E0=2ERC1_=28and_releases_before?= =?utf-8?q?=29=3A_X-OpenGL_depth_test=28=3F=29_problems_when_using_QVTKRen?= =?utf-8?q?derWindow?= In-Reply-To: References: <73effde40706aa0ebc5aa5dc361dee12@srv19.sysproserver.de> <5a5ae99e14499b5908e2d2c2108684bb@srv19.sysproserver.de> <67148f40aa4f4c21920b77645506b457@srv19.sysproserver.de> Message-ID: It works! When deriving QVTKRenderWindowInteractor from PySide.QtOpenGL.QGLWidget instead of QWidget, the error messages regarding glDrawBuffer etc. disappear and depth test / rendering seems to be correct. I do not fully understand the potential cause of being a VMDriver issue, since (i) I would assume that this applies to the Cone - example as well (which works) and (ii) the rendering string reveals the Gallium llvm engine (a software renderer, which should not depend on the graphics driver). Nevermind, the good news that this seems to be resolved. The same change on MS Windows seems to work as well. However, the constructor of QGLWidget does not accept window flags (for MS windows MSWindowsOwnDC is currently set in the current QVTKRenderWindowInteractor.py), so I had to omit them and I cannot fully judge whether this change would create a problem for other scripts. However, I would think that deriving from an QGLWidget is actually a reasonable thing to do. David, what do you think about the wflag issue and do you think a patch can make it to VTK7? Shall I submit one? Thanks, Sophonet Am 2016-01-18 14:15, schrieb David Gobbi: > If you are running linux on a VM, you can try fiddling with the 3D > acceleration settings in the VMWare manager (though I can't give any > specific advice here, I haven't use VMWare recently).? One > possibility is that VMWare isn't creating a depth buffer on the client > side.? You can try some of the Qt OpenGL examples to see if they > work, and if they do, you can try changing with > the?QVTKRenderWindow.py code to make it use a QGLWidget to create the > VTK drawing context. > > ?- David > > On Mon, Jan 18, 2016 at 5:17 AM, Sophonet > wrote: > >> Hi David, >> >> just tried it - the information you suggested is identical for >> Cone5.py (works, with vtkRenderWindowInteractor) and >> QVTKRenderWindow.py (depth problems). Info is attached below. >> >> Still, the error message >> >> Mesa: User error: GL_INVALID_OPERATION in >> glDrawBuffer(buffer=0x405) >> >> only occurs when starting QVTKRenderWindow.py (where the depth >> problems occur). >> >> Any more thoughts? >> >> Thanks, >> >> ? ? ?Fabian >> >> ---- >> >> Support OpenGL: 1 >> >> IsDirect: 1 >> >> server glx vendor string:? SGI >> server glx version string:? 1.2 >> server glx extensions:? GLX_ARB_multisample GLX_EXT_visual_info >> GLX_EXT_visual_rating GLX_EXT_import_context GLX_OML_swap_method >> GLX_SGI_make_current_read GLX_SGIS_multisample GLX_SGIX_hyperpipe >> GLX_SGIX_swap_barrier GLX_SGIX_fbconfig >> client glx vendor string:? Mesa Project and SGI >> client glx version string:? 1.4 >> client glx extensions:? GLX_ARB_create_context >> GLX_ARB_create_context_profile GLX_ARB_create_context_robustness >> GLX_ARB_fbconfig_float GLX_ARB_framebuffer_sRGB >> GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context >> GLX_EXT_visual_info GLX_EXT_visual_rating >> GLX_EXT_fbconfig_packed_float GLX_EXT_framebuffer_sRGB >> GLX_EXT_create_context_es2_profile GLX_MESA_copy_sub_buffer >> GLX_MESA_multithread_makecurrent GLX_MESA_swap_control >> GLX_OML_swap_method GLX_OML_sync_control GLX_SGI_make_current_read >> GLX_SGI_swap_control GLX_SGI_video_sync GLX_SGIS_multisample >> GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGIX_visual_select_group >> GLX_EXT_texture_from_pixmap GLX_INTEL_swap_event >> glx extensions:? GLX_ARB_get_proc_address GLX_ARB_multisample >> GLX_EXT_import_context GLX_EXT_visual_info GLX_EXT_visual_rating >> GLX_MESA_multithread_makecurrent GLX_OML_swap_method >> GLX_SGI_make_current_read GLX_SGIS_multisample GLX_SGIX_fbconfig >> OpenGL vendor string:? VMware, Inc. >> OpenGL renderer string:? Gallium 0.4 on llvmpipe (LLVM 3.3, 128 >> bits) >> OpenGL version string:? 2.1 Mesa 9.2.3 >> OpenGL extensions:? GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra >> GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract >> GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture >> GL_EXT_texture_object GL_EXT_vertex_array >> GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D >> GL_IBM_rasterpos_clip GL_ARB_point_parameters >> GL_EXT_draw_range_elements GL_EXT_packed_pixels >> GL_EXT_point_parameters GL_EXT_rescale_normal >> GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp >> GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp >> GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod >> GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB >> GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat >> GL_ARB_texture_cube_map GL_ARB_texture_env_add >> GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord >> GL_EXT_multi_draw_arrays GL_EXT_secondary_color >> GL_EXT_texture_env_add GL_EXT_texture_lod_bias >> GL_INGR_blend_func_separate GL_NV_blend_square >> GL_NV_light_max_exponent GL_NV_texgen_reflection >> GL_NV_texture_env_combine4 GL_SUN_multi_draw_arrays >> GL_ARB_texture_border_clamp GL_ARB_texture_compression >> GL_EXT_framebuffer_object GL_EXT_texture_env_combine >> GL_EXT_texture_env_dot3 GL_MESA_window_pos >> GL_NV_packed_depth_stencil GL_NV_texture_rectangle >> GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow >> GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar >> GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat >> GL_ARB_window_pos GL_EXT_stencil_two_side GL_EXT_texture_cube_map >> GL_NV_fog_distance GL_APPLE_packed_pixels >> GL_APPLE_vertex_array_object GL_ARB_draw_buffers >> GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects >> GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers >> GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs >> GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture >> GL_NV_primitive_restart GL_ARB_fragment_program_shadow >> GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite >> GL_ARB_shading_language_100 GL_ARB_sync >> GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object >> GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate >> GL_OES_read_format GL_ARB_color_buffer_float >> GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc >> GL_ARB_texture_float GL_ARB_texture_rectangle >> GL_ATI_texture_compression_3dc GL_EXT_packed_float >> GL_EXT_pixel_buffer_object GL_EXT_texture_compression_rgtc >> GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle >> GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent >> GL_ARB_framebuffer_object GL_EXT_framebuffer_blit >> GL_EXT_packed_depth_stencil GL_ARB_vertex_array_object >> GL_ATI_separate_stencil GL_ATI_texture_mirror_once >> GL_EXT_draw_buffers2 GL_EXT_draw_instanced >> GL_EXT_gpu_program_parameters GL_EXT_texture_array >> GL_EXT_texture_compression_latc GL_EXT_texture_integer >> GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image >> GL_MESA_texture_array GL_ARB_copy_buffer GL_ARB_depth_buffer_float >> GL_ARB_draw_instanced GL_ARB_half_float_vertex >> GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_rg >> GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra >> GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra >> GL_NV_conditional_render GL_AMD_conservative_depth >> GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility >> GL_ARB_blend_func_extended GL_ARB_debug_output >> GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex >> GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions >> GL_ARB_provoking_vertex GL_ARB_sampler_objects >> GL_ARB_shader_texture_lod GL_ARB_texture_rgb10_a2ui >> GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev >> GL_EXT_provoking_vertex GL_EXT_texture_snorm >> GL_MESA_texture_signed_rgba GL_ARB_get_program_binary >> GL_ARB_robustness GL_ARB_shader_bit_encoding GL_ARB_timer_query >> GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 >> GL_ARB_conservative_depth GL_ARB_internalformat_query >> GL_ARB_shading_language_420pack GL_ARB_shading_language_packing >> GL_ARB_texture_storage GL_ARB_transform_feedback_instanced >> GL_EXT_transform_feedback GL_ARB_invalidate_subdata >> X Extensions:? SHAPE, Extended-Visual-Information, >> XInputExtension, XTEST, BIG-REQUESTS, MIT-SUNDRY-NONSTANDARD, >> DEC-XTRAP, SYNC, XKEYBOARD, XC-MISC, RECORD, DOUBLE-BUFFER, >> XC-APPGROUP, SECURITY, TOG-CUP, GLX, SGI-GLX, XFIXES, RENDER, RANDR, >> X-Resource, XEVIE, DAMAGE >> >> Am 2016-01-15 23:01, schrieb David Gobbi: >> Hi Sophonet, >> >> You can try using the vtkRenderWindow to get info from the context, >> to >> see if it's different with?QVTKRenderWindowInteractor than >> without. >> >> There are two boolean methods for vtkRenderWindow: >> ? ?window.SupportsOpenGL() >> ? ?window.IsDirect() >> >> And also this method that prints a bunch of info: >> ? ?print window.ReportCapabilities() >> >> You might have to all Render() once before calling these methods. >> >> ?- David >> >> On Fri, Jan 15, 2016 at 2:55 AM, Sophonet >> wrote: >> >> Hi David, >> >> The problem occurs as well when running >> QVTKRenderWindowInteractor.py directly. >> >> I have tried picking the Mesa software renderer to exclude a >> graphics driver problem by >> >> LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe python >> PATHTO_/QVTKRenderWindowInteractor.py, but same problem. >> >> The software renderer is chosen by setting the two variables as I >> could verify with >> >> LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe glxinfo: >> >> ... >> OpenGL renderer string: Gallium 0.4 on softpipe >> OpenGL version string: 2.1 Mesa 9.2.3 >> OpenGL shading language version string: 1.30 >> ... >> >> I have found a related thread here (8 years old): >> >> http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html >> [1] >> [1] >> >> ...but as opposed to the problem described there, I do not see >> warnings on a missing depth buffer when turning on MESA_DEBUG=1 - >> only the errors with respect to glDrawBuffer / glReadBuffer (see my >> previous e-mail)... and in order to rule out device driver >> problems, >> I have forced software rendering as mentioned above. >> >> I would be happy to debug further if I would know how. >> >> Thanks, >> >> ? ? ? ?sophonet >> >> Am 2016-01-14 21:39, schrieb David Gobbi: >> Hi Sophonet, >> >> QVTKRenderWindowInteractor.py has a "main" and can be run as an >> example.? If you run it, does it show the same problem? >> >> I recently tried it with VTK 7.0.0.rc1 and didn't see any depth >> buffer >> issues (using Ubuntu 12.04). >> >> ?- David >> >> On Thu, Jan 14, 2016 at 1:17 PM, Sophonet >> wrote: >> >> Dear list, >> >> when trying to run a Qt Python application using the >> qt.QTVTKRenderWindow, there are depth test problems. >> >> Examples/Tutorial/Step1/Python/Cone.py works perfect, but with a >> simple QVTKRenderWindow example (based on >> https://gist.github.com/samueljohn/3090097 [2] [2] [1], needs two >> more >> >> imports though), there are depth test problems, i.e. it appears >> that >> for some reason no depth test is applied (so the last drawn >> primitive is always visible on top). >> >> When doing >> >> export MESA_DEBUG=1 >> >> before running the two scripts, there is one warning in the >> Examples/Tutorial/Step1/Python/Cone.py, >> >> Mesa warning: couldn't open libtxc_dxtn.so, software DXTn >> compression/decompression unavailable >> >> [but everything looks fine], >> >> but many more with the QVTKRenderWindow >> >> Mesa: User error: GL_INVALID_OPERATION in >> glDrawBuffer(buffer=0x405) >> Mesa: User error: GL_INVALID_OPERATION in >> glReadBuffer(buffer=0x405) >> ... >> >> I am running Mesa 9.2.3 on my system (OpenSUSE 13.1), so I cannot >> switch to the OpenGL2 rendering backend (which might resolve the >> problem? - don't know...). >> >> Any hints? >> >> Thanks, >> >> ? ? ?sophonet >> >> Links: >> ------ >> [1] https://gist.github.com/samueljohn/3090097 [2] [2] >> >> Links: >> ------ >> [1] >> http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html [1] >> [2] https://gist.github.com/samueljohn/3090097 [2] > > > > Links: > ------ > [1] http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html > [2] https://gist.github.com/samueljohn/3090097 From david.gobbi at gmail.com Mon Jan 18 09:16:41 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 18 Jan 2016 07:16:41 -0700 Subject: [vtkusers] VTK 7.0.0.RC1 (and releases before): X-OpenGL depth test(?) problems when using QVTKRenderWindow In-Reply-To: References: <73effde40706aa0ebc5aa5dc361dee12@srv19.sysproserver.de> <5a5ae99e14499b5908e2d2c2108684bb@srv19.sysproserver.de> <67148f40aa4f4c21920b77645506b457@srv19.sysproserver.de> Message-ID: As you know, when a window is created for OpenGL, all of the necessary buffers have to be created in order for it to work. The function glXChooseVisual() is used to request a specific set of buffers. So a regular Qt widget does not call glxChooseVisual() and will therefore just get a "default" context, which may or may not have all the attributes that are needed for OpenGL rendering. If VTK's own call to glXChooseVisual() comes after Qt has already created the window, it might not be entirely successful. Yes, please submit a patch or at least submit your changes to the list. I've used QGLWidget with VTK in the past, and my experience (on the systems that I was using at the time) was that it was less reliable than just using QWidget. The QGLWidget does a lot of stuff under-the-hood that doesn't fit perfectly with VTK. - David On Mon, Jan 18, 2016 at 6:46 AM, Sophonet wrote: > It works! When deriving QVTKRenderWindowInteractor from > PySide.QtOpenGL.QGLWidget instead of QWidget, the error messages regarding > glDrawBuffer etc. disappear and depth test / rendering seems to be correct. > > I do not fully understand the potential cause of being a VMDriver issue, > since (i) I would assume that this applies to the Cone - example as well > (which works) and (ii) the rendering string reveals the Gallium llvm engine > (a software renderer, which should not depend on the graphics driver). > Nevermind, the good news that this seems to be resolved. > > The same change on MS Windows seems to work as well. > > However, the constructor of QGLWidget does not accept window flags (for MS > windows MSWindowsOwnDC is currently set in the current > QVTKRenderWindowInteractor.py), so I had to omit them and I cannot fully > judge whether this change would create a problem for other scripts. > However, I would think that deriving from an QGLWidget is actually a > reasonable thing to do. > > David, what do you think about the wflag issue and do you think a patch > can make it to VTK7? Shall I submit one? > > Thanks, > > Sophonet > > > > Am 2016-01-18 14:15, schrieb David Gobbi: > >> If you are running linux on a VM, you can try fiddling with the 3D >> acceleration settings in the VMWare manager (though I can't give any >> specific advice here, I haven't use VMWare recently). One >> possibility is that VMWare isn't creating a depth buffer on the client >> side. You can try some of the Qt OpenGL examples to see if they >> work, and if they do, you can try changing with >> the QVTKRenderWindow.py code to make it use a QGLWidget to create the >> VTK drawing context. >> >> - David >> >> On Mon, Jan 18, 2016 at 5:17 AM, Sophonet >> wrote: >> >> Hi David, >>> >>> just tried it - the information you suggested is identical for >>> Cone5.py (works, with vtkRenderWindowInteractor) and >>> QVTKRenderWindow.py (depth problems). Info is attached below. >>> >>> Still, the error message >>> >>> Mesa: User error: GL_INVALID_OPERATION in >>> glDrawBuffer(buffer=0x405) >>> >>> only occurs when starting QVTKRenderWindow.py (where the depth >>> problems occur). >>> >>> Any more thoughts? >>> >>> Thanks, >>> >>> Fabian >>> >>> ---- >>> >>> Support OpenGL: 1 >>> >>> IsDirect: 1 >>> >>> server glx vendor string: SGI >>> server glx version string: 1.2 >>> server glx extensions: GLX_ARB_multisample GLX_EXT_visual_info >>> GLX_EXT_visual_rating GLX_EXT_import_context GLX_OML_swap_method >>> GLX_SGI_make_current_read GLX_SGIS_multisample GLX_SGIX_hyperpipe >>> GLX_SGIX_swap_barrier GLX_SGIX_fbconfig >>> client glx vendor string: Mesa Project and SGI >>> client glx version string: 1.4 >>> client glx extensions: GLX_ARB_create_context >>> GLX_ARB_create_context_profile GLX_ARB_create_context_robustness >>> GLX_ARB_fbconfig_float GLX_ARB_framebuffer_sRGB >>> GLX_ARB_get_proc_address GLX_ARB_multisample GLX_EXT_import_context >>> GLX_EXT_visual_info GLX_EXT_visual_rating >>> GLX_EXT_fbconfig_packed_float GLX_EXT_framebuffer_sRGB >>> GLX_EXT_create_context_es2_profile GLX_MESA_copy_sub_buffer >>> GLX_MESA_multithread_makecurrent GLX_MESA_swap_control >>> GLX_OML_swap_method GLX_OML_sync_control GLX_SGI_make_current_read >>> GLX_SGI_swap_control GLX_SGI_video_sync GLX_SGIS_multisample >>> GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGIX_visual_select_group >>> GLX_EXT_texture_from_pixmap GLX_INTEL_swap_event >>> glx extensions: GLX_ARB_get_proc_address GLX_ARB_multisample >>> GLX_EXT_import_context GLX_EXT_visual_info GLX_EXT_visual_rating >>> GLX_MESA_multithread_makecurrent GLX_OML_swap_method >>> GLX_SGI_make_current_read GLX_SGIS_multisample GLX_SGIX_fbconfig >>> OpenGL vendor string: VMware, Inc. >>> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.3, 128 >>> bits) >>> OpenGL version string: 2.1 Mesa 9.2.3 >>> OpenGL extensions: GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra >>> GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract >>> GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture >>> GL_EXT_texture_object GL_EXT_vertex_array >>> GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D >>> GL_IBM_rasterpos_clip GL_ARB_point_parameters >>> GL_EXT_draw_range_elements GL_EXT_packed_pixels >>> GL_EXT_point_parameters GL_EXT_rescale_normal >>> GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp >>> GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp >>> GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod >>> GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB >>> GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat >>> GL_ARB_texture_cube_map GL_ARB_texture_env_add >>> GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord >>> GL_EXT_multi_draw_arrays GL_EXT_secondary_color >>> GL_EXT_texture_env_add GL_EXT_texture_lod_bias >>> GL_INGR_blend_func_separate GL_NV_blend_square >>> GL_NV_light_max_exponent GL_NV_texgen_reflection >>> GL_NV_texture_env_combine4 GL_SUN_multi_draw_arrays >>> GL_ARB_texture_border_clamp GL_ARB_texture_compression >>> GL_EXT_framebuffer_object GL_EXT_texture_env_combine >>> GL_EXT_texture_env_dot3 GL_MESA_window_pos >>> GL_NV_packed_depth_stencil GL_NV_texture_rectangle >>> GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow >>> GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar >>> GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat >>> GL_ARB_window_pos GL_EXT_stencil_two_side GL_EXT_texture_cube_map >>> GL_NV_fog_distance GL_APPLE_packed_pixels >>> GL_APPLE_vertex_array_object GL_ARB_draw_buffers >>> GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects >>> GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers >>> GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs >>> GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture >>> GL_NV_primitive_restart GL_ARB_fragment_program_shadow >>> GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite >>> GL_ARB_shading_language_100 GL_ARB_sync >>> GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object >>> GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate >>> GL_OES_read_format GL_ARB_color_buffer_float >>> GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc >>> GL_ARB_texture_float GL_ARB_texture_rectangle >>> GL_ATI_texture_compression_3dc GL_EXT_packed_float >>> GL_EXT_pixel_buffer_object GL_EXT_texture_compression_rgtc >>> GL_EXT_texture_mirror_clamp GL_EXT_texture_rectangle >>> GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent >>> GL_ARB_framebuffer_object GL_EXT_framebuffer_blit >>> GL_EXT_packed_depth_stencil GL_ARB_vertex_array_object >>> GL_ATI_separate_stencil GL_ATI_texture_mirror_once >>> GL_EXT_draw_buffers2 GL_EXT_draw_instanced >>> GL_EXT_gpu_program_parameters GL_EXT_texture_array >>> GL_EXT_texture_compression_latc GL_EXT_texture_integer >>> GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image >>> GL_MESA_texture_array GL_ARB_copy_buffer GL_ARB_depth_buffer_float >>> GL_ARB_draw_instanced GL_ARB_half_float_vertex >>> GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_rg >>> GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra >>> GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra >>> GL_NV_conditional_render GL_AMD_conservative_depth >>> GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility >>> GL_ARB_blend_func_extended GL_ARB_debug_output >>> GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex >>> GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions >>> GL_ARB_provoking_vertex GL_ARB_sampler_objects >>> GL_ARB_shader_texture_lod GL_ARB_texture_rgb10_a2ui >>> GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev >>> GL_EXT_provoking_vertex GL_EXT_texture_snorm >>> GL_MESA_texture_signed_rgba GL_ARB_get_program_binary >>> GL_ARB_robustness GL_ARB_shader_bit_encoding GL_ARB_timer_query >>> GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 >>> GL_ARB_conservative_depth GL_ARB_internalformat_query >>> GL_ARB_shading_language_420pack GL_ARB_shading_language_packing >>> GL_ARB_texture_storage GL_ARB_transform_feedback_instanced >>> GL_EXT_transform_feedback GL_ARB_invalidate_subdata >>> X Extensions: SHAPE, Extended-Visual-Information, >>> XInputExtension, XTEST, BIG-REQUESTS, MIT-SUNDRY-NONSTANDARD, >>> DEC-XTRAP, SYNC, XKEYBOARD, XC-MISC, RECORD, DOUBLE-BUFFER, >>> XC-APPGROUP, SECURITY, TOG-CUP, GLX, SGI-GLX, XFIXES, RENDER, RANDR, >>> X-Resource, XEVIE, DAMAGE >>> >>> Am 2016-01-15 23:01, schrieb David Gobbi: >>> Hi Sophonet, >>> >>> You can try using the vtkRenderWindow to get info from the context, >>> to >>> see if it's different with QVTKRenderWindowInteractor than >>> without. >>> >>> There are two boolean methods for vtkRenderWindow: >>> window.SupportsOpenGL() >>> window.IsDirect() >>> >>> And also this method that prints a bunch of info: >>> print window.ReportCapabilities() >>> >>> You might have to all Render() once before calling these methods. >>> >>> - David >>> >>> On Fri, Jan 15, 2016 at 2:55 AM, Sophonet >>> wrote: >>> >>> Hi David, >>> >>> The problem occurs as well when running >>> QVTKRenderWindowInteractor.py directly. >>> >>> I have tried picking the Mesa software renderer to exclude a >>> graphics driver problem by >>> >>> LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe python >>> PATHTO_/QVTKRenderWindowInteractor.py, but same problem. >>> >>> The software renderer is chosen by setting the two variables as I >>> could verify with >>> >>> LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=softpipe glxinfo: >>> >>> ... >>> OpenGL renderer string: Gallium 0.4 on softpipe >>> OpenGL version string: 2.1 Mesa 9.2.3 >>> OpenGL shading language version string: 1.30 >>> ... >>> >>> I have found a related thread here (8 years old): >>> >>> http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html >>> [1] >>> [1] >>> >>> ...but as opposed to the problem described there, I do not see >>> warnings on a missing depth buffer when turning on MESA_DEBUG=1 - >>> only the errors with respect to glDrawBuffer / glReadBuffer (see my >>> previous e-mail)... and in order to rule out device driver >>> problems, >>> I have forced software rendering as mentioned above. >>> >>> I would be happy to debug further if I would know how. >>> >>> Thanks, >>> >>> sophonet >>> >>> Am 2016-01-14 21:39, schrieb David Gobbi: >>> Hi Sophonet, >>> >>> QVTKRenderWindowInteractor.py has a "main" and can be run as an >>> example. If you run it, does it show the same problem? >>> >>> I recently tried it with VTK 7.0.0.rc1 and didn't see any depth >>> buffer >>> issues (using Ubuntu 12.04). >>> >>> - David >>> >>> On Thu, Jan 14, 2016 at 1:17 PM, Sophonet >>> wrote: >>> >>> Dear list, >>> >>> when trying to run a Qt Python application using the >>> qt.QTVTKRenderWindow, there are depth test problems. >>> >>> Examples/Tutorial/Step1/Python/Cone.py works perfect, but with a >>> simple QVTKRenderWindow example (based on >>> https://gist.github.com/samueljohn/3090097 [2] [2] [1], needs two >>> >>> more >>> >>> imports though), there are depth test problems, i.e. it appears >>> that >>> for some reason no depth test is applied (so the last drawn >>> primitive is always visible on top). >>> >>> When doing >>> >>> export MESA_DEBUG=1 >>> >>> before running the two scripts, there is one warning in the >>> Examples/Tutorial/Step1/Python/Cone.py, >>> >>> Mesa warning: couldn't open libtxc_dxtn.so, software DXTn >>> compression/decompression unavailable >>> >>> [but everything looks fine], >>> >>> but many more with the QVTKRenderWindow >>> >>> Mesa: User error: GL_INVALID_OPERATION in >>> glDrawBuffer(buffer=0x405) >>> Mesa: User error: GL_INVALID_OPERATION in >>> glReadBuffer(buffer=0x405) >>> ... >>> >>> I am running Mesa 9.2.3 on my system (OpenSUSE 13.1), so I cannot >>> switch to the OpenGL2 rendering backend (which might resolve the >>> problem? - don't know...). >>> >>> Any hints? >>> >>> Thanks, >>> >>> sophonet >>> >>> Links: >>> ------ >>> [1] https://gist.github.com/samueljohn/3090097 [2] [2] >>> >>> Links: >>> ------ >>> [1] >>> http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html [1] >>> [2] https://gist.github.com/samueljohn/3090097 [2] >>> >> >> >> >> Links: >> ------ >> [1] http://osdir.com/ml/python-enthought-devel/2008-04/msg00491.html >> [2] https://gist.github.com/samueljohn/3090097 >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zeinsalah at gmail.com Mon Jan 18 10:33:24 2016 From: zeinsalah at gmail.com (Zein Salah) Date: Mon, 18 Jan 2016 16:33:24 +0100 Subject: [vtkusers] converting a tube structure to binary image Message-ID: Hi, I have a tube structure in the form of a vtkPolyData, which I create using the vtkTubeFilter. I want to convert this into a binary image containing the tube voxel as e.g. white and the backround as black (kind of volumization). Is there a direct filter for this in VTK (or ITK)? example? Much thanks, Zein From sebastien.jourdain at kitware.com Mon Jan 18 10:37:35 2016 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 18 Jan 2016 08:37:35 -0700 Subject: [vtkusers] vtk_web_cone.py In-Reply-To: <1453124070567-5736007.post@n5.nabble.com> References: <1453041160020-5736000.post@n5.nabble.com> <1453124070567-5736007.post@n5.nabble.com> Message-ID: Glad to ear that it finally worked. On Mon, Jan 18, 2016 at 6:34 AM, eduardo wrote: > I could, I downloaded the source vtk 6.0, compiled again and it worked. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtk-web-cone-py-tp5736000p5736007.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 julien.jomier at kitware.com Mon Jan 18 10:51:32 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Mon, 18 Jan 2016 16:51:32 +0100 Subject: [vtkusers] ANN: CMake Course - March 14 in Lyon, France Message-ID: <569D0A04.4080704@kitware.com> Happy New Year! To start the new year right, Kitware will be holding a CMake training course on March 14, 2016 at Kitware's office in Lyon, France. This one-day course will cover CMake, CTest, CPack and CDash. Visit our website for more information and registration details (early registration and student discounts available): http://training.kitware.fr/browse/120 Note that the course will be taught in English. If you have any questions, please contact me directly or training at kitware.fr. We are looking forward to seeing you in Lyon, Julien -- Kitware SAS 26 rue Louis Gu?rin 69100 Villeurbanne, France http://www.kitware.eu From gphanionline at yahoo.com Mon Jan 18 12:42:52 2016 From: gphanionline at yahoo.com (gphani) Date: Mon, 18 Jan 2016 10:42:52 -0700 (MST) Subject: [vtkusers] vtkBooleanOperationPolyDataFilter intersection resulting in isolated cells Message-ID: <1453138972958-5736016.post@n5.nabble.com> Hi, I am trying to perform an intersection on two different meshes. Upon intersection (vtkBooleanOperationPolyDataFilter) using there are a few isolated triangles (unclosed patches) that are seen. Is there a way to prevent this or post process to remove these isolated triangles. I am including the python script, the input and the final intersection that I get with these triangles that are not enclosed. Thanks, Phani -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanOperationPolyDataFilter-intersection-resulting-in-isolated-cells-tp5736016.html Sent from the VTK - Users mailing list archive at Nabble.com. From David.MOUSSAUD at cea.fr Mon Jan 18 12:45:55 2016 From: David.MOUSSAUD at cea.fr (MOUSSAUD David 244079) Date: Mon, 18 Jan 2016 17:45:55 +0000 Subject: [vtkusers] opengl2 : set the RGB color to a vertex with vtkPolyData and vtkPolyDataMapper In-Reply-To: <22342_1452761555_569761D2_22342_9554_1_7A18A422C44BE34E947C1F96625E60BD0895FA34@EXDAG0-A1.intra.cea.fr> References: <22342_1452761555_569761D2_22342_9554_1_7A18A422C44BE34E947C1F96625E60BD0895FA34@EXDAG0-A1.intra.cea.fr> Message-ID: <7A18A422C44BE34E947C1F96625E60BD08960EDA@EXDAG0-A1.intra.cea.fr> Hi, I have finally found how to display my colored points. Instead of using points->SetPoint(0, 0.1, 0.0, 0.0); I have used points->InsertNextPoint(0.1, 0.0, 0.0); and it works like a charm ! Could someone explain me(us) why, calling this API, it does not make appear the 2 warning messages below ? Best regards, David. ________________________________ De : vtkusers [vtkusers-bounces at vtk.org] de la part de MOUSSAUD David 244079 Envoy? : jeudi 14 janvier 2016 09:51 ? : vtkusers at vtk.org Objet : [PROVENANCE INTERNET] [vtkusers] opengl2 : set the RGB color to a vertex with vtkPolyData and vtkPolyDataMapper Dear all, I'm trying to use the opengl2 backend rendering. I am with the 6.3 release version. I have a working code to display 3 colored vertex that works with opengl1 (cf below and attached file). // Setup points points = vtkSmartPointer::New(); // Setup the colors array colors = vtkSmartPointer::New(); colors->SetNumberOfComponents(3); colors->SetName("Colors"); // create a vertex vertex = vtkSmartPointer::New(); // list of all the vertices vertices= vtkSmartPointer::New(); nb_points = 3; points->Resize(nb_points); vertices->Initialize(); colors->Initialize(); points->SetPoint(0, 0.1, 0.0, 0.0); vertex->GetPointIds()->SetId(0,0); vertices->InsertNextCell(vertex); colors->InsertNextTuple3(255,0,0); points->SetPoint(1, 0, 0.1, 0.0); vertex->GetPointIds()->SetId(0,1); vertices->InsertNextCell(vertex); colors->InsertNextTuple3(0,255,0); points->SetPoint(2, 0, 0.0, 0.1); vertex->GetPointIds()->SetId(0,2); vertices->InsertNextCell(vertex); colors->InsertNextTuple3(0,0,255); // Create a polydata object and add everything to it polydata = vtkSmartPointer::New(); polydata->SetPoints(points); polydata->SetVerts(vertices); polydata->GetPointData()->SetScalars(colors); mapper = vtkSmartPointer::New(); mapper->SetInputData(polydata); actor = vtkSmartPointer::New(); actor->SetMapper(mapper); actor->GetProperty()->SetPointSize(5); // Setup window renderWindow = vtkSmartPointer::New(); // Setup renderer renderer = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); renderer->AddActor(actor); renderer->ResetCamera(); this->SetRenderWindow(renderWindow); When I compile the same project with my vtk library compiled with the opengl2 backend rendering, I have this error : ERROR: In C:\work\lib\vtk\VTK-6.3.0\VTK-6.3.0\Rendering\OpenGL2\vtkOpenGLPolyDataMapper.cxx, line 1223 vtkOpenGLPolyDataMapper (0000000000501B90): Error setting 'vertexMC' in shader VAO. ERROR: In C:\work\lib\vtk\VTK-6.3.0\VTK-6.3.0\Rendering\OpenGL2\vtkOpenGLPolyDataMapper.cxx, line 1250 vtkOpenGLPolyDataMapper (0000000000501B90): Error setting 'scalarColor' in shader VAO. For information, I've tried the same with a vtkPlyReader based project and I've succeed to render it with opengl2 backend (and it works very much better !) Best Regards, David. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nil.goyette at imeka.ca Mon Jan 18 14:02:35 2016 From: nil.goyette at imeka.ca (Nil Goyette) Date: Mon, 18 Jan 2016 14:02:35 -0500 Subject: [vtkusers] Cython In-Reply-To: References: <56991EAE.5060300@imeka.ca> Message-ID: <569D36CB.7040108@imeka.ca> Hi Cory, Thank you for the answer. Yes, I know that vtk is coded in C++ and that python-vtk is only a binding. I thought that maybe there was a way to avoid some of the expensive calls. For example, I have this loop in a cython file: # streamline is a ndarray of 3d points for i in range(nb_points): point_3d = streamline[i] vtk_points.InsertNextPoint(point_3d) I know that InsertNextPoint is as fast as it can be, but the call itself is expensive. As you said, there's probably nothing to be done here using cython. Which bring me to another question! As I said above, I have a 2D ndarray (list of 3d points) that I need to put in a vtkPoints object. I think it's a waste of time to copy the data in a loop because both vtk and numpy represent their data the same way and should be able to read the data of the other library. I found the "VTK - numpy integration" posts this morning http://www.kitware.com/blog/home/post/709 and I thought that maybe there a way to create a vtkPoints from a numpy array without a loop. I couldn't find how to do it though. It seems we can only create vtkDataSets and put them in bbtk objects. Do you know if what I want to do is possible? Nil Le 2016-01-16 07:59, Cory Quammen a ?crit : > Nil, > > VTK is C++ library that provides Python language bindings, so all the > VTK parts you call in your Python code are invoking compiled C++ > functions. There is no need to cythonize them. > > Cory > > On Fri, Jan 15, 2016 at 11:30 AM, Nil Goyette wrote: >> Hi all, >> >> I tried making a part of my pytthon code faster and vtk is the only part >> which I can't change anything. In fact, I can't find any information on >> cythonizing vtk. Maybe because one should use C++ if he wants a fast version >> :) or maybe because there's simply not much information on the subject. >> >> Is there some specific advices to vtk? Where to find the cdef? >> Or it's simply the general advices like: get a pointer to the data asap to >> be in C mode, then cdef everything? >> >> Nil -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Mon Jan 18 14:06:47 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 18 Jan 2016 14:06:47 -0500 Subject: [vtkusers] Cython In-Reply-To: <569D36CB.7040108@imeka.ca> References: <56991EAE.5060300@imeka.ca> <569D36CB.7040108@imeka.ca> Message-ID: I am assuming that there is a way of passing numpy arrays from regular Python to Cython compiled code? If there is, you can always get access to VTK pointers as numpy arrays through the numpy interface. This would look like this: In (C) Python: Get VTK object Get various data structures (arrays, cell arrays etc.) as numpy arrays Call Cython code In Cython Do some processing Generate new arrays Return as numpy arrays to (C) Python In (C) Python Stick numpy arrays back into VTK data structures such as arrays, cell arrays etc. Best, -berk On Mon, Jan 18, 2016 at 2:02 PM, Nil Goyette wrote: > Hi Cory, > > Thank you for the answer. Yes, I know that vtk is coded in C++ and that > python-vtk is only a binding. I thought that maybe there was a way to avoid > some of the expensive calls. For example, I have this loop in a cython file: > > # streamline is a ndarray of 3d points > for i in range(nb_points): > point_3d = streamline[i] > vtk_points.InsertNextPoint(point_3d) > > I know that InsertNextPoint is as fast as it can be, but the call itself > is expensive. As you said, there's probably nothing to be done here using > cython. > > Which bring me to another question! As I said above, I have a 2D ndarray > (list of 3d points) that I need to put in a vtkPoints object. I think it's > a waste of time to copy the data in a loop because both vtk and numpy > represent their data the same way and should be able to read the data of > the other library. > > I found the "VTK - numpy integration" posts this morning > http://www.kitware.com/blog/home/post/709 and I thought that maybe there > a way to create a vtkPoints from a numpy array without a loop. I couldn't > find how to do it though. It seems we can only create vtkDataSets and put > them in bbtk objects. Do you know if what I want to do is possible? > > Nil > > Le 2016-01-16 07:59, Cory Quammen a ?crit : > > Nil, > > VTK is C++ library that provides Python language bindings, so all the > VTK parts you call in your Python code are invoking compiled C++ > functions. There is no need to cythonize them. > > Cory > > On Fri, Jan 15, 2016 at 11:30 AM, Nil Goyette wrote: > > Hi all, > > I tried making a part of my pytthon code faster and vtk is the only part > which I can't change anything. In fact, I can't find any information on > cythonizing vtk. Maybe because one should use C++ if he wants a fast version > :) or maybe because there's simply not much information on the subject. > > Is there some specific advices to vtk? Where to find the cdef? > Or it's simply the general advices like: get a pointer to the data asap to > be in C mode, then cdef everything? > > Nil > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Jan 18 15:04:35 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 18 Jan 2016 13:04:35 -0700 Subject: [vtkusers] Cython In-Reply-To: References: <56991EAE.5060300@imeka.ca> <569D36CB.7040108@imeka.ca> Message-ID: Hi Nil, Classes like vtkCellArray and vtkPoints use a vtkDataArray to store their data, and vtkDataArray provides a python buffer interface via the wrappers. It is this buffer interface that the vtk numpy_interface package uses to efficiently integrate numpy with VTK. At the low level, it works like this: vtkDataArray provides a python buffer interface, so a vtkDataArray can be passed as a parameter to any python method that expects a buffer object, which allows a numpy array to be constructed from vtkDataArray. To get at the vtkDataArray inside of a vtkPoints object, you can use SetData()/GetData(): SetData(vtkDataArray) // sets the data array used by vtkPoints GetData() -> vtkDataArray // gets the data array used by vtkPoints In addition to making a numpy array from a vtkDataArray, It is also possible to make a vtkDataArray use the memory allocated for a numpy array by calling vtkDataArray.SetVoidArray(). This has to be done with extreme caution, however, so numpy_interface is probably the way to go. - David On Mon, Jan 18, 2016 at 12:06 PM, Berk Geveci wrote: > I am assuming that there is a way of passing numpy arrays from regular > Python to Cython compiled code? If there is, you can always get access to > VTK pointers as numpy arrays through the numpy interface. This would look > like this: > > In (C) Python: > > Get VTK object > Get various data structures (arrays, cell arrays etc.) as numpy arrays > Call Cython code > > In Cython > > Do some processing > Generate new arrays > Return as numpy arrays to (C) Python > > In (C) Python > > Stick numpy arrays back into VTK data structures such as arrays, cell > arrays etc. > > Best, > -berk > > > On Mon, Jan 18, 2016 at 2:02 PM, Nil Goyette wrote: > >> Hi Cory, >> >> Thank you for the answer. Yes, I know that vtk is coded in C++ and that >> python-vtk is only a binding. I thought that maybe there was a way to avoid >> some of the expensive calls. For example, I have this loop in a cython file: >> >> # streamline is a ndarray of 3d points >> for i in range(nb_points): >> point_3d = streamline[i] >> vtk_points.InsertNextPoint(point_3d) >> >> I know that InsertNextPoint is as fast as it can be, but the call itself >> is expensive. As you said, there's probably nothing to be done here using >> cython. >> >> Which bring me to another question! As I said above, I have a 2D ndarray >> (list of 3d points) that I need to put in a vtkPoints object. I think it's >> a waste of time to copy the data in a loop because both vtk and numpy >> represent their data the same way and should be able to read the data of >> the other library. >> >> I found the "VTK - numpy integration" posts this morning >> http://www.kitware.com/blog/home/post/709 and I thought that maybe there >> a way to create a vtkPoints from a numpy array without a loop. I couldn't >> find how to do it though. It seems we can only create vtkDataSets and put >> them in bbtk objects. Do you know if what I want to do is possible? >> >> Nil >> >> Le 2016-01-16 07:59, Cory Quammen a ?crit : >> >> Nil, >> >> VTK is C++ library that provides Python language bindings, so all the >> VTK parts you call in your Python code are invoking compiled C++ >> functions. There is no need to cythonize them. >> >> Cory >> >> On Fri, Jan 15, 2016 at 11:30 AM, Nil Goyette wrote: >> >> Hi all, >> >> I tried making a part of my pytthon code faster and vtk is the only part >> which I can't change anything. In fact, I can't find any information on >> cythonizing vtk. Maybe because one should use C++ if he wants a fast version >> :) or maybe because there's simply not much information on the subject. >> >> Is there some specific advices to vtk? Where to find the cdef? >> Or it's simply the general advices like: get a pointer to the data asap to >> be in C mode, then cdef everything? >> >> Nil >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From prakeshofficial at gmail.com Mon Jan 18 19:40:30 2016 From: prakeshofficial at gmail.com (rakesh patil) Date: Tue, 19 Jan 2016 06:10:30 +0530 Subject: [vtkusers] Grouping and Ungrouping Message-ID: Dear users, I would like to know whether it is possible to group and ungroup the actors so that moving/rotation like operations can be applied for all actors simultaneously. Also corresponding actors geometry information need to updated. Is it possible. ? Thanks in advance. Rakesh patil -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregory.baert at inserm.fr Tue Jan 19 04:45:40 2016 From: gregory.baert at inserm.fr (Mercusyo) Date: Tue, 19 Jan 2016 02:45:40 -0700 (MST) Subject: [vtkusers] Problem with vtkInteractorStyleImage In-Reply-To: <1451570679665-5735715.post@n5.nabble.com> References: <1450771333999-5735629.post@n5.nabble.com> <1451570679665-5735715.post@n5.nabble.com> Message-ID: <1453196740994-5736022.post@n5.nabble.com> Hi, I solved this problem. In fact, I compiled VTK 5.10.1 for C++ Builder; and the window/level event works fine with the same code as with VTK 5.6.1 Thanks, -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-with-vtkInteractorStyleImage-tp5735629p5736022.html Sent from the VTK - Users mailing list archive at Nabble.com. From vtk12af6bc42 at kant.sophonet.de Tue Jan 19 05:06:14 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Tue, 19 Jan 2016 11:06:14 +0100 Subject: [vtkusers] =?utf-8?q?Combined_on-screen_and_off-screen_possible_w?= =?utf-8?q?ith_VTK-7=2E0=2E0_on_linux/X=3F?= In-Reply-To: <366a176fb2a1f7ef7fd824524595b51d@srv19.sysproserver.de> References: <366a176fb2a1f7ef7fd824524595b51d@srv19.sysproserver.de> Message-ID: As a follow-up, I have done some more investigations myself and am still lost: According to http://www.vtk.org/Wiki/VTK/OSMesa_Support, it seems that the legacy OSMesa library on linux systems is not needed anymore, but that software renderers (such as gallium llvm) can provide off-screen rendering themselves. Correct? When looking at VTKROOT/CMake/vtkOpenGL.cmake, it appears (not perfectly sure though) that in this case VTK_OPENGL_HAS_OSMESA needs to be turned on, since this flag sets VTK_CAN_DO_OFFSCREEN to 1. However, it seems to me that VTK_CAN_DO_OFFSCREEN is not used anywhere else (did a thorough "grep" on that keyword in the source tree). It seems that Marcus (Hanwell) was responsible for many of these changes in CMake - Marcus, can you help? What I would like to do is (see my first e-mail below) to simultaneously use interactive rendering and (occasionally) off-screen rendering (for generating static images), which was possible on Linux in earlier versions of VTK (e.g. 5.10), but is not possible anymore. Thanks, Sophonet Am 2016-01-15 12:44, schrieb Sophonet: > Dear list, > > in my application, I would like to display a vtkRenderWindow for user > interaction, but I also would like to use off-screen functionality > simultaneously to render pre-defined views / snapshots that are shown > as static images, like "thumbnails" for different datasets. > > This was possible in VTK 5.10 on linux (by creating a dedicated > vtkRenderWindow per thumbnail, setting OffScreenRenderingOn, rendering > and capturing the resulting image with a vtkWindowToImageFilter). > > In VTK-7.0.0.rc1, using the OpenGL rendering backend on Mesa 9.2.3, I > now get a segfault with the following backtrace: > > (gdb) bt > #0 0x00007fffd045db90 in xcb_glx_get_string_string_length () > from /usr/lib64/libxcb-glx.so.0 > #1 0x00007fffd0cce605 in ?? () from /usr/lib64/libGL.so.1 > #2 0x00007fffd0ccc2b6 in ?? () from /usr/lib64/libGL.so.1 > #3 0x00007fffd14cd086 in > vtkOpenGLExtensionManager::ReadOpenGLExtensions() () > from > /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 > #4 0x00007fffd14cbd50 in vtkOpenGLExtensionManager::Update() () > from > /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 > #5 0x00007fffd14cafd7 in > vtkOpenGLExtensionManager::ExtensionSupported(char const*) () > from > /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 > #6 0x00007fffd14ec8ea in vtkOpenGLRenderWindow::OpenGLInitContext() () > from > /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 > #7 0x00007fffd14eae6d in vtkOpenGLRenderWindow::OpenGLInit() () > from > /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 > #8 0x00007fffd1576932 in > vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int) () > > Besides a remark that probably there could be better error handling > than just letting the app crash without an exception being thrown, I > would like to know if joint on-screen rendering and off-screen > rendering is still possible somehow with VTK-7.0.0. > > I have made two approaches when configuring via CMake: (i) Setting > VTK_OPENGL_HAS_OSMESA=True (no effect, I think I remember that in > earlier versions, this allowed OSMESA_INCLUDE_DIR etc. to be set; this > is not the case anymore, so does this flag still do something? Note > that for VTK 5.10 as mentioned above I did not have to set this > explicitly), (ii) Setting USE_OFFSXCREEN_EGL=True - resulting in an > error that this could not be combined with VTK_USE_X. > > On Windows, combining on-screen and off-screen rendering as described > in the second paragraph is possible. > > Any suggestions would be welcome, the Wiki page I have found on this > topic is not fully understandable to me > (http://www.vtk.org/Wiki/VTK/OSMesa_Support; does this mean that I > have to switch on VTK_OPENGL_HAS_OSMESA or not?...) > > Thanks, > > sophonet > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 pavol.palicka at tuke.sk Tue Jan 19 06:38:46 2016 From: pavol.palicka at tuke.sk (Pavol) Date: Tue, 19 Jan 2016 04:38:46 -0700 (MST) Subject: [vtkusers] compute volume for Unstructured Grid Cells Message-ID: <1453203526556-5736024.post@n5.nabble.com> Hi all, I am trying to compute volume for each cell in unstructured grid using vtkMeshQuality::HexVolume(vtkCell*) but the volume is always equal to 0. Every cell is of the same type - cube. i've created grid using: unstructuredGrid->InsertNextCell(VTK_POLYHEDRON, 8, pointIds,6, cellFaces->GetPointer()); and saved it into .vtu file using vtkXMLUnstructuredGridWriter. Now I am reading this file into vtkUnstruturedGrid and with this: std::cout<<"Volume: "<GetCell(0))< cell data In-Reply-To: References: <569CCC3A.9050808@polytechnique.edu> Message-ID: <569E2648.4060409@polytechnique.edu> Thanks so much, Cory and David! Martin On 18/01/2016 14:45, David Gobbi wrote: > Hi Martin, > > In VTK, image data is point data, one data value per point. Cell data > isn't used because the vtkVoxel cell is not a voxel in the > conventional sense: a vtkVoxel is a finite element that connects 8 > points, where each corner point generally has a data value (use of > point scalars in VTK is much more common than the use of cell > scalars). So the typical usage of vtkVoxel is contrary to the > conventional definition of "voxel" which has just one data value. > > The VTK image processing filters work on point data, because a VTK > point fits the conventional definition of "voxel" (i.e. a voxel > defined as one data sample in a volumetric grid of such samples) > better than vtkVoxel does. > > - David > > On Mon, Jan 18, 2016 at 4:27 AM, Martin Genet > > wrote: > > Hey everyone, > > I'm realizing that vtkImageImport generates images with point > data, not cell data?the Detailed Description says "The array > applies on scalar point data only, not on cell data." I was > wondering why? I would expect it to read the data as cell data, > with one value per voxel. Thanks for helping to understand! > > Martin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregory.baert at inserm.fr Tue Jan 19 09:06:16 2016 From: gregory.baert at inserm.fr (Mercusyo) Date: Tue, 19 Jan 2016 07:06:16 -0700 (MST) Subject: [vtkusers] vtkresliceimageviewer Message-ID: <1453212376494-5736026.post@n5.nabble.com> Hi, I would like to use the "vtkresliceimageviewer" class; I'm newbie in VTK. For beginning, I would like to have a simple example. Thanks, -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkresliceimageviewer-tp5736026.html Sent from the VTK - Users mailing list archive at Nabble.com. From sean at rogue-research.com Tue Jan 19 14:00:56 2016 From: sean at rogue-research.com (Sean McBride) Date: Tue, 19 Jan 2016 14:00:56 -0500 Subject: [vtkusers] Looking for Old Version of VTK ideally ~5.10 In-Reply-To: <8F9F35D9-AD4A-4EA1-AA6E-AC2A5DBB1D9A@gmail.com> References: <8F9F35D9-AD4A-4EA1-AA6E-AC2A5DBB1D9A@gmail.com> Message-ID: <20160119190056.2037246862@mail.rogue-research.com> On Sat, 16 Jan 2016 16:31:40 -0500, Edwin Ward said: >Hello vtk users, >I?m trying to use a piece of software called MaxFEM and it requires as a >dependency a version of VTK greater than 5.4 and less than 6.0. I have >spent several hours trying to compile for windows the version 5.10.1 >source available on the website for download with no luck. If anyone has >a windows copy of a compiled version between 5.4 and before 6.0. I would >be very, very, very grateful if you could email me at edward at colby.edu. >Thanks in advance for your help Or post the compiler errors and maybe someone can help with them. You might also try an older compiler, from the VTK 5.10 era. 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 newcfd at yahoo.com Tue Jan 19 14:58:36 2016 From: newcfd at yahoo.com (newcfd) Date: Tue, 19 Jan 2016 12:58:36 -0700 (MST) Subject: [vtkusers] Memory leak of vtkMultiBlockPlot3D reader and dataset on Ubuntu In-Reply-To: <1452457507663-5735902.post@n5.nabble.com> References: <1452306192591-5735900.post@n5.nabble.com> <1452457507663-5735902.post@n5.nabble.com> Message-ID: <1453233516138-5736029.post@n5.nabble.com> It does not seem to be memory leak. But vtk simply does not release the memory on Ubuntu and CentOS. Is it a Linux issue? After I launch my application and loads a plot3D file, the memory use jumps to 1.1GB. After I delete the file and all settings(reader and vtk rendering), memory use drops to 1GB. When I reload the file, memory use still jumps to 1.1(not over 2.GB). Why does VTK not release the dynamically allocated memory ? Or is it a Linux issue? The same code works fine on Windows. Memory clean-up is perfect. -- View this message in context: http://vtk.1045678.n5.nabble.com/Memory-leak-of-vtkMultiBlockPlot3D-reader-and-dataset-on-Ubuntu-tp5735900p5736029.html Sent from the VTK - Users mailing list archive at Nabble.com. From newcfd at yahoo.com Tue Jan 19 15:34:10 2016 From: newcfd at yahoo.com (newcfd) Date: Tue, 19 Jan 2016 13:34:10 -0700 (MST) Subject: [vtkusers] Memory leak of vtkMultiBlockPlot3D reader and dataset on Ubuntu In-Reply-To: <1453233516138-5736029.post@n5.nabble.com> References: <1452306192591-5735900.post@n5.nabble.com> <1452457507663-5735902.post@n5.nabble.com> <1453233516138-5736029.post@n5.nabble.com> Message-ID: <1453235650663-5736030.post@n5.nabble.com> Both vtk 5.8 and 6.3 has the same issue. -- View this message in context: http://vtk.1045678.n5.nabble.com/Memory-leak-of-vtkMultiBlockPlot3D-reader-and-dataset-on-Ubuntu-tp5735900p5736030.html Sent from the VTK - Users mailing list archive at Nabble.com. From kostadus at yahoo.com Tue Jan 19 16:22:56 2016 From: kostadus at yahoo.com (kostadus) Date: Tue, 19 Jan 2016 14:22:56 -0700 (MST) Subject: [vtkusers] Save screenshot of a rendered chart Message-ID: <1453238576385-5736031.post@n5.nabble.com> Dear vtk team and users, I am using vtk to plot some histograms in a chart and i want to save this chart in a png file. I tried to add the png writer available in the example in the web but however the png file i store is corrupted. Any ideas to come around this issue? A snipshet of my code is pasted below. // Set up the view vtkSmartPointer view = vtkSmartPointer::New(); view->GetRenderer()->SetBackground(1.0, 1.0, 1.0); view->GetRenderWindow()->SetSize(800,600); view->GetRenderWindow()->SetAlphaBitPlanes(1); view->GetScene()->AddItem(chart); chart->SetShowLegend(true); chart->SetTitle("Dose Volume Histogram"); chart->GetAxis(vtkAxis::BOTTOM)->SetTitle("Dose Gy "); chart->GetAxis(vtkAxis::LEFT)->SetTitle("Volume % "); // Start interactor // Screenshot vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); windowToImageFilter->SetInput(view->GetRenderWindow()); windowToImageFilter->SetMagnification(1); //set the resolution of the output image (3 times the current resolution of vtk render window) windowToImageFilter->SetInputBufferTypeToRGB(); //also record the alpha (transparency) channel windowToImageFilter->ReadFrontBufferOff(); // read from the back buffer windowToImageFilter->Update(); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("/home/mood/screenshot.png"); writer->SetInputConnection(windowToImageFilter->GetOutputPort()); writer->Write(); view->GetInteractor()->Initialize(); view->GetInteractor()->Start(); Thank you in advance, Konstantinos Mountris -- View this message in context: http://vtk.1045678.n5.nabble.com/Save-screenshot-of-a-rendered-chart-tp5736031.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Tue Jan 19 16:59:00 2016 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Tue, 19 Jan 2016 14:59:00 -0700 (MST) Subject: [vtkusers] Get IDs within vtkImageStencilData Message-ID: <1453240740090-5736032.post@n5.nabble.com> Hi all, Is there any way to get a list containing the IDs of all voxels within a vtkImageStencilData? My method at the moment for getting all the voxels in the stencil is to create a vtkOBBTree and check if the centre of each voxel is inside the vtkPolyData related to the stencil, but this is very slow. Thanks in advance for any pointers, Rich -- View this message in context: http://vtk.1045678.n5.nabble.com/Get-IDs-within-vtkImageStencilData-tp5736032.html Sent from the VTK - Users mailing list archive at Nabble.com. From martin.genet at polytechnique.edu Tue Jan 19 17:02:38 2016 From: martin.genet at polytechnique.edu (Martin Genet) Date: Tue, 19 Jan 2016 23:02:38 +0100 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> Message-ID: <569EB27E.3050803@polytechnique.edu> Thanks Andy. I need to clarify something: the Derivatives function of vtkCell objects returns a derivs vector containing the components of the gradient of some vector field defined at the cell nodes; the components are ordered in row (as usually in C, i.e., (0,0), (0,1), (0,2), (1,0), (1,1), (1,2), (2,0), (2,1), (2,2)). Now in the CellDerivatives filter the derivs vector is used to fill a vtkTensors, and then the filter returns the internal vector storing the data of the vtkTensors. However, the components of the vtkTensors are ordered in column (as usually in fortran, i.e., (0,0), (1,0), (2,0), (0,1), (1,1), (2,1), (0,2), (1,2), (2,2)). Is it on purpose that the vtkTensors store their data in column and not in row? Isn't it a little dangerous to mix both storage in the code? Thanks for the clarification! Martin On 18/01/2016 13:32, Andy Bauer wrote: > Hi Martin, > > Thanks for following up on this. I found the merge request now and > will look at this. In general, developers should request others to do > a code review on this. This can be done via something like "@acbauer > please review this" or sending an email on this VTK list with a link > to the merge request. > > Best, > Andy > > On Mon, Jan 18, 2016 at 6:23 AM, Martin Genet > > wrote: > > Hi Andy, > > I followed the directions, and submitted a patch (19 days ago), > but haven't heard anything back. > > In GitLab the merge requests counter is at 0, but when I try to > create a new merge request from my commit, it tells the merge > request already exists. Is it being reviewed somewhere? Thanks! > > Martin > > > On 29/12/2015 13:22, Andy Bauer wrote: >> Hi Martin, >> >> This patch makes sense. It would need a test if you want to get >> your changes into VTK. The directions for contributing to VTK are >> at >> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md. >> >> Cheers, >> Andy >> >> On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet >> > > wrote: >> >> Thanks Andy. >> >> What about simply adding another mode, e.g. >> SetTensorModeToComputeGreenLagrangeStrain, to the >> vtkCellDerivatives filter? Would the attached patch make sense? >> >> Martin >> >> On 28/12/2015 14:12, Andy Bauer wrote: >>> Hi Martin, >>> >>> Changing the name of the SetTensorModeToComputeStrain method >>> to something else would break backward compatibility which >>> is generally avoided in VTK. Other options for this include >>> deriving a class to compute non-linear strain from >>> vtkCellDerivatives if it shares enough of the algorithm with >>> the linearized version or maybe just creating a new filter. >>> >>> Cheers, >>> Andy >>> >>> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet >>> >> > wrote: >>> >>> Dear VTK users: >>> >>> I realize that the vtkCellDerivatives filter, when >>> SetTensorModeToComputeStrain is activated, returns the >>> symmetric part of the gradient of the input vector >>> field, which is the linearized strain tensor, i.e., not >>> a proper measure of deformation when large displacements >>> are involved. Would that make sense to have two >>> different modes, SetTensorModeToComputeLinearizedStrain >>> or SetTensorModeToComputeSymmetricGradient, and >>> SetTensorModeToComputeStrain or >>> SetTensorModeToComputeGreenLagrangeStrain? 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 david.gobbi at gmail.com Tue Jan 19 17:09:49 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 19 Jan 2016 15:09:49 -0700 Subject: [vtkusers] Get IDs within vtkImageStencilData In-Reply-To: <1453240740090-5736032.post@n5.nabble.com> References: <1453240740090-5736032.post@n5.nabble.com> Message-ID: Hi Rich, The quick answer is no, there are no classes in VTK to do this. However, I have a class of my own called vtkImageExtractVoxels that almost does what you need: it creates a vtkDataArray that contains the the values of all of the voxels in the stencil. It would be trivial to modify this class so it so that it gives all the IDs. Coincidentally, just 5 minutes before I saw your email, I started editing this class because I need it to give the (x,y,z) of all in-stencil voxels. So I'll get it to produce the IDs as well, and then put it on gitlab if you want to try it out. - David On Tue, Jan 19, 2016 at 2:59 PM, mbcx9rb9 wrote: > Hi all, > > Is there any way to get a list containing the IDs of all voxels within a > vtkImageStencilData? > > My method at the moment for getting all the voxels in the stencil is to > create a vtkOBBTree and check if the centre of each voxel is inside the > vtkPolyData related to the stencil, but this is very slow. > > Thanks in advance for any pointers, > Rich > -------------- next part -------------- An HTML attachment was scrubbed... URL: From newcfd at yahoo.com Tue Jan 19 20:38:34 2016 From: newcfd at yahoo.com (newcfd) Date: Tue, 19 Jan 2016 18:38:34 -0700 (MST) Subject: [vtkusers] Memory leak of vtkMultiBlockPlot3D reader and dataset on Ubuntu In-Reply-To: <1453235650663-5736030.post@n5.nabble.com> References: <1452306192591-5735900.post@n5.nabble.com> <1452457507663-5735902.post@n5.nabble.com> <1453233516138-5736029.post@n5.nabble.com> <1453235650663-5736030.post@n5.nabble.com> Message-ID: <1453253914512-5736035.post@n5.nabble.com> OK. I noticed that VTK has release flag settings which keep some stuff in memory. -- View this message in context: http://vtk.1045678.n5.nabble.com/Memory-leak-of-vtkMultiBlockPlot3D-reader-and-dataset-on-Ubuntu-tp5735900p5736035.html Sent from the VTK - Users mailing list archive at Nabble.com. From andy.bauer at kitware.com Tue Jan 19 21:07:10 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Tue, 19 Jan 2016 21:07:10 -0500 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: <569EB27E.3050803@polytechnique.edu> References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> <569EB27E.3050803@polytechnique.edu> Message-ID: Hi Martin, I haven't looked closely enough at vtkTensors (I don't know if I even knew about it before today) but indeed the ordering output in vtkCellDerivatives for a velocity vector {u,v,w} needs to be [du/dx, du/dy, du/dz, dv/dx, dv/dy, ...] like you have it. I'm not sure when vtkTensors is ordered the way it is. Cheers, Andy On Tue, Jan 19, 2016 at 5:02 PM, Martin Genet < martin.genet at polytechnique.edu> wrote: > Thanks Andy. > > I need to clarify something: the Derivatives function of vtkCell objects > returns a derivs vector containing the components of the gradient of some > vector field defined at the cell nodes; the components are ordered in row > (as usually in C, i.e., (0,0), (0,1), (0,2), (1,0), (1,1), (1,2), (2,0), > (2,1), (2,2)). Now in the CellDerivatives filter the derivs vector is used > to fill a vtkTensors, and then the filter returns the internal vector > storing the data of the vtkTensors. However, the components of the > vtkTensors are ordered in column (as usually in fortran, i.e., (0,0), > (1,0), (2,0), (0,1), (1,1), (2,1), (0,2), (1,2), (2,2)). Is it on purpose > that the vtkTensors store their data in column and not in row? Isn't it a > little dangerous to mix both storage in the code? Thanks for the > clarification! > > Martin > > > On 18/01/2016 13:32, Andy Bauer wrote: > > Hi Martin, > > Thanks for following up on this. I found the merge request now and will > look at this. In general, developers should request others to do a code > review on this. This can be done via something like "@acbauer please review > this" or sending an email on this VTK list with a link to the merge request. > > Best, > Andy > > On Mon, Jan 18, 2016 at 6:23 AM, Martin Genet < > martin.genet at polytechnique.edu> wrote: > >> Hi Andy, >> >> I followed the directions, and submitted a patch (19 days ago), but >> haven't heard anything back. >> >> In GitLab the merge requests counter is at 0, but when I try to create a >> new merge request from my commit, it tells the merge request already >> exists. Is it being reviewed somewhere? Thanks! >> >> Martin >> >> >> On 29/12/2015 13:22, Andy Bauer wrote: >> >> Hi Martin, >> >> This patch makes sense. It would need a test if you want to get your >> changes into VTK. The directions for contributing to VTK are at >> >> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md >> . >> >> Cheers, >> Andy >> >> On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet < >> martin.genet at polytechnique.edu> wrote: >> >>> Thanks Andy. >>> >>> What about simply adding another mode, e.g. >>> SetTensorModeToComputeGreenLagrangeStrain, to the vtkCellDerivatives >>> filter? Would the attached patch make sense? >>> >>> Martin >>> >>> On 28/12/2015 14:12, Andy Bauer wrote: >>> >>> Hi Martin, >>> >>> Changing the name of the SetTensorModeToComputeStrain method to >>> something else would break backward compatibility which is generally >>> avoided in VTK. Other options for this include deriving a class to compute >>> non-linear strain from vtkCellDerivatives if it shares enough of the >>> algorithm with the linearized version or maybe just creating a new filter. >>> >>> Cheers, >>> Andy >>> >>> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet < >>> martin.genet at polytechnique.edu> wrote: >>> >>>> Dear VTK users: >>>> >>>> I realize that the vtkCellDerivatives filter, when >>>> SetTensorModeToComputeStrain is activated, returns the symmetric part of >>>> the gradient of the input vector field, which is the linearized strain >>>> tensor, i.e., not a proper measure of deformation when large displacements >>>> are involved. Would that make sense to have two different modes, >>>> SetTensorModeToComputeLinearizedStrain or >>>> SetTensorModeToComputeSymmetricGradient, and SetTensorModeToComputeStrain >>>> or SetTensorModeToComputeGreenLagrangeStrain? 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 yujie_job at 163.com Wed Jan 20 04:28:34 2016 From: yujie_job at 163.com (yujie_job at 163.com) Date: Wed, 20 Jan 2016 02:28:34 -0700 (MST) Subject: [vtkusers] Line intersect with 2D cells Message-ID: <1453282114822-5736038.post@n5.nabble.com> Hi, all! I wish there is someone can solve my problem. Is there any class or way in vtk to get intersect points and cell Id for line intersect with 2D cells? I have post a draft to explane what I want to say. the red line and quadric cells are in the same plane(such as z=0), now I want to get the intersect points and cell ids whick are intersected with red line and cells. I have tried function in intersectWithLine in vtkOBBTree, but it works for 3D cells intersect with line. Is there any way to solve this prolem for 2D cells? thanks for your view and help! -- View this message in context: http://vtk.1045678.n5.nabble.com/Line-intersect-with-2D-cells-tp5736038.html Sent from the VTK - Users mailing list archive at Nabble.com. From yujie_job at 163.com Wed Jan 20 04:32:53 2016 From: yujie_job at 163.com (yj) Date: Wed, 20 Jan 2016 17:32:53 +0800 (CST) Subject: [vtkusers] Line intersect with 2D cells Message-ID: <699d73a0.10fd4.1525e612e98.Coremail.yujie_job@163.com> Hi, all! I wish there is someone can solve my problem. Is there any class or way in vtk to get intersect points and cell Id for line intersect with 2D cells? I have post a draft to explane what I want to say. the red line and quadric cells are in the same plane(such as z=0), now I want to get the intersect points and cell ids whick are intersected with red line and cells. I have tried function in intersectWithLine in vtkOBBTree, but it works for 3D cells intersect with line. Is there any way to solve this prolem for 2D cells? thanks for your view and help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.genet at polytechnique.edu Wed Jan 20 05:24:23 2016 From: martin.genet at polytechnique.edu (Martin Genet) Date: Wed, 20 Jan 2016 11:24:23 +0100 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> <569EB27E.3050803@polytechnique.edu> Message-ID: <569F6057.3000208@polytechnique.edu> Thanks Andy. Well, I might be wrong but I'm under the impression that vtkCellDerivatives returns [du/dx, dv/dx, dw/dx, du/dy, dv/dy, ...]. Am I wrong? Martin On 20/01/2016 03:07, Andy Bauer wrote: > Hi Martin, > > I haven't looked closely enough at vtkTensors (I don't know if I even > knew about it before today) but indeed the ordering output in > vtkCellDerivatives for a velocity vector {u,v,w} needs to be [du/dx, > du/dy, du/dz, dv/dx, dv/dy, ...] like you have it. I'm not sure when > vtkTensors is ordered the way it is. > > Cheers, > Andy > > On Tue, Jan 19, 2016 at 5:02 PM, Martin Genet > > wrote: > > Thanks Andy. > > I need to clarify something: the Derivatives function of vtkCell > objects returns a derivs vector containing the components of the > gradient of some vector field defined at the cell nodes; the > components are ordered in row (as usually in C, i.e., (0,0), > (0,1), (0,2), (1,0), (1,1), (1,2), (2,0), (2,1), (2,2)). Now in > the CellDerivatives filter the derivs vector is used to fill a > vtkTensors, and then the filter returns the internal vector > storing the data of the vtkTensors. However, the components of the > vtkTensors are ordered in column (as usually in fortran, i.e., > (0,0), (1,0), (2,0), (0,1), (1,1), (2,1), (0,2), (1,2), (2,2)). Is > it on purpose that the vtkTensors store their data in column and > not in row? Isn't it a little dangerous to mix both storage in the > code? Thanks for the clarification! > > Martin > > > On 18/01/2016 13:32, Andy Bauer wrote: >> Hi Martin, >> >> Thanks for following up on this. I found the merge request now >> and will look at this. In general, developers should request >> others to do a code review on this. This can be done via >> something like "@acbauer please review this" or sending an email >> on this VTK list with a link to the merge request. >> >> Best, >> Andy >> >> On Mon, Jan 18, 2016 at 6:23 AM, Martin Genet >> > > wrote: >> >> Hi Andy, >> >> I followed the directions, and submitted a patch (19 days >> ago), but haven't heard anything back. >> >> In GitLab the merge requests counter is at 0, but when I try >> to create a new merge request from my commit, it tells the >> merge request already exists. Is it being reviewed somewhere? >> Thanks! >> >> Martin >> >> >> On 29/12/2015 13:22, Andy Bauer wrote: >>> Hi Martin, >>> >>> This patch makes sense. It would need a test if you want to >>> get your changes into VTK. The directions for contributing >>> to VTK are at >>> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md. >>> >>> Cheers, >>> Andy >>> >>> On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet >>> >> > wrote: >>> >>> Thanks Andy. >>> >>> What about simply adding another mode, e.g. >>> SetTensorModeToComputeGreenLagrangeStrain, to the >>> vtkCellDerivatives filter? Would the attached patch make >>> sense? >>> >>> Martin >>> >>> On 28/12/2015 14:12, Andy Bauer wrote: >>>> Hi Martin, >>>> >>>> Changing the name of the SetTensorModeToComputeStrain >>>> method to something else would break backward >>>> compatibility which is generally avoided in VTK. Other >>>> options for this include deriving a class to compute >>>> non-linear strain from vtkCellDerivatives if it shares >>>> enough of the algorithm with the linearized version or >>>> maybe just creating a new filter. >>>> >>>> Cheers, >>>> Andy >>>> >>>> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet >>>> >>> > wrote: >>>> >>>> Dear VTK users: >>>> >>>> I realize that the vtkCellDerivatives filter, when >>>> SetTensorModeToComputeStrain is activated, returns >>>> the symmetric part of the gradient of the input >>>> vector field, which is the linearized strain >>>> tensor, i.e., not a proper measure of deformation >>>> when large displacements are involved. Would that >>>> make sense to have two different modes, >>>> SetTensorModeToComputeLinearizedStrain or >>>> SetTensorModeToComputeSymmetricGradient, and >>>> SetTensorModeToComputeStrain or >>>> SetTensorModeToComputeGreenLagrangeStrain? 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 bryan.cole at teraview.com Wed Jan 20 05:55:12 2016 From: bryan.cole at teraview.com (Bryan Cole) Date: Wed, 20 Jan 2016 10:55:12 +0000 Subject: [vtkusers] problems with vtKProgrammableSource [SOLVED] In-Reply-To: <1452880889.2638.199.camel@bryan.teraview.com> References: <1452877735.2638.193.camel@bryan.teraview.com> <1452879657.2638.196.camel@bryan.teraview.com> <1452880889.2638.199.camel@bryan.teraview.com> Message-ID: <1453287312.2433.46.camel@bryan.teraview.com> For the benefit of anyone else struggling to get a vtkProgrammableSource to work for ImageData / StructuredPoints, it seems the secret sauce (and it really is a secret ... there are no examples or documentation on this that I could find) is to set the OutputInformation (and set the WHOLE_EXTENT in particular). My example script is given below. This works in VTK-6.0.0 . More recent versions of VTK have added a SetRequestInformationMethod to the ProgrammableSource which allows you to provide a script to set the OutputInformation as part of the new pipeline execution. In my solution, I set the OutputInformation once after creating the ProgrammableSource object which is OK for my purposes (small images where I'm always updating the whole extent). I also tried editing the OutputInformation data in the ExecuteMethod; this worked sort of, if I forced the method of execute the first time with a call to .Update(); I don't think this will give the correct behaviour for proper pipeline execution though. I guess you could update OutputInformation using the VTK observer framework to mimic pipeline execution if you need the OutputInformation to change dynamically and your VTK version doesn't have the SetRequestInformationMethod call. The other important point is that you must specify which output port you want in both the GetOutputPort and GetOutputInformation methods (port 1 for StructurePoints). HTH, BC ===================== import vtk from vtk.util.numpy_support import numpy_to_vtk import numpy x,y,z = numpy.ogrid[-10:10:50j,-10:10:50j,-10:10:50j] data = (x**2 + y**2 + z**2)/(5**2) data = data.ravel().astype("f") src = vtk.vtkProgrammableSource() ###Initialise the OutputInformation on the ProgrammableSource executive = src.GetExecutive() outInfo = executive.GetOutputInformation(1) outInfo.Set(executive.WHOLE_EXTENT(), 0, 49, 0, 49, 0, 49) def make_grid(): sp = src.GetStructuredPointsOutput() sp.SetExtent(0,49,0,49,0,49) sp.SetOrigin(-10,-10,-10) sp.SetSpacing(0.4,0.4,0.4) sp.GetPointData().SetScalars(numpy_to_vtk(data)) src.SetExecuteMethod(make_grid) func = vtk.vtkSphere() func.SetCenter(0,0,0) func.SetRadius(5.0) clip = vtk.vtkImageMarchingCubes() clip.SetInputConnection(0,src.GetOutputPort(1)) clip.SetValue(0,1.0) map = vtk.vtkPolyDataMapper() map.SetInputConnection(clip.GetOutputPort(0)) map.ScalarVisibilityOff() surfaceActor = vtk.vtkActor() surfaceActor.SetMapper(map) ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) ren.AddActor(surfaceActor) iren.Initialize() renWin.Render() iren.Start() =============================== -- Group Leader, Technical Development Group - Teraview Ltd. Platinum Building, St. John's Innovation Park, Cambridge CB4 0DS, UK. tel: +44 (0)1223 435386, fax: +44 (0)1223 435382, web: www.teraview.com Registered Number: 04126946, VAT Number: 770 8883 84 ...preferred document formats: ODF (ISO/IEC 26300:2006), PDF -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Wed Jan 20 07:52:31 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Wed, 20 Jan 2016 07:52:31 -0500 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: <569F6057.3000208@polytechnique.edu> References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> <569EB27E.3050803@polytechnique.edu> <569F6057.3000208@polytechnique.edu> Message-ID: Hmm, in fact it does. I was looking at vtkGradientFilter instead of vtkCellDerivatives for the ordering of the output of the gradient of a vector. I think the output order is supposed to be fortran/column-major ordering like vtkCellDerivatives instead of C/row-major ordering like vtkGradientFilter. Well, you can see the confusion that crops up and maybe that's why vtkTensors was done that way. In any case, let me verify for sure which way is correct and get back to you on this. On Wed, Jan 20, 2016 at 5:24 AM, Martin Genet < martin.genet at polytechnique.edu> wrote: > Thanks Andy. > > Well, I might be wrong but I'm under the impression that > vtkCellDerivatives returns [du/dx, dv/dx, dw/dx, du/dy, dv/dy, ...]. Am I > wrong? > > Martin > > > On 20/01/2016 03:07, Andy Bauer wrote: > > Hi Martin, > > I haven't looked closely enough at vtkTensors (I don't know if I even knew > about it before today) but indeed the ordering output in vtkCellDerivatives > for a velocity vector {u,v,w} needs to be [du/dx, du/dy, du/dz, dv/dx, > dv/dy, ...] like you have it. I'm not sure when vtkTensors is ordered the > way it is. > > Cheers, > Andy > > On Tue, Jan 19, 2016 at 5:02 PM, Martin Genet < > martin.genet at polytechnique.edu> wrote: > >> Thanks Andy. >> >> I need to clarify something: the Derivatives function of vtkCell objects >> returns a derivs vector containing the components of the gradient of some >> vector field defined at the cell nodes; the components are ordered in row >> (as usually in C, i.e., (0,0), (0,1), (0,2), (1,0), (1,1), (1,2), (2,0), >> (2,1), (2,2)). Now in the CellDerivatives filter the derivs vector is used >> to fill a vtkTensors, and then the filter returns the internal vector >> storing the data of the vtkTensors. However, the components of the >> vtkTensors are ordered in column (as usually in fortran, i.e., (0,0), >> (1,0), (2,0), (0,1), (1,1), (2,1), (0,2), (1,2), (2,2)). Is it on purpose >> that the vtkTensors store their data in column and not in row? Isn't it a >> little dangerous to mix both storage in the code? Thanks for the >> clarification! >> >> Martin >> >> >> On 18/01/2016 13:32, Andy Bauer wrote: >> >> Hi Martin, >> >> Thanks for following up on this. I found the merge request now and will >> look at this. In general, developers should request others to do a code >> review on this. This can be done via something like "@acbauer please review >> this" or sending an email on this VTK list with a link to the merge request. >> >> Best, >> Andy >> >> On Mon, Jan 18, 2016 at 6:23 AM, Martin Genet < >> martin.genet at polytechnique.edu> wrote: >> >>> Hi Andy, >>> >>> I followed the directions, and submitted a patch (19 days ago), but >>> haven't heard anything back. >>> >>> In GitLab the merge requests counter is at 0, but when I try to create a >>> new merge request from my commit, it tells the merge request already >>> exists. Is it being reviewed somewhere? Thanks! >>> >>> Martin >>> >>> >>> On 29/12/2015 13:22, Andy Bauer wrote: >>> >>> Hi Martin, >>> >>> This patch makes sense. It would need a test if you want to get your >>> changes into VTK. The directions for contributing to VTK are at >>> >>> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md >>> . >>> >>> Cheers, >>> Andy >>> >>> On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet < >>> martin.genet at polytechnique.edu> wrote: >>> >>>> Thanks Andy. >>>> >>>> What about simply adding another mode, e.g. >>>> SetTensorModeToComputeGreenLagrangeStrain, to the vtkCellDerivatives >>>> filter? Would the attached patch make sense? >>>> >>>> Martin >>>> >>>> On 28/12/2015 14:12, Andy Bauer wrote: >>>> >>>> Hi Martin, >>>> >>>> Changing the name of the SetTensorModeToComputeStrain method to >>>> something else would break backward compatibility which is generally >>>> avoided in VTK. Other options for this include deriving a class to compute >>>> non-linear strain from vtkCellDerivatives if it shares enough of the >>>> algorithm with the linearized version or maybe just creating a new filter. >>>> >>>> Cheers, >>>> Andy >>>> >>>> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet < >>>> martin.genet at polytechnique.edu> wrote: >>>> >>>>> Dear VTK users: >>>>> >>>>> I realize that the vtkCellDerivatives filter, when >>>>> SetTensorModeToComputeStrain is activated, returns the symmetric part of >>>>> the gradient of the input vector field, which is the linearized strain >>>>> tensor, i.e., not a proper measure of deformation when large displacements >>>>> are involved. Would that make sense to have two different modes, >>>>> SetTensorModeToComputeLinearizedStrain or >>>>> SetTensorModeToComputeSymmetricGradient, and SetTensorModeToComputeStrain >>>>> or SetTensorModeToComputeGreenLagrangeStrain? 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 gregory.baert at inserm.fr Wed Jan 20 09:44:39 2016 From: gregory.baert at inserm.fr (Mercusyo) Date: Wed, 20 Jan 2016 07:44:39 -0700 (MST) Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <52038C6C.4040208@simworx.com.br> References: <1294822545216-3337807.post@n5.nabble.com> <1321018174359-4984363.post@n5.nabble.com> <4EC3BAAF.1000800@hgl-dynamics.com> <4EC3E2ED.7000502@simworx.com.br> <1323265692542-5055692.post@n5.nabble.com> <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> Message-ID: <1453301079866-5736045.post@n5.nabble.com> Hi, I know that this post is old; but I need help : I would like to know if it's possible to compile VTK 6.1.0 with C++ Builder XE ? I tested to compiled but I have errors when compile the "Borland makefile". NB : I use CMake 3.1.2 Thanks, -- View this message in context: http://vtk.1045678.n5.nabble.com/Recipe-for-building-VTK-5-6-1-with-C-Builder-XE-bcc32-6-31-tp3337807p5736045.html Sent from the VTK - Users mailing list archive at Nabble.com. From ben.boeckel at kitware.com Wed Jan 20 10:09:46 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 20 Jan 2016 10:09:46 -0500 Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <1453301079866-5736045.post@n5.nabble.com> References: <1294822545216-3337807.post@n5.nabble.com> <1321018174359-4984363.post@n5.nabble.com> <4EC3BAAF.1000800@hgl-dynamics.com> <4EC3E2ED.7000502@simworx.com.br> <1323265692542-5055692.post@n5.nabble.com> <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> Message-ID: <20160120150946.GC1997@megas.kitware.com> On Wed, Jan 20, 2016 at 07:44:39 -0700, Mercusyo wrote: > I know that this post is old; but I need help : I would like to know if it's > possible to compile VTK 6.1.0 with C++ Builder XE ? It's not one of our tested platforms, but it may only need small changes (6.2 and up started dropping support for older compilers, so those are likely much harder to get working if 6.1 is already using unsupported bits). > I tested to compiled but I have errors when compile the "Borland makefile". > NB : I use CMake 3.1.2 What are the errors? --Ben From mail at oliwe.com Wed Jan 20 10:28:50 2016 From: mail at oliwe.com (Oliver Weinheimer) Date: Wed, 20 Jan 2016 08:28:50 -0700 (MST) Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <20160120150946.GC1997@megas.kitware.com> References: <1294822545216-3337807.post@n5.nabble.com> <1321018174359-4984363.post@n5.nabble.com> <4EC3BAAF.1000800@hgl-dynamics.com> <4EC3E2ED.7000502@simworx.com.br> <1323265692542-5055692.post@n5.nabble.com> <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> Message-ID: <1453303730231-5736047.post@n5.nabble.com> I compiled VTK 6.1 with Builder XE7 and bcc64 some time ago - it worked. But I am still using VTK 5.10 in my projects. I will try to compile VTK 6.2 with Builder CX and bcc64 in near future. This should work - I am not sure if XE will work because bcc64 is based on the clang compiler and hence completely different to bcc32. Good luck! -- View this message in context: http://vtk.1045678.n5.nabble.com/Recipe-for-building-VTK-5-6-1-with-C-Builder-XE-bcc32-6-31-tp3337807p5736047.html Sent from the VTK - Users mailing list archive at Nabble.com. From gregory.baert at inserm.fr Wed Jan 20 10:28:51 2016 From: gregory.baert at inserm.fr (gregory.baert at inserm.fr) Date: Wed, 20 Jan 2016 16:28:51 +0100 Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <20160120150946.GC1997@megas.kitware.com> References: <1294822545216-3337807.post@n5.nabble.com> <1321018174359-4984363.post@n5.nabble.com> <4EC3BAAF.1000800@hgl-dynamics.com> <4EC3E2ED.7000502@simworx.com.br> <1323265692542-5055692.post@n5.nabble.com> <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> Message-ID: <007101d15397$445010c0$ccf03240$@inserm.fr> Thanks for your help, I send you the error in the attached file, Best regards, -----Message d'origine----- De : Ben Boeckel [mailto:ben.boeckel at kitware.com] Envoy? : mercredi 20 janvier 2016 16:10 ? : Mercusyo Cc : vtkusers at vtk.org Objet : Re: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) On Wed, Jan 20, 2016 at 07:44:39 -0700, Mercusyo wrote: > I know that this post is old; but I need help : I would like to know > if it's possible to compile VTK 6.1.0 with C++ Builder XE ? It's not one of our tested platforms, but it may only need small changes (6.2 and up started dropping support for older compilers, so those are likely much harder to get working if 6.1 is already using unsupported bits). > I tested to compiled but I have errors when compile the "Borland makefile". > NB : I use CMake 3.1.2 What are the errors? --Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: VTK_6_1_0_XE_Error.PNG Type: image/png Size: 43168 bytes Desc: not available URL: From gregory.baert at inserm.fr Wed Jan 20 10:45:45 2016 From: gregory.baert at inserm.fr (gregory.baert at inserm.fr) Date: Wed, 20 Jan 2016 16:45:45 +0100 Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <1453303730231-5736047.post@n5.nabble.com> References: <1294822545216-3337807.post@n5.nabble.com> <1321018174359-4984363.post@n5.nabble.com> <4EC3BAAF.1000800@hgl-dynamics.com> <4EC3E2ED.7000502@simworx.com.br> <1323265692542-5055692.post@n5.nabble.com> <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> <1453303730231-5736047.post@n5.nabble.com> Message-ID: <007b01d15399$a06bdc20$e1439460$@inserm.fr> Ok thanks ! But, I have to respect some technical constraints : building win32 applications ... to be continued ... -----Message d'origine----- De?: vtkusers [mailto:vtkusers-bounces at vtk.org] De la part de Oliver Weinheimer Envoy??: mercredi 20 janvier 2016 16:29 ??: vtkusers at vtk.org Objet?: Re: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) I compiled VTK 6.1 with Builder XE7 and bcc64 some time ago - it worked. But I am still using VTK 5.10 in my projects. I will try to compile VTK 6.2 with Builder CX and bcc64 in near future. This should work - I am not sure if XE will work because bcc64 is based on the clang compiler and hence completely different to bcc32. Good luck! -- View this message in context: http://vtk.1045678.n5.nabble.com/Recipe-for-building-VTK-5-6-1-with-C-Build er-XE-bcc32-6-31-tp3337807p5736047.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 richard.j.brown at live.co.uk Wed Jan 20 11:10:09 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Wed, 20 Jan 2016 17:10:09 +0100 Subject: [vtkusers] Get IDs within vtkImageStencilData In-Reply-To: References: <1453240740090-5736032.post@n5.nabble.com> Message-ID: Great thanks David. Silly question, but where is gitlab? Regards, Richard > On 19 Jan 2016, at 23:09, David Gobbi wrote: > > Hi Rich, > > The quick answer is no, there are no classes in VTK to do this. > > However, I have a class of my own called vtkImageExtractVoxels that > almost does what you need: it creates a vtkDataArray that contains the > the values of all of the voxels in the stencil. It would be trivial to modify > this class so it so that it gives all the IDs. > > Coincidentally, just 5 minutes before I saw your email, I started editing > this class because I need it to give the (x,y,z) of all in-stencil voxels. > So I'll get it to produce the IDs as well, and then put it on gitlab if you > want to try it out. > > - David > > On Tue, Jan 19, 2016 at 2:59 PM, mbcx9rb9 > wrote: > Hi all, > > Is there any way to get a list containing the IDs of all voxels within a > vtkImageStencilData? > > My method at the moment for getting all the voxels in the stencil is to > create a vtkOBBTree and check if the centre of each voxel is inside the > vtkPolyData related to the stencil, but this is very slow. > > Thanks in advance for any pointers, > Rich -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jan 20 11:31:16 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 20 Jan 2016 09:31:16 -0700 Subject: [vtkusers] Get IDs within vtkImageStencilData In-Reply-To: References: <1453240740090-5736032.post@n5.nabble.com> Message-ID: Proposed patches for VTK are at this page: https://gitlab.kitware.com/vtk/vtk/merge_requests And a log of accepted patches is at this page: https://gitlab.kitware.com/groups/vtk When my patch is ready, I'll send you a link. - David On Wed, Jan 20, 2016 at 9:10 AM, Richard Brown wrote: > Great thanks David. > > Silly question, but where is gitlab? > > Regards, > Richard > > On 19 Jan 2016, at 23:09, David Gobbi wrote: > > Hi Rich, > > The quick answer is no, there are no classes in VTK to do this. > > However, I have a class of my own called vtkImageExtractVoxels that > almost does what you need: it creates a vtkDataArray that contains the > the values of all of the voxels in the stencil. It would be trivial to > modify > this class so it so that it gives all the IDs. > > Coincidentally, just 5 minutes before I saw your email, I started editing > this class because I need it to give the (x,y,z) of all in-stencil voxels. > So I'll get it to produce the IDs as well, and then put it on gitlab if you > want to try it out. > > - David > > On Tue, Jan 19, 2016 at 2:59 PM, mbcx9rb9 > wrote: > >> Hi all, >> >> Is there any way to get a list containing the IDs of all voxels within a >> vtkImageStencilData? >> >> My method at the moment for getting all the voxels in the stencil is to >> create a vtkOBBTree and check if the centre of each voxel is inside the >> vtkPolyData related to the stencil, but this is very slow. >> >> Thanks in advance for any pointers, >> Rich >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Wed Jan 20 11:44:43 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 20 Jan 2016 11:44:43 -0500 Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <007101d15397$445010c0$ccf03240$@inserm.fr> References: <1321018174359-4984363.post@n5.nabble.com> <4EC3BAAF.1000800@hgl-dynamics.com> <4EC3E2ED.7000502@simworx.com.br> <1323265692542-5055692.post@n5.nabble.com> <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> <007101d15397$445010c0$ccf03240$@inserm.fr> Message-ID: <20160120164443.GA27712@megas.kitware.com> On Wed, Jan 20, 2016 at 16:28:51 +0100, gregory.baert at inserm.fr wrote: > Thanks for your help, > I send you the error in the attached file, It appears that VTK 6.1 doesn't consider Embarcadero which doesn't appear to support __declspec(align()). vtkAtomicInt needs to not define VTK_WINDOWS_ATOMIC on line 46 or guard the __declspec(align()) bits on lines 72 and 190 against Embarcadero. --Ben From newcfd at yahoo.com Wed Jan 20 12:28:53 2016 From: newcfd at yahoo.com (newcfd) Date: Wed, 20 Jan 2016 10:28:53 -0700 (MST) Subject: [vtkusers] Line intersect with 2D cells In-Reply-To: <1453282114822-5736038.post@n5.nabble.com> References: <1453282114822-5736038.post@n5.nabble.com> Message-ID: <1453310933543-5736053.post@n5.nabble.com> you may need to tell which type of mesh(structured or unstructured) you use. -- View this message in context: http://vtk.1045678.n5.nabble.com/Line-intersect-with-2D-cells-tp5736038p5736053.html Sent from the VTK - Users mailing list archive at Nabble.com. From andy.bauer at kitware.com Wed Jan 20 13:19:09 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Wed, 20 Jan 2016 13:19:09 -0500 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> <569EB27E.3050803@polytechnique.edu> <569F6057.3000208@polytechnique.edu> Message-ID: I've looked at this a bit more along with others and unfortunately there's some inconsistency in VTK for tensor ordering. If you look at the vtkCell::Derivatives() documentation ( http://www.vtk.org/doc/nightly/html/classvtkCell.html#aff3d8332e9d7d556a9d2e9f91173d068), it's using a C/row-major ordering. There's some places in that have done row-major and others that have done column major. For the most part it hasn't been an issue since many/most of the uses of tensor have been symmetric but it should be fixed regardless. I've entered a mantis issue for this at http://www.paraview.org/Bug/view.php?id=15949. Would you be willing to go in and make the change to vtkCellDerivatives? I'm hoping to go through your changes to that class sometime today. On Wed, Jan 20, 2016 at 7:52 AM, Andy Bauer wrote: > Hmm, in fact it does. I was looking at vtkGradientFilter instead of > vtkCellDerivatives for the ordering of the output of the gradient of a > vector. I think the output order is supposed to be fortran/column-major > ordering like vtkCellDerivatives instead of C/row-major ordering like > vtkGradientFilter. Well, you can see the confusion that crops up and maybe > that's why vtkTensors was done that way. In any case, let me verify for > sure which way is correct and get back to you on this. > > On Wed, Jan 20, 2016 at 5:24 AM, Martin Genet < > martin.genet at polytechnique.edu> wrote: > >> Thanks Andy. >> >> Well, I might be wrong but I'm under the impression that >> vtkCellDerivatives returns [du/dx, dv/dx, dw/dx, du/dy, dv/dy, ...]. Am I >> wrong? >> >> Martin >> >> >> On 20/01/2016 03:07, Andy Bauer wrote: >> >> Hi Martin, >> >> I haven't looked closely enough at vtkTensors (I don't know if I even >> knew about it before today) but indeed the ordering output in >> vtkCellDerivatives for a velocity vector {u,v,w} needs to be [du/dx, du/dy, >> du/dz, dv/dx, dv/dy, ...] like you have it. I'm not sure when vtkTensors is >> ordered the way it is. >> >> Cheers, >> Andy >> >> On Tue, Jan 19, 2016 at 5:02 PM, Martin Genet < >> martin.genet at polytechnique.edu> wrote: >> >>> Thanks Andy. >>> >>> I need to clarify something: the Derivatives function of vtkCell objects >>> returns a derivs vector containing the components of the gradient of some >>> vector field defined at the cell nodes; the components are ordered in row >>> (as usually in C, i.e., (0,0), (0,1), (0,2), (1,0), (1,1), (1,2), (2,0), >>> (2,1), (2,2)). Now in the CellDerivatives filter the derivs vector is used >>> to fill a vtkTensors, and then the filter returns the internal vector >>> storing the data of the vtkTensors. However, the components of the >>> vtkTensors are ordered in column (as usually in fortran, i.e., (0,0), >>> (1,0), (2,0), (0,1), (1,1), (2,1), (0,2), (1,2), (2,2)). Is it on purpose >>> that the vtkTensors store their data in column and not in row? Isn't it a >>> little dangerous to mix both storage in the code? Thanks for the >>> clarification! >>> >>> Martin >>> >>> >>> On 18/01/2016 13:32, Andy Bauer wrote: >>> >>> Hi Martin, >>> >>> Thanks for following up on this. I found the merge request now and will >>> look at this. In general, developers should request others to do a code >>> review on this. This can be done via something like "@acbauer please review >>> this" or sending an email on this VTK list with a link to the merge request. >>> >>> Best, >>> Andy >>> >>> On Mon, Jan 18, 2016 at 6:23 AM, Martin Genet < >>> martin.genet at polytechnique.edu> wrote: >>> >>>> Hi Andy, >>>> >>>> I followed the directions, and submitted a patch (19 days ago), but >>>> haven't heard anything back. >>>> >>>> In GitLab the merge requests counter is at 0, but when I try to create >>>> a new merge request from my commit, it tells the merge request already >>>> exists. Is it being reviewed somewhere? Thanks! >>>> >>>> Martin >>>> >>>> >>>> On 29/12/2015 13:22, Andy Bauer wrote: >>>> >>>> Hi Martin, >>>> >>>> This patch makes sense. It would need a test if you want to get your >>>> changes into VTK. The directions for contributing to VTK are at >>>> >>>> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md >>>> . >>>> >>>> Cheers, >>>> Andy >>>> >>>> On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet < >>>> martin.genet at polytechnique.edu> wrote: >>>> >>>>> Thanks Andy. >>>>> >>>>> What about simply adding another mode, e.g. >>>>> SetTensorModeToComputeGreenLagrangeStrain, to the vtkCellDerivatives >>>>> filter? Would the attached patch make sense? >>>>> >>>>> Martin >>>>> >>>>> On 28/12/2015 14:12, Andy Bauer wrote: >>>>> >>>>> Hi Martin, >>>>> >>>>> Changing the name of the SetTensorModeToComputeStrain method to >>>>> something else would break backward compatibility which is generally >>>>> avoided in VTK. Other options for this include deriving a class to compute >>>>> non-linear strain from vtkCellDerivatives if it shares enough of the >>>>> algorithm with the linearized version or maybe just creating a new filter. >>>>> >>>>> Cheers, >>>>> Andy >>>>> >>>>> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet < >>>>> martin.genet at polytechnique.edu> wrote: >>>>> >>>>>> Dear VTK users: >>>>>> >>>>>> I realize that the vtkCellDerivatives filter, when >>>>>> SetTensorModeToComputeStrain is activated, returns the symmetric part of >>>>>> the gradient of the input vector field, which is the linearized strain >>>>>> tensor, i.e., not a proper measure of deformation when large displacements >>>>>> are involved. Would that make sense to have two different modes, >>>>>> SetTensorModeToComputeLinearizedStrain or >>>>>> SetTensorModeToComputeSymmetricGradient, and SetTensorModeToComputeStrain >>>>>> or SetTensorModeToComputeGreenLagrangeStrain? 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 ben.boeckel at kitware.com Wed Jan 20 14:42:04 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 20 Jan 2016 14:42:04 -0500 Subject: [vtkusers] [RFC] Renaming the 'vtk' binary Message-ID: <20160120194204.GA8790@megas.kitware.com> Hi all, Currently, there is a 'vtk' binary built when the Tcl bindings are enabled. In order to make it more obvious, it would be nice to rename this to 'vtktcl' (which matches the 'vtkpython' binary name). Similar for the 'pvtk' binary becoming 'pvtktcl'. Any objections? --Ben From dave.demarle at kitware.com Wed Jan 20 14:43:32 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 20 Jan 2016 14:43:32 -0500 Subject: [vtkusers] [RFC] Renaming the 'vtk' binary In-Reply-To: <20160120194204.GA8790@megas.kitware.com> References: <20160120194204.GA8790@megas.kitware.com> Message-ID: +1 from me David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Jan 20, 2016 at 2:42 PM, Ben Boeckel wrote: > Hi all, > > Currently, there is a 'vtk' binary built when the Tcl bindings are > enabled. In order to make it more obvious, it would be nice to rename > this to 'vtktcl' (which matches the 'vtkpython' binary name). Similar > for the 'pvtk' binary becoming 'pvtktcl'. > > Any objections? > > --Ben > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 josp.jorge at gmail.com Wed Jan 20 14:49:39 2016 From: josp.jorge at gmail.com (Jorge Perez) Date: Wed, 20 Jan 2016 20:49:39 +0100 Subject: [vtkusers] [RFC] Renaming the 'vtk' binary In-Reply-To: References: <20160120194204.GA8790@megas.kitware.com> Message-ID: I use vtk + TCL, the change makes sense. Regards, El 20/01/2016 20:43, "David E DeMarle" escribi?: > +1 from me > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Wed, Jan 20, 2016 at 2:42 PM, Ben Boeckel > wrote: > >> Hi all, >> >> Currently, there is a 'vtk' binary built when the Tcl bindings are >> enabled. In order to make it more obvious, it would be nice to rename >> this to 'vtktcl' (which matches the 'vtkpython' binary name). Similar >> for the 'pvtk' binary becoming 'pvtktcl'. >> >> Any objections? >> >> --Ben >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 bill.lorensen at gmail.com Wed Jan 20 15:03:19 2016 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 20 Jan 2016 15:03:19 -0500 Subject: [vtkusers] [RFC] Renaming the 'vtk' binary In-Reply-To: References: <20160120194204.GA8790@megas.kitware.com> Message-ID: +1 On Wed, Jan 20, 2016 at 2:49 PM, Jorge Perez wrote: > I use vtk + TCL, the change makes sense. > > Regards, > > El 20/01/2016 20:43, "David E DeMarle" escribi?: >> >> +1 from me >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> On Wed, Jan 20, 2016 at 2:42 PM, Ben Boeckel >> wrote: >>> >>> Hi all, >>> >>> Currently, there is a 'vtk' binary built when the Tcl bindings are >>> enabled. In order to make it more obvious, it would be nice to rename >>> this to 'vtktcl' (which matches the 'vtkpython' binary name). Similar >>> for the 'pvtk' binary becoming 'pvtktcl'. >>> >>> Any objections? >>> >>> --Ben >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From andy.bauer at kitware.com Wed Jan 20 15:42:14 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Wed, 20 Jan 2016 15:42:14 -0500 Subject: [vtkusers] [RFC] Renaming the 'vtk' binary In-Reply-To: References: <20160120194204.GA8790@megas.kitware.com> Message-ID: +1 On Wed, Jan 20, 2016 at 3:03 PM, Bill Lorensen wrote: > +1 > > > On Wed, Jan 20, 2016 at 2:49 PM, Jorge Perez wrote: > > I use vtk + TCL, the change makes sense. > > > > Regards, > > > > El 20/01/2016 20:43, "David E DeMarle" > escribi?: > >> > >> +1 from me > >> > >> David E DeMarle > >> Kitware, Inc. > >> R&D Engineer > >> 21 Corporate Drive > >> Clifton Park, NY 12065-8662 > >> Phone: 518-881-4909 > >> > >> On Wed, Jan 20, 2016 at 2:42 PM, Ben Boeckel > >> wrote: > >>> > >>> Hi all, > >>> > >>> Currently, there is a 'vtk' binary built when the Tcl bindings are > >>> enabled. In order to make it more obvious, it would be nice to rename > >>> this to 'vtktcl' (which matches the 'vtkpython' binary name). Similar > >>> for the 'pvtk' binary becoming 'pvtktcl'. > >>> > >>> Any objections? > >>> > >>> --Ben > >>> _______________________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at > >>> http://www.kitware.com/opensource/opensource.html > >>> > >>> Please keep messages on-topic and check the VTK FAQ at: > >>> http://www.vtk.org/Wiki/VTK_FAQ > >>> > >>> Search the list archives at: http://markmail.org/search/?q=vtkusers > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://public.kitware.com/mailman/listinfo/vtkusers > >> > >> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/vtkusers > >> > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yujie_job at 163.com Wed Jan 20 19:28:39 2016 From: yujie_job at 163.com (yujie_job at 163.com) Date: Wed, 20 Jan 2016 17:28:39 -0700 (MST) Subject: [vtkusers] Line intersect with 2D cells In-Reply-To: <1453310933543-5736053.post@n5.nabble.com> References: <1453282114822-5736038.post@n5.nabble.com> <1453310933543-5736053.post@n5.nabble.com> Message-ID: <1453336119906-5736062.post@n5.nabble.com> thanks for your reply. I am using unstructured grid in my case. Do you have any idea for this problem? thanks for your help! -- View this message in context: http://vtk.1045678.n5.nabble.com/Line-intersect-with-2D-cells-tp5736038p5736062.html Sent from the VTK - Users mailing list archive at Nabble.com. From newcfd at yahoo.com Wed Jan 20 20:20:23 2016 From: newcfd at yahoo.com (newcfd) Date: Wed, 20 Jan 2016 18:20:23 -0700 (MST) Subject: [vtkusers] Line intersect with 2D cells In-Reply-To: <1453336119906-5736062.post@n5.nabble.com> References: <1453282114822-5736038.post@n5.nabble.com> <1453310933543-5736053.post@n5.nabble.com> <1453336119906-5736062.post@n5.nabble.com> Message-ID: <1453339223913-5736063.post@n5.nabble.com> http://www.vtk.org/pipermail/vtkusers/1999-October/002322.html -- View this message in context: http://vtk.1045678.n5.nabble.com/Line-intersect-with-2D-cells-tp5736038p5736063.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Wed Jan 20 20:46:36 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 20 Jan 2016 20:46:36 -0500 Subject: [vtkusers] [vtk-developers] Redefining Image Data Voxel Size In-Reply-To: References: Message-ID: I am not aware of any but I have cc'd vtk-users mailing list. May be someone else knows it. Thanks, On Wed, Jan 20, 2016 at 7:11 PM, Dean, Kevin < kevin.dean at decisionsciencescorp.com> wrote: > I want to combine the volume of voxel spacings (3,3,3) into (15,15,15). Is > there a way to merge voxel data together to form larger voxels? Thanks. > > Kevin E. Dean > > 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. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From 75779910 at qq.com Thu Jan 21 00:29:33 2016 From: 75779910 at qq.com (Simon) Date: Wed, 20 Jan 2016 22:29:33 -0700 (MST) Subject: [vtkusers] Build Android Example with Eclipse? Message-ID: <1453354173457-5736066.post@n5.nabble.com> VTK 7.0rc2 I have successfully built the static libraries(libsxxx.a) and I also built the three android examples worked fine on my phone. Now I want to use Eclipse to build the example JavaVTK, and I import the example, use jni javah to generate .h and add the lib file containning libsxxx.a, and edit .mk file,use NDK to build the example.I get undefined reference error. 11:33:43 **** Incremental Build of configuration Default for project JavaVTKActivity **** "E:\\MyEclipse\\NDK\\ndk-build.cmd" all [armeabi-v7a] Compile++ thumb: JavaVTK <= main.cxx [armeabi-v7a] SharedLibrary : libJavaVTK.so jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::TerminateApp() [clone .localalias.28]: error: undefined reference to 'ANativeActivity_finish' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::ExitCallback(): error: undefined reference to 'ANativeActivity_finish' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AInputEvent_getType' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AMotionEvent_getAction' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AMotionEvent_getMetaState' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AMotionEvent_getPointerCount' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AMotionEvent_getPointerId' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AMotionEvent_getX' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AMotionEvent_getY' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AMotionEvent_getPointerId' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AKeyEvent_getAction' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AKeyEvent_getKeyCode' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AKeyEvent_getMetaState' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::HandleInput(AInputEvent*): error: undefined reference to 'AKeyEvent_getRepeatCount' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::StartEventLoop(): error: undefined reference to 'ALooper_pollAll' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::StartEventLoop(): error: undefined reference to 'ANativeWindow_getWidth' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::StartEventLoop(): error: undefined reference to 'ANativeWindow_getHeight' jni/vtk-android/lib/libvtkRenderingOpenGL2-7.0.a(vtkAndroidRenderWindowInteractor.cxx.o):vtkAndroidRenderWindowInteractor.cxx:function vtkAndroidRenderWindowInteractor::Initialize(): error: undefined reference to 'ALooper_pollAll' jni/vtk-android/lib/libvtkCommonDataModel-7.0.a(vtkDataSetAttributes.cxx.o):vtkDataSetAttributes.cxx:function vtkDataSetAttributes::FieldList::SetField(int, vtkAbstractArray*): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' jni/vtk-android/lib/libvtkCommonDataModel-7.0.a(vtkDataSetAttributes.cxx.o):vtkDataSetAttributes.cxx:function vtkDataSetAttributes::InternalCopyAllocate(vtkDataSetAttributes::FieldList&, int, int, int): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' jni/vtk-android/lib/libvtkCommonCore-7.0.a(vtkAbstractArray.cxx.o):vtkAbstractArray.cxx:function vtkAbstractArray::SetComponentName(int, char const*): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' jni/vtk-android/lib/libvtkCommonCore-7.0.a(vtkAbstractArray.cxx.o):vtkAbstractArray.cxx:function vtkAbstractArray::SetComponentName(int, char const*): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' collect2.exe: error: ld returned 1 exit status make.exe: *** [obj/local/armeabi-v7a/libJavaVTK.so] Error 1 11:33:45 Build Finished (took 2s.67ms) -- View this message in context: http://vtk.1045678.n5.nabble.com/Build-Android-Example-with-Eclipse-tp5736066.html Sent from the VTK - Users mailing list archive at Nabble.com. From gregory.baert at inserm.fr Thu Jan 21 02:58:17 2016 From: gregory.baert at inserm.fr (gregory.baert at inserm.fr) Date: Thu, 21 Jan 2016 08:58:17 +0100 Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <20160120164443.GA27712@megas.kitware.com> References: <1321018174359-4984363.post@n5.nabble.com> <4EC3BAAF.1000800@hgl-dynamics.com> <4EC3E2ED.7000502@simworx.com.br> <1323265692542-5055692.post@n5.nabble.com> <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> <007101d15397$445010c0$ccf03240$@inserm.fr> <20160120164443.GA27712@megas.kitware.com> Message-ID: <002901d15421$7d14bca0$773e35e0$@inserm.fr> Hi, I modified "vtkAtomicInt.h" and now I have other errors (Cf. attached file); both compile with C++ Builder XE (32 bits) and C++ Builder XE8 (32 bits) with the same error ... -----Message d'origine----- De : Ben Boeckel [mailto:ben.boeckel at kitware.com] Envoy? : mercredi 20 janvier 2016 17:45 ? : gregory.baert at inserm.fr Cc : vtkusers at vtk.org; 'Mathieu Westphal' Objet : Re: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) On Wed, Jan 20, 2016 at 16:28:51 +0100, gregory.baert at inserm.fr wrote: > Thanks for your help, > I send you the error in the attached file, It appears that VTK 6.1 doesn't consider Embarcadero which doesn't appear to support __declspec(align()). vtkAtomicInt needs to not define VTK_WINDOWS_ATOMIC on line 46 or guard the __declspec(align()) bits on lines 72 and 190 against Embarcadero. --Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: Capture.PNG Type: image/png Size: 69489 bytes Desc: not available URL: From 75779910 at qq.com Thu Jan 21 03:58:32 2016 From: 75779910 at qq.com (Simon) Date: Thu, 21 Jan 2016 01:58:32 -0700 (MST) Subject: [vtkusers] Android Example JavaVTK no override found for 'vtkRenderWindow'. Message-ID: <1453366712260-5736068.post@n5.nabble.com> VTK 7.0 rc2 Eclipse I built the example JavaVTK apk,and when I run on my phone it crashed. The .so is about 10M. Error: no override found for 'vtkRenderWindow'. 01-20 15:29:01.387: W/JavaVTKView(26369): creating OpenGL ES 2.0 context 01-20 15:29:01.397: D/dalvikvm(26369): Trying to load lib /data/app-lib/com.kitware.JavaVTK-2/libJavaVTK.so 0x428a50f8 01-20 15:29:01.427: D/dalvikvm(26369): Added shared lib /data/app-lib/com.kitware.JavaVTK-2/libJavaVTK.so 0x428a50f8 01-20 15:29:01.427: D/dalvikvm(26369): No JNI_OnLoad found in /data/app-lib/com.kitware.JavaVTK-2/libJavaVTK.so 0x428a50f8, skipping init 01-20 15:29:01.427: W/VTK(26369): Generic Warning: In G:\VTK\VTK-7.0.0.rc2\Rendering\Core\vtkRenderWindow.cxx, line 40 01-20 15:29:01.427: W/VTK(26369): Error: no override found for 'vtkRenderWindow'. 01-20 15:29:01.427: A/libc(26369): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 26382 (Thread-396) -- View this message in context: http://vtk.1045678.n5.nabble.com/Android-Example-JavaVTK-no-override-found-for-vtkRenderWindow-tp5736068.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Thu Jan 21 07:59:43 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 21 Jan 2016 07:59:43 -0500 Subject: [vtkusers] Android Example JavaVTK no override found for 'vtkRenderWindow'. In-Reply-To: <1453366712260-5736068.post@n5.nabble.com> References: <1453366712260-5736068.post@n5.nabble.com> Message-ID: Sounds like nothing is pulling in the OpenGL2 libs or they are not being built. You can try sticking a vtkRenderingOpenGL2ObjectFactory *of = vtkRenderingOpenGL2ObjectFactory::New(); vtkObjectFactory::RegisterFactory(of); in your main.cxx which will make sure the factory initialization code is called. You could also try changing vtkRenderWindow *renWin = vtkRenderWindow::New(); char jniS[4] = {'j','n','i',0}; renWin->SetWindowInfo(jniS); // tell the system that jni owns the window not us to explicitly create the vtkEGLRenderWindow instead of the more generic vtkRenderWindow On Thu, Jan 21, 2016 at 3:58 AM, Simon <75779910 at qq.com> wrote: > VTK 7.0 rc2 > Eclipse > > I built the example JavaVTK apk,and when I run on my phone it crashed. The > .so is about 10M. > Error: no override found for 'vtkRenderWindow'. > > 01-20 15:29:01.387: W/JavaVTKView(26369): creating OpenGL ES 2.0 context > 01-20 15:29:01.397: D/dalvikvm(26369): Trying to load lib > /data/app-lib/com.kitware.JavaVTK-2/libJavaVTK.so 0x428a50f8 > 01-20 15:29:01.427: D/dalvikvm(26369): Added shared lib > /data/app-lib/com.kitware.JavaVTK-2/libJavaVTK.so 0x428a50f8 > 01-20 15:29:01.427: D/dalvikvm(26369): No JNI_OnLoad found in > /data/app-lib/com.kitware.JavaVTK-2/libJavaVTK.so 0x428a50f8, skipping init > 01-20 15:29:01.427: W/VTK(26369): Generic Warning: In > G:\VTK\VTK-7.0.0.rc2\Rendering\Core\vtkRenderWindow.cxx, line 40 > 01-20 15:29:01.427: W/VTK(26369): Error: no override found for > 'vtkRenderWindow'. > 01-20 15:29:01.427: A/libc(26369): Fatal signal 11 (SIGSEGV) at 0x00000000 > (code=1), thread 26382 (Thread-396) > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Android-Example-JavaVTK-no-override-found-for-vtkRenderWindow-tp5736068.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 vtk12af6bc42 at kant.sophonet.de Thu Jan 21 08:54:46 2016 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Thu, 21 Jan 2016 14:54:46 +0100 Subject: [vtkusers] =?utf-8?q?Combined_on-screen_and_off-screen_possible_w?= =?utf-8?q?ith_VTK-7=2E0=2E0_on_linux/X=3F?= In-Reply-To: References: <366a176fb2a1f7ef7fd824524595b51d@srv19.sysproserver.de> Message-ID: As one further follow-up of my two earlier e-mails, I have partly answered the question myself... remember, my question is related to the OpenGL (not OpenGL2) rendering backend. Two observations: 1. It seems that the current CMake flag VTK_OPENGL_HAS_OSMESA is useless, since it does not set anything relevant (see my e-mail below) 2. It seems that combined on-screen / off-screen rendering is possible (on Mesa 9.2.3 using the OpenGL rendering backend): As a quick hack, I have changed VTKROOT/CMake/vtkOpenGL.cmake such that * VTK_USE_OSMESA = True (triggers find_package OSMesa) * VTK_USE_X = True (triggers find_package OpenGL) ...and (at the bottom) vtk_module_link_libraries links to *both*, ${OSMESA_LIBRARY} and ${OPENGL_LIBRARIES}. After this hack, I can successfully launch interactive (glx-)renderwindows as well as set (occasionally) set SetOffscreenRenderingOn(). Therefore, my suggestion would be to - remove VTK_OPENGL_HAS_OSMESA - change the vtkOpenGL.cmake such that VTK_USE_OSMESA is exposed as an advanced option and is not exclusive w.r.t. VTK_USE_X, but may be set at the same time. Any comments? Thanks, Sophonet Am 2016-01-19 11:06, schrieb Sophonet: > As a follow-up, I have done some more investigations myself and am > still lost: > > According to http://www.vtk.org/Wiki/VTK/OSMesa_Support, it seems that > the legacy OSMesa library on linux systems is not needed anymore, but > that software renderers (such as gallium llvm) can provide off-screen > rendering themselves. Correct? > > When looking at VTKROOT/CMake/vtkOpenGL.cmake, it appears (not > perfectly sure though) that in this case VTK_OPENGL_HAS_OSMESA needs > to be turned on, since this flag sets VTK_CAN_DO_OFFSCREEN to 1. > However, it seems to me that VTK_CAN_DO_OFFSCREEN is not used anywhere > else (did a thorough "grep" on that keyword in the source tree). > > It seems that Marcus (Hanwell) was responsible for many of these > changes in CMake - Marcus, can you help? > > What I would like to do is (see my first e-mail below) to > simultaneously use interactive rendering and (occasionally) off-screen > rendering (for generating static images), which was possible on Linux > in earlier versions of VTK (e.g. 5.10), but is not possible anymore. > > Thanks, > > Sophonet > > > Am 2016-01-15 12:44, schrieb Sophonet: >> Dear list, >> >> in my application, I would like to display a vtkRenderWindow for user >> interaction, but I also would like to use off-screen functionality >> simultaneously to render pre-defined views / snapshots that are shown >> as static images, like "thumbnails" for different datasets. >> >> This was possible in VTK 5.10 on linux (by creating a dedicated >> vtkRenderWindow per thumbnail, setting OffScreenRenderingOn, rendering >> and capturing the resulting image with a vtkWindowToImageFilter). >> >> In VTK-7.0.0.rc1, using the OpenGL rendering backend on Mesa 9.2.3, I >> now get a segfault with the following backtrace: >> >> (gdb) bt >> #0 0x00007fffd045db90 in xcb_glx_get_string_string_length () >> from /usr/lib64/libxcb-glx.so.0 >> #1 0x00007fffd0cce605 in ?? () from /usr/lib64/libGL.so.1 >> #2 0x00007fffd0ccc2b6 in ?? () from /usr/lib64/libGL.so.1 >> #3 0x00007fffd14cd086 in >> vtkOpenGLExtensionManager::ReadOpenGLExtensions() () >> from >> /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 >> #4 0x00007fffd14cbd50 in vtkOpenGLExtensionManager::Update() () >> from >> /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 >> #5 0x00007fffd14cafd7 in >> vtkOpenGLExtensionManager::ExtensionSupported(char const*) () >> from >> /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 >> #6 0x00007fffd14ec8ea in vtkOpenGLRenderWindow::OpenGLInitContext() >> () >> from >> /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 >> #7 0x00007fffd14eae6d in vtkOpenGLRenderWindow::OpenGLInit() () >> from >> /import/QUINTA/non-public/software/linux-install/quinta_gcc_debug/lib/libvtkRenderingOpenGL-7.0.so.1 >> #8 0x00007fffd1576932 in >> vtkXOpenGLRenderWindow::CreateOffScreenWindow(int, int) () >> >> Besides a remark that probably there could be better error handling >> than just letting the app crash without an exception being thrown, I >> would like to know if joint on-screen rendering and off-screen >> rendering is still possible somehow with VTK-7.0.0. >> >> I have made two approaches when configuring via CMake: (i) Setting >> VTK_OPENGL_HAS_OSMESA=True (no effect, I think I remember that in >> earlier versions, this allowed OSMESA_INCLUDE_DIR etc. to be set; this >> is not the case anymore, so does this flag still do something? Note >> that for VTK 5.10 as mentioned above I did not have to set this >> explicitly), (ii) Setting USE_OFFSXCREEN_EGL=True - resulting in an >> error that this could not be combined with VTK_USE_X. >> >> On Windows, combining on-screen and off-screen rendering as described >> in the second paragraph is possible. >> >> Any suggestions would be welcome, the Wiki page I have found on this >> topic is not fully understandable to me >> (http://www.vtk.org/Wiki/VTK/OSMesa_Support; does this mean that I >> have to switch on VTK_OPENGL_HAS_OSMESA or not?...) >> >> Thanks, >> >> sophonet >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 DLRdave at aol.com Thu Jan 21 09:05:38 2016 From: DLRdave at aol.com (David Cole) Date: Thu, 21 Jan 2016 09:05:38 -0500 Subject: [vtkusers] [RFC] Renaming the 'vtk' binary In-Reply-To: References: <20160120194204.GA8790@megas.kitware.com> Message-ID: <18100203-0179-4F51-8972-57E92857DE81@aol.com> Consider "vtktclsh" so the python -> vtkpython analogy holds, too... i.e. vtktclsh is tclsh with built-in VTK access... David > On Jan 20, 2016, at 3:42 PM, Andy Bauer wrote: > > +1 > > >> On Wed, Jan 20, 2016 at 3:03 PM, Bill Lorensen wrote: >> +1 >> >> >> On Wed, Jan 20, 2016 at 2:49 PM, Jorge Perez wrote: >> > I use vtk + TCL, the change makes sense. >> > >> > Regards, >> > >> > El 20/01/2016 20:43, "David E DeMarle" escribi?: >> >> >> >> +1 from me >> >> >> >> David E DeMarle >> >> Kitware, Inc. >> >> R&D Engineer >> >> 21 Corporate Drive >> >> Clifton Park, NY 12065-8662 >> >> Phone: 518-881-4909 >> >> >> >> On Wed, Jan 20, 2016 at 2:42 PM, Ben Boeckel >> >> wrote: >> >>> >> >>> Hi all, >> >>> >> >>> Currently, there is a 'vtk' binary built when the Tcl bindings are >> >>> enabled. In order to make it more obvious, it would be nice to rename >> >>> this to 'vtktcl' (which matches the 'vtkpython' binary name). Similar >> >>> for the 'pvtk' binary becoming 'pvtktcl'. >> >>> >> >>> Any objections? >> >>> >> >>> --Ben >> >>> _______________________________________________ >> >>> Powered by www.kitware.com >> >>> >> >>> Visit other Kitware open-source projects at >> >>> http://www.kitware.com/opensource/opensource.html >> >>> >> >>> Please keep messages on-topic and check the VTK FAQ at: >> >>> http://www.vtk.org/Wiki/VTK_FAQ >> >>> >> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >>> >> >>> Follow this link to subscribe/unsubscribe: >> >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> >> >> >> _______________________________________________ >> >> Powered by www.kitware.com >> >> >> >> Visit other Kitware open-source projects at >> >> http://www.kitware.com/opensource/opensource.html >> >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> >> http://www.vtk.org/Wiki/VTK_FAQ >> >> >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> >> >> Follow this link to subscribe/unsubscribe: >> >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 ben.boeckel at kitware.com Thu Jan 21 09:32:36 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 21 Jan 2016 09:32:36 -0500 Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <002901d15421$7d14bca0$773e35e0$@inserm.fr> References: <4EC3E2ED.7000502@simworx.com.br> <1323265692542-5055692.post@n5.nabble.com> <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> <007101d15397$445010c0$ccf03240$@inserm.fr> <20160120164443.GA27712@megas.kitware.com> <002901d15421$7d14bca0$773e35e0$@inserm.fr> Message-ID: <20160121143236.GC4759@megas.kitware.com> On Thu, Jan 21, 2016 at 08:58:17 +0100, gregory.baert at inserm.fr wrote: > I modified "vtkAtomicInt.h" and now I have other errors (Cf. attached > file); both compile with C++ Builder XE (32 bits) and C++ Builder XE8 > (32 bits) with the same error ... This looks like a deeper rabbit hole. I'll try and see if we have an Embarcadero license/installation available. --Ben From david.gobbi at gmail.com Thu Jan 21 09:56:48 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 21 Jan 2016 07:56:48 -0700 Subject: [vtkusers] [RFC] Renaming the 'vtk' binary In-Reply-To: <18100203-0179-4F51-8972-57E92857DE81@aol.com> References: <20160120194204.GA8790@megas.kitware.com> <18100203-0179-4F51-8972-57E92857DE81@aol.com> Message-ID: Actually, it's "wish", not "tclsh". My vote is for vtktcl. - David On Thu, Jan 21, 2016 at 7:05 AM, David Cole via vtkusers wrote: > Consider "vtktclsh" so the python -> vtkpython analogy holds, too... > > i.e. vtktclsh is tclsh with built-in VTK access... > > > David > > On Jan 20, 2016, at 3:42 PM, Andy Bauer wrote: > > +1 > > > On Wed, Jan 20, 2016 at 3:03 PM, Bill Lorensen > wrote: > >> +1 >> >> >> On Wed, Jan 20, 2016 at 2:49 PM, Jorge Perez >> wrote: >> > I use vtk + TCL, the change makes sense. >> > >> > Regards, >> > >> > El 20/01/2016 20:43, "David E DeMarle" >> escribi?: >> >> >> >> +1 from me >> >> >> >> David E DeMarle >> >> Kitware, Inc. >> >> R&D Engineer >> >> 21 Corporate Drive >> >> Clifton Park, NY 12065-8662 >> >> Phone: 518-881-4909 >> >> >> >> On Wed, Jan 20, 2016 at 2:42 PM, Ben Boeckel >> >> wrote: >> >>> >> >>> Hi all, >> >>> >> >>> Currently, there is a 'vtk' binary built when the Tcl bindings are >> >>> enabled. In order to make it more obvious, it would be nice to rename >> >>> this to 'vtktcl' (which matches the 'vtkpython' binary name). Similar >> >>> for the 'pvtk' binary becoming 'pvtktcl'. >> >>> >> >>> Any objections? >> >>> >> >>> --Ben >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jialei.gary at gmail.com Thu Jan 21 10:29:23 2016 From: jialei.gary at gmail.com (gary_jia) Date: Thu, 21 Jan 2016 08:29:23 -0700 (MST) Subject: [vtkusers] interaction problem after timer added Message-ID: <1453390163252-5736076.post@n5.nabble.com> Hi everyone, When I use the vtkInteractorStyleTrackballCamera, the object movement will stop when the mouse freezes ( with mouse button still down). After I added a timer, the object keep moving even when the mouse stop moving. Only after I release the mouse button, the movement stops. Could you help to tell me how to stop the movement immediately after the mouse stop even with any mouse button still down when with a timer running? Thank you! my code: #!/usr/bin/env python import vtk class vtkTimerCallback(): def __init__(self): self.timer_count = 0 def execute(self,obj,event): print(self.timer_count) self.timer_count += 1 src = vtk.vtkCubeSource() mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(src.GetOutputPort()) actor = vtk.vtkActor() actor.SetMapper(mapper) main_render = vtk.vtkRenderer() main_render.AddActor(actor) renWin = vtk.vtkRenderWindow() renWin.AddRenderer(main_render) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) iren.Initialize() cb = vtkTimerCallback() cb.actor = actor iren.AddObserver('TimerEvent', cb.execute) timerId = iren.CreateRepeatingTimer(50); iren.Start() -- View this message in context: http://vtk.1045678.n5.nabble.com/interaction-problem-after-timer-added-tp5736076.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Jan 21 11:10:48 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 21 Jan 2016 09:10:48 -0700 Subject: [vtkusers] interaction problem after timer added In-Reply-To: <1453390163252-5736076.post@n5.nabble.com> References: <1453390163252-5736076.post@n5.nabble.com> Message-ID: Hi Gary, I downloaded your program and confirmed your findings: if the timer is running, then the trackball-mode rotation does not stop when the mouse stops. This definitely looks like a bug in VTK itself, so I don't think there is any way for you to fix it inside your program. Can you report it on the VTK bugtracker? (http://www.vtk.org/Bug) - David On Thu, Jan 21, 2016 at 8:29 AM, gary_jia wrote: > Hi everyone, > When I use the vtkInteractorStyleTrackballCamera, the object movement > will stop when the mouse freezes ( with mouse button still down). After I > added a timer, the object keep moving even when the mouse stop moving. Only > after I release the mouse button, the movement stops. > Could you help to tell me how to stop the movement immediately after the > mouse stop even with any mouse button still down when with a timer running? > > Thank you! > > my code: > > #!/usr/bin/env python > import vtk > > class vtkTimerCallback(): > def __init__(self): > self.timer_count = 0 > > def execute(self,obj,event): > print(self.timer_count) > self.timer_count += 1 > > src = vtk.vtkCubeSource() > > mapper = vtk.vtkPolyDataMapper() > mapper.SetInputConnection(src.GetOutputPort()) > > actor = vtk.vtkActor() > actor.SetMapper(mapper) > > main_render = vtk.vtkRenderer() > main_render.AddActor(actor) > > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(main_render) > > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) > iren.Initialize() > > cb = vtkTimerCallback() > cb.actor = actor > iren.AddObserver('TimerEvent', cb.execute) > timerId = iren.CreateRepeatingTimer(50); > iren.Start() > -------------- next part -------------- An HTML attachment was scrubbed... URL: From torsten.sadowski at windnovation.com Thu Jan 21 11:28:49 2016 From: torsten.sadowski at windnovation.com (Torsten Sadowski) Date: Thu, 21 Jan 2016 17:28:49 +0100 Subject: [vtkusers] vtkTransform::Concatenate followed by Inverse results in Identity (VTK 6.3.0) Message-ID: <56A10741.9010301@windnovation.com> Hello, I am trying to design my own vtkTDxInteractorStyle. When I looked into vtkTDxInteractorStyleCamera as an example I found something puzzling which might be a bug in either vtkTransform or vtkTDxInteractorStyleCamera. This snippet from voidvtkTDxInteractorStyleCamera::OnMotionEvent //Gettherotationaxisinworldcoordinates. this->Transform->Identity(); this->Transform->Concatenate(eyeToWorld); this->Transform->Inverse(); this->Transform->TransformVector(axisEye,axisWorld); does nothing useful because the Transform returns the identity after Inverse (checked with PrintSelf). This on the other hand works: //Gettherotationaxisinworldcoordinates. this->Transform->SetMatrix(eyeToWorld->GetMatrix()); this->Transform->Inverse(); this->Transform->TransformVector(axisEye,axisWorld); I'm baffled. Best Regards, Torsten Sadowski -- Dr.-Ing. Torsten Sadowski Turbine Design/System Integration WINDnovation Engineering Solutions GmbH Stralauer Platz 33-34 10243 Berlin Germany Phone: +49 30 547195 34 Fax: +49 30 547195 39 Managing directors: Dr.-Ing. Roland Stoer, Dipl.-Ing. Albrecht Kantelberg Registered at Amtsgericht Charlottenburg, HRB 110081 B www.windnovation.com Certified according to ISO 9001:2008 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WINDnovation_Logo_Email.jpg Type: image/jpeg Size: 80199 bytes Desc: not available URL: From david.gobbi at gmail.com Thu Jan 21 12:04:04 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 21 Jan 2016 10:04:04 -0700 Subject: [vtkusers] vtkTransform::Concatenate followed by Inverse results in Identity (VTK 6.3.0) In-Reply-To: <56A10741.9010301@windnovation.com> References: <56A10741.9010301@windnovation.com> Message-ID: Hi Torsten, I suspect that it will work if you do this: this->Transform->Identity(); this->Transform->Concatenate(eyeToWorld->GetMatrix()); this->Transform->Inverse(); The "Concatenate" method has two signatures with different behavior: Concatenate(vtkMatrix4x4 *) Concatenate(vtkTransform *) The second one establishes a connection between the two transforms, so if you do "this->Transform->Concatenate(eyeToWorld)" then any future changes to "eyeToWorld" will also cause "this->Transform" to change. If you call "this->Transform->Update()" before PrintSelf, is the correct matrix printed? The TransformVector() method implicitly calls Update(). - David On Thu, Jan 21, 2016 at 9:28 AM, Torsten Sadowski < torsten.sadowski at windnovation.com> wrote: > Hello, > > I am trying to design my own vtkTDxInteractorStyle. When I looked into > vtkTDxInteractorStyleCamera as an example I found something puzzling which > might be a bug in either vtkTransform or vtkTDxInteractorStyleCamera. > > This snippet from void vtkTDxInteractorStyleCamera::OnMotionEvent > > // Get the rotation axis in world coordinates. > > this->Transform->Identity(); > > this->Transform->Concatenate(eyeToWorld); > > this->Transform->Inverse(); > > this->Transform->TransformVector(axisEye,axisWorld); > > does nothing useful because the Transform returns the identity after Inverse (checked with PrintSelf). > This on the other hand works: > // Get the rotation axis in world coordinates. this->Transform->SetMatrix(eyeToWorld->GetMatrix()); this->Transform->Inverse(); this->Transform->TransformVector(axisEye,axisWorld); > > I'm baffled. > > Best Regards, > Torsten Sadowski > > > -- > > > Dr.-Ing. Torsten Sadowski > Turbine Design/System Integration > > WINDnovation Engineering Solutions GmbH > Stralauer Platz 33-34 > 10243 Berlin > Germany > Phone: +49 30 547195 34 > Fax: +49 30 547195 39 > Managing directors: > Dr.-Ing. Roland Stoer, Dipl.-Ing. Albrecht Kantelberg > Registered at Amtsgericht Charlottenburg, HRB 110081 B > > www.windnovation.com > > Certified according to ISO 9001:2008 > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WINDnovation_Logo_Email.jpg Type: image/jpeg Size: 80199 bytes Desc: not available URL: From ken.martin at kitware.com Thu Jan 21 14:43:39 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 21 Jan 2016 14:43:39 -0500 Subject: [vtkusers] opengl2 : set the RGB color to a vertex with vtkPolyData and vtkPolyDataMapper In-Reply-To: <7A18A422C44BE34E947C1F96625E60BD08960EDA@EXDAG0-A1.intra.cea.fr> References: <22342_1452761555_569761D2_22342_9554_1_7A18A422C44BE34E947C1F96625E60BD0895FA34@EXDAG0-A1.intra.cea.fr> <7A18A422C44BE34E947C1F96625E60BD08960EDA@EXDAG0-A1.intra.cea.fr> Message-ID: It does not look like you ever set the number of points. From the documentation for vtkPoints::SetPoint Insert point into object. No range checking performed (fast!). Make sure you use SetNumberOfPoints() to allocate memory prior to using SetPoint() . Resize allocates memory but I do not believe it sets the number of points. So from the mapper's perspective you still had zero points. InsertNextPoint is slower but it handles adjust the memory and number of points automatically. Thanks Ken On Mon, Jan 18, 2016 at 12:45 PM, MOUSSAUD David 244079 < David.MOUSSAUD at cea.fr> wrote: > Hi, > > > > I have finally found how to display my colored points. > > > > Instead of using > > points->SetPoint(0, 0.1, 0.0, 0.0); > > I have used > > points->InsertNextPoint(0.1, 0.0, 0.0); > > > > and it works like a charm ! > > > > Could someone explain me(us) why, calling this API, it does not make > appear the 2 warning messages below ? > > > > Best regards, > > David. > ------------------------------ > *De :* vtkusers [vtkusers-bounces at vtk.org] de la part de MOUSSAUD David > 244079 > *Envoy? :* jeudi 14 janvier 2016 09:51 > *? :* vtkusers at vtk.org > *Objet :* [PROVENANCE INTERNET] [vtkusers] opengl2 : set the RGB color to > a vertex with vtkPolyData and vtkPolyDataMapper > > Dear all, > > > > I'm trying to use the opengl2 backend rendering. I am with the 6.3 release > version. > > > > I have a working code to display 3 colored vertex that works with opengl1 > (cf below and attached file). > > > > > > // Setup points > > points = vtkSmartPointer::New(); > > > // Setup the colors array > > colors = vtkSmartPointer::New(); > > colors->SetNumberOfComponents(3); > > colors->SetName("Colors"); > > > // create a vertex > > vertex = vtkSmartPointer::New(); > > > // list of all the vertices > > vertices= vtkSmartPointer::New(); > > > nb_points = 3; > > points->Resize(nb_points); > > vertices->Initialize(); > > colors->Initialize(); > > > points->SetPoint(0, 0.1, 0.0, 0.0); > > vertex->GetPointIds()->SetId(0,0); > > vertices->InsertNextCell(vertex); > > colors->InsertNextTuple3(255,0,0); > > > points->SetPoint(1, 0, 0.1, 0.0); > > vertex->GetPointIds()->SetId(0,1); > > vertices->InsertNextCell(vertex); > > colors->InsertNextTuple3(0,255,0); > > > points->SetPoint(2, 0, 0.0, 0.1); > > vertex->GetPointIds()->SetId(0,2); > > vertices->InsertNextCell(vertex); > > colors->InsertNextTuple3(0,0,255); > > > // Create a polydata object and add everything to it > > polydata = vtkSmartPointer::New(); > > polydata->SetPoints(points); > > polydata->SetVerts(vertices); > > polydata->GetPointData()->SetScalars(colors); > > > mapper = vtkSmartPointer::New(); > > > mapper->SetInputData(polydata); > > > actor = vtkSmartPointer::New(); > > actor->SetMapper(mapper); > > actor->GetProperty()->SetPointSize(5); > > > // Setup window > > renderWindow = vtkSmartPointer::New(); > > > // Setup renderer > > renderer = vtkSmartPointer::New(); > > renderWindow->AddRenderer(renderer); > > > renderer->AddActor(actor); > > renderer->ResetCamera(); > > > this->SetRenderWindow(renderWindow); > > > > When I compile the same project with my vtk library compiled with the > opengl2 backend rendering, > > > > I have this error : > > > > ERROR: In > C:\work\lib\vtk\VTK-6.3.0\VTK-6.3.0\Rendering\OpenGL2\vtkOpenGLPolyDataMapper.cxx, > line 1223 > vtkOpenGLPolyDataMapper (0000000000501B90): Error setting 'vertexMC' in > shader VAO. > > ERROR: In > C:\work\lib\vtk\VTK-6.3.0\VTK-6.3.0\Rendering\OpenGL2\vtkOpenGLPolyDataMapper.cxx, > line 1250 > vtkOpenGLPolyDataMapper (0000000000501B90): Error setting 'scalarColor' in > shader VAO. > > > > For information, I've tried the same with a vtkPlyReader based project and > I've succeed to render it with opengl2 backend (and it works very much > better !) > > > > Best Regards, > > David. > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Thu Jan 21 16:07:26 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 21 Jan 2016 14:07:26 -0700 Subject: [vtkusers] interaction problem after timer added In-Reply-To: References: <1453390163252-5736076.post@n5.nabble.com> Message-ID: I looked into this a bit more, and here's what I discovered about this bug. 1) the vtkInteractorStyle::OnTimer() method is calling Rotate(). 2) the Rotate() method checks the most recent mouse delta: int dx = rwi->GetEventPosition()[0] - rwi->GetLastEventPosition()[0]; int dy = rwi->GetEventPosition()[1] - rwi->GetLastEventPosition()[1]; 3) this delta is used to rotate the camera Even if the mouse is no longer moving, the last "delta" is nonzero, and therefore the camera is rotated whenever OnTimer() is called, even in trackball mode. Do any of the other VTK developers who are more familiar with vtkInteractorStyle want to look into this? - David On Thu, Jan 21, 2016 at 9:10 AM, David Gobbi wrote: > Hi Gary, > > I downloaded your program and confirmed your findings: if the timer > is running, then the trackball-mode rotation does not stop when the > mouse stops. > > This definitely looks like a bug in VTK itself, so I don't think there > is any way for you to fix it inside your program. > > Can you report it on the VTK bugtracker? (http://www.vtk.org/Bug) > > - David > > > On Thu, Jan 21, 2016 at 8:29 AM, gary_jia wrote: > >> Hi everyone, >> When I use the vtkInteractorStyleTrackballCamera, the object movement >> will stop when the mouse freezes ( with mouse button still down). After I >> added a timer, the object keep moving even when the mouse stop moving. >> Only >> after I release the mouse button, the movement stops. >> Could you help to tell me how to stop the movement immediately after >> the >> mouse stop even with any mouse button still down when with a timer >> running? >> >> Thank you! >> >> my code: >> >> #!/usr/bin/env python >> import vtk >> >> class vtkTimerCallback(): >> def __init__(self): >> self.timer_count = 0 >> >> def execute(self,obj,event): >> print(self.timer_count) >> self.timer_count += 1 >> >> src = vtk.vtkCubeSource() >> >> mapper = vtk.vtkPolyDataMapper() >> mapper.SetInputConnection(src.GetOutputPort()) >> >> actor = vtk.vtkActor() >> actor.SetMapper(mapper) >> >> main_render = vtk.vtkRenderer() >> main_render.AddActor(actor) >> >> renWin = vtk.vtkRenderWindow() >> renWin.AddRenderer(main_render) >> >> iren = vtk.vtkRenderWindowInteractor() >> iren.SetRenderWindow(renWin) >> iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) >> iren.Initialize() >> >> cb = vtkTimerCallback() >> cb.actor = actor >> iren.AddObserver('TimerEvent', cb.execute) >> timerId = iren.CreateRepeatingTimer(50); >> iren.Start() >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pedropaulobmjr at hotmail.com Thu Jan 21 16:22:29 2016 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Thu, 21 Jan 2016 21:22:29 +0000 Subject: [vtkusers] Set window/level and convert image DICOM Message-ID: Hi people, I want to convert a DICOM image to a png, but, before converting, I would like to set the parameters of Window Width and Window Center, to that the png image looks like if the parameters of ww/wl were seen in a viewer, does anyone know how could I do this? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From wumengda at gmail.com Thu Jan 21 16:45:34 2016 From: wumengda at gmail.com (Mengda Wu) Date: Thu, 21 Jan 2016 16:45:34 -0500 Subject: [vtkusers] How to delete all nodes in the vtkContourWidget without crashes? Message-ID: Hello all, I am trying to delete all nodes (user defined) in vtkContourWidget but the following code crashes when I call ClearAllNodes. Why is this? How to do it correctly? vtkSmartPointer contourRepresentation = vtkSmartPointer::New(); drawWidget = vtkSmartPointer::New(); drawWidget ->SetRepresentation(contourRepresentation); drawWidget ->SetInteractor(this->GetInteractor()); drawWidget->On(); vtkOrientedGlyphContourRepresentation *contourRepresentation = vtkOrientedGlyphContourRepresentation::SafeDownCast( vtkContourWidget->GetContourRepresentation()); vtkContourWidget->GetContourRepresentation()->ClearAllNodes() //crash happens Thanks, Mengda -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 21 16:47:43 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 21 Jan 2016 14:47:43 -0700 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: Message-ID: Hi Pedro, I recommend using vtkImageMapToColors to apply a greyscale lookup table. In python, for example, it would look like this: from vtk import * greymap = vtkScalarsToColors() greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(...) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() applymap.Update() Be careful, though, because according to the DICOM standard the VOI LUT (i.e. window/level) should only be applied after the Modality LUT (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the CT images and nearly all PET images have RescaleIntercept/RescaleSlope, so if you do not take these into account, you'll get an incorrect result. You'd be safe with MRI, which does not have RescaleIntercept/Slope. So, of course, I'd suggest that you use my vtk-dicom package ;-) https://github.com/dgobbi/vtk-dicom It has a filter called vtkDICOMApplyRescale that will correctly apply the rescale information. - David On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo wrote: > Hi people, I want to convert a DICOM image to a png, but, before > converting, I would like to set the parameters of Window Width and Window > Center, to that the png image looks like if the parameters of ww/wl were > seen in a viewer, does anyone know how could I do this? > Thanks! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 21 17:00:29 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 21 Jan 2016 15:00:29 -0700 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: Message-ID: Just to clarify my previous email, all CT and PET DICOM images have RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields cannot be ignored if you plan to use WindowCenter and WindowWidth. On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi wrote: > Hi Pedro, > > I recommend using vtkImageMapToColors to apply a greyscale lookup table. > In python, for example, it would look like this: > > from vtk import * > > greymap = vtkScalarsToColors() > greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) > > applymap = vtkImageMapToColors() > applymap.SetInputConnection(...) > applymap.SetLookupTable(greymap) > applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() > applymap.Update() > > Be careful, though, because according to the DICOM standard the > VOI LUT (i.e. window/level) should only be applied after the Modality LUT > (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the > CT images and nearly all PET images have RescaleIntercept/RescaleSlope, > so if you do not take these into account, you'll get an incorrect result. > You'd > be safe with MRI, which does not have RescaleIntercept/Slope. > > So, of course, I'd suggest that you use my vtk-dicom package ;-) > https://github.com/dgobbi/vtk-dicom > It has a filter called vtkDICOMApplyRescale that will correctly apply the > rescale information. > > - David > > > On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo > wrote: > >> Hi people, I want to convert a DICOM image to a png, but, before >> converting, I would like to set the parameters of Window Width and Window >> Center, to that the png image looks like if the parameters of ww/wl were >> seen in a viewer, does anyone know how could I do this? >> Thanks! >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Thu Jan 21 18:06:31 2016 From: sean at rogue-research.com (Sean McBride) Date: Thu, 21 Jan 2016 18:06:31 -0500 Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <1453301079866-5736045.post@n5.nabble.com> References: <1294822545216-3337807.post@n5.nabble.com> <1321018174359-4984363.post@n5.nabble.com> <4EC3BAAF.1000800@hgl-dynamics.com> <4EC3E2ED.7000502@simworx.com.br> <1323265692542-5055692.post@n5.nabble.com> <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> Message-ID: <20160121230631.286352113@mail.rogue-research.com> On Wed, 20 Jan 2016 07:44:39 -0700, Mercusyo said: >I know that this post is old; but I need help : I would like to know if it's >possible to compile VTK 6.1.0 with C++ Builder XE ? > >I tested to compiled but I have errors when compile the "Borland makefile". >NB : I use CMake 3.1.2 If using VTK and that complier is important to you (and it's actually new enough to get VTK building), please consider setting up a nightly build using that compiler so that the VTK developers can continue to ensure that support is not broken. Otherwise you will have this problem reoccur forever. 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 jialei.gary at gmail.com Thu Jan 21 21:14:32 2016 From: jialei.gary at gmail.com (gary_jia) Date: Thu, 21 Jan 2016 19:14:32 -0700 (MST) Subject: [vtkusers] interaction problem after timer added In-Reply-To: References: <1453390163252-5736076.post@n5.nabble.com> Message-ID: <1453428872353-5736092.post@n5.nabble.com> Hi David, Thanks for your reply. I will submit a bug report and try to correct the delta in my code. regards, Gary -- View this message in context: http://vtk.1045678.n5.nabble.com/interaction-problem-after-timer-added-tp5736076p5736092.html Sent from the VTK - Users mailing list archive at Nabble.com. From pavan.janthli at gmail.com Fri Jan 22 00:15:23 2016 From: pavan.janthli at gmail.com (pavan janthli) Date: Fri, 22 Jan 2016 10:45:23 +0530 Subject: [vtkusers] How to perform trim Message-ID: Hi I want to perform trim operation as shown in below link. https://youtu.be/YCVUw8KCYJ0 could you please tell us how to proceed? Regards, Pavan -------------- next part -------------- An HTML attachment was scrubbed... URL: From 75779910 at qq.com Fri Jan 22 01:25:49 2016 From: 75779910 at qq.com (Simon) Date: Thu, 21 Jan 2016 23:25:49 -0700 (MST) Subject: [vtkusers] Android Example JavaVTK no override found for 'vtkRenderWindow'. In-Reply-To: References: <1453366712260-5736068.post@n5.nabble.com> Message-ID: <1453443949251-5736094.post@n5.nabble.com> Hi, Ken Thanks for reply. I tried and like you said nothing is pulling in the OpenGL2 libs or they are not being built. I added the code and get some new error.I also check the my prev .so the size is 5mb smaller than example build about 12mb. I built .so successfully, it is strange that libs not being built. Maybe you can post your Android.mk, Application.mk file for help. -- View this message in context: http://vtk.1045678.n5.nabble.com/Android-Example-JavaVTK-no-override-found-for-vtkRenderWindow-tp5736068p5736094.html Sent from the VTK - Users mailing list archive at Nabble.com. From pedropaulobmjr at hotmail.com Fri Jan 22 01:46:58 2016 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Fri, 22 Jan 2016 06:46:58 +0000 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: , Message-ID: I'm using python to do this, my code is below, how do I add your code in mine to give right? Does your vtk-dicom package set the parameters ww/wl and do the conversion? Sorry my bad english. [😊] from vtk import * reader = vtkDICOMImageReader() reader.SetFileName('image.dcm') reader.Update() image = reader.GetOutput() shiftScaleFilter = vtkImageShiftScale() shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() shiftScaleFilter.SetInputConnection(reader.GetOutputPort()) shiftScaleFilter.SetShift(-1.0*image.GetScalarRange()[0]) oldRange = image.GetScalarRange()[1] - image.GetScalarRange()[0] newRange = 255 shiftScaleFilter.SetScale(newRange/oldRange) shiftScaleFilter.Update() writer = vtkPNGWriter() writer.SetFileName('output.jpg') writer.SetInputConnection(shiftScaleFilter.GetOutputPort()) writer.Write() ________________________________ De: David Gobbi Enviado: quinta-feira, 21 de janeiro de 2016 22:00 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Just to clarify my previous email, all CT and PET DICOM images have RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields cannot be ignored if you plan to use WindowCenter and WindowWidth. On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi > wrote: Hi Pedro, I recommend using vtkImageMapToColors to apply a greyscale lookup table. In python, for example, it would look like this: from vtk import * greymap = vtkScalarsToColors() greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(...) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() applymap.Update() Be careful, though, because according to the DICOM standard the VOI LUT (i.e. window/level) should only be applied after the Modality LUT (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the CT images and nearly all PET images have RescaleIntercept/RescaleSlope, so if you do not take these into account, you'll get an incorrect result. You'd be safe with MRI, which does not have RescaleIntercept/Slope. So, of course, I'd suggest that you use my vtk-dicom package ;-) https://github.com/dgobbi/vtk-dicom It has a filter called vtkDICOMApplyRescale that will correctly apply the rescale information. - David On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo > wrote: Hi people, I want to convert a DICOM image to a png, but, before converting, I would like to set the parameters of Window Width and Window Center, to that the png image looks like if the parameters of ww/wl were seen in a viewer, does anyone know how could I do this? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: OutlookEmoji-&#X1f60a.png Type: image/png Size: 488 bytes Desc: OutlookEmoji-&#X1f60a.png URL: From torsten.sadowski at windnovation.com Fri Jan 22 04:19:29 2016 From: torsten.sadowski at windnovation.com (Torsten Sadowski) Date: Fri, 22 Jan 2016 10:19:29 +0100 Subject: [vtkusers] vtkTransform::Concatenate followed by Inverse results in Identity (VTK 6.3.0) In-Reply-To: References: <56A10741.9010301@windnovation.com> Message-ID: <56A1F421.5030600@windnovation.com> Hi David, no, Update() does not change the result. I came across this issue because I found the vtkTDxInteractorStyleCamera to be utterly useless. The reason is that this snippet from vtkTDxInteractorStyleCamera does nothing: //Gettherotationaxisinworldcoordinates. this->Transform->Identity(); this->Transform->Concatenate(eyeToWorld); this->Transform->Inverse(); this->Transform->TransformVector(axisEye,axisWorld); axisEye is identical to axisWorld. The vtkTDxInteractorStyleGeo has something similar. There is either a bug in vtkTransform or in the InteractorStyles. I could make a bug report for either. Cheers, Torsten Am 21.01.2016 um 18:04 schrieb David Gobbi: > Hi Torsten, > > I suspect that it will work if you do this: > > this->Transform->Identity(); > this->Transform->Concatenate(eyeToWorld->GetMatrix()); > this->Transform->Inverse(); > > The "Concatenate" method has two signatures with different behavior: > Concatenate(vtkMatrix4x4 *) > Concatenate(vtkTransform *) > > The second one establishes a connection between the two transforms, > so if you do "this->Transform->Concatenate(eyeToWorld)" then any > future changes to "eyeToWorld" will also cause "this->Transform" to > change. > > If you call "this->Transform->Update()" before PrintSelf, is the correct > matrix printed? The TransformVector() method implicitly calls Update(). > > - David > > > On Thu, Jan 21, 2016 at 9:28 AM, Torsten Sadowski > > wrote: > > Hello, > > I am trying to design my own vtkTDxInteractorStyle. When I looked > into vtkTDxInteractorStyleCamera as an example I found something > puzzling which might be a bug in either vtkTransform or > vtkTDxInteractorStyleCamera. > > This snippet from voidvtkTDxInteractorStyleCamera::OnMotionEvent > > //Gettherotationaxisinworldcoordinates. > > this->Transform->Identity(); > > this->Transform->Concatenate(eyeToWorld); > > this->Transform->Inverse(); > > this->Transform->TransformVector(axisEye,axisWorld); > > does nothing useful because the Transform returns the identity after Inverse (checked with PrintSelf). > This on the other hand works: > > //Gettherotationaxisinworldcoordinates. > this->Transform->SetMatrix(eyeToWorld->GetMatrix()); > this->Transform->Inverse(); > this->Transform->TransformVector(axisEye,axisWorld); > > I'm baffled. > > Best Regards, > Torsten Sadowski > > > -- > > > Dr.-Ing. Torsten Sadowski > Turbine Design/System Integration > > WINDnovation Engineering Solutions GmbH > Stralauer Platz 33-34 > 10243 Berlin > Germany > Phone: +49 30 547195 34 > Fax: +49 30 547195 39 > Managing directors: > Dr.-Ing. Roland Stoer, Dipl.-Ing. Albrecht Kantelberg > Registered at Amtsgericht Charlottenburg, HRB 110081 B > > www.windnovation.com > > Certified according to ISO 9001:2008 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 80199 bytes Desc: not available URL: From martin.genet at polytechnique.edu Fri Jan 22 09:03:33 2016 From: martin.genet at polytechnique.edu (Martin Genet) Date: Fri, 22 Jan 2016 15:03:33 +0100 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> <569EB27E.3050803@polytechnique.edu> <569F6057.3000208@polytechnique.edu> Message-ID: <56A236B5.4030305@polytechnique.edu> Sounds good. However, here the culprit seems to be vtkTensor, which stores the data in column. vtkCellDerivatives simply fills a vtkTensor (filling is storage independent, since one provides the actual components), and then returns the underlying vector. One option would be to make vtkCellDerivatives independent of vtkTensor. But I think it would be better to correct the storage in vtkTensor. Actually, it seems that vtkTensor is used only in vtkCellDerivatives, so it would not change the rest of the library. Let me know what you would prefer. Martin On 20/01/2016 19:19, Andy Bauer wrote: > I've looked at this a bit more along with others and unfortunately > there's some inconsistency in VTK for tensor ordering. If you look at > the vtkCell::Derivatives() documentation > (http://www.vtk.org/doc/nightly/html/classvtkCell.html#aff3d8332e9d7d556a9d2e9f91173d068), > it's using a C/row-major ordering. There's some places in that have > done row-major and others that have done column major. For the most > part it hasn't been an issue since many/most of the uses of tensor > have been symmetric but it should be fixed regardless. > > I've entered a mantis issue for this at > http://www.paraview.org/Bug/view.php?id=15949. > > Would you be willing to go in and make the change to > vtkCellDerivatives? I'm hoping to go through your changes to that > class sometime today. > > On Wed, Jan 20, 2016 at 7:52 AM, Andy Bauer > wrote: > > Hmm, in fact it does. I was looking at vtkGradientFilter instead > of vtkCellDerivatives for the ordering of the output of the > gradient of a vector. I think the output order is supposed to be > fortran/column-major ordering like vtkCellDerivatives instead of > C/row-major ordering like vtkGradientFilter. Well, you can see the > confusion that crops up and maybe that's why vtkTensors was done > that way. In any case, let me verify for sure which way is correct > and get back to you on this. > > On Wed, Jan 20, 2016 at 5:24 AM, Martin Genet > wrote: > > Thanks Andy. > > Well, I might be wrong but I'm under the impression that > vtkCellDerivatives returns [du/dx, dv/dx, dw/dx, du/dy, dv/dy, > ...]. Am I wrong? > > Martin > > > On 20/01/2016 03:07, Andy Bauer wrote: >> Hi Martin, >> >> I haven't looked closely enough at vtkTensors (I don't know >> if I even knew about it before today) but indeed the ordering >> output in vtkCellDerivatives for a velocity vector {u,v,w} >> needs to be [du/dx, du/dy, du/dz, dv/dx, dv/dy, ...] like you >> have it. I'm not sure when vtkTensors is ordered the way it is. >> >> Cheers, >> Andy >> >> On Tue, Jan 19, 2016 at 5:02 PM, Martin Genet >> wrote: >> >> Thanks Andy. >> >> I need to clarify something: the Derivatives function of >> vtkCell objects returns a derivs vector containing the >> components of the gradient of some vector field defined >> at the cell nodes; the components are ordered in row (as >> usually in C, i.e., (0,0), (0,1), (0,2), (1,0), (1,1), >> (1,2), (2,0), (2,1), (2,2)). Now in the CellDerivatives >> filter the derivs vector is used to fill a vtkTensors, >> and then the filter returns the internal vector storing >> the data of the vtkTensors. However, the components of >> the vtkTensors are ordered in column (as usually in >> fortran, i.e., (0,0), (1,0), (2,0), (0,1), (1,1), (2,1), >> (0,2), (1,2), (2,2)). Is it on purpose that the >> vtkTensors store their data in column and not in row? >> Isn't it a little dangerous to mix both storage in the >> code? Thanks for the clarification! >> >> Martin >> >> >> On 18/01/2016 13:32, Andy Bauer wrote: >>> Hi Martin, >>> >>> Thanks for following up on this. I found the merge >>> request now and will look at this. In general, >>> developers should request others to do a code review on >>> this. This can be done via something like "@acbauer >>> please review this" or sending an email on this VTK list >>> with a link to the merge request. >>> >>> Best, >>> Andy >>> >>> On Mon, Jan 18, 2016 at 6:23 AM, Martin Genet >>> wrote: >>> >>> Hi Andy, >>> >>> I followed the directions, and submitted a patch (19 >>> days ago), but haven't heard anything back. >>> >>> In GitLab the merge requests counter is at 0, but >>> when I try to create a new merge request from my >>> commit, it tells the merge request already exists. >>> Is it being reviewed somewhere? Thanks! >>> >>> Martin >>> >>> >>> On 29/12/2015 13:22, Andy Bauer wrote: >>>> Hi Martin, >>>> >>>> This patch makes sense. It would need a test if you >>>> want to get your changes into VTK. The directions >>>> for contributing to VTK are at >>>> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md. >>>> >>>> Cheers, >>>> Andy >>>> >>>> On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet >>>> wrote: >>>> >>>> Thanks Andy. >>>> >>>> What about simply adding another mode, e.g. >>>> SetTensorModeToComputeGreenLagrangeStrain, to >>>> the vtkCellDerivatives filter? Would the >>>> attached patch make sense? >>>> >>>> Martin >>>> >>>> On 28/12/2015 14:12, Andy Bauer wrote: >>>>> Hi Martin, >>>>> >>>>> Changing the name of the >>>>> SetTensorModeToComputeStrain method to >>>>> something else would break backward >>>>> compatibility which is generally avoided in >>>>> VTK. Other options for this include deriving a >>>>> class to compute non-linear strain from >>>>> vtkCellDerivatives if it shares enough of the >>>>> algorithm with the linearized version or maybe >>>>> just creating a new filter. >>>>> >>>>> Cheers, >>>>> Andy >>>>> >>>>> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet >>>>> wrote: >>>>> >>>>> Dear VTK users: >>>>> >>>>> I realize that the vtkCellDerivatives >>>>> filter, when SetTensorModeToComputeStrain >>>>> is activated, returns the symmetric part >>>>> of the gradient of the input vector field, >>>>> which is the linearized strain tensor, >>>>> i.e., not a proper measure of deformation >>>>> when large displacements are involved. >>>>> Would that make sense to have two >>>>> different modes, >>>>> SetTensorModeToComputeLinearizedStrain or >>>>> SetTensorModeToComputeSymmetricGradient, >>>>> and SetTensorModeToComputeStrain or >>>>> SetTensorModeToComputeGreenLagrangeStrain? >>>>> 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 munniz at yahoo.com Fri Jan 22 09:57:47 2016 From: munniz at yahoo.com (Wilmondes Manzi) Date: Fri, 22 Jan 2016 14:57:47 +0000 (UTC) Subject: [vtkusers] Problem with vtkLegendBoxActor ? References: <502341889.7349904.1453474667790.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <502341889.7349904.1453474667790.JavaMail.yahoo@mail.yahoo.com> Hello, I'm wondering if anyone has experienced any issues with vtkLegendBoxActor ? After upgrading from VTK 5.10 to 6.3 and from 32 to 64 bits (under Win7 SP1 and GCC), the legend does not show up anymore. To test it, I used a simple copy-paste of the following example : http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Legend The result (the sphere is shown but the legend is empty) is attached to this message. Any clues ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: legende.png Type: image/png Size: 32740 bytes Desc: not available URL: From aashish.chaudhary at kitware.com Fri Jan 22 10:17:05 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 22 Jan 2016 10:17:05 -0500 Subject: [vtkusers] [vtk-developers] undefined vtkRenderingVolumeOpenGL2_AutoInit_Construct at runtime In-Reply-To: References: Message-ID: I have seen this problem on mobile platforms where we have to forcefully initialize this library. I will have a look. What platform is this? Please provide as much detail as possible. - Aashish On Fri, Jan 22, 2016 at 7:31 AM, Jorge Perez wrote: > Hello, I'm building some libs depending on VTK. The building is based on > CMake. > And for one of the libs I'm getting an "undefined symbol" > > couldn't load file > "/usr/local/vtk-gitlab/lib/tcltk/vtkTclAddOn1.0/libvtkTclAddon.so": > /usr/local/vtk-gitlab/lib/tcltk/vtkTclAddOn1.0/libvtkTclAddon.so: undefined > symbol: _Z44vtkRenderingVolumeOpenGL2_AutoInit_Constructv > > The falgs used to compile the source code (generated by cmake) are > attached to this email. CMakeCache.txt is also attached. > > Any Idea about how to solve this problem? > > best regards, > > Jorge > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Fri Jan 22 10:22:07 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Fri, 22 Jan 2016 10:22:07 -0500 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: <56A236B5.4030305@polytechnique.edu> References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> <569EB27E.3050803@polytechnique.edu> <569F6057.3000208@polytechnique.edu> <56A236B5.4030305@polytechnique.edu> Message-ID: It looks like vtkCellDerivates is the only class that uses vtkTensor. When we switch vtkCellDerivatives to C ordering I think we'll just remove vtkTensor. Less code with the same functionality and probably better efficiency -- tough to beat that :) On Fri, Jan 22, 2016 at 9:03 AM, Martin Genet < martin.genet at polytechnique.edu> wrote: > Sounds good. > > However, here the culprit seems to be vtkTensor, which stores the data in > column. vtkCellDerivatives simply fills a vtkTensor (filling is storage > independent, since one provides the actual components), and then returns > the underlying vector. > > One option would be to make vtkCellDerivatives independent of vtkTensor. > > But I think it would be better to correct the storage in vtkTensor. > Actually, it seems that vtkTensor is used only in vtkCellDerivatives, so it > would not change the rest of the library. > > Let me know what you would prefer. > > Martin > > > On 20/01/2016 19:19, Andy Bauer wrote: > > I've looked at this a bit more along with others and unfortunately there's > some inconsistency in VTK for tensor ordering. If you look at the > vtkCell::Derivatives() documentation ( > http://www.vtk.org/doc/nightly/html/classvtkCell.html#aff3d8332e9d7d556a9d2e9f91173d068), > it's using a C/row-major ordering. There's some places in that have done > row-major and others that have done column major. For the most part it > hasn't been an issue since many/most of the uses of tensor have been > symmetric but it should be fixed regardless. > > I've entered a mantis issue for this at > > http://www.paraview.org/Bug/view.php?id=15949. > > Would you be willing to go in and make the change to vtkCellDerivatives? > I'm hoping to go through your changes to that class sometime today. > > On Wed, Jan 20, 2016 at 7:52 AM, Andy Bauer > wrote: > >> Hmm, in fact it does. I was looking at vtkGradientFilter instead of >> vtkCellDerivatives for the ordering of the output of the gradient of a >> vector. I think the output order is supposed to be fortran/column-major >> ordering like vtkCellDerivatives instead of C/row-major ordering like >> vtkGradientFilter. Well, you can see the confusion that crops up and maybe >> that's why vtkTensors was done that way. In any case, let me verify for >> sure which way is correct and get back to you on this. >> >> On Wed, Jan 20, 2016 at 5:24 AM, Martin Genet < >> martin.genet at polytechnique.edu> wrote: >> >>> Thanks Andy. >>> >>> Well, I might be wrong but I'm under the impression that >>> vtkCellDerivatives returns [du/dx, dv/dx, dw/dx, du/dy, dv/dy, ...]. Am I >>> wrong? >>> >>> Martin >>> >>> >>> On 20/01/2016 03:07, Andy Bauer wrote: >>> >>> Hi Martin, >>> >>> I haven't looked closely enough at vtkTensors (I don't know if I even >>> knew about it before today) but indeed the ordering output in >>> vtkCellDerivatives for a velocity vector {u,v,w} needs to be [du/dx, du/dy, >>> du/dz, dv/dx, dv/dy, ...] like you have it. I'm not sure when vtkTensors is >>> ordered the way it is. >>> >>> Cheers, >>> Andy >>> >>> On Tue, Jan 19, 2016 at 5:02 PM, Martin Genet < >>> martin.genet at polytechnique.edu> wrote: >>> >>>> Thanks Andy. >>>> >>>> I need to clarify something: the Derivatives function of vtkCell >>>> objects returns a derivs vector containing the components of the gradient >>>> of some vector field defined at the cell nodes; the components are ordered >>>> in row (as usually in C, i.e., (0,0), (0,1), (0,2), (1,0), (1,1), (1,2), >>>> (2,0), (2,1), (2,2)). Now in the CellDerivatives filter the derivs vector >>>> is used to fill a vtkTensors, and then the filter returns the internal >>>> vector storing the data of the vtkTensors. However, the components of the >>>> vtkTensors are ordered in column (as usually in fortran, i.e., (0,0), >>>> (1,0), (2,0), (0,1), (1,1), (2,1), (0,2), (1,2), (2,2)). Is it on purpose >>>> that the vtkTensors store their data in column and not in row? Isn't it a >>>> little dangerous to mix both storage in the code? Thanks for the >>>> clarification! >>>> >>>> Martin >>>> >>>> >>>> On 18/01/2016 13:32, Andy Bauer wrote: >>>> >>>> Hi Martin, >>>> >>>> Thanks for following up on this. I found the merge request now and will >>>> look at this. In general, developers should request others to do a code >>>> review on this. This can be done via something like "@acbauer please review >>>> this" or sending an email on this VTK list with a link to the merge request. >>>> >>>> Best, >>>> Andy >>>> >>>> On Mon, Jan 18, 2016 at 6:23 AM, Martin Genet < >>>> martin.genet at polytechnique.edu> wrote: >>>> >>>>> Hi Andy, >>>>> >>>>> I followed the directions, and submitted a patch (19 days ago), but >>>>> haven't heard anything back. >>>>> >>>>> In GitLab the merge requests counter is at 0, but when I try to create >>>>> a new merge request from my commit, it tells the merge request already >>>>> exists. Is it being reviewed somewhere? Thanks! >>>>> >>>>> Martin >>>>> >>>>> >>>>> On 29/12/2015 13:22, Andy Bauer wrote: >>>>> >>>>> Hi Martin, >>>>> >>>>> This patch makes sense. It would need a test if you want to get your >>>>> changes into VTK. The directions for contributing to VTK are at >>>>> >>>>> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md >>>>> . >>>>> >>>>> Cheers, >>>>> Andy >>>>> >>>>> On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet < >>>>> martin.genet at polytechnique.edu> wrote: >>>>> >>>>>> Thanks Andy. >>>>>> >>>>>> What about simply adding another mode, e.g. >>>>>> SetTensorModeToComputeGreenLagrangeStrain, to the vtkCellDerivatives >>>>>> filter? Would the attached patch make sense? >>>>>> >>>>>> Martin >>>>>> >>>>>> On 28/12/2015 14:12, Andy Bauer wrote: >>>>>> >>>>>> Hi Martin, >>>>>> >>>>>> Changing the name of the SetTensorModeToComputeStrain method to >>>>>> something else would break backward compatibility which is generally >>>>>> avoided in VTK. Other options for this include deriving a class to compute >>>>>> non-linear strain from vtkCellDerivatives if it shares enough of the >>>>>> algorithm with the linearized version or maybe just creating a new filter. >>>>>> >>>>>> Cheers, >>>>>> Andy >>>>>> >>>>>> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet < >>>>>> martin.genet at polytechnique.edu> >>>>>> wrote: >>>>>> >>>>>>> Dear VTK users: >>>>>>> >>>>>>> I realize that the vtkCellDerivatives filter, when >>>>>>> SetTensorModeToComputeStrain is activated, returns the symmetric part of >>>>>>> the gradient of the input vector field, which is the linearized strain >>>>>>> tensor, i.e., not a proper measure of deformation when large displacements >>>>>>> are involved. Would that make sense to have two different modes, >>>>>>> SetTensorModeToComputeLinearizedStrain or >>>>>>> SetTensorModeToComputeSymmetricGradient, and SetTensorModeToComputeStrain >>>>>>> or SetTensorModeToComputeGreenLagrangeStrain? 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 josp.jorge at gmail.com Fri Jan 22 10:32:47 2016 From: josp.jorge at gmail.com (Jorge Perez) Date: Fri, 22 Jan 2016 16:32:47 +0100 Subject: [vtkusers] [vtk-developers] undefined vtkRenderingVolumeOpenGL2_AutoInit_Construct at runtime In-Reply-To: References: Message-ID: Hi, attached to the first email is the CMakeCache.txt for my project. Below is information about the system set(CMAKE_HOST_SYSTEM "Linux-3.19.8-100.fc20.x86_64") set(CMAKE_HOST_SYSTEM_NAME "Linux") set(CMAKE_HOST_SYSTEM_VERSION "3.19.8-100.fc20.x86_64") set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") set(CMAKE_SYSTEM "Linux-3.19.8-100.fc20.x86_64") set(CMAKE_SYSTEM_NAME "Linux") set(CMAKE_SYSTEM_VERSION "3.19.8-100.fc20.x86_64") set(CMAKE_SYSTEM_PROCESSOR "x86_64") set(CMAKE_CROSSCOMPILING "FALSE") set(CMAKE_SYSTEM_LOADED 1) thanks, Jorge 2016-01-22 16:17 GMT+01:00 Aashish Chaudhary : > I have seen this problem on mobile platforms where we have to forcefully > initialize this library. I will have a look. > > What platform is this? Please provide as much detail as possible. > > - Aashish > > On Fri, Jan 22, 2016 at 7:31 AM, Jorge Perez wrote: > >> Hello, I'm building some libs depending on VTK. The building is based on >> CMake. >> And for one of the libs I'm getting an "undefined symbol" >> >> couldn't load file >> "/usr/local/vtk-gitlab/lib/tcltk/vtkTclAddOn1.0/libvtkTclAddon.so": >> /usr/local/vtk-gitlab/lib/tcltk/vtkTclAddOn1.0/libvtkTclAddon.so: undefined >> symbol: _Z44vtkRenderingVolumeOpenGL2_AutoInit_Constructv >> >> The falgs used to compile the source code (generated by cmake) are >> attached to this email. CMakeCache.txt is also attached. >> >> Any Idea about how to solve this problem? >> >> best regards, >> >> Jorge >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wumengda at gmail.com Fri Jan 22 10:40:11 2016 From: wumengda at gmail.com (Mengda Wu) Date: Fri, 22 Jan 2016 10:40:11 -0500 Subject: [vtkusers] Can we add a check to see if we have at least 2 nodes when vtkContourWidget is in Manipulate state? Message-ID: Hi all, I would like to set the state of vtkContourWidget to Manipulate at initialize and add the nodes programmably instead of interactively. Everything is fine but I have to check the there are at least 2 nodes in the following, otherwise AddNodeOnContour will crash So I hope you can change the following function to void vtkContourWidget::SelectAction( vtkAbstractWidget *w ) { ................ ................ switch ( self->WidgetState ) { case vtkContourWidget::Start: case vtkContourWidget::Define: ................ ................ case vtkContourWidget::Manipulate: { if ( rep->ActivateNode( X, Y ) ) { ................ ................ } else if ( rep->GetNumberOfNodes()>1 && rep->AddNodeOnContour( X, Y ) ) //Ensure the number of nodes is at least 2 { ................ ................ } ................ ................ } -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jan 22 11:17:46 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 22 Jan 2016 09:17:46 -0700 Subject: [vtkusers] vtkTransform::Concatenate followed by Inverse results in Identity (VTK 6.3.0) In-Reply-To: <56A1F421.5030600@windnovation.com> References: <56A10741.9010301@windnovation.com> <56A1F421.5030600@windnovation.com> Message-ID: Hi Torsten, I suspect that there is a bug in the Identity() method that occurs when it is used after Inverse(), and I believe that this bug is invisible except for when Concatenate(vtkTransform *) is used. Sorry for the vague explanation... it will take me some time to investigate this further. - David On Fri, Jan 22, 2016 at 2:19 AM, Torsten Sadowski < torsten.sadowski at windnovation.com> wrote: > Hi David, > > no, Update() does not change the result. I came across this issue because > I found the vtkTDxInteractorStyleCamera to be utterly useless. The reason > is that this snippet from vtkTDxInteractorStyleCamera does nothing: > > // Get the rotation axis in world coordinates. > > this->Transform->Identity(); > > this->Transform->Concatenate(eyeToWorld); > > this->Transform->Inverse(); > > this->Transform->TransformVector(axisEye,axisWorld); > > axisEye is identical to axisWorld. The vtkTDxInteractorStyleGeo has something similar. > There is either a bug in vtkTransform or in the InteractorStyles. I could make a bug report for either. > > Cheers, > Torsten > > > Am 21.01.2016 um 18:04 schrieb David Gobbi: > > Hi Torsten, > > I suspect that it will work if you do this: > > this->Transform->Identity(); > this->Transform->Concatenate(eyeToWorld->GetMatrix()); > this->Transform->Inverse(); > > The "Concatenate" method has two signatures with different behavior: > Concatenate(vtkMatrix4x4 *) > Concatenate(vtkTransform *) > > The second one establishes a connection between the two transforms, > so if you do "this->Transform->Concatenate(eyeToWorld)" then any > future changes to "eyeToWorld" will also cause "this->Transform" to > change. > > If you call "this->Transform->Update()" before PrintSelf, is the correct > matrix printed? The TransformVector() method implicitly calls Update(). > > - David > > > On Thu, Jan 21, 2016 at 9:28 AM, Torsten Sadowski < > torsten.sadowski at windnovation.com> > wrote: > >> Hello, >> >> I am trying to design my own vtkTDxInteractorStyle. When I looked into >> vtkTDxInteractorStyleCamera as an example I found something puzzling which >> might be a bug in either vtkTransform or vtkTDxInteractorStyleCamera. >> >> This snippet from void vtkTDxInteractorStyleCamera::OnMotionEvent >> >> // Get the rotation axis in world coordinates. >> >> this->Transform->Identity(); >> >> this->Transform->Concatenate(eyeToWorld); >> >> this->Transform->Inverse(); >> >> this->Transform->TransformVector(axisEye,axisWorld); >> >> does nothing useful because the Transform returns the identity after Inverse (checked with PrintSelf). >> This on the other hand works: >> // Get the rotation axis in world coordinates. this->Transform->SetMatrix(eyeToWorld->GetMatrix()); this->Transform->Inverse(); this->Transform->TransformVector(axisEye,axisWorld); >> >> I'm baffled. >> >> Best Regards, >> Torsten Sadowski >> >> >> -- >> >> >> Dr.-Ing. Torsten Sadowski >> Turbine Design/System Integration >> >> WINDnovation Engineering Solutions GmbH >> Stralauer Platz 33-34 >> 10243 Berlin >> Germany >> Phone: +49 30 547195 34 <%2B49%2030%20547195%2034> >> Fax: +49 30 547195 39 <%2B49%2030%20547195%2039> >> Managing directors: >> Dr.-Ing. Roland Stoer, Dipl.-Ing. Albrecht Kantelberg >> Registered at Amtsgericht Charlottenburg, HRB 110081 B >> >> www.windnovation.com >> >> Certified according to ISO 9001:2008 >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 80199 bytes Desc: not available URL: From ben.boeckel at kitware.com Fri Jan 22 12:18:42 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 22 Jan 2016 12:18:42 -0500 Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <20160121143236.GC4759@megas.kitware.com> References: <1323265692542-5055692.post@n5.nabble.com> <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> <007101d15397$445010c0$ccf03240$@inserm.fr> <20160120164443.GA27712@megas.kitware.com> <002901d15421$7d14bca0$773e35e0$@inserm.fr> <20160121143236.GC4759@megas.kitware.com> Message-ID: <20160122171842.GA1668@megas.kitware.com> On Thu, Jan 21, 2016 at 09:32:36 -0500, Ben Boeckel wrote: > This looks like a deeper rabbit hole. I'll try and see if we have an > Embarcadero license/installation available. We don't have one around, so a dashboard (as Sean says) would be the most helpful way to get it working and keep it working. --Ben From mail at oliwe.com Fri Jan 22 12:47:19 2016 From: mail at oliwe.com (Oliver Weinheimer) Date: Fri, 22 Jan 2016 10:47:19 -0700 (MST) Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <20160122171842.GA1668@megas.kitware.com> References: <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> <007101d15397$445010c0$ccf03240$@inserm.fr> <20160120164443.GA27712@megas.kitware.com> <002901d15421$7d14bca0$773e35e0$@inserm.fr> <20160121143236.GC4759@megas.kitware.com> <20160122171842.GA1668@megas.kitware.com> Message-ID: <1453484839163-5736116.post@n5.nabble.com> Where can we find a kind of recipe to set up a nightly build. It would be really great to bring bcc32c and bcc64 to the list of supported VTK compilers :-) -- View this message in context: http://vtk.1045678.n5.nabble.com/Recipe-for-building-VTK-5-6-1-with-C-Builder-XE-bcc32-6-31-tp3337807p5736116.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Jan 22 13:40:41 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 22 Jan 2016 11:40:41 -0700 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: Message-ID: Hi Pedro, I think that I misunderstood your question. Do you want to apply the preset WindowCenter and WindowWidth that are stored in the DICOM meta data? Or do you want to compute your own window and level? - David On Thu, Jan 21, 2016 at 11:46 PM, Pedro Paulo wrote: > I'm using python to do this, my code is below, how do I add your code in > mine to give right? > > Does your vtk-dicom package set the parameters ww/wl and do the conversion? > > Sorry my bad english. [image: 😊] > > > > from vtk import * > > reader = vtkDICOMImageReader() > reader.SetFileName('image.dcm') > reader.Update() > image = reader.GetOutput() > > shiftScaleFilter = vtkImageShiftScale() > shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() > shiftScaleFilter.SetInputConnection(reader.GetOutputPort()) > > shiftScaleFilter.SetShift(-1.0*image.GetScalarRange()[0]) > oldRange = image.GetScalarRange()[1] - image.GetScalarRange()[0] > newRange = 255 > > shiftScaleFilter.SetScale(newRange/oldRange) > shiftScaleFilter.Update() > > writer = vtkPNGWriter() > writer.SetFileName('output.jpg') > writer.SetInputConnection(shiftScaleFilter.GetOutputPort()) > writer.Write() > > > > ------------------------------ > *De:* David Gobbi > *Enviado:* quinta-feira, 21 de janeiro de 2016 22:00 > *Para:* Pedro Paulo > *Cc:* vtkusers at vtk.org > *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM > > Just to clarify my previous email, all CT and PET DICOM images have > RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have > RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields > cannot be ignored if you plan to use WindowCenter and WindowWidth. > > On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi > wrote: > >> Hi Pedro, >> >> I recommend using vtkImageMapToColors to apply a greyscale lookup table. >> In python, for example, it would look like this: >> >> from vtk import * >> >> greymap = vtkScalarsToColors() >> greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) >> >> applymap = vtkImageMapToColors() >> applymap.SetInputConnection(...) >> applymap.SetLookupTable(greymap) >> applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() >> applymap.Update() >> >> Be careful, though, because according to the DICOM standard the >> VOI LUT (i.e. window/level) should only be applied after the Modality LUT >> (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the >> CT images and nearly all PET images have RescaleIntercept/RescaleSlope, >> so if you do not take these into account, you'll get an incorrect >> result. You'd >> be safe with MRI, which does not have RescaleIntercept/Slope. >> >> So, of course, I'd suggest that you use my vtk-dicom package ;-) >> https://github.com/dgobbi/vtk-dicom >> It has a filter called vtkDICOMApplyRescale that will correctly apply the >> rescale information. >> >> - David >> >> >> On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo >> wrote: >> >>> Hi people, I want to convert a DICOM image to a png, but, before >>> converting, I would like to set the parameters of Window Width and Window >>> Center, to that the png image looks like if the parameters of ww/wl were >>> seen in a viewer, does anyone know how could I do this? >>> Thanks! >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: OutlookEmoji-&#X1f60a.png Type: image/png Size: 488 bytes Desc: not available URL: From wumengda at gmail.com Fri Jan 22 13:58:25 2016 From: wumengda at gmail.com (Mengda Wu) Date: Fri, 22 Jan 2016 13:58:25 -0500 Subject: [vtkusers] Grab Alt key once again. In-Reply-To: References: Message-ID: Hi all, I think this issue is still not fixed in the vtk 7.0. Can anyone apply this patch? Thanks, Mengda On Mon, Sep 16, 2013 at 4:11 PM, Mengda Wu wrote: > Hi Bill, > > Here is the patch to QVTKInteractorAdapter.cxx (from VTK5.10.1). I > found we can just properly add SetAltKey() without modifying the interface > of SetEventInformation(). I tested on my machine. It worked well. > > Thanks, > Mengda > > > > On Fri, Sep 6, 2013 at 5:49 PM, Bill Lorensen > wrote: > >> Can you try this and provide a patch? >> >> >> On Fri, Sep 6, 2013 at 5:45 PM, Mengda Wu wrote: >> > Thanks for your reply! >> > I think the window manager (e.g. menu bar can intercept "Alt" key) may >> be >> > just one of the reasons. >> > >> > Another reason is found to be in vtkRenderWindowInteractor.cxx/.h. If >> you >> > search for "AltKey" in the files, you will notice that the variable has >> not >> > been changed anywhere. If you search for "ControlKey", you can see the >> > difference. >> > >> > My suggestion would be to add another variable "alt" in >> > SetEventInformation(). And make "AltKey" really reflects if "alt" key is >> > received by the vtkRenderWindowInteractor. Of course, this will also >> require >> > changes in other locations where this function is called (e.g. in >> > QVTKInteractorAdapter.cxx). >> > >> > Thanks, >> > Mengda >> > >> > >> > >> > >> > On Mon, Sep 2, 2013 at 4:08 PM, Bill Lorensen >> > wrote: >> >> >> >> Your window manager is intercepting the alt click. If you really need >> >> it, then google for a solution on your specific platform. >> >> >> >> >> >> On Mon, Sep 2, 2013 at 3:39 PM, Mengda Wu wrote: >> >> > Hi all, >> >> > >> >> > I have similar problem with Alt key on Windows 7 64 bit machine. >> Does >> >> > anyone know why is that? My guess is the alt key event is not even >> >> > propagated to VTK event handling. The following VTK example page also >> >> > mentioned this issue. >> >> > >> >> > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/ShiftAndControl >> >> > >> >> > Thanks, >> >> > Mengda >> >> > >> >> > >> >> > On Mon, Feb 20, 2012 at 11:57 AM, Jes?s Sp??nola > > >> >> > wrote: >> >> >> >> >> >> Hi, >> >> >> >> >> >> I want to know when the "Alt" key is pressed so I use >> >> >> vtkRenderWindowInteractor::GetAltKey(), but it seems it only returns >> >> >> true >> >> >> when "AltGr" is pressed. When I press "Alt" key, I always get false. >> >> >> I tested under W7 x64. >> >> >> >> >> >> Is that a bug or should I use another method? >> >> >> >> >> >> Thanks in advance! >> >> >> >> >> >> -- >> >> >> Jes?s Sp?nola >> >> >> >> >> >> _______________________________________________ >> >> >> Powered by www.kitware.com >> >> >> >> >> >> Visit other Kitware open-source projects at >> >> >> http://www.kitware.com/opensource/opensource.html >> >> >> >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> >> >> http://www.vtk.org/Wiki/VTK_FAQ >> >> >> >> >> >> Follow this link to subscribe/unsubscribe: >> >> >> http://www.vtk.org/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 >> >> > >> >> > Follow this link to subscribe/unsubscribe: >> >> > http://www.vtk.org/mailman/listinfo/vtkusers >> >> > >> >> >> >> >> >> >> >> -- >> >> Unpaid intern in BillsBasement at noware dot com >> > >> > >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pedropaulobmjr at hotmail.com Fri Jan 22 14:11:02 2016 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Fri, 22 Jan 2016 19:11:02 +0000 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: , Message-ID: I would like to set the WindowCenter and WindowWidth with which the image is converted to png, when I do the conversion using the program I sent, it makes the window and level automatically, which I do not want it to do. For your second question, yes, I want to calculate my own window and level when I convert the image. For example, I want to make a conversion with the values ww=2000, wl=250 and at another time to make a conversion into the same image with the values ww=3000, wl=150. I tried using your code like this: from vtk import * reader = vtkDICOMImageReader() reader.SetFileName("img.dcm") reader.Update() image = reader.GetOutput() ########################################################### ww = 2500 wl = 200 greymap = vtkScalarsToColors() greymap.SetRange(wl-0.5*ww, wl+0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(reader.GetOutputPort()) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() applymap.Update() ########################################################### and I got the following error: Traceback (most recent call last): File "ff.py", line 12, in greymap = vtkScalarsToColors () TypeError: this is an abstract class and can not be instantiated ________________________________ De: David Gobbi Enviado: sexta-feira, 22 de janeiro de 2016 18:40 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, I think that I misunderstood your question. Do you want to apply the preset WindowCenter and WindowWidth that are stored in the DICOM meta data? Or do you want to compute your own window and level? - David On Thu, Jan 21, 2016 at 11:46 PM, Pedro Paulo > wrote: I'm using python to do this, my code is below, how do I add your code in mine to give right? Does your vtk-dicom package set the parameters ww/wl and do the conversion? Sorry my bad english. [😊] from vtk import * reader = vtkDICOMImageReader() reader.SetFileName('image.dcm') reader.Update() image = reader.GetOutput() shiftScaleFilter = vtkImageShiftScale() shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() shiftScaleFilter.SetInputConnection(reader.GetOutputPort()) shiftScaleFilter.SetShift(-1.0*image.GetScalarRange()[0]) oldRange = image.GetScalarRange()[1] - image.GetScalarRange()[0] newRange = 255 shiftScaleFilter.SetScale(newRange/oldRange) shiftScaleFilter.Update() writer = vtkPNGWriter() writer.SetFileName('output.jpg') writer.SetInputConnection(shiftScaleFilter.GetOutputPort()) writer.Write() ________________________________ De: David Gobbi > Enviado: quinta-feira, 21 de janeiro de 2016 22:00 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Just to clarify my previous email, all CT and PET DICOM images have RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields cannot be ignored if you plan to use WindowCenter and WindowWidth. On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi > wrote: Hi Pedro, I recommend using vtkImageMapToColors to apply a greyscale lookup table. In python, for example, it would look like this: from vtk import * greymap = vtkScalarsToColors() greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(...) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() applymap.Update() Be careful, though, because according to the DICOM standard the VOI LUT (i.e. window/level) should only be applied after the Modality LUT (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the CT images and nearly all PET images have RescaleIntercept/RescaleSlope, so if you do not take these into account, you'll get an incorrect result. You'd be safe with MRI, which does not have RescaleIntercept/Slope. So, of course, I'd suggest that you use my vtk-dicom package ;-) https://github.com/dgobbi/vtk-dicom It has a filter called vtkDICOMApplyRescale that will correctly apply the rescale information. - David On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo > wrote: Hi people, I want to convert a DICOM image to a png, but, before converting, I would like to set the parameters of Window Width and Window Center, to that the png image looks like if the parameters of ww/wl were seen in a viewer, does anyone know how could I do this? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: OutlookEmoji-&#X1f60a.png Type: image/png Size: 488 bytes Desc: OutlookEmoji-&#X1f60a.png URL: From david.gobbi at gmail.com Fri Jan 22 14:22:30 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 22 Jan 2016 12:22:30 -0700 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: Message-ID: Hi Pedro, If you get that error with vtkScalarsToColors, then your VTK is very old! To use vtkScalarsToColors like this, you must use vtk 5.10, vtk 6, or vtk 7. Maybe you should keep your original code, with vtkImageShiftScale. The math to convert from "range" to "shift/scale" is shown on this page: http://www.cognitive-antics.net/mw/index.php?title=Data_range_remapping - David On Fri, Jan 22, 2016 at 12:11 PM, Pedro Paulo wrote: > I would like to set the WindowCenter and WindowWidth with which the image > is converted to png, when I do the conversion using the program I sent, it > makes the window and level automatically, which I do not want it to do. > For your second question, yes, I want to calculate my own window and level > when I convert the image. > For example, I want to make a conversion with the values ww=2000, wl=250 > and at another time to make a conversion into the same image with the > values ww=3000, wl=150. > > > I tried using your code like this: > > > from vtk import * > > reader = vtkDICOMImageReader() > reader.SetFileName("img.dcm") > reader.Update() > image = reader.GetOutput() > > ########################################################### > ww = 2500 > wl = 200 > > greymap = vtkScalarsToColors() > greymap.SetRange(wl-0.5*ww, wl+0.5*ww) > > applymap = vtkImageMapToColors() > applymap.SetInputConnection(reader.GetOutputPort()) > applymap.SetLookupTable(greymap) > > applymap.SetOutputFormatToRGB() > applymap.Update() > ########################################################### > > and I got the following error: > > Traceback (most recent call last): > File "ff.py", line 12, in > greymap = vtkScalarsToColors () > TypeError: this is an abstract class and can not be instantiated > > > > ------------------------------ > *De:* David Gobbi > *Enviado:* sexta-feira, 22 de janeiro de 2016 18:40 > > *Para:* Pedro Paulo > *Cc:* vtkusers at vtk.org > *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM > > Hi Pedro, > > I think that I misunderstood your question. Do you want to apply the > preset > WindowCenter and WindowWidth that are stored in the DICOM meta data? > Or do you want to compute your own window and level? > > - David > > > On Thu, Jan 21, 2016 at 11:46 PM, Pedro Paulo > wrote: > >> I'm using python to do this, my code is below, how do I add your code in >> mine to give right? >> >> Does your vtk-dicom package set the parameters ww/wl and do the >> conversion? >> >> Sorry my bad english. [image: 😊] >> >> >> >> from vtk import * >> >> reader = vtkDICOMImageReader() >> reader.SetFileName('image.dcm') >> reader.Update() >> image = reader.GetOutput() >> >> shiftScaleFilter = vtkImageShiftScale() >> shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() >> shiftScaleFilter.SetInputConnection(reader.GetOutputPort()) >> >> shiftScaleFilter.SetShift(-1.0*image.GetScalarRange()[0]) >> oldRange = image.GetScalarRange()[1] - image.GetScalarRange()[0] >> newRange = 255 >> >> shiftScaleFilter.SetScale(newRange/oldRange) >> shiftScaleFilter.Update() >> >> writer = vtkPNGWriter() >> writer.SetFileName('output.jpg') >> writer.SetInputConnection(shiftScaleFilter.GetOutputPort()) >> writer.Write() >> >> >> >> ------------------------------ >> *De:* David Gobbi >> *Enviado:* quinta-feira, 21 de janeiro de 2016 22:00 >> *Para:* Pedro Paulo >> *Cc:* vtkusers at vtk.org >> *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM >> >> Just to clarify my previous email, all CT and PET DICOM images have >> RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have >> RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields >> cannot be ignored if you plan to use WindowCenter and WindowWidth. >> >> On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi >> wrote: >> >>> Hi Pedro, >>> >>> I recommend using vtkImageMapToColors to apply a greyscale lookup table. >>> In python, for example, it would look like this: >>> >>> from vtk import * >>> >>> greymap = vtkScalarsToColors() >>> greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) >>> >>> applymap = vtkImageMapToColors() >>> applymap.SetInputConnection(...) >>> applymap.SetLookupTable(greymap) >>> applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() >>> applymap.Update() >>> >>> Be careful, though, because according to the DICOM standard the >>> VOI LUT (i.e. window/level) should only be applied after the Modality LUT >>> (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the >>> CT images and nearly all PET images have RescaleIntercept/RescaleSlope, >>> so if you do not take these into account, you'll get an incorrect >>> result. You'd >>> be safe with MRI, which does not have RescaleIntercept/Slope. >>> >>> So, of course, I'd suggest that you use my vtk-dicom package ;-) >>> https://github.com/dgobbi/vtk-dicom >>> It has a filter called vtkDICOMApplyRescale that will correctly apply the >>> rescale information. >>> >>> - David >>> >>> >>> On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo >> > wrote: >>> >>>> Hi people, I want to convert a DICOM image to a png, but, before >>>> converting, I would like to set the parameters of Window Width and Window >>>> Center, to that the png image looks like if the parameters of ww/wl were >>>> seen in a viewer, does anyone know how could I do this? >>>> Thanks! >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: OutlookEmoji-&#X1f60a.png Type: image/png Size: 488 bytes Desc: not available URL: From andy.bauer at kitware.com Fri Jan 22 14:42:48 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Fri, 22 Jan 2016 14:42:48 -0500 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> <569EB27E.3050803@polytechnique.edu> <569F6057.3000208@polytechnique.edu> <56A236B5.4030305@polytechnique.edu> Message-ID: Hi Martin, In case you didn't receive the email notice, your changes have been merged into master. Thanks for your contribution to VTK! This looks like it was your first contribution. I hope it wasn't too onerous to get done but the community works hard to make sure that the code is high quality and well tested. Best regards, Andy On Fri, Jan 22, 2016 at 10:22 AM, Andy Bauer wrote: > It looks like vtkCellDerivates is the only class that uses vtkTensor. When > we switch vtkCellDerivatives to C ordering I think we'll just remove > vtkTensor. Less code with the same functionality and probably better > efficiency -- tough to beat that :) > > On Fri, Jan 22, 2016 at 9:03 AM, Martin Genet < > martin.genet at polytechnique.edu> wrote: > >> Sounds good. >> >> However, here the culprit seems to be vtkTensor, which stores the data in >> column. vtkCellDerivatives simply fills a vtkTensor (filling is storage >> independent, since one provides the actual components), and then returns >> the underlying vector. >> >> One option would be to make vtkCellDerivatives independent of vtkTensor. >> >> But I think it would be better to correct the storage in vtkTensor. >> Actually, it seems that vtkTensor is used only in vtkCellDerivatives, so it >> would not change the rest of the library. >> >> Let me know what you would prefer. >> >> Martin >> >> >> On 20/01/2016 19:19, Andy Bauer wrote: >> >> I've looked at this a bit more along with others and unfortunately >> there's some inconsistency in VTK for tensor ordering. If you look at the >> vtkCell::Derivatives() documentation ( >> http://www.vtk.org/doc/nightly/html/classvtkCell.html#aff3d8332e9d7d556a9d2e9f91173d068), >> it's using a C/row-major ordering. There's some places in that have done >> row-major and others that have done column major. For the most part it >> hasn't been an issue since many/most of the uses of tensor have been >> symmetric but it should be fixed regardless. >> >> I've entered a mantis issue for this at >> >> http://www.paraview.org/Bug/view.php?id=15949. >> >> Would you be willing to go in and make the change to vtkCellDerivatives? >> I'm hoping to go through your changes to that class sometime today. >> >> On Wed, Jan 20, 2016 at 7:52 AM, Andy Bauer >> wrote: >> >>> Hmm, in fact it does. I was looking at vtkGradientFilter instead of >>> vtkCellDerivatives for the ordering of the output of the gradient of a >>> vector. I think the output order is supposed to be fortran/column-major >>> ordering like vtkCellDerivatives instead of C/row-major ordering like >>> vtkGradientFilter. Well, you can see the confusion that crops up and maybe >>> that's why vtkTensors was done that way. In any case, let me verify for >>> sure which way is correct and get back to you on this. >>> >>> On Wed, Jan 20, 2016 at 5:24 AM, Martin Genet < >>> martin.genet at polytechnique.edu> wrote: >>> >>>> Thanks Andy. >>>> >>>> Well, I might be wrong but I'm under the impression that >>>> vtkCellDerivatives returns [du/dx, dv/dx, dw/dx, du/dy, dv/dy, ...]. Am I >>>> wrong? >>>> >>>> Martin >>>> >>>> >>>> On 20/01/2016 03:07, Andy Bauer wrote: >>>> >>>> Hi Martin, >>>> >>>> I haven't looked closely enough at vtkTensors (I don't know if I even >>>> knew about it before today) but indeed the ordering output in >>>> vtkCellDerivatives for a velocity vector {u,v,w} needs to be [du/dx, du/dy, >>>> du/dz, dv/dx, dv/dy, ...] like you have it. I'm not sure when vtkTensors is >>>> ordered the way it is. >>>> >>>> Cheers, >>>> Andy >>>> >>>> On Tue, Jan 19, 2016 at 5:02 PM, Martin Genet < >>>> martin.genet at polytechnique.edu> wrote: >>>> >>>>> Thanks Andy. >>>>> >>>>> I need to clarify something: the Derivatives function of vtkCell >>>>> objects returns a derivs vector containing the components of the gradient >>>>> of some vector field defined at the cell nodes; the components are ordered >>>>> in row (as usually in C, i.e., (0,0), (0,1), (0,2), (1,0), (1,1), (1,2), >>>>> (2,0), (2,1), (2,2)). Now in the CellDerivatives filter the derivs vector >>>>> is used to fill a vtkTensors, and then the filter returns the internal >>>>> vector storing the data of the vtkTensors. However, the components of the >>>>> vtkTensors are ordered in column (as usually in fortran, i.e., (0,0), >>>>> (1,0), (2,0), (0,1), (1,1), (2,1), (0,2), (1,2), (2,2)). Is it on purpose >>>>> that the vtkTensors store their data in column and not in row? Isn't it a >>>>> little dangerous to mix both storage in the code? Thanks for the >>>>> clarification! >>>>> >>>>> Martin >>>>> >>>>> >>>>> On 18/01/2016 13:32, Andy Bauer wrote: >>>>> >>>>> Hi Martin, >>>>> >>>>> Thanks for following up on this. I found the merge request now and >>>>> will look at this. In general, developers should request others to do a >>>>> code review on this. This can be done via something like "@acbauer please >>>>> review this" or sending an email on this VTK list with a link to the merge >>>>> request. >>>>> >>>>> Best, >>>>> Andy >>>>> >>>>> On Mon, Jan 18, 2016 at 6:23 AM, Martin Genet < >>>>> martin.genet at polytechnique.edu> wrote: >>>>> >>>>>> Hi Andy, >>>>>> >>>>>> I followed the directions, and submitted a patch (19 days ago), but >>>>>> haven't heard anything back. >>>>>> >>>>>> In GitLab the merge requests counter is at 0, but when I try to >>>>>> create a new merge request from my commit, it tells the merge request >>>>>> already exists. Is it being reviewed somewhere? Thanks! >>>>>> >>>>>> Martin >>>>>> >>>>>> >>>>>> On 29/12/2015 13:22, Andy Bauer wrote: >>>>>> >>>>>> Hi Martin, >>>>>> >>>>>> This patch makes sense. It would need a test if you want to get your >>>>>> changes into VTK. The directions for contributing to VTK are at >>>>>> >>>>>> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md >>>>>> . >>>>>> >>>>>> Cheers, >>>>>> Andy >>>>>> >>>>>> On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet < >>>>>> martin.genet at polytechnique.edu> >>>>>> wrote: >>>>>> >>>>>>> Thanks Andy. >>>>>>> >>>>>>> What about simply adding another mode, e.g. >>>>>>> SetTensorModeToComputeGreenLagrangeStrain, to the vtkCellDerivatives >>>>>>> filter? Would the attached patch make sense? >>>>>>> >>>>>>> Martin >>>>>>> >>>>>>> On 28/12/2015 14:12, Andy Bauer wrote: >>>>>>> >>>>>>> Hi Martin, >>>>>>> >>>>>>> Changing the name of the SetTensorModeToComputeStrain method to >>>>>>> something else would break backward compatibility which is generally >>>>>>> avoided in VTK. Other options for this include deriving a class to compute >>>>>>> non-linear strain from vtkCellDerivatives if it shares enough of the >>>>>>> algorithm with the linearized version or maybe just creating a new filter. >>>>>>> >>>>>>> Cheers, >>>>>>> Andy >>>>>>> >>>>>>> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet < >>>>>>> martin.genet at polytechnique.edu> >>>>>>> wrote: >>>>>>> >>>>>>>> Dear VTK users: >>>>>>>> >>>>>>>> I realize that the vtkCellDerivatives filter, when >>>>>>>> SetTensorModeToComputeStrain is activated, returns the symmetric part of >>>>>>>> the gradient of the input vector field, which is the linearized strain >>>>>>>> tensor, i.e., not a proper measure of deformation when large displacements >>>>>>>> are involved. Would that make sense to have two different modes, >>>>>>>> SetTensorModeToComputeLinearizedStrain or >>>>>>>> SetTensorModeToComputeSymmetricGradient, and SetTensorModeToComputeStrain >>>>>>>> or SetTensorModeToComputeGreenLagrangeStrain? 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 yumin.yuan at kitware.com Fri Jan 22 15:07:30 2016 From: yumin.yuan at kitware.com (Yumin Yuan) Date: Fri, 22 Jan 2016 15:07:30 -0500 Subject: [vtkusers] Can we add a check to see if we have at least 2 nodes when vtkContourWidget is in Manipulate state? In-Reply-To: References: Message-ID: Hi Mengda, I will suggest to figure out why it is crashing first. Even with only one node, it should still work. Also, assuming you are using this method vtkContourWidget::Initialize( vtkPolyData * poly, int state = 1, vtkIdList *idList = NULL ), your input poly doesn't have any points? Yumin On Fri, Jan 22, 2016 at 10:40 AM, Mengda Wu wrote: > Hi all, > > I would like to set the state of vtkContourWidget to Manipulate at > initialize and add the nodes programmably instead of interactively. > Everything is fine but I have to check the there are at least 2 nodes in > the following, otherwise AddNodeOnContour will crash > > So I hope you can change the following function to > > void vtkContourWidget::SelectAction( vtkAbstractWidget *w ) > { > > ................ > ................ > > switch ( self->WidgetState ) > { > case vtkContourWidget::Start: > case vtkContourWidget::Define: > ................ > ................ > case vtkContourWidget::Manipulate: > { > if ( rep->ActivateNode( X, Y ) ) > { > ................ > ................ > } > else if ( rep->GetNumberOfNodes()>1 && rep->AddNodeOnContour( X, Y ) > ) //Ensure the number of nodes is at least 2 > { > ................ > ................ > } > ................ > ................ > } > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 pedropaulobmjr at hotmail.com Fri Jan 22 16:44:24 2016 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Fri, 22 Jan 2016 21:44:24 +0000 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: , Message-ID: Yeah, I used with version 6 and functioned normally, thank you, do you know how I could do these operations of window/level using my code? It is the last feature of my software and I have no idea how to do it. ________________________________ De: David Gobbi Enviado: sexta-feira, 22 de janeiro de 2016 19:22 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, If you get that error with vtkScalarsToColors, then your VTK is very old! To use vtkScalarsToColors like this, you must use vtk 5.10, vtk 6, or vtk 7. Maybe you should keep your original code, with vtkImageShiftScale. The math to convert from "range" to "shift/scale" is shown on this page: http://www.cognitive-antics.net/mw/index.php?title=Data_range_remapping - David On Fri, Jan 22, 2016 at 12:11 PM, Pedro Paulo > wrote: I would like to set the WindowCenter and WindowWidth with which the image is converted to png, when I do the conversion using the program I sent, it makes the window and level automatically, which I do not want it to do. For your second question, yes, I want to calculate my own window and level when I convert the image. For example, I want to make a conversion with the values ww=2000, wl=250 and at another time to make a conversion into the same image with the values ww=3000, wl=150. I tried using your code like this: from vtk import * reader = vtkDICOMImageReader() reader.SetFileName("img.dcm") reader.Update() image = reader.GetOutput() ########################################################### ww = 2500 wl = 200 greymap = vtkScalarsToColors() greymap.SetRange(wl-0.5*ww, wl+0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(reader.GetOutputPort()) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() applymap.Update() ########################################################### and I got the following error: Traceback (most recent call last): File "ff.py", line 12, in greymap = vtkScalarsToColors () TypeError: this is an abstract class and can not be instantiated ________________________________ De: David Gobbi > Enviado: sexta-feira, 22 de janeiro de 2016 18:40 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, I think that I misunderstood your question. Do you want to apply the preset WindowCenter and WindowWidth that are stored in the DICOM meta data? Or do you want to compute your own window and level? - David On Thu, Jan 21, 2016 at 11:46 PM, Pedro Paulo > wrote: I'm using python to do this, my code is below, how do I add your code in mine to give right? Does your vtk-dicom package set the parameters ww/wl and do the conversion? Sorry my bad english. [😊] from vtk import * reader = vtkDICOMImageReader() reader.SetFileName('image.dcm') reader.Update() image = reader.GetOutput() shiftScaleFilter = vtkImageShiftScale() shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() shiftScaleFilter.SetInputConnection(reader.GetOutputPort()) shiftScaleFilter.SetShift(-1.0*image.GetScalarRange()[0]) oldRange = image.GetScalarRange()[1] - image.GetScalarRange()[0] newRange = 255 shiftScaleFilter.SetScale(newRange/oldRange) shiftScaleFilter.Update() writer = vtkPNGWriter() writer.SetFileName('output.jpg') writer.SetInputConnection(shiftScaleFilter.GetOutputPort()) writer.Write() ________________________________ De: David Gobbi > Enviado: quinta-feira, 21 de janeiro de 2016 22:00 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Just to clarify my previous email, all CT and PET DICOM images have RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields cannot be ignored if you plan to use WindowCenter and WindowWidth. On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi > wrote: Hi Pedro, I recommend using vtkImageMapToColors to apply a greyscale lookup table. In python, for example, it would look like this: from vtk import * greymap = vtkScalarsToColors() greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(...) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() applymap.Update() Be careful, though, because according to the DICOM standard the VOI LUT (i.e. window/level) should only be applied after the Modality LUT (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the CT images and nearly all PET images have RescaleIntercept/RescaleSlope, so if you do not take these into account, you'll get an incorrect result. You'd be safe with MRI, which does not have RescaleIntercept/Slope. So, of course, I'd suggest that you use my vtk-dicom package ;-) https://github.com/dgobbi/vtk-dicom It has a filter called vtkDICOMApplyRescale that will correctly apply the rescale information. - David On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo > wrote: Hi people, I want to convert a DICOM image to a png, but, before converting, I would like to set the parameters of Window Width and Window Center, to that the png image looks like if the parameters of ww/wl were seen in a viewer, does anyone know how could I do this? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: OutlookEmoji-&#X1f60a.png Type: image/png Size: 488 bytes Desc: OutlookEmoji-&#X1f60a.png URL: From david.gobbi at gmail.com Fri Jan 22 16:53:21 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 22 Jan 2016 14:53:21 -0700 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: Message-ID: Hi Pedro, I've given you all of the information that you need. At the very most, all you have left to do is a little bit of mathematics. - David On Fri, Jan 22, 2016 at 2:44 PM, Pedro Paulo wrote: > Yeah, I used with version 6 and functioned normally, thank you, do you > know how I could do these operations of window/level using my code? > It is the last feature of my software and I have no idea how to do it. > > > > ------------------------------ > *De:* David Gobbi > *Enviado:* sexta-feira, 22 de janeiro de 2016 19:22 > > *Para:* Pedro Paulo > *Cc:* vtkusers at vtk.org > *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM > > Hi Pedro, > > If you get that error with vtkScalarsToColors, then your VTK is very old! > To use vtkScalarsToColors like this, you must use vtk 5.10, vtk 6, or vtk > 7. > > Maybe you should keep your original code, with vtkImageShiftScale. > The math to convert from "range" to "shift/scale" is shown on this page: > http://www.cognitive-antics.net/mw/index.php?title=Data_range_remapping > > - David > > > > On Fri, Jan 22, 2016 at 12:11 PM, Pedro Paulo > wrote: > >> I would like to set the WindowCenter and WindowWidth with which the image >> is converted to png, when I do the conversion using the program I sent, it >> makes the window and level automatically, which I do not want it to do. >> For your second question, yes, I want to calculate my own window and level >> when I convert the image. >> For example, I want to make a conversion with the values ww=2000, wl=250 >> and at another time to make a conversion into the same image with the >> values ww=3000, wl=150. >> >> >> I tried using your code like this: >> >> >> from vtk import * >> >> reader = vtkDICOMImageReader() >> reader.SetFileName("img.dcm") >> reader.Update() >> image = reader.GetOutput() >> >> ########################################################### >> ww = 2500 >> wl = 200 >> >> greymap = vtkScalarsToColors() >> greymap.SetRange(wl-0.5*ww, wl+0.5*ww) >> >> applymap = vtkImageMapToColors() >> applymap.SetInputConnection(reader.GetOutputPort()) >> applymap.SetLookupTable(greymap) >> >> applymap.SetOutputFormatToRGB() >> applymap.Update() >> ########################################################### >> >> and I got the following error: >> >> Traceback (most recent call last): >> File "ff.py", line 12, in >> greymap = vtkScalarsToColors () >> TypeError: this is an abstract class and can not be instantiated >> >> >> >> ------------------------------ >> *De:* David Gobbi >> *Enviado:* sexta-feira, 22 de janeiro de 2016 18:40 >> >> *Para:* Pedro Paulo >> *Cc:* vtkusers at vtk.org >> *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM >> >> Hi Pedro, >> >> I think that I misunderstood your question. Do you want to apply the >> preset >> WindowCenter and WindowWidth that are stored in the DICOM meta data? >> Or do you want to compute your own window and level? >> >> - David >> >> >> On Thu, Jan 21, 2016 at 11:46 PM, Pedro Paulo > > wrote: >> >>> I'm using python to do this, my code is below, how do I add your code in >>> mine to give right? >>> >>> Does your vtk-dicom package set the parameters ww/wl and do the >>> conversion? >>> >>> Sorry my bad english. [image: 😊] >>> >>> >>> >>> from vtk import * >>> >>> reader = vtkDICOMImageReader() >>> reader.SetFileName('image.dcm') >>> reader.Update() >>> image = reader.GetOutput() >>> >>> shiftScaleFilter = vtkImageShiftScale() >>> shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() >>> shiftScaleFilter.SetInputConnection(reader.GetOutputPort()) >>> >>> shiftScaleFilter.SetShift(-1.0*image.GetScalarRange()[0]) >>> oldRange = image.GetScalarRange()[1] - image.GetScalarRange()[0] >>> newRange = 255 >>> >>> shiftScaleFilter.SetScale(newRange/oldRange) >>> shiftScaleFilter.Update() >>> >>> writer = vtkPNGWriter() >>> writer.SetFileName('output.jpg') >>> writer.SetInputConnection(shiftScaleFilter.GetOutputPort()) >>> writer.Write() >>> >>> >>> >>> ------------------------------ >>> *De:* David Gobbi >>> *Enviado:* quinta-feira, 21 de janeiro de 2016 22:00 >>> *Para:* Pedro Paulo >>> *Cc:* vtkusers at vtk.org >>> *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM >>> >>> Just to clarify my previous email, all CT and PET DICOM images have >>> RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have >>> RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields >>> cannot be ignored if you plan to use WindowCenter and WindowWidth. >>> >>> On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi >>> wrote: >>> >>>> Hi Pedro, >>>> >>>> I recommend using vtkImageMapToColors to apply a greyscale lookup table. >>>> In python, for example, it would look like this: >>>> >>>> from vtk import * >>>> >>>> greymap = vtkScalarsToColors() >>>> greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) >>>> >>>> applymap = vtkImageMapToColors() >>>> applymap.SetInputConnection(...) >>>> applymap.SetLookupTable(greymap) >>>> applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() >>>> applymap.Update() >>>> >>>> Be careful, though, because according to the DICOM standard the >>>> VOI LUT (i.e. window/level) should only be applied after the Modality >>>> LUT >>>> (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the >>>> CT images and nearly all PET images have RescaleIntercept/RescaleSlope, >>>> so if you do not take these into account, you'll get an incorrect >>>> result. You'd >>>> be safe with MRI, which does not have RescaleIntercept/Slope. >>>> >>>> So, of course, I'd suggest that you use my vtk-dicom package ;-) >>>> https://github.com/dgobbi/vtk-dicom >>>> It has a filter called vtkDICOMApplyRescale that will correctly apply >>>> the >>>> rescale information. >>>> >>>> - David >>>> >>>> >>>> On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo < >>>> pedropaulobmjr at hotmail.com> wrote: >>>> >>>>> Hi people, I want to convert a DICOM image to a png, but, before >>>>> converting, I would like to set the parameters of Window Width and Window >>>>> Center, to that the png image looks like if the parameters of ww/wl were >>>>> seen in a viewer, does anyone know how could I do this? >>>>> Thanks! >>>>> >>>> >>>> >>> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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: OutlookEmoji-&#X1f60a.png Type: image/png Size: 488 bytes Desc: not available URL: From sean at rogue-research.com Fri Jan 22 17:07:00 2016 From: sean at rogue-research.com (Sean McBride) Date: Fri, 22 Jan 2016 17:07:00 -0500 Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <1453484839163-5736116.post@n5.nabble.com> References: <1375947615101-5722574.post@n5.nabble.com> <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> <007101d15397$445010c0$ccf03240$@inserm.fr> <20160120164443.GA27712@megas.kitware.com> <002901d15421$7d14bca0$773e35e0$@inserm.fr> <20160121143236.GC4759@megas.kitware.com> <20160122171842.GA1668@megas.kitware.com> <1453484839163-5736116.post@n5.nabble.com> Message-ID: <20160122220700.56909994@mail.rogue-research.com> On Fri, 22 Jan 2016 10:47:19 -0700, Oliver Weinheimer said: >Where can we find a kind of recipe to set up a nightly build. It would be >really great to bring bcc32c and bcc64 to the list of supported VTK >compilers :-) There is some info here: but you can basically copy an existing script, tweak some paths and parameters, and invoke yours with: ctest -S /path/to/script -V The existing dashboards are here: if you click the gear icon at top-right choose advanced view, then click the white generic document icon to see an existing script (best from 'Nightly Expected' section), like say this other Windows one: 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 agsmith424 at gmail.com Fri Jan 22 17:39:16 2016 From: agsmith424 at gmail.com (Andy Smith) Date: Fri, 22 Jan 2016 17:39:16 -0500 Subject: [vtkusers] Delaunay2D filter problem when using best fitting plane option Message-ID: The Delaunay2D filter does not work properly when using best fitting plane option if the points of interest all lie in the y-z or x-z plane. It appears that this problem has been around for a while: https://cmake.org/pipermail/paraview/2008-November/010200.html The comments in the source code indicate the ComputeBestFittingPlane was taken from the vtkTextureMapToPlane class and modified but a few key parts from the vtkTextureMapToPlane were neglected. The code should check to see if the bounds are perpendicular to an axes so the normal can be computed quickly. I've attached a patch that takes more of the code from vtkTextureMapToPlane and fixes the problem for my case. Would it be easier for someone else with developer access to test this patch or should I proceed down the GitLab/developer route? -Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Delaunay2D.patch Type: text/x-patch Size: 2998 bytes Desc: not available URL: From newcfd at yahoo.com Fri Jan 22 17:47:26 2016 From: newcfd at yahoo.com (newcfd) Date: Fri, 22 Jan 2016 15:47:26 -0700 (MST) Subject: [vtkusers] does vtkProbeFilter work with multiblock data set? Message-ID: <1453502846744-5736127.post@n5.nabble.com> got zero number of valid points from probe on a multiblock data set. I am suing 6.3. -- View this message in context: http://vtk.1045678.n5.nabble.com/does-vtkProbeFilter-work-with-multiblock-data-set-tp5736127.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Jan 22 17:58:59 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 22 Jan 2016 17:58:59 -0500 Subject: [vtkusers] Delaunay2D filter problem when using best fitting plane option In-Reply-To: References: Message-ID: Hi Andy, It would be easiest for VTK developers to help you if you push a patch to GitLab. Thanks, Cory On Fri, Jan 22, 2016 at 5:39 PM, Andy Smith wrote: > The Delaunay2D filter does not work properly when using best fitting plane > option if the points of interest all lie in the y-z or x-z plane. It > appears that this problem has been around for a while: > https://cmake.org/pipermail/paraview/2008-November/010200.html > > The comments in the source code indicate the ComputeBestFittingPlane was > taken from the vtkTextureMapToPlane class and modified but a few key parts > from the vtkTextureMapToPlane were neglected. > The code should check to see if the bounds are perpendicular to an axes so > the normal can be computed quickly. > > I've attached a patch that takes more of the code from > vtkTextureMapToPlane and fixes the problem for my case. Would it be easier > for someone else with developer access to test this patch or should I > proceed down the GitLab/developer route? > > -Andy > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 wumengda at gmail.com Fri Jan 22 23:20:21 2016 From: wumengda at gmail.com (Mengda Wu) Date: Fri, 22 Jan 2016 23:20:21 -0500 Subject: [vtkusers] Can we add a check to see if we have at least 2 nodes when vtkContourWidget is in Manipulate state? In-Reply-To: References: Message-ID: OK. I did not initialize it with a polydata but just used the method vtkContourWidget::Initialize(). I believe it means that there is no point in it. Then I set the state to Manipulate immediately with SetWidgetState( vtkContourWidget::Manipulate); After that, using some other code, I got the point from the pick point on vtkImagePlaneWidget and added it to vtkContourWidget with vtkContourWidget-> GetContourRepresentation()->AddNodeAtWorldPosition(point); The first point is fine but it crashes when I tried to add the second point. The crashes happened in vtkLine::Intersection with the call stack as follows: vtkLine::Intersection(double * a1, double * a2, double * b1, double * b2, double & u, double & v) Line 117 vtkContourRepresentation::FindClosestPointOnContour(int X, int Y, double * closestWorldPos, int * idx) Line 808 vtkContourRepresentation::AddNodeOnContour(int X, int Y) Line 896 Mengda On Fri, Jan 22, 2016 at 3:07 PM, Yumin Yuan wrote: > Hi Mengda, > > I will suggest to figure out why it is crashing first. Even with only one > node, it should still work. > > Also, assuming you are using this method vtkContourWidget::Initialize( > vtkPolyData * poly, int state = 1, vtkIdList *idList = NULL ), your input > poly doesn't have any points? > > Yumin > > On Fri, Jan 22, 2016 at 10:40 AM, Mengda Wu wrote: > >> Hi all, >> >> I would like to set the state of vtkContourWidget to Manipulate at >> initialize and add the nodes programmably instead of interactively. >> Everything is fine but I have to check the there are at least 2 nodes in >> the following, otherwise AddNodeOnContour will crash >> >> So I hope you can change the following function to >> >> void vtkContourWidget::SelectAction( vtkAbstractWidget *w ) >> { >> >> ................ >> ................ >> >> switch ( self->WidgetState ) >> { >> case vtkContourWidget::Start: >> case vtkContourWidget::Define: >> ................ >> ................ >> case vtkContourWidget::Manipulate: >> { >> if ( rep->ActivateNode( X, Y ) ) >> { >> ................ >> ................ >> } >> else if ( rep->GetNumberOfNodes()>1 && rep->AddNodeOnContour( X, Y >> ) ) //Ensure the number of nodes is at least 2 >> { >> ................ >> ................ >> } >> ................ >> ................ >> } >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 pedropaulobmjr at hotmail.com Sun Jan 24 02:39:47 2016 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Sun, 24 Jan 2016 07:39:47 +0000 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: , , Message-ID: Now I'm beginning to understand, I was not understanding some things about DICOM, now my question is, do you know how I can access the value of each pixel in the image? And if possible, change these values, for now, only access is sufficient. ________________________________ De: Pedro Paulo Enviado: s?bado, 23 de janeiro de 2016 06:58 Para: David Gobbi Assunto: Re: [vtkusers] Set window/level and convert image DICOM That's the point, I did not understand the steps I need to take to make this calculation of w/l and convert the image to png. I do not ask you to do the implementation, only tell me the steps I need to do, because I did not understand completely, the rest I try to do. ________________________________ De: David Gobbi Enviado: sexta-feira, 22 de janeiro de 2016 21:53 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, I've given you all of the information that you need. At the very most, all you have left to do is a little bit of mathematics. - David On Fri, Jan 22, 2016 at 2:44 PM, Pedro Paulo > wrote: Yeah, I used with version 6 and functioned normally, thank you, do you know how I could do these operations of window/level using my code? It is the last feature of my software and I have no idea how to do it. ________________________________ De: David Gobbi > Enviado: sexta-feira, 22 de janeiro de 2016 19:22 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, If you get that error with vtkScalarsToColors, then your VTK is very old! To use vtkScalarsToColors like this, you must use vtk 5.10, vtk 6, or vtk 7. Maybe you should keep your original code, with vtkImageShiftScale. The math to convert from "range" to "shift/scale" is shown on this page: http://www.cognitive-antics.net/mw/index.php?title=Data_range_remapping - David On Fri, Jan 22, 2016 at 12:11 PM, Pedro Paulo > wrote: I would like to set the WindowCenter and WindowWidth with which the image is converted to png, when I do the conversion using the program I sent, it makes the window and level automatically, which I do not want it to do. For your second question, yes, I want to calculate my own window and level when I convert the image. For example, I want to make a conversion with the values ww=2000, wl=250 and at another time to make a conversion into the same image with the values ww=3000, wl=150. I tried using your code like this: from vtk import * reader = vtkDICOMImageReader() reader.SetFileName("img.dcm") reader.Update() image = reader.GetOutput() ########################################################### ww = 2500 wl = 200 greymap = vtkScalarsToColors() greymap.SetRange(wl-0.5*ww, wl+0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(reader.GetOutputPort()) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() applymap.Update() ########################################################### and I got the following error: Traceback (most recent call last): File "ff.py", line 12, in greymap = vtkScalarsToColors () TypeError: this is an abstract class and can not be instantiated ________________________________ De: David Gobbi > Enviado: sexta-feira, 22 de janeiro de 2016 18:40 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, I think that I misunderstood your question. Do you want to apply the preset WindowCenter and WindowWidth that are stored in the DICOM meta data? Or do you want to compute your own window and level? - David On Thu, Jan 21, 2016 at 11:46 PM, Pedro Paulo > wrote: I'm using python to do this, my code is below, how do I add your code in mine to give right? Does your vtk-dicom package set the parameters ww/wl and do the conversion? Sorry my bad english. [😊] from vtk import * reader = vtkDICOMImageReader() reader.SetFileName('image.dcm') reader.Update() image = reader.GetOutput() shiftScaleFilter = vtkImageShiftScale() shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() shiftScaleFilter.SetInputConnection(reader.GetOutputPort()) shiftScaleFilter.SetShift(-1.0*image.GetScalarRange()[0]) oldRange = image.GetScalarRange()[1] - image.GetScalarRange()[0] newRange = 255 shiftScaleFilter.SetScale(newRange/oldRange) shiftScaleFilter.Update() writer = vtkPNGWriter() writer.SetFileName('output.jpg') writer.SetInputConnection(shiftScaleFilter.GetOutputPort()) writer.Write() ________________________________ De: David Gobbi > Enviado: quinta-feira, 21 de janeiro de 2016 22:00 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Just to clarify my previous email, all CT and PET DICOM images have RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields cannot be ignored if you plan to use WindowCenter and WindowWidth. On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi > wrote: Hi Pedro, I recommend using vtkImageMapToColors to apply a greyscale lookup table. In python, for example, it would look like this: from vtk import * greymap = vtkScalarsToColors() greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(...) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() applymap.Update() Be careful, though, because according to the DICOM standard the VOI LUT (i.e. window/level) should only be applied after the Modality LUT (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the CT images and nearly all PET images have RescaleIntercept/RescaleSlope, so if you do not take these into account, you'll get an incorrect result. You'd be safe with MRI, which does not have RescaleIntercept/Slope. So, of course, I'd suggest that you use my vtk-dicom package ;-) https://github.com/dgobbi/vtk-dicom It has a filter called vtkDICOMApplyRescale that will correctly apply the rescale information. - David On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo > wrote: Hi people, I want to convert a DICOM image to a png, but, before converting, I would like to set the parameters of Window Width and Window Center, to that the png image looks like if the parameters of ww/wl were seen in a viewer, does anyone know how could I do this? Thanks! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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: OutlookEmoji-&#X1f60a.png Type: image/png Size: 488 bytes Desc: OutlookEmoji-&#X1f60a.png URL: From the.1.lily at hotmail.com Sun Jan 24 18:33:19 2016 From: the.1.lily at hotmail.com (the lily) Date: Sun, 24 Jan 2016 23:33:19 +0000 Subject: [vtkusers] libvtkIOImage-6.1.so.1 Message-ID: Hello, I'm compiling my program which uses vtk libraries, the compiling goes fine. When I try to run it I get the following error error while loading shared libraries: libvtkIOImage-6.1.so.1: cannot open shared object file: No such file or directory I'm running my code on a shared cluster, but I built vtk in my home directory. Any pointers to what is going wrong? -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Jan 24 20:05:54 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 24 Jan 2016 18:05:54 -0700 Subject: [vtkusers] libvtkIOImage-6.1.so.1 In-Reply-To: References: Message-ID: Hi Lily, You might have to set the LD_LIBRARY_PATH in your job script. - David On Sun, Jan 24, 2016 at 4:33 PM, the lily wrote: > Hello, > > > I'm compiling my program which uses vtk libraries, the compiling goes > fine. > > When I try to run it I get the following error > > error while loading shared libraries: libvtkIOImage-6.1.so.1: cannot open > shared object file: No such file or directory > > I'm running my code on a shared cluster, but I built vtk in my home > directory. > > > Any pointers to what is going wrong? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gallovic at 3cky.sk Mon Jan 25 03:58:49 2016 From: gallovic at 3cky.sk (michalgallovic) Date: Mon, 25 Jan 2016 01:58:49 -0700 (MST) Subject: [vtkusers] vtkRenderWindow off-screen rendering Message-ID: <1453712329670-5736134.post@n5.nabble.com> Hey guys, I would like to do off-screen rendering of vtkRenderWindow into the frame buffer object. I'm not sure how to do so, but what I think is that: 1.generate frame buffer using glGenFramebuffers - obtain GLuint fbo_id 2.create vtkFrameBufferObject from vtkRendererWindow (I don't know how to do so) 3.call SetActiveBuffer(fbo_id) on vtkFrameBufferObject 4.call RenderQuad on vtkFrameBufferObject -> now the created FBO should be filled with data. My question is - how can I create vtkFrameBufferObject with the contents of my window, so I can do the off-screen rendering into the FBO ? Should this be done as I stated above ? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkRenderWindow-off-screen-rendering-tp5736134.html Sent from the VTK - Users mailing list archive at Nabble.com. From f.nellmeldin at open-engineering.com Mon Jan 25 04:39:56 2016 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Mon, 25 Jan 2016 10:39:56 +0100 Subject: [vtkusers] Hide non visible labels on a 3d model Message-ID: Hello. I'm trying to show the values of a contour as labels. Each label is fixed to a point in the contour. I do not want to show the labels that are anchored to points that are not visible. To achieve this, I followed these two examples: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LabelContours http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Annotation/Python/labeledMesh.py Unfortunately, the removal of hidden points (and thus, of labels) is not working as expected. I attach three pictures of the behavior when I move the camera. Look at the values on the top (365 and 399). The Pipeline I am using is the following: vtkUnstructuredGrid -> vtkGeometryFilter -> vtkContourFilter -> vtkStripper -> (create a vtkPolyData with one point of each contour) -> vtkSelectVisiblePoints -> vtkLabeledDataMapper -> vtkActor2D. I am using VTK 5.10 but I tried with VTK 6.3 and the problem is worse (nothing is hidden). This is under Windows 8.1. Any ideas? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: contour_labels_problem.png Type: image/png Size: 158223 bytes Desc: not available URL: From yihui.cao at qq.com Mon Jan 25 05:07:59 2016 From: yihui.cao at qq.com (=?ISO-8859-1?B?WWlodWkgQ2Fv?=) Date: Mon, 25 Jan 2016 18:07:59 +0800 Subject: [vtkusers] How to make a image slice renderer full fill in a renderWindow? Message-ID: Dear all, When I show a image slice in a QVTKWideget, the default setting that the image shown not in the center of the window, as shown in follow figure. As shown in fig above, the red color is the background. Then, I add the code renderer->ResetCamera() that the image is shown in the center, but a subsequent problem is the image is shown in a small region, as shown in follow So, the question is how to make the image renderer full fill in the renderWindow? Thanks! Yihui Cao -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2F04F70C at 3A613275.FFF3A556 Type: application/octet-stream Size: 91364 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2E08F809 at 3A613275.FFF3A556 Type: application/octet-stream Size: 99134 bytes Desc: not available URL: From mail at oliwe.com Mon Jan 25 05:21:50 2016 From: mail at oliwe.com (Oliver Weinheimer) Date: Mon, 25 Jan 2016 03:21:50 -0700 (MST) Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <20160122220700.56909994@mail.rogue-research.com> References: <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> <007101d15397$445010c0$ccf03240$@inserm.fr> <20160120164443.GA27712@megas.kitware.com> <002901d15421$7d14bca0$773e35e0$@inserm.fr> <20160121143236.GC4759@megas.kitware.com> <20160122171842.GA1668@megas.kitware.com> <1453484839163-5736116.post@n5.nabble.com> <20160122220700.56909994@mail.rogue-research.com> Message-ID: <1453717310446-5736137.post@n5.nabble.com> Thanks for the hints. Once there is some time available, I'll deal with it. -- View this message in context: http://vtk.1045678.n5.nabble.com/Recipe-for-building-VTK-5-6-1-with-C-Builder-XE-bcc32-6-31-tp3337807p5736137.html Sent from the VTK - Users mailing list archive at Nabble.com. From josp.jorge at gmail.com Mon Jan 25 06:00:18 2016 From: josp.jorge at gmail.com (Jorge Perez) Date: Mon, 25 Jan 2016 12:00:18 +0100 Subject: [vtkusers] OpenGL2/vtkOpenGLTexture.cxx signal SIGSEGV, Segmentation fault Message-ID: Hello, I have an application which is reaching a SIGSEGV when opengl backend is OpenGL2 (master branch). I have traced the error and it seems to be related to this kind of warning: Warning: Kitware/vtk.gitlab/Common/ExecutionModel/vtkAlgorithm.cxx, line 1421 vtkOpenGLTexture (0x17e1620): Attempt to get connection index 0 for input port 0, which has 0 connections. The warning appears with both OpenGL and OpenGL2 backends but with the OpenGL2 a SIGSEGV is reached. The SIGSEGV is because the member vtkOpenGLTexture::TextureObject is NULL and it can be used in: - OpenGL2/vtkOpenGLPolyDataMapper if (texture) { tNumComp = vtkOpenGLTexture::SafeDownCast(texture)-> *GetTextureObject()->*GetComponents(); } - OpenGL2/vtkOpenGL2Texture.cxx void vtkOpenGLTexture::CopyTexImage(int x, int y, int width, int height) { this->*TextureObject->*CopyFromFrameBuffer(x, y, x, y, width, height); } void vtkOpenGLTexture::PostRender(vtkRenderer *vtkNotUsed(ren)) { this->*TextureObject->*Deactivate(); } I see that within there are some pice of code which test for TextureObject and uses it if it is not NULL, but there are others which do not do the test for NULL. In order to have a quick fix I have initialized the member TextureObject to vtkTextureObject::New() instead of the value 0 (at the constructor vtkOpenGLTexture::vtkOpenGLTexture). That solved the SIGSEGV for my application but I'm not sure if this could be a the correct solution. I can submit a merge request if the change make sense. this->TextureObject = vtkTextureObject::New(); best regards, Jorge -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.kozlovsky at fr.thalesgroup.com Mon Jan 25 06:57:45 2016 From: nicolas.kozlovsky at fr.thalesgroup.com (KOZLOVSKY Nicolas) Date: Mon, 25 Jan 2016 12:57:45 +0100 Subject: [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D) Message-ID: Hi all I try to use QVTKWidget in a big project using qmake for building. Each time I run my code, I got this error under Linux Ubuntu 1510) and VTK 6.3 : In VTK-6.3.0/Rendering/Context2D/vtkContextDevice2D.cxx, line 27 Error: no override found for 'vtkContextDevice2D'. I read a lot about this and put in the main.cpp : #include VTK_MODULE_INIT(vtkRenderingOpenGL) VTK_MODULE_INIT(vtkInteractionStyle) I have always the same error at runtime. I try also to add this directive to .pro file: DEFINES += "\"vtkRenderingCore_AUTOINIT=1 (vtkRenderingOpenGL)\"" But again same error at runtime. If now I build the project with cmake, I have no problem everything is running fine. How can I build with qmake ??? Thanks for any clues Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: M Nicolas KOZLOVSKY.vcf Type: text/x-vcard Size: 1589 bytes Desc: M Nicolas KOZLOVSKY.vcf URL: From david.gobbi at gmail.com Mon Jan 25 08:40:38 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 Jan 2016 06:40:38 -0700 Subject: [vtkusers] Get IDs within vtkImageStencilData In-Reply-To: References: <1453240740090-5736032.post@n5.nabble.com> Message-ID: Hi Richard, I've put my code up on gitlab, three classes in total: https://gitlab.kitware.com/vtk/vtk/merge_requests/1118 Two of these classes are iterators, meaning that they allow you to write your own loop. The third class is a filter that extracts all of the point data that lies within the stencil. Here are some examples (the examples are python, C++ code would be similar): # Example for iterating over all point Ids in an image iter = vtkImagePointDataIterator(image, image.GetExtent(), stencil) scalars = image.GetPointData().GetScalars() while (not iter.IsAtEnd()): # loop over a contiguous span of Ids for i in range(iter.GetId(), iter.GetId() + iter.GetSpanSize()): value = scalars.GetTuple(i) # advance to the next span iter.NextSpan() # Example for iterating over all points in an image iter = vtkImagePointIterator(image, image.GetExtent(), stencil) scalars = image.GetPointData().GetScalars() while (not iter.IsAtEnd()): point = iter.GetPosition() idx = iter.GetIndex() value = scalars.GetTuple(iter.GetId()) iter.Next() # Example for using the vtkImageToPoints filter filter = vtkImageToPoints() filter.SetInputConnection(reader.GetOutputPort()) filter.SetStencilConnection(polyToStencil.GetOutputPort()) filter.Update() # Get a polydata object with points and attributes polyData = filter.GetOutput() points = polyData.GetPoints() scalars = polyData.GetPointData().GetScalars() I'm not sure if these were quite what you were looking for, I was aiming to create general-purpose classes. Cheers, - David On Wed, Jan 20, 2016 at 9:31 AM, David Gobbi wrote: > Proposed patches for VTK are at this page: > https://gitlab.kitware.com/vtk/vtk/merge_requests > And a log of accepted patches is at this page: > https://gitlab.kitware.com/groups/vtk > > When my patch is ready, I'll send you a link. > > - David > > > On Wed, Jan 20, 2016 at 9:10 AM, Richard Brown > wrote: > >> Great thanks David. >> >> Silly question, but where is gitlab? >> >> Regards, >> Richard >> >> On 19 Jan 2016, at 23:09, David Gobbi wrote: >> >> Hi Rich, >> >> The quick answer is no, there are no classes in VTK to do this. >> >> However, I have a class of my own called vtkImageExtractVoxels that >> almost does what you need: it creates a vtkDataArray that contains the >> the values of all of the voxels in the stencil. It would be trivial to >> modify >> this class so it so that it gives all the IDs. >> >> Coincidentally, just 5 minutes before I saw your email, I started editing >> this class because I need it to give the (x,y,z) of all in-stencil voxels. >> So I'll get it to produce the IDs as well, and then put it on gitlab if >> you >> want to try it out. >> >> - David >> >> On Tue, Jan 19, 2016 at 2:59 PM, mbcx9rb9 >> wrote: >> >>> Hi all, >>> >>> Is there any way to get a list containing the IDs of all voxels within a >>> vtkImageStencilData? >>> >>> My method at the moment for getting all the voxels in the stencil is to >>> create a vtkOBBTree and check if the centre of each voxel is inside the >>> vtkPolyData related to the stencil, but this is very slow. >>> >>> Thanks in advance for any pointers, >>> Rich >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.MOUSSAUD at cea.fr Mon Jan 25 08:17:32 2016 From: David.MOUSSAUD at cea.fr (MOUSSAUD David 244079) Date: Mon, 25 Jan 2016 13:17:32 +0000 Subject: [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D) In-Reply-To: References: Message-ID: <7A18A422C44BE34E947C1F96625E60BD08965128@EXDAG0-A1.intra.cea.fr> Hi Nicolas, A couple weeks ago, i have joined my qmake project to an other thread (http://public.kitware.com/pipermail/vtkusers/2016-January/093650.html) Here it is again attached in this email. I'm using also vtk 6.3. Regards, David. ________________________________ De : vtkusers [vtkusers-bounces at vtk.org] de la part de KOZLOVSKY Nicolas [nicolas.kozlovsky at fr.thalesgroup.com] Envoy? : lundi 25 janvier 2016 12:57 ? : vtkusers at vtk.org Objet : [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D) Hi all I try to use QVTKWidget in a big project using qmake for building. Each time I run my code, I got this error under Linux Ubuntu 1510) and VTK 6.3 : In VTK-6.3.0/Rendering/Context2D/vtkContextDevice2D.cxx, line 27 Error: no override found for 'vtkContextDevice2D'. I read a lot about this and put in the main.cpp : #include VTK_MODULE_INIT(vtkRenderingOpenGL) VTK_MODULE_INIT(vtkInteractionStyle) I have always the same error at runtime. I try also to add this directive to .pro file: DEFINES += ?\?vtkRenderingCore_AUTOINIT=1 (vtkRenderingOpenGL)\?? But again same error at runtime. If now I build the project with cmake, I have no problem everything is running fine. How can I build with qmake ??? Thanks for any clues Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: [vtkusers]_vtkPLYWriter___vertices_are_not_generated_in_a_the_PLY_file.zip Type: application/x-zip-compressed Size: 3804 bytes Desc: [vtkusers]_vtkPLYWriter___vertices_are_not_generated_in_a_the_PLY_file.zip URL: From shawn.waldon at kitware.com Mon Jan 25 09:56:53 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Mon, 25 Jan 2016 09:56:53 -0500 Subject: [vtkusers] How to make a image slice renderer full fill in a renderWindow? In-Reply-To: References: Message-ID: Hi Yihui, I don't know if there is a built-in easy way to do this. In the tomviz project we set the camera to orthographic projection and then set its view bounds so that the image fills the whole area (or as close as possible if the aspect ratios are different). If someone knows a better way to do this, I would like to learn about it too. HTH, Shawn On Mon, Jan 25, 2016 at 5:07 AM, Yihui Cao wrote: > Dear all, > > When I show a image slice in a QVTKWideget, the default setting that the > image shown not in the center of the window, as shown in follow figure. > As shown in fig above, the red color is the background. > > Then, I add the code renderer->ResetCamera() that the image is shown in > the center, but a subsequent problem is the image is shown in a small > region, as shown in follow > So, the question is how to make the image renderer full fill in the > renderWindow? > > Thanks! > Yihui Cao > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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: 2E08F809 at 3A613275.FFF3A556 Type: application/octet-stream Size: 99134 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2F04F70C at 3A613275.FFF3A556 Type: application/octet-stream Size: 91364 bytes Desc: not available URL: From sujin.philip at kitware.com Mon Jan 25 11:49:26 2016 From: sujin.philip at kitware.com (Sujin Philip) Date: Mon, 25 Jan 2016 11:49:26 -0500 Subject: [vtkusers] does vtkProbeFilter work with multiblock data set? In-Reply-To: <1453502846744-5736127.post@n5.nabble.com> References: <1453502846744-5736127.post@n5.nabble.com> Message-ID: Hi, Try using vtkCompositeDataProbeFilter. Thanks Sujin On Fri, Jan 22, 2016 at 5:47 PM, newcfd via vtkusers wrote: > got zero number of valid points from probe on a multiblock data set. > I am suing 6.3. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/does-vtkProbeFilter-work-with-multiblock-data-set-tp5736127.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 aashish.chaudhary at kitware.com Mon Jan 25 11:59:18 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 25 Jan 2016 11:59:18 -0500 Subject: [vtkusers] OpenGL2/vtkOpenGLTexture.cxx signal SIGSEGV, Segmentation fault In-Reply-To: References: Message-ID: Are you sure that the pipeline that creates the texture is not broken as said in the warning? Looks like whatever filter / pipeline you are using is not producing the data as it should. And it seems to me that we could be check for null texture object in other methods. If no one else look at it, I will push a fix. - Aashish On Mon, Jan 25, 2016 at 6:00 AM, Jorge Perez wrote: > Hello, I have an application which is reaching a SIGSEGV when opengl > backend is OpenGL2 (master branch). I have traced the error and it seems to > be related to this kind of warning: > > Warning: Kitware/vtk.gitlab/Common/ExecutionModel/vtkAlgorithm.cxx, line > 1421 > vtkOpenGLTexture (0x17e1620): Attempt to get connection index 0 for input > port 0, which has 0 connections. > > The warning appears with both OpenGL and OpenGL2 backends but with the > OpenGL2 a SIGSEGV is reached. > > The SIGSEGV is because the member vtkOpenGLTexture::TextureObject is NULL > and it can be used in: > > > - OpenGL2/vtkOpenGLPolyDataMapper > > if (texture) > { > tNumComp = > vtkOpenGLTexture::SafeDownCast(texture)-> > *GetTextureObject()->*GetComponents(); > } > > - OpenGL2/vtkOpenGL2Texture.cxx > > void vtkOpenGLTexture::CopyTexImage(int x, int y, int width, int height) > { > this->*TextureObject->*CopyFromFrameBuffer(x, y, x, y, width, height); > } > > void vtkOpenGLTexture::PostRender(vtkRenderer *vtkNotUsed(ren)) > { > this->*TextureObject->*Deactivate(); > } > > I see that within there are some pice of code which test for TextureObject > and uses it if it is not NULL, but there are others which do not do the > test for NULL. > > In order to have a quick fix I have initialized the member TextureObject > to vtkTextureObject::New() instead of the value 0 (at the constructor > vtkOpenGLTexture::vtkOpenGLTexture). That solved the SIGSEGV for my > application but I'm not sure if this could be a the correct solution. > > I can submit a merge request if the change make sense. > > this->TextureObject = vtkTextureObject::New(); > > best regards, > > Jorge > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From josp.jorge at gmail.com Mon Jan 25 12:38:08 2016 From: josp.jorge at gmail.com (Jorge Perez) Date: Mon, 25 Jan 2016 18:38:08 +0100 Subject: [vtkusers] OpenGL2/vtkOpenGLTexture.cxx signal SIGSEGV, Segmentation fault In-Reply-To: References: Message-ID: Hello, after investigating the pipeline (the SEGFAULT pushed me to do it) I found how to remove the warning. The pipeline which is creating the texture is internal to vtkImagePlaneWidget. I could remove the Warning by disabling the TextureVisibility until a valid ImageData is set to the vtkImagePlaneWidget. But my concern is related to the SEGFAULT, and I wonder if vtk need to check for the NULL value that I mentioned in this thread. best regards, Jorge 2016-01-25 17:59 GMT+01:00 Aashish Chaudhary : > Are you sure that the pipeline that creates the texture is not broken as > said in the warning? Looks like whatever filter / pipeline you are using is > not producing the data as it should. And it seems to me that we could be > check for null texture object in other methods. If no one else look at it, > I will push a fix. > > - Aashish > > On Mon, Jan 25, 2016 at 6:00 AM, Jorge Perez wrote: > >> Hello, I have an application which is reaching a SIGSEGV when opengl >> backend is OpenGL2 (master branch). I have traced the error and it seems to >> be related to this kind of warning: >> >> Warning: Kitware/vtk.gitlab/Common/ExecutionModel/vtkAlgorithm.cxx, line >> 1421 >> vtkOpenGLTexture (0x17e1620): Attempt to get connection index 0 for input >> port 0, which has 0 connections. >> >> The warning appears with both OpenGL and OpenGL2 backends but with the >> OpenGL2 a SIGSEGV is reached. >> >> The SIGSEGV is because the member vtkOpenGLTexture::TextureObject is NULL >> and it can be used in: >> >> >> - OpenGL2/vtkOpenGLPolyDataMapper >> >> if (texture) >> { >> tNumComp = >> vtkOpenGLTexture::SafeDownCast(texture)-> >> *GetTextureObject()->*GetComponents(); >> } >> >> - OpenGL2/vtkOpenGL2Texture.cxx >> >> void vtkOpenGLTexture::CopyTexImage(int x, int y, int width, int height) >> { >> this->*TextureObject->*CopyFromFrameBuffer(x, y, x, y, width, height); >> } >> >> void vtkOpenGLTexture::PostRender(vtkRenderer *vtkNotUsed(ren)) >> { >> this->*TextureObject->*Deactivate(); >> } >> >> I see that within there are some pice of code which test for >> TextureObject and uses it if it is not NULL, but there are others which do >> not do the test for NULL. >> >> In order to have a quick fix I have initialized the member TextureObject >> to vtkTextureObject::New() instead of the value 0 (at the constructor >> vtkOpenGLTexture::vtkOpenGLTexture). That solved the SIGSEGV for my >> application but I'm not sure if this could be a the correct solution. >> >> I can submit a merge request if the change make sense. >> >> this->TextureObject = vtkTextureObject::New(); >> >> best regards, >> >> Jorge >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Jan 25 12:42:20 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 25 Jan 2016 12:42:20 -0500 Subject: [vtkusers] OpenGL2/vtkOpenGLTexture.cxx signal SIGSEGV, Segmentation fault In-Reply-To: References: Message-ID: On Mon, Jan 25, 2016 at 12:38 PM, Jorge Perez wrote: > Hello, after investigating the pipeline (the SEGFAULT pushed me to do it) > I found how to remove the warning. The pipeline which is creating the > texture is internal to vtkImagePlaneWidget. I could remove the Warning by > disabling the TextureVisibility until a valid ImageData is set to the > vtkImagePlaneWidget. > > But my concern is related to the SEGFAULT, and I wonder if vtk need to > check for the NULL value that I mentioned in this thread > Yes, that's the fix I was talking about. We can add a check at places to prevent seg-fault and provide a clear message. - aashish > . > > best regards, > > Jorge > > 2016-01-25 17:59 GMT+01:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Are you sure that the pipeline that creates the texture is not broken as >> said in the warning? Looks like whatever filter / pipeline you are using is >> not producing the data as it should. And it seems to me that we could be >> check for null texture object in other methods. If no one else look at it, >> I will push a fix. >> >> - Aashish >> >> On Mon, Jan 25, 2016 at 6:00 AM, Jorge Perez >> wrote: >> >>> Hello, I have an application which is reaching a SIGSEGV when opengl >>> backend is OpenGL2 (master branch). I have traced the error and it seems to >>> be related to this kind of warning: >>> >>> Warning: Kitware/vtk.gitlab/Common/ExecutionModel/vtkAlgorithm.cxx, line >>> 1421 >>> vtkOpenGLTexture (0x17e1620): Attempt to get connection index 0 for >>> input port 0, which has 0 connections. >>> >>> The warning appears with both OpenGL and OpenGL2 backends but with the >>> OpenGL2 a SIGSEGV is reached. >>> >>> The SIGSEGV is because the member vtkOpenGLTexture::TextureObject is >>> NULL and it can be used in: >>> >>> >>> - OpenGL2/vtkOpenGLPolyDataMapper >>> >>> if (texture) >>> { >>> tNumComp = >>> vtkOpenGLTexture::SafeDownCast(texture)-> >>> *GetTextureObject()->*GetComponents(); >>> } >>> >>> - OpenGL2/vtkOpenGL2Texture.cxx >>> >>> void vtkOpenGLTexture::CopyTexImage(int x, int y, int width, int height) >>> { >>> this->*TextureObject->*CopyFromFrameBuffer(x, y, x, y, width, height); >>> } >>> >>> void vtkOpenGLTexture::PostRender(vtkRenderer *vtkNotUsed(ren)) >>> { >>> this->*TextureObject->*Deactivate(); >>> } >>> >>> I see that within there are some pice of code which test for >>> TextureObject and uses it if it is not NULL, but there are others which do >>> not do the test for NULL. >>> >>> In order to have a quick fix I have initialized the member >>> TextureObject to vtkTextureObject::New() instead of the value 0 (at the >>> constructor vtkOpenGLTexture::vtkOpenGLTexture). That solved the SIGSEGV >>> for my application but I'm not sure if this could be a the correct solution. >>> >>> I can submit a merge request if the change make sense. >>> >>> this->TextureObject = vtkTextureObject::New(); >>> >>> best regards, >>> >>> Jorge >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From newcfd at yahoo.com Mon Jan 25 12:54:11 2016 From: newcfd at yahoo.com (newcfd) Date: Mon, 25 Jan 2016 10:54:11 -0700 (MST) Subject: [vtkusers] does vtkProbeFilter work with multiblock data set? In-Reply-To: References: <1453502846744-5736127.post@n5.nabble.com> Message-ID: <1453744451949-5736154.post@n5.nabble.com> thank you so much. You made my day. -- View this message in context: http://vtk.1045678.n5.nabble.com/does-vtkProbeFilter-work-with-multiblock-data-set-tp5736127p5736154.html Sent from the VTK - Users mailing list archive at Nabble.com. From yumin.yuan at kitware.com Mon Jan 25 13:46:32 2016 From: yumin.yuan at kitware.com (Yumin Yuan) Date: Mon, 25 Jan 2016 13:46:32 -0500 Subject: [vtkusers] Can we add a check to see if we have at least 2 nodes when vtkContourWidget is in Manipulate state? In-Reply-To: References: Message-ID: Hi Mengda, Since you are using the vtkImagePlaneWidget to get the points and then inserting them programmatically into the vtkContourWidget, the vtkContourWidget should not be enabled while you are doing this. It seems like when you click in the render window, the vtkContourWidget::SelectAction is also invoked (from your first email), which is not what you want. Try to disable the vtkContourWidget while you are interacting with the plane widget and inserting points into contour widget. You can enable the contour widget after you have done inserting points. HTH, Yumin On Fri, Jan 22, 2016 at 11:20 PM, Mengda Wu wrote: > OK. I did not initialize it with a polydata but just used the method > vtkContourWidget::Initialize(). I believe it means that there is no point > in it. > Then I set the state to Manipulate immediately with SetWidgetState( > vtkContourWidget::Manipulate); > > After that, using some other code, I got the point from the pick point on > vtkImagePlaneWidget and added it to vtkContourWidget with vtkContourWidget-> > GetContourRepresentation()->AddNodeAtWorldPosition(point); > > The first point is fine but it crashes when I tried to add the second > point. The crashes happened in vtkLine::Intersection with the call stack as > follows: > > vtkLine::Intersection(double * a1, double * a2, double * b1, double * b2, > double & u, double & v) Line 117 > vtkContourRepresentation::FindClosestPointOnContour(int X, int Y, double > * closestWorldPos, int * idx) Line 808 > vtkContourRepresentation::AddNodeOnContour(int X, int Y) Line 896 > > Mengda > > On Fri, Jan 22, 2016 at 3:07 PM, Yumin Yuan > wrote: > >> Hi Mengda, >> >> I will suggest to figure out why it is crashing first. Even with only one >> node, it should still work. >> >> Also, assuming you are using this method vtkContourWidget::Initialize( >> vtkPolyData * poly, int state = 1, vtkIdList *idList = NULL ), your input >> poly doesn't have any points? >> >> Yumin >> >> On Fri, Jan 22, 2016 at 10:40 AM, Mengda Wu wrote: >> >>> Hi all, >>> >>> I would like to set the state of vtkContourWidget to Manipulate at >>> initialize and add the nodes programmably instead of interactively. >>> Everything is fine but I have to check the there are at least 2 nodes in >>> the following, otherwise AddNodeOnContour will crash >>> >>> So I hope you can change the following function to >>> >>> void vtkContourWidget::SelectAction( vtkAbstractWidget *w ) >>> { >>> >>> ................ >>> ................ >>> >>> switch ( self->WidgetState ) >>> { >>> case vtkContourWidget::Start: >>> case vtkContourWidget::Define: >>> ................ >>> ................ >>> case vtkContourWidget::Manipulate: >>> { >>> if ( rep->ActivateNode( X, Y ) ) >>> { >>> ................ >>> ................ >>> } >>> else if ( rep->GetNumberOfNodes()>1 && rep->AddNodeOnContour( X, Y >>> ) ) //Ensure the number of nodes is at least 2 >>> { >>> ................ >>> ................ >>> } >>> ................ >>> ................ >>> } >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Jan 25 14:28:34 2016 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 25 Jan 2016 14:28:34 -0500 Subject: [vtkusers] Android Example JavaVTK no override found for 'vtkRenderWindow'. In-Reply-To: <1453443949251-5736094.post@n5.nabble.com> References: <1453366712260-5736068.post@n5.nabble.com> <1453443949251-5736094.post@n5.nabble.com> Message-ID: I am not an expert on Android build process by a long shot :-) I do not have any Android.mk or Application.mk files. I suspect the old way of build Android applications did not use them. Google has changed how they build applications with the move to gradle etc and we still use the old approach. If I could find them I would give them to you :-) Thanks Ken On Fri, Jan 22, 2016 at 1:25 AM, Simon <75779910 at qq.com> wrote: > Hi, Ken > Thanks for reply. > I tried and like you said nothing is pulling in the OpenGL2 libs or they > are > not being built. > I added the code and get some new error.I also check the my prev .so the > size is 5mb smaller than example build about 12mb. > > I built .so successfully, it is strange that libs not being built. > > Maybe you can post your Android.mk, Application.mk file for help. > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Android-Example-JavaVTK-no-override-found-for-vtkRenderWindow-tp5736068p5736094.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 pedropaulobmjr at hotmail.com Mon Jan 25 16:31:34 2016 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Mon, 25 Jan 2016 21:31:34 +0000 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: , , , Message-ID: I would like to thank David Gobbi for support and to all who have read but couldn't somehow help, I managed to apply the window/level and convert the image correctly, below is my code, which may be useful to someone in the future, and I believe it will: from vtk import * reader = vtkDICOMImageReader() reader.SetFileName("input.dcm") reader.Update() image = reader.GetOutput() windowlevel = vtkImageMapToWindowLevelColors() windowlevel.SetInput(reader.GetOutput()) windowlevel.SetWindow(2500) windowlevel.SetLevel(200) windowlevel.Update() shiftScaleFilter = vtkImageShiftScale() shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() shiftScaleFilter.SetInputConnection(windowlevel.GetOutputPort()) shiftScaleFilter.SetShift(-1.0*windowlevel.GetOutput().GetScalarRange()[0]) oldRange = windowlevel.GetOutput().GetScalarRange()[1] - windowlevel.GetOutput().GetScalarRange()[0] newRange = 255 shiftScaleFilter.SetScale(newRange/oldRange) shiftScaleFilter.Update() writer = vtkPNGWriter() writer.SetFileName("out.png") writer.SetInputConnection(windowlevel.GetOutputPort()) writer.Write() ________________________________ De: Pedro Paulo Enviado: domingo, 24 de janeiro de 2016 07:39 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Now I'm beginning to understand, I was not understanding some things about DICOM, now my question is, do you know how I can access the value of each pixel in the image? And if possible, change these values, for now, only access is sufficient. ________________________________ De: Pedro Paulo Enviado: s?bado, 23 de janeiro de 2016 06:58 Para: David Gobbi Assunto: Re: [vtkusers] Set window/level and convert image DICOM That's the point, I did not understand the steps I need to take to make this calculation of w/l and convert the image to png. I do not ask you to do the implementation, only tell me the steps I need to do, because I did not understand completely, the rest I try to do. ________________________________ De: David Gobbi Enviado: sexta-feira, 22 de janeiro de 2016 21:53 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, I've given you all of the information that you need. At the very most, all you have left to do is a little bit of mathematics. - David On Fri, Jan 22, 2016 at 2:44 PM, Pedro Paulo > wrote: Yeah, I used with version 6 and functioned normally, thank you, do you know how I could do these operations of window/level using my code? It is the last feature of my software and I have no idea how to do it. ________________________________ De: David Gobbi > Enviado: sexta-feira, 22 de janeiro de 2016 19:22 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, If you get that error with vtkScalarsToColors, then your VTK is very old! To use vtkScalarsToColors like this, you must use vtk 5.10, vtk 6, or vtk 7. Maybe you should keep your original code, with vtkImageShiftScale. The math to convert from "range" to "shift/scale" is shown on this page: http://www.cognitive-antics.net/mw/index.php?title=Data_range_remapping - David On Fri, Jan 22, 2016 at 12:11 PM, Pedro Paulo > wrote: I would like to set the WindowCenter and WindowWidth with which the image is converted to png, when I do the conversion using the program I sent, it makes the window and level automatically, which I do not want it to do. For your second question, yes, I want to calculate my own window and level when I convert the image. For example, I want to make a conversion with the values ww=2000, wl=250 and at another time to make a conversion into the same image with the values ww=3000, wl=150. I tried using your code like this: from vtk import * reader = vtkDICOMImageReader() reader.SetFileName("img.dcm") reader.Update() image = reader.GetOutput() ########################################################### ww = 2500 wl = 200 greymap = vtkScalarsToColors() greymap.SetRange(wl-0.5*ww, wl+0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(reader.GetOutputPort()) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() applymap.Update() ########################################################### and I got the following error: Traceback (most recent call last): File "ff.py", line 12, in greymap = vtkScalarsToColors () TypeError: this is an abstract class and can not be instantiated ________________________________ De: David Gobbi > Enviado: sexta-feira, 22 de janeiro de 2016 18:40 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, I think that I misunderstood your question. Do you want to apply the preset WindowCenter and WindowWidth that are stored in the DICOM meta data? Or do you want to compute your own window and level? - David On Thu, Jan 21, 2016 at 11:46 PM, Pedro Paulo > wrote: I'm using python to do this, my code is below, how do I add your code in mine to give right? Does your vtk-dicom package set the parameters ww/wl and do the conversion? Sorry my bad english. [😊] from vtk import * reader = vtkDICOMImageReader() reader.SetFileName('image.dcm') reader.Update() image = reader.GetOutput() shiftScaleFilter = vtkImageShiftScale() shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() shiftScaleFilter.SetInputConnection(reader.GetOutputPort()) shiftScaleFilter.SetShift(-1.0*image.GetScalarRange()[0]) oldRange = image.GetScalarRange()[1] - image.GetScalarRange()[0] newRange = 255 shiftScaleFilter.SetScale(newRange/oldRange) shiftScaleFilter.Update() writer = vtkPNGWriter() writer.SetFileName('output.jpg') writer.SetInputConnection(shiftScaleFilter.GetOutputPort()) writer.Write() ________________________________ De: David Gobbi > Enviado: quinta-feira, 21 de janeiro de 2016 22:00 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Just to clarify my previous email, all CT and PET DICOM images have RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields cannot be ignored if you plan to use WindowCenter and WindowWidth. On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi > wrote: Hi Pedro, I recommend using vtkImageMapToColors to apply a greyscale lookup table. In python, for example, it would look like this: from vtk import * greymap = vtkScalarsToColors() greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(...) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() applymap.Update() Be careful, though, because according to the DICOM standard the VOI LUT (i.e. window/level) should only be applied after the Modality LUT (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the CT images and nearly all PET images have RescaleIntercept/RescaleSlope, so if you do not take these into account, you'll get an incorrect result. You'd be safe with MRI, which does not have RescaleIntercept/Slope. So, of course, I'd suggest that you use my vtk-dicom package ;-) https://github.com/dgobbi/vtk-dicom It has a filter called vtkDICOMApplyRescale that will correctly apply the rescale information. - David On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo > wrote: Hi people, I want to convert a DICOM image to a png, but, before converting, I would like to set the parameters of Window Width and Window Center, to that the png image looks like if the parameters of ww/wl were seen in a viewer, does anyone know how could I do this? Thanks! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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: OutlookEmoji-&#X1f60a.png Type: image/png Size: 488 bytes Desc: OutlookEmoji-&#X1f60a.png URL: From david.gobbi at gmail.com Mon Jan 25 17:27:30 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 Jan 2016 15:27:30 -0700 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: Message-ID: Hi Pedro, In your code, I suspect the vtkImageShiftScale is redundant. You can remove it and get the same result. - David On Mon, Jan 25, 2016 at 2:31 PM, Pedro Paulo wrote: > I would like to thank David Gobbi for support and to all who have read but > couldn't somehow help, I managed to apply the window/level and convert the > image correctly, below is my code, which may be useful to someone in the > future, and I believe it will: > > > from vtk import * > > reader = vtkDICOMImageReader() > reader.SetFileName("input.dcm") > reader.Update() > image = reader.GetOutput() > > > windowlevel = vtkImageMapToWindowLevelColors() > windowlevel.SetInput(reader.GetOutput()) > > windowlevel.SetWindow(2500) > windowlevel.SetLevel(200) > windowlevel.Update() > > > shiftScaleFilter = vtkImageShiftScale() > shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() > shiftScaleFilter.SetInputConnection(windowlevel.GetOutputPort()) > > shiftScaleFilter.SetShift(-1.0*windowlevel.GetOutput().GetScalarRange()[0]) > oldRange = windowlevel.GetOutput().GetScalarRange()[1] - > windowlevel.GetOutput().GetScalarRange()[0] > newRange = 255 > > shiftScaleFilter.SetScale(newRange/oldRange) > shiftScaleFilter.Update() > > > writer = vtkPNGWriter() > writer.SetFileName("out.png") > writer.SetInputConnection(windowlevel.GetOutputPort()) > writer.Write() > > > ------------------------------ > *De:* Pedro Paulo > *Enviado:* domingo, 24 de janeiro de 2016 07:39 > > *Para:* Pedro Paulo > *Cc:* vtkusers at vtk.org > *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM > > > Now I'm beginning to understand, I was not understanding some things about > DICOM, now my question is, do you know how I can access the value of each > pixel in the image? And if possible, change these values, for now, only > access is sufficient. > > > ------------------------------ > *De:* Pedro Paulo > *Enviado:* s?bado, 23 de janeiro de 2016 06:58 > *Para:* David Gobbi > *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM > > > That's the point, I did not understand the steps I need to take to make > this calculation of w/l and convert the image to png. I do not ask you to > do the implementation, only tell me the steps I need to do, because I did > not understand completely, the rest I try to do. > > > ------------------------------ > *De:* David Gobbi > *Enviado:* sexta-feira, 22 de janeiro de 2016 21:53 > *Para:* Pedro Paulo > *Cc:* vtkusers at vtk.org > *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM > > Hi Pedro, > > I've given you all of the information that you need. At the very most, > all you have left to do is a little bit of mathematics. > > - David > > > On Fri, Jan 22, 2016 at 2:44 PM, Pedro Paulo > wrote: > >> Yeah, I used with version 6 and functioned normally, thank you, do you >> know how I could do these operations of window/level using my code? >> It is the last feature of my software and I have no idea how to do it. >> >> >> >> ------------------------------ >> *De:* David Gobbi >> *Enviado:* sexta-feira, 22 de janeiro de 2016 19:22 >> >> *Para:* Pedro Paulo >> *Cc:* vtkusers at vtk.org >> *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM >> >> Hi Pedro, >> >> If you get that error with vtkScalarsToColors, then your VTK is very old! >> To use vtkScalarsToColors like this, you must use vtk 5.10, vtk 6, or vtk >> 7. >> >> Maybe you should keep your original code, with vtkImageShiftScale. >> The math to convert from "range" to "shift/scale" is shown on this page: >> http://www.cognitive-antics.net/mw/index.php?title=Data_range_remapping >> >> - David >> >> >> >> On Fri, Jan 22, 2016 at 12:11 PM, Pedro Paulo > > wrote: >> >>> I would like to set the WindowCenter and WindowWidth with which the >>> image is converted to png, when I do the conversion using the program I >>> sent, it makes the window and level automatically, which I do not want >>> it to do. For your second question, yes, I want to calculate my own window >>> and level when I convert the image. >>> For example, I want to make a conversion with the values ww=2000, wl=250 >>> and at another time to make a conversion into the same image with the >>> values ww=3000, wl=150. >>> >>> >>> I tried using your code like this: >>> >>> >>> from vtk import * >>> >>> reader = vtkDICOMImageReader() >>> reader.SetFileName("img.dcm") >>> reader.Update() >>> image = reader.GetOutput() >>> >>> ########################################################### >>> ww = 2500 >>> wl = 200 >>> >>> greymap = vtkScalarsToColors() >>> greymap.SetRange(wl-0.5*ww, wl+0.5*ww) >>> >>> applymap = vtkImageMapToColors() >>> applymap.SetInputConnection(reader.GetOutputPort()) >>> applymap.SetLookupTable(greymap) >>> >>> applymap.SetOutputFormatToRGB() >>> applymap.Update() >>> ########################################################### >>> >>> and I got the following error: >>> >>> Traceback (most recent call last): >>> File "ff.py", line 12, in >>> greymap = vtkScalarsToColors () >>> TypeError: this is an abstract class and can not be instantiated >>> >>> >>> >>> ------------------------------ >>> *De:* David Gobbi >>> *Enviado:* sexta-feira, 22 de janeiro de 2016 18:40 >>> >>> *Para:* Pedro Paulo >>> *Cc:* vtkusers at vtk.org >>> *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM >>> >>> Hi Pedro, >>> >>> I think that I misunderstood your question. Do you want to apply the >>> preset >>> WindowCenter and WindowWidth that are stored in the DICOM meta data? >>> Or do you want to compute your own window and level? >>> >>> - David >>> >>> >>> On Thu, Jan 21, 2016 at 11:46 PM, Pedro Paulo < >>> pedropaulobmjr at hotmail.com> wrote: >>> >>>> I'm using python to do this, my code is below, how do I add your code >>>> in mine to give right? >>>> >>>> Does your vtk-dicom package set the parameters ww/wl and do the >>>> conversion? >>>> >>>> Sorry my bad english. [image: 😊] >>>> >>>> >>>> >>>> from vtk import * >>>> >>>> reader = vtkDICOMImageReader() >>>> reader.SetFileName('image.dcm') >>>> reader.Update() >>>> image = reader.GetOutput() >>>> >>>> shiftScaleFilter = vtkImageShiftScale() >>>> shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() >>>> shiftScaleFilter.SetInputConnection(reader.GetOutputPort()) >>>> >>>> shiftScaleFilter.SetShift(-1.0*image.GetScalarRange()[0]) >>>> oldRange = image.GetScalarRange()[1] - image.GetScalarRange()[0] >>>> newRange = 255 >>>> >>>> shiftScaleFilter.SetScale(newRange/oldRange) >>>> shiftScaleFilter.Update() >>>> >>>> writer = vtkPNGWriter() >>>> writer.SetFileName('output.jpg') >>>> writer.SetInputConnection(shiftScaleFilter.GetOutputPort()) >>>> writer.Write() >>>> >>>> >>>> >>>> ------------------------------ >>>> *De:* David Gobbi >>>> *Enviado:* quinta-feira, 21 de janeiro de 2016 22:00 >>>> *Para:* Pedro Paulo >>>> *Cc:* vtkusers at vtk.org >>>> *Assunto:* Re: [vtkusers] Set window/level and convert image DICOM >>>> >>>> Just to clarify my previous email, all CT and PET DICOM images have >>>> RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have >>>> RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields >>>> cannot be ignored if you plan to use WindowCenter and WindowWidth. >>>> >>>> On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi >>>> wrote: >>>> >>>>> Hi Pedro, >>>>> >>>>> I recommend using vtkImageMapToColors to apply a greyscale lookup >>>>> table. >>>>> In python, for example, it would look like this: >>>>> >>>>> from vtk import * >>>>> >>>>> greymap = vtkScalarsToColors() >>>>> greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) >>>>> >>>>> applymap = vtkImageMapToColors() >>>>> applymap.SetInputConnection(...) >>>>> applymap.SetLookupTable(greymap) >>>>> applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() >>>>> applymap.Update() >>>>> >>>>> Be careful, though, because according to the DICOM standard the >>>>> VOI LUT (i.e. window/level) should only be applied after the Modality >>>>> LUT >>>>> (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the >>>>> CT images and nearly all PET images have RescaleIntercept/RescaleSlope, >>>>> so if you do not take these into account, you'll get an incorrect >>>>> result. You'd >>>>> be safe with MRI, which does not have RescaleIntercept/Slope. >>>>> >>>>> So, of course, I'd suggest that you use my vtk-dicom package ;-) >>>>> https://github.com/dgobbi/vtk-dicom >>>>> It has a filter called vtkDICOMApplyRescale that will correctly apply >>>>> the >>>>> rescale information. >>>>> >>>>> - David >>>>> >>>>> >>>>> On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo < >>>>> pedropaulobmjr at hotmail.com> wrote: >>>>> >>>>>> Hi people, I want to convert a DICOM image to a png, but, before >>>>>> converting, I would like to set the parameters of Window Width and Window >>>>>> Center, to that the png image looks like if the parameters of ww/wl were >>>>>> seen in a viewer, does anyone know how could I do this? >>>>>> Thanks! >>>>>> >>>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: OutlookEmoji-&#X1f60a.png Type: image/png Size: 488 bytes Desc: not available URL: From pedropaulobmjr at hotmail.com Mon Jan 25 19:43:54 2016 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Tue, 26 Jan 2016 00:43:54 +0000 Subject: [vtkusers] Set window/level and convert image DICOM In-Reply-To: References: , Message-ID: Oops, indeed, it was the hurry, I was leaving work ... ________________________________ De: David Gobbi Enviado: segunda-feira, 25 de janeiro de 2016 22:27 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, In your code, I suspect the vtkImageShiftScale is redundant. You can remove it and get the same result. - David On Mon, Jan 25, 2016 at 2:31 PM, Pedro Paulo > wrote: I would like to thank David Gobbi for support and to all who have read but couldn't somehow help, I managed to apply the window/level and convert the image correctly, below is my code, which may be useful to someone in the future, and I believe it will: from vtk import * reader = vtkDICOMImageReader() reader.SetFileName("input.dcm") reader.Update() image = reader.GetOutput() windowlevel = vtkImageMapToWindowLevelColors() windowlevel.SetInput(reader.GetOutput()) windowlevel.SetWindow(2500) windowlevel.SetLevel(200) windowlevel.Update() shiftScaleFilter = vtkImageShiftScale() shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() shiftScaleFilter.SetInputConnection(windowlevel.GetOutputPort()) shiftScaleFilter.SetShift(-1.0*windowlevel.GetOutput().GetScalarRange()[0]) oldRange = windowlevel.GetOutput().GetScalarRange()[1] - windowlevel.GetOutput().GetScalarRange()[0] newRange = 255 shiftScaleFilter.SetScale(newRange/oldRange) shiftScaleFilter.Update() writer = vtkPNGWriter() writer.SetFileName("out.png") writer.SetInputConnection(windowlevel.GetOutputPort()) writer.Write() ________________________________ De: Pedro Paulo > Enviado: domingo, 24 de janeiro de 2016 07:39 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Now I'm beginning to understand, I was not understanding some things about DICOM, now my question is, do you know how I can access the value of each pixel in the image? And if possible, change these values, for now, only access is sufficient. ________________________________ De: Pedro Paulo > Enviado: s?bado, 23 de janeiro de 2016 06:58 Para: David Gobbi Assunto: Re: [vtkusers] Set window/level and convert image DICOM That's the point, I did not understand the steps I need to take to make this calculation of w/l and convert the image to png. I do not ask you to do the implementation, only tell me the steps I need to do, because I did not understand completely, the rest I try to do. ________________________________ De: David Gobbi > Enviado: sexta-feira, 22 de janeiro de 2016 21:53 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, I've given you all of the information that you need. At the very most, all you have left to do is a little bit of mathematics. - David On Fri, Jan 22, 2016 at 2:44 PM, Pedro Paulo > wrote: Yeah, I used with version 6 and functioned normally, thank you, do you know how I could do these operations of window/level using my code? It is the last feature of my software and I have no idea how to do it. ________________________________ De: David Gobbi > Enviado: sexta-feira, 22 de janeiro de 2016 19:22 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, If you get that error with vtkScalarsToColors, then your VTK is very old! To use vtkScalarsToColors like this, you must use vtk 5.10, vtk 6, or vtk 7. Maybe you should keep your original code, with vtkImageShiftScale. The math to convert from "range" to "shift/scale" is shown on this page: http://www.cognitive-antics.net/mw/index.php?title=Data_range_remapping - David On Fri, Jan 22, 2016 at 12:11 PM, Pedro Paulo > wrote: I would like to set the WindowCenter and WindowWidth with which the image is converted to png, when I do the conversion using the program I sent, it makes the window and level automatically, which I do not want it to do. For your second question, yes, I want to calculate my own window and level when I convert the image. For example, I want to make a conversion with the values ww=2000, wl=250 and at another time to make a conversion into the same image with the values ww=3000, wl=150. I tried using your code like this: from vtk import * reader = vtkDICOMImageReader() reader.SetFileName("img.dcm") reader.Update() image = reader.GetOutput() ########################################################### ww = 2500 wl = 200 greymap = vtkScalarsToColors() greymap.SetRange(wl-0.5*ww, wl+0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(reader.GetOutputPort()) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() applymap.Update() ########################################################### and I got the following error: Traceback (most recent call last): File "ff.py", line 12, in greymap = vtkScalarsToColors () TypeError: this is an abstract class and can not be instantiated ________________________________ De: David Gobbi > Enviado: sexta-feira, 22 de janeiro de 2016 18:40 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Hi Pedro, I think that I misunderstood your question. Do you want to apply the preset WindowCenter and WindowWidth that are stored in the DICOM meta data? Or do you want to compute your own window and level? - David On Thu, Jan 21, 2016 at 11:46 PM, Pedro Paulo > wrote: I'm using python to do this, my code is below, how do I add your code in mine to give right? Does your vtk-dicom package set the parameters ww/wl and do the conversion? Sorry my bad english. [😊] from vtk import * reader = vtkDICOMImageReader() reader.SetFileName('image.dcm') reader.Update() image = reader.GetOutput() shiftScaleFilter = vtkImageShiftScale() shiftScaleFilter.SetOutputScalarTypeToUnsignedChar() shiftScaleFilter.SetInputConnection(reader.GetOutputPort()) shiftScaleFilter.SetShift(-1.0*image.GetScalarRange()[0]) oldRange = image.GetScalarRange()[1] - image.GetScalarRange()[0] newRange = 255 shiftScaleFilter.SetScale(newRange/oldRange) shiftScaleFilter.Update() writer = vtkPNGWriter() writer.SetFileName('output.jpg') writer.SetInputConnection(shiftScaleFilter.GetOutputPort()) writer.Write() ________________________________ De: David Gobbi > Enviado: quinta-feira, 21 de janeiro de 2016 22:00 Para: Pedro Paulo Cc: vtkusers at vtk.org Assunto: Re: [vtkusers] Set window/level and convert image DICOM Just to clarify my previous email, all CT and PET DICOM images have RescaleIntercept/RescaleSlope, but for CT, it is not uncommon to have RescaleIntercept = 0 and RescaleSlope = 1. In any case, these fields cannot be ignored if you plan to use WindowCenter and WindowWidth. On Thu, Jan 21, 2016 at 2:47 PM, David Gobbi > wrote: Hi Pedro, I recommend using vtkImageMapToColors to apply a greyscale lookup table. In python, for example, it would look like this: from vtk import * greymap = vtkScalarsToColors() greymap.SetRange(wl - 0.5*ww, wl + 0.5*ww) applymap = vtkImageMapToColors() applymap.SetInputConnection(...) applymap.SetLookupTable(greymap) applymap.SetOutputFormatToRGB() # or use SetOutputFormatToLuminance() applymap.Update() Be careful, though, because according to the DICOM standard the VOI LUT (i.e. window/level) should only be applied after the Modality LUT (i.e. the RescaleIntercept/RescaleSlope). Probably around half of the CT images and nearly all PET images have RescaleIntercept/RescaleSlope, so if you do not take these into account, you'll get an incorrect result. You'd be safe with MRI, which does not have RescaleIntercept/Slope. So, of course, I'd suggest that you use my vtk-dicom package ;-) https://github.com/dgobbi/vtk-dicom It has a filter called vtkDICOMApplyRescale that will correctly apply the rescale information. - David On Thu, Jan 21, 2016 at 2:22 PM, Pedro Paulo > wrote: Hi people, I want to convert a DICOM image to a png, but, before converting, I would like to set the parameters of Window Width and Window Center, to that the png image looks like if the parameters of ww/wl were seen in a viewer, does anyone know how could I do this? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: OutlookEmoji-&#X1f60a.png Type: image/png Size: 488 bytes Desc: OutlookEmoji-&#X1f60a.png URL: From 75779910 at qq.com Mon Jan 25 19:55:59 2016 From: 75779910 at qq.com (Simon) Date: Mon, 25 Jan 2016 17:55:59 -0700 (MST) Subject: [vtkusers] Android Example JavaVTK no override found for 'vtkRenderWindow'. In-Reply-To: References: <1453366712260-5736068.post@n5.nabble.com> <1453443949251-5736094.post@n5.nabble.com> Message-ID: <1453769759485-5736160.post@n5.nabble.com> Thanks ken! -- View this message in context: http://vtk.1045678.n5.nabble.com/Android-Example-JavaVTK-no-override-found-for-vtkRenderWindow-tp5736068p5736160.html Sent from the VTK - Users mailing list archive at Nabble.com. From yihui.cao at qq.com Tue Jan 26 03:08:31 2016 From: yihui.cao at qq.com (=?gb18030?B?WWlodWkgQ2Fv?=) Date: Tue, 26 Jan 2016 16:08:31 +0800 Subject: [vtkusers] =?gb18030?b?u9i4tKO6ICBIb3cgdG8gbWFrZSBhIGltYWdlIHNs?= =?gb18030?q?ice_renderer_full_fill_in_a_renderWindow=3F?= In-Reply-To: References: Message-ID: Hi Shawn, I tried to set the bounds of camera, but it still can not full fill. Now I used setting the zoom factor of camera instead. I guess there must has some better way. Thanks. Yihui Cao ------------------ ???? ------------------ ???: "Shawn Waldon";; ????: 2016?1?25?(???) ??10:56 ???: "Yihui Cao"; ??: "vtkusers"; ??: Re: [vtkusers] How to make a image slice renderer full fill in a renderWindow? Hi Yihui, I don't know if there is a built-in easy way to do this. In the tomviz project we set the camera to orthographic projection and then set its view bounds so that the image fills the whole area (or as close as possible if the aspect ratios are different). If someone knows a better way to do this, I would like to learn about it too. HTH, Shawn On Mon, Jan 25, 2016 at 5:07 AM, Yihui Cao wrote: Dear all, When I show a image slice in a QVTKWideget, the default setting that the image shown not in the center of the window, as shown in follow figure. As shown in fig above, the red color is the background. Then, I add the code renderer->ResetCamera() that the image is shown in the center, but a subsequent problem is the image is shown in a small region, as shown in follow So, the question is how to make the image renderer full fill in the renderWindow? Thanks! Yihui Cao _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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: 4D5DD7F9 at BF365607.7F29A756 Type: application/octet-stream Size: 91364 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 9B8007A0 at BF365607.7F29A756 Type: application/octet-stream Size: 99134 bytes Desc: not available URL: From nicolas.kozlovsky at fr.thalesgroup.com Tue Jan 26 03:21:23 2016 From: nicolas.kozlovsky at fr.thalesgroup.com (KOZLOVSKY Nicolas) Date: Tue, 26 Jan 2016 09:21:23 +0100 Subject: [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D) In-Reply-To: <7A18A422C44BE34E947C1F96625E60BD08965128@EXDAG0-A1.intra.cea.fr> References: <7A18A422C44BE34E947C1F96625E60BD08965128@EXDAG0-A1.intra.cea.fr> Message-ID: Hi Thanks for the files, I looked to the files and I saw that we did the same things for openglRenderer initialization. The difference I saw is the use of the render : QVTKWidget *vtkWidget = new QVTKWidget; setCentralWidget(vtkWidget); vtkSmartPointer contextView = vtkSmartPointer::New(); contextView.Get()->SetRenderWindow(vtkWidget->GetRenderWindow()); contextView->GetRenderWindow()->SetSize(800, 800); this->resize(800, 800); In fact when in debug mode, the run stops in file vtkContextActor.cxx in function RenderOverlay this->Context->GetDevice()->SetViewportSize(vtkVector2i(size)); It seems that the context is not initialized. De : MOUSSAUD David 244079 [mailto:David.MOUSSAUD at cea.fr] Envoy? : lundi 25 janvier 2016 14:18 ? : KOZLOVSKY Nicolas; vtkusers at vtk.org Objet : RE:Error at runtime using qmake for building project (vtkContextDevice2D) Hi Nicolas, A couple weeks ago, i have joined my qmake project to an other thread (http://public.kitware.com/pipermail/vtkusers/2016-January/093650.html) Here it is again attached in this email. I'm using also vtk 6.3. Regards, David. ________________________________ De : vtkusers [vtkusers-bounces at vtk.org] de la part de KOZLOVSKY Nicolas [nicolas.kozlovsky at fr.thalesgroup.com] Envoy? : lundi 25 janvier 2016 12:57 ? : vtkusers at vtk.org Objet : [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D) Hi all I try to use QVTKWidget in a big project using qmake for building. Each time I run my code, I got this error under Linux Ubuntu 1510) and VTK 6.3 : In VTK-6.3.0/Rendering/Context2D/vtkContextDevice2D.cxx, line 27 Error: no override found for 'vtkContextDevice2D'. I read a lot about this and put in the main.cpp : #include VTK_MODULE_INIT(vtkRenderingOpenGL) VTK_MODULE_INIT(vtkInteractionStyle) I have always the same error at runtime. I try also to add this directive to .pro file: DEFINES += "\"vtkRenderingCore_AUTOINIT=1 (vtkRenderingOpenGL)\"" But again same error at runtime. If now I build the project with cmake, I have no problem everything is running fine. How can I build with qmake ??? Thanks for any clues Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: M Nicolas KOZLOVSKY.vcf Type: text/x-vcard Size: 1589 bytes Desc: M Nicolas KOZLOVSKY.vcf URL: From wulihouxiaoshuai at 163.com Tue Jan 26 04:50:35 2016 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Tue, 26 Jan 2016 02:50:35 -0700 (MST) Subject: [vtkusers] vtk import 3ds with texture Message-ID: <1453801835789-5736163.post@n5.nabble.com> Hello everyone, I am doing some works related to 3DS file. In order to loaded the relevant texture with the .3ds file, I have implemented my own vtkMy3DSImporter class by modified the vtk3DSImport class. And the texture is successfully loaded under VTK5.10 version. But it failed under VTK6.30 version, after I run the application, the display render window is black without anything. Anyone know what happened to this? Any advice is appreciated. Many thanks! Best Wishes! -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-import-3ds-with-texture-tp5736163.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Tue Jan 26 10:34:09 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 26 Jan 2016 10:34:09 -0500 Subject: [vtkusers] Grab Alt key once again. In-Reply-To: References: Message-ID: Hi Mengda, I posted a patch here: https://gitlab.kitware.com/vtk/vtk/merge_requests/1129 Mind testing it? Thanks, Cory On Fri, Jan 22, 2016 at 1:58 PM, Mengda Wu wrote: > Hi all, > > I think this issue is still not fixed in the vtk 7.0. Can anyone apply > this patch? > > Thanks, > Mengda > > On Mon, Sep 16, 2013 at 4:11 PM, Mengda Wu wrote: > >> Hi Bill, >> >> Here is the patch to QVTKInteractorAdapter.cxx (from VTK5.10.1). I >> found we can just properly add SetAltKey() without modifying the interface >> of SetEventInformation(). I tested on my machine. It worked well. >> >> Thanks, >> Mengda >> >> >> >> On Fri, Sep 6, 2013 at 5:49 PM, Bill Lorensen >> wrote: >> >>> Can you try this and provide a patch? >>> >>> >>> On Fri, Sep 6, 2013 at 5:45 PM, Mengda Wu wrote: >>> > Thanks for your reply! >>> > I think the window manager (e.g. menu bar can intercept "Alt" key) may >>> be >>> > just one of the reasons. >>> > >>> > Another reason is found to be in vtkRenderWindowInteractor.cxx/.h. If >>> you >>> > search for "AltKey" in the files, you will notice that the variable >>> has not >>> > been changed anywhere. If you search for "ControlKey", you can see the >>> > difference. >>> > >>> > My suggestion would be to add another variable "alt" in >>> > SetEventInformation(). And make "AltKey" really reflects if "alt" key >>> is >>> > received by the vtkRenderWindowInteractor. Of course, this will also >>> require >>> > changes in other locations where this function is called (e.g. in >>> > QVTKInteractorAdapter.cxx). >>> > >>> > Thanks, >>> > Mengda >>> > >>> > >>> > >>> > >>> > On Mon, Sep 2, 2013 at 4:08 PM, Bill Lorensen >> > >>> > wrote: >>> >> >>> >> Your window manager is intercepting the alt click. If you really need >>> >> it, then google for a solution on your specific platform. >>> >> >>> >> >>> >> On Mon, Sep 2, 2013 at 3:39 PM, Mengda Wu wrote: >>> >> > Hi all, >>> >> > >>> >> > I have similar problem with Alt key on Windows 7 64 bit machine. >>> Does >>> >> > anyone know why is that? My guess is the alt key event is not even >>> >> > propagated to VTK event handling. The following VTK example page >>> also >>> >> > mentioned this issue. >>> >> > >>> >> > >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/ShiftAndControl >>> >> > >>> >> > Thanks, >>> >> > Mengda >>> >> > >>> >> > >>> >> > On Mon, Feb 20, 2012 at 11:57 AM, Jes?s Sp??nola < >>> jspinola at gmail.com> >>> >> > wrote: >>> >> >> >>> >> >> Hi, >>> >> >> >>> >> >> I want to know when the "Alt" key is pressed so I use >>> >> >> vtkRenderWindowInteractor::GetAltKey(), but it seems it only >>> returns >>> >> >> true >>> >> >> when "AltGr" is pressed. When I press "Alt" key, I always get >>> false. >>> >> >> I tested under W7 x64. >>> >> >> >>> >> >> Is that a bug or should I use another method? >>> >> >> >>> >> >> Thanks in advance! >>> >> >> >>> >> >> -- >>> >> >> Jes?s Sp?nola >>> >> >> >>> >> >> _______________________________________________ >>> >> >> Powered by www.kitware.com >>> >> >> >>> >> >> Visit other Kitware open-source projects at >>> >> >> http://www.kitware.com/opensource/opensource.html >>> >> >> >>> >> >> Please keep messages on-topic and check the VTK FAQ at: >>> >> >> http://www.vtk.org/Wiki/VTK_FAQ >>> >> >> >>> >> >> Follow this link to subscribe/unsubscribe: >>> >> >> http://www.vtk.org/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 >>> >> > >>> >> > Follow this link to subscribe/unsubscribe: >>> >> > http://www.vtk.org/mailman/listinfo/vtkusers >>> >> > >>> >> >>> >> >>> >> >>> >> -- >>> >> Unpaid intern in BillsBasement at noware dot com >>> > >>> > >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wumengda at gmail.com Tue Jan 26 10:40:21 2016 From: wumengda at gmail.com (Mengda Wu) Date: Tue, 26 Jan 2016 10:40:21 -0500 Subject: [vtkusers] Why there is no public GetNumberOfSeeds() method in vtkSeedWidget? Message-ID: Hi All, I would like to know how many seeds placed in vtkSeedWidget. There is only GetSeed(int) method. I think the GetNumberOfSeeds() should be implemented. Thanks, Mengda -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Jan 26 11:02:23 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 26 Jan 2016 11:02:23 -0500 Subject: [vtkusers] Why there is no public GetNumberOfSeeds() method in vtkSeedWidget? In-Reply-To: References: Message-ID: Menda, You are right, that seems like a useful member function to add. Would you mind contributing through our GitLab-based contribution process? Details are here: https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md Thank you, Cory On Tue, Jan 26, 2016 at 10:40 AM, Mengda Wu wrote: > Hi All, > > I would like to know how many seeds placed in vtkSeedWidget. There is > only GetSeed(int) method. I think the GetNumberOfSeeds() should be > implemented. > > Thanks, > Mengda > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 yumin.yuan at kitware.com Tue Jan 26 12:47:47 2016 From: yumin.yuan at kitware.com (Yumin Yuan) Date: Tue, 26 Jan 2016 12:47:47 -0500 Subject: [vtkusers] Why there is no public GetNumberOfSeeds() method in vtkSeedWidget? In-Reply-To: References: Message-ID: I am guessing the reason may be it is available from the representation seedWidget->GetSeedRepresentation()->GetNumberOfSeeds(); Yumin On Tue, Jan 26, 2016 at 11:02 AM, Cory Quammen wrote: > Menda, > > You are right, that seems like a useful member function to add. Would you > mind contributing through our GitLab-based contribution process? Details > are here: > > https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md > > Thank you, > Cory > > On Tue, Jan 26, 2016 at 10:40 AM, Mengda Wu wrote: > >> Hi All, >> >> I would like to know how many seeds placed in vtkSeedWidget. There is >> only GetSeed(int) method. I think the GetNumberOfSeeds() should be >> implemented. >> >> Thanks, >> Mengda >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 JMelnyk at pile.com Tue Jan 26 14:43:46 2016 From: JMelnyk at pile.com (Joseph Melnyk) Date: Tue, 26 Jan 2016 19:43:46 +0000 Subject: [vtkusers] vtkChartLegend no longer dragable? Message-ID: <8841579C9694CA4196BE4138B6E2B4BF18516DC2@pdi-mail1.pdi.local> I'm slowly upgrading to vtk 6.3 from 5.10 and I am having trouble with vtkChartLegend not being dragable. The default should be drag enabled is true but even after explicitly setting it, it's not allowing me to drag the legend. This is using the code from http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot. Within the exact same Visual Studio environment, if I build/link against the 5.10 library, dragging the legend works fine; do the same with 6.3.0 and it doesn't work at all. Any ideas what may have happened? I may dig back into prior versions of vtk to see where it stopped working. Thanks Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomparker at personaltelemetry.com Tue Jan 26 15:18:31 2016 From: tomparker at personaltelemetry.com (Tom Parker) Date: Tue, 26 Jan 2016 20:18:31 +0000 Subject: [vtkusers] vtkpython on mac os? Message-ID: Hello All, I've download the latest vtkpython-7.0.0.rc2-Darwin-64bit.dmg to my mac with El Capitan and I've fought with it for hours. I can run the examples successfully, but only from the /Applications/vtkpython/bin folder, if I try from any other folder I get the message "ImportError: No module named vtk" After reading the docs, googling and reading the mailing lists I've tried every combination of PYTHONHOME, PYTHONPATH, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH I can imagine with no joy. I have gotten it working on my linux systems before so I can't imagine what I'm doing wrong. Can anyone share a set of working path and environment variables with me? Thank you, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From MEEHANBT at nv.doe.gov Tue Jan 26 15:40:33 2016 From: MEEHANBT at nv.doe.gov (Meehan, Bernard) Date: Tue, 26 Jan 2016 20:40:33 +0000 Subject: [vtkusers] vtkpython on mac os? Message-ID: This is what I am using in my ~./bash_profile, you may not need all of it, but it worked once and I just never changed it. export VTK=~/VTK export PATH=$PATH:$VTK/bin export PYTHONPATH=$PYTHONPATH:$VTK/lib/python2.7/site-packages export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$VTK/lib From: vtkusers > on behalf of Tom Parker > Date: Tuesday, January 26, 2016 at 12:18 PM To: "vtkusers at vtk.org" > Subject: [vtkusers] vtkpython on mac os? Hello All, I?ve download the latest vtkpython-7.0.0.rc2-Darwin-64bit.dmg to my mac with El Capitan and I?ve fought with it for hours. I can run the examples successfully, but only from the /Applications/vtkpython/bin folder, if I try from any other folder I get the message ?ImportError: No module named vtk? After reading the docs, googling and reading the mailing lists I?ve tried every combination of PYTHONHOME, PYTHONPATH, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH I can imagine with no joy. I have gotten it working on my linux systems before so I can?t imagine what I?m doing wrong. Can anyone share a set of working path and environment variables with me? Thank you, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindeval.ufrr at gmail.com Tue Jan 26 16:15:58 2016 From: lindeval.ufrr at gmail.com (Lindeval Lima) Date: Tue, 26 Jan 2016 17:15:58 -0400 Subject: [vtkusers] Android to Vtk-7.0 Message-ID: Hello everyone! Someone managed to install the samples for android with vtk-7.0? My build is giving errors. I appreciate any help. -- *Prof. Lindeval Fernandes de Lima* *Telefones para contato*: Celular: (095) 81215424 Coordena??o EaD: (095) 3624 - 6426 -------------- next part -------------- An HTML attachment was scrubbed... URL: From LCHEN41 at mgh.harvard.edu Tue Jan 26 16:22:17 2016 From: LCHEN41 at mgh.harvard.edu (Chen, Lifan) Date: Tue, 26 Jan 2016 21:22:17 +0000 Subject: [vtkusers] How to select a polygon region in a vtkImageData Message-ID: Hey all, I am working on a project that requires to manually extract a region from a 3D vtkImageData. I read the example on how to select a region in a vtkPolyData in VTK/Examples/Cxx/PolyData/SelectPolyData (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData)http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData However, it doesn't work for vtkImageData. Is there any method to solve this problem? Thanks, Fantasy Chen The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Jan 26 16:47:02 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 26 Jan 2016 14:47:02 -0700 Subject: [vtkusers] How to select a polygon region in a vtkImageData In-Reply-To: References: Message-ID: Hi Fantasy, VTK has "stencil" operations for extracting regions from vtkImageData. For example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData There are a few VTK test samples that show different ways to use stencils: Imaging/Core/Testing/Cxx/TestStencilWithLasso.cxx Imaging/Core/Testing/Cxx/TestStencilWithPolyDataContour.cxx Imaging/Core/Testing/Cxx/TestStencilWithPolyDataSurface.cxx Imaging/Core/Testing/Python/TestBlendStencil.py Imaging/Core/Testing/Python/TestLassoStencil.py Imaging/Core/Testing/Python/TestROIStencil.py Imaging/Core/Testing/Python/TestStencilToImage.py Imaging/Core/Testing/Python/TestStencilWithFunction.py Imaging/Core/Testing/Python/TestStencilWithImage.py Extraction of a polygonal region can be done with vtkLassoStencilSource or with vtkPolyDataToImageStecil. Cheers, - David On Tue, Jan 26, 2016 at 2:22 PM, Chen, Lifan wrote: > Hey all, > > I am working on a project that requires to manually extract a region from > a 3D vtkImageData. I read the example on how to select a region in a > vtkPolyData in VTK/Examples/Cxx/PolyData/SelectPolyData ( > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData) > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData > However, it doesn't work for vtkImageData. Is there any method to solve > this problem? > > Thanks, > Fantasy Chen > > The information in this e-mail is intended only for the person to whom it > is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindeval.ufrr at gmail.com Tue Jan 26 16:57:44 2016 From: lindeval.ufrr at gmail.com (Lindeval Lima) Date: Tue, 26 Jan 2016 17:57:44 -0400 Subject: [vtkusers] Android to Vtk-7.0 In-Reply-To: References: Message-ID: Hello everyone! Someone managed to install the samples for android with vtk-7.0? My build is giving errors. Linking CXX shared library ../libs/armeabi-v7a/libNativeVTK.so Linking CXX shared library ../libs/armeabi-v7a/libJavaVTK.so [100%] [100%] Built target NativeVTK Built target JavaVTK Scanning dependencies of target JavaVTK-ant-configure Scanning dependencies of target NativeVTK-ant-configure Error: Target id 'Error: Target id 'android-21android-21' is not valid. Use '' is not valid. Use 'androidandroid list targets' to get the target ids. list targets' to get the target ids. Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure.dir/build.make:49: recipe for target 'Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure' failed Examples/Android/JavaVTK/CMakeFiles/JavaVTK-ant-configure.dir/build.make:49: recipe for target 'Examples/Android/JavaVTK/CMakeFiles/JavaVTK-ant-configure' failed make[5]: *** [Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure] Error 1 make[5]: *** [Examples/Android/JavaVTK/CMakeFiles/JavaVTK-ant-configure] Error 1 CMakeFiles/Makefile2:3175: recipe for target 'Examples/Android/JavaVTK/CMakeFiles/JavaVTK-ant-configure.dir/all' failed make[4]: *** [Examples/Android/JavaVTK/CMakeFiles/JavaVTK-ant-configure.dir/all] Error 2 make[4]: ** Esperando que outros processos terminem. CMakeFiles/Makefile2:2963: recipe for target 'Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure.dir/all' failed make[4]: *** [Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure.dir/all] Error 2 Makefile:117: recipe for target 'all' failed make[3]: *** [all] Error 2 CMakeFiles/vtk-android.dir/build.make:106: recipe for target 'CMakeExternals/Prefix/vtk-android/src/vtk-android-stamp/vtk-android-build' failed make[2]: *** [CMakeExternals/Prefix/vtk-android/src/vtk-android-stamp/vtk-android-build] Error 2 CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/vtk-android.dir/all' failed make[1]: *** [CMakeFiles/vtk-android.dir/all] Error 2 Makefile:76: recipe for target 'all' failed make: *** [all] Error 2 I appreciate any help. 2016-01-26 17:15 GMT-04:00 Lindeval Lima : > Hello everyone! > > Someone managed to install the samples for android with vtk-7.0? My build is > giving errors. > > I appreciate any help. > > -- > > *Prof. Lindeval Fernandes de Lima* > > *Telefones para contato*: > Celular: (095) 81215424 > Coordena??o EaD: (095) 3624 - 6426 > > -- *Prof. Lindeval Fernandes de Lima* *Telefones para contato*: Celular: (095) 81215424 Coordena??o EaD: (095) 3624 - 6426 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wumengda at gmail.com Tue Jan 26 17:49:47 2016 From: wumengda at gmail.com (Mengda Wu) Date: Tue, 26 Jan 2016 17:49:47 -0500 Subject: [vtkusers] Why there is no public GetNumberOfSeeds() method in vtkSeedWidget? In-Reply-To: References: Message-ID: I see. I am good as long as there is a way to access the number of seeds. Thanks! On Tue, Jan 26, 2016 at 12:47 PM, Yumin Yuan wrote: > I am guessing the reason may be it is available from the representation > > seedWidget->GetSeedRepresentation()->GetNumberOfSeeds(); > > Yumin > > On Tue, Jan 26, 2016 at 11:02 AM, Cory Quammen > wrote: > >> Menda, >> >> You are right, that seems like a useful member function to add. Would you >> mind contributing through our GitLab-based contribution process? Details >> are here: >> >> https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md >> >> Thank you, >> Cory >> >> On Tue, Jan 26, 2016 at 10:40 AM, Mengda Wu wrote: >> >>> Hi All, >>> >>> I would like to know how many seeds placed in vtkSeedWidget. There is >>> only GetSeed(int) method. I think the GetNumberOfSeeds() should be >>> implemented. >>> >>> Thanks, >>> Mengda >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 wumengda at gmail.com Tue Jan 26 17:53:20 2016 From: wumengda at gmail.com (Mengda Wu) Date: Tue, 26 Jan 2016 17:53:20 -0500 Subject: [vtkusers] vtkPolyData::ReplaceLinkedCell does not seem to work Message-ID: Hi All, I am trying to delete one point on one end from a cell (VTK_POLY_LINE) from vtkPolyData. I tried to use ReplaceLinkedCell but it does not actually change the vtkPolyData. Why is that? What I did was (1) BuildLinks() (2) RemoveCellReference(cellId) (3) ReplaceLinkedCell (cellId, npts, pts) npts and pts are reconstructed from the old cell list minus the one point I was deleting. (4) Then I push the vtkPolyData to vtkCleanPolyData and deep copy the output Am I missing anything? Thanks, Mengda -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomparker at personaltelemetry.com Tue Jan 26 17:25:20 2016 From: tomparker at personaltelemetry.com (Tom Parker) Date: Tue, 26 Jan 2016 22:25:20 +0000 Subject: [vtkusers] vtkpython on mac os? In-Reply-To: <20160126205036.8AFBFE4936@public.kitware.com> References: <20160126205036.8AFBFE4936@public.kitware.com> Message-ID: Thank you! I'll test it and let everyone know if it works for me. From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Meehan, Bernard Sent: Tuesday, January 26, 2016 2:41 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] vtkpython on mac os? This is what I am using in my ~./bash_profile, you may not need all of it, but it worked once and I just never changed it. export VTK=~/VTK export PATH=$PATH:$VTK/bin export PYTHONPATH=$PYTHONPATH:$VTK/lib/python2.7/site-packages export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$VTK/lib From: vtkusers > on behalf of Tom Parker > Date: Tuesday, January 26, 2016 at 12:18 PM To: "vtkusers at vtk.org" > Subject: [vtkusers] vtkpython on mac os? Hello All, I've download the latest vtkpython-7.0.0.rc2-Darwin-64bit.dmg to my mac with El Capitan and I've fought with it for hours. I can run the examples successfully, but only from the /Applications/vtkpython/bin folder, if I try from any other folder I get the message "ImportError: No module named vtk" After reading the docs, googling and reading the mailing lists I've tried every combination of PYTHONHOME, PYTHONPATH, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH I can imagine with no joy. I have gotten it working on my linux systems before so I can't imagine what I'm doing wrong. Can anyone share a set of working path and environment variables with me? Thank you, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From newcfd at yahoo.com Tue Jan 26 20:50:04 2016 From: newcfd at yahoo.com (newcfd) Date: Tue, 26 Jan 2016 18:50:04 -0700 (MST) Subject: [vtkusers] Memory issue in multiblock data set rendering Message-ID: <1453859404691-5736180.post@n5.nabble.com> A multiblock data set is loaded for rendering. Rendering will use about 1GB memory. After the data set is rendered, the data set and the related pipeline instances are deleted. vtkRenderer->clear() is also called. But half of the memory use (about 500MB) is still there and not cleaned up. If the same data set is loaded again for rendering, total memory use is still 1GB, not 1.5GB. What is the cause? How can I solved the problem? I am using vtk6.3 in Debug build on Ubuntu. The same code does not have the same problem on Windows. Both Valgrind and VTK do not show any memory leak in Debug mode. -- View this message in context: http://vtk.1045678.n5.nabble.com/Memory-issue-in-multiblock-data-set-rendering-tp5736180.html Sent from the VTK - Users mailing list archive at Nabble.com. From surianiabrahman at gmail.com Wed Jan 27 00:41:22 2016 From: surianiabrahman at gmail.com (suriani ab rahman) Date: Wed, 27 Jan 2016 13:41:22 +0800 Subject: [vtkusers] read vtk file in Matlab Message-ID: Dear users, Does anyone here have an idea how to open vtk file in Matlab?Or how to import data in vtk file as a multidimensional array in Matlab. I have a face data set (polydata : x,y,z, points). Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed Jan 27 07:51:38 2016 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 27 Jan 2016 07:51:38 -0500 Subject: [vtkusers] Android to Vtk-7.0 In-Reply-To: References: Message-ID: The line "Error: Target id 'Error: Target id 'android-21android-21' is not valid. Use '' is not valid. Use 'androidandroid list targets' to get the target ids. list targets' to get the target ids." means that you are trying to build for android 21 but have not installed the android 21 SDK platform. running "android list targets" will list the ones you have installed. Likewise a listing can be found in Android studio and the Standalone SDK manager. Ken On Tue, Jan 26, 2016 at 4:57 PM, Lindeval Lima wrote: > Hello everyone! > > Someone managed to install the samples for android with vtk-7.0? My build is > giving errors. > > Linking CXX shared library ../libs/armeabi-v7a/libNativeVTK.so > Linking CXX shared library ../libs/armeabi-v7a/libJavaVTK.so > [100%] [100%] Built target NativeVTK > Built target JavaVTK > Scanning dependencies of target JavaVTK-ant-configure > Scanning dependencies of target NativeVTK-ant-configure > Error: Target id 'Error: Target id 'android-21android-21' is not valid. > Use '' is not valid. Use 'androidandroid list targets' to get the target > ids. list targets' to get the target ids. > > Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure.dir/build.make:49: > recipe for target > 'Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure' failed > Examples/Android/JavaVTK/CMakeFiles/JavaVTK-ant-configure.dir/build.make:49: > recipe for target > 'Examples/Android/JavaVTK/CMakeFiles/JavaVTK-ant-configure' failed > make[5]: *** > [Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure] Error 1 > make[5]: *** [Examples/Android/JavaVTK/CMakeFiles/JavaVTK-ant-configure] > Error 1 > CMakeFiles/Makefile2:3175: recipe for target > 'Examples/Android/JavaVTK/CMakeFiles/JavaVTK-ant-configure.dir/all' failed > make[4]: *** > [Examples/Android/JavaVTK/CMakeFiles/JavaVTK-ant-configure.dir/all] Error 2 > make[4]: ** Esperando que outros processos terminem. > CMakeFiles/Makefile2:2963: recipe for target > 'Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure.dir/all' > failed > make[4]: *** > [Examples/Android/NativeVTK/CMakeFiles/NativeVTK-ant-configure.dir/all] > Error 2 > Makefile:117: recipe for target 'all' failed > make[3]: *** [all] Error 2 > CMakeFiles/vtk-android.dir/build.make:106: recipe for target > 'CMakeExternals/Prefix/vtk-android/src/vtk-android-stamp/vtk-android-build' > failed > make[2]: *** > [CMakeExternals/Prefix/vtk-android/src/vtk-android-stamp/vtk-android-build] > Error 2 > CMakeFiles/Makefile2:60: recipe for target > 'CMakeFiles/vtk-android.dir/all' failed > make[1]: *** [CMakeFiles/vtk-android.dir/all] Error 2 > Makefile:76: recipe for target 'all' failed > make: *** [all] Error 2 > > > I appreciate any help. > > > > 2016-01-26 17:15 GMT-04:00 Lindeval Lima : > >> Hello everyone! >> >> Someone managed to install the samples for android with vtk-7.0? My build is >> giving errors. >> >> I appreciate any help. >> >> -- >> >> *Prof. Lindeval Fernandes de Lima* >> >> *Telefones para contato*: >> Celular: (095) 81215424 >> Coordena??o EaD: (095) 3624 - 6426 >> >> > > > -- > > *Prof. Lindeval Fernandes de Lima* > > *Telefones para contato*: > Celular: (095) 81215424 > Coordena??o EaD: (095) 3624 - 6426 > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 guillaume.jacquenot at gmail.com Wed Jan 27 09:17:59 2016 From: guillaume.jacquenot at gmail.com (Guillaume Jacquenot) Date: Wed, 27 Jan 2016 15:17:59 +0100 Subject: [vtkusers] Single VTK file containing time varying attributes Message-ID: Hello Vtk users! I am wondering if it is possible to merge XML VTK files containing the same geometry with different time attributes into a single XML VTK file? I would like the following PVD file to use only one vtp file that contains my time dependant data. My objective is to avoid having thousands of files for time simulation (One for each time step). Maybe VTK XML files are not suited for this? Is ExodusII more suited? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From newcfd at yahoo.com Wed Jan 27 11:31:10 2016 From: newcfd at yahoo.com (newcfd) Date: Wed, 27 Jan 2016 09:31:10 -0700 (MST) Subject: [vtkusers] Memory issue in multiblock data set rendering In-Reply-To: <1453859404691-5736180.post@n5.nabble.com> References: <1453859404691-5736180.post@n5.nabble.com> Message-ID: <1453912270319-5736185.post@n5.nabble.com> does VTK keep some memory or not tell LInux properly after memory release? -- View this message in context: http://vtk.1045678.n5.nabble.com/Memory-issue-in-multiblock-data-set-rendering-tp5736180p5736185.html Sent from the VTK - Users mailing list archive at Nabble.com. From newcfd at yahoo.com Wed Jan 27 11:43:02 2016 From: newcfd at yahoo.com (newcfd) Date: Wed, 27 Jan 2016 09:43:02 -0700 (MST) Subject: [vtkusers] Memory issue in multiblock data set rendering In-Reply-To: <1453859404691-5736180.post@n5.nabble.com> References: <1453859404691-5736180.post@n5.nabble.com> Message-ID: <1453912982652-5736186.post@n5.nabble.com> vtkTecplotReader * reader = vtkTecplotReader::New(); reader->SetFileName( "test.dat" ); reader->Update(); if the following line is used, (from http://www.vtk.org/Wiki/VTK_FAQ) reader->GetOutput()->GlobalReleaseDataFlagOn(); the data loaded can not be rendered anymore. I got an empty view. -- View this message in context: http://vtk.1045678.n5.nabble.com/Memory-issue-in-multiblock-data-set-rendering-tp5736180p5736186.html Sent from the VTK - Users mailing list archive at Nabble.com. From marcus.hanwell at kitware.com Wed Jan 27 13:01:29 2016 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Wed, 27 Jan 2016 13:01:29 -0500 Subject: [vtkusers] vtkChartLegend no longer dragable? In-Reply-To: <8841579C9694CA4196BE4138B6E2B4BF18516DC2@pdi-mail1.pdi.local> References: <8841579C9694CA4196BE4138B6E2B4BF18516DC2@pdi-mail1.pdi.local> Message-ID: On Tue, Jan 26, 2016 at 2:43 PM, Joseph Melnyk wrote: > I?m slowly upgrading to vtk 6.3 from 5.10 and I am having trouble with > vtkChartLegend not being dragable. The default should be drag enabled is > true but even after explicitly setting it, it?s not allowing me to drag the > legend. This is using the code from > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot. Within the > exact same Visual Studio environment, if I build/link against the 5.10 > library, dragging the legend works fine; do the same with 6.3.0 and it > doesn?t work at all. > I am not aware of any change to disable that feature, it may be a regression (I don't work on the chart code as much anymore). > > Any ideas what may have happened? I may dig back into prior versions of vtk > to see where it stopped working. > I would be interested, I would like to keep this working as I think it is a nice feature. Thanks, Marcus From wumengda at gmail.com Wed Jan 27 13:39:37 2016 From: wumengda at gmail.com (Mengda Wu) Date: Wed, 27 Jan 2016 13:39:37 -0500 Subject: [vtkusers] vtkPolyData::ReplaceLinkedCell does not seem to work In-Reply-To: References: Message-ID: Tried to debug a little bit. It seems that ReplaceLinkedCell or ReplaceCell can only replace with the same number points. It does not or cannot change the size of one cell in the vtkCellArray due to the definition of vtkCellArray. On Tue, Jan 26, 2016 at 5:53 PM, Mengda Wu wrote: > Hi All, > > I am trying to delete one point on one end from a cell (VTK_POLY_LINE) > from vtkPolyData. > > I tried to use ReplaceLinkedCell but it does not actually change > the vtkPolyData. Why is that? > > What I did was > (1) BuildLinks() > (2) RemoveCellReference(cellId) > (3) ReplaceLinkedCell (cellId, npts, pts) npts and pts are > reconstructed from the old cell list minus the one point I was deleting. > (4) Then I push the vtkPolyData to vtkCleanPolyData and deep copy the > output > > Am I missing anything? > > Thanks, > Mengda > -------------- next part -------------- An HTML attachment was scrubbed... URL: From JMelnyk at pile.com Wed Jan 27 13:56:02 2016 From: JMelnyk at pile.com (Joseph Melnyk) Date: Wed, 27 Jan 2016 18:56:02 +0000 Subject: [vtkusers] vtkChartLegend no longer dragable? In-Reply-To: References: <8841579C9694CA4196BE4138B6E2B4BF18516DC2@pdi-mail1.pdi.local> Message-ID: <8841579C9694CA4196BE4138B6E2B4BF185183A9@pdi-mail1.pdi.local> I agree that it's a great feature. It's unfortunately broken in 6.1.0 as well. There are some minor code changes between 5.10.0 and 6.3.0 but I don't see why they'd cause this. Ultimately I was able to find a workaround. I just inherited from vtkChartLegend and set "HorizontalAlignment = vtkChartLegend::CUSTOM" within the derived MouseMoveEvent before calling the same event in the base class. Just setting this value once when creating the chart didn't work, but setting it here works fine. Joe -----Original Message----- From: Marcus D. Hanwell [mailto:marcus.hanwell at kitware.com] Sent: Wednesday, January 27, 2016 1:01 PM To: Joseph Melnyk Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkChartLegend no longer dragable? On Tue, Jan 26, 2016 at 2:43 PM, Joseph Melnyk wrote: > I?m slowly upgrading to vtk 6.3 from 5.10 and I am having trouble with > vtkChartLegend not being dragable. The default should be drag enabled > is true but even after explicitly setting it, it?s not allowing me to > drag the legend. This is using the code from > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot. Within > the exact same Visual Studio environment, if I build/link against the > 5.10 library, dragging the legend works fine; do the same with 6.3.0 > and it doesn?t work at all. > I am not aware of any change to disable that feature, it may be a regression (I don't work on the chart code as much anymore). > > Any ideas what may have happened? I may dig back into prior versions > of vtk to see where it stopped working. > I would be interested, I would like to keep this working as I think it is a nice feature. Thanks, Marcus From LCHEN41 at mgh.harvard.edu Wed Jan 27 14:22:48 2016 From: LCHEN41 at mgh.harvard.edu (Chen, Lifan) Date: Wed, 27 Jan 2016 19:22:48 +0000 Subject: [vtkusers] =?gb2312?b?tPC4tDogIEhvdyB0byBzZWxlY3QgYSBwb2x5Z29u?= =?gb2312?b?IHJlZ2lvbiBpbiBhIHZ0a0ltYWdlRGF0YQ==?= In-Reply-To: References: , Message-ID: Hey David, I use stencil and it works well, however, the dimension index of the output of stencil remain unchanged which I supposed to change according to the size of region I choose and there is a gray part around the region I choose when displaying in the 3-D viewer. Do you what is the problem? Thanks, Fantasy ________________________________ ???: David Gobbi [david.gobbi at gmail.com] ????: 2016?1?26? 16:47 ???: Chen, Lifan ??: vtkusers at vtk.org ??: Re: [vtkusers] How to select a polygon region in a vtkImageData Hi Fantasy, VTK has "stencil" operations for extracting regions from vtkImageData. For example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData There are a few VTK test samples that show different ways to use stencils: Imaging/Core/Testing/Cxx/TestStencilWithLasso.cxx Imaging/Core/Testing/Cxx/TestStencilWithPolyDataContour.cxx Imaging/Core/Testing/Cxx/TestStencilWithPolyDataSurface.cxx Imaging/Core/Testing/Python/TestBlendStencil.py Imaging/Core/Testing/Python/TestLassoStencil.py Imaging/Core/Testing/Python/TestROIStencil.py Imaging/Core/Testing/Python/TestStencilToImage.py Imaging/Core/Testing/Python/TestStencilWithFunction.py Imaging/Core/Testing/Python/TestStencilWithImage.py Extraction of a polygonal region can be done with vtkLassoStencilSource or with vtkPolyDataToImageStecil. Cheers, - David On Tue, Jan 26, 2016 at 2:22 PM, Chen, Lifan > wrote: Hey all, I am working on a project that requires to manually extract a region from a 3D vtkImageData. I read the example on how to select a region in a vtkPolyData in VTK/Examples/Cxx/PolyData/SelectPolyData (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData)http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData However, it doesn't work for vtkImageData. Is there any method to solve this problem? Thanks, Fantasy Chen The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jan 27 14:39:44 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 27 Jan 2016 12:39:44 -0700 Subject: [vtkusers] =?utf-8?b?562U5aSNOiAgSG93IHRvIHNlbGVjdCBhIHBvbHlnb24g?= =?utf-8?q?region_in_a_vtkImageData?= In-Reply-To: References: Message-ID: Hi Fantasy, I don't know what you mean by "dimension index". When you display in the 3D viewer, make sure the window/level are set correctly in the viewer. The outside of the region is given a value of zero, but zero can show as gray depending on how the window/level is set. - David On Wed, Jan 27, 2016 at 12:22 PM, Chen, Lifan wrote: > Hey David, > > I use stencil and it works well, however, the dimension index of the > output of stencil remain unchanged which I supposed to change according to > the size of region I choose and there is a gray part around the region I > choose when displaying in the 3-D viewer. Do you what is the problem? > > Thanks, > Fantasy > ------------------------------ > *???:* David Gobbi [david.gobbi at gmail.com] > *????:* 2016?1?26? 16:47 > *???:* Chen, Lifan > *??:* vtkusers at vtk.org > *??:* Re: [vtkusers] How to select a polygon region in a vtkImageData > > Hi Fantasy, > > VTK has "stencil" operations for extracting regions from vtkImageData. > For example: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData > > There are a few VTK test samples that show different ways to use stencils: > > Imaging/Core/Testing/Cxx/TestStencilWithLasso.cxx > Imaging/Core/Testing/Cxx/TestStencilWithPolyDataContour.cxx > Imaging/Core/Testing/Cxx/TestStencilWithPolyDataSurface.cxx > > Imaging/Core/Testing/Python/TestBlendStencil.py > Imaging/Core/Testing/Python/TestLassoStencil.py > Imaging/Core/Testing/Python/TestROIStencil.py > Imaging/Core/Testing/Python/TestStencilToImage.py > Imaging/Core/Testing/Python/TestStencilWithFunction.py > Imaging/Core/Testing/Python/TestStencilWithImage.py > > Extraction of a polygonal region can be done with vtkLassoStencilSource > or with vtkPolyDataToImageStecil. > > Cheers, > - David > > > > On Tue, Jan 26, 2016 at 2:22 PM, Chen, Lifan > wrote: > >> Hey all, >> >> I am working on a project that requires to manually extract a region from >> a 3D vtkImageData. I read the example on how to select a region in a >> vtkPolyData in VTK/Examples/Cxx/PolyData/SelectPolyData ( >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData) >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData >> However, it doesn't work for vtkImageData. Is there any method to solve >> this problem? >> >> Thanks, >> Fantasy Chen >> >> The information in this e-mail is intended only for the person to whom it >> is >> addressed. If you believe this e-mail was sent to you in error and the >> e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you >> in error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Wed Jan 27 16:01:33 2016 From: andy.bauer at kitware.com (Andy Bauer) Date: Wed, 27 Jan 2016 16:01:33 -0500 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> <569EB27E.3050803@polytechnique.edu> <569F6057.3000208@polytechnique.edu> <56A236B5.4030305@polytechnique.edu> Message-ID: Hi Martin, We're working on some infrastructure to document API changes. I'd like to wait to merge your changes for switching the tensor order output for vtkCellDerivatives until that's done. That way it will be easier to notify everyone of this change (even though it's not technically changing the API, just how the output should be interpreted). We're hoping it will be ready in a week. Is that ok to wait for merging your changes into VTK master? Thanks, Andy On Fri, Jan 22, 2016 at 2:42 PM, Andy Bauer wrote: > Hi Martin, > > In case you didn't receive the email notice, your changes have been merged > into master. Thanks for your contribution to VTK! This looks like it was > your first contribution. I hope it wasn't too onerous to get done but the > community works hard to make sure that the code is high quality and well > tested. > > Best regards, > Andy > > On Fri, Jan 22, 2016 at 10:22 AM, Andy Bauer > wrote: > >> It looks like vtkCellDerivates is the only class that uses vtkTensor. >> When we switch vtkCellDerivatives to C ordering I think we'll just remove >> vtkTensor. Less code with the same functionality and probably better >> efficiency -- tough to beat that :) >> >> On Fri, Jan 22, 2016 at 9:03 AM, Martin Genet < >> martin.genet at polytechnique.edu> wrote: >> >>> Sounds good. >>> >>> However, here the culprit seems to be vtkTensor, which stores the data >>> in column. vtkCellDerivatives simply fills a vtkTensor (filling is storage >>> independent, since one provides the actual components), and then returns >>> the underlying vector. >>> >>> One option would be to make vtkCellDerivatives independent of vtkTensor. >>> >>> But I think it would be better to correct the storage in vtkTensor. >>> Actually, it seems that vtkTensor is used only in vtkCellDerivatives, so it >>> would not change the rest of the library. >>> >>> Let me know what you would prefer. >>> >>> Martin >>> >>> >>> On 20/01/2016 19:19, Andy Bauer wrote: >>> >>> I've looked at this a bit more along with others and unfortunately >>> there's some inconsistency in VTK for tensor ordering. If you look at the >>> vtkCell::Derivatives() documentation ( >>> http://www.vtk.org/doc/nightly/html/classvtkCell.html#aff3d8332e9d7d556a9d2e9f91173d068), >>> it's using a C/row-major ordering. There's some places in that have done >>> row-major and others that have done column major. For the most part it >>> hasn't been an issue since many/most of the uses of tensor have been >>> symmetric but it should be fixed regardless. >>> >>> I've entered a mantis issue for this at >>> >>> http://www.paraview.org/Bug/view.php?id=15949. >>> >>> Would you be willing to go in and make the change to vtkCellDerivatives? >>> I'm hoping to go through your changes to that class sometime today. >>> >>> On Wed, Jan 20, 2016 at 7:52 AM, Andy Bauer >>> wrote: >>> >>>> Hmm, in fact it does. I was looking at vtkGradientFilter instead of >>>> vtkCellDerivatives for the ordering of the output of the gradient of a >>>> vector. I think the output order is supposed to be fortran/column-major >>>> ordering like vtkCellDerivatives instead of C/row-major ordering like >>>> vtkGradientFilter. Well, you can see the confusion that crops up and maybe >>>> that's why vtkTensors was done that way. In any case, let me verify for >>>> sure which way is correct and get back to you on this. >>>> >>>> On Wed, Jan 20, 2016 at 5:24 AM, Martin Genet < >>>> martin.genet at polytechnique.edu> wrote: >>>> >>>>> Thanks Andy. >>>>> >>>>> Well, I might be wrong but I'm under the impression that >>>>> vtkCellDerivatives returns [du/dx, dv/dx, dw/dx, du/dy, dv/dy, ...]. Am I >>>>> wrong? >>>>> >>>>> Martin >>>>> >>>>> >>>>> On 20/01/2016 03:07, Andy Bauer wrote: >>>>> >>>>> Hi Martin, >>>>> >>>>> I haven't looked closely enough at vtkTensors (I don't know if I even >>>>> knew about it before today) but indeed the ordering output in >>>>> vtkCellDerivatives for a velocity vector {u,v,w} needs to be [du/dx, du/dy, >>>>> du/dz, dv/dx, dv/dy, ...] like you have it. I'm not sure when vtkTensors is >>>>> ordered the way it is. >>>>> >>>>> Cheers, >>>>> Andy >>>>> >>>>> On Tue, Jan 19, 2016 at 5:02 PM, Martin Genet < >>>>> martin.genet at polytechnique.edu> wrote: >>>>> >>>>>> Thanks Andy. >>>>>> >>>>>> I need to clarify something: the Derivatives function of vtkCell >>>>>> objects returns a derivs vector containing the components of the gradient >>>>>> of some vector field defined at the cell nodes; the components are ordered >>>>>> in row (as usually in C, i.e., (0,0), (0,1), (0,2), (1,0), (1,1), (1,2), >>>>>> (2,0), (2,1), (2,2)). Now in the CellDerivatives filter the derivs vector >>>>>> is used to fill a vtkTensors, and then the filter returns the internal >>>>>> vector storing the data of the vtkTensors. However, the components of the >>>>>> vtkTensors are ordered in column (as usually in fortran, i.e., (0,0), >>>>>> (1,0), (2,0), (0,1), (1,1), (2,1), (0,2), (1,2), (2,2)). Is it on purpose >>>>>> that the vtkTensors store their data in column and not in row? Isn't it a >>>>>> little dangerous to mix both storage in the code? Thanks for the >>>>>> clarification! >>>>>> >>>>>> Martin >>>>>> >>>>>> >>>>>> On 18/01/2016 13:32, Andy Bauer wrote: >>>>>> >>>>>> Hi Martin, >>>>>> >>>>>> Thanks for following up on this. I found the merge request now and >>>>>> will look at this. In general, developers should request others to do a >>>>>> code review on this. This can be done via something like "@acbauer please >>>>>> review this" or sending an email on this VTK list with a link to the merge >>>>>> request. >>>>>> >>>>>> Best, >>>>>> Andy >>>>>> >>>>>> On Mon, Jan 18, 2016 at 6:23 AM, Martin Genet < >>>>>> martin.genet at polytechnique.edu> >>>>>> wrote: >>>>>> >>>>>>> Hi Andy, >>>>>>> >>>>>>> I followed the directions, and submitted a patch (19 days ago), but >>>>>>> haven't heard anything back. >>>>>>> >>>>>>> In GitLab the merge requests counter is at 0, but when I try to >>>>>>> create a new merge request from my commit, it tells the merge request >>>>>>> already exists. Is it being reviewed somewhere? Thanks! >>>>>>> >>>>>>> Martin >>>>>>> >>>>>>> >>>>>>> On 29/12/2015 13:22, Andy Bauer wrote: >>>>>>> >>>>>>> Hi Martin, >>>>>>> >>>>>>> This patch makes sense. It would need a test if you want to get your >>>>>>> changes into VTK. The directions for contributing to VTK are at >>>>>>> >>>>>>> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md >>>>>>> . >>>>>>> >>>>>>> Cheers, >>>>>>> Andy >>>>>>> >>>>>>> On Mon, Dec 28, 2015 at 5:50 PM, Martin Genet < >>>>>>> martin.genet at polytechnique.edu> >>>>>>> wrote: >>>>>>> >>>>>>>> Thanks Andy. >>>>>>>> >>>>>>>> What about simply adding another mode, e.g. >>>>>>>> SetTensorModeToComputeGreenLagrangeStrain, to the vtkCellDerivatives >>>>>>>> filter? Would the attached patch make sense? >>>>>>>> >>>>>>>> Martin >>>>>>>> >>>>>>>> On 28/12/2015 14:12, Andy Bauer wrote: >>>>>>>> >>>>>>>> Hi Martin, >>>>>>>> >>>>>>>> Changing the name of the SetTensorModeToComputeStrain method to >>>>>>>> something else would break backward compatibility which is generally >>>>>>>> avoided in VTK. Other options for this include deriving a class to compute >>>>>>>> non-linear strain from vtkCellDerivatives if it shares enough of the >>>>>>>> algorithm with the linearized version or maybe just creating a new filter. >>>>>>>> >>>>>>>> Cheers, >>>>>>>> Andy >>>>>>>> >>>>>>>> On Sat, Dec 26, 2015 at 4:36 PM, Martin Genet < >>>>>>>> martin.genet at polytechnique.edu> >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Dear VTK users: >>>>>>>>> >>>>>>>>> I realize that the vtkCellDerivatives filter, when >>>>>>>>> SetTensorModeToComputeStrain is activated, returns the symmetric part of >>>>>>>>> the gradient of the input vector field, which is the linearized strain >>>>>>>>> tensor, i.e., not a proper measure of deformation when large displacements >>>>>>>>> are involved. Would that make sense to have two different modes, >>>>>>>>> SetTensorModeToComputeLinearizedStrain or >>>>>>>>> SetTensorModeToComputeSymmetricGradient, and SetTensorModeToComputeStrain >>>>>>>>> or SetTensorModeToComputeGreenLagrangeStrain? 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 audrius at tomographix.com Wed Jan 27 16:15:58 2016 From: audrius at tomographix.com (Audrius Stundzia) Date: Wed, 27 Jan 2016 16:15:58 -0500 Subject: [vtkusers] Fwd: Re: Heap corruption | vtkLookupTable? Message-ID: <1453929358.1992080.504481970.6B3EF97D@webmail.messagingengine.com> Hi Cory, Sorry that I did not respond earlier. Overlooked your e-mail. Thank you for your reply Now using OS: Windows 10 x64 IDE: MS VS 2015 VTK: 7.0.0.rc2 x64 build Still receiving the same error message at the same place: HEAP CORRUPTION DETECTED: after Normal block (#218683) at 0x00000286C6D22350. CRT detected that the application wrote to memory after end of heap buffer. No idea how to create a?CMakeLists.txt?file. Please advise. Regards, Audrius On 8 November 2015 at 15:26, Cory Quammen wrote: > Hi Audrius, > > That is indeed suspicious. I don't immediately see anything in your > code that would explain the crash. Would you mind attaching a > compilable example program with accompanying CMakeLists.txt file? That > will make it easier to take a look. > > Thanks, Cory > > On Thu, Nov 5, 2015 at 11:19 PM, Audrius Stundzia > wrote: >> __ >> Dear All, >> >> OS: Windows 10 x64 IDE: MS VS 2015 VTK: 6.3.0 x64 build >> >> I am getting a "heap corruption" message when a vtkRenderWindow is >> closed and the vtkRenderWindowInteractor is stopped. Specifically >> the line >> >> renderWindowInteractor->TerminateApp(); >> >> in a callback function >> >> static void KeyPressCallbackFunction >> >> The relevant code fragments, appended below, are conventional texture >> mapping of an image to a plane. This "heap corruption" did not occur >> in Windows 8.1 x64; MS VS 2010; VTK 5.10.1 x64 build >> >> From the call stack it appears to due to a problem with deleting an >> instantiation of vtkLoopupTable: >> >> vtkCommonCore-6.3.dll!vtkDataArrayTemplate> char>::DeleteArray() Line 214 C++ vtkCommonCore- >> 6.3.dll!vtkDataArrayTemplate> char>::~vtkDataArrayTemplate() Line 92 C++ vtkCommonCore- >> 6.3.dll!vtkUnsignedCharArray::~vtkUnsignedCharArray() Line 37 C++ >> [External Code] vtkCommonCore- >> 6.3.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase * __formal, >> int check) Line 232 C++ vtkCommonCore- >> 6.3.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o, int check) >> Line 901 C++ vtkCommonCore- >> 6.3.dll!vtkObjectBase::UnRegister(vtkObjectBase * o) Line 190 C++ vtkCommonCore- >> 6.3.dll!vtkLookupTable::~vtkLookupTable() Line 89C++ [External Code] >> vtkCommonCore-6.3.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase >> * __formal, int check) Line 232 C++ vtkCommonCore- >> 6.3.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o, int check) >> Line 901 C++ vtkCommonCore- >> 6.3.dll!vtkObjectBase::UnRegister(vtkObjectBase * o) Line 190 C++ vtkCommonCore- >> 6.3.dll!vtkSmartPointerBase::~vtkSmartPointerBase() Line 62 C++ >> [External Code] >> >> Any insight would be appreciated. >> >> Regards, >> >> Audrius >> >> //--------------------------------------- // Start: relevant code >> fragment //--------------------------------------- >> >> { >> . . . >> >> vtkSmartPointer?camera_ = >> vtkSmartPointer::New(); >> >> camera_->SetPosition( 0.0, 0.0, -1.0); camera_->SetRoll(180.0); >> >> camera_->Zoom( zoomFactor_ ); >> >> //--------------- vtkSmartPointer?renderer_ = >> vtkSmartPointer::New(); renderer_- >> >SetActiveCamera(camera_); renderer_->SetBackground( 0.0, 0.0, 0.0 ); >> >> //--------------- vtkSmartPointer?renderWindow_ = >> vtkSmartPointer::New(); renderWindow_->AddRenderer( >> renderer_ ); renderWindow_->SetSize ( winSizeX_ , winSizeY_ ); renderWindow_- >> >SetPosition ( winPosX_ , winPosY_ ); renderWindow_->SwapBuffersOn(); >> >> //--------------- vtkSmartPointer >> renderWindowInteractor_ = >> vtkSmartPointer::New(); renderWindowInteractor_- >> >SetRenderWindow( renderWindow_); >> >> vtkSmartPointer?keyPressCallback_ = >> vtkSmartPointer::New(); keyPressCallback_- >> >SetCallback( advDiagnosticDisplay::KeyPressCallbackFunction); >> >> renderWindowInteractor_->AddObserver ( vtkCommand::KeyPressEvent , >> keyPressCallback_ ); >> >> // Build a colour map vtkSmartPointer colourMap_ = >> vtkSmartPointer::New(); >> InitializeColourMap(colourMap_); >> >> // Apply the texture vtkSmartPointer texture_ = >> vtkSmartPointer::New(); if(interpolation_) texture_- >> >InterpolateOn(); else texture_->InterpolateOff(); texture_- >> >RepeatOff(); texture_->SetQualityTo32Bit(); texture_- >> >MapColorScalarsThroughLookupTableOn(); texture_->SetInputData( imageReslice_- >> >GetOutput()); texture_->SetLookupTable( colourMap_); >> >> //--------------- vtkSmartPointer planeSource_ = >> vtkSmartPointer::New(); planeSource_->SetResolution( >> 1, 1 ); planeSource_->SetPoint1( eX_, 0.0, 0.0); planeSource_- >> >SetPoint2( 0.0, eY_, 0.0); planeSource_->SetCenter( centre_.data()); >> planeSource_->SetNormal( 0.0, 0.0, 1.0); planeSource_->Update(); >> >> //--------------- vtkSmartPointer mapper_ = >> vtkSmartPointer::New(); mapper_- >> >ScalarVisibilityOff(); mapper_->SetInputData( planeSource_- >> >GetOutput()); mapper_->Update(); >> >> //--------------- vtkSmartPointer property_ = >> vtkSmartPointer::New(); property_->SetOpacity( >> opacity_); >> >> //--------------- vtkSmartPointer actor_ = >> vtkSmartPointer::New(); actor_->SetProperty( property_ ); >> actor_->SetTexture( texture_ ); actor_->SetMapper( mapper_ ); >> >> //--------------- renderer_->AddActor(actor_); >> >> renderer_->ResetCamera(); >> >> renderWindow_->Render(); renderWindow_->SetWindowName( "Window name >> here"); >> >> renderWindowInteractor_->Start(); >> >> . . . >> >> } >> >> void InitializeColourMap(vtkSmartPointer& colourMap) >> { //--------------- colourMap->SetNumberOfColors(nImageColours_ + 1); >> colourMap->SetTableRange (minScalar_ , maxScalar_); >> >> if (colour_) { colourMap->SetHueRange(0.666667f, 0.0f); colourMap- >> >Build(); colourMap->SetTableValue(0, 0.0f, 0.0f, 0.0f, 0.0f); } else >> { colourMap->SetHueRange(0.5f, 0.5f); colourMap- >> >SetSaturationRange(0.0f, 1.0f); colourMap->Build(); colourMap- >> >SetTableValue(0, 0.0f, 0.0f, 0.0f, 0.0f); >> >> for (int iC = 1; iC <= nImageColours_; ++iC) { const float val = >> static_cast(iC) / static_cast(nImageColours_ + 1); colourMap- >> >SetTableValue (iC , val , val , val , 1.0f); } } } >> >> >> // // vtk callback function: stop rendering and close window // >> >> static void KeyPressCallbackFunction ( vtkObject* caller , long >> unsigned int vtkNotUsed(eventId) , void* vtkNotUsed(clientData) , >> void* vtkNotUsed(callData)) { vtkRenderWindowInteractor* >> renderWindowInteractor = >> dynamic_cast(caller); >> >> // Close the window vtkRenderWindow* renderWindow = renderWindowInteractor- >> >GetRenderWindow(); renderWindow->Finalize(); >> >> // Stop the interactor // When the next line is executed, the heap >> corruption message is generated renderWindowInteractor- >> >TerminateApp(); >> >> std::cout << "Window closed." << std::endl; } >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 LCHEN41 at mgh.harvard.edu Wed Jan 27 16:22:45 2016 From: LCHEN41 at mgh.harvard.edu (Chen, Lifan) Date: Wed, 27 Jan 2016 21:22:45 +0000 Subject: [vtkusers] =?gb2312?b?tPC4tDogtPC4tDogIEhvdyB0byBzZWxlY3QgYSBw?= =?gb2312?b?b2x5Z29uIHJlZ2lvbiBpbiBhIHZ0a0ltYWdlRGF0YQ==?= In-Reply-To: References: , Message-ID: I mean the size in in three dimensions of the output of the stencil is still the same as the input, for example, if the original size of the image data is 512x512x312, the output of the stencil is still 512x512x312. However, I only need the region that has been extracted from the original image data. Is there any method to minimize the size of the output to the extracted region? Fantasy ________________________________ ???: David Gobbi [david.gobbi at gmail.com] ????: 2016?1?27? 14:39 ???: Chen, Lifan ??: vtkusers at vtk.org ??: Re: ??: [vtkusers] How to select a polygon region in a vtkImageData Hi Fantasy, I don't know what you mean by "dimension index". When you display in the 3D viewer, make sure the window/level are set correctly in the viewer. The outside of the region is given a value of zero, but zero can show as gray depending on how the window/level is set. - David On Wed, Jan 27, 2016 at 12:22 PM, Chen, Lifan > wrote: Hey David, I use stencil and it works well, however, the dimension index of the output of stencil remain unchanged which I supposed to change according to the size of region I choose and there is a gray part around the region I choose when displaying in the 3-D viewer. Do you what is the problem? Thanks, Fantasy ________________________________ ???: David Gobbi [david.gobbi at gmail.com] ????: 2016?1?26? 16:47 ???: Chen, Lifan ??: vtkusers at vtk.org ??: Re: [vtkusers] How to select a polygon region in a vtkImageData Hi Fantasy, VTK has "stencil" operations for extracting regions from vtkImageData. For example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData There are a few VTK test samples that show different ways to use stencils: Imaging/Core/Testing/Cxx/TestStencilWithLasso.cxx Imaging/Core/Testing/Cxx/TestStencilWithPolyDataContour.cxx Imaging/Core/Testing/Cxx/TestStencilWithPolyDataSurface.cxx Imaging/Core/Testing/Python/TestBlendStencil.py Imaging/Core/Testing/Python/TestLassoStencil.py Imaging/Core/Testing/Python/TestROIStencil.py Imaging/Core/Testing/Python/TestStencilToImage.py Imaging/Core/Testing/Python/TestStencilWithFunction.py Imaging/Core/Testing/Python/TestStencilWithImage.py Extraction of a polygonal region can be done with vtkLassoStencilSource or with vtkPolyDataToImageStecil. Cheers, - David On Tue, Jan 26, 2016 at 2:22 PM, Chen, Lifan > wrote: Hey all, I am working on a project that requires to manually extract a region from a 3D vtkImageData. I read the example on how to select a region in a vtkPolyData in VTK/Examples/Cxx/PolyData/SelectPolyData (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData)http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SelectPolyData However, it doesn't work for vtkImageData. Is there any method to solve this problem? Thanks, Fantasy Chen The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Wed Jan 27 16:52:38 2016 From: sean at rogue-research.com (Sean McBride) Date: Wed, 27 Jan 2016 16:52:38 -0500 Subject: [vtkusers] New: Recipe for building VTK-5.8.0 with C++ Builder XE (bcc32 6.31) In-Reply-To: <1453717310446-5736137.post@n5.nabble.com> References: <52038C6C.4040208@simworx.com.br> <1453301079866-5736045.post@n5.nabble.com> <20160120150946.GC1997@megas.kitware.com> <007101d15397$445010c0$ccf03240$@inserm.fr> <20160120164443.GA27712@megas.kitware.com> <002901d15421$7d14bca0$773e35e0$@inserm.fr> <20160121143236.GC4759@megas.kitware.com> <20160122171842.GA1668@megas.kitware.com> <1453484839163-5736116.post@n5.nabble.com> <20160122220700.56909994@mail.rogue-research.com> <1453717310446-5736137.post@n5.nabble.com> Message-ID: <20160127215238.2026607285@mail.rogue-research.com> On Mon, 25 Jan 2016 03:21:50 -0700, Oliver Weinheimer said: >Thanks for the hints. >Once there is some time available, I'll deal with it. BTW: since you are an actual Borland user... what do you think is the oldest version of Borland that anyone cares about these days? Wikipedia has a version timeline here: 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 tomparker at personaltelemetry.com Wed Jan 27 19:31:32 2016 From: tomparker at personaltelemetry.com (Tom Parker) Date: Thu, 28 Jan 2016 00:31:32 +0000 Subject: [vtkusers] vtkpython on mac os? In-Reply-To: References: <20160126205036.8AFBFE4936@public.kitware.com> Message-ID: To share my results, I never got this completely working on my mac El Capitan, but these environment variables work for me on W10, VTK 7 and VS 2015 Community Edition. VTK Python environment variables C:\Python27\ C:\Python27\Scripts C:\Software\VTK-7.0.0.rc2\bin\bin\Debug C:\Software\VTK-7.0.0.rc2\bin\lib\Debug PYTHONPATH C:\Python27\lib C:\Software\VTK-7.0.0.rc2\bin\bin\Debug C:\Software\VTK-7.0.0.rc2\bin\lib\Debug C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python\vtk Now I can run python.exe and successfully import vtk. And run all the python examples I've tested so far. Regards, Tom From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Tom Parker Sent: Tuesday, January 26, 2016 4:25 PM To: Meehan, Bernard ; vtkusers at vtk.org Subject: Re: [vtkusers] vtkpython on mac os? Thank you! I'll test it and let everyone know if it works for me. From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Meehan, Bernard Sent: Tuesday, January 26, 2016 2:41 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] vtkpython on mac os? This is what I am using in my ~./bash_profile, you may not need all of it, but it worked once and I just never changed it. export VTK=~/VTK export PATH=$PATH:$VTK/bin export PYTHONPATH=$PYTHONPATH:$VTK/lib/python2.7/site-packages export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$VTK/lib From: vtkusers > on behalf of Tom Parker > Date: Tuesday, January 26, 2016 at 12:18 PM To: "vtkusers at vtk.org" > Subject: [vtkusers] vtkpython on mac os? Hello All, I've download the latest vtkpython-7.0.0.rc2-Darwin-64bit.dmg to my mac with El Capitan and I've fought with it for hours. I can run the examples successfully, but only from the /Applications/vtkpython/bin folder, if I try from any other folder I get the message "ImportError: No module named vtk" After reading the docs, googling and reading the mailing lists I've tried every combination of PYTHONHOME, PYTHONPATH, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH I can imagine with no joy. I have gotten it working on my linux systems before so I can't imagine what I'm doing wrong. Can anyone share a set of working path and environment variables with me? Thank you, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From listes.bgiroux at gmail.com Wed Jan 27 20:53:00 2016 From: listes.bgiroux at gmail.com (Bernard Giroux) Date: Wed, 27 Jan 2016 20:53:00 -0500 Subject: [vtkusers] vtkpython on mac os? In-Reply-To: References: <20160126205036.8AFBFE4936@public.kitware.com> Message-ID: Hi, My results on el cap: I?ve got some home made modules, so I prefer to compile VTK myself. I compile VTK after configuring this way (no mention about my modules here?) In a build directory: cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local/VTK-7.0.0.rc2 \ -DVTK_WRAP_PYTHON=ON \ -DCMAKE_MACOSX_RPATH=ON \ -DCMAKE_INSTALL_NAME_DIR=/usr/local/VTK-7.0.0.rc2/lib /path/to/vtksource make sudo make install In /usr/local, I make a symbolic link pointing to the right directory: cd /usr/local sudo ln -s VTK-7.0.0.rc2 VTK Finally, in my $HOME/.bash_profile, I put export PYTHONPATH=/usr/local/VTK/lib/python2.7/site-packages FWIW, I run the macports version of python. > Le 27 janv. 2016 ? 19:31, Tom Parker a ?crit : > > To share my results, I never got this completely working on my mac El Capitan, but these environment variables work for me on W10, VTK 7 and VS 2015 Community Edition. > > VTK Python environment variables > C:\Python27\ > C:\Python27\Scripts > C:\Software\VTK-7.0.0.rc2\bin\bin\Debug > C:\Software\VTK-7.0.0.rc2\bin\lib\Debug > > PYTHONPATH > > C:\Python27\lib > C:\Software\VTK-7.0.0.rc2\bin\bin\Debug > C:\Software\VTK-7.0.0.rc2\bin\lib\Debug > C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python > C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python\vtk > > Now I can run python.exe and successfully import vtk. > > And run all the python examples I?ve tested so far. > > Regards, > Tom > > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Tom Parker > Sent: Tuesday, January 26, 2016 4:25 PM > To: Meehan, Bernard ; vtkusers at vtk.org > Subject: Re: [vtkusers] vtkpython on mac os? > > Thank you! I?ll test it and let everyone know if it works for me. > > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Meehan, Bernard > Sent: Tuesday, January 26, 2016 2:41 PM > To: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkpython on mac os? > > This is what I am using in my ~./bash_profile, you may not need all of it, but it worked once and I just never changed it. > > export VTK=~/VTK > export PATH=$PATH:$VTK/bin > export PYTHONPATH=$PYTHONPATH:$VTK/lib/python2.7/site-packages > export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$VTK/lib > > > From: vtkusers on behalf of Tom Parker > Date: Tuesday, January 26, 2016 at 12:18 PM > To: "vtkusers at vtk.org" > Subject: [vtkusers] vtkpython on mac os? > > > Hello All, > I?ve download the latest vtkpython-7.0.0.rc2-Darwin-64bit.dmg to my mac with El Capitan and I?ve fought with it for hours. > I can run the examples successfully, but only from the /Applications/vtkpython/bin folder, if I try from any other folder I get the message ?ImportError: No module named vtk? > After reading the docs, googling and reading the mailing lists I?ve tried every combination of PYTHONHOME, PYTHONPATH, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH I can imagine with no joy. > I have gotten it working on my linux systems before so I can?t imagine what I?m doing wrong. > Can anyone share a set of working path and environment variables with me? > Thank you, > Tom > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 Vikash.Gupta at loni.usc.edu Wed Jan 27 19:15:30 2016 From: Vikash.Gupta at loni.usc.edu (Vikash Gupta) Date: Thu, 28 Jan 2016 00:15:30 +0000 Subject: [vtkusers] python 2.7 and vtk Message-ID: <4b6ef355829145d0adf74dfebceaadf0@ex02.ini.usc.edu> Hi everyone, This might be a solved problem but I was not able to find a solution that worked for me. So, if someone can help me out it will be really great. I am trying to use vtkpython. I cannot install it using pip. So, I found the binary packages for python on the vtk website. The vtkPython executable seems like a python interpreter. Is there a way I could use the classical Python 2.7 interpreter and still use the vtk modules. The reason, I am more inclined to use my old interpreter because I can use pip for installing packages. Any help ?? Thanks Vikash -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakota_63124 at yahoo.com Wed Jan 27 21:32:30 2016 From: dakota_63124 at yahoo.com (kent myers) Date: Wed, 27 Jan 2016 19:32:30 -0700 (MST) Subject: [vtkusers] Does vtkClipClosedSurface produce a capping surface when interior walls are present? Message-ID: <1453948350126-5736200.post@n5.nabble.com> Hi, I am attempting to create a closed clipping surface of a simple object that has interior walls. I have constructed a cube from 6 tetrahedral shapes each of which is composed of four triangular faces using a vtkPolyData object. The walls of the neighboring tetrahedral are back to back. The normal of each face of the individual tetrahedra all point inward. The clipping surface is constructed correctly if I construct an individual tetrahedron. It also works if I construct a cube with six tetrahdra, but first remove the interior walls. My question is, does VTK support construction of a closed clipping surface for an object that has interior walls? If this is the wrong technique for constructing the object I would like to have some advice about the proper way to do it. Keep in mind that I am not constructing straight sided tetrahedra. There are one or more mid points along each edge between the vertices of the tetrahedra so that the shape may have curved edges and faces. This is why I am using polydata instead of an unstructured grid, because my tetra are not simple 4 point objects. Thanks for your help. Kent -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkClipClosedSurface-produce-a-capping-surface-when-interior-walls-are-present-tp5736200.html Sent from the VTK - Users mailing list archive at Nabble.com. From dakota_63124 at yahoo.com Wed Jan 27 22:08:59 2016 From: dakota_63124 at yahoo.com (kent myers) Date: Wed, 27 Jan 2016 20:08:59 -0700 (MST) Subject: [vtkusers] Does vtkClipClosedSurface produce a capping surface when interior walls are present? In-Reply-To: <1453948350126-5736200.post@n5.nabble.com> References: <1453948350126-5736200.post@n5.nabble.com> Message-ID: <1453950539578-5736201.post@n5.nabble.com> Just a clarification related to my original post. Each triangular face of a tetrahedra is actually a grid of smaller triangles. -- View this message in context: http://vtk.1045678.n5.nabble.com/Does-vtkClipClosedSurface-produce-a-capping-surface-when-interior-walls-are-present-tp5736200p5736201.html Sent from the VTK - Users mailing list archive at Nabble.com. From s.kitlu at gmail.com Thu Jan 28 00:22:30 2016 From: s.kitlu at gmail.com (kitlu s) Date: Thu, 28 Jan 2016 10:52:30 +0530 Subject: [vtkusers] sturctured to unstructured vtk Message-ID: Hello everyone, I want to convert nrrd file into vtk file., i am doing this by python script using itk and vtk library but vtk what is generated is structured vtk but i want polydata or unstructured vtk. So is there any script using which we convert nrrd into unstructured vtk or polydata vtk ??? Please guide. Thanks in advance Regards, S.kitlu -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.genet at polytechnique.edu Thu Jan 28 01:29:40 2016 From: martin.genet at polytechnique.edu (Martin Genet) Date: Thu, 28 Jan 2016 07:29:40 +0100 Subject: [vtkusers] vtkCellDerivatives In-Reply-To: References: <567F0860.60908@polytechnique.edu> <5681BCC4.5060509@polytechnique.edu> <569CCB37.7060100@polytechnique.edu> <569EB27E.3050803@polytechnique.edu> <569F6057.3000208@polytechnique.edu> <56A236B5.4030305@polytechnique.edu> Message-ID: <56A9B554.4010401@polytechnique.edu> Of course! Looking forward to see this new notification mechanism in action? Martin On 27/01/2016 22:01, Andy Bauer wrote: > Hi Martin, > > We're working on some infrastructure to document API changes. I'd like > to wait to merge your changes for switching the tensor order output > for vtkCellDerivatives until that's done. That way it will be easier > to notify everyone of this change (even though it's not technically > changing the API, just how the output should be interpreted). We're > hoping it will be ready in a week. Is that ok to wait for merging your > changes into VTK master? > > Thanks, > Andy > > On Fri, Jan 22, 2016 at 2:42 PM, Andy Bauer > wrote: > > Hi Martin, > > In case you didn't receive the email notice, your changes have > been merged into master. Thanks for your contribution to VTK! This > looks like it was your first contribution. I hope it wasn't too > onerous to get done but the community works hard to make sure that > the code is high quality and well tested. > > Best regards, > Andy > > On Fri, Jan 22, 2016 at 10:22 AM, Andy Bauer > > wrote: > > It looks like vtkCellDerivates is the only class that uses > vtkTensor. When we switch vtkCellDerivatives to C ordering I > think we'll just remove vtkTensor. Less code with the same > functionality and probably better efficiency -- tough to beat > that :) > > On Fri, Jan 22, 2016 at 9:03 AM, Martin Genet > > wrote: > > Sounds good. > > However, here the culprit seems to be vtkTensor, which > stores the data in column. vtkCellDerivatives simply fills > a vtkTensor (filling is storage independent, since one > provides the actual components), and then returns the > underlying vector. > > One option would be to make vtkCellDerivatives independent > of vtkTensor. > > But I think it would be better to correct the storage in > vtkTensor. Actually, it seems that vtkTensor is used only > in vtkCellDerivatives, so it would not change the rest of > the library. > > Let me know what you would prefer. > > Martin > > > On 20/01/2016 19:19, Andy Bauer wrote: >> I've looked at this a bit more along with others and >> unfortunately there's some inconsistency in VTK for >> tensor ordering. If you look at the >> vtkCell::Derivatives() documentation >> (http://www.vtk.org/doc/nightly/html/classvtkCell.html#aff3d8332e9d7d556a9d2e9f91173d068), >> it's using a C/row-major ordering. There's some places in >> that have done row-major and others that have done column >> major. For the most part it hasn't been an issue since >> many/most of the uses of tensor have been symmetric but >> it should be fixed regardless. >> >> I've entered a mantis issue for this at >> http://www.paraview.org/Bug/view.php?id=15949. >> >> Would you be willing to go in and make the change to >> vtkCellDerivatives? I'm hoping to go through your changes >> to that class sometime today. >> >> On Wed, Jan 20, 2016 at 7:52 AM, Andy Bauer >> > >> wrote: >> >> Hmm, in fact it does. I was looking at >> vtkGradientFilter instead of vtkCellDerivatives for >> the ordering of the output of the gradient of a >> vector. I think the output order is supposed to be >> fortran/column-major ordering like vtkCellDerivatives >> instead of C/row-major ordering like >> vtkGradientFilter. Well, you can see the confusion >> that crops up and maybe that's why vtkTensors was >> done that way. In any case, let me verify for sure >> which way is correct and get back to you on this. >> >> On Wed, Jan 20, 2016 at 5:24 AM, Martin Genet >> > > wrote: >> >> Thanks Andy. >> >> Well, I might be wrong but I'm under the >> impression that vtkCellDerivatives returns >> [du/dx, dv/dx, dw/dx, du/dy, dv/dy, ...]. Am I wrong? >> >> Martin >> >> >> On 20/01/2016 03:07, Andy Bauer wrote: >>> Hi Martin, >>> >>> I haven't looked closely enough at vtkTensors (I >>> don't know if I even knew about it before today) >>> but indeed the ordering output in >>> vtkCellDerivatives for a velocity vector {u,v,w} >>> needs to be [du/dx, du/dy, du/dz, dv/dx, dv/dy, >>> ...] like you have it. I'm not sure when >>> vtkTensors is ordered the way it is. >>> >>> Cheers, >>> Andy >>> >>> On Tue, Jan 19, 2016 at 5:02 PM, Martin Genet >>> >> > wrote: >>> >>> Thanks Andy. >>> >>> I need to clarify something: the Derivatives >>> function of vtkCell objects returns a derivs >>> vector containing the components of the >>> gradient of some vector field defined at the >>> cell nodes; the components are ordered in >>> row (as usually in C, i.e., (0,0), (0,1), >>> (0,2), (1,0), (1,1), (1,2), (2,0), (2,1), >>> (2,2)). Now in the CellDerivatives filter >>> the derivs vector is used to fill a >>> vtkTensors, and then the filter returns the >>> internal vector storing the data of the >>> vtkTensors. However, the components of the >>> vtkTensors are ordered in column (as usually >>> in fortran, i.e., (0,0), (1,0), (2,0), >>> (0,1), (1,1), (2,1), (0,2), (1,2), (2,2)). >>> Is it on purpose that the vtkTensors store >>> their data in column and not in row? Isn't >>> it a little dangerous to mix both storage in >>> the code? Thanks for the clarification! >>> >>> Martin >>> >>> >>> On 18/01/2016 13:32, Andy Bauer wrote: >>>> Hi Martin, >>>> >>>> Thanks for following up on this. I found >>>> the merge request now and will look at >>>> this. In general, developers should request >>>> others to do a code review on this. This >>>> can be done via something like "@acbauer >>>> please review this" or sending an email on >>>> this VTK list with a link to the merge request. >>>> >>>> Best, >>>> Andy >>>> >>>> On Mon, Jan 18, 2016 at 6:23 AM, Martin >>>> Genet >>> > wrote: >>>> >>>> Hi Andy, >>>> >>>> I followed the directions, and >>>> submitted a patch (19 days ago), but >>>> haven't heard anything back. >>>> >>>> In GitLab the merge requests counter is >>>> at 0, but when I try to create a new >>>> merge request from my commit, it tells >>>> the merge request already exists. Is it >>>> being reviewed somewhere? Thanks! >>>> >>>> Martin >>>> >>>> >>>> On 29/12/2015 13:22, Andy Bauer wrote: >>>>> Hi Martin, >>>>> >>>>> This patch makes sense. It would need >>>>> a test if you want to get your changes >>>>> into VTK. The directions for >>>>> contributing to VTK are at >>>>> https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md. >>>>> >>>>> Cheers, >>>>> Andy >>>>> >>>>> On Mon, Dec 28, 2015 at 5:50 PM, >>>>> Martin Genet >>>>> >>>> > >>>>> wrote: >>>>> >>>>> Thanks Andy. >>>>> >>>>> What about simply adding another >>>>> mode, e.g. >>>>> SetTensorModeToComputeGreenLagrangeStrain, >>>>> to the vtkCellDerivatives filter? >>>>> Would the attached patch make sense? >>>>> >>>>> Martin >>>>> >>>>> On 28/12/2015 14:12, Andy Bauer wrote: >>>>>> Hi Martin, >>>>>> >>>>>> Changing the name of the >>>>>> SetTensorModeToComputeStrain >>>>>> method to something else would >>>>>> break backward compatibility >>>>>> which is generally avoided in >>>>>> VTK. Other options for this >>>>>> include deriving a class to >>>>>> compute non-linear strain from >>>>>> vtkCellDerivatives if it shares >>>>>> enough of the algorithm with the >>>>>> linearized version or maybe just >>>>>> creating a new filter. >>>>>> >>>>>> Cheers, >>>>>> Andy >>>>>> >>>>>> On Sat, Dec 26, 2015 at 4:36 PM, >>>>>> Martin Genet >>>>>> >>>>> > >>>>>> wrote: >>>>>> >>>>>> Dear VTK users: >>>>>> >>>>>> I realize that the >>>>>> vtkCellDerivatives filter, >>>>>> when >>>>>> SetTensorModeToComputeStrain >>>>>> is activated, returns the >>>>>> symmetric part of the >>>>>> gradient of the input vector >>>>>> field, which is the >>>>>> linearized strain tensor, >>>>>> i.e., not a proper measure of >>>>>> deformation when large >>>>>> displacements are involved. >>>>>> Would that make sense to have >>>>>> two different modes, >>>>>> SetTensorModeToComputeLinearizedStrain >>>>>> or >>>>>> SetTensorModeToComputeSymmetricGradient, >>>>>> and >>>>>> SetTensorModeToComputeStrain >>>>>> or >>>>>> SetTensorModeToComputeGreenLagrangeStrain? >>>>>> 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 rakesh.p at tataelxsi.co.in Thu Jan 28 02:32:04 2016 From: rakesh.p at tataelxsi.co.in (Rakesh Patil) Date: Thu, 28 Jan 2016 07:32:04 +0000 Subject: [vtkusers] How to control zooming limits? Message-ID: Hello users, Is there any way to control zoom limits? Like I need to restrict zooming, in the range of say 5 miles to 10 miles. How can this be done? Kindly suggest some ideas/techniques. Warm Regards Rakesh Patil -------------- next part -------------- An HTML attachment was scrubbed... URL: From axkibe at gmail.com Thu Jan 28 04:56:45 2016 From: axkibe at gmail.com (Axel Kittenberger) Date: Thu, 28 Jan 2016 10:56:45 +0100 Subject: [vtkusers] VTK bindings to Node.js/V8/JavaScript Message-ID: Hello, I created a wrapper library generator for VTK to Node.js. If you have all needed packages installed ("node", "vtk6-dev", "qtbase5-dev") running npm install vtk should do it and compile the pre-generated wrapper classes matching the VTK library found on your system. Currently I included pre-generated wrappers for VTK 6.1, 6.2 and 6.3 (on Linux). The full source code: https://github.com/axkibe/node-vtk Example code creating a cone: -------------------------- 'use strict'; var vtk, source, mapper, actor, renderer, renderWindow, renderWindowInteractor; vtk = require('vtk'); source = new vtk.ConeSource(); source.setResolution( 10 ); mapper = new vtk.PolyDataMapper(); mapper.setInputConnection( source.getOutputPort() ); actor = new vtk.Actor(); actor.setMapper( mapper ); renderer = new vtk.Renderer(); renderer.addActor( actor ); renderer.setBackground( 0.3, 0.2, 0.1 ); renderer.resetCamera(); renderWindow = new vtk.RenderWindow(); renderWindow.addRenderer( renderer ); renderWindowInteractor = new vtk.RenderWindowInteractor(); renderWindowInteractor.setRenderWindow( renderWindow ); renderWindowInteractor.setInteractorStyle( new vtk.InteractorStyleTrackballCamera() ); renderWindow.render(); renderWindowInteractor.start(); -------------------------- I know there is Paraview having a JavaScript interface to interact with on browser side, but this module directly includes VTK on Node.js server side or simply for small rapid development scripts if someone like me just likes JavaScript to prefer this for quick testing instead of other wrappers or using C++ directly. What I did is: * Hijack the VTK wrapping tools build scripts to generate V8 wrapping classes using the "Native Abstractions for Node" (nan) layer. This doesn't build the binary libraries right away but stops after generating the wrapper classes to be copied over the Node.js module build system. * Figure out how to expose hierarchical native data as hierarchical JavaScript objects creating a matching prototype chain. I didn't find example code for this as most nan examples where simply object here <-> object there mappings. var vtk = require('vtk') var source = new vtk.ConeSource(); console.log( source instanceof vtk.Algorithm, source instanceof vtk.CubeSource ); correctly prints out "true false" * Creating overload detection and figure out the correct native overload to call. * Make the wrapping as foolproof as I could think of. At least I don't know how to create a Segfault from JavaScript side, everything wrong doing should raise a JavaScript exception instead. * Lazily initialize JavaScript prototypes only as they are needed. On startup only getters for the VTK object are set, everything else is only initialized when accessed. This improves startup time. After the first start of node with VTK which takes a long time (10 seconds for me) for I suppose the linker doing its stuff, subsequent calls start up the whole thing in 1 second. * Set references for different naming conventions what you prefer. vtk.vtkConeSource (strictly correct and VTK case scheme, but kind of repetitive saying "vtk" twice and violating JavaScript conventions of constructor functions being uppercase) and vtk.ConeSource (shorted and fits the convention of uppercase constructors) point to the same thing. Similar source.SetResolution (strictly correct VTK name) and source.setResolution (JavaScript convention for lowercase non-constructor functions) are the same thing too. What I did not: * I skipped a lot of less used parameter types. Right now wrappers are only created for functions having double, char, char (const) *, int and vtkObject pointers as parameters and return values. Other primitives should be easy to add, I just didn't yet need them. Predefined length arrays as parameters might be a little more work. QObject I didn't look at. Templates as parameters (as Tuples) I don't know how to and I suppose PythonWrapping, which I used as guideline, doesn't either. C++ Classes/Structs not being a child of vtkObjectBase are excluded as vtk-node uses vtkSmartPointers for all its objects and these don't work there. * Create the .so libraries right from within the VTK build. * Create altered WindowInteractor derivates which keep the node event loop running. I looked a little into XWindowRenderInteractor and there it should be very possible to have the X-event loop halt its select() and timer calculations in a separate thread, but hand on any X message via semaphore to be processed in the main thread. * Detect other operating systems than Linux in the "npm install" script and include/exclude the correct wrapper classes. Kind regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Jan 28 08:28:27 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 28 Jan 2016 08:28:27 -0500 Subject: [vtkusers] Fwd: Re: Heap corruption | vtkLookupTable? In-Reply-To: <1453929358.1992080.504481970.6B3EF97D@webmail.messagingengine.com> References: <1453929358.1992080.504481970.6B3EF97D@webmail.messagingengine.com> Message-ID: Can you try using SetNumberOfTableValues() instead of SetNuberOfColors()? Thanks Ken On Wed, Jan 27, 2016 at 4:15 PM, Audrius Stundzia wrote: > > Hi Cory, > > Sorry that I did not respond earlier. Overlooked your e-mail. > Thank you for your reply > > Now using > > OS: Windows 10 x64 > IDE: MS VS 2015 > VTK: 7.0.0.rc2 x64 build > > Still receiving the same error message at the same place: > > HEAP CORRUPTION DETECTED: after Normal block (#218683) at > 0x00000286C6D22350. > CRT detected that the application wrote to memory after end of heap buffer. > > No idea how to create a CMakeLists.txt file. Please advise. > > Regards, > > Audrius > > On 8 November 2015 at 15:26, Cory Quammen > wrote: > > Hi Audrius, > > That is indeed suspicious. I don't immediately see anything in your code > that would explain the crash. Would you mind attaching a compilable example > program with accompanying CMakeLists.txt file? That will make it easier to > take a look. > > Thanks, > Cory > > On Thu, Nov 5, 2015 at 11:19 PM, Audrius Stundzia > wrote: > > > Dear All, > > OS: Windows 10 x64 > IDE: MS VS 2015 > VTK: 6.3.0 x64 build > > I am getting a "heap corruption" message when a vtkRenderWindow is closed > and the vtkRenderWindowInteractor is stopped. > Specifically the line > > renderWindowInteractor->TerminateApp(); > > in a callback function > > static void KeyPressCallbackFunction > > The relevant code fragments, appended below, are conventional texture > mapping of an image to a plane. > This "heap corruption" did not occur in Windows 8.1 x64; MS VS 2010; VTK > 5.10.1 x64 build > > From the call stack it appears to due to a problem with deleting an > instantiation of vtkLoopupTable: > > vtkCommonCore-6.3.dll!vtkDataArrayTemplate::DeleteArray() > Line 214 C++ > vtkCommonCore-6.3.dll!vtkDataArrayTemplate char>::~vtkDataArrayTemplate() Line 92 C++ > vtkCommonCore-6.3.dll!vtkUnsignedCharArray::~vtkUnsignedCharArray() Line > 37 C++ > [External Code] > vtkCommonCore-6.3.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase * > __formal, int check) Line 232 C++ > vtkCommonCore-6.3.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o, int > check) Line 901 C++ > vtkCommonCore-6.3.dll!vtkObjectBase::UnRegister(vtkObjectBase * o) Line > 190 C++ > vtkCommonCore-6.3.dll!vtkLookupTable::~vtkLookupTable() Line 89C++ > [External Code] > vtkCommonCore-6.3.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase * > __formal, int check) Line 232 C++ > vtkCommonCore-6.3.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o, int > check) Line 901 C++ > vtkCommonCore-6.3.dll!vtkObjectBase::UnRegister(vtkObjectBase * o) Line > 190 C++ > vtkCommonCore-6.3.dll!vtkSmartPointerBase::~vtkSmartPointerBase() Line 62 > C++ > [External Code] > > Any insight would be appreciated. > > Regards, > > Audrius > > //--------------------------------------- > // Start: relevant code fragment > //--------------------------------------- > > { > . . . > > vtkSmartPointer camera_ = vtkSmartPointer::New(); > > camera_->SetPosition( 0.0, 0.0, -1.0); > camera_->SetRoll(180.0); > > camera_->Zoom( zoomFactor_ ); > > //--------------- > vtkSmartPointer renderer_ = > vtkSmartPointer::New(); > renderer_->SetActiveCamera(camera_); > renderer_->SetBackground( 0.0, 0.0, 0.0 ); > > //--------------- > vtkSmartPointer renderWindow_ = > vtkSmartPointer::New(); > renderWindow_->AddRenderer( renderer_ ); > renderWindow_->SetSize > ( winSizeX_ > , winSizeY_ ); > renderWindow_->SetPosition > ( winPosX_ > , winPosY_ ); > renderWindow_->SwapBuffersOn(); > > //--------------- > vtkSmartPointer renderWindowInteractor_ = > vtkSmartPointer::New(); > renderWindowInteractor_->SetRenderWindow( renderWindow_); > > vtkSmartPointer keyPressCallback_ = > vtkSmartPointer::New(); > keyPressCallback_->SetCallback( > advDiagnosticDisplay::KeyPressCallbackFunction); > > renderWindowInteractor_->AddObserver > ( vtkCommand::KeyPressEvent > , keyPressCallback_ ); > > // Build a colour map > vtkSmartPointer colourMap_ = > vtkSmartPointer::New(); > InitializeColourMap(colourMap_); > > // Apply the texture > vtkSmartPointer texture_ = vtkSmartPointer::New(); > if(interpolation_) > texture_->InterpolateOn(); > else > texture_->InterpolateOff(); > texture_->RepeatOff(); > texture_->SetQualityTo32Bit(); > texture_->MapColorScalarsThroughLookupTableOn(); > texture_->SetInputData( imageReslice_->GetOutput()); > texture_->SetLookupTable( colourMap_); > > //--------------- > vtkSmartPointer planeSource_ = > vtkSmartPointer::New(); > planeSource_->SetResolution( 1, 1 ); > planeSource_->SetPoint1( eX_, 0.0, 0.0); > planeSource_->SetPoint2( 0.0, eY_, 0.0); > planeSource_->SetCenter( centre_.data()); > planeSource_->SetNormal( 0.0, 0.0, 1.0); > planeSource_->Update(); > > //--------------- > vtkSmartPointer mapper_ = > vtkSmartPointer::New(); > mapper_->ScalarVisibilityOff(); > mapper_->SetInputData( planeSource_->GetOutput()); > mapper_->Update(); > > //--------------- > vtkSmartPointer property_ = > vtkSmartPointer::New(); > property_->SetOpacity( opacity_); > > //--------------- > vtkSmartPointer actor_ = vtkSmartPointer::New(); > actor_->SetProperty( property_ ); > actor_->SetTexture( texture_ ); > actor_->SetMapper( mapper_ ); > > //--------------- > renderer_->AddActor(actor_); > > renderer_->ResetCamera(); > > renderWindow_->Render(); > renderWindow_->SetWindowName( "Window name here"); > > renderWindowInteractor_->Start(); > > . . . > > } > > void InitializeColourMap(vtkSmartPointer& colourMap) > { > //--------------- > colourMap->SetNumberOfColors(nImageColours_ + 1); > colourMap->SetTableRange > (minScalar_ > , maxScalar_); > > if (colour_) > { > colourMap->SetHueRange(0.666667f, 0.0f); > colourMap->Build(); > colourMap->SetTableValue(0, 0.0f, 0.0f, 0.0f, 0.0f); > } > else > { > colourMap->SetHueRange(0.5f, 0.5f); > colourMap->SetSaturationRange(0.0f, 1.0f); > colourMap->Build(); > colourMap->SetTableValue(0, 0.0f, 0.0f, 0.0f, 0.0f); > > for (int iC = 1; iC <= nImageColours_; ++iC) > { > const float val = static_cast(iC) / > static_cast(nImageColours_ + 1); > colourMap->SetTableValue > (iC > , val > , val > , val > , 1.0f); > } > } > } > > > // > // vtk callback function: stop rendering and close window > // > > static void KeyPressCallbackFunction > ( vtkObject* caller > , long unsigned int vtkNotUsed(eventId) > , void* vtkNotUsed(clientData) > , void* vtkNotUsed(callData)) > { > vtkRenderWindowInteractor* renderWindowInteractor = > dynamic_cast(caller); > > // Close the window > vtkRenderWindow* renderWindow = renderWindowInteractor->GetRenderWindow(); > renderWindow->Finalize(); > > // Stop the interactor > // When the next line is executed, the heap corruption message is generated > renderWindowInteractor->TerminateApp(); > > std::cout << "Window closed." << std::endl; > } > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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. > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 ken.martin at kitware.com Thu Jan 28 08:36:35 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 28 Jan 2016 08:36:35 -0500 Subject: [vtkusers] How to control zooming limits? In-Reply-To: References: Message-ID: You can use a startevent on the renderer and check what the camera's settings are. The example below prints the camera's position before each render but you could instead have it check the camera and adjust as needed. There are probably other ways to do it as well. This was just the first that came to mind. Thanks Ken /*========================================================================= Program: Visualization Toolkit Module: Cone2.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ // // This example shows how to add an observer to a C++ program. It extends // the Step1/Cxx/Cone.cxx C++ example (see that example for information on // the basic setup). // // VTK uses a command/observer design pattern. That is, observers watch for // particular events that any vtkObject (or subclass) may invoke on // itself. For example, the vtkRenderer invokes a "StartEvent" as it begins // to render. Here we add an observer that invokes a command when this event // is observed. // // first include the required header files for the vtk classes we are using #include "vtkConeSource.h" #include "vtkPolyDataMapper.h" #include "vtkRenderWindow.h" #include "vtkCommand.h" #include "vtkCamera.h" #include "vtkActor.h" #include "vtkRenderer.h" // Callback for the interaction class vtkMyCallback : public vtkCommand { public: static vtkMyCallback *New() { return new vtkMyCallback; } virtual void Execute(vtkObject *caller, unsigned long, void*) { vtkRenderer *renderer = reinterpret_cast(caller); cout << renderer->GetActiveCamera()->GetPosition()[0] << " " << renderer->GetActiveCamera()->GetPosition()[1] << " " << renderer->GetActiveCamera()->GetPosition()[2] << "\n"; } }; int main() { // // The pipeline creation is documented in Step1 // vtkConeSource *cone = vtkConeSource::New(); cone->SetHeight( 3.0 ); cone->SetRadius( 1.0 ); cone->SetResolution( 10 ); vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New(); coneMapper->SetInputConnection( cone->GetOutputPort() ); vtkActor *coneActor = vtkActor::New(); coneActor->SetMapper( coneMapper ); vtkRenderer *ren1= vtkRenderer::New(); ren1->AddActor( coneActor ); ren1->SetBackground( 0.1, 0.2, 0.4 ); ren1->ResetCamera(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer( ren1 ); renWin->SetSize( 300, 300 ); // Here is where we setup the observer, we do a new and ren1 will // eventually free the observer vtkMyCallback *mo1 = vtkMyCallback::New(); ren1->AddObserver(vtkCommand::StartEvent,mo1); mo1->Delete(); // // now we loop over 360 degrees and render the cone each time // int i; for (i = 0; i < 360; ++i) { // render the image renWin->Render(); // rotate the active camera by one degree ren1->GetActiveCamera()->Azimuth( 1 ); } // // Free up any objects we created // cone->Delete(); coneMapper->Delete(); coneActor->Delete(); ren1->Delete(); renWin->Delete(); return 0; } On Thu, Jan 28, 2016 at 2:32 AM, Rakesh Patil wrote: > Hello users, > > > Is there any way to control zoom limits? Like I need to restrict zooming, > in the range of say 5 miles to 10 miles. How can this be done? Kindly > suggest some ideas/techniques. > > > Warm Regards > > > Rakesh Patil > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Thu Jan 28 09:11:51 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 28 Jan 2016 09:11:51 -0500 Subject: [vtkusers] sturctured to unstructured vtk In-Reply-To: References: Message-ID: Apply vtkDataSetSurfaceFlter to convert it into vtkPolyData (quads or triangles - corresponding to the skin of the image data). Apply vtkDataSetTriangleFilter to convert it into vtkUnstructuredGrid (tetrahedra - corresponding to the entire image data. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jan 28, 2016 at 12:22 AM, kitlu s wrote: > Hello everyone, > > I want to convert nrrd file into vtk file., i am doing this by python > script > using itk and vtk library but vtk what is generated is structured vtk but > i > want polydata or unstructured vtk. > > So is there any script using which we convert nrrd into unstructured vtk > or > polydata vtk ??? > > Please guide. > > Thanks in advance > > Regards, > S.kitlu > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 shawn.waldon at kitware.com Thu Jan 28 09:44:13 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Thu, 28 Jan 2016 09:44:13 -0500 Subject: [vtkusers] python 2.7 and vtk In-Reply-To: <4b6ef355829145d0adf74dfebceaadf0@ex02.ini.usc.edu> References: <4b6ef355829145d0adf74dfebceaadf0@ex02.ini.usc.edu> Message-ID: Hi Vikash, You are right, vtkpython is a python interpreter that sets up the environment so that the VTK modules are found. You can use the VTK modules from another python interpreter as long as it is the same version of python they were compiled against (2.7 in most cases, including the binaries on the download page). You have to set the PYTHONPATH environment variable to point to the vtk python modules and the PATH/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH environment variable to point to the vtk C++ libraries that those python modules load. For example, on Linux with vtk installed to /usr/local you would need: export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_ PATH export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH The paths are slightly different for each OS, so just ask the list if you have trouble figuring it out and someone with your OS should be able to help. HTH, Shawn On Wed, Jan 27, 2016 at 7:15 PM, Vikash Gupta wrote: > Hi everyone, > This might be a solved problem but I was not able to find a solution that > worked for me. So, if someone can help me out it will be really great. > > I am trying to use vtkpython. I cannot install it using pip. So, I found > the binary packages for python on the vtk website. The vtkPython executable > seems like a python interpreter. > Is there a way I could use the classical Python 2.7 interpreter and still > use the vtk modules. The reason, I am more inclined to use my old > interpreter because I can use pip for installing packages. > > Any help ?? > > Thanks > Vikash > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 audrius at tomographix.com Thu Jan 28 09:52:56 2016 From: audrius at tomographix.com (Audrius Stundzia) Date: Thu, 28 Jan 2016 09:52:56 -0500 Subject: [vtkusers] Heap corruption | vtkLookupTable? In-Reply-To: References: <1453929358.1992080.504481970.6B3EF97D@webmail.messagingengine.com> Message-ID: <1453992776.2224120.505184322.646358F4@webmail.messagingengine.com> Using?SetNumberOfTableValues() instead of SetNumberOfColors() fixed the problem. Thank you. Regards, Audrius On Thu, Jan 28, 2016, at 08:28, Ken Martin wrote: > Can you try using?SetNumberOfTableValues() instead of > SetNuberOfColors()? > > Thanks Ken > > On Wed, Jan 27, 2016 at 4:15 PM, Audrius Stundzia > wrote: >> __ >> >> Hi Cory, >> >> Sorry that I did not respond earlier. Overlooked your e-mail. Thank >> you for your reply >> >> Now using >> >> OS: Windows 10 x64 IDE: MS VS 2015 VTK: 7.0.0.rc2 x64 build >> >> Still receiving the same error message at the same place: >> >> HEAP CORRUPTION DETECTED: after Normal block (#218683) at >> 0x00000286C6D22350. CRT detected that the application wrote to memory >> after end of heap buffer. >> >> No idea how to create a?CMakeLists.txt?file. Please advise. >> >> Regards, >> >> Audrius >> >> On 8 November 2015 at 15:26, Cory Quammen >> wrote: >>> Hi Audrius, >>> >>> That is indeed suspicious. I don't immediately see anything in your >>> code that would explain the crash. Would you mind attaching a >>> compilable example program with accompanying CMakeLists.txt file? >>> That will make it easier to take a look. >>> >>> Thanks, Cory >>> >>> On Thu, Nov 5, 2015 at 11:19 PM, Audrius Stundzia >>> wrote: >>>> __ >>>> Dear All, >>>> >>>> OS: Windows 10 x64 IDE: MS VS 2015 VTK: 6.3.0 x64 build >>>> >>>> I am getting a "heap corruption" message when a vtkRenderWindow is >>>> closed and the vtkRenderWindowInteractor is stopped. Specifically >>>> the line >>>> >>>> renderWindowInteractor->TerminateApp(); >>>> >>>> in a callback function >>>> >>>> static void KeyPressCallbackFunction >>>> >>>> The relevant code fragments, appended below, are conventional >>>> texture mapping of an image to a plane. This "heap corruption" did >>>> not occur in Windows 8.1 x64; MS VS 2010; VTK 5.10.1 x64 build >>>> >>>> From the call stack it appears to due to a problem with deleting an >>>> instantiation of vtkLoopupTable: >>>> >>>> vtkCommonCore-6.3.dll!vtkDataArrayTemplate>>> char>::DeleteArray() Line 214 C++ vtkCommonCore- >>>> 6.3.dll!vtkDataArrayTemplate>>> char>::~vtkDataArrayTemplate() Line 92 C++ vtkCommonCore- >>>> 6.3.dll!vtkUnsignedCharArray::~vtkUnsignedCharArray() Line 37 C++ >>>> [External Code] vtkCommonCore- >>>> 6.3.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase * __formal, >>>> int check) Line 232 C++ vtkCommonCore- >>>> 6.3.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o, int check) >>>> Line 901 C++ vtkCommonCore- >>>> 6.3.dll!vtkObjectBase::UnRegister(vtkObjectBase * o) Line 190 C++ >>>> vtkCommonCore-6.3.dll!vtkLookupTable::~vtkLookupTable() Line 89C++ >>>> [External Code] vtkCommonCore- >>>> 6.3.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase * __formal, >>>> int check) Line 232 C++ vtkCommonCore- >>>> 6.3.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o, int check) >>>> Line 901 C++ vtkCommonCore- >>>> 6.3.dll!vtkObjectBase::UnRegister(vtkObjectBase * o) Line 190 C++ >>>> vtkCommonCore-6.3.dll!vtkSmartPointerBase::~vtkSmartPointerBase() >>>> Line 62 C++ [External Code] >>>> >>>> Any insight would be appreciated. >>>> >>>> Regards, >>>> >>>> Audrius >>>> >>>> //--------------------------------------- // Start: relevant code >>>> fragment //--------------------------------------- >>>> >>>> { >>>> . . . >>>> >>>> vtkSmartPointer?camera_ = >>>> vtkSmartPointer::New(); >>>> >>>> camera_->SetPosition( 0.0, 0.0, -1.0); camera_->SetRoll(180.0); >>>> >>>> camera_->Zoom( zoomFactor_ ); >>>> >>>> //--------------- vtkSmartPointer?renderer_ = >>>> vtkSmartPointer::New(); renderer_- >>>> >SetActiveCamera(camera_); renderer_->SetBackground( 0.0, 0.0, >>>> 0.0 ); >>>> >>>> //--------------- vtkSmartPointer?renderWindow_ = >>>> vtkSmartPointer::New(); renderWindow_- >>>> >AddRenderer( renderer_ ); renderWindow_->SetSize ( winSizeX_ , >>>> winSizeY_ ); renderWindow_->SetPosition ( winPosX_ , winPosY_ ); >>>> renderWindow_->SwapBuffersOn(); >>>> >>>> //--------------- vtkSmartPointer >>>> renderWindowInteractor_ = >>>> vtkSmartPointer::New(); renderWindowInteractor_- >>>> >SetRenderWindow( renderWindow_); >>>> >>>> vtkSmartPointer?keyPressCallback_ = >>>> vtkSmartPointer::New(); keyPressCallback_- >>>> >SetCallback( advDiagnosticDisplay::KeyPressCallbackFunction); >>>> >>>> renderWindowInteractor_->AddObserver ( vtkCommand::KeyPressEvent , >>>> keyPressCallback_ ); >>>> >>>> // Build a colour map vtkSmartPointer colourMap_ = >>>> vtkSmartPointer::New(); >>>> InitializeColourMap(colourMap_); >>>> >>>> // Apply the texture vtkSmartPointer texture_ = >>>> vtkSmartPointer::New(); if(interpolation_) texture_- >>>> >InterpolateOn(); else texture_->InterpolateOff(); texture_- >>>> >RepeatOff(); texture_->SetQualityTo32Bit(); texture_- >>>> >MapColorScalarsThroughLookupTableOn(); texture_->SetInputData( imageReslice_- >>>> >GetOutput()); texture_->SetLookupTable( colourMap_); >>>> >>>> //--------------- vtkSmartPointer planeSource_ = >>>> vtkSmartPointer::New(); planeSource_- >>>> >SetResolution( 1, 1 ); planeSource_->SetPoint1( eX_, 0.0, 0.0); >>>> planeSource_->SetPoint2( 0.0, eY_, 0.0); planeSource_->SetCenter( >>>> centre_.data()); planeSource_->SetNormal( 0.0, 0.0, 1.0); planeSource_- >>>> >Update(); >>>> >>>> //--------------- vtkSmartPointer mapper_ = >>>> vtkSmartPointer::New(); mapper_- >>>> >ScalarVisibilityOff(); mapper_->SetInputData( planeSource_- >>>> >GetOutput()); mapper_->Update(); >>>> >>>> //--------------- vtkSmartPointer property_ = >>>> vtkSmartPointer::New(); property_->SetOpacity( >>>> opacity_); >>>> >>>> //--------------- vtkSmartPointer actor_ = >>>> vtkSmartPointer::New(); actor_->SetProperty( property_ ); >>>> actor_->SetTexture( texture_ ); actor_->SetMapper( mapper_ ); >>>> >>>> //--------------- renderer_->AddActor(actor_); >>>> >>>> renderer_->ResetCamera(); >>>> >>>> renderWindow_->Render(); renderWindow_->SetWindowName( "Window name >>>> here"); >>>> >>>> renderWindowInteractor_->Start(); >>>> >>>> . . . >>>> >>>> } >>>> >>>> void InitializeColourMap(vtkSmartPointer& >>>> colourMap) { //--------------- colourMap- >>>> >SetNumberOfColors(nImageColours_ + 1); colourMap->SetTableRange >>>> (minScalar_ , maxScalar_); >>>> >>>> if (colour_) { colourMap->SetHueRange(0.666667f, 0.0f); colourMap- >>>> >Build(); colourMap->SetTableValue(0, 0.0f, 0.0f, 0.0f, 0.0f); } >>>> else { colourMap->SetHueRange(0.5f, 0.5f); colourMap- >>>> >SetSaturationRange(0.0f, 1.0f); colourMap->Build(); colourMap- >>>> >SetTableValue(0, 0.0f, 0.0f, 0.0f, 0.0f); >>>> >>>> for (int iC = 1; iC <= nImageColours_; ++iC) { const float val = >>>> static_cast(iC) / static_cast(nImageColours_ + 1); >>>> colourMap->SetTableValue (iC , val , val , val , 1.0f); } } } >>>> >>>> >>>> // // vtk callback function: stop rendering and close window // >>>> >>>> static void KeyPressCallbackFunction ( vtkObject* caller , long >>>> unsigned int vtkNotUsed(eventId) , void* vtkNotUsed(clientData) , >>>> void* vtkNotUsed(callData)) { vtkRenderWindowInteractor* >>>> renderWindowInteractor = >>>> dynamic_cast(caller); >>>> >>>> // Close the window vtkRenderWindow* renderWindow = renderWindowInteractor- >>>> >GetRenderWindow(); renderWindow->Finalize(); >>>> >>>> // Stop the interactor // When the next line is executed, the heap >>>> corruption message is generated renderWindowInteractor- >>>> >TerminateApp(); >>>> >>>> std::cout << "Window closed." << std::endl; } >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> 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. >>> >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 marie.rozand at ge.com Thu Jan 28 08:31:35 2016 From: marie.rozand at ge.com (Rozand, Marie (GE Healthcare, consultant)) Date: Thu, 28 Jan 2016 13:31:35 +0000 Subject: [vtkusers] How to Vizualize images with vtk2.2 ? Message-ID: Dear all, I can't use newer version of vtk so I would like to know how to vizualize an vtkImageData with version 2.2 in c++ I created a vtkImageViewer and gave it my image : vtkImageViewer * viewer = vtkImageViewer::New(); viewer->SetInput(image); viewer->Render(); The problem is that when I run my program it crashes during the Render() function. Do I need a kind of Interactor ? If so what is the equivalent class name in vtk 2.2 ? Or is it another problem ? Furthermore, if someone know where I could find or buy a documentation about this old version, it would be great. Marie Rozand -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jan 28 10:13:04 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 28 Jan 2016 10:13:04 -0500 Subject: [vtkusers] VTK bindings to Node.js/V8/JavaScript In-Reply-To: References: Message-ID: Wow! @David Gobbi and @Sebastien Jourdain did you seen this? nice work Axel! David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jan 28, 2016 at 4:56 AM, Axel Kittenberger wrote: > Hello, > > I created a wrapper library generator for VTK to Node.js. If you have all > needed packages installed ("node", "vtk6-dev", "qtbase5-dev") running > npm install vtk > should do it and compile the pre-generated wrapper classes matching the > VTK library found on your system. Currently I included pre-generated > wrappers for VTK 6.1, 6.2 and 6.3 (on Linux). > > The full source code: https://github.com/axkibe/node-vtk > > Example code creating a cone: > -------------------------- > 'use strict'; > var vtk, source, mapper, actor, renderer, renderWindow, > renderWindowInteractor; > > vtk = require('vtk'); > > source = new vtk.ConeSource(); > source.setResolution( 10 ); > > mapper = new vtk.PolyDataMapper(); > > mapper.setInputConnection( source.getOutputPort() ); > > actor = new vtk.Actor(); > actor.setMapper( mapper ); > > renderer = new vtk.Renderer(); > renderer.addActor( actor ); > renderer.setBackground( 0.3, 0.2, 0.1 ); > renderer.resetCamera(); > > renderWindow = new vtk.RenderWindow(); > renderWindow.addRenderer( renderer ); > > renderWindowInteractor = new vtk.RenderWindowInteractor(); > renderWindowInteractor.setRenderWindow( renderWindow ); > renderWindowInteractor.setInteractorStyle( new > vtk.InteractorStyleTrackballCamera() ); > > renderWindow.render(); > > renderWindowInteractor.start(); > -------------------------- > > I know there is Paraview having a JavaScript interface to interact with on > browser side, but this module directly includes VTK on Node.js server side > or simply for small rapid development scripts if someone like me just likes > JavaScript to prefer this for quick testing instead of other wrappers or > using C++ directly. > > What I did is: > > * Hijack the VTK wrapping tools build scripts to generate V8 wrapping > classes using the "Native Abstractions for Node" (nan) layer. This doesn't > build the binary libraries right away but stops after generating the > wrapper classes to be copied over the Node.js module build system. > > * Figure out how to expose hierarchical native data as hierarchical > JavaScript objects creating a matching prototype chain. I didn't find > example code for this as most nan examples where simply object here <-> > object there mappings. > var vtk = require('vtk') > var source = new vtk.ConeSource(); > console.log( source instanceof vtk.Algorithm, source instanceof > vtk.CubeSource ); > correctly prints out "true false" > > * Creating overload detection and figure out the correct native overload > to call. > > * Make the wrapping as foolproof as I could think of. At least I don't > know how to create a Segfault from JavaScript side, everything wrong doing > should raise a JavaScript exception instead. > > * Lazily initialize JavaScript prototypes only as they are needed. On > startup only getters for the VTK object are set, everything else is only > initialized when accessed. This improves startup time. After the first > start of node with VTK which takes a long time (10 seconds for me) for I > suppose the linker doing its stuff, subsequent calls start up the whole > thing in 1 second. > > * Set references for different naming conventions what you prefer. > vtk.vtkConeSource (strictly correct and VTK case scheme, but kind of > repetitive saying "vtk" twice and violating JavaScript conventions of > constructor functions being uppercase) and vtk.ConeSource (shorted and fits > the convention of uppercase constructors) point to the same thing. Similar > source.SetResolution (strictly correct VTK name) and source.setResolution > (JavaScript convention for lowercase non-constructor functions) are the > same thing too. > > What I did not: > > * I skipped a lot of less used parameter types. Right now wrappers are > only created for functions having double, char, char (const) *, int and > vtkObject pointers as parameters and return values. Other primitives should > be easy to add, I just didn't yet need them. > Predefined length arrays as parameters might be a little more work. > QObject I didn't look at. Templates as parameters (as Tuples) I don't know > how to and I suppose PythonWrapping, which I used as guideline, doesn't > either. C++ Classes/Structs not being a child of vtkObjectBase are excluded > as vtk-node uses vtkSmartPointers for all its objects and these don't work > there. > > * Create the .so libraries right from within the VTK build. > > * Create altered WindowInteractor derivates which keep the node event loop > running. I looked a little into XWindowRenderInteractor and there it should > be very possible to have the X-event loop halt its select() and timer > calculations in a separate thread, but hand on any X message via semaphore > to be processed in the main thread. > > * Detect other operating systems than Linux in the "npm install" script > and include/exclude the correct wrapper classes. > > Kind regards, > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jan 28 10:31:38 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 28 Jan 2016 10:31:38 -0500 Subject: [vtkusers] How to Vizualize images with vtk2.2 ? In-Reply-To: References: Message-ID: Avoiding the: "Why such an old /*1998*/ version?" and "You should really update." discussion The oldest doxygen documentation we have on the server is: http://www.vtk.org/doc/release/3/html/ David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jan 28, 2016 at 8:31 AM, Rozand, Marie (GE Healthcare, consultant) < marie.rozand at ge.com> wrote: > Dear all, > > > > I can?t use newer version of vtk so I would like to know how to vizualize > an vtkImageData with version 2.2 in c++ > > I created a vtkImageViewer and gave it my image : > > vtkImageViewer * viewer = vtkImageViewer::New(); > > viewer->SetInput(image); > > viewer->Render(); > > > > The problem is that when I run my program it crashes during the Render() > function. Do I need a kind of Interactor ? If so what is the equivalent > class name in vtk 2.2 ? Or is it another problem ? > > > > Furthermore, if someone know where I could find or buy a documentation > about this old version, it would be great. > > > > Marie Rozand > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 sebastien.jourdain at kitware.com Thu Jan 28 10:37:07 2016 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 28 Jan 2016 08:37:07 -0700 Subject: [vtkusers] VTK bindings to Node.js/V8/JavaScript In-Reply-To: References: Message-ID: I'm catching up, it is only 8:30am here. ;-) This is awesome! Great work Axel! This could open other backend to vtkWeb and ParaViewWeb. This is great... Seb On Thu, Jan 28, 2016 at 8:13 AM, David E DeMarle wrote: > Wow! > > @David Gobbi and @Sebastien Jourdain did you seen this? > > nice work Axel! > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Jan 28, 2016 at 4:56 AM, Axel Kittenberger > wrote: > >> Hello, >> >> I created a wrapper library generator for VTK to Node.js. If you have all >> needed packages installed ("node", "vtk6-dev", "qtbase5-dev") running >> npm install vtk >> should do it and compile the pre-generated wrapper classes matching the >> VTK library found on your system. Currently I included pre-generated >> wrappers for VTK 6.1, 6.2 and 6.3 (on Linux). >> >> The full source code: https://github.com/axkibe/node-vtk >> >> Example code creating a cone: >> -------------------------- >> 'use strict'; >> var vtk, source, mapper, actor, renderer, renderWindow, >> renderWindowInteractor; >> >> vtk = require('vtk'); >> >> source = new vtk.ConeSource(); >> source.setResolution( 10 ); >> >> mapper = new vtk.PolyDataMapper(); >> >> mapper.setInputConnection( source.getOutputPort() ); >> >> actor = new vtk.Actor(); >> actor.setMapper( mapper ); >> >> renderer = new vtk.Renderer(); >> renderer.addActor( actor ); >> renderer.setBackground( 0.3, 0.2, 0.1 ); >> renderer.resetCamera(); >> >> renderWindow = new vtk.RenderWindow(); >> renderWindow.addRenderer( renderer ); >> >> renderWindowInteractor = new vtk.RenderWindowInteractor(); >> renderWindowInteractor.setRenderWindow( renderWindow ); >> renderWindowInteractor.setInteractorStyle( new >> vtk.InteractorStyleTrackballCamera() ); >> >> renderWindow.render(); >> >> renderWindowInteractor.start(); >> -------------------------- >> >> I know there is Paraview having a JavaScript interface to interact with >> on browser side, but this module directly includes VTK on Node.js server >> side or simply for small rapid development scripts if someone like me just >> likes JavaScript to prefer this for quick testing instead of other wrappers >> or using C++ directly. >> >> What I did is: >> >> * Hijack the VTK wrapping tools build scripts to generate V8 wrapping >> classes using the "Native Abstractions for Node" (nan) layer. This doesn't >> build the binary libraries right away but stops after generating the >> wrapper classes to be copied over the Node.js module build system. >> >> * Figure out how to expose hierarchical native data as hierarchical >> JavaScript objects creating a matching prototype chain. I didn't find >> example code for this as most nan examples where simply object here <-> >> object there mappings. >> var vtk = require('vtk') >> var source = new vtk.ConeSource(); >> console.log( source instanceof vtk.Algorithm, source instanceof >> vtk.CubeSource ); >> correctly prints out "true false" >> >> * Creating overload detection and figure out the correct native overload >> to call. >> >> * Make the wrapping as foolproof as I could think of. At least I don't >> know how to create a Segfault from JavaScript side, everything wrong doing >> should raise a JavaScript exception instead. >> >> * Lazily initialize JavaScript prototypes only as they are needed. On >> startup only getters for the VTK object are set, everything else is only >> initialized when accessed. This improves startup time. After the first >> start of node with VTK which takes a long time (10 seconds for me) for I >> suppose the linker doing its stuff, subsequent calls start up the whole >> thing in 1 second. >> >> * Set references for different naming conventions what you prefer. >> vtk.vtkConeSource (strictly correct and VTK case scheme, but kind of >> repetitive saying "vtk" twice and violating JavaScript conventions of >> constructor functions being uppercase) and vtk.ConeSource (shorted and fits >> the convention of uppercase constructors) point to the same thing. Similar >> source.SetResolution (strictly correct VTK name) and source.setResolution >> (JavaScript convention for lowercase non-constructor functions) are the >> same thing too. >> >> What I did not: >> >> * I skipped a lot of less used parameter types. Right now wrappers are >> only created for functions having double, char, char (const) *, int and >> vtkObject pointers as parameters and return values. Other primitives should >> be easy to add, I just didn't yet need them. >> Predefined length arrays as parameters might be a little more work. >> QObject I didn't look at. Templates as parameters (as Tuples) I don't know >> how to and I suppose PythonWrapping, which I used as guideline, doesn't >> either. C++ Classes/Structs not being a child of vtkObjectBase are excluded >> as vtk-node uses vtkSmartPointers for all its objects and these don't work >> there. >> >> * Create the .so libraries right from within the VTK build. >> >> * Create altered WindowInteractor derivates which keep the node event >> loop running. I looked a little into XWindowRenderInteractor and there it >> should be very possible to have the X-event loop halt its select() and >> timer calculations in a separate thread, but hand on any X message via >> semaphore to be processed in the main thread. >> >> * Detect other operating systems than Linux in the "npm install" script >> and include/exclude the correct wrapper classes. >> >> Kind regards, >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 LCHEN41 at mgh.harvard.edu Thu Jan 28 10:39:16 2016 From: LCHEN41 at mgh.harvard.edu (Chen, Lifan) Date: Thu, 28 Jan 2016 15:39:16 +0000 Subject: [vtkusers] Does the vtkResliceImageViewer::SetResliceMode change the window/level automatically? Message-ID: Hey all, I am working on a project using vtkResliceImageViewer. I found a problem that when calling SetResliceMode, the viewer may change the window and level automatically. Does anyone know how to fix the problem? Fantasy The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 28 10:43:38 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 28 Jan 2016 08:43:38 -0700 Subject: [vtkusers] VTK bindings to Node.js/V8/JavaScript In-Reply-To: References: Message-ID: I've skimmed through the patch, and it looks like some very nice work. Support for array parameters is important, because those are used throughout VTK. For types that aren't derived from vtkObjectBase, the Python wrappers copy the object instead of using a reference count. So types like vtkVariant and vtkTuple are wrapped in python as long as they have a copy constructor. I hope to look at this in more detail over the weekend. - David On Thu, Jan 28, 2016 at 8:13 AM, David E DeMarle wrote: > Wow! > > @David Gobbi and @Sebastien Jourdain did you seen this? > > nice work Axel! > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Jan 28, 2016 at 4:56 AM, Axel Kittenberger > wrote: > >> Hello, >> >> I created a wrapper library generator for VTK to Node.js. If you have all >> needed packages installed ("node", "vtk6-dev", "qtbase5-dev") running >> npm install vtk >> should do it and compile the pre-generated wrapper classes matching the >> VTK library found on your system. Currently I included pre-generated >> wrappers for VTK 6.1, 6.2 and 6.3 (on Linux). >> >> The full source code: https://github.com/axkibe/node-vtk >> >> Example code creating a cone: >> -------------------------- >> 'use strict'; >> var vtk, source, mapper, actor, renderer, renderWindow, >> renderWindowInteractor; >> >> vtk = require('vtk'); >> >> source = new vtk.ConeSource(); >> source.setResolution( 10 ); >> >> mapper = new vtk.PolyDataMapper(); >> >> mapper.setInputConnection( source.getOutputPort() ); >> >> actor = new vtk.Actor(); >> actor.setMapper( mapper ); >> >> renderer = new vtk.Renderer(); >> renderer.addActor( actor ); >> renderer.setBackground( 0.3, 0.2, 0.1 ); >> renderer.resetCamera(); >> >> renderWindow = new vtk.RenderWindow(); >> renderWindow.addRenderer( renderer ); >> >> renderWindowInteractor = new vtk.RenderWindowInteractor(); >> renderWindowInteractor.setRenderWindow( renderWindow ); >> renderWindowInteractor.setInteractorStyle( new >> vtk.InteractorStyleTrackballCamera() ); >> >> renderWindow.render(); >> >> renderWindowInteractor.start(); >> -------------------------- >> >> I know there is Paraview having a JavaScript interface to interact with >> on browser side, but this module directly includes VTK on Node.js server >> side or simply for small rapid development scripts if someone like me just >> likes JavaScript to prefer this for quick testing instead of other wrappers >> or using C++ directly. >> >> What I did is: >> >> * Hijack the VTK wrapping tools build scripts to generate V8 wrapping >> classes using the "Native Abstractions for Node" (nan) layer. This doesn't >> build the binary libraries right away but stops after generating the >> wrapper classes to be copied over the Node.js module build system. >> >> * Figure out how to expose hierarchical native data as hierarchical >> JavaScript objects creating a matching prototype chain. I didn't find >> example code for this as most nan examples where simply object here <-> >> object there mappings. >> var vtk = require('vtk') >> var source = new vtk.ConeSource(); >> console.log( source instanceof vtk.Algorithm, source instanceof >> vtk.CubeSource ); >> correctly prints out "true false" >> >> * Creating overload detection and figure out the correct native overload >> to call. >> >> * Make the wrapping as foolproof as I could think of. At least I don't >> know how to create a Segfault from JavaScript side, everything wrong doing >> should raise a JavaScript exception instead. >> >> * Lazily initialize JavaScript prototypes only as they are needed. On >> startup only getters for the VTK object are set, everything else is only >> initialized when accessed. This improves startup time. After the first >> start of node with VTK which takes a long time (10 seconds for me) for I >> suppose the linker doing its stuff, subsequent calls start up the whole >> thing in 1 second. >> >> * Set references for different naming conventions what you prefer. >> vtk.vtkConeSource (strictly correct and VTK case scheme, but kind of >> repetitive saying "vtk" twice and violating JavaScript conventions of >> constructor functions being uppercase) and vtk.ConeSource (shorted and fits >> the convention of uppercase constructors) point to the same thing. Similar >> source.SetResolution (strictly correct VTK name) and source.setResolution >> (JavaScript convention for lowercase non-constructor functions) are the >> same thing too. >> >> What I did not: >> >> * I skipped a lot of less used parameter types. Right now wrappers are >> only created for functions having double, char, char (const) *, int and >> vtkObject pointers as parameters and return values. Other primitives should >> be easy to add, I just didn't yet need them. >> Predefined length arrays as parameters might be a little more work. >> QObject I didn't look at. Templates as parameters (as Tuples) I don't know >> how to and I suppose PythonWrapping, which I used as guideline, doesn't >> either. C++ Classes/Structs not being a child of vtkObjectBase are excluded >> as vtk-node uses vtkSmartPointers for all its objects and these don't work >> there. >> >> * Create the .so libraries right from within the VTK build. >> >> * Create altered WindowInteractor derivates which keep the node event >> loop running. I looked a little into XWindowRenderInteractor and there it >> should be very possible to have the X-event loop halt its select() and >> timer calculations in a separate thread, but hand on any X message via >> semaphore to be processed in the main thread. >> >> * Detect other operating systems than Linux in the "npm install" script >> and include/exclude the correct wrapper classes. >> >> Kind regards, >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.nellmeldin at open-engineering.com Thu Jan 28 11:23:59 2016 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Thu, 28 Jan 2016 17:23:59 +0100 Subject: [vtkusers] Hide non visible labels on a 3d model In-Reply-To: References: Message-ID: Hello. Does anyone has any tips? Thank you. 2016-01-25 10:39 GMT+01:00 Fernando Nellmeldin < f.nellmeldin at open-engineering.com>: > Hello. > I'm trying to show the values of a contour as labels. Each label is fixed > to a point in the contour. I do not want to show the labels that are > anchored to points that are not visible. > > To achieve this, I followed these two examples: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LabelContours > > http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Annotation/Python/labeledMesh.py > > Unfortunately, the removal of hidden points (and thus, of labels) is not > working as expected. I attach three pictures of the behavior when I move > the camera. Look at the values on the top (365 and 399). > > The Pipeline I am using is the following: > vtkUnstructuredGrid -> vtkGeometryFilter -> vtkContourFilter -> > vtkStripper -> (create a vtkPolyData with one point of each contour) -> > vtkSelectVisiblePoints -> vtkLabeledDataMapper -> vtkActor2D. > > I am using VTK 5.10 but I tried with VTK 6.3 and the problem is worse > (nothing is hidden). This is under Windows 8.1. > > Any ideas? > > Thank you. > > -- *Fernando NELLMELDIN* Software Engineer *_______________________________________________________________* *Open Engineering s.a.* Rue Bois Saint-Jean 15/1 B-4102 Seraing (Belgium) Tel: +32.4.353.30.34 http://www.open-engineering.com https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym *_________________________________________________________________________* -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomparker at personaltelemetry.com Thu Jan 28 11:26:29 2016 From: tomparker at personaltelemetry.com (Tom Parker) Date: Thu, 28 Jan 2016 16:26:29 +0000 Subject: [vtkusers] python 2.7 and vtk In-Reply-To: <4b6ef355829145d0adf74dfebceaadf0@ex02.ini.usc.edu> References: <4b6ef355829145d0adf74dfebceaadf0@ex02.ini.usc.edu> Message-ID: Vikash, I am working on the same issue. To share my results, I never got this completely working on my mac El Capitan, but these environment variables work for me on W10, VTK 7 and VS 2015 Community Edition with a 64 bit build. These are the environment variables I edited for VTK Python 2.7 on Windows. PATH C:\Python27\ C:\Python27\Scripts C:\Software\VTK-7.0.0.rc2\bin\bin\Debug C:\Software\VTK-7.0.0.rc2\bin\lib\Debug PYTHONPATH C:\Python27\lib C:\Software\VTK-7.0.0.rc2\bin\bin\Debug C:\Software\VTK-7.0.0.rc2\bin\lib\Debug C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python\vtk Now I can run python.exe and successfully import vtk and run most python examples without error. From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Vikash Gupta Sent: Wednesday, January 27, 2016 6:16 PM To: vtkusers at vtk.org Subject: [vtkusers] python 2.7 and vtk Hi everyone, This might be a solved problem but I was not able to find a solution that worked for me. So, if someone can help me out it will be really great. I am trying to use vtkpython. I cannot install it using pip. So, I found the binary packages for python on the vtk website. The vtkPython executable seems like a python interpreter. Is there a way I could use the classical Python 2.7 interpreter and still use the vtk modules. The reason, I am more inclined to use my old interpreter because I can use pip for installing packages. Any help ?? Thanks Vikash -------------- next part -------------- An HTML attachment was scrubbed... URL: From torsten.sadowski at windnovation.com Thu Jan 28 11:54:36 2016 From: torsten.sadowski at windnovation.com (Torsten Sadowski) Date: Thu, 28 Jan 2016 17:54:36 +0100 Subject: [vtkusers] vtkSetMacro with std::shared_ptr Message-ID: <56AA47CC.9050205@windnovation.com> Hello, is there a chance to use the std::shared_ptr with the vtkSetMacro? The hitch (for now) is that the vtkOStreamWrapper does not have a conversion. Is there a possibility to extend the vtkOStreamWrapper or maybe vtkVariant in the way of Q_DECLARE_METATYPE? Cheers, Torsten -- Dr.-Ing. Torsten Sadowski Turbine Design/System Integration WINDnovation Engineering Solutions GmbH Stralauer Platz 33-34 10243 Berlin Germany Phone: +49 30 547195 34 Fax: +49 30 547195 39 Managing directors: Dr.-Ing. Roland Stoer, Dipl.-Ing. Albrecht Kantelberg Registered at Amtsgericht Charlottenburg, HRB 110081 B www.windnovation.com Certified according to ISO 9001:2008 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WINDnovation_Logo_Email.jpg Type: image/jpeg Size: 80199 bytes Desc: not available URL: From david.gobbi at gmail.com Thu Jan 28 12:04:53 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 28 Jan 2016 10:04:53 -0700 Subject: [vtkusers] How to Vizualize images with vtk2.2 ? In-Reply-To: References: Message-ID: Hi Marie, The three lines of code that you posted should work fine with 2.2, as long as the vtkImageData object is valid. I'm fairly sure that 2.2 had the "Print" method, so you should be able to do some debugging like this: image->Print(cout); I can't help you with the documentation... when I was learning VTK (back in the days of VTK 2.1), most of the insight that I gained came from reading the header files and experimenting with little test programs. - David On Thu, Jan 28, 2016 at 8:31 AM, David E DeMarle wrote: > Avoiding the: "Why such an old /*1998*/ version?" and "You should really > update." discussion > > The oldest doxygen documentation we have on the server is: > http://www.vtk.org/doc/release/3/html/ > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Thu, Jan 28, 2016 at 8:31 AM, Rozand, Marie (GE Healthcare, consultant) > wrote: > >> Dear all, >> >> >> >> I can?t use newer version of vtk so I would like to know how to vizualize >> an vtkImageData with version 2.2 in c++ >> >> I created a vtkImageViewer and gave it my image : >> >> vtkImageViewer * viewer = vtkImageViewer::New(); >> >> viewer->SetInput(image); >> >> viewer->Render(); >> >> >> >> The problem is that when I run my program it crashes during the Render() >> function. Do I need a kind of Interactor ? If so what is the equivalent >> class name in vtk 2.2 ? Or is it another problem ? >> >> >> >> Furthermore, if someone know where I could find or buy a documentation >> about this old version, it would be great. >> >> >> >> Marie Rozand >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jan 28 12:22:12 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 28 Jan 2016 12:22:12 -0500 Subject: [vtkusers] vtkpython on mac os? In-Reply-To: References: <20160126205036.8AFBFE4936@public.kitware.com> Message-ID: @Tom I haven't looked at it at all yet but I have a hunch.I am wondering if this is an artifact of how, starting with El Captain, the system python is kind of locked down by be Apple. If that is the case, switching to a third party python (from fink, macports or homebrew) would solve it. If not that, my next guess is that it is the library path management we do in the packaging process to make redistributable binaries that causes the problem. For windows and mac we do these things in different (platform specific) ways which would explain why it can be done on linux and windows but not mac. In my personal use I either build vtk from source (most of my work) or run from the bin directory (for intro to vtk courses). However I really would like to get this nailed down. Likely then we can incorporate the binaries into a wheel and make "pip install vtk" just work. Unfortunately it is unknown when/if I'll find the time to investigate thoroughly (or solve it once I do eh?). FWIW - to build the binaries we use this superbuild: https://gitlab.kitware.com/vtk/vtk-superbuild David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Jan 27, 2016 at 8:53 PM, Bernard Giroux wrote: > Hi, > > My results on el cap: > > I?ve got some home made modules, so I prefer to compile VTK myself. I > compile VTK after configuring this way (no mention about my modules here?) > > In a build directory: > > cmake -DCMAKE_BUILD_TYPE=Release \ > -DCMAKE_INSTALL_PREFIX=/usr/local/VTK-7.0.0.rc2 \ > -DVTK_WRAP_PYTHON=ON \ > -DCMAKE_MACOSX_RPATH=ON \ > -DCMAKE_INSTALL_NAME_DIR=/usr/local/VTK-7.0.0.rc2/lib /path/to/vtksource > > make > sudo make install > > In /usr/local, I make a symbolic link pointing to the right directory: > > cd /usr/local > sudo ln -s VTK-7.0.0.rc2 VTK > > Finally, in my $HOME/.bash_profile, I put > > export PYTHONPATH=/usr/local/VTK/lib/python2.7/site-packages > > > FWIW, I run the macports version of python. > > > > > > Le 27 janv. 2016 ? 19:31, Tom Parker > a ?crit : > > > > To share my results, I never got this completely working on my mac El > Capitan, but these environment variables work for me on W10, VTK 7 and VS > 2015 Community Edition. > > > > VTK Python environment variables > > C:\Python27\ > > C:\Python27\Scripts > > C:\Software\VTK-7.0.0.rc2\bin\bin\Debug > > C:\Software\VTK-7.0.0.rc2\bin\lib\Debug > > > > PYTHONPATH > > > > C:\Python27\lib > > C:\Software\VTK-7.0.0.rc2\bin\bin\Debug > > C:\Software\VTK-7.0.0.rc2\bin\lib\Debug > > C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python > > C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python\vtk > > > > Now I can run python.exe and successfully import vtk. > > > > And run all the python examples I?ve tested so far. > > > > Regards, > > Tom > > > > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Tom Parker > > Sent: Tuesday, January 26, 2016 4:25 PM > > To: Meehan, Bernard ; vtkusers at vtk.org > > Subject: Re: [vtkusers] vtkpython on mac os? > > > > Thank you! I?ll test it and let everyone know if it works for me. > > > > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Meehan, > Bernard > > Sent: Tuesday, January 26, 2016 2:41 PM > > To: vtkusers at vtk.org > > Subject: Re: [vtkusers] vtkpython on mac os? > > > > This is what I am using in my ~./bash_profile, you may not need all of > it, but it worked once and I just never changed it. > > > > export VTK=~/VTK > > export PATH=$PATH:$VTK/bin > > export PYTHONPATH=$PYTHONPATH:$VTK/lib/python2.7/site-packages > > export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$VTK/lib > > > > > > From: vtkusers on behalf of Tom Parker < > tomparker at personaltelemetry.com> > > Date: Tuesday, January 26, 2016 at 12:18 PM > > To: "vtkusers at vtk.org" > > Subject: [vtkusers] vtkpython on mac os? > > > > > > Hello All, > > I?ve download the latest vtkpython-7.0.0.rc2-Darwin-64bit.dmg to my mac > with El Capitan and I?ve fought with it for hours. > > I can run the examples successfully, but only from the > /Applications/vtkpython/bin folder, if I try from any other folder I get > the message ?ImportError: No module named vtk? > > After reading the docs, googling and reading the mailing lists I?ve > tried every combination of PYTHONHOME, PYTHONPATH, LD_LIBRARY_PATH and > DYLD_LIBRARY_PATH I can imagine with no joy. > > I have gotten it working on my linux systems before so I can?t imagine > what I?m doing wrong. > > Can anyone share a set of working path and environment variables with me? > > Thank you, > > Tom > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > 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 tomparker at personaltelemetry.com Thu Jan 28 12:59:04 2016 From: tomparker at personaltelemetry.com (Tom Parker) Date: Thu, 28 Jan 2016 17:59:04 +0000 Subject: [vtkusers] vtkpython on mac os? In-Reply-To: References: <20160126205036.8AFBFE4936@public.kitware.com> Message-ID: OK, I?ll keep working on it in my spare time, I used to always build VTK from source on a previous project working for the Air Force with no problems. But I decided to try the prebuilt binaries to save the trouble with no joy, Let me wipe my system and try again. Thanks for the info. Tom From: David E DeMarle [mailto:dave.demarle at kitware.com] Sent: Thursday, January 28, 2016 11:22 AM To: Bernard Giroux Cc: Tom Parker ; vtkusers at vtk.org; Matthew Brett Subject: Re: [vtkusers] vtkpython on mac os? @Tom I haven't looked at it at all yet but I have a hunch.I am wondering if this is an artifact of how, starting with El Captain, the system python is kind of locked down by be Apple. If that is the case, switching to a third party python (from fink, macports or homebrew) would solve it. If not that, my next guess is that it is the library path management we do in the packaging process to make redistributable binaries that causes the problem. For windows and mac we do these things in different (platform specific) ways which would explain why it can be done on linux and windows but not mac. In my personal use I either build vtk from source (most of my work) or run from the bin directory (for intro to vtk courses). However I really would like to get this nailed down. Likely then we can incorporate the binaries into a wheel and make "pip install vtk" just work. Unfortunately it is unknown when/if I'll find the time to investigate thoroughly (or solve it once I do eh?). FWIW - to build the binaries we use this superbuild: https://gitlab.kitware.com/vtk/vtk-superbuild David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Jan 27, 2016 at 8:53 PM, Bernard Giroux > wrote: Hi, My results on el cap: I?ve got some home made modules, so I prefer to compile VTK myself. I compile VTK after configuring this way (no mention about my modules here?) In a build directory: cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr/local/VTK-7.0.0.rc2 \ -DVTK_WRAP_PYTHON=ON \ -DCMAKE_MACOSX_RPATH=ON \ -DCMAKE_INSTALL_NAME_DIR=/usr/local/VTK-7.0.0.rc2/lib /path/to/vtksource make sudo make install In /usr/local, I make a symbolic link pointing to the right directory: cd /usr/local sudo ln -s VTK-7.0.0.rc2 VTK Finally, in my $HOME/.bash_profile, I put export PYTHONPATH=/usr/local/VTK/lib/python2.7/site-packages FWIW, I run the macports version of python. > Le 27 janv. 2016 ? 19:31, Tom Parker > a ?crit : > > To share my results, I never got this completely working on my mac El Capitan, but these environment variables work for me on W10, VTK 7 and VS 2015 Community Edition. > > VTK Python environment variables > C:\Python27\ > C:\Python27\Scripts > C:\Software\VTK-7.0.0.rc2\bin\bin\Debug > C:\Software\VTK-7.0.0.rc2\bin\lib\Debug > > PYTHONPATH > > C:\Python27\lib > C:\Software\VTK-7.0.0.rc2\bin\bin\Debug > C:\Software\VTK-7.0.0.rc2\bin\lib\Debug > C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python > C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python\vtk > > Now I can run python.exe and successfully import vtk. > > And run all the python examples I?ve tested so far. > > Regards, > Tom > > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Tom Parker > Sent: Tuesday, January 26, 2016 4:25 PM > To: Meehan, Bernard >; vtkusers at vtk.org > Subject: Re: [vtkusers] vtkpython on mac os? > > Thank you! I?ll test it and let everyone know if it works for me. > > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Meehan, Bernard > Sent: Tuesday, January 26, 2016 2:41 PM > To: vtkusers at vtk.org > Subject: Re: [vtkusers] vtkpython on mac os? > > This is what I am using in my ~./bash_profile, you may not need all of it, but it worked once and I just never changed it. > > export VTK=~/VTK > export PATH=$PATH:$VTK/bin > export PYTHONPATH=$PYTHONPATH:$VTK/lib/python2.7/site-packages > export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$VTK/lib > > > From: vtkusers > on behalf of Tom Parker > > Date: Tuesday, January 26, 2016 at 12:18 PM > To: "vtkusers at vtk.org" > > Subject: [vtkusers] vtkpython on mac os? > > > Hello All, > I?ve download the latest vtkpython-7.0.0.rc2-Darwin-64bit.dmg to my mac with El Capitan and I?ve fought with it for hours. > I can run the examples successfully, but only from the /Applications/vtkpython/bin folder, if I try from any other folder I get the message ?ImportError: No module named vtk? > After reading the docs, googling and reading the mailing lists I?ve tried every combination of PYTHONHOME, PYTHONPATH, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH I can imagine with no joy. > I have gotten it working on my linux systems before so I can?t imagine what I?m doing wrong. > Can anyone share a set of working path and environment variables with me? > Thank you, > Tom > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 yumin.yuan at kitware.com Thu Jan 28 13:32:34 2016 From: yumin.yuan at kitware.com (Yumin Yuan) Date: Thu, 28 Jan 2016 13:32:34 -0500 Subject: [vtkusers] Hide non visible labels on a 3d model In-Reply-To: References: Message-ID: Hi Fernando, You got a quite complicated pipeline here :). Just a thought without knowing all the details, you may try to decrease the Tolerance value in vtkSelectVisiblePoints. The default value might not work well with your data. Yumin On Thu, Jan 28, 2016 at 11:23 AM, Fernando Nellmeldin < f.nellmeldin at open-engineering.com> wrote: > Hello. > Does anyone has any tips? > Thank you. > > 2016-01-25 10:39 GMT+01:00 Fernando Nellmeldin < > f.nellmeldin at open-engineering.com>: > >> Hello. >> I'm trying to show the values of a contour as labels. Each label is fixed >> to a point in the contour. I do not want to show the labels that are >> anchored to points that are not visible. >> >> To achieve this, I followed these two examples: >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LabelContours >> >> http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/Annotation/Python/labeledMesh.py >> >> Unfortunately, the removal of hidden points (and thus, of labels) is not >> working as expected. I attach three pictures of the behavior when I move >> the camera. Look at the values on the top (365 and 399). >> >> The Pipeline I am using is the following: >> vtkUnstructuredGrid -> vtkGeometryFilter -> vtkContourFilter -> >> vtkStripper -> (create a vtkPolyData with one point of each contour) -> >> vtkSelectVisiblePoints -> vtkLabeledDataMapper -> vtkActor2D. >> >> I am using VTK 5.10 but I tried with VTK 6.3 and the problem is worse >> (nothing is hidden). This is under Windows 8.1. >> >> Any ideas? >> >> Thank you. >> >> > > > -- > *Fernando NELLMELDIN* > Software Engineer > *_______________________________________________________________* > > *Open Engineering s.a.* > > Rue Bois Saint-Jean 15/1 > B-4102 Seraing (Belgium) > Tel: +32.4.353.30.34 > > http://www.open-engineering.com > > https://www.linkedin.com/company/open-engineering?trk=biz-companies-cym > > > *_________________________________________________________________________* > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Vikash.Gupta at loni.usc.edu Thu Jan 28 14:55:02 2016 From: Vikash.Gupta at loni.usc.edu (Vikash Gupta) Date: Thu, 28 Jan 2016 19:55:02 +0000 Subject: [vtkusers] python 2.7 and vtk In-Reply-To: References: <4b6ef355829145d0adf74dfebceaadf0@ex02.ini.usc.edu>, Message-ID: <89414da4de63448596dc994386ea7294@ex01.ini.usc.edu> Hi Tom, I tried few things too but they dont seem to work.. so I am thinking if there is a work around For example even if I use the vtkPython, it doesn't contain few packages I need. At the end f the day it will be nice to have one environment so that I can install Mayavi too. I tried installing VTK from scratch but it runs into errors too if I enable python build. So, I am very stuck at the moment Thanks for all the help Vikash ________________________________ From: Tom Parker Sent: Thursday, January 28, 2016 8:26 AM To: Vikash Gupta; vtkusers at vtk.org Subject: RE: python 2.7 and vtk Vikash, I am working on the same issue. To share my results, I never got this completely working on my mac El Capitan, but these environment variables work for me on W10, VTK 7 and VS 2015 Community Edition with a 64 bit build. These are the environment variables I edited for VTK Python 2.7 on Windows. PATH C:\Python27\ C:\Python27\Scripts C:\Software\VTK-7.0.0.rc2\bin\bin\Debug C:\Software\VTK-7.0.0.rc2\bin\lib\Debug PYTHONPATH C:\Python27\lib C:\Software\VTK-7.0.0.rc2\bin\bin\Debug C:\Software\VTK-7.0.0.rc2\bin\lib\Debug C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python C:\Software\VTK-7.0.0.rc2\bin\Wrapping\Python\vtk Now I can run python.exe and successfully import vtk and run most python examples without error. From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Vikash Gupta Sent: Wednesday, January 27, 2016 6:16 PM To: vtkusers at vtk.org Subject: [vtkusers] python 2.7 and vtk Hi everyone, This might be a solved problem but I was not able to find a solution that worked for me. So, if someone can help me out it will be really great. I am trying to use vtkpython. I cannot install it using pip. So, I found the binary packages for python on the vtk website. The vtkPython executable seems like a python interpreter. Is there a way I could use the classical Python 2.7 interpreter and still use the vtk modules. The reason, I am more inclined to use my old interpreter because I can use pip for installing packages. Any help ?? Thanks Vikash -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthew.brett at gmail.com Thu Jan 28 15:18:23 2016 From: matthew.brett at gmail.com (Matthew Brett) Date: Thu, 28 Jan 2016 12:18:23 -0800 Subject: [vtkusers] vtkpython on mac os? In-Reply-To: References: <20160126205036.8AFBFE4936@public.kitware.com> Message-ID: Hi, On Thu, Jan 28, 2016 at 9:22 AM, David E DeMarle wrote: > @Tom > > I haven't looked at it at all yet but I have a hunch.I am wondering if this > is an artifact of how, starting with El Captain, the system python is kind > of locked down by be Apple. If that is the case, switching to a third party > python (from fink, macports or homebrew) would solve it. > > If not that, my next guess is that it is the library path management we do > in the packaging process to make redistributable binaries that causes the > problem. For windows and mac we do these things in different (platform > specific) ways which would explain why it can be done on linux and windows > but not mac. > > In my personal use I either build vtk from source (most of my work) or run > from the bin directory (for intro to vtk courses). However I really would > like to get this nailed down. Likely then we can incorporate the binaries > into a wheel and make "pip install vtk" just work. Unfortunately it is > unknown when/if I'll find the time to investigate thoroughly (or solve it > once I do eh?). Actually, now I think about it, with the benefit of a couple of years of building wheels, I wonder whether this might be possible with only a small amount of effort. My plan would be to build vtk with Python bindings using the standard recipe, and the hoover up the pieces into the wheel directory structure afterwards. The previous block that I ran into was the following problem : http://vtk.1045678.n5.nabble.com/Fwd-OSX-build-links-directly-with-Python-binary-avoidable-td5731734.html Specifically, the last time I tried, the vtk libraries contained absolute path links to the Python dynamic lib, meaning that the built vtk could only be used with Python at exactly that path, whereas wheels must work for Pythons at any path, such as Pythons in virtualenvs. The fix David G suggested was to use "-undefined dynamic_lookup" when linking to Python. How hard would it be to apply that fix? (I'm afraid my cmake-fu is not good). With that done, it's possible I could work out the rest (no promises). Cheers, Matthew From newcfd at yahoo.com Thu Jan 28 18:56:08 2016 From: newcfd at yahoo.com (newcfd) Date: Thu, 28 Jan 2016 16:56:08 -0700 (MST) Subject: [vtkusers] Memory issue in multiblock data set rendering In-Reply-To: <1453859404691-5736180.post@n5.nabble.com> References: <1453859404691-5736180.post@n5.nabble.com> Message-ID: <1454025368754-5736236.post@n5.nabble.com> nobody knows? -- View this message in context: http://vtk.1045678.n5.nabble.com/Memory-issue-in-multiblock-data-set-rendering-tp5736180p5736236.html Sent from the VTK - Users mailing list archive at Nabble.com. From michkapopoff at gmail.com Fri Jan 29 02:37:50 2016 From: michkapopoff at gmail.com (Michka Popoff) Date: Fri, 29 Jan 2016 08:37:50 +0100 Subject: [vtkusers] vtkpython on mac os? In-Reply-To: References: <20160126205036.8AFBFE4936@public.kitware.com> Message-ID: Hi I made the ?-undefined dynamic_lookup? change in ITK some time ago. This is even now required by the homebrew package managers on OS X. Citing myself from http://review.source.kitware.com/#/c/20072/1, (were you also can find the changes I made in cmake to make it work): > target_link_libraries() would pass the PYTHON_LIBRARY down to the linker. > For example, when using the python version coming from homebrew: > -I/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > Trying to use itk from OS X's system Python would then result in the following error: > Fatal Python error: PyThreadState_Get: no current thread > Abort trap: 6 > > A solution is to not pass the PYTHON_LIBRARY, and use the -undefined dynamic_lookup flag. > > I tested this on OS X 10.10 with latest clang. ITK can the be imported from all Pythons with > are ABI compatible (2.7.x in our case). Tested with OS X Python 2.7.6 and homebrew's Python 2.7.10. > > I only allowed this for Clang; not sure if gcc supports this. Maybe some older gcc 4.2 versions on OS X. > > OS X supports the flag since 10.3, see: > https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/MachOTopics/1-Articles/executing_files.html > > Using otool on the .so modules (otool -L _ITKCommonPython.so) shows that there is no more reference of the python library > when using the -undefined dynamic_lookup flag. > > This idea was originally proposed by Tim Smith, on the homebrew-science repo. An equivalent patch is also waiting for review in simpleITK (http://review.source.kitware.com/#/c/20442/) Michka > On 28 Jan 2016, at 21:18, Matthew Brett wrote: > > Hi, > > On Thu, Jan 28, 2016 at 9:22 AM, David E DeMarle > > wrote: >> @Tom >> >> I haven't looked at it at all yet but I have a hunch.I am wondering if this >> is an artifact of how, starting with El Captain, the system python is kind >> of locked down by be Apple. If that is the case, switching to a third party >> python (from fink, macports or homebrew) would solve it. >> >> If not that, my next guess is that it is the library path management we do >> in the packaging process to make redistributable binaries that causes the >> problem. For windows and mac we do these things in different (platform >> specific) ways which would explain why it can be done on linux and windows >> but not mac. >> >> In my personal use I either build vtk from source (most of my work) or run >> from the bin directory (for intro to vtk courses). However I really would >> like to get this nailed down. Likely then we can incorporate the binaries >> into a wheel and make "pip install vtk" just work. Unfortunately it is >> unknown when/if I'll find the time to investigate thoroughly (or solve it >> once I do eh?). > > Actually, now I think about it, with the benefit of a couple of years > of building wheels, I wonder whether this might be possible with only > a small amount of effort. > > My plan would be to build vtk with Python bindings using the standard > recipe, and the hoover up the pieces into the wheel directory > structure afterwards. > > The previous block that I ran into was the following problem : > http://vtk.1045678.n5.nabble.com/Fwd-OSX-build-links-directly-with-Python-binary-avoidable-td5731734.html > > Specifically, the last time I tried, the vtk libraries contained > absolute path links to the Python dynamic lib, meaning that the built > vtk could only be used with Python at exactly that path, whereas > wheels must work for Pythons at any path, such as Pythons in > virtualenvs. The fix David G suggested was to use "-undefined > dynamic_lookup" when linking to Python. How hard would it be to apply > that fix? (I'm afraid my cmake-fu is not good). With that done, it's > possible I could work out the rest (no promises). > > Cheers, > > Matthew > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.kozlovsky at fr.thalesgroup.com Fri Jan 29 02:47:25 2016 From: nicolas.kozlovsky at fr.thalesgroup.com (KOZLOVSKY Nicolas) Date: Fri, 29 Jan 2016 08:47:25 +0100 Subject: [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D) References: <7A18A422C44BE34E947C1F96625E60BD08965128@EXDAG0-A1.intra.cea.fr> Message-ID: Hi all Just to be sure, I tried with VTK 6.1.0 and it worked perfectly well with qmake compilation. I have tried also with VTK7.0 rc2, but same results as with VTK 6.3 ==> runtime error De : KOZLOVSKY Nicolas Envoy? : mardi 26 janvier 2016 09:21 ? : vtkusers at vtk.org Objet : RE: Error at runtime using qmake for building project (vtkContextDevice2D) Hi Thanks for the files, I looked to the files and I saw that we did the same things for openglRenderer initialization. The difference I saw is the use of the render : QVTKWidget *vtkWidget = new QVTKWidget; setCentralWidget(vtkWidget); vtkSmartPointer contextView = vtkSmartPointer::New(); contextView.Get()->SetRenderWindow(vtkWidget->GetRenderWindow()); contextView->GetRenderWindow()->SetSize(800, 800); this->resize(800, 800); In fact when in debug mode, the run stops in file vtkContextActor.cxx in function RenderOverlay this->Context->GetDevice()->SetViewportSize(vtkVector2i(size)); It seems that the context is not initialized. De : MOUSSAUD David 244079 [mailto:David.MOUSSAUD at cea.fr] Envoy? : lundi 25 janvier 2016 14:18 ? : KOZLOVSKY Nicolas; vtkusers at vtk.org Objet : RE:Error at runtime using qmake for building project (vtkContextDevice2D) Hi Nicolas, A couple weeks ago, i have joined my qmake project to an other thread (http://public.kitware.com/pipermail/vtkusers/2016-January/093650.html) Here it is again attached in this email. I'm using also vtk 6.3. Regards, David. ________________________________ De : vtkusers [vtkusers-bounces at vtk.org] de la part de KOZLOVSKY Nicolas [nicolas.kozlovsky at fr.thalesgroup.com] Envoy? : lundi 25 janvier 2016 12:57 ? : vtkusers at vtk.org Objet : [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D) Hi all I try to use QVTKWidget in a big project using qmake for building. Each time I run my code, I got this error under Linux Ubuntu 1510) and VTK 6.3 : In VTK-6.3.0/Rendering/Context2D/vtkContextDevice2D.cxx, line 27 Error: no override found for 'vtkContextDevice2D'. I read a lot about this and put in the main.cpp : #include VTK_MODULE_INIT(vtkRenderingOpenGL) VTK_MODULE_INIT(vtkInteractionStyle) I have always the same error at runtime. I try also to add this directive to .pro file: DEFINES += "\"vtkRenderingCore_AUTOINIT=1 (vtkRenderingOpenGL)\"" But again same error at runtime. If now I build the project with cmake, I have no problem everything is running fine. How can I build with qmake ??? Thanks for any clues Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: M Nicolas KOZLOVSKY.vcf Type: text/x-vcard Size: 1589 bytes Desc: M Nicolas KOZLOVSKY.vcf URL: From axkibe at gmail.com Fri Jan 29 04:41:15 2016 From: axkibe at gmail.com (Axel Kittenberger) Date: Fri, 29 Jan 2016 10:41:15 +0100 Subject: [vtkusers] VTK bindings to Node.js/V8/JavaScript In-Reply-To: References: Message-ID: > > Support for array parameters is important, because those are used > throughout VTK. > I'll take a look at it. I suppose it would be nice to have JavaScript standard polymorph arrays supported as well as typed arrays. First needs a check for each value in the Array to be correct type in the wrapper and a copy to make it a C array to hand it on, second allows direct access but needs the JavaScript coder to declare them that way beforehand like Float64Array(). For types that aren't derived from vtkObjectBase, the Python wrappers copy > the object instead of using a reference count. So types like vtkVariant > and vtkTuple are wrapped in python as long as they have a copy constructor. > I see, so the instance gets simply deleted when the wrapper gets garbage collected and no native should keep a pointer to those. Stuff that doesn't have getters/setters like vtkVolumeRayCastDynamicInfo can be safely skipped tough, right? PS: I just realized I glossed over callbacks as well which the Python wrapper supports. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joachim.pouderoux at kitware.com Fri Jan 29 04:55:06 2016 From: joachim.pouderoux at kitware.com (Joachim Pouderoux) Date: Fri, 29 Jan 2016 10:55:06 +0100 Subject: [vtkusers] ANN: VTK & ParaView Training Course in Lyon, France, March 15-16, 2016 Message-ID: Kitware will be holding 2 days of courses on VTK and ParaView on March 15-16, 2016 in Lyon, France. Please visit our web site for more information and registration details at either: VTK: http://training.kitware.fr/browse/122 (in English) or http://formations.kitware.fr/browse/122 (in French) ParaView: http://training.kitware.fr/browse/121 (in English) or http://formations.kitware.fr/browse/121 (in French) Note that the courses will be taught in English. If you have any question, please contact us at formations at http://www.kitware.fr Thank you, *Joachim Pouderoux* *PhD, Technical Expert* *Kitware SAS * -------------- next part -------------- An HTML attachment was scrubbed... URL: From pia.langoth at cads.at Fri Jan 29 06:44:49 2016 From: pia.langoth at cads.at (p.l.) Date: Fri, 29 Jan 2016 04:44:49 -0700 (MST) Subject: [vtkusers] vtk dicom reslice axial, coronal and sagittal view Message-ID: <1454067889598-5736244.post@n5.nabble.com> I have a problem with calculating the correct axial, coronal and sagittal images from a given DICOM series. I use the vtk-example in: VTK\Examples\ImageProcessing\Cxx\ImageSlicing.cxx : vtkSmartPointer dicomReader = vtkSmartPointer::New(); dicomReader->SetFileNames(sortedFileNames); dicomReader->SetDataScalarTypeToUnsignedChar(); dicomReader->AutoRescaleOn(); dicomReader->SetGlobalWarningDisplay(1); dicomReader->Update(); int* dicomExtent = new int[6]; dicomReader->GetDataExtent(dicomExtent); double* dicomOrigin = new double[3]; dicomReader->GetDataOrigin(dicomOrigin); double* dicomSpacing = new double[3]; dicomReader->GetDataSpacing(dicomSpacing); double dicomCenter[3]; dicomCenter[0] = dicomOrigin[0] + dicomSpacing[0] * 0.5 * (dicomExtent[0] + dicomExtent[1]); dicomCenter[1] = dicomOrigin[1] + dicomSpacing[1] * 0.5 * (dicomExtent[2] + dicomExtent[3]); dicomCenter[2] = dicomOrigin[2] + dicomSpacing[2] * 0.5 * (dicomExtent[4] + dicomExtent[5]); // Matrices for axial, coronal, sagittal, oblique view orientations static double axialElements[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; static double coronalElements[16] = { 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1 }; static double sagittalElements[16] = { 0, 0, -1, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1 }; //static double obliqueElements[16] = { // 1, 0, 0, 0, // 0, 0.866025, -0.5, 0, // 0, 0.5, 0.866025, 0, // 0, 0, 0, 1 }; // Set the slice orientation vtkSmartPointer resliceAxes = vtkSmartPointer::New(); resliceAxes->DeepCopy(axialElements); // Set the point through which to slice resliceAxes->SetElement(0, 3, dicomCenter[0]); resliceAxes->SetElement(1, 3, dicomCenter[1]); resliceAxes->SetElement(2, 3, dicomCenter[2]); // Extract a slice in the desired orientation vtkSmartPointer reslice = vtkSmartPointer::New(); reslice->SetInputConnection(dicomReader->GetOutputPort()); reslice->SetOutputDimensionality(2); reslice->SetResliceAxes(resliceAxes); reslice->SetInterpolationModeToLinear(); reslice->Update(); The problem is, that the matrices for the axial, coronal and sagittal orientation only work if the direction cosines form an identity matrix. But I have lots of DICOM series with arbitrary direction cosines, like: 0.758921/ 0.498738/ 0.418688/ -0.00570692/ 0.648034/ -0.76159 So I thought that I should use the direction cosines in the axial, coronal and sagittal matrix; this is my code: vtkSmartPointer dicomReader = vtkSmartPointer::New(); dicomReader->SetFileNames(sortedFileNames); dicomReader->SetDataScalarTypeToUnsignedChar(); dicomReader->AutoRescaleOn(); dicomReader->SetGlobalWarningDisplay(1); dicomReader->Update(); int* dicomExtent = new int[6]; dicomReader->GetDataExtent(dicomExtent); double* dicomOrigin = new double[3]; dicomReader->GetDataOrigin(dicomOrigin); double* dicomSpacing = new double[3]; dicomReader->GetDataSpacing(dicomSpacing); double dicomCenter[3]; dicomCenter[0] = dicomOrigin[0] + dicomSpacing[0] * 0.5 * (dicomExtent[0] + dicomExtent[1]); dicomCenter[1] = dicomOrigin[1] + dicomSpacing[1] * 0.5 * (dicomExtent[2] + dicomExtent[3]); dicomCenter[2] = dicomOrigin[2] + dicomSpacing[2] * 0.5 * (dicomExtent[4] + dicomExtent[5]); double* directionCosine = new double[6]; dicomReader->GetMedicalImageProperties()->GetDirectionCosine(directionCosine); double* xAxis = new double[3]; xAxis[0] = directionCosine[0]; xAxis[1] = directionCosine[1]; xAxis[2] = directionCosine[2]; double* yAxis = new double[3]; yAxis[0] = directionCosine[3]; yAxis[1] = directionCosine[4]; yAxis[2] = directionCosine[5]; vtkSmartPointer math = vtkSmartPointer::New(); double* zAxis = new double[3]; math->Cross(xAxis, yAxis, zAxis); // Matrices for axial, coronal, sagittal, oblique view orientations //xy static double axialElements[16] = { xAxis[0], yAxis[0], zAxis[0], 0, xAxis[1], yAxis[1], zAxis[1], 0, xAxis[2], yAxis[2], zAxis[2], 0, 0, 0, 0, 1 }; double* yCross = new double[3]; math->Cross(xAxis, zAxis, yCross); //xz static double coronalElements[16] = { xAxis[0], zAxis[0], yCross[0], 0, xAxis[1], zAxis[1], yCross[1], 0, xAxis[2], zAxis[2], yCross[2], 0, 0, 0, 0, 1 }; double* xCross = new double[3]; math->Cross(yAxis, zAxis, xCross); //yz static double sagittalElements[16] = { yAxis[0], zAxis[0], xCross[0], 0, yAxis[1], zAxis[1], xCross[1], 0, yAxis[2], zAxis[2], xCross[2], 0, 0, 0, 0, 1 }; //static double obliqueElements[16] = { // 1, 0, 0, 0, // 0, 0.866025, -0.5, 0, // 0, 0.5, 0.866025, 0, // 0, 0, 0, 1 }; // Set the slice orientation vtkSmartPointer resliceAxes = vtkSmartPointer::New(); resliceAxes->DeepCopy(axialElements); // Set the point through which to slice resliceAxes->SetElement(0, 3, dicomCenter[0]); resliceAxes->SetElement(1, 3, dicomCenter[1]); resliceAxes->SetElement(2, 3, dicomCenter[2]); // Extract a slice in the desired orientation vtkSmartPointer reslice = vtkSmartPointer::New(); reslice->SetInputConnection(dicomReader->GetOutputPort()); reslice->SetOutputDimensionality(2); reslice->SetResliceAxes(resliceAxes); reslice->SetInterpolationModeToLinear(); reslice->Update(); But it does not work. I also tried to use the inverse of the direction cosines, but the result is not correct. Can someone help me with my problem? Thank you in advance! Kind regards, Pia -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-dicom-reslice-axial-coronal-and-sagittal-view-tp5736244.html Sent from the VTK - Users mailing list archive at Nabble.com. From Pia.Langoth at cads.at Fri Jan 29 06:47:06 2016 From: Pia.Langoth at cads.at (Pia Langoth) Date: Fri, 29 Jan 2016 12:47:06 +0100 Subject: [vtkusers] new post Message-ID: <418225943B548F408A9D24A0B52289FC05939E4CF5D0@lisa.cads.local> vtk dicom reslice axial, coronal and sagittal view I have a problem with calculating the correct axial, coronal and sagittal images from a given DICOM series. I use the vtk-example in: VTK\Examples\ImageProcessing\Cxx\ImageSlicing.cxx : vtkSmartPointer dicomReader = vtkSmartPointer::New(); dicomReader->SetFileNames(sortedFileNames); dicomReader->SetDataScalarTypeToUnsignedChar(); dicomReader->AutoRescaleOn(); dicomReader->SetGlobalWarningDisplay(1); dicomReader->Update(); int* dicomExtent = new int[6]; dicomReader->GetDataExtent(dicomExtent); double* dicomOrigin = new double[3]; dicomReader->GetDataOrigin(dicomOrigin); double* dicomSpacing = new double[3]; dicomReader->GetDataSpacing(dicomSpacing); double dicomCenter[3]; dicomCenter[0] = dicomOrigin[0] + dicomSpacing[0] * 0.5 * (dicomExtent[0] + dicomExtent[1]); dicomCenter[1] = dicomOrigin[1] + dicomSpacing[1] * 0.5 * (dicomExtent[2] + dicomExtent[3]); dicomCenter[2] = dicomOrigin[2] + dicomSpacing[2] * 0.5 * (dicomExtent[4] + dicomExtent[5]); // Matrices for axial, coronal, sagittal, oblique view orientations static double axialElements[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; static double coronalElements[16] = { 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1 }; static double sagittalElements[16] = { 0, 0, -1, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1 }; //static double obliqueElements[16] = { // 1, 0, 0, 0, // 0, 0.866025, -0.5, 0, // 0, 0.5, 0.866025, 0, // 0, 0, 0, 1 }; // Set the slice orientation vtkSmartPointer resliceAxes = vtkSmartPointer::New(); resliceAxes->DeepCopy(axialElements); // Set the point through which to slice resliceAxes->SetElement(0, 3, dicomCenter[0]); resliceAxes->SetElement(1, 3, dicomCenter[1]); resliceAxes->SetElement(2, 3, dicomCenter[2]); // Extract a slice in the desired orientation vtkSmartPointer reslice = vtkSmartPointer::New(); reslice->SetInputConnection(dicomReader->GetOutputPort()); reslice->SetOutputDimensionality(2); reslice->SetResliceAxes(resliceAxes); reslice->SetInterpolationModeToLinear(); reslice->Update(); The problem is, that the matrices for the axial, coronal and sagittal orientation only work if the direction cosines form an identity matrix. But I have lots of DICOM series with arbitrary direction cosines, like: 0.758921/ 0.498738/ 0.418688/ -0.00570692/ 0.648034/ -0.76159 So I thought that I should use the direction cosines in the axial, coronal and sagittal matrix; this is my code: vtkSmartPointer dicomReader = vtkSmartPointer::New(); dicomReader->SetFileNames(sortedFileNames); dicomReader->SetDataScalarTypeToUnsignedChar(); dicomReader->AutoRescaleOn(); dicomReader->SetGlobalWarningDisplay(1); dicomReader->Update(); int* dicomExtent = new int[6]; dicomReader->GetDataExtent(dicomExtent); double* dicomOrigin = new double[3]; dicomReader->GetDataOrigin(dicomOrigin); double* dicomSpacing = new double[3]; dicomReader->GetDataSpacing(dicomSpacing); double dicomCenter[3]; dicomCenter[0] = dicomOrigin[0] + dicomSpacing[0] * 0.5 * (dicomExtent[0] + dicomExtent[1]); dicomCenter[1] = dicomOrigin[1] + dicomSpacing[1] * 0.5 * (dicomExtent[2] + dicomExtent[3]); dicomCenter[2] = dicomOrigin[2] + dicomSpacing[2] * 0.5 * (dicomExtent[4] + dicomExtent[5]); double* directionCosine = new double[6]; dicomReader->GetMedicalImageProperties()->GetDirectionCosine(directionCosine); double* xAxis = new double[3]; xAxis[0] = directionCosine[0]; xAxis[1] = directionCosine[1]; xAxis[2] = directionCosine[2]; double* yAxis = new double[3]; yAxis[0] = directionCosine[3]; yAxis[1] = directionCosine[4]; yAxis[2] = directionCosine[5]; vtkSmartPointer math = vtkSmartPointer::New(); double* zAxis = new double[3]; math->Cross(xAxis, yAxis, zAxis); // Matrices for axial, coronal, sagittal, oblique view orientations //xy static double axialElements[16] = { xAxis[0], yAxis[0], zAxis[0], 0, xAxis[1], yAxis[1], zAxis[1], 0, xAxis[2], yAxis[2], zAxis[2], 0, 0, 0, 0, 1 }; double* yCross = new double[3]; math->Cross(xAxis, zAxis, yCross); //xz static double coronalElements[16] = { xAxis[0], zAxis[0], yCross[0], 0, xAxis[1], zAxis[1], yCross[1], 0, xAxis[2], zAxis[2], yCross[2], 0, 0, 0, 0, 1 }; double* xCross = new double[3]; math->Cross(yAxis, zAxis, xCross); //yz static double sagittalElements[16] = { yAxis[0], zAxis[0], xCross[0], 0, yAxis[1], zAxis[1], xCross[1], 0, yAxis[2], zAxis[2], xCross[2], 0, 0, 0, 0, 1 }; //static double obliqueElements[16] = { // 1, 0, 0, 0, // 0, 0.866025, -0.5, 0, // 0, 0.5, 0.866025, 0, // 0, 0, 0, 1 }; // Set the slice orientation vtkSmartPointer resliceAxes = vtkSmartPointer::New(); resliceAxes->DeepCopy(axialElements); // Set the point through which to slice resliceAxes->SetElement(0, 3, dicomCenter[0]); resliceAxes->SetElement(1, 3, dicomCenter[1]); resliceAxes->SetElement(2, 3, dicomCenter[2]); // Extract a slice in the desired orientation vtkSmartPointer reslice = vtkSmartPointer::New(); reslice->SetInputConnection(dicomReader->GetOutputPort()); reslice->SetOutputDimensionality(2); reslice->SetResliceAxes(resliceAxes); reslice->SetInterpolationModeToLinear(); reslice->Update(); But it does not work. I also tried to use the inverse of the direction cosines, but the result is not correct. Can someone help me with my problem? Thank you in advance! Kind regards, Pia -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jan 29 08:14:46 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 29 Jan 2016 06:14:46 -0700 Subject: [vtkusers] VTK bindings to Node.js/V8/JavaScript In-Reply-To: References: Message-ID: On Fri, Jan 29, 2016 at 2:41 AM, Axel Kittenberger wrote: > > Stuff that doesn't have getters/setters like vtkVolumeRayCastDynamicInfo > can be safely skipped tough, right? > Yes. Classes like that aren't part of the API, they're just helpers for other classes. Also note that the Tcl and Java wrappers only wrap vtkObjectBase-derived classes, because that covers around 98% of the useful API classes. > PS: I just realized I glossed over callbacks as well which the Python > wrapper supports. > Callbacks are always fun to wrap. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Fri Jan 29 09:04:10 2016 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Fri, 29 Jan 2016 15:04:10 +0100 Subject: [vtkusers] SetWritePiece behaving wrong? In-Reply-To: <5656EADC.7050609@mh-hannover.de> References: <5656EADC.7050609@mh-hannover.de> Message-ID: <56AB715A.60409@mh-hannover.de> With Joachim's help I figured I first need a way to write VTPs with piece information in order for vtkXMLPolyDataReader to be able to stream these. The only working way I found so far is using vtkExtractPolyDataPiece and vtkXMLPolyDataWriter with SetNumberOfPieces as in: https://github.com/romangrothausmann/VTK-CLIs/blob/master/vtp2multi-piece_vtp.cxx Trying to get more equally sized pieces I replaced vtkExtractPolyDataPiece with vtkOBBDicer / vtkKdTree followed by vtkThreshold / vtkExtractCells: https://github.com/romangrothausmann/VTK-CLIs/blob/master/dice.cxx https://github.com/romangrothausmann/VTK-CLIs/blob/master/d3.cxx This basically seems to work, but writer->SetWritePiece(i) seems to overwrite former pieces even with writer->SetDataModeToAppended(). How can I get append behaviour or otherwise write a VTP with piece info? Why does it work with vtkExtractPolyDataPiece? Any help or hints are very much appreciated Roman On 26/11/15 12:19, Grothausmann, Roman Dr. wrote: > Dear mailing list members, > > > Due to apparent index limitations for arrays I'm in the need to process a > vtkPolyData in chunks. However, my streaming approach reads and processes all > data not just sub-extents. Therefore, I tried to write a minimal example of > streamed reading using vtkXMLPolyDataReader which is supposed to support > streaming according to the docs. However this simple example seems not to stream: > https://github.com/romangrothausmann/VTK-CLIs/blob/master/read_SDP.cxx > I've only found unanswered similar questions on the mailing list and all other > use of vtkStreamingDemandDrivenPipeline seems to be within a filter not outside. > Still, on page 14 of 4_VTK-ParallelCompositeAndTime.pdf the same exemplary use > of vtkStreamingDemandDrivenPipeline is given for "manual" updates. > Am I missing something in my example or can vtkXMLPolyDataReader not stream? > > Any help or hints are very much appreciated > Roman > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From hjchen.work at gmail.com Fri Jan 29 10:41:06 2016 From: hjchen.work at gmail.com (hchen) Date: Fri, 29 Jan 2016 08:41:06 -0700 (MST) Subject: [vtkusers] vtkEventQtSlotConnect not wrapped in python 2.7 + VTK6.3 Message-ID: <1454082066016-5736250.post@n5.nabble.com> Hi, I am trying to write a software using Python+Qt+VTK, and need to pass VTK events to Qt, but vtkEventQtSlotConnect is not wrapped in Python. I built VTK from source: VTK 6.3.0, python 2.7, cmake 3.3 (also tried cmake 2.8). But, when I tried to build an early version, VTK 5.10.1, using cmake 2.8, I can get vtkEventQtSlotConnect wrapped in python. I am guessing it might have something to do with the settings in CMakeLists for VTK6.3.0, but I am not familiar with cmake enough to figure it out, can anyone help? Thanks! Chen -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkEventQtSlotConnect-not-wrapped-in-python-2-7-VTK6-3-tp5736250.html Sent from the VTK - Users mailing list archive at Nabble.com. From lonni.besancon at gmail.com Fri Jan 29 11:02:45 2016 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Fri, 29 Jan 2016 09:02:45 -0700 (MST) Subject: [vtkusers] Plane Widget and OpenGL ES Message-ID: <1454083365183-5736252.post@n5.nabble.com> Hello everyone. Trying to implement a cutting plane on openGL ES and I get the following error: /E/VTK (22571): ERROR: In /Users/lonnibesancon/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 1208 E/VTK (22571): vtkTextureObject (0x4c5f4128): TextureBuffers not supported in OPenGL ES F/libc (22571): /Users/lonnibesancon/VTK/Rendering/OpenGL2/vtkTextureObject.cxx:537: void vtkTextureObject::Bind(): assertion "this->Handle" failed F/libc (22571):/ Is it impossible to implement a cutting place with OpenGL ES? I followed the code provided here Thanks in advance for the help. -- View this message in context: http://vtk.1045678.n5.nabble.com/Plane-Widget-and-OpenGL-ES-tp5736252.html Sent from the VTK - Users mailing list archive at Nabble.com. From lonni.besancon at gmail.com Fri Jan 29 11:10:06 2016 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Fri, 29 Jan 2016 09:10:06 -0700 (MST) Subject: [vtkusers] Plane Widget and OpenGL ES In-Reply-To: <1454083365183-5736252.post@n5.nabble.com> References: <1454083365183-5736252.post@n5.nabble.com> Message-ID: <1454083806727-5736254.post@n5.nabble.com> Apparently the error happens when I call /planeWidget->On();/ but does not if I do not call the function. Any insights on that? -- View this message in context: http://vtk.1045678.n5.nabble.com/Plane-Widget-and-OpenGL-ES-tp5736252p5736254.html Sent from the VTK - Users mailing list archive at Nabble.com. From andrew.slaughter at inl.gov Fri Jan 29 11:12:37 2016 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Fri, 29 Jan 2016 09:12:37 -0700 Subject: [vtkusers] How to extract nodesets and sidesets for Exodus data In-Reply-To: References: Message-ID: I have been working on this for sometime and still haven't come up with a solution, is there anyone who could help me find a solution, if it is possible? I will provide another description of what I am trying to accomplish: (1) I would like to read an ExodusII file that contains BLOCKS, SIDE_SETS, and NODE_SETS. When reading the file I want to enable everything (SetAllArrayStatus enabled for each type). (2) I would like to extract the various parts (each BLOCK, SIDE_SET, NODE_SET) so that I can create a unique geometry->mapper->actor objects. This will enable me to show any combination of the parts, each with a different colormap, etc., but with only a single reader open. I was able to get number (2) working using vtkExtractBlock for BLOCKS, but I can't figure out how to also extract out the SIDE_SET and NODE_SET. One idea I have was to use vtkExtractCell, but was unable to find the correct methodology for that idea. Is this type extraction possible? If so, any hint in the correct direction would be greatly appreciated. Thanks, Andrew On Tue, Dec 8, 2015 at 9:02 PM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I am creating a visualization tool for Exodus data capable of displaying > any combination of nodeset, sideset, and subdomain information from an > ExodusII file. I would like to be able to have a single reader object and > multiple renderers for showing the nodesets, sidesets, and/or subdomains. > > However, I am unable to figure out how to enable all of the above in > vtkExodusIIReader but limit what is shown in the renderer. > > I have attached a script (OSX with VTK6.3) that I would like to have > display the nodesets on the left-side of the screen and the subdomains on > the right, but I am unable to get the desired result. > > I would appreciate any help that could be provided. > > Thanks, > Andrew > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Fri Jan 29 11:40:11 2016 From: david.thompson at kitware.com (David Thompson) Date: Fri, 29 Jan 2016 11:40:11 -0500 Subject: [vtkusers] How to extract nodesets and sidesets for Exodus data In-Reply-To: References: Message-ID: <50B20366-5B54-4718-81D7-3558B436951A@kitware.com> Hi Andrew, Since the Exodus reader generates a 2-level multiblock dataset, you should be able to use vtkExtractBlock to do everything you want; each Exodus block, side set, and node set should be placed in separate leaf-node of the VTK multiblock dataset. The reader also groups all of the leaf nodes that are Exodus blocks together, all of the leaf nodes that are side sets together, and so on -- this is what makes the reader's output a multi-level multiblock dataset. David > On Jan 29, 2016, at 11:12 AM, Slaughter, Andrew E wrote: > > I have been working on this for sometime and still haven't come up with a solution, is there anyone who could help me find a solution, if it is possible? > > I will provide another description of what I am trying to accomplish: > > (1) I would like to read an ExodusII file that contains BLOCKS, SIDE_SETS, and NODE_SETS. When reading the file I want to enable everything (SetAllArrayStatus enabled for each type). > > (2) I would like to extract the various parts (each BLOCK, SIDE_SET, NODE_SET) so that I can create a unique geometry->mapper->actor objects. This will enable me to show any combination of the parts, each with a different colormap, etc., but with only a single reader open. > > I was able to get number (2) working using vtkExtractBlock for BLOCKS, but I can't figure out how to also extract out the SIDE_SET and NODE_SET. One idea I have was to use vtkExtractCell, but was unable to find the correct methodology for that idea. > > Is this type extraction possible? If so, any hint in the correct direction would be greatly appreciated. > > Thanks, > Andrew > > > > > > > > > On Tue, Dec 8, 2015 at 9:02 PM, Slaughter, Andrew E wrote: > I am creating a visualization tool for Exodus data capable of displaying any combination of nodeset, sideset, and subdomain information from an ExodusII file. I would like to be able to have a single reader object and multiple renderers for showing the nodesets, sidesets, and/or subdomains. > > However, I am unable to figure out how to enable all of the above in vtkExodusIIReader but limit what is shown in the renderer. > > I have attached a script (OSX with VTK6.3) that I would like to have display the nodesets on the left-side of the screen and the subdomains on the right, but I am unable to get the desired result. > > I would appreciate any help that could be provided. > > Thanks, > Andrew > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 rishiraw at usc.edu Fri Jan 29 13:04:48 2016 From: rishiraw at usc.edu (Rishi Rawat) Date: Fri, 29 Jan 2016 10:04:48 -0800 Subject: [vtkusers] How to color a sphere source in an appendpolydata object? Message-ID: How to color a sphere source in an appendpolydata object? Eventually, I want to plot hundreds+ spheres in 3D, each with a different color. I'd like to use an appendpolydata object to improve efficiency. Below is the code I have so far using 1 sphere. I think I've tracked the problem down to the appendData object. doing appendData.AddInputData(polydata sp ) causes nothing to show up in my renderwindow, whereas if I do appendData.AddInputConnection(Sphere.GetOutputPort() ), I get an object to show up, but it is gray (no color). How can I color objects before placing them in the appendpolydata object? My Code: import vtk from vtk import * # create a rendering window and renderer ren = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) # create a renderwindowinteractor iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) #setup colors (setting the name to "Colors" is nice but not necessary) Colors = vtk.vtkUnsignedCharArray(); Colors.SetNumberOfComponents(3); Colors.SetName("Colors"); Colors.InsertNextTuple3(255,0,0); sphere = vtk.vtkSphereSource() sphere.SetThetaResolution(5) sphere.SetPhiResolution(5) sphere.SetRadius(10) sphere.SetCenter( 0,0,0) sp = sphere.GetOutput() sp.GetCellData().SetScalars(Colors); appendData.AddInputData(sp ) # If I enable this next line, i get a sphere, but it is not colored, it is gray #appendData.AddInputConnection(sphere.GetOutputPort() ) print "done" #cd.SetScalars(Colors) #cd.Update() #sphere.Update() mapper = vtk.vtkPolyDataMapper() if vtk.VTK_MAJOR_VERSION <= 5: mapper.SetInput(trianglePolyData) else: #mapper.SetInputData(trianglePolyData) mapper.SetInputConnection(appendData.GetOutputPort() ) # actor actor = vtk.vtkActor() actor.SetMapper(mapper) # assign actor to the renderer ren.AddActor(actor) # enable user interface interactor iren.Initialize() renWin.Render() iren.Start() -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Fri Jan 29 13:30:20 2016 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Fri, 29 Jan 2016 11:30:20 -0700 Subject: [vtkusers] How to extract nodesets and sidesets for Exodus data In-Reply-To: <50B20366-5B54-4718-81D7-3558B436951A@kitware.com> References: <50B20366-5B54-4718-81D7-3558B436951A@kitware.com> Message-ID: David, Thanks for the motivation to keep digging, I finally figured it out. My problem was how I was interpreting the indices added to the vtkExtractBlock. Just in case anyone else is interested, the following prints out the indices of an Exodus file to use with vtkExtractBlock. # Read Exodus Data reader = vtk.vtkExodusIIReader() reader.SetFileName('mug_blocks_out.e') reader.SetTimeStep(10) reader.UpdateInformation() reader.Update() reader.SetAllArrayStatus(vtk.vtkExodusIIReader.NODAL, 1) reader.SetAllArrayStatus(vtk.vtkExodusIIReader.NODAL_TEMPORAL, 1) reader.SetObjectStatus(vtk.vtkExodusIIReader.ELEM_BLOCK, 0, 1) reader.SetObjectStatus(vtk.vtkExodusIIReader.ELEM_BLOCK, 1, 1) reader.SetObjectStatus(vtk.vtkExodusIIReader.SIDE_SET, 0, 1) reader.SetObjectStatus(vtk.vtkExodusIIReader.SIDE_SET, 1, 1) reader.SetObjectStatus(vtk.vtkExodusIIReader.NODE_SET, 0, 1) reader.SetObjectStatus(vtk.vtkExodusIIReader.NODE_SET, 1, 1) index = 1 for i in range(reader.GetOutput().GetNumberOfBlocks()): print 'reader.GetOutput().GetBlock(', i, ')', index index += 1 for j in range(reader.GetOutput().GetBlock(i).GetNumberOfBlocks()): print ' reader.GetOutput().GetBlock(', i, ')', '.GetBlock(',j, ')', index index += 1 blocks0 = vtk.vtkExtractBlock() blocks0.SetInputConnection(reader.GetOutputPort()) blocks0.AddIndex(8) # Set the indices here to view the various 'blocks' blocks0.Update() -Andrew On Fri, Jan 29, 2016 at 9:40 AM, David Thompson wrote: > Hi Andrew, > > Since the Exodus reader generates a 2-level multiblock dataset, you should > be able to use vtkExtractBlock to do everything you want; each Exodus > block, side set, and node set should be placed in separate leaf-node of the > VTK multiblock dataset. The reader also groups all of the leaf nodes that > are Exodus blocks together, all of the leaf nodes that are side sets > together, and so on -- this is what makes the reader's output a multi-level > multiblock dataset. > > David > > > On Jan 29, 2016, at 11:12 AM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > > > > I have been working on this for sometime and still haven't come up with > a solution, is there anyone who could help me find a solution, if it is > possible? > > > > I will provide another description of what I am trying to accomplish: > > > > (1) I would like to read an ExodusII file that contains BLOCKS, > SIDE_SETS, and NODE_SETS. When reading the file I want to enable everything > (SetAllArrayStatus enabled for each type). > > > > (2) I would like to extract the various parts (each BLOCK, SIDE_SET, > NODE_SET) so that I can create a unique geometry->mapper->actor objects. > This will enable me to show any combination of the parts, each with a > different colormap, etc., but with only a single reader open. > > > > I was able to get number (2) working using vtkExtractBlock for BLOCKS, > but I can't figure out how to also extract out the SIDE_SET and NODE_SET. > One idea I have was to use vtkExtractCell, but was unable to find the > correct methodology for that idea. > > > > Is this type extraction possible? If so, any hint in the correct > direction would be greatly appreciated. > > > > Thanks, > > Andrew > > > > > > > > > > > > > > > > > > On Tue, Dec 8, 2015 at 9:02 PM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > > I am creating a visualization tool for Exodus data capable of displaying > any combination of nodeset, sideset, and subdomain information from an > ExodusII file. I would like to be able to have a single reader object and > multiple renderers for showing the nodesets, sidesets, and/or subdomains. > > > > However, I am unable to figure out how to enable all of the above in > vtkExodusIIReader but limit what is shown in the renderer. > > > > I have attached a script (OSX with VTK6.3) that I would like to have > display the nodesets on the left-side of the screen and the subdomains on > the right, but I am unable to get the desired result. > > > > I would appreciate any help that could be provided. > > > > Thanks, > > Andrew > > > > _______________________________________________ > > 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=BQIFAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=IzvSV8J8_UY6qt_rnM6naTRnGNk_stEmtgGBVwg5eCA&s=kl_8I3anInVvggyEaod6WrX7KeURy8h_C7mbTsZyOVI&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=BQIFAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=IzvSV8J8_UY6qt_rnM6naTRnGNk_stEmtgGBVwg5eCA&s=aiN7SFhWFQJe3Wj4LjzkP_bvTS-kyIr411JaPQb5Z6Y&e= > > > > Search the list archives at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=BQIFAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=IzvSV8J8_UY6qt_rnM6naTRnGNk_stEmtgGBVwg5eCA&s=_RvOk4cwnd3I4lZci8ZiXALDQ5S68i2l8goeAGzkXNs&e= > > > > Follow this link to subscribe/unsubscribe: > > > https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_vtkusers&d=BQIFAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=IzvSV8J8_UY6qt_rnM6naTRnGNk_stEmtgGBVwg5eCA&s=wzPIk1KYN2NI_Inwd0yJDYEjbO7-t_4M7aAcPeej758&e= > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Fri Jan 29 13:52:49 2016 From: david.thompson at kitware.com (David Thompson) Date: Fri, 29 Jan 2016 13:52:49 -0500 Subject: [vtkusers] How to extract nodesets and sidesets for Exodus data In-Reply-To: References: <50B20366-5B54-4718-81D7-3558B436951A@kitware.com> Message-ID: <945FD44F-04BF-4155-8DF2-D8724BD5609E@kitware.com> Hi Andrew, > Thanks for the motivation to keep digging, I finally figured it out. My problem was how I was interpreting the indices added to the vtkExtractBlock. > > Just in case anyone else is interested, the following prints out the indices of an Exodus file to use with vtkExtractBlock. I'm glad you were able to figure it out; and thanks for posting your solution! David From cory.quammen at kitware.com Fri Jan 29 14:55:09 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 29 Jan 2016 14:55:09 -0500 Subject: [vtkusers] How to color a sphere source in an appendpolydata object? In-Reply-To: References: Message-ID: Hi Rishi, Answers inlined below: On Fri, Jan 29, 2016 at 1:04 PM, Rishi Rawat wrote: > How to color a sphere source in an appendpolydata object? > > Eventually, I want to plot hundreds+ spheres in 3D, each with a different > color. I'd like to use an appendpolydata object to improve efficiency. > Below is the code I have so far using 1 sphere. > > I think I've tracked the problem down to the appendData object. doing > appendData.AddInputData(polydata sp ) causes nothing to show up in my > renderwindow, whereas if I do appendData.AddInputConnection(Sphere.GetOutputPort() > ), I get an object to show up, but it is gray (no color). > > How can I color objects before placing them in the appendpolydata object? > VTK doesn't quite work that way, but you are close. See my notes below. > My Code: > > > import vtk > from vtk import * > # create a rendering window and renderer > ren = vtk.vtkRenderer() > renWin = vtk.vtkRenderWindow() > renWin.AddRenderer(ren) > > # create a renderwindowinteractor > iren = vtk.vtkRenderWindowInteractor() > iren.SetRenderWindow(renWin) > > #setup colors (setting the name to "Colors" is nice but not necessary) > Colors = vtk.vtkUnsignedCharArray(); > Colors.SetNumberOfComponents(3); > Colors.SetName("Colors"); > Colors.InsertNextTuple3(255,0,0); > You'll need a color for *each* cell in in each sphere that you are appending together. You'll need a call to Colors.SetNumberOfTuples() after Colors.SetNumberOfComponents(3) and pass it the number of cells in the sphere source. Then, you'll need to duplicate the color by calling Colors.InsertNextTuple3() once for each cell. You can actually use color = [255, 0, 0] Colors.SetTupleValue(i, color) where i is the cell index because you have already allocated the array when you called Colors.SetNumberOfTuples(). > sphere = vtk.vtkSphereSource() > sphere.SetThetaResolution(5) > sphere.SetPhiResolution(5) > sphere.SetRadius(10) > sphere.SetCenter( 0,0,0) > sp = sphere.GetOutput() > You'll need a call to 'sphere.Update()' here so that the output is generated, otherwise 'sp' will be empty and you'll be appending a lot of empty data sets. > sp.GetCellData().SetScalars(Colors); > appendData.AddInputData(sp ) > > > # If I enable this next line, i get a sphere, but it is not colored, it is > gray > #appendData.AddInputConnection(sphere.GetOutputPort() ) > > print "done" > #cd.SetScalars(Colors) > #cd.Update() > #sphere.Update() > > mapper = vtk.vtkPolyDataMapper() > if vtk.VTK_MAJOR_VERSION <= 5: > mapper.SetInput(trianglePolyData) > else: > #mapper.SetInputData(trianglePolyData) > mapper.SetInputConnection(appendData.GetOutputPort() ) > # actor > actor = vtk.vtkActor() > actor.SetMapper(mapper) > You'll also need to call mapper.SetColorModeToDirectScalars() to ensure that your spheres are colored by the colors you set in the cell data array rather than being mapped through a color map. HTH, Cory > > # assign actor to the renderer > ren.AddActor(actor) > > # enable user interface interactor > iren.Initialize() > renWin.Render() > iren.Start() > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Jan 29 16:13:35 2016 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 29 Jan 2016 16:13:35 -0500 Subject: [vtkusers] Plane Widget and OpenGL ES In-Reply-To: <1454083806727-5736254.post@n5.nabble.com> References: <1454083365183-5736252.post@n5.nabble.com> <1454083806727-5736254.post@n5.nabble.com> Message-ID: I dont' remember why would you end in texture object. Can you post your sample code here? Cutting plane should be doable in ES. A trace would be useful too. On Fri, Jan 29, 2016 at 11:10 AM, Lonni Besan?on wrote: > Apparently the error happens when I call /planeWidget->On();/ but does not > if > I do not call the function. Any insights on that? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Plane-Widget-and-OpenGL-ES-tp5736252p5736254.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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From rishiraw at usc.edu Fri Jan 29 17:28:57 2016 From: rishiraw at usc.edu (Rishi Rawat) Date: Fri, 29 Jan 2016 14:28:57 -0800 Subject: [vtkusers] How to color a sphere source in an appendpolydata object? In-Reply-To: References: Message-ID: THANKS, this helped me a lot On Fri, Jan 29, 2016 at 11:55 AM, Cory Quammen wrote: > Hi Rishi, > > Answers inlined below: > > On Fri, Jan 29, 2016 at 1:04 PM, Rishi Rawat wrote: > >> How to color a sphere source in an appendpolydata object? >> >> Eventually, I want to plot hundreds+ spheres in 3D, each with a different >> color. I'd like to use an appendpolydata object to improve efficiency. >> Below is the code I have so far using 1 sphere. >> >> I think I've tracked the problem down to the appendData object. doing >> appendData.AddInputData(polydata sp ) causes nothing to show up in my >> renderwindow, whereas if I do appendData.AddInputConnection(Sphere.GetOutputPort() >> ), I get an object to show up, but it is gray (no color). >> >> How can I color objects before placing them in the appendpolydata object? >> > > VTK doesn't quite work that way, but you are close. See my notes below. > > >> My Code: >> >> >> import vtk >> from vtk import * >> # create a rendering window and renderer >> ren = vtk.vtkRenderer() >> renWin = vtk.vtkRenderWindow() >> renWin.AddRenderer(ren) >> >> # create a renderwindowinteractor >> iren = vtk.vtkRenderWindowInteractor() >> iren.SetRenderWindow(renWin) >> >> #setup colors (setting the name to "Colors" is nice but not necessary) >> Colors = vtk.vtkUnsignedCharArray(); >> Colors.SetNumberOfComponents(3); >> Colors.SetName("Colors"); >> Colors.InsertNextTuple3(255,0,0); >> > > You'll need a color for *each* cell in in each sphere that you are > appending together. You'll need a call to > > Colors.SetNumberOfTuples() > > after Colors.SetNumberOfComponents(3) and pass it the number of cells in > the sphere source. Then, you'll need to duplicate the color by calling > > Colors.InsertNextTuple3() > > once for each cell. You can actually use > > color = [255, 0, 0] > Colors.SetTupleValue(i, color) > > where i is the cell index because you have already allocated the array > when you called Colors.SetNumberOfTuples(). > > >> sphere = vtk.vtkSphereSource() >> sphere.SetThetaResolution(5) >> sphere.SetPhiResolution(5) >> sphere.SetRadius(10) >> sphere.SetCenter( 0,0,0) >> sp = sphere.GetOutput() >> > > You'll need a call to 'sphere.Update()' here so that the output is > generated, otherwise 'sp' will be empty and you'll be appending a lot of > empty data sets. > > >> sp.GetCellData().SetScalars(Colors); >> appendData.AddInputData(sp ) >> >> >> # If I enable this next line, i get a sphere, but it is not colored, it >> is gray >> #appendData.AddInputConnection(sphere.GetOutputPort() ) >> >> print "done" >> #cd.SetScalars(Colors) >> #cd.Update() >> #sphere.Update() >> >> mapper = vtk.vtkPolyDataMapper() >> if vtk.VTK_MAJOR_VERSION <= 5: >> mapper.SetInput(trianglePolyData) >> else: >> #mapper.SetInputData(trianglePolyData) >> mapper.SetInputConnection(appendData.GetOutputPort() ) >> # actor >> actor = vtk.vtkActor() >> actor.SetMapper(mapper) >> > > You'll also need to call > > mapper.SetColorModeToDirectScalars() > > to ensure that your spheres are colored by the colors you set in the cell > data array rather than being mapped through a color map. > > HTH, > Cory > > >> >> # assign actor to the renderer >> ren.AddActor(actor) >> >> # enable user interface interactor >> iren.Initialize() >> renWin.Render() >> iren.Start() >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -- Rishi Rawat MD/PHD Candidate HTE (Health Technology Engineering) Fellow Keck School of Medicine University of Southern California rishiraw at usc.edu | 720-352-6218 -------------- next part -------------- An HTML attachment was scrubbed... URL: From newcfd at yahoo.com Sun Jan 31 14:03:44 2016 From: newcfd at yahoo.com (newcfd) Date: Sun, 31 Jan 2016 12:03:44 -0700 (MST) Subject: [vtkusers] Question about large data set rendering Message-ID: <1454267024082-5736276.post@n5.nabble.com> anything extra needs to be done for large data set rendering? Or vtk handle it automatically? Joe -- View this message in context: http://vtk.1045678.n5.nabble.com/Question-about-large-data-set-rendering-tp5736276.html Sent from the VTK - Users mailing list archive at Nabble.com. From e.rob08 at gmail.com Sun Jan 31 23:07:03 2016 From: e.rob08 at gmail.com (Eric Robertson) Date: Sun, 31 Jan 2016 22:07:03 -0600 Subject: [vtkusers] Question about unstructured grids Message-ID: Hi all, I have a raw data set of X,Y,Z coordinates as well as a set of scalars (lets call them A, B, C) which are stored at the aforementioned coordinates. I use vtkUnstructuredGrid to create the domain, but when I go to open the .vtu file in Paraview I see that there aren't any cells to visualize. My question is- how do I go about providing 'cells' which use these points as cell-centers? -------------- next part -------------- An HTML attachment was scrubbed... URL: