From 925345468 at qq.com Sat Nov 1 00:05:38 2014 From: 925345468 at qq.com (just_rookie) Date: Fri, 31 Oct 2014 21:05:38 -0700 (PDT) Subject: [vtkusers] how to compute the length of spline? Message-ID: <1414814738225-5729305.post@n5.nabble.com> Hi all, I have used the vtkParametricSpline class to get a spline, and my next step is to compute the length of the spline, any help? Thank you in advance! -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-compute-the-length-of-spline-tp5729305.html Sent from the VTK - Users mailing list archive at Nabble.com. From rabysam28 at gmail.com Sat Nov 1 01:32:28 2014 From: rabysam28 at gmail.com (Sam Raby) Date: Sat, 1 Nov 2014 00:32:28 -0500 Subject: [vtkusers] compilation of VTK6.1 with Qt5-enabled - Policy CMP0040 is not set.... Message-ID: I am compiling VTK 6.1 from [1] with Qt enabled (Qt 5.3.2 from [2]) using cmake 3.0.2 from [3]. My OS is Ubuntu 12.04. I am running the following command [4] for ccmake: cd /path/to/VTK-Release-build ccmake -DVTK_QT_VERSION:STRING=5 \ -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt5.2.1-install/5.2.1/gcc_64/bin/qmake \ -DVTK_Group_Qt:BOOL=ON \ -DCMAKE_PREFIX_PATH:PATH=/path/to/qt.5.2.1-install/5.2.1/gcc_64/lib/cmake \ -DBUILD_SHARED_LIBS:BOOL=ON /path/to/VTK but I'm getting the following error: *(ADD_CUSTOM_COMMAND):* *Policy CMP0040 is not set: The target in the TARGET signature of* *add_custom_command() must exist. Run "cmake --help-policy CMP0040" for **policy details. Use the cmake_policy command to set the policy and* *suppress this warning.* *The target name* *"/home/torabi/local2/VTK/VTK-6.1.0-build/ThirdParty/hdf5/vtkhdf5/H5Edefin.h"* *is unknown in this context.* *This warning is for project developers. Use -Wno-dev to suppress it.* Would you please hint me how to tackle this error? Thanks -S [1] http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz [2] http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-1.6.0-5-online.run [3] http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz [4] http://www.vtk.org/Wiki/VTK/Building/Linux#Qt5 -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sat Nov 1 02:15:15 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sat, 1 Nov 2014 06:15:15 +0000 Subject: [vtkusers] compilation of VTK6.1 with Qt5-enabled - Policy CMP0040 is not set.... In-Reply-To: References: Message-ID: They look to me like warnings, not errors. Is the build successful? Gib ________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Sam Raby [rabysam28 at gmail.com] Sent: Saturday, 1 November 2014 6:32 p.m. To: vtkusers at vtk.org Subject: [vtkusers] compilation of VTK6.1 with Qt5-enabled - Policy CMP0040 is not set.... I am compiling VTK 6.1 from [1] with Qt enabled (Qt 5.3.2 from [2]) using cmake 3.0.2 from [3]. My OS is Ubuntu 12.04. I am running the following command [4] for ccmake: cd /path/to/VTK-Release-build ccmake -DVTK_QT_VERSION:STRING=5 \ -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt5.2.1-install/5.2.1/gcc_64/bin/qmake \ -DVTK_Group_Qt:BOOL=ON \ -DCMAKE_PREFIX_PATH:PATH=/path/to/qt.5.2.1-install/5.2.1/gcc_64/lib/cmake \ -DBUILD_SHARED_LIBS:BOOL=ON /path/to/VTK but I'm getting the following error: (ADD_CUSTOM_COMMAND): Policy CMP0040 is not set: The target in the TARGET signature of add_custom_command() must exist. Run "cmake --help-policy CMP0040" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The target name "/home/torabi/local2/VTK/VTK-6.1.0-build/ThirdParty/hdf5/vtkhdf5/H5Edefin.h" is unknown in this context. This warning is for project developers. Use -Wno-dev to suppress it. Would you please hint me how to tackle this error? Thanks -S [1] http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz [2] http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-1.6.0-5-online.run [3] http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz [4] http://www.vtk.org/Wiki/VTK/Building/Linux#Qt5 -------------- next part -------------- An HTML attachment was scrubbed... URL: From majcjc at gmail.com Sat Nov 1 07:50:11 2014 From: majcjc at gmail.com (Lin M) Date: Sat, 1 Nov 2014 19:50:11 +0800 Subject: [vtkusers] vtk parallel coordinates lines color Message-ID: I am now doing a project relating to VTK to realize parallel coordinates plot. I want to assign different colors to different lines in parallel coordinates view, but the example code only shows I can use setlinecolor() in vtkparallelcoordinatesrepresentation class to set the lines in only one color. could anyone help me to solve this problem? Thank you. Best regards, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sat Nov 1 22:54:53 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 2 Nov 2014 02:54:53 +0000 Subject: [vtkusers] Python wrapping Message-ID: I just rebuilt VTK-5.10.1 64-bit on Windows with VTK_WRAP_PYTHON ON. The build completed without errors. I do not understand why I have 14 .lib and .dll files named vtk*PythonD.dll and vtk*PythonD.lib, and 14 .lib files named vtk*Python.lib, but no vtk*Python.dll. This causes my attempt to run a VTK-Python example to fail like this: D:\testing\VTK\Superquadric>vtkpython superquadric.py Traceback (most recent call last): File "superquadric.py", line 1, in import vtk File "c:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in __helper.refine_import_err('rendering', 'vtkRenderingPython', exc) File "c:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in refine_import_err raise LinkError, str(exc) vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 application. I see that somebody was asking exactly the same question back in October, 2010, but there was no answer. Any suggestions? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Nov 1 23:11:53 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 1 Nov 2014 21:11:53 -0600 Subject: [vtkusers] Python wrapping In-Reply-To: References: Message-ID: Hi Gib, The python modules are called "vtk*Python.pyd" on Windows. On your system, I'm guessing that they should be in this directory: c:\VTK-VS10-x64\lib\site-packages\vtk And, in order for the modules to be loaded, all of the VTK DLLs must also be in your PATH. Either that, or you can copy them all into c:\VTK-VS10-x64\lib\site-packages\vtk so that the .pyd files will be able to find them there. The vtk*PythonD.dll files are not python modules, they are support libraries that are needed by the python modules. - David On Sat, Nov 1, 2014 at 8:54 PM, Gib Bogle wrote: > I just rebuilt VTK-5.10.1 64-bit on Windows with VTK_WRAP_PYTHON ON. > The build completed without errors. I do not understand why I have 14 .lib > and .dll files named vtk*PythonD.dll and vtk*PythonD.lib, and 14 .lib files > named vtk*Python.lib, but no vtk*Python.dll. This causes my attempt to run > a VTK-Python example to fail like this: > > D:\testing\VTK\Superquadric>vtkpython superquadric.py > Traceback (most recent call last): > File "superquadric.py", line 1, in import vtk > File "c:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in > __helper.refine_import_err('rendering', 'vtkRenderingPython', exc) > File "c:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in > refine_import_err raise LinkError, str(exc) > vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 > application. > > I see that somebody was asking exactly the same question back in October, > 2010, but there was no answer. > > Any suggestions? > > Thanks > Gib > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikerob2015 at gmail.com Sat Nov 1 23:42:02 2014 From: mikerob2015 at gmail.com (Mike Rob) Date: Sat, 1 Nov 2014 22:42:02 -0500 Subject: [vtkusers] CMakefile + QVTKWidget Message-ID: Hi, I have a simple example which has an instant of QVTKWidget. I can compile the code successfully using the following cmake file, but when I run the binary file, I get *** glibc detected *** core dumped.... Here is my CMakeFile. Is there anything wrong in cmake? cmake_minimum_required(VERSION 2.8) PROJECT(HelloWorld) find_package(Qt5Widgets) find_package(ITK REQUIRED) include(${ITK_USE_FILE}) if (ITKVtkGlue_LOADED) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) else() find_package(ItkVtkGlue REQUIRED) include(${ItkVtkGlue_USE_FILE}) set(Glue ItkVtkGlue) endif() QT5_WRAP_UI(UISrcs mainwindow.ui) QT5_WRAP_CPP(MOCSrcs mainwindow.h) ADD_EXECUTABLE(MyProject HelloWorld.cpp mainwindow.cpp ${MOCSrcs} ${UISrcs}) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) qt5_use_modules(MyProject Widgets) target_link_libraries(MyProject ${Glue} ${VTK_LIBRARIES} ${ITK_LIBRARIES}) Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sun Nov 2 01:09:52 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 2 Nov 2014 06:09:52 +0000 Subject: [vtkusers] Python wrapping In-Reply-To: References: , Message-ID: Hi David, All the .pyd files are where they should be, and all the vtk*PythonD.dll files are where they should be, in C:\vtk-vs10-x64\bin, which is in the PATH. The point of my question was that the VTK release build did not create any vtk*Python.dll files, although it did create the .lib files. Correct me if I'm wrong, but I think that vtkpython is looking for the missing DLL files - specifically, for vtkRenderingPython.dll. Am I wrong in thinking that they should have been built? Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Sunday, 2 November 2014 4:11 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Python wrapping Hi Gib, The python modules are called "vtk*Python.pyd" on Windows. On your system, I'm guessing that they should be in this directory: c:\VTK-VS10-x64\lib\site-packages\vtk And, in order for the modules to be loaded, all of the VTK DLLs must also be in your PATH. Either that, or you can copy them all into c:\VTK-VS10-x64\lib\site-packages\vtk so that the .pyd files will be able to find them there. The vtk*PythonD.dll files are not python modules, they are support libraries that are needed by the python modules. - David On Sat, Nov 1, 2014 at 8:54 PM, Gib Bogle > wrote: I just rebuilt VTK-5.10.1 64-bit on Windows with VTK_WRAP_PYTHON ON. The build completed without errors. I do not understand why I have 14 .lib and .dll files named vtk*PythonD.dll and vtk*PythonD.lib, and 14 .lib files named vtk*Python.lib, but no vtk*Python.dll. This causes my attempt to run a VTK-Python example to fail like this: D:\testing\VTK\Superquadric>vtkpython superquadric.py Traceback (most recent call last): File "superquadric.py", line 1, in import vtk File "c:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in __helper.refine_import_err('rendering', 'vtkRenderingPython', exc) File "c:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in refine_import_err raise LinkError, str(exc) vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 application. I see that somebody was asking exactly the same question back in October, 2010, but there was no answer. Any suggestions? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Nov 2 08:18:36 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 2 Nov 2014 06:18:36 -0700 Subject: [vtkusers] Python wrapping In-Reply-To: References: Message-ID: Hi Gib, The vtk*Python.pyd files are the DLLs that you are looking for. See here: https://docs.python.org/2/faq/windows.html#is-a-pyd-file-the-same-as-a-dll - David On Sun, Nov 2, 2014 at 12:09 AM, Gib Bogle wrote: > Hi David, > > All the .pyd files are where they should be, and all the vtk*PythonD.dll > files are where they should be, in C:\vtk-vs10-x64\bin, which is in the > PATH. The point of my question was that the VTK release build did not > create any vtk*Python.dll files, although it did create the .lib files. > Correct me if I'm wrong, but I think that vtkpython is looking for the > missing DLL files - specifically, for vtkRenderingPython.dll. Am I wrong > in thinking that they should have been built? > > Gib > ------------------------------ > *From:* David Gobbi [david.gobbi at gmail.com] > *Sent:* Sunday, 2 November 2014 4:11 p.m. > *To:* Gib Bogle > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Python wrapping > > Hi Gib, > > The python modules are called "vtk*Python.pyd" on Windows. > On your system, I'm guessing that they should be in this directory: > c:\VTK-VS10-x64\lib\site-packages\vtk > > And, in order for the modules to be loaded, all of the VTK DLLs > must also be in your PATH. Either that, or you can copy them all > into c:\VTK-VS10-x64\lib\site-packages\vtk so that the .pyd files > will be able to find them there. > > The vtk*PythonD.dll files are not python modules, they are support > libraries that are needed by the python modules. > > - David > > > > On Sat, Nov 1, 2014 at 8:54 PM, Gib Bogle wrote: > >> I just rebuilt VTK-5.10.1 64-bit on Windows with VTK_WRAP_PYTHON ON. >> The build completed without errors. I do not understand why I have 14 .lib >> and .dll files named vtk*PythonD.dll and vtk*PythonD.lib, and 14 .lib files >> named vtk*Python.lib, but no vtk*Python.dll. This causes my attempt to run >> a VTK-Python example to fail like this: >> >> D:\testing\VTK\Superquadric>vtkpython superquadric.py >> Traceback (most recent call last): >> File "superquadric.py", line 1, in import vtk >> File "c:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in >> __helper.refine_import_err('rendering', 'vtkRenderingPython', exc) >> File "c:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in >> refine_import_err raise LinkError, str(exc) >> vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 >> application. >> >> I see that somebody was asking exactly the same question back in October, >> 2010, but there was no answer. >> >> Any suggestions? >> >> Thanks >> Gib >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From george.gerber at gmail.com Sun Nov 2 10:41:52 2014 From: george.gerber at gmail.com (George) Date: Sun, 2 Nov 2014 07:41:52 -0800 (PST) Subject: [vtkusers] polyhedron in python In-Reply-To: References: <1410293986843-5728643.post@n5.nabble.com> <20140910000223.A509A843D7@public.kitware.com> Message-ID: <1414942912370-5729314.post@n5.nabble.com> Good day, I have not managed to create a single cell polyhedron. Can somebody see where I am going wrong with my code (it is very likely the input arguments for insertnextcell)? When I open the file in paraview I can see the vertices with the glyph filter, but there is no cell. Best regards, George import vtk vertex_locations = vtk.vtkPoints() vertex_locations.SetNumberOfPoints(4) vertex_locations.SetPoint( 0, (-0.816497, -0.816497, 0.00000)) vertex_locations.SetPoint( 1, (-0.816497, 0.000000, -0.57735)) vertex_locations.SetPoint( 2, (-0.816497, 0.000000, 0.57735)) vertex_locations.SetPoint( 3, (-0.816497, 0.816497, 0.00000)) polygon_faces = vtk.vtkCellArray() q = vtk.vtkQuad() q.GetPointIds().SetId(0, 0) q.GetPointIds().SetId(1, 1) q.GetPointIds().SetId(2, 2) q.GetPointIds().SetId(3, 3) polygon_faces.InsertNextCell(q) vertex_list = vtk.vtkIdList() face_info = vtk.vtkIdList() polygon_faces.InitTraversal() while polygon_faces.GetNextCell(vertex_list) == 1: face_info.InsertNextId(vertex_list.GetNumberOfIds()) for j in range(vertex_list.GetNumberOfIds()): face_info.InsertNextId(vertex_list.GetId(j)) ug = vtk.vtkUnstructuredGrid() ug.InsertNextCell(vtk.VTK_POLYHEDRON,polygon_faces.GetNumberOfCells(),face_info) ug.SetPoints(vertex_locations) writer = vtk.vtkUnstructuredGridWriter() writer.SetFileName("polyhedron.vtu") writer.SetInputData(ug) writer.Write() -- View this message in context: http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643p5729314.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Sun Nov 2 12:16:44 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 2 Nov 2014 12:16:44 -0500 Subject: [vtkusers] polyhedron in python In-Reply-To: <1414942912370-5729314.post@n5.nabble.com> References: <1410293986843-5728643.post@n5.nabble.com> <20140910000223.A509A843D7@public.kitware.com> <1414942912370-5729314.post@n5.nabble.com> Message-ID: This example might be useful: http://vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Polyhedron On Sun, Nov 2, 2014 at 10:41 AM, George wrote: > Good day, > > I have not managed to create a single cell polyhedron. Can somebody see > where I am going wrong with my code (it is very likely the input arguments > for insertnextcell)? When I open the file in paraview I can see the vertices > with the glyph filter, but there is no cell. > Best regards, > George > > import vtk > vertex_locations = vtk.vtkPoints() > > vertex_locations.SetNumberOfPoints(4) > vertex_locations.SetPoint( 0, (-0.816497, -0.816497, 0.00000)) > vertex_locations.SetPoint( 1, (-0.816497, 0.000000, -0.57735)) > vertex_locations.SetPoint( 2, (-0.816497, 0.000000, 0.57735)) > vertex_locations.SetPoint( 3, (-0.816497, 0.816497, 0.00000)) > > polygon_faces = vtk.vtkCellArray() > > q = vtk.vtkQuad() > q.GetPointIds().SetId(0, 0) > q.GetPointIds().SetId(1, 1) > q.GetPointIds().SetId(2, 2) > q.GetPointIds().SetId(3, 3) > polygon_faces.InsertNextCell(q) > > vertex_list = vtk.vtkIdList() > face_info = vtk.vtkIdList() > > polygon_faces.InitTraversal() > while polygon_faces.GetNextCell(vertex_list) == 1: > face_info.InsertNextId(vertex_list.GetNumberOfIds()) > > for j in range(vertex_list.GetNumberOfIds()): > face_info.InsertNextId(vertex_list.GetId(j)) > > ug = vtk.vtkUnstructuredGrid() > ug.InsertNextCell(vtk.VTK_POLYHEDRON,polygon_faces.GetNumberOfCells(),face_info) > ug.SetPoints(vertex_locations) > > writer = vtk.vtkUnstructuredGridWriter() > writer.SetFileName("polyhedron.vtu") > writer.SetInputData(ug) > writer.Write() > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643p5729314.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From mikerob2015 at gmail.com Sun Nov 2 14:18:08 2014 From: mikerob2015 at gmail.com (Mike Rob) Date: Sun, 2 Nov 2014 13:18:08 -0600 Subject: [vtkusers] CMakefile + QVTKWidget In-Reply-To: References: Message-ID: I wanted to add that if I take out the instant of the QVTKWidget from the mainwindow.ui, then the code runs fine without the " glibc detected" and "core dumped" On Sat, Nov 1, 2014 at 10:42 PM, Mike Rob wrote: > Hi, > > I have a simple example which has an instant of QVTKWidget. I can compile > the code successfully using the following cmake file, but when I run the > binary file, I get *** glibc detected *** core dumped.... > > Here is my CMakeFile. Is there anything wrong in cmake? > > cmake_minimum_required(VERSION 2.8) > > PROJECT(HelloWorld) > > find_package(Qt5Widgets) > > find_package(ITK REQUIRED) > include(${ITK_USE_FILE}) > if (ITKVtkGlue_LOADED) > find_package(VTK REQUIRED) > include(${VTK_USE_FILE}) > else() > find_package(ItkVtkGlue REQUIRED) > include(${ItkVtkGlue_USE_FILE}) > set(Glue ItkVtkGlue) > endif() > > QT5_WRAP_UI(UISrcs mainwindow.ui) > QT5_WRAP_CPP(MOCSrcs mainwindow.h) > > ADD_EXECUTABLE(MyProject HelloWorld.cpp mainwindow.cpp ${MOCSrcs} > ${UISrcs}) > > include_directories(${CMAKE_CURRENT_SOURCE_DIR} > ${CMAKE_CURRENT_BINARY_DIR}) > > qt5_use_modules(MyProject Widgets) > > target_link_libraries(MyProject ${Glue} ${VTK_LIBRARIES} > ${ITK_LIBRARIES}) > > > Mike > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sun Nov 2 14:55:04 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 2 Nov 2014 14:55:04 -0500 Subject: [vtkusers] How to vis normal vectors of polydata as arrows ? In-Reply-To: References: <265865E2-06AF-4EEA-86CD-5FC2BA5A85F1@gmail.com> Message-ID: Here is a simple example: http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/OrientedGlyphs On Thu, Oct 30, 2014 at 8:04 AM, David Cole via vtkusers wrote: > Also, this example: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs > > contains much more than what you're asking for, but also does contain > exactly what you're asking for. Visualizing normal vectors with arrow > glyphs. > > HTH, > David C. > > > On Wed, Oct 29, 2014 at 10:52 PM, Adamos Kyriakou > wrote: >> >> I wrote a blog post which shows how to do that. Take a look at >> http://pyscience.wordpress.com/2014/10/05/from-ray-casting-to-ray-tracing-with-python-and-vtk/ >> >> Cheers, >> Adam >> >> On Oct 30, 2014, at 1:33 PM, Lin M wrote: >> >> Hi all, >> >> I'm trying to vis the normal vectos of polydata as arrows. Is there any >> convenient way to achieve this? I read the example >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/OrientedArrow >> here, but I still don't understand how to do this. It seems to vis one arrow >> we need to follow quite a lot steps. I think my problem is the same with >> http://vtk.1045678.n5.nabble.com/vtkglyph3D-with-arrowsource-td1247920.html >> , though there is no answer below. :-( >> >> Can anyone give me some advice? Thank you very much! >> >> Best, >> Lin >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://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 >> >> 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From g.bogle at auckland.ac.nz Sun Nov 2 15:51:23 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 2 Nov 2014 20:51:23 +0000 Subject: [vtkusers] Python wrapping In-Reply-To: References: , Message-ID: Hi David, Thanks for that clarification. I don't know much about Python, and less about Python wrapping in VTK. I have no idea why the simple example program fails. The code is: http://www.vtk.org/Wiki/VTK/Examples/Python/Visualization/ProgGlyph with the first line changed (or removed - it makes no difference). PYTHONPATH includes C:\vtk-vs10-x64\lib\site-packages\vtk, and all the .pyd files are there. The first entry in PATH is C:\vtk-vs10-x64\bin. Do I need any other VTK directories in the path? In the error message, repeated below, can you tell me for which DLL does the DLL load fail? D:\testing\VTK\Superquadric>vtkpython superquadric.py Traceback (most recent call last): File "superquadric.py", line 3, in import vtk File "C:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in __helper.refine_import_err('rendering', 'vtkRenderingPython', exc) File "C:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in refine_import_err raise LinkError, str(exc) vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 application. Both python27 and VTK are 64-bit. By the way, what are the vtk*PythonD.dll files? Thanks Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Monday, 3 November 2014 2:18 a.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Python wrapping Hi Gib, The vtk*Python.pyd files are the DLLs that you are looking for. See here: https://docs.python.org/2/faq/windows.html#is-a-pyd-file-the-same-as-a-dll - David On Sun, Nov 2, 2014 at 12:09 AM, Gib Bogle > wrote: Hi David, All the .pyd files are where they should be, and all the vtk*PythonD.dll files are where they should be, in C:\vtk-vs10-x64\bin, which is in the PATH. The point of my question was that the VTK release build did not create any vtk*Python.dll files, although it did create the .lib files. Correct me if I'm wrong, but I think that vtkpython is looking for the missing DLL files - specifically, for vtkRenderingPython.dll. Am I wrong in thinking that they should have been built? Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Sunday, 2 November 2014 4:11 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Python wrapping Hi Gib, The python modules are called "vtk*Python.pyd" on Windows. On your system, I'm guessing that they should be in this directory: c:\VTK-VS10-x64\lib\site-packages\vtk And, in order for the modules to be loaded, all of the VTK DLLs must also be in your PATH. Either that, or you can copy them all into c:\VTK-VS10-x64\lib\site-packages\vtk so that the .pyd files will be able to find them there. The vtk*PythonD.dll files are not python modules, they are support libraries that are needed by the python modules. - David On Sat, Nov 1, 2014 at 8:54 PM, Gib Bogle > wrote: I just rebuilt VTK-5.10.1 64-bit on Windows with VTK_WRAP_PYTHON ON. The build completed without errors. I do not understand why I have 14 .lib and .dll files named vtk*PythonD.dll and vtk*PythonD.lib, and 14 .lib files named vtk*Python.lib, but no vtk*Python.dll. This causes my attempt to run a VTK-Python example to fail like this: D:\testing\VTK\Superquadric>vtkpython superquadric.py Traceback (most recent call last): File "superquadric.py", line 1, in import vtk File "c:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in __helper.refine_import_err('rendering', 'vtkRenderingPython', exc) File "c:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in refine_import_err raise LinkError, str(exc) vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 application. I see that somebody was asking exactly the same question back in October, 2010, but there was no answer. Any suggestions? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From george.gerber at gmail.com Sun Nov 2 16:33:09 2014 From: george.gerber at gmail.com (George) Date: Sun, 2 Nov 2014 13:33:09 -0800 (PST) Subject: [vtkusers] polyhedron in python In-Reply-To: References: <1410293986843-5728643.post@n5.nabble.com> <20140910000223.A509A843D7@public.kitware.com> <1414942912370-5729314.post@n5.nabble.com> Message-ID: <1414963989146-5729319.post@n5.nabble.com> Good day, I have translated the example of Bill into the best Python I know. I get the following error: Traceback (most recent call last): File "C:\Users\george limited\Desktop\unstructuredgrid.py", line 19, in ug.InsertNextCell(vtk.VTK_POLYHEDRON,4,pointids,1,faces) TypeError: InsertNextCell argument 5: expected a sequence of 0 values, got vtkobject Any advice will be very much appreciated. Best regards, George The code is: import vtk points = vtk.vtkPoints() pointids = [0,1,2,3] points.InsertNextPoint(0,0,0) points.InsertNextPoint(1,0,0) points.InsertNextPoint(1,1,0) points.InsertNextPoint(0,1,0) faces = vtk.vtkCellArray() face0 = [0,1,2,3] faces.InsertNextCell(4,face0) ug = vtk.vtkUnstructuredGrid() ug.SetPoints(points) ug.InsertNextCell(vtk.VTK_POLYHEDRON,4,pointids,1,faces.GetPointer()) writer = vtk.vtkUnstructuredGridWriter() writer.SetFileName("polyhedron.vtu") writer.SetInputData(ug) writer.Write() -- View this message in context: http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643p5729319.html Sent from the VTK - Users mailing list archive at Nabble.com. From bbenb43 at gmail.com Sun Nov 2 16:36:34 2014 From: bbenb43 at gmail.com (b43 b43) Date: Sun, 2 Nov 2014 22:36:34 +0100 Subject: [vtkusers] C# display a pointcloud from byte[] Message-ID: Hello! I wanted to display my pointcloud with vtk in a windows form application with c#. I have the pointcloud in a byte array: 640 * 480 * 4 * 8 format. So my question is that: is it possible to display my pointcloud with vtk from a byte[] array? If yes, how? If not, do you know any other solution for my problem? Thanks for your help, Beni -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Nov 2 16:52:27 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 2 Nov 2014 14:52:27 -0700 Subject: [vtkusers] Python wrapping In-Reply-To: References: Message-ID: Hi Gib, Yes, the .pyd files should be in the PYTHONPATH and the DLLs should be in the PATH. That's all that should be needed. My best guess is that it is failing to load vtkRenderingPython.pyd itself, and it you hadn't specifically told me that both your python and your VTK are 64-bit, my guess would be that it was trying to load a 64-bit .pyd file into a 32-bit python. Try to see if you can load the .pyd files directly, by doing this in python: import vtkCommonPython When that fails, it should provide a more meaningful error message. In any case, it's always best to start testing with the module that has the fewest dependencies (i.e. Common) and then work up from there. The vtk*PythonD.dll files have all the code that actually translates python method calls into VTK C++ method calls. But they aren't python modules (i.e. they have no python "init" method). They are, in essence, the back-end of the wrappers while the vtk*Python.pyd files are the front-end. - David On Sun, Nov 2, 2014 at 1:51 PM, Gib Bogle wrote: > Hi David, > > Thanks for that clarification. I don't know much about Python, and less > about Python wrapping in VTK. > > I have no idea why the simple example program fails. The code is: > http://www.vtk.org/Wiki/VTK/Examples/Python/Visualization/ProgGlyph > with the first line changed (or removed - it makes no difference). > > PYTHONPATH includes C:\vtk-vs10-x64\lib\site-packages\vtk, and all the > .pyd files are there. > > The first entry in PATH is C:\vtk-vs10-x64\bin. Do I need any other VTK > directories in the path? > > In the error message, repeated below, can you tell me for which DLL does > the DLL load fail? > > D:\testing\VTK\Superquadric>vtkpython superquadric.py > Traceback (most recent call last): > File "superquadric.py", line 3, in import vtk > File "C:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in > __helper.refine_import_err('rendering', 'vtkRenderingPython', exc) > File "C:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in > refine_import_err raise LinkError, str(exc) > vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 > application. > > Both python27 and VTK are 64-bit. > > By the way, what are the vtk*PythonD.dll files? > > Thanks > Gib > ------------------------------ > *From:* David Gobbi [david.gobbi at gmail.com] > *Sent:* Monday, 3 November 2014 2:18 a.m. > > *To:* Gib Bogle > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Python wrapping > > Hi Gib, > > The vtk*Python.pyd files are the DLLs that you are looking for. See > here: > https://docs.python.org/2/faq/windows.html#is-a-pyd-file-the-same-as-a-dll > > - David > > On Sun, Nov 2, 2014 at 12:09 AM, Gib Bogle wrote: > >> Hi David, >> >> All the .pyd files are where they should be, and all the vtk*PythonD.dll >> files are where they should be, in C:\vtk-vs10-x64\bin, which is in the >> PATH. The point of my question was that the VTK release build did not >> create any vtk*Python.dll files, although it did create the .lib files. >> Correct me if I'm wrong, but I think that vtkpython is looking for the >> missing DLL files - specifically, for vtkRenderingPython.dll. Am I wrong >> in thinking that they should have been built? >> >> Gib >> ------------------------------ >> *From:* David Gobbi [david.gobbi at gmail.com] >> *Sent:* Sunday, 2 November 2014 4:11 p.m. >> *To:* Gib Bogle >> *Cc:* vtkusers at vtk.org >> *Subject:* Re: [vtkusers] Python wrapping >> >> Hi Gib, >> >> The python modules are called "vtk*Python.pyd" on Windows. >> On your system, I'm guessing that they should be in this directory: >> c:\VTK-VS10-x64\lib\site-packages\vtk >> >> And, in order for the modules to be loaded, all of the VTK DLLs >> must also be in your PATH. Either that, or you can copy them all >> into c:\VTK-VS10-x64\lib\site-packages\vtk so that the .pyd files >> will be able to find them there. >> >> The vtk*PythonD.dll files are not python modules, they are support >> libraries that are needed by the python modules. >> >> - David >> >> >> >> On Sat, Nov 1, 2014 at 8:54 PM, Gib Bogle wrote: >> >>> I just rebuilt VTK-5.10.1 64-bit on Windows with VTK_WRAP_PYTHON ON. >>> The build completed without errors. I do not understand why I have 14 .lib >>> and .dll files named vtk*PythonD.dll and vtk*PythonD.lib, and 14 .lib files >>> named vtk*Python.lib, but no vtk*Python.dll. This causes my attempt to run >>> a VTK-Python example to fail like this: >>> >>> D:\testing\VTK\Superquadric>vtkpython superquadric.py >>> Traceback (most recent call last): >>> File "superquadric.py", line 1, in import vtk >>> File "c:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in >>> __helper.refine_import_err('rendering', 'vtkRenderingPython', exc) >>> File "c:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in >>> refine_import_err raise LinkError, str(exc) >>> vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 >>> application. >>> >>> I see that somebody was asking exactly the same question back in >>> October, 2010, but there was no answer. >>> >>> Any suggestions? >>> >>> Thanks >>> Gib >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sun Nov 2 17:01:36 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Sun, 2 Nov 2014 22:01:36 +0000 Subject: [vtkusers] Python wrapping In-Reply-To: References: , Message-ID: Thanks David. 'import vtkCommonPython' works, as do several other modules. Meantime I looked more closely at the depends info and realized that it was finding 32-bit Qt libraries. Putting the 64-bit Qt directory at the start of PATH fixed that, and now it works :) I guess vtkRendering needs Qt while several of the others do not. It really is a nuisance having both 32-bit and 64-bit libraries on my system, but I cannot switch completely to 64-bit, for various reasons. Thanks for your help Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Monday, 3 November 2014 10:52 a.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Python wrapping Hi Gib, Yes, the .pyd files should be in the PYTHONPATH and the DLLs should be in the PATH. That's all that should be needed. My best guess is that it is failing to load vtkRenderingPython.pyd itself, and it you hadn't specifically told me that both your python and your VTK are 64-bit, my guess would be that it was trying to load a 64-bit .pyd file into a 32-bit python. Try to see if you can load the .pyd files directly, by doing this in python: import vtkCommonPython When that fails, it should provide a more meaningful error message. In any case, it's always best to start testing with the module that has the fewest dependencies (i.e. Common) and then work up from there. The vtk*PythonD.dll files have all the code that actually translates python method calls into VTK C++ method calls. But they aren't python modules (i.e. they have no python "init" method). They are, in essence, the back-end of the wrappers while the vtk*Python.pyd files are the front-end. - David On Sun, Nov 2, 2014 at 1:51 PM, Gib Bogle > wrote: Hi David, Thanks for that clarification. I don't know much about Python, and less about Python wrapping in VTK. I have no idea why the simple example program fails. The code is: http://www.vtk.org/Wiki/VTK/Examples/Python/Visualization/ProgGlyph with the first line changed (or removed - it makes no difference). PYTHONPATH includes C:\vtk-vs10-x64\lib\site-packages\vtk, and all the .pyd files are there. The first entry in PATH is C:\vtk-vs10-x64\bin. Do I need any other VTK directories in the path? In the error message, repeated below, can you tell me for which DLL does the DLL load fail? D:\testing\VTK\Superquadric>vtkpython superquadric.py Traceback (most recent call last): File "superquadric.py", line 3, in import vtk File "C:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in __helper.refine_import_err('rendering', 'vtkRenderingPython', exc) File "C:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in refine_import_err raise LinkError, str(exc) vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 application. Both python27 and VTK are 64-bit. By the way, what are the vtk*PythonD.dll files? Thanks Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Monday, 3 November 2014 2:18 a.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Python wrapping Hi Gib, The vtk*Python.pyd files are the DLLs that you are looking for. See here: https://docs.python.org/2/faq/windows.html#is-a-pyd-file-the-same-as-a-dll - David On Sun, Nov 2, 2014 at 12:09 AM, Gib Bogle > wrote: Hi David, All the .pyd files are where they should be, and all the vtk*PythonD.dll files are where they should be, in C:\vtk-vs10-x64\bin, which is in the PATH. The point of my question was that the VTK release build did not create any vtk*Python.dll files, although it did create the .lib files. Correct me if I'm wrong, but I think that vtkpython is looking for the missing DLL files - specifically, for vtkRenderingPython.dll. Am I wrong in thinking that they should have been built? Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Sunday, 2 November 2014 4:11 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Python wrapping Hi Gib, The python modules are called "vtk*Python.pyd" on Windows. On your system, I'm guessing that they should be in this directory: c:\VTK-VS10-x64\lib\site-packages\vtk And, in order for the modules to be loaded, all of the VTK DLLs must also be in your PATH. Either that, or you can copy them all into c:\VTK-VS10-x64\lib\site-packages\vtk so that the .pyd files will be able to find them there. The vtk*PythonD.dll files are not python modules, they are support libraries that are needed by the python modules. - David On Sat, Nov 1, 2014 at 8:54 PM, Gib Bogle > wrote: I just rebuilt VTK-5.10.1 64-bit on Windows with VTK_WRAP_PYTHON ON. The build completed without errors. I do not understand why I have 14 .lib and .dll files named vtk*PythonD.dll and vtk*PythonD.lib, and 14 .lib files named vtk*Python.lib, but no vtk*Python.dll. This causes my attempt to run a VTK-Python example to fail like this: D:\testing\VTK\Superquadric>vtkpython superquadric.py Traceback (most recent call last): File "superquadric.py", line 1, in import vtk File "c:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in __helper.refine_import_err('rendering', 'vtkRenderingPython', exc) File "c:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in refine_import_err raise LinkError, str(exc) vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 application. I see that somebody was asking exactly the same question back in October, 2010, but there was no answer. Any suggestions? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From grosenkj at eos.ubc.ca Sun Nov 2 18:48:32 2014 From: grosenkj at eos.ubc.ca (=?UTF-8?Q?Gu=C3=B0ni_Karl_Rosenkj=C3=A6r?=) Date: Sun, 2 Nov 2014 15:48:32 -0800 Subject: [vtkusers] polyhedron in python In-Reply-To: <1414963989146-5729319.post@n5.nabble.com> References: <1410293986843-5728643.post@n5.nabble.com> <20140910000223.A509A843D7@public.kitware.com> <1414942912370-5729314.post@n5.nabble.com> <1414963989146-5729319.post@n5.nabble.com> Message-ID: Hi George, In your example you are only defining a single face and I am pretty sure that a polyhedron requires a closed / "watertight" volume by definition. I am using vtk 5.10.1 with python 2.7 and the following example works for me (translation of C++ example Bill posted above). Code: import vtk # Create polyhedron (cube) pointIds = vtk.vtkIdList() pointIds.SetNumberOfIds(8) for i in range(8): pointIds.InsertNextId(i) points = vtk.vtkPoints() points.InsertNextPoint(-1.0,-1.0,-1.0) points.InsertNextPoint( 1.0,-1.0,-1.0) points.InsertNextPoint( 1.0, 1.0,-1.0) points.InsertNextPoint(-1.0, 1.0,-1.0) points.InsertNextPoint(-1.0,-1.0, 1.0) points.InsertNextPoint( 1.0,-1.0, 1.0) points.InsertNextPoint( 1.0, 1.0, 1.0) points.InsertNextPoint(-1.0, 1.0, 1.0) # List of pointIds that make up the face faceList = [[0, 3, 2, 1],[0, 4, 7, 3],[4, 5, 6, 7],[5, 1, 2, 6],[0, 1, 5, 4],[2, 3, 7, 6]] faceId = vtk.vtkIdList() faceId.InsertNextId(6) # Number faces that make up the cell. for face in faceList: # Loop over all the faces faceId.InsertNextId(len(face)) # Number of points in face [faceId.InsertNextId(i) for i in face] # Insert the pointIds for the face ugrid = vtk.vtkUnstructuredGrid() ugrid.SetPoints(points) ugrid.InsertNextCell(vtk.VTK_POLYHEDRON, faceId) writer = vtk.vtkXMLUnstructuredGridWriter() writer.SetInput(ugrid) writer.SetFileName("polyhedron.vtu") writer.SetDataModeToAscii() writer.Update() Code ends The main difference is that the ugrid.InsertNextCells takes 2 arguments: type of cell and the vtkIdList of point Ids that make up the cell. For polyhedrons, the IdList has to contain information about the number faces that make up the cell and then the point Ids of the the faces. I hope this helps, Gudni On 2 November 2014 13:33, George wrote: > Good day, > > I have translated the example of Bill into the best Python I know. I get > the > following error: > Traceback (most recent call last): > File "C:\Users\george limited\Desktop\unstructuredgrid.py", line 19, in > > ug.InsertNextCell(vtk.VTK_POLYHEDRON,4,pointids,1,faces) > TypeError: InsertNextCell argument 5: expected a sequence of 0 values, got > vtkobject > > Any advice will be very much appreciated. > Best regards, > George > > The code is: > import vtk > > points = vtk.vtkPoints() > pointids = [0,1,2,3] > > points.InsertNextPoint(0,0,0) > points.InsertNextPoint(1,0,0) > points.InsertNextPoint(1,1,0) > points.InsertNextPoint(0,1,0) > > faces = vtk.vtkCellArray() > > face0 = [0,1,2,3] > > faces.InsertNextCell(4,face0) > > ug = vtk.vtkUnstructuredGrid() > ug.SetPoints(points) > ug.InsertNextCell(vtk.VTK_POLYHEDRON,4,pointids,1,faces.GetPointer()) > > writer = vtk.vtkUnstructuredGridWriter() > writer.SetFileName("polyhedron.vtu") > writer.SetInputData(ug) > writer.Write() > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643p5729319.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Gudni Karl Rosenkjaer, PhD student at Geophysical Inversion Facility Department of Earth, Ocean and Atmospheric Sciences, University of British Columbia -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Sun Nov 2 19:21:25 2014 From: matimontg at gmail.com (Matias Montroull) Date: Sun, 2 Nov 2014 21:21:25 -0300 Subject: [vtkusers] C# display a pointcloud from byte[] In-Reply-To: References: Message-ID: You would need to iterate through the byte array and add one point at a time. Is it an image? On Sun, Nov 2, 2014 at 6:36 PM, b43 b43 wrote: > Hello! > > I wanted to display my pointcloud with vtk in a windows form application > with c#. I have the pointcloud in a byte array: 640 * 480 * 4 * 8 format. > > So my question is that: is it possible to display my pointcloud with vtk > from a byte[] array? If yes, how? If not, do you know any other solution > for my problem? > > Thanks for your help, > Beni > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From george.gerber at gmail.com Sun Nov 2 23:09:03 2014 From: george.gerber at gmail.com (George Gerber) Date: Mon, 3 Nov 2014 06:09:03 +0200 Subject: [vtkusers] polyhedron in python In-Reply-To: References: <1410293986843-5728643.post@n5.nabble.com> <20140910000223.A509A843D7@public.kitware.com> <1414942912370-5729314.post@n5.nabble.com> <1414963989146-5729319.post@n5.nabble.com> Message-ID: Good day, Thank you very much. It works! Below the code for the latest vtk. Best regards, George import vtk # Create polyhedron (cube) pointIds = vtk.vtkIdList() pointIds.SetNumberOfIds(8) for i in range(8): pointIds.InsertNextId(i) points = vtk.vtkPoints() points.InsertNextPoint(-1.0,-1.0,-1.0) points.InsertNextPoint( 1.0,-1.0,-1.0) points.InsertNextPoint( 1.0, 1.0,-1.0) points.InsertNextPoint(-1.0, 1.0,-1.0) points.InsertNextPoint(-1.0,-1.0, 1.0) points.InsertNextPoint( 1.0,-1.0, 1.0) points.InsertNextPoint( 1.0, 1.0, 1.0) points.InsertNextPoint(-1.0, 1.0, 1.0) # List of pointIds that make up the face faceList = [[0, 3, 2, 1],[0, 4, 7, 3],[4, 5, 6, 7],[5, 1, 2, 6],[0, 1, 5, 4],[2, 3, 7, 6]] faceId = vtk.vtkIdList() faceId.InsertNextId(6) # Number faces that make up the cell. for face in faceList: # Loop over all the faces faceId.InsertNextId(len(face)) # Number of points in face [faceId.InsertNextId(i) for i in face] # Insert the pointIds for the face ugrid = vtk.vtkUnstructuredGrid() ugrid.SetPoints(points) ugrid.InsertNextCell(vtk.VTK_POLYHEDRON, faceId) writer = vtk.vtkXMLUnstructuredGridWriter() writer.SetInputData(ugrid) writer.SetFileName("polyhedron.vtu") writer.SetDataModeToAscii() writer.Update() On 3 November 2014 01:48, Gu?ni Karl Rosenkj?r wrote: > Hi George, > > In your example you are only defining a single face and I am pretty sure > that a polyhedron requires a closed / "watertight" volume by definition. > > I am using vtk 5.10.1 with python 2.7 and the following example works for > me (translation of C++ example Bill posted above). > > Code: > import vtk > # Create polyhedron (cube) > pointIds = vtk.vtkIdList() > pointIds.SetNumberOfIds(8) > for i in range(8): > pointIds.InsertNextId(i) > points = vtk.vtkPoints() > points.InsertNextPoint(-1.0,-1.0,-1.0) > points.InsertNextPoint( 1.0,-1.0,-1.0) > points.InsertNextPoint( 1.0, 1.0,-1.0) > points.InsertNextPoint(-1.0, 1.0,-1.0) > points.InsertNextPoint(-1.0,-1.0, 1.0) > points.InsertNextPoint( 1.0,-1.0, 1.0) > points.InsertNextPoint( 1.0, 1.0, 1.0) > points.InsertNextPoint(-1.0, 1.0, 1.0) > > # List of pointIds that make up the face > faceList = [[0, 3, 2, 1],[0, 4, 7, 3],[4, 5, 6, 7],[5, 1, 2, 6],[0, 1, > 5, 4],[2, 3, 7, 6]] > faceId = vtk.vtkIdList() > faceId.InsertNextId(6) # Number faces that make up the cell. > for face in faceList: # Loop over all the faces > faceId.InsertNextId(len(face)) # Number of points in face > [faceId.InsertNextId(i) for i in face] # Insert the pointIds for the > face > > > ugrid = vtk.vtkUnstructuredGrid() > ugrid.SetPoints(points) > ugrid.InsertNextCell(vtk.VTK_POLYHEDRON, faceId) > > writer = vtk.vtkXMLUnstructuredGridWriter() > writer.SetInput(ugrid) > writer.SetFileName("polyhedron.vtu") > writer.SetDataModeToAscii() > writer.Update() > Code ends > > The main difference is that the ugrid.InsertNextCells takes 2 arguments: > type of cell and the vtkIdList of point Ids that make up the cell. For > polyhedrons, the IdList has to contain information about the number faces > that make up the cell and then the point Ids of the the faces. > > I hope this helps, > Gudni > > On 2 November 2014 13:33, George wrote: > >> Good day, >> >> I have translated the example of Bill into the best Python I know. I get >> the >> following error: >> Traceback (most recent call last): >> File "C:\Users\george limited\Desktop\unstructuredgrid.py", line 19, in >> >> ug.InsertNextCell(vtk.VTK_POLYHEDRON,4,pointids,1,faces) >> TypeError: InsertNextCell argument 5: expected a sequence of 0 values, got >> vtkobject >> >> Any advice will be very much appreciated. >> Best regards, >> George >> >> The code is: >> import vtk >> >> points = vtk.vtkPoints() >> pointids = [0,1,2,3] >> >> points.InsertNextPoint(0,0,0) >> points.InsertNextPoint(1,0,0) >> points.InsertNextPoint(1,1,0) >> points.InsertNextPoint(0,1,0) >> >> faces = vtk.vtkCellArray() >> >> face0 = [0,1,2,3] >> >> faces.InsertNextCell(4,face0) >> >> ug = vtk.vtkUnstructuredGrid() >> ug.SetPoints(points) >> ug.InsertNextCell(vtk.VTK_POLYHEDRON,4,pointids,1,faces.GetPointer()) >> >> writer = vtk.vtkUnstructuredGridWriter() >> writer.SetFileName("polyhedron.vtu") >> writer.SetInputData(ug) >> writer.Write() >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/polyhedron-in-python-tp5728643p5729319.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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Gudni Karl Rosenkjaer, > PhD student at Geophysical Inversion Facility > Department of Earth, Ocean and Atmospheric Sciences, > University of British Columbia > -------------- next part -------------- An HTML attachment was scrubbed... URL: From majcjc at gmail.com Mon Nov 3 03:47:49 2014 From: majcjc at gmail.com (Lin M) Date: Mon, 3 Nov 2014 16:47:49 +0800 Subject: [vtkusers] How to vis normal vectors of polydata as arrows ? In-Reply-To: References: <265865E2-06AF-4EEA-86CD-5FC2BA5A85F1@gmail.com> Message-ID: Thank you very much, guys! It works now. Best, Lin On Mon, Nov 3, 2014 at 3:55 AM, Bill Lorensen wrote: > Here is a simple example: > http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/OrientedGlyphs > > > On Thu, Oct 30, 2014 at 8:04 AM, David Cole via vtkusers > wrote: > > Also, this example: > > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvatureBandsWithGlyphs > > > > contains much more than what you're asking for, but also does contain > > exactly what you're asking for. Visualizing normal vectors with arrow > > glyphs. > > > > HTH, > > David C. > > > > > > On Wed, Oct 29, 2014 at 10:52 PM, Adamos Kyriakou > > wrote: > >> > >> I wrote a blog post which shows how to do that. Take a look at > >> > http://pyscience.wordpress.com/2014/10/05/from-ray-casting-to-ray-tracing-with-python-and-vtk/ > >> > >> Cheers, > >> Adam > >> > >> On Oct 30, 2014, at 1:33 PM, Lin M wrote: > >> > >> Hi all, > >> > >> I'm trying to vis the normal vectos of polydata as arrows. Is there any > >> convenient way to achieve this? I read the example > >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/OrientedArrow > >> here, but I still don't understand how to do this. It seems to vis one > arrow > >> we need to follow quite a lot steps. I think my problem is the same with > >> > http://vtk.1045678.n5.nabble.com/vtkglyph3D-with-arrowsource-td1247920.html > >> , though there is no answer below. :-( > >> > >> Can anyone give me some advice? Thank you very much! > >> > >> Best, > >> Lin > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://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://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 > >> > >> 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 > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.barusseau at epita.fr Mon Nov 3 04:35:14 2014 From: thomas.barusseau at epita.fr (baruss_t) Date: Mon, 3 Nov 2014 09:35:14 +0000 Subject: [vtkusers] Represent particles (as a set of points) and associate a scalar to them? In-Reply-To: References: <1414747923304-5729299.post@n5.nabble.com>, Message-ID: <1415007326281.4191@epita.fr> Hello Cory, I changed PARTICLES to POLYDATA, however it doesn't change anything. 5 points are displayed (when I only give two sets of coordinates), and the bounds indicated by ParaView are : X range: 0 to 2 Y range: 0 to 0.816 Z range: 0 to 0.0536 When I have this in my file: > DATASET POLYDATA > POINTS 2 float > 0.0039 0.8156 0.0266 > 0.2419 0.5082 0.0536 > > POINT_DATA 2 > SCALARS identity float 1 > LOOKUP_TABLE default > 1 > 2 Also, I can't display/color the points by their "identity" associated scalar. I feel that nothing's working as I would like to, here. Care to help me a little more? I would really appreciate it. Oh, I was looking at the 5 points, and I think I get it. I'm not editing the rest of the message, but here is what I think : 3 of these points are aligned, and the only changing value is X. These points have X values of 0, 1, and 2. And 1 and 2 are the values specified in my SCALARS. So, I don't know why ParaView considers them as points, when they're specified as values... The other two points seem to be placed correctly though, and I think these two points are the points I specified in the POLYDATA DATASET. However, I still can't associate the scalars to them. Do you know where it might come from?? -- Thomas Barusseau ________________________________ De : Cory Quammen Envoy? : vendredi 31 octobre 2014 17:01 ? : baruss_t Cc : vtkusers at vtk.org Objet : Re: [vtkusers] Represent particles (as a set of points) and associate a scalar to them? Try to change PARTICLES to POLYDATA in your file, and it should load. See http://www.vtk.org/VTK/img/file-formats.pdf for details on the legacy format. On Fri, Oct 31, 2014 at 5:32 AM, Nephophobic > wrote: Hello. I'm working on an old project, and the vtk format used is the legacy ASCII one. I need to display particles in ParaView, and the code already there generates .particles files, which use the PARTICLES dataset. First of all, I can't find anything on the Internet about that dataset. Second of all, here is the content : > # vtk DataFile Version 3.6.2 > Particle file, current time (s) = 1 > > DATASET PARTICLES > POINTS 2 float > 0.003 0.815 0.026 > 0.241 0.508 0.053 > > POINT_DATA 2 > SCALARS identity float 1 > LOOKUP_TABLE default > 1 > 2 Now this looks good : it's two particles, represented by (x, y, z) values, and each of them has a scalar `identity` associated. However, when opening this in ParaView, I don't get 2 points, I get 4. Also the values are all messed up, and I can't even color them according to their `identity` value. So, it sucks. And since I can't find anything about the PARTICLES dataset, I guess I shouldn't use it. Can someone help me in any way ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Represent-particles-as-a-set-of-points-and-associate-a-scalar-to-them-tp5729299.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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Mon Nov 3 08:11:13 2014 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Mon, 3 Nov 2014 14:11:13 +0100 Subject: [vtkusers] [vtk-developers] Overhaul of the rendering subsystem in VTK: Volume Rendering update In-Reply-To: References: Message-ID: Hello, Thank you for letting us know the current changes in VTK volume rendering, that seems really exciting. In the source issue 31, I saw that your were asking to the community if there were any feature needed. One feature that we would really like to see is a way to have multiple opacity transfer functions together used with a label data map to mask the volume. Right now it is possible to have multiple color TF, but not multiple opacity TF. Is this feature planned to be developed ? This would enable to have "almost transparent" structure in front of the camera and "opaque structure" in the back, even though the structure have the same scalar value. A visual example here , coming from the 3mensio software. Thanks, Simon 2014-10-22 20:27 GMT+02:00 Aashish Chaudhary : > Friends, > > Some more good news on the rendering side of things. In the last few days, > we have worked on porting two more volume mappers to OpenGL2 (FixedPoint > and Bunyk) and this noon we merged that code into VTK master. This change > should not affect the code that is using the OpenGL (and not OpenGL2) > backend. We will keep an eye on the dashboards and fix any issue that we > may find. Also, we have updated the vtkSmartVolumeMapper to deal with the > OpenGL and OpenGL2 backend. > > Please let us know if you have any questions or if you encounter any > issues in the current master related to this change. > > Thanks, > > On Thu, Oct 16, 2014 at 12:31 PM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> Friends, >> >> As referred earlier, we are continuously working on improving the volume >> rendering. As part of next set of delivery, we are going to bring our >> first OpenGL2 volume mapper to the OpenGL2 backend. >> We have a branch that will get merged today and* it should only affect >> the dashboards and code base switched to OpenGL2 backend*. We will >> continue to improve the integration and will use and improve the >> existing OpenGL2 backend code as necessary. >> >> If you have any questions of concerns or if you find in any ways its >> affecting your regular builds that uses OpenGL(default, and not OpenGL2) >> backend then let us know as soon as possible. >> >> Thanks, >> >> >> On Fri, Oct 10, 2014 at 9:53 AM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> Friends, >>> >>> >>> As reported back in July, we are in the process of a major overhaul of >>> the rendering subsystem in VTK. The July article ( >>> http://www.kitware.com/source/home/post/144) focused primarily on our >>> efforts to move to OpenGL 2.1+ to support faster polygonal rendering. The >>> October Source will contain an article focused on our rewrite of the >>> vtkGPURayCastMapper class to provide a faster, more portable and more >>> easily extensible volume mapper for regular rectilinear grids. >>> >>> >>> >>> VTK has a long history of volume rendering, and unfortunately that >>> history is evident in the large selection of classes available to render >>> volumes. Each of these methods was state-of-the-art at the time, but given >>> VTK's 20+ year history many of these methods are now quite obsolete. One >>> goal of this effort is to reduce the number of volume mappers to ideally >>> just two - one that supports accelerated rendering on graphics hardware and >>> another that works in parallel on the CPU. In addition, the >>> vtkSmartVolumeMapper would help application developers by automatically >>> choosing between these techniques based on system performance. >>> >>> >>> >>> In this first phase, we have created a replacement for >>> vtkGPURayCastMapper. Currently, this is available for testing from the VTK >>> git repository (in master branch, disabled by default). General >>> instructions on how to build VTK from the source is available at this URL: >>> http://www.vtk.org/Wiki/VTK/Git*. *In order to build the new mapper, >>> enable the Module_vtkRenderingVolumeOpenGLNew module in cmake (via -D >>> *Module_vtkRenderingVolumeOpenGL=ON*), in ccmake or cmake-gui. Once >>> built, it can be used via vtkSmartVolumeMapper or used directly. Once >>> sufficient testing by the community has been performed, this class will >>> replace the old vtkGPURayCastMapper. In addition, we are adding this new >>> mapper to the OpenGL2 module. Availability of the new mapper with OpenGL2 >>> module will improve the management of textures in the mapper and eventually >>> benefitting both forms of rendering (geometry and volume) by sharing common >>> code between them. >>> >>> >>> Please contact us if you have any questions or encounter any issues. >>> >>> >>> Thanks, >>> >>> -- >>> >>> >>> >>> *| 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 >> * >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -- ------------------------------------------------------------------ Simon Esneault 13 rue Vasselot 35000 Rennes, France Tel : 06 64 61 30 94 Mail : simon.esneault at gmail.com ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.barusseau at epita.fr Mon Nov 3 09:18:23 2014 From: thomas.barusseau at epita.fr (baruss_t) Date: Mon, 3 Nov 2014 14:18:23 +0000 Subject: [vtkusers] Represent particles (as a set of points) and associate a scalar to them? In-Reply-To: <1415007326281.4191@epita.fr> References: <1414747923304-5729299.post@n5.nabble.com>, , <1415007326281.4191@epita.fr> Message-ID: <1415024314766.18254@epita.fr> Well, I finally got it to work, but this is kinda hack-ish... So, I used the POLYDATA DATASET. I wrote my points, and then linked them two at the time using VERTICES. So it looked like that, for 4 points : > VERTICES 3 9 > 2 0 1 > 2 1 2 > 2 2 3 Then, I just put my POINT_DATA and my SCALARS, and it worked. I can now display points (like particles) inside of ParaView, and associate a value to them.? So thanks for the hint on the POLYDATA DATASET :) Best, -- Thomas Barusseau ________________________________ De : vtkusers de la part de baruss_t Envoy? : lundi 3 novembre 2014 09:35 ? : Cory Quammen Cc : vtkusers at vtk.org Objet : Re: [vtkusers] Represent particles (as a set of points) and associate a scalar to them? Hello Cory, I changed PARTICLES to POLYDATA, however it doesn't change anything. 5 points are displayed (when I only give two sets of coordinates), and the bounds indicated by ParaView are : X range: 0 to 2 Y range: 0 to 0.816 Z range: 0 to 0.0536 When I have this in my file: > DATASET POLYDATA > POINTS 2 float > 0.0039 0.8156 0.0266 > 0.2419 0.5082 0.0536 > > POINT_DATA 2 > SCALARS identity float 1 > LOOKUP_TABLE default > 1 > 2 Also, I can't display/color the points by their "identity" associated scalar. I feel that nothing's working as I would like to, here. Care to help me a little more? I would really appreciate it. Oh, I was looking at the 5 points, and I think I get it. I'm not editing the rest of the message, but here is what I think : 3 of these points are aligned, and the only changing value is X. These points have X values of 0, 1, and 2. And 1 and 2 are the values specified in my SCALARS. So, I don't know why ParaView considers them as points, when they're specified as values... The other two points seem to be placed correctly though, and I think these two points are the points I specified in the POLYDATA DATASET. However, I still can't associate the scalars to them. Do you know where it might come from?? -- Thomas Barusseau ________________________________ De : Cory Quammen Envoy? : vendredi 31 octobre 2014 17:01 ? : baruss_t Cc : vtkusers at vtk.org Objet : Re: [vtkusers] Represent particles (as a set of points) and associate a scalar to them? Try to change PARTICLES to POLYDATA in your file, and it should load. See http://www.vtk.org/VTK/img/file-formats.pdf for details on the legacy format. On Fri, Oct 31, 2014 at 5:32 AM, Nephophobic > wrote: Hello. I'm working on an old project, and the vtk format used is the legacy ASCII one. I need to display particles in ParaView, and the code already there generates .particles files, which use the PARTICLES dataset. First of all, I can't find anything on the Internet about that dataset. Second of all, here is the content : > # vtk DataFile Version 3.6.2 > Particle file, current time (s) = 1 > > DATASET PARTICLES > POINTS 2 float > 0.003 0.815 0.026 > 0.241 0.508 0.053 > > POINT_DATA 2 > SCALARS identity float 1 > LOOKUP_TABLE default > 1 > 2 Now this looks good : it's two particles, represented by (x, y, z) values, and each of them has a scalar `identity` associated. However, when opening this in ParaView, I don't get 2 points, I get 4. Also the values are all messed up, and I can't even color them according to their `identity` value. So, it sucks. And since I can't find anything about the PARTICLES dataset, I guess I shouldn't use it. Can someone help me in any way ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Represent-particles-as-a-set-of-points-and-associate-a-scalar-to-them-tp5729299.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 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 Mon Nov 3 10:54:47 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 3 Nov 2014 10:54:47 -0500 Subject: [vtkusers] compilation of VTK6.1 with Qt5-enabled - Policy CMP0040 is not set.... In-Reply-To: References: Message-ID: I think the means that that there is a new behavior in cmake 3.0.2 which the older vtk 6.2 release code isn't entirely happy with. Besides Gib's point, adding a line like the following to the top level CMakeLists.txt should address the warning. if(POLICY CMP0040) cmake_policy(SET CMP0040 OLD) endif() Updating the CMake script inside VTK's hdf5 to have an existing target is a better fix. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Sat, Nov 1, 2014 at 2:15 AM, Gib Bogle wrote: > They look to me like warnings, not errors. Is the build successful? > > Gib > ------------------------------ > *From:* vtkusers [vtkusers-bounces at vtk.org] on behalf of Sam Raby [ > rabysam28 at gmail.com] > *Sent:* Saturday, 1 November 2014 6:32 p.m. > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] compilation of VTK6.1 with Qt5-enabled - Policy > CMP0040 is not set.... > > I am compiling VTK 6.1 from [1] with Qt enabled (Qt 5.3.2 from [2]) > using cmake 3.0.2 from [3]. My OS is Ubuntu 12.04. > > I am running the following command [4] for ccmake: > > cd /path/to/VTK-Release-build > ccmake -DVTK_QT_VERSION:STRING=5 \ > -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt5.2.1-install/5.2.1/gcc_64/bin/qmake \ > -DVTK_Group_Qt:BOOL=ON \ > -DCMAKE_PREFIX_PATH:PATH=/path/to/qt.5.2.1-install/5.2.1/gcc_64/lib/cmake \ > -DBUILD_SHARED_LIBS:BOOL=ON > /path/to/VTK > > > but I'm getting the following error: > > *(ADD_CUSTOM_COMMAND):* > *Policy CMP0040 is not set: The target in the TARGET signature of* > *add_custom_command() must exist. Run "cmake --help-policy CMP0040" for **policy > details. Use the cmake_policy command to set the policy and* > *suppress this warning.* > > *The target name* > > *"/home/torabi/local2/VTK/VTK-6.1.0-build/ThirdParty/hdf5/vtkhdf5/H5Edefin.h"* > *is unknown in this context.* > *This warning is for project developers. Use -Wno-dev to suppress it.* > > Would you please hint me how to tackle this error? > > Thanks > -S > > [1] http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz > [2] > http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-1.6.0-5-online.run > [3] http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz > [4] http://www.vtk.org/Wiki/VTK/Building/Linux#Qt5 > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Nov 3 11:24:58 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 3 Nov 2014 11:24:58 -0500 Subject: [vtkusers] [vtk-developers] Overhaul of the rendering subsystem in VTK: Volume Rendering update In-Reply-To: References: Message-ID: On Mon, Nov 3, 2014 at 8:11 AM, Simon ESNEAULT wrote: > Hello, > > Thank you for letting us know the current changes in VTK volume rendering, > that seems really exciting. > In the source issue 31, I saw that your were asking to the community if > there were any feature needed. > Nice, thanks for reading our article. > One feature that we would really like to see is a way to have multiple > opacity transfer functions together used with a label data map to mask the > volume. > I believe I have seen a similar request earlier. I will add this feature to our agenda. > Right now it is possible to have multiple color TF, but not multiple > opacity TF. Is this feature planned to be developed ? This would enable > to have "almost transparent" structure in front of the camera and "opaque > structure" in the back, even though the structure have the same scalar > value. A visual example here > , coming > from the 3mensio software. > Thanks for the reference. I may contact you in case we make any progress this direction. Thanks, Aashish > > Thanks, > Simon > > > 2014-10-22 20:27 GMT+02:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Friends, >> >> Some more good news on the rendering side of things. In the last few >> days, we have worked on porting two more volume mappers to OpenGL2 >> (FixedPoint and Bunyk) and this noon we merged that code into VTK master. >> This change should not affect the code that is using the OpenGL (and not >> OpenGL2) backend. We will keep an eye on the dashboards and fix any issue >> that we may find. Also, we have updated the vtkSmartVolumeMapper to deal >> with the OpenGL and OpenGL2 backend. >> >> Please let us know if you have any questions or if you encounter any >> issues in the current master related to this change. >> >> Thanks, >> >> On Thu, Oct 16, 2014 at 12:31 PM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> Friends, >>> >>> As referred earlier, we are continuously working on improving the volume >>> rendering. As part of next set of delivery, we are going to bring our >>> first OpenGL2 volume mapper to the OpenGL2 backend. >>> We have a branch that will get merged today and* it should only affect >>> the dashboards and code base switched to OpenGL2 backend*. We will >>> continue to improve the integration and will use and improve the >>> existing OpenGL2 backend code as necessary. >>> >>> If you have any questions of concerns or if you find in any ways its >>> affecting your regular builds that uses OpenGL(default, and not OpenGL2) >>> backend then let us know as soon as possible. >>> >>> Thanks, >>> >>> >>> On Fri, Oct 10, 2014 at 9:53 AM, Aashish Chaudhary < >>> aashish.chaudhary at kitware.com> wrote: >>> >>>> Friends, >>>> >>>> >>>> As reported back in July, we are in the process of a major overhaul of >>>> the rendering subsystem in VTK. The July article ( >>>> http://www.kitware.com/source/home/post/144) focused primarily on our >>>> efforts to move to OpenGL 2.1+ to support faster polygonal rendering. The >>>> October Source will contain an article focused on our rewrite of the >>>> vtkGPURayCastMapper class to provide a faster, more portable and more >>>> easily extensible volume mapper for regular rectilinear grids. >>>> >>>> >>>> >>>> VTK has a long history of volume rendering, and unfortunately that >>>> history is evident in the large selection of classes available to render >>>> volumes. Each of these methods was state-of-the-art at the time, but given >>>> VTK?s 20+ year history many of these methods are now quite obsolete. One >>>> goal of this effort is to reduce the number of volume mappers to ideally >>>> just two - one that supports accelerated rendering on graphics hardware and >>>> another that works in parallel on the CPU. In addition, the >>>> vtkSmartVolumeMapper would help application developers by automatically >>>> choosing between these techniques based on system performance. >>>> >>>> >>>> >>>> In this first phase, we have created a replacement for >>>> vtkGPURayCastMapper. Currently, this is available for testing from the VTK >>>> git repository (in master branch, disabled by default). General >>>> instructions on how to build VTK from the source is available at this URL: >>>> http://www.vtk.org/Wiki/VTK/Git*. *In order to build the new mapper, >>>> enable the Module_vtkRenderingVolumeOpenGLNew module in cmake (via -D >>>> *Module_vtkRenderingVolumeOpenGL=ON*), in ccmake or cmake-gui. Once >>>> built, it can be used via vtkSmartVolumeMapper or used directly. Once >>>> sufficient testing by the community has been performed, this class will >>>> replace the old vtkGPURayCastMapper. In addition, we are adding this new >>>> mapper to the OpenGL2 module. Availability of the new mapper with OpenGL2 >>>> module will improve the management of textures in the mapper and eventually >>>> benefitting both forms of rendering (geometry and volume) by sharing common >>>> code between them. >>>> >>>> >>>> Please contact us if you have any questions or encounter any issues. >>>> >>>> >>>> Thanks, >>>> >>>> -- >>>> >>>> >>>> >>>> *| 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 >>> * >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> >> > > > -- > ------------------------------------------------------------------ > Simon Esneault > 13 rue Vasselot > 35000 Rennes, France > Tel : 06 64 61 30 94 > Mail : simon.esneault at gmail.com > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From vianamp at gmail.com Mon Nov 3 13:30:26 2014 From: vianamp at gmail.com (matheus_viana) Date: Mon, 3 Nov 2014 10:30:26 -0800 (PST) Subject: [vtkusers] Bug found in vtkTIFFReader Message-ID: <1415039426222-5729336.post@n5.nabble.com> Hi guys. I have an image processing algorithm that I am suppose to apply over many 16bit TIFF images. I wrote a simple routine that basically opens the image apply the algorithm and saves the result. However, I noticed that around the image number 250 the algorithm always crashes. Tracking back the problem I found a bug in the class vtkTIFFReader. This is a simple code that can be used to reproduce the error. Please download the sample.tif image at https://www.dropbox.com/s/pw15mo9ievnzx1o/sample.tif?dl=0 I would appreciate any help. Thanks a lot. #include #include int main() { for (int i = 0; i < 400; i++) { vtkSmartPointer TIFFReader = vtkSmartPointer::New(); TIFFReader -> SetFileName("sample.tif"); TIFFReader -> Update(); printf("%d\n",i); } return 0; } -- View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336.html Sent from the VTK - Users mailing list archive at Nabble.com. From george.gerber at gmail.com Mon Nov 3 13:51:06 2014 From: george.gerber at gmail.com (George) Date: Mon, 3 Nov 2014 10:51:06 -0800 (PST) Subject: [vtkusers] polyhedron translate rotate transform Message-ID: <1415040666725-5729337.post@n5.nabble.com> Good day, Is there a way to rotate a polyhedron around more than one axis around its centre and then to translate it? Any advice would be greatly appreciated. Best regards, George Below a simple python script for generating a cube polyhedron: =========== import vtk # Create polyhedron (cube) pointIds = vtk.vtkIdList() pointIds.SetNumberOfIds(8) for i in range(8): pointIds.InsertNextId(i) points = vtk.vtkPoints() points.InsertNextPoint(-1.0,-1.0,-1.0) points.InsertNextPoint( 1.0,-1.0,-1.0) points.InsertNextPoint( 1.0, 1.0,-1.0) points.InsertNextPoint(-1.0, 1.0,-1.0) points.InsertNextPoint(-1.0,-1.0, 1.0) points.InsertNextPoint( 1.0,-1.0, 1.0) points.InsertNextPoint( 1.0, 1.0, 1.0) points.InsertNextPoint(-1.0, 1.0, 1.0) # List of pointIds that make up the face faceList = [[0, 3, 2, 1],[0, 4, 7, 3],[4, 5, 6, 7],[5, 1, 2, 6],[0, 1, 5, 4],[2, 3, 7, 6]] faceId = vtk.vtkIdList() faceId.InsertNextId(6) # Number faces that make up the cell. for face in faceList: # Loop over all the faces faceId.InsertNextId(len(face)) # Number of points in face [faceId.InsertNextId(i) for i in face] # Insert the pointIds for the face ugrid = vtk.vtkUnstructuredGrid() ugrid.SetPoints(points) ugrid.InsertNextCell(vtk.VTK_POLYHEDRON, faceId) writer = vtk.vtkXMLUnstructuredGridWriter() writer.SetInputData(ugrid) writer.SetFileName("polyhedron.vtu") writer.SetDataModeToAscii() writer.Update() -- View this message in context: http://vtk.1045678.n5.nabble.com/polyhedron-translate-rotate-transform-tp5729337.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Mon Nov 3 15:21:48 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 3 Nov 2014 15:21:48 -0500 Subject: [vtkusers] vtk with python In-Reply-To: <77D60934A6BDE84B81E99B02B43334AC173EF2F4@DLREXMBX01.intra.dlr.de> References: <77D60934A6BDE84B81E99B02B43334AC173EF2F4@DLREXMBX01.intra.dlr.de> Message-ID: bad news: The vtkpython packages are intended to be a standalone executable for trying vtk from (for instance in learning vtk type courses that Kitware offers) so I have not tried to do what you are aiming for. We hope to tie up the loose ends and make a real python installer soon but are not there yet. When we do "pip install vtk" should do the trick. Until then, the recommended way to get vtkpython is to build vtk from source and install it (unless you are fortunate enough to be using a Linux or other distribution system that already has a python vtk package). That being said: Add c:\Program Files\VTK 6.1.0\bin to your PATH so that the libraries can be found, and c:\Program Files\VTK 6.1.0\bin\Lib\site-packages to your PYTHONPATH, and you should be up and running. hth David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Oct 27, 2014 at 5:49 AM, wrote: > Hi, > > > > I downloaded > > vtkpython-6.1.0-Windows-64bit.exe > > > and want to use it with Python 2.7 > > Where do I have to install VTK (or store ) ? > > In the Python-folder in Lib/site-packages ? Or in an extra folder? > > What else do I have to do before I can import vtk from a python script? > > > > Thanks in advance! > > Susanne Schulz > > > > ?????????????????????????? > > *Deutsches Zentrum f?r Luft- und Raumfahrt* e.V. (DLR) > > Institut f?r Flugsystemtechnik | Unbemannte Luftfahrzeuge | > Lilienthalplatz 7 | 38108 Braunschweig > > > > *Susanne Schulz* > > Telefon 0531 295-2683 | susanne.schulz at dlr.de > > DLR.de > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Mon Nov 3 22:53:13 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Tue, 4 Nov 2014 03:53:13 +0000 Subject: [vtkusers] ProgrammableGlyphFilter example Message-ID: There seems to be something funny about this example: http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ProgrammableGlyphFilter I believe it should render a cone, a cube, and a sphere, but when I build and run it with VTK-5.10.1, I see only the cone. Strangely, the console output is: Calling CalcGlyph for point 0 Point coords are: 0 0 0 Calling CalcGlyph for point 1 Point coords are: 5 0 0 Calling CalcGlyph for point 2 Point coords are: 10 0 0 which makes it look as if it is creating the cube (point 1) and sphere (point 2). The comment in this code in main(): glyphFilter->SetGlyphMethod(CalcGlyph, glyphFilter); //need a default glyph, but this should not be used vtkSmartPointer coneSource = vtkSmartPointer::New(); #if VTK_MAJOR_VERSION <= 5 glyphFilter->SetSource(coneSource->GetOutput()); #else glyphFilter->SetSourceConnection(coneSource->GetOutputPort()); #endif suggests that although coneSource is initially set as the source for glyphFilter, it is expected that this will be overridden by the code in CalcGlyph(), but in fact this is not happening. What is missing? -------------- next part -------------- An HTML attachment was scrubbed... URL: From weifeng0715 at gmail.com Tue Nov 4 00:30:44 2014 From: weifeng0715 at gmail.com (weifeng0715) Date: Mon, 3 Nov 2014 21:30:44 -0800 (PST) Subject: [vtkusers] remove vtkActor,can not free the memery In-Reply-To: References: Message-ID: <1415079044421-5729340.post@n5.nabble.com> Great idea. It works for me!!@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -- View this message in context: http://vtk.1045678.n5.nabble.com/Re-remove-vtkActor-can-not-free-the-memery-tp5024538p5729340.html Sent from the VTK - Users mailing list archive at Nabble.com. From josp.jorge at gmail.com Tue Nov 4 04:13:13 2014 From: josp.jorge at gmail.com (Jorge Perez) Date: Tue, 4 Nov 2014 10:13:13 +0100 Subject: [vtkusers] how to compute the length of spline? In-Reply-To: <1414814738225-5729305.post@n5.nabble.com> References: <1414814738225-5729305.post@n5.nabble.com> Message-ID: Hello, you can use a vtkParametricFunctionSource to sample the parametric spline and then add the length of the linear segments. You can see how it can be done by inspecting the method vtkSplineWidget::GetSummedLength at source code vtkSplineWidget.cxx double vtkSplineWidget::GetSummedLength() { vtkPoints* points = this->ParametricFunctionSource->GetOutput()->GetPoints(); int npts = points->GetNumberOfPoints(); if ( npts < 2 ) { return 0.0; } double a[3]; double b[3]; double sum = 0.0; int i = 0; points->GetPoint(i, a); int imax = (npts%2 == 0) ? npts-2 : npts-1; while ( i < imax ) { points->GetPoint(i+1, b); sum += sqrt(vtkMath::Distance2BetweenPoints(a, b)); i = i + 2; points->GetPoint(i, a); sum = sum + sqrt(vtkMath::Distance2BetweenPoints(a, b)); } if ( npts%2 == 0 ) { points->GetPoint(i+1, b); sum += sqrt(vtkMath::Distance2BetweenPoints(a, b)); } return sum; } 2014-11-01 5:05 GMT+01:00 just_rookie <925345468 at qq.com>: > Hi all, > > I have used the vtkParametricSpline class to get a spline, and my next step > is to compute the length of the spline, any help? Thank you in advance! > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/how-to-compute-the-length-of-spline-tp5729305.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 > > 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 Tue Nov 4 04:20:00 2014 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 04 Nov 2014 10:20:00 +0100 Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: <1415039426222-5729336.post@n5.nabble.com> References: <1415039426222-5729336.post@n5.nabble.com> Message-ID: <54589A40.2080707@kitware.com> Hi Matheus, I just tried your code with the latest VTK and it runs without any issues. Maybe you are reaching the maximum memory of your app? Julien On 03/11/2014 19:30, matheus_viana wrote: > Hi guys. > > I have an image processing algorithm that I am suppose to apply over many > 16bit TIFF images. I wrote a simple routine that basically opens the image > apply the algorithm and saves the result. However, I noticed that around the > image number 250 the algorithm always crashes. Tracking back the problem I > found a bug in the class vtkTIFFReader. This is a simple code that can be > used to reproduce the error. > > Please download the sample.tif image at > > https://www.dropbox.com/s/pw15mo9ievnzx1o/sample.tif?dl=0 > > I would appreciate any help. > > Thanks a lot. > > #include > #include > > int main() { > for (int i = 0; i < 400; i++) { > vtkSmartPointer TIFFReader = > vtkSmartPointer::New(); > TIFFReader -> SetFileName("sample.tif"); > TIFFReader -> Update(); > printf("%d\n",i); > } > return 0; > } > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From vianamp at gmail.com Tue Nov 4 04:33:52 2014 From: vianamp at gmail.com (matheus_viana) Date: Tue, 4 Nov 2014 01:33:52 -0800 (PST) Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: <54589A40.2080707@kitware.com> References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> Message-ID: <1415093632409-5729343.post@n5.nabble.com> Hi Julien. I have VTK 6.1 and I am running Mac OS. I thought this code was free of memory related issues since I am using smart pointer. Anyway, is there any way to find if the maximum memory limit is the problem? Many thanks for your help. -m -- View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729343.html Sent from the VTK - Users mailing list archive at Nabble.com. From julien.jomier at kitware.com Tue Nov 4 04:45:59 2014 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 04 Nov 2014 10:45:59 +0100 Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: <1415093632409-5729343.post@n5.nabble.com> References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> <1415093632409-5729343.post@n5.nabble.com> Message-ID: <5458A057.9040205@kitware.com> Yes it should unless there is a memory leak somewhere. What error do you get when it fails? Julien On 04/11/2014 10:33, matheus_viana wrote: > Hi Julien. > > I have VTK 6.1 and I am running Mac OS. I thought this code was free of > memory related issues since I am using smart pointer. Anyway, is there any > way to find if the maximum memory limit is the problem? > > Many thanks for your help. > > -m > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729343.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From vianamp at gmail.com Tue Nov 4 04:57:22 2014 From: vianamp at gmail.com (matheus_viana) Date: Tue, 4 Nov 2014 01:57:22 -0800 (PST) Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: <5458A057.9040205@kitware.com> References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> <1415093632409-5729343.post@n5.nabble.com> <5458A057.9040205@kitware.com> Message-ID: <1415095042634-5729345.post@n5.nabble.com> Julien, this is the error: ERROR: In /Users/Viana/Desktop/VTK-master/IO/Image/vtkTIFFReader.cxx, line 392 vtkTIFFReader (0x7f9616301c00): Unable to open file sample.tif ERROR: In /Users/Viana/Desktop/VTK-master/Common/ExecutionModel/vtkExecutive.cxx, line 754 vtkCompositeDataPipeline (0x7f96163067e0): Algorithm vtkTIFFReader(0x7f9616301c00) returned failure for request: vtkInformation (0x7f9616308670) Debug: Off Modified Time: 44614 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION ALGORITHM_AFTER_FORWARD: 1 FORWARD_DIRECTION: 0 -- View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729345.html Sent from the VTK - Users mailing list archive at Nabble.com. From DLRdave at aol.com Tue Nov 4 07:34:22 2014 From: DLRdave at aol.com (David Cole) Date: Tue, 4 Nov 2014 07:34:22 -0500 Subject: [vtkusers] ProgrammableGlyphFilter example In-Reply-To: References: Message-ID: The VTK Wiki Examples dashboard reflects this... showing exactly the result you describe: http://open.cdash.org/testDetails.php?test=291794635&build=3556356 I would suspect it's a bug in VTK 5.10 which has since been fixed. (I don't know this for a fact, but it seems to work as expected with VTK 6 and later, but not with 5.10...) D On Mon, Nov 3, 2014 at 10:53 PM, Gib Bogle wrote: > There seems to be something funny about this example: > http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ProgrammableGlyphFilter > I believe it should render a cone, a cube, and a sphere, but when I build > and run it with VTK-5.10.1, I see only the cone. Strangely, the console > output is: > > Calling CalcGlyph for point 0 > Point coords are: 0 0 0 > Calling CalcGlyph for point 1 > Point coords are: 5 0 0 > Calling CalcGlyph for point 2 > Point coords are: 10 0 0 > > which makes it look as if it is creating the cube (point 1) and sphere > (point 2). > > The comment in this code in main(): > > glyphFilter->SetGlyphMethod(CalcGlyph, glyphFilter); > //need a default glyph, but this should not be used > vtkSmartPointer coneSource = > vtkSmartPointer::New(); > #if VTK_MAJOR_VERSION <= 5 > glyphFilter->SetSource(coneSource->GetOutput()); > #else > glyphFilter->SetSourceConnection(coneSource->GetOutputPort()); > #endif > > suggests that although coneSource is initially set as the source for > glyphFilter, it is expected that this will be overridden by the code in > CalcGlyph(), but in fact this is not happening. What is missing? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Nov 4 08:33:36 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 4 Nov 2014 08:33:36 -0500 Subject: [vtkusers] ProgrammableGlyphFilter example In-Reply-To: References: Message-ID: Looks like I fixed the bug here: http://review.source.kitware.com/#/c/6610/ Probably after 5.10 On Tue, Nov 4, 2014 at 7:34 AM, David Cole via vtkusers wrote: > The VTK Wiki Examples dashboard reflects this... showing exactly the result > you describe: > http://open.cdash.org/testDetails.php?test=291794635&build=3556356 > > I would suspect it's a bug in VTK 5.10 which has since been fixed. (I don't > know this for a fact, but it seems to work as expected with VTK 6 and later, > but not with 5.10...) > > > D > > > On Mon, Nov 3, 2014 at 10:53 PM, Gib Bogle wrote: >> >> There seems to be something funny about this example: >> http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ProgrammableGlyphFilter >> I believe it should render a cone, a cube, and a sphere, but when I build >> and run it with VTK-5.10.1, I see only the cone. Strangely, the console >> output is: >> >> Calling CalcGlyph for point 0 >> Point coords are: 0 0 0 >> Calling CalcGlyph for point 1 >> Point coords are: 5 0 0 >> Calling CalcGlyph for point 2 >> Point coords are: 10 0 0 >> >> which makes it look as if it is creating the cube (point 1) and sphere >> (point 2). >> >> The comment in this code in main(): >> >> glyphFilter->SetGlyphMethod(CalcGlyph, glyphFilter); >> //need a default glyph, but this should not be used >> vtkSmartPointer coneSource = >> vtkSmartPointer::New(); >> #if VTK_MAJOR_VERSION <= 5 >> glyphFilter->SetSource(coneSource->GetOutput()); >> #else >> glyphFilter->SetSourceConnection(coneSource->GetOutputPort()); >> #endif >> >> suggests that although coneSource is initially set as the source for >> glyphFilter, it is expected that this will be overridden by the code in >> CalcGlyph(), but in fact this is not happening. What is missing? >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From dave.demarle at kitware.com Tue Nov 4 08:34:27 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 4 Nov 2014 08:34:27 -0500 Subject: [vtkusers] Say hello to Kitware at IEEE SC 2014 Message-ID: Greetings lists, We hope to see many of you at this year's Supercomputing conference two weeks from now in New Orleans. If you are at the conference, please take some time to stop by our booth say hello and tell us about your successes and chalenges with VTK, ParaView and the rest. If you are in the market for a career at Kitware don't forget to bring your resume along. Besides the booth, Kitware will be involved in SC14 in the following presentations, tutorials, videos, and invited talks that we invite you to participate in. - ?Large Scale Visualization with ParaView? ? Who: Kenneth Moreland (Sandia National Laboratories), W. Alan Scott (Sandia National Laboratories), David E. DeMarle (Kitware), Joseph Insley (Argonne National Laboratory), Ollie Lo (Los Alamos National Laboratory), Robert Maynard (Kitware), and Sebastien Jourdain (Kitware) ? What: Tutorial ? When: November 16, 2014, from 8:30 am to 5:00 pm ? Where: Room 389 - ?In Situ MPAS-Ocean Image-based Visualization *?* ? Who: James Aherns (Los Alamos National Laboratory), Sebastien Jourdain (Kitware), Patrick O'Leary (Kitware), John Patchett (Los Alamos National Laboratory), David Rogers (Los Alamos National Laboratory), Patricia Fasel (Los Alamos National Laboratory), Andrew Bauer (Kitware), Mark Petersen (Los Alamos National Laboratory), Francesca Samsel (University of Texas at Austin), and Benjamin Boeckel (Kitware) ? What: Visualization and Data Analytics Showcase ? When: November 16, 2014, from 10:30 am to 12:00 pm ? Where: Rooms 386-87 - ?Sustainable Software Ecosystems: Software Engineers, Domain Scientists, and Engineers Collaborating for Science *?* *? *Who: Marcus Hanwell *(Kitware), Patrick O'Leary (Kitware), and *Bob O'Bara *(Kitware)* ? *What:* 2nd Workshop on Sustainable Software for Science: Practice and Experiences (WSSSPE2) ? When: November 16, 2014 ? Where: Rooms 275-77 - ?In Situ Data Analysis and Visualization with ParaView Catalyst? ? Who: David H. Rogers (LANL), Nathan Fabian (Sandia National Laboratory), Thierry Carrard (French Alternative Energies and Atomic Energy Commission), and Andrew Bauer (Kitware) ? What: Tutorial ? When: November 17, 2014, from 8:30 am to 12:00 pm ? Where: Room 394 - ?An Image-Based Approach to Extreme Scale In Situ Visualization and Analysis ? ? Who: *James Ahrens (Los Alamos National Laboratory), Sebastien Jourdain (Kitware), Patrick O?Leary (Kitware), John Patchett (Los Alamos National Laboratory), David H. Rogers (Los Alamos National Laboratory), and Mark Petersen (Los Alamos National Laboratory)* ? What: Big Data Analysis Session ? When: November 19, 2014, from 11:30 am to 12:00 pm ? Where: Rooms 391-92 - "VTK-M: Uniting GPU Acceleration Successes" ? Who: Robert Maynard (Kitware) ? What: Invited talk ? When: November 19, 2014, from 3:00 pm to 3:30 pm ? Where: NVIDIA booth - "Next Generation Computing and Rendering Infrastructure in VTK and ParaView" ? Who: Utkarsh Ayachit (Kitware) ? What: Intel Theater Presentation ? When: TBA - Kitware will also host presentations from collaborators at its booth throughout the conference. Featured presenters include Alejandro Ribes (*?lectricit? de France*), Sean Ziegler (Engility Corporation), Eric Whiting (Idaho National Laboratory), Kenneth Moreland (Sandia National Laboratories), John Biddiscombe (CSCS Swiss National Supercomputing Centre), Paul Navratil (Texas Advanced Computing Center), Joe Insley (Argonne National Laboratory), Jim Jeffers (Intel), and Alan Scott (Sandia National Laboratories). Details on the presentation schedule will follow. For additional information and presentation abstracts, please visit our event listing . 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 bill.lorensen at gmail.com Tue Nov 4 08:42:01 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 4 Nov 2014 08:42:01 -0500 Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: <1415095042634-5729345.post@n5.nabble.com> References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> <1415093632409-5729343.post@n5.nabble.com> <5458A057.9040205@kitware.com> <1415095042634-5729345.post@n5.nabble.com> Message-ID: I get the same error. Something must be leaking. Perhaps a file descriptor is not being freed. On Tue, Nov 4, 2014 at 4:57 AM, matheus_viana wrote: > Julien, this is the error: > > ERROR: In /Users/Viana/Desktop/VTK-master/IO/Image/vtkTIFFReader.cxx, line > 392 > vtkTIFFReader (0x7f9616301c00): Unable to open file sample.tif > > ERROR: In > /Users/Viana/Desktop/VTK-master/Common/ExecutionModel/vtkExecutive.cxx, line > 754 > vtkCompositeDataPipeline (0x7f96163067e0): Algorithm > vtkTIFFReader(0x7f9616301c00) returned failure for request: vtkInformation > (0x7f9616308670) > Debug: Off > Modified Time: 44614 > Reference Count: 1 > Registered Events: (none) > Request: REQUEST_INFORMATION > ALGORITHM_AFTER_FORWARD: 1 > FORWARD_DIRECTION: 0 > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729345.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Tue Nov 4 08:56:35 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 4 Nov 2014 08:56:35 -0500 Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> <1415093632409-5729343.post@n5.nabble.com> <5458A057.9040205@kitware.com> <1415095042634-5729345.post@n5.nabble.com> Message-ID: I tried a different tiff file and the program runs fine. I also put prints in before TIFFOpen and TIFFClose in the reader. For sample.tiff, TIFFClose is never called. But for the other tif file, there is a TIFFClose for each TIFFOpen. Further investigation is needed. On Tue, Nov 4, 2014 at 8:42 AM, Bill Lorensen wrote: > I get the same error. Something must be leaking. Perhaps a file > descriptor is not being freed. > > > On Tue, Nov 4, 2014 at 4:57 AM, matheus_viana wrote: >> Julien, this is the error: >> >> ERROR: In /Users/Viana/Desktop/VTK-master/IO/Image/vtkTIFFReader.cxx, line >> 392 >> vtkTIFFReader (0x7f9616301c00): Unable to open file sample.tif >> >> ERROR: In >> /Users/Viana/Desktop/VTK-master/Common/ExecutionModel/vtkExecutive.cxx, line >> 754 >> vtkCompositeDataPipeline (0x7f96163067e0): Algorithm >> vtkTIFFReader(0x7f9616301c00) returned failure for request: vtkInformation >> (0x7f9616308670) >> Debug: Off >> Modified Time: 44614 >> Reference Count: 1 >> Registered Events: (none) >> Request: REQUEST_INFORMATION >> ALGORITHM_AFTER_FORWARD: 1 >> FORWARD_DIRECTION: 0 >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729345.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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From marco.salatin at gmail.com Tue Nov 4 09:31:23 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Tue, 4 Nov 2014 06:31:23 -0800 (PST) Subject: [vtkusers] VTK .pro file qtcreator Message-ID: <1415111483684-5729356.post@n5.nabble.com> Where i can find a .pro file for QtCreator to include vtk? Tnk -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-pro-file-qtcreator-tp5729356.html Sent from the VTK - Users mailing list archive at Nabble.com. From tanakas at gmx.ch Tue Nov 4 11:12:14 2014 From: tanakas at gmx.ch (Tanaka Simon) Date: Tue, 04 Nov 2014 17:12:14 +0100 Subject: [vtkusers] vtkStringArray with heterogeneous number of components? Message-ID: <5458FADE.9050201@gmx.ch> Dear VTK users, I want to have a vtkStringArray, but the number of components shall NOT be the same for all points. Example (a sample code is attached): -> for point 1, the string attribute should be "one" -> for point2, the string attributes should be "one" and "two" -> etc. That is like std::vector< std::vector<...> > where the inner vectors may have different length. What would be the approach: -> heterogeneous number of components? -> heterogeneous number of tuples? -> not vtkStringArray, but some other vtkXXXArray containing another container with variable length? Thanks for any suggestions Simon -------------- next part -------------- cmake_minimum_required(VERSION 2.8) PROJECT(vtk_heterogeneous_array) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(vtk_heterogeneous_array MACOSX_BUNDLE vtk_heterogeneous_array) if(VTK_LIBRARIES) target_link_libraries(vtk_heterogeneous_array ${VTK_LIBRARIES}) else() target_link_libraries(vtk_heterogeneous_array vtkHybrid vtkWidgets) endif() -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_heterogeneous_array.cxx Type: text/x-c++src Size: 1253 bytes Desc: not available URL: From vianamp at gmail.com Tue Nov 4 11:13:32 2014 From: vianamp at gmail.com (matheus_viana) Date: Tue, 4 Nov 2014 08:13:32 -0800 (PST) Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> <1415093632409-5729343.post@n5.nabble.com> <5458A057.9040205@kitware.com> <1415095042634-5729345.post@n5.nabble.com> Message-ID: <1415117612706-5729359.post@n5.nabble.com> Hi Bill. The file sample.tif was generated in ImageJ and I also get the error for 8bit files. Is your other tiff file a multipage tiff? Or a single image file? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729359.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Tue Nov 4 11:24:13 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 4 Nov 2014 11:24:13 -0500 Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> <1415093632409-5729343.post@n5.nabble.com> <5458A057.9040205@kitware.com> <1415095042634-5729345.post@n5.nabble.com> Message-ID: The sample.tif file is generating an error regarding an unknown tag. The error is ignored silently. Further investigation is needed. On Tue, Nov 4, 2014 at 8:56 AM, Bill Lorensen wrote: > I tried a different tiff file and the program runs fine. > > I also put prints in before TIFFOpen and TIFFClose in the reader. For > sample.tiff, TIFFClose is never called. But for the other tif file, > there is a TIFFClose for each TIFFOpen. > > Further investigation is needed. > > > On Tue, Nov 4, 2014 at 8:42 AM, Bill Lorensen wrote: >> I get the same error. Something must be leaking. Perhaps a file >> descriptor is not being freed. >> >> >> On Tue, Nov 4, 2014 at 4:57 AM, matheus_viana wrote: >>> Julien, this is the error: >>> >>> ERROR: In /Users/Viana/Desktop/VTK-master/IO/Image/vtkTIFFReader.cxx, line >>> 392 >>> vtkTIFFReader (0x7f9616301c00): Unable to open file sample.tif >>> >>> ERROR: In >>> /Users/Viana/Desktop/VTK-master/Common/ExecutionModel/vtkExecutive.cxx, line >>> 754 >>> vtkCompositeDataPipeline (0x7f96163067e0): Algorithm >>> vtkTIFFReader(0x7f9616301c00) returned failure for request: vtkInformation >>> (0x7f9616308670) >>> Debug: Off >>> Modified Time: 44614 >>> Reference Count: 1 >>> Registered Events: (none) >>> Request: REQUEST_INFORMATION >>> ALGORITHM_AFTER_FORWARD: 1 >>> FORWARD_DIRECTION: 0 >>> >>> >>> >>> -- >>> View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729345.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 >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From david.gobbi at gmail.com Tue Nov 4 11:39:21 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 4 Nov 2014 09:39:21 -0700 Subject: [vtkusers] vtkStringArray with heterogeneous number of components? In-Reply-To: <5458FADE.9050201@gmx.ch> References: <5458FADE.9050201@gmx.ch> Message-ID: Hi Simon, You can do this with a vtkVariantArray, because a vtkVariantArray is an array of "anything" so it allows you to store a vtkStringArray for each of your points. It wouldn't be very efficient, however. My recommendation would be to just use a vtkStringArray and then use some kind of string delimiter like ";" or ",", for example if the string is "one;two" you would write your own code to interpret that as multiple values. - David On Tue, Nov 4, 2014 at 9:12 AM, Tanaka Simon wrote: > Dear VTK users, > > I want to have a vtkStringArray, but the number of components shall NOT be > the same for all points. > > Example (a sample code is attached): > -> for point 1, the string attribute should be "one" > -> for point2, the string attributes should be "one" and "two" > -> etc. > > That is like std::vector< std::vector<...> > where the inner vectors may > have different length. > > > What would be the approach: > -> heterogeneous number of components? > -> heterogeneous number of tuples? > -> not vtkStringArray, but some other vtkXXXArray containing another > container with variable length? > > > Thanks for any suggestions > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Nov 4 11:48:50 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 4 Nov 2014 11:48:50 -0500 Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> <1415093632409-5729343.post@n5.nabble.com> <5458A057.9040205@kitware.com> <1415095042634-5729345.post@n5.nabble.com> Message-ID: Try adding: if (this->InternalImage) { this->InternalImage->Clean(); } in vtkTIFFReader::~vtkTIFFReader() On Tue, Nov 4, 2014 at 11:24 AM, Bill Lorensen wrote: > The sample.tif file is generating an error regarding an unknown tag. > The error is ignored silently. Further investigation is needed. > > > On Tue, Nov 4, 2014 at 8:56 AM, Bill Lorensen wrote: >> I tried a different tiff file and the program runs fine. >> >> I also put prints in before TIFFOpen and TIFFClose in the reader. For >> sample.tiff, TIFFClose is never called. But for the other tif file, >> there is a TIFFClose for each TIFFOpen. >> >> Further investigation is needed. >> >> >> On Tue, Nov 4, 2014 at 8:42 AM, Bill Lorensen wrote: >>> I get the same error. Something must be leaking. Perhaps a file >>> descriptor is not being freed. >>> >>> >>> On Tue, Nov 4, 2014 at 4:57 AM, matheus_viana wrote: >>>> Julien, this is the error: >>>> >>>> ERROR: In /Users/Viana/Desktop/VTK-master/IO/Image/vtkTIFFReader.cxx, line >>>> 392 >>>> vtkTIFFReader (0x7f9616301c00): Unable to open file sample.tif >>>> >>>> ERROR: In >>>> /Users/Viana/Desktop/VTK-master/Common/ExecutionModel/vtkExecutive.cxx, line >>>> 754 >>>> vtkCompositeDataPipeline (0x7f96163067e0): Algorithm >>>> vtkTIFFReader(0x7f9616301c00) returned failure for request: vtkInformation >>>> (0x7f9616308670) >>>> Debug: Off >>>> Modified Time: 44614 >>>> Reference Count: 1 >>>> Registered Events: (none) >>>> Request: REQUEST_INFORMATION >>>> ALGORITHM_AFTER_FORWARD: 1 >>>> FORWARD_DIRECTION: 0 >>>> >>>> >>>> >>>> -- >>>> View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729345.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 >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From francois.touvet at inria.fr Tue Nov 4 12:27:10 2014 From: francois.touvet at inria.fr (ftouvet) Date: Tue, 4 Nov 2014 09:27:10 -0800 (PST) Subject: [vtkusers] How to use vtkBooleanOperationPolyDataFilter correctly In-Reply-To: <1413442865146-5729161.post@n5.nabble.com> References: <1411464425998-5728839.post@n5.nabble.com> <1412774592086-5729039.post@n5.nabble.com> <1413442865146-5729161.post@n5.nabble.com> Message-ID: <1415122030607-5729363.post@n5.nabble.com> Hello Santosh and Cory, First of all, thanks for sharing your work about this filter, it is highly appreciated! I am facing a problem and as it seems quite close to Santosh's, I hope you can provide me good advices as I don't understand what is going on. The idea is to test a cylinder against a given shape, and extract the resulting intersection. It works most of the time excepted for one shape; even when the cylinder and the shape are not in contact the filter gives me a part of the cylinder as result. The image is from paraview, it shows the cylinder in grey, the shape in yellow, and the result in red-to-blue (btw I don't understand the use of colormap here either). The two inputs are polydatas; as a prerequisite I filter it through vtkCleanPolyData + vtkTriangleFilter + vtkPolyDataNormals, and make sure the normals are pointing outwards. Thanks Francois -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkBooleanOperationPolyDataFilter-correctly-tp5728839p5729363.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Tue Nov 4 12:27:46 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 4 Nov 2014 12:27:46 -0500 Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> <1415093632409-5729343.post@n5.nabble.com> <5458A057.9040205@kitware.com> <1415095042634-5729345.post@n5.nabble.com> Message-ID: I found the problem. If the file is a volume, the reader was not closing the file after processing. I submit a gerrit patch. On Tue, Nov 4, 2014 at 11:48 AM, Bill Lorensen wrote: > Try adding: > if (this->InternalImage) > { > this->InternalImage->Clean(); > } > in > vtkTIFFReader::~vtkTIFFReader() > > > On Tue, Nov 4, 2014 at 11:24 AM, Bill Lorensen wrote: >> The sample.tif file is generating an error regarding an unknown tag. >> The error is ignored silently. Further investigation is needed. >> >> >> On Tue, Nov 4, 2014 at 8:56 AM, Bill Lorensen wrote: >>> I tried a different tiff file and the program runs fine. >>> >>> I also put prints in before TIFFOpen and TIFFClose in the reader. For >>> sample.tiff, TIFFClose is never called. But for the other tif file, >>> there is a TIFFClose for each TIFFOpen. >>> >>> Further investigation is needed. >>> >>> >>> On Tue, Nov 4, 2014 at 8:42 AM, Bill Lorensen wrote: >>>> I get the same error. Something must be leaking. Perhaps a file >>>> descriptor is not being freed. >>>> >>>> >>>> On Tue, Nov 4, 2014 at 4:57 AM, matheus_viana wrote: >>>>> Julien, this is the error: >>>>> >>>>> ERROR: In /Users/Viana/Desktop/VTK-master/IO/Image/vtkTIFFReader.cxx, line >>>>> 392 >>>>> vtkTIFFReader (0x7f9616301c00): Unable to open file sample.tif >>>>> >>>>> ERROR: In >>>>> /Users/Viana/Desktop/VTK-master/Common/ExecutionModel/vtkExecutive.cxx, line >>>>> 754 >>>>> vtkCompositeDataPipeline (0x7f96163067e0): Algorithm >>>>> vtkTIFFReader(0x7f9616301c00) returned failure for request: vtkInformation >>>>> (0x7f9616308670) >>>>> Debug: Off >>>>> Modified Time: 44614 >>>>> Reference Count: 1 >>>>> Registered Events: (none) >>>>> Request: REQUEST_INFORMATION >>>>> ALGORITHM_AFTER_FORWARD: 1 >>>>> FORWARD_DIRECTION: 0 >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729345.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 >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From david.thompson at kitware.com Tue Nov 4 12:32:53 2014 From: david.thompson at kitware.com (David Thompson) Date: Tue, 4 Nov 2014 12:32:53 -0500 Subject: [vtkusers] vtkStringArray with heterogeneous number of components? In-Reply-To: References: <5458FADE.9050201@gmx.ch> Message-ID: <49CEF7C2-2C60-4749-AADE-15C20DDF3E63@kitware.com> Hi Simon, You might use a pair of arrays: a StringArray (with NumberOfComponents=1) and an IntArray that stores offsets to the start of each tuple. This is efficient as long as you will not be changing the length of entries or adding/removing entries. David > You can do this with a vtkVariantArray, because a vtkVariantArray is > an array of "anything" so it allows you to store a vtkStringArray for > each of your points. It wouldn't be very efficient, however. > > My recommendation would be to just use a vtkStringArray and then > use some kind of string delimiter like ";" or ",", for example if the string > is "one;two" you would write your own code to interpret that as multiple > values. > > - David > > > On Tue, Nov 4, 2014 at 9:12 AM, Tanaka Simon wrote: > Dear VTK users, > > I want to have a vtkStringArray, but the number of components shall NOT be the same for all points. > > Example (a sample code is attached): > -> for point 1, the string attribute should be "one" > -> for point2, the string attributes should be "one" and "two" > -> etc. > > That is like std::vector< std::vector<...> > where the inner vectors may have different length. > > > What would be the approach: > -> heterogeneous number of components? > -> heterogeneous number of tuples? > -> not vtkStringArray, but some other vtkXXXArray containing another container with variable length? > > > Thanks for any suggestions > Simon > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://public.kitware.com/mailman/listinfo/vtkusers From vianamp at gmail.com Tue Nov 4 12:37:40 2014 From: vianamp at gmail.com (matheus_viana) Date: Tue, 4 Nov 2014 09:37:40 -0800 (PST) Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> <1415093632409-5729343.post@n5.nabble.com> <5458A057.9040205@kitware.com> <1415095042634-5729345.post@n5.nabble.com> Message-ID: <1415122660022-5729366.post@n5.nabble.com> Well done Bill. Thanks a lot. Is the patch already available? -- View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729366.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Tue Nov 4 12:48:43 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 4 Nov 2014 12:48:43 -0500 Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: <1415122660022-5729366.post@n5.nabble.com> References: <1415039426222-5729336.post@n5.nabble.com> <54589A40.2080707@kitware.com> <1415093632409-5729343.post@n5.nabble.com> <5458A057.9040205@kitware.com> <1415095042634-5729345.post@n5.nabble.com> <1415122660022-5729366.post@n5.nabble.com> Message-ID: Here is the patch. I think it wold also fail for tiled images. I also added a more descriptive error message when a file fail to open. For your file it would have reported: "too many open file descriptors". http://review.source.kitware.com/#/c/17871/ I need ago add some tests before I merge it. On Tue, Nov 4, 2014 at 12:37 PM, matheus_viana wrote: > Well done Bill. Thanks a lot. > > Is the patch already available? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729366.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From vianamp at gmail.com Tue Nov 4 13:06:48 2014 From: vianamp at gmail.com (matheus_viana) Date: Tue, 4 Nov 2014 10:06:48 -0800 (PST) Subject: [vtkusers] Bug found in vtkTIFFReader In-Reply-To: References: <1415093632409-5729343.post@n5.nabble.com> <5458A057.9040205@kitware.com> <1415095042634-5729345.post@n5.nabble.com> <1415122660022-5729366.post@n5.nabble.com> Message-ID: <1415124408544-5729368.post@n5.nabble.com> Thanks Bill. It's working fine now! -m -- View this message in context: http://vtk.1045678.n5.nabble.com/Bug-found-in-vtkTIFFReader-tp5729336p5729368.html Sent from the VTK - Users mailing list archive at Nabble.com. From tanakas at gmx.ch Tue Nov 4 16:03:04 2014 From: tanakas at gmx.ch (Tanaka Simon) Date: Tue, 04 Nov 2014 22:03:04 +0100 Subject: [vtkusers] vtkStringArray with heterogeneous number of components? In-Reply-To: References: <5458FADE.9050201@gmx.ch> Message-ID: <54593F08.9000806@gmx.ch> Hi David, +1 for the vtkVariantArray which is good to know. As you suggested, i implemented a "\t" tab delimiter approach which works fine. however, it kind of kills the idea of using a standard to represent data... thanks for your help simon On 04.11.2014 17:39, David Gobbi wrote: > Hi Simon, > > You can do this with a vtkVariantArray, because a vtkVariantArray is > an array of "anything" so it allows you to store a vtkStringArray for > each of your points. It wouldn't be very efficient, however. > > My recommendation would be to just use a vtkStringArray and then > use some kind of string delimiter like ";" or ",", for example if the > string > is "one;two" you would write your own code to interpret that as multiple > values. > > - David > > > On Tue, Nov 4, 2014 at 9:12 AM, Tanaka Simon > wrote: > > Dear VTK users, > > I want to have a vtkStringArray, but the number of components > shall NOT be the same for all points. > > Example (a sample code is attached): > -> for point 1, the string attribute should be "one" > -> for point2, the string attributes should be "one" and "two" > -> etc. > > That is like std::vector< std::vector<...> > where the inner > vectors may have different length. > > > What would be the approach: > -> heterogeneous number of components? > -> heterogeneous number of tuples? > -> not vtkStringArray, but some other vtkXXXArray containing > another container with variable length? > > > Thanks for any suggestions > Simon > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tanakas at gmx.ch Tue Nov 4 16:34:01 2014 From: tanakas at gmx.ch (Tanaka Simon) Date: Tue, 04 Nov 2014 22:34:01 +0100 Subject: [vtkusers] segfault when vtkXMLMultiBlockDataReader reads a .vtm binary mode - bug? In-Reply-To: <545756AF.2070800@gmx.ch> References: <545756AF.2070800@gmx.ch> Message-ID: <54594649.2000401@gmx.ch> Dear Developers, can somebody confirm the buggy behaviour? i attached a yet simplified code to reproduce the segfault. thanks simon btw: i use ubuntu 14.04 and gcc 4.7 On 03.11.2014 11:19, Tanaka Simon wrote: > Dear Developers, > > Hello VTK users and developers, > > I attached a simple program which segfaults. please also have a look > at the comments in the code. > > i want to: > 1) write a vtkMultiBlockDataSet to a file > 2) load it > > it only segfaults if the writer is set to binary mode, and only if the > data exceeds a certain size. in ascii mode, everything is fine. > > > this might be related: > http://www.paraview.org/Bug/print_bug_page.php?bug_id=13294 > > > can you confirm that behaviour? what am i doing wrong? and if it is a > bug, how can i work around? > > thank you very much > simon -------------- next part -------------- cmake_minimum_required(VERSION 2.8) PROJECT(vtk_weird_segfault) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(vtk_weird_segfault MACOSX_BUNDLE vtk_weird_segfault) if(VTK_LIBRARIES) target_link_libraries(vtk_weird_segfault ${VTK_LIBRARIES}) else() target_link_libraries(vtk_weird_segfault vtkHybrid vtkWidgets) endif() -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_weird_segfault.cxx Type: text/x-c++src Size: 2545 bytes Desc: not available URL: From david.gobbi at gmail.com Tue Nov 4 16:53:57 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 4 Nov 2014 14:53:57 -0700 Subject: [vtkusers] vtkStringArray with heterogeneous number of components? In-Reply-To: <54593F08.9000806@gmx.ch> References: <5458FADE.9050201@gmx.ch> <54593F08.9000806@gmx.ch> Message-ID: On Tue, Nov 4, 2014 at 2:03 PM, Tanaka Simon wrote: > Hi David, > > +1 for the vtkVariantArray which is good to know. > > As you suggested, i implemented a "\t" tab delimiter approach which works > fine. however, it kind of kills the idea of using a standard to represent > data... > Not really, it isn't any different from the multitude of special characters that exist in xml or any other text-based standard. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From sroys at umaryland.edu Tue Nov 4 17:00:54 2014 From: sroys at umaryland.edu (Steve Roys) Date: Tue, 4 Nov 2014 17:00:54 -0500 (EST) Subject: [vtkusers] vtkImageViewer2 and QVTKWidget Message-ID: <06db4d3164ed5d5ecacf69fe384abd0a.squirrel@webmail.umaryland.edu> I need to display 4 DICOM images in a grid.? The images should resize with the window size, and I want to window and level each image independently.? I've modified the GUI4.* example code, and I'm able to display images in QVTKWidgets using vtkImageViewers, but that doesn't provide scaling and w/l control.? I've tried to use vtkImageView2, which *I think* should provide scaling and w/l-ing, but I can't get anything to display. So, are there any examples of working code that do something like this?? I'd like to use qtcreator so I can graphically design the GUI, but that's not mandatory.? I'm on the extreme uphill side of the VTK learning curve, so be gentle... Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Tue Nov 4 17:26:51 2014 From: tossin at gmail.com (Evan Kao) Date: Tue, 4 Nov 2014 14:26:51 -0800 Subject: [vtkusers] VTK Version mismatch Message-ID: Hello vtkusers, I'd trying to make a Python script using VTK and a third-party module based on vtk. However, I've installed VTK 6.1 while the module is based on VTK 5.10. I get type errors if I try to mix and match objects and classes. Is there a way to force compatibility? Thanks, Evan Kao -------------- next part -------------- An HTML attachment was scrubbed... URL: From tanakas at gmx.ch Tue Nov 4 18:48:08 2014 From: tanakas at gmx.ch (Tanaka Simon) Date: Wed, 05 Nov 2014 00:48:08 +0100 Subject: [vtkusers] casting vtkVariant to vtkStringArray - how? Message-ID: <545965B8.7080603@gmx.ch> Dear VTK users, I have: myVtkVariantArray->InsertNextValue( vtkVariant(myVtkStringArray) ); how can i get back the myVtkStringArray? something like this does not work: myVtkStringArray_extract = myVtkVariantArray->getValue(...) please have a look at the short example (attached). thanks! simon -------------- next part -------------- cmake_minimum_required(VERSION 2.8) PROJECT(vtk_heterogeneous_array) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(vtk_heterogeneous_array MACOSX_BUNDLE vtk_heterogeneous_array) if(VTK_LIBRARIES) target_link_libraries(vtk_heterogeneous_array ${VTK_LIBRARIES}) else() target_link_libraries(vtk_heterogeneous_array vtkHybrid vtkWidgets) endif() -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_heterogeneous_array.cxx Type: text/x-c++src Size: 1574 bytes Desc: not available URL: From tanakas at gmx.ch Wed Nov 5 05:45:44 2014 From: tanakas at gmx.ch (Tanaka Simon) Date: Wed, 05 Nov 2014 11:45:44 +0100 Subject: [vtkusers] casting vtkVariant to vtkStringArray - how? In-Reply-To: <545965B8.7080603@gmx.ch> References: <545965B8.7080603@gmx.ch> Message-ID: <5459FFD8.2060001@gmx.ch> for the records: i found a way to extract the data from a vtkVariantArray: #include #include #include #include #include int main(int, char *[]) { unsigned int N = 10; vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer stringAttribute_extract = vtkSmartPointer::New(); vtkSmartPointer variantArray = vtkSmartPointer::New(); variantArray->SetNumberOfComponents(1); variantArray->SetName("my_variant_array"); // create some points: for (unsigned int k=0; kInsertNextPoint((double)k, 0.0, 0.0); } // create vtkStringArray's of different size for each point: for (unsigned int k=0; k stringAttribute = vtkSmartPointer::New(); for (unsigned int i=0; iInsertNextValue(s1.c_str()); } variantArray->InsertNextValue(vtkVariant(stringAttribute)); } // show content: for (int i=0; iGetNumberOfValues(); ++i) { stringAttribute_extract = (vtkStringArray*)variantArray->GetValue(i).ToArray(); for (int j=0; jGetNumberOfValues(); ++j) { std::cout<GetValue(j)<<" "; } std::cout<<"\n"; } return EXIT_SUCCESS; } best wishes simon On 05.11.2014 00:48, Tanaka Simon wrote: > Dear VTK users, > > I have: > > myVtkVariantArray->InsertNextValue( vtkVariant(myVtkStringArray) ); > > how can i get back the myVtkStringArray? something like this does not > work: > > myVtkStringArray_extract = myVtkVariantArray->getValue(...) > > > > please have a look at the short example (attached). > > thanks! > simon > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Nov 5 08:56:06 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 5 Nov 2014 06:56:06 -0700 Subject: [vtkusers] VTK .pro file qtcreator In-Reply-To: <1415111483684-5729356.post@n5.nabble.com> References: <1415111483684-5729356.post@n5.nabble.com> Message-ID: On Tue, Nov 4, 2014 at 7:31 AM, Marco Salatin wrote: > Where i can find a .pro file for QtCreator to include vtk? > Such a thing doesn't exist, but Creator can create a project from a CMakeLists.txt file. It isn't a perfect solution, but it allows you to edit your source files, build, and debug from Creator. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.salatin at gmail.com Wed Nov 5 08:58:17 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Wed, 5 Nov 2014 14:58:17 +0100 Subject: [vtkusers] VTK .pro file qtcreator In-Reply-To: References: <1415111483684-5729356.post@n5.nabble.com> Message-ID: Ok thanks. is there an how to do? marco 2014-11-05 14:56 GMT+01:00 David Gobbi : > On Tue, Nov 4, 2014 at 7:31 AM, Marco Salatin > wrote: > >> Where i can find a .pro file for QtCreator to include vtk? >> > > Such a thing doesn't exist, but Creator can create a project from > a CMakeLists.txt file. It isn't a perfect solution, but it allows you > to edit your source files, build, and debug from Creator. > > - David > -- --- www.salatin.eu -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Nov 5 09:02:56 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 5 Nov 2014 07:02:56 -0700 Subject: [vtkusers] VTK .pro file qtcreator In-Reply-To: References: <1415111483684-5729356.post@n5.nabble.com> Message-ID: http://qt-project.org/doc/qtcreator-2.8/creator-project-cmake.html Not specifically for VTK. On Wed, Nov 5, 2014 at 6:58 AM, Marco Salatin wrote: > Ok thanks. is there an how to do? > > marco > > 2014-11-05 14:56 GMT+01:00 David Gobbi : > >> On Tue, Nov 4, 2014 at 7:31 AM, Marco Salatin >> wrote: >> >>> Where i can find a .pro file for QtCreator to include vtk? >>> >> >> Such a thing doesn't exist, but Creator can create a project from >> a CMakeLists.txt file. It isn't a perfect solution, but it allows you >> to edit your source files, build, and debug from Creator. >> >> - David >> > > > > -- > --- > www.salatin.eu > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lchauvin at bwh.harvard.edu Wed Nov 5 10:23:58 2014 From: lchauvin at bwh.harvard.edu (Laurent Chauvin) Date: Wed, 5 Nov 2014 10:23:58 -0500 Subject: [vtkusers] calibrate vtk camera Message-ID: Hello vtkusers, I'm trying to calibration a vtk camera so it has the same properties and deformation as my real camera. I used OpenCV to do the camera calibration and obtain the intrinsic parameters. I applied the focal distance to the vtk camera and the view angle, but now I'm wondering how to apply the principal point (optical center) to the vtk camera. I saw there were some topics about it, but none of them really gave a clear answer. Thank you. -Laurent -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Wed Nov 5 11:48:16 2014 From: vsh at magellium.fr (Vincent32160) Date: Wed, 5 Nov 2014 08:48:16 -0800 (PST) Subject: [vtkusers] Extract a tube of data from DICOM series data Message-ID: <1415206096618-5729381.post@n5.nabble.com> Hello, I need to extract from DICOM series images (CTScan cylinder) a tube of data of a specific radius. I had good result using vtkExtractVOI but instead of a rectangular volume, I would like to extract a tube (meaning a cylinder without filling). Thanks for your help. -- View this message in context: http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Wed Nov 5 12:10:02 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 5 Nov 2014 10:10:02 -0700 Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: <1415206096618-5729381.post@n5.nabble.com> References: <1415206096618-5729381.post@n5.nabble.com> Message-ID: Hi Vincent, This can be done with vtkROIStencilSource, which can be used to create a cylindrical region for use with vtkImageStencil. The code would be something like this: stencilSource = vtkROIStencilSource() stencilSource.SetShapeToCylinderZ() stencilSource.SetBounds(upstream.GetOutput().GetBounds()) stencilSource.SetInformationInput(upstream.GetOutput()) stencilFilter = vtkImageStencil() stencilFilter.SetInputConnection(upstream.GetOutputPort()) stencilFilter.SetStencilConnection(stencilSource.GetOutputPort()) - David On Wed, Nov 5, 2014 at 9:48 AM, Vincent32160 wrote: > Hello, > I need to extract from DICOM series images (CTScan cylinder) a tube of data > of a specific radius. I had good result using vtkExtractVOI but instead of > a > rectangular volume, I would like to extract a tube (meaning a cylinder > without filling). Thanks for your help. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Wed Nov 5 13:53:03 2014 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Wed, 5 Nov 2014 10:53:03 -0800 (PST) Subject: [vtkusers] texture with artifacts Message-ID: <1415213583738-5729383.post@n5.nabble.com> Hi all, when I decimate a textured objects this texture looks like is torn. You see it on the next pictures. After import: After using .... Why this happening and how can I fix it? Thanks for any hints! -- View this message in context: http://vtk.1045678.n5.nabble.com/texture-with-artifacts-tp5729383.html Sent from the VTK - Users mailing list archive at Nabble.com. From robrotheram at gmail.com Wed Nov 5 16:24:47 2014 From: robrotheram at gmail.com (Rob Rotheram) Date: Wed, 5 Nov 2014 21:24:47 +0000 Subject: [vtkusers] VTK install error Message-ID: Hello I have tried compiling the VTK lib I have used Cmake to configure link to my cmake config: http://www.robrotheram.com/images/fig-1.png Then in xcode to complie I get an error garbage collection is no longer supported. with Apple LLVM with the vtkRenderingOpenGL link to the full error: http://www.robrotheram.com/images/fig-2.png I am a University Student so dont have much experience with using cmake and xcode for building libraries . regards Robert Fletcher From sean at rogue-research.com Wed Nov 5 16:36:53 2014 From: sean at rogue-research.com (Sean McBride) Date: Wed, 5 Nov 2014 16:36:53 -0500 Subject: [vtkusers] VTK install error In-Reply-To: References: Message-ID: <20141105213653.1464399164@mail.rogue-research.com> On Wed, 5 Nov 2014 21:24:47 +0000, Rob Rotheram said: >I have tried compiling the VTK lib I have used Cmake to configure > >link to my cmake config: http://www.robrotheram.com/images/fig-1.png > > >Then in xcode to complie I get an error garbage collection is no >longer supported. with Apple LLVM with the vtkRenderingOpenGL > >link to the full error: http://www.robrotheram.com/images/fig-2.png > >I am a University Student so dont have much experience with using >cmake and xcode for building libraries This has been discussed before and you can find the solution searching the web, ex: basically: in CMake, simply remove the -fobjc-gc flag from VTK_REQUIRED_OBJCXX_FLAGS. 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 g.bogle at auckland.ac.nz Wed Nov 5 19:47:54 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Thu, 6 Nov 2014 00:47:54 +0000 Subject: [vtkusers] Transform axes Message-ID: Hi all, This is a 3D geometry problem, one that many people must have solved. I want to apply a transform to my actor to bring it's local axes (which are initially aligned with the global axes) into alignment with a specified triplet of orthogonal vectors. In fact alignment with a pair is sufficient. I'm hoping that somebody has done this in VTK and can save me the trouble of going through the algebra. Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Nov 5 23:34:28 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 5 Nov 2014 21:34:28 -0700 Subject: [vtkusers] Transform axes In-Reply-To: References: Message-ID: Hi Gib, If I'm reading your question correctly, then what you are looking for is very easy to achieve. To transform an object from its canonical x,y,z axes onto a new set of orthogonal axes, all you need is to set the first three columns of a 4x4 matrix to those axes. if the axis vectors are u, v, and w, then the transform matrix is u_x, v_x, w_x, 0, u_y, v_y, w_y, 0, u_z, v_z, w_z, 0, 0, 0, 0, 1 No algebra involved! - David On Wed, Nov 5, 2014 at 5:47 PM, Gib Bogle wrote: > Hi all, > > This is a 3D geometry problem, one that many people must have solved. I > want to apply a transform to my actor to bring it's local axes (which are > initially aligned with the global axes) into alignment with a specified > triplet of orthogonal vectors. In fact alignment with a pair is > sufficient. I'm hoping that somebody has done this in VTK and can save me > the trouble of going through the algebra. > > Thanks > Gib > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Wed Nov 5 23:36:36 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Thu, 6 Nov 2014 04:36:36 +0000 Subject: [vtkusers] Transform axes In-Reply-To: References: , Message-ID: Indeed, it is simple David, as I discovered after posting that query :) Thanks Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Thursday, 6 November 2014 5:34 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Transform axes Hi Gib, If I'm reading your question correctly, then what you are looking for is very easy to achieve. To transform an object from its canonical x,y,z axes onto a new set of orthogonal axes, all you need is to set the first three columns of a 4x4 matrix to those axes. if the axis vectors are u, v, and w, then the transform matrix is u_x, v_x, w_x, 0, u_y, v_y, w_y, 0, u_z, v_z, w_z, 0, 0, 0, 0, 1 No algebra involved! - David On Wed, Nov 5, 2014 at 5:47 PM, Gib Bogle > wrote: Hi all, This is a 3D geometry problem, one that many people must have solved. I want to apply a transform to my actor to bring it's local axes (which are initially aligned with the global axes) into alignment with a specified triplet of orthogonal vectors. In fact alignment with a pair is sufficient. I'm hoping that somebody has done this in VTK and can save me the trouble of going through the algebra. Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Thu Nov 6 05:36:47 2014 From: vsh at magellium.fr (Vincent32160) Date: Thu, 6 Nov 2014 02:36:47 -0800 (PST) Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: References: <1415206096618-5729381.post@n5.nabble.com> Message-ID: <1415270207505-5729390.post@n5.nabble.com> Thanks David. I used the objects you pointed and it works but the image is like a contour and looks to contains no data (black and white picture). Below is the code. // Read all the DICOM files in the specified directory. vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetDirectoryName(directory); reader->Update(); // Change the kind of data we handle vtkSmartPointer scale = vtkSmartPointer::New(); scale->SetInputConnection(reader->GetOutputPort()); scale->SetOutputScalarTypeToUnsignedShort(); scale->Update(); vtkROIStencilSource * stencilSource = vtkROIStencilSource::New(); stencilSource->SetShapeToCylinderZ(); stencilSource->SetBounds(scale->GetOutput()->GetBounds()); stencilSource->SetInformationInput(scale->GetOutput()); stencilSource->Print(std::cout); vtkImageStencil * stencilFilter = vtkImageStencil::New(); stencilFilter->SetInputConnection(scale->GetOutputPort()); stencilFilter->SetStencilConnection(stencilSource->GetOutputPort()); stencilFilter->Update(); vtkImageSliceMapper * imageMapper3d = vtkImageSliceMapper::New(); imageMapper3d->SetInputConnection(stencilFilter->GetOutputPort()); vtkSmartPointer extractedActor = vtkSmartPointer::New(); extractedActor->SetMapper(imageMapper3d); Here is the result: On the left the input volume data (from the DICOM series) and on the right the display of extractedActor (cf code). I would like to get a part of the input volume as a result and not a single black and white slice. Thanks again. Vincent -- View this message in context: http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729390.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Nov 6 08:28:36 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 6 Nov 2014 06:28:36 -0700 Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: <1415270207505-5729390.post@n5.nabble.com> References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> Message-ID: Hi Vincent, Two notes: 1) you'll have to adjust the Window/Level, using e.g. these: extractedActor->GetProperty()->SetColorWindow(4000.0); extractedActor->GetProperty()->SetColorLevel(2000.0); 2) the vtkImageActor will only ever show one slice at a time, if you want to show the whole volume you will have to use a volume mapper. - David On Thu, Nov 6, 2014 at 3:36 AM, Vincent32160 wrote: > Thanks David. > > I used the objects you pointed and it works but the image is like a contour > and looks to contains no data (black and white picture). Below is the code. > > // Read all the DICOM files in the specified directory. > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetDirectoryName(directory); > reader->Update(); > > // Change the kind of data we handle > vtkSmartPointer scale = > vtkSmartPointer::New(); > scale->SetInputConnection(reader->GetOutputPort()); > scale->SetOutputScalarTypeToUnsignedShort(); > scale->Update(); > > vtkROIStencilSource * stencilSource = vtkROIStencilSource::New(); > stencilSource->SetShapeToCylinderZ(); > stencilSource->SetBounds(scale->GetOutput()->GetBounds()); > stencilSource->SetInformationInput(scale->GetOutput()); > stencilSource->Print(std::cout); > > vtkImageStencil * stencilFilter = vtkImageStencil::New(); > stencilFilter->SetInputConnection(scale->GetOutputPort()); > stencilFilter->SetStencilConnection(stencilSource->GetOutputPort()); > stencilFilter->Update(); > > vtkImageSliceMapper * imageMapper3d = vtkImageSliceMapper::New(); > imageMapper3d->SetInputConnection(stencilFilter->GetOutputPort()); > > vtkSmartPointer extractedActor = > vtkSmartPointer::New(); > extractedActor->SetMapper(imageMapper3d); > > Here is the result: > > On the left the input volume data (from the DICOM series) and on the right > the display of extractedActor (cf code). I would like to get a part of the > input volume as a result and not a single black and white slice. > > Thanks again. > > Vincent > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729390.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Thu Nov 6 09:05:53 2014 From: vsh at magellium.fr (Vincent32160) Date: Thu, 6 Nov 2014 06:05:53 -0800 (PST) Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> Message-ID: <1415282753706-5729393.post@n5.nabble.com> Thanks again David! As I want to keep a volume I chose solution 2. I used a volume mapper and the result is pretty good. The only problem is that I am not able to remove the black voxels around the cylinder. (See picture) The next step of my approach is to be able to keep only the voxels on the edges (meaning on a tube or hollow cylinder of 1-voxel thickness). And after that I would like to unfold the tube and have a flat surface of pixels. Let me know if you think that it is better to create a new thread for these two next steps. Thanks for your help. Vincent -- View this message in context: http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729393.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Nov 6 10:33:53 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 6 Nov 2014 08:33:53 -0700 Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: <1415282753706-5729393.post@n5.nabble.com> References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> <1415282753706-5729393.post@n5.nabble.com> Message-ID: Hi Vincent, Use an opacity transfer function that makes the black voxels transparent. You can unwrap the tube by reslicing it through an inverse cylindrical transformation (e.g. vtkCylindricalTransform and vtkImageReslice). - David On Thu, Nov 6, 2014 at 7:05 AM, Vincent32160 wrote: > Thanks again David! > > As I want to keep a volume I chose solution 2. > I used a volume mapper and the result is pretty good. > The only problem is that I am not able to remove the black voxels around > the > cylinder. (See picture) > > > The next step of my approach is to be able to keep only the voxels on the > edges (meaning on a tube or hollow cylinder of 1-voxel thickness). And > after > that I would like to unfold the tube and have a flat surface of pixels. > Let me know if you think that it is better to create a new thread for these > two next steps. > > Thanks for your help. > > Vincent > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729393.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Thu Nov 6 15:32:13 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Thu, 6 Nov 2014 20:32:13 +0000 Subject: [vtkusers] Transform axes In-Reply-To: References: , Message-ID: Hi David, I obviously have not fully grasped the concept, although I've looked at a few examples and the vtkTransform docs. In my test code I want to place two actors, each with its own orientation. In the code below they are given the same orientation - the transform is intended to take the local (x,y,z) axes to global (y,z,x), and in fact the rotation I get is correct. But I am unable to place the actors where I want. They finish up at (0,-3,0) and (0,3,0), in other words pos[] and pos2[2] are in the rotated coordinate system. How do I rotate the actors and set their positions in the (unchanged) global coordinates? vx[0] = 0; vx[1] = 1; vx[2] = 0; vy[0] = 0; vy[1] = 0; vy[2] = 1; vz[0] = 1; vz[1] = 0; vz[2] = 0; double M[4][4] = {{vx[0],vy[0],vz[0],0}, {vx[1],vy[1],vz[1],0}, {vx[2],vy[2],vz[2],0}, {0,0,0,1}}; for (int i=0; i<4; i++) { for (int j=0; j<4; j++) { vtkM->SetElement(i,j,M[i][j]); } } pos[0] = -3; pos[1] = 0; pos[2] = 0; transform->SetMatrix(vtkM); actor->SetUserTransform(transform); actor->SetOrigin(0,0,0); actor->SetPosition(pos); pos2[0] = 3; pos2[1] = 0; pos2[2] = 0; transform2->SetMatrix(vtkM); actor2->SetUserTransform(transform2); actor2->SetOrigin(0,0,0); actor2->SetPosition(pos2); Thanks Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Thursday, 6 November 2014 5:34 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Transform axes Hi Gib, If I'm reading your question correctly, then what you are looking for is very easy to achieve. To transform an object from its canonical x,y,z axes onto a new set of orthogonal axes, all you need is to set the first three columns of a 4x4 matrix to those axes. if the axis vectors are u, v, and w, then the transform matrix is u_x, v_x, w_x, 0, u_y, v_y, w_y, 0, u_z, v_z, w_z, 0, 0, 0, 0, 1 No algebra involved! - David On Wed, Nov 5, 2014 at 5:47 PM, Gib Bogle > wrote: Hi all, This is a 3D geometry problem, one that many people must have solved. I want to apply a transform to my actor to bring it's local axes (which are initially aligned with the global axes) into alignment with a specified triplet of orthogonal vectors. In fact alignment with a pair is sufficient. I'm hoping that somebody has done this in VTK and can save me the trouble of going through the algebra. Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Thu Nov 6 15:44:59 2014 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Thu, 6 Nov 2014 20:44:59 +0000 Subject: [vtkusers] Transform axes In-Reply-To: References: , , Message-ID: OK, now I see: transform->Translate(pos) after the SetMatrix(), and instead of actor->SetPosition(). pos[0] = -3; pos[1] = 0; pos[2] = 0; transform->SetMatrix(vtkM); transform->Translate(pos); actor->SetUserTransform(transform); pos2[0] = 3; pos2[1] = 0; pos2[2] = 0; transform2->SetMatrix(vtkM); transform2->Translate(pos2); actor2->SetUserTransform(transform2); ________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Gib Bogle [g.bogle at auckland.ac.nz] Sent: Friday, 7 November 2014 9:32 a.m. To: David Gobbi Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Transform axes Hi David, I obviously have not fully grasped the concept, although I've looked at a few examples and the vtkTransform docs. In my test code I want to place two actors, each with its own orientation. In the code below they are given the same orientation - the transform is intended to take the local (x,y,z) axes to global (y,z,x), and in fact the rotation I get is correct. But I am unable to place the actors where I want. They finish up at (0,-3,0) and (0,3,0), in other words pos[] and pos2[2] are in the rotated coordinate system. How do I rotate the actors and set their positions in the (unchanged) global coordinates? vx[0] = 0; vx[1] = 1; vx[2] = 0; vy[0] = 0; vy[1] = 0; vy[2] = 1; vz[0] = 1; vz[1] = 0; vz[2] = 0; double M[4][4] = {{vx[0],vy[0],vz[0],0}, {vx[1],vy[1],vz[1],0}, {vx[2],vy[2],vz[2],0}, {0,0,0,1}}; for (int i=0; i<4; i++) { for (int j=0; j<4; j++) { vtkM->SetElement(i,j,M[i][j]); } } pos[0] = -3; pos[1] = 0; pos[2] = 0; transform->SetMatrix(vtkM); actor->SetUserTransform(transform); actor->SetOrigin(0,0,0); actor->SetPosition(pos); pos2[0] = 3; pos2[1] = 0; pos2[2] = 0; transform2->SetMatrix(vtkM); actor2->SetUserTransform(transform2); actor2->SetOrigin(0,0,0); actor2->SetPosition(pos2); Thanks Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Thursday, 6 November 2014 5:34 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Transform axes Hi Gib, If I'm reading your question correctly, then what you are looking for is very easy to achieve. To transform an object from its canonical x,y,z axes onto a new set of orthogonal axes, all you need is to set the first three columns of a 4x4 matrix to those axes. if the axis vectors are u, v, and w, then the transform matrix is u_x, v_x, w_x, 0, u_y, v_y, w_y, 0, u_z, v_z, w_z, 0, 0, 0, 0, 1 No algebra involved! - David On Wed, Nov 5, 2014 at 5:47 PM, Gib Bogle > wrote: Hi all, This is a 3D geometry problem, one that many people must have solved. I want to apply a transform to my actor to bring it's local axes (which are initially aligned with the global axes) into alignment with a specified triplet of orthogonal vectors. In fact alignment with a pair is sufficient. I'm hoping that somebody has done this in VTK and can save me the trouble of going through the algebra. Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Fri Nov 7 05:00:01 2014 From: vsh at magellium.fr (Vincent32160) Date: Fri, 7 Nov 2014 02:00:01 -0800 (PST) Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> <1415282753706-5729393.post@n5.nabble.com> Message-ID: <1415354401178-5729397.post@n5.nabble.com> Thanks again. Just to let you know the black voxels were the background of the vtkImageStencil. I had to do a SetBackgroundValue in order to have it transparent. I understand the unwrapping step but before it, I need to have an empty tube (only 1-voxel thickness edges). Can vtkImagereslice object allow me to do it? Cheers! Vincent -- View this message in context: http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729397.html Sent from the VTK - Users mailing list archive at Nabble.com. From marco.salatin at gmail.com Fri Nov 7 05:15:34 2014 From: marco.salatin at gmail.com (Marco Salatin) Date: Fri, 7 Nov 2014 02:15:34 -0800 (PST) Subject: [vtkusers] VTK .pro file qtcreator In-Reply-To: References: <1415111483684-5729356.post@n5.nabble.com> Message-ID: <1415355334559-5729398.post@n5.nabble.com> But cmake need version 2.8. I'm using 3.0.2 -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-pro-file-qtcreator-tp5729356p5729398.html Sent from the VTK - Users mailing list archive at Nabble.com. From christophlu at gmx.de Fri Nov 7 05:56:41 2014 From: christophlu at gmx.de (Christoph Ludwig) Date: Fri, 7 Nov 2014 11:56:41 +0100 Subject: [vtkusers] OpenGL context error on remote linux Message-ID: An HTML attachment was scrubbed... URL: From matimontg at gmail.com Fri Nov 7 07:44:43 2014 From: matimontg at gmail.com (Matias Montroull) Date: Fri, 7 Nov 2014 09:44:43 -0300 Subject: [vtkusers] Rotate images Message-ID: Hi, is there a way to rotate DICOM images by x degrees? Thank you, Matias. -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Fri Nov 7 08:16:54 2014 From: matimontg at gmail.com (Matias Montroull) Date: Fri, 7 Nov 2014 10:16:54 -0300 Subject: [vtkusers] Rotate images In-Reply-To: References: Message-ID: I would like to rotate the image and then save it. I looked at the vtktransform, but I'm not sure how to write the transformed image.. On Fri, Nov 7, 2014 at 9:44 AM, Matias Montroull wrote: > Hi, > > is there a way to rotate DICOM images by x degrees? > > Thank you, > > Matias. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Fri Nov 7 09:29:34 2014 From: vsh at magellium.fr (Vincent32160) Date: Fri, 7 Nov 2014 06:29:34 -0800 (PST) Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> <1415282753706-5729393.post@n5.nabble.com> Message-ID: <1415370574070-5729402.post@n5.nabble.com> I now have a tube of data. On the right, you see stencilFiltrer2, the result of two vtkROIStencilSource (the first to remove the outer voxels and the second the inner) I try to use vtkCylindricalTransform and vtkImageReslice to unwrap the tube and I don't get the result I want. Could you help? //Image Reslice vtkCylindricalTransform * cylTransform = vtkCylindricalTransform::New(); vtkImageReslice * imageReslice = vtkImageReslice::New(); imageReslice->SetInputConnection(stencilFilter2->GetOutputPort()); imageReslice->SetResliceTransform(cylTransform->GetInverse()); imageReslice->Update(); // Create volume vtkSmartPointer outputOpacity = vtkSmartPointer::New(); outputOpacity->AddPoint(-1000, 1.0); outputOpacity->AddPoint(3000, 0.0); // Create volume mapper vtkVolumeRayCastMapper * imageMapper3d = vtkVolumeRayCastMapper::New(); imageMapper3d->SetInputConnection(imageReslice->GetOutputPort()); imageMapper3d->SetVolumeRayCastFunction(rayCastFunction); // Volume property vtkSmartPointer outputVolumeProperty = vtkSmartPointer::New(); outputVolumeProperty->SetScalarOpacity(outputOpacity); outputVolumeProperty->SetInterpolationTypeToLinear(); outputVolumeProperty->ShadeOn(); // Displayed volume vtkSmartPointer extractedVol = vtkSmartPointer::New(); extractedVol->SetMapper(imageMapper3d); extractedVol->SetProperty(outputVolumeProperty); Thanks David Gobbi wrote > Hi Vincent, > > Use an opacity transfer function that makes the black voxels transparent. > > You can unwrap the tube by reslicing it through an inverse cylindrical > transformation (e.g. vtkCylindricalTransform and vtkImageReslice). > > - David > > On Thu, Nov 6, 2014 at 7:05 AM, Vincent32160 < > vsh@ > > wrote: > >> Thanks again David! >> >> As I want to keep a volume I chose solution 2. >> I used a volume mapper and the result is pretty good. >> The only problem is that I am not able to remove the black voxels around >> the >> cylinder. (See picture) >> <http://vtk.1045678.n5.nabble.com/file/n5729393/output2.png> >> >> The next step of my approach is to be able to keep only the voxels on the >> edges (meaning on a tube or hollow cylinder of 1-voxel thickness). And >> after >> that I would like to unfold the tube and have a flat surface of pixels. >> Let me know if you think that it is better to create a new thread for >> these >> two next steps. >> >> Thanks for your help. >> >> Vincent >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729393.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 >> >> 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- View this message in context: http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729402.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Nov 7 09:48:48 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 7 Nov 2014 07:48:48 -0700 Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: <1415370574070-5729402.post@n5.nabble.com> References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> <1415282753706-5729393.post@n5.nabble.com> <1415370574070-5729402.post@n5.nabble.com> Message-ID: Hi Vincent, The input to vtkImageReslice should be the original image (before either stencil has been applied). In order for vtkImageReslice to do the interpolation properly, it must have neighbor voxels for each voxel it extracts. After it has unwrapped the whole cylinder, you can select one "radius" slice for viewing. With vtkImageReslice, you _must_ specify what output sampling you want. Use SetOutputSpacing() to set the radius, circumferential angle, and longitudinal sample spacings. Also use SetOutputExtent() to set the number of samples for each. I may have been wrong about having to invert the transform. Try feeding it in without GetInverse(). Also, for the transform to work properly, the input image must be centered. After all, in cylindrical coordinates the assuption is that (0,0,0) is at the center of the cylinder. The filter vtkImageChangeInformation can center the image (i.e. put vtkImageChangeInformation with CenterImageOn() before vtkImageReslice). Good luck, - David On Fri, Nov 7, 2014 at 7:29 AM, Vincent32160 wrote: > I now have a tube of data. On the right, you see stencilFiltrer2, the > result > of two vtkROIStencilSource (the first to remove the outer voxels and the > second the inner) > > > I try to use vtkCylindricalTransform and vtkImageReslice to unwrap the tube > and I don't get the result I want. Could you help? > > //Image Reslice > vtkCylindricalTransform * cylTransform = vtkCylindricalTransform::New(); > > vtkImageReslice * imageReslice = vtkImageReslice::New(); > imageReslice->SetInputConnection(stencilFilter2->GetOutputPort()); > imageReslice->SetResliceTransform(cylTransform->GetInverse()); > imageReslice->Update(); > > // Create volume > vtkSmartPointer outputOpacity = > vtkSmartPointer::New(); > outputOpacity->AddPoint(-1000, 1.0); > outputOpacity->AddPoint(3000, 0.0); > > // Create volume mapper > vtkVolumeRayCastMapper * imageMapper3d = vtkVolumeRayCastMapper::New(); > imageMapper3d->SetInputConnection(imageReslice->GetOutputPort()); > imageMapper3d->SetVolumeRayCastFunction(rayCastFunction); > > // Volume property > vtkSmartPointer outputVolumeProperty = > vtkSmartPointer::New(); > outputVolumeProperty->SetScalarOpacity(outputOpacity); > outputVolumeProperty->SetInterpolationTypeToLinear(); > outputVolumeProperty->ShadeOn(); > > // Displayed volume > vtkSmartPointer extractedVol = > vtkSmartPointer::New(); > extractedVol->SetMapper(imageMapper3d); > extractedVol->SetProperty(outputVolumeProperty); > > Thanks > > > David Gobbi wrote > > Hi Vincent, > > > > Use an opacity transfer function that makes the black voxels transparent. > > > > You can unwrap the tube by reslicing it through an inverse cylindrical > > transformation (e.g. vtkCylindricalTransform and vtkImageReslice). > > > > - David > > > > On Thu, Nov 6, 2014 at 7:05 AM, Vincent32160 < > > > vsh@ > > > > wrote: > > > >> Thanks again David! > >> > >> As I want to keep a volume I chose solution 2. > >> I used a volume mapper and the result is pretty good. > >> The only problem is that I am not able to remove the black voxels around > >> the > >> cylinder. (See picture) > >> <http://vtk.1045678.n5.nabble.com/file/n5729393/output2.png> > >> > >> The next step of my approach is to be able to keep only the voxels on > the > >> edges (meaning on a tube or hollow cylinder of 1-voxel thickness). And > >> after > >> that I would like to unfold the tube and have a flat surface of pixels. > >> Let me know if you think that it is better to create a new thread for > >> these > >> two next steps. > >> > >> Thanks for your help. > >> > >> Vincent > >> > >> > >> > >> > >> -- > >> View this message in context: > >> > http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729393.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 > >> > >> 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 > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729402.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas.Busse at ge.com Fri Nov 7 09:24:43 2014 From: Thomas.Busse at ge.com (Busse, Thomas (GE Oil & Gas)) Date: Fri, 7 Nov 2014 14:24:43 +0000 Subject: [vtkusers] Depth peeling Message-ID: Hi, I tried to get depth peeling working but without success until now. My setup is VTK6.1 and a NVidia Quadro K300m under Windows. Here is the code snippet of the initialization: m_pVtkRenderWindow = pVtkMFCWindow->GetRenderWindow(); m_pVtkRenderWindow->Register(NULL); m_pVtkRenderWindow->AddRenderer(m_pVtkRenderer); // Use Depth Peeling for transparency m_pVtkRenderWindow->SetAlphaBitPlanes(1); m_pVtkRenderWindow->SetMultiSamples(0); m_pVtkRenderer->SetUseDepthPeeling(1); m_pVtkRenderer->SetMaximumNumberOfPeels(100); m_pVtkRenderer->SetOcclusionRatio(0.1); but after rendering a call to int depthPeelingWasUsed = m_pVtkRenderer->GetLastRenderingUsedDepthPeeling(); returns 0. Can someone help me on this? Is there some additional trick required to get it working? According specs the graphics card should fulfill all requirements. Best Regards, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Nov 7 11:59:41 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 7 Nov 2014 11:59:41 -0500 Subject: [vtkusers] Depth peeling In-Reply-To: References: Message-ID: There can be other conditions. Need to more details (or sit down with a debugger) to know for sure if one of them is stopping you. Put a breakpoint at vtkOpenGLRenderer.cxx:541 to see if vtk thinks your card can do depth peeling (or run one of the vtk depth peeling tests). Put a breakpoint at vtkRenderer.cxx:599 to see if vtk thinks that there are translucent objects in your scene. The one has tripped me up before. If it is for you and you happen to be rendering multi block data with block opacity, try setting Mapper->SetScalarVisibilityOff to prevent the LUT from deciding. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Nov 7, 2014 at 9:24 AM, Busse, Thomas (GE Oil & Gas) < Thomas.Busse at ge.com> wrote: > Hi, > > I tried to get depth peeling working but without success until now. > > My setup is VTK6.1 and a NVidia Quadro K300m under Windows. > > Here is the code snippet of the initialization: > > m_pVtkRenderWindow = pVtkMFCWindow->GetRenderWindow(); > m_pVtkRenderWindow->Register(NULL); > > m_pVtkRenderWindow->AddRenderer(m_pVtkRenderer); > > // Use Depth Peeling for transparency > m_pVtkRenderWindow->SetAlphaBitPlanes(1); > m_pVtkRenderWindow->SetMultiSamples(0); > m_pVtkRenderer->SetUseDepthPeeling(1); > m_pVtkRenderer->SetMaximumNumberOfPeels(100); > m_pVtkRenderer->SetOcclusionRatio(0.1); > > > but after rendering a call to > int depthPeelingWasUsed = > m_pVtkRenderer->GetLastRenderingUsedDepthPeeling(); > returns 0. > > Can someone help me on this? > Is there some additional trick required to get it working? > > According specs the graphics card should fulfill all requirements. > > Best Regards, > Thomas > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Fri Nov 7 12:18:53 2014 From: vsh at magellium.fr (Vincent32160) Date: Fri, 7 Nov 2014 09:18:53 -0800 (PST) Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: <1415370574070-5729402.post@n5.nabble.com> References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> <1415282753706-5729393.post@n5.nabble.com> <1415370574070-5729402.post@n5.nabble.com> Message-ID: <1415380733520-5729403.post@n5.nabble.com> Hi David, I followed the steps you advised and it looks ok. Final question (I hope), I am just wondering what are the units of each variables: radius, circumferential angle, and longitudinal sample spacings. Thanks in advance. De : David Gobbi [mailto:david.gobbi at gmail.com] Envoy? : vendredi 7 novembre 2014 15:49 ? : Vincent SALEH Cc : VTK Users Objet : Re: [vtkusers] Extract a tube of data from DICOM series data Hi Vincent, The input to vtkImageReslice should be the original image (before either stencil has been applied). In order for vtkImageReslice to do the interpolation properly, it must have neighbor voxels for each voxel it extracts. After it has unwrapped the whole cylinder, you can select one "radius" slice for viewing. With vtkImageReslice, you _must_ specify what output sampling you want. Use SetOutputSpacing() to set the radius, circumferential angle, and longitudinal sample spacings. Also use SetOutputExtent() to set the number of samples for each. I may have been wrong about having to invert the transform. Try feeding it in without GetInverse(). Also, for the transform to work properly, the input image must be centered. After all, in cylindrical coordinates the assuption is that (0,0,0) is at the center of the cylinder. The filter vtkImageChangeInformation can center the image (i.e. put vtkImageChangeInformation with CenterImageOn() before vtkImageReslice). Good luck, - David -- View this message in context: http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729403.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Nov 7 12:34:16 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 7 Nov 2014 10:34:16 -0700 Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: <78F9B6DDA0C6954984D71A2BE85A0A669570D8F3A4@fxdcvymbaay001.EQ1AAY.local> References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> <1415282753706-5729393.post@n5.nabble.com> <1415370574070-5729402.post@n5.nabble.com> <78F9B6DDA0C6954984D71A2BE85A0A669570D8F3A4@fxdcvymbaay001.EQ1AAY.local> Message-ID: A lot of people ask what VTK's units are. I'll answer with a question: In the equation y = 2*x, what are the units of y? The answer, of course, is that the units of y are the same as the units of x (we will assume "2" has no units). Just like the equation y=2*x, the VTK filters assume that the user already knows what units they are working in. Angles are a special case. The vtkCylindricalTransform uses radians (as stated in its documentation). - David On Fri, Nov 7, 2014 at 10:10 AM, Vincent SALEH wrote: > Hi David, > > I followed the steps you advised and it looks ok. > > Final question (I hope), I am just wondering what are the units of each > variables: radius, circumferential angle, and longitudinal sample spacings. > > Thanks in advance. > > > > *De :* David Gobbi [mailto:david.gobbi at gmail.com] > *Envoy? :* vendredi 7 novembre 2014 15:49 > *? :* Vincent SALEH > *Cc :* VTK Users > *Objet :* Re: [vtkusers] Extract a tube of data from DICOM series data > > > > Hi Vincent, > > > > The input to vtkImageReslice should be the original image > > (before either stencil has been applied). In order for > > vtkImageReslice to do the interpolation properly, it must > > have neighbor voxels for each voxel it extracts. After it > > has unwrapped the whole cylinder, you can select one > > "radius" slice for viewing. > > > > With vtkImageReslice, you _must_ specify what output > > sampling you want. Use SetOutputSpacing() to set the > > radius, circumferential angle, and longitudinal sample > > spacings. Also use SetOutputExtent() to set the > > number of samples for each. > > > > I may have been wrong about having to invert the > > transform. Try feeding it in without GetInverse(). > > > > Also, for the transform to work properly, the input image must > > be centered. After all, in cylindrical coordinates the assuption > > is that (0,0,0) is at the center of the cylinder. The filter > > vtkImageChangeInformation can center the image (i.e. put > > vtkImageChangeInformation with CenterImageOn() before > > vtkImageReslice). > > > > Good luck, > > > > - David > > > > > > On Fri, Nov 7, 2014 at 7:29 AM, Vincent32160 wrote: > > I now have a tube of data. On the right, you see stencilFiltrer2, the > result > of two vtkROIStencilSource (the first to remove the outer voxels and the > second the inner) > > > I try to use vtkCylindricalTransform and vtkImageReslice to unwrap the tube > and I don't get the result I want. Could you help? > > //Image Reslice > vtkCylindricalTransform * cylTransform = vtkCylindricalTransform::New(); > > vtkImageReslice * imageReslice = vtkImageReslice::New(); > imageReslice->SetInputConnection(stencilFilter2->GetOutputPort()); > imageReslice->SetResliceTransform(cylTransform->GetInverse()); > imageReslice->Update(); > > // Create volume > vtkSmartPointer outputOpacity = > vtkSmartPointer::New(); > outputOpacity->AddPoint(-1000, 1.0); > outputOpacity->AddPoint(3000, 0.0); > > // Create volume mapper > vtkVolumeRayCastMapper * imageMapper3d = vtkVolumeRayCastMapper::New(); > imageMapper3d->SetInputConnection(imageReslice->GetOutputPort()); > imageMapper3d->SetVolumeRayCastFunction(rayCastFunction); > > // Volume property > vtkSmartPointer outputVolumeProperty = > vtkSmartPointer::New(); > outputVolumeProperty->SetScalarOpacity(outputOpacity); > outputVolumeProperty->SetInterpolationTypeToLinear(); > outputVolumeProperty->ShadeOn(); > > // Displayed volume > vtkSmartPointer extractedVol = > vtkSmartPointer::New(); > extractedVol->SetMapper(imageMapper3d); > extractedVol->SetProperty(outputVolumeProperty); > > Thanks > > > David Gobbi wrote > > Hi Vincent, > > > > Use an opacity transfer function that makes the black voxels transparent. > > > > You can unwrap the tube by reslicing it through an inverse cylindrical > > transformation (e.g. vtkCylindricalTransform and vtkImageReslice). > > > > - David > > > > On Thu, Nov 6, 2014 at 7:05 AM, Vincent32160 < > > > vsh@ > > > > wrote: > > > >> Thanks again David! > >> > >> As I want to keep a volume I chose solution 2. > >> I used a volume mapper and the result is pretty good. > >> The only problem is that I am not able to remove the black voxels around > >> the > >> cylinder. (See picture) > >> <http://vtk.1045678.n5.nabble.com/file/n5729393/output2.png> > > >> > >> The next step of my approach is to be able to keep only the voxels on > the > >> edges (meaning on a tube or hollow cylinder of 1-voxel thickness). And > >> after > >> that I would like to unfold the tube and have a flat surface of pixels. > >> Let me know if you think that it is better to create a new thread for > >> these > >> two next steps. > >> > >> Thanks for your help. > >> > >> Vincent > >> > >> > >> > >> > >> -- > >> View this message in context: > >> > http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729393.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 > >> > >> 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 > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > > View this message in context: > http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729402.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 > > 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 Fri Nov 7 14:54:00 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 7 Nov 2014 14:54:00 -0500 Subject: [vtkusers] Rotate images In-Reply-To: References: Message-ID: This example rotates a 2D image: http://vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageRotate Bill On Fri, Nov 7, 2014 at 8:16 AM, Matias Montroull wrote: > I would like to rotate the image and then save it. I looked at the > vtktransform, but I'm not sure how to write the transformed image.. > > On Fri, Nov 7, 2014 at 9:44 AM, Matias Montroull > wrote: >> >> Hi, >> >> is there a way to rotate DICOM images by x degrees? >> >> Thank you, >> >> Matias. > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From matimontg at gmail.com Fri Nov 7 15:59:39 2014 From: matimontg at gmail.com (Matias Montroull) Date: Fri, 7 Nov 2014 17:59:39 -0300 Subject: [vtkusers] Rotate images In-Reply-To: References: Message-ID: Thanks Bill, is there a way to save the modified pixel data? The example rotates the image visually and I actually need to save the rotated image. On Fri, Nov 7, 2014 at 4:54 PM, Bill Lorensen wrote: > This example rotates a 2D image: > http://vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageRotate > > Bill > > > On Fri, Nov 7, 2014 at 8:16 AM, Matias Montroull > wrote: > > I would like to rotate the image and then save it. I looked at the > > vtktransform, but I'm not sure how to write the transformed image.. > > > > On Fri, Nov 7, 2014 at 9:44 AM, Matias Montroull > > wrote: > >> > >> Hi, > >> > >> is there a way to rotate DICOM images by x degrees? > >> > >> Thank you, > >> > >> Matias. > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://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://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abruss at awrcorp.com Fri Nov 7 16:04:03 2014 From: abruss at awrcorp.com (Adam Bruss) Date: Fri, 7 Nov 2014 21:04:03 +0000 Subject: [vtkusers] Why does deletion of vtkpolydatamapper cause an infinite loop in vtkclearopenglerrors? Message-ID: Hello, We have a WinForms c++/cli CAD based application that uses VTK 6.1. One of the application's features is playing a script which plays back operations the user had previously done interactively. We pop a modal progress form while the script is playing and do the non-ui work of the script in a background thread. Part of the work of the background thread is creating and deleting vtkPolyDataMappers. While the background thread is going and the progress form is showing we need to update a display in the main thread by calling vtkWin32RenderWindowInteractor::Render(). We have a timer setup so Render is called every few hundred milliseconds at most in a UserControl::OnPaint event handler. This allows the view to update while the script is playing giving the user feedback. This used to work in VTK 5. But now an infinite loop happens upon deletion of a vtkPolyDataMapper in the background thread. The infinite loop is in vtkClearOpenGLErrors: void vtkClearOpenGLErrors() { while (glGetError()!=GL_NO_ERROR){;} } Inside the vtkpolydatamapper is a vtkOpenGLDisplayListPainter. When this gets deleted by vtkGarbageCollectorImpl::CollectInternal we get stuck in vtkClearOpenGLErrors. Does anyone have experience with VTK and threading that could help? Do you know anything about this? It's only an apparent problem in VTK 6.1. Is it illegal to have the main UI thread calling Render on a vtkWin32RenderWindowInteractor while a background thread is doing deletes on a vtkPolyDataMapper? It isn't a timing issue. I think it might be an OpenGL context issue but not sure how to fix it. The problem does go away if we avoid calling Render on the display while the background thread is going but we'd like to give the user feedback while the script is playing. Thanks, Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Nov 7 16:11:53 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 7 Nov 2014 16:11:53 -0500 Subject: [vtkusers] Rotate images In-Reply-To: References: Message-ID: Please keep you responses on the list. Use one of the vtk image writers. On Fri, Nov 7, 2014 at 3:59 PM, Matias Montroull wrote: > Thanks Bill, is there a way to save the modified pixel data? The example > rotates the image visually and I actually need to save the rotated image. > > On Fri, Nov 7, 2014 at 4:54 PM, Bill Lorensen > wrote: >> >> This example rotates a 2D image: >> http://vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageRotate >> >> Bill >> >> >> On Fri, Nov 7, 2014 at 8:16 AM, Matias Montroull >> wrote: >> > I would like to rotate the image and then save it. I looked at the >> > vtktransform, but I'm not sure how to write the transformed image.. >> > >> > On Fri, Nov 7, 2014 at 9:44 AM, Matias Montroull >> > wrote: >> >> >> >> Hi, >> >> >> >> is there a way to rotate DICOM images by x degrees? >> >> >> >> Thank you, >> >> >> >> Matias. >> > >> > >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://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://public.kitware.com/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Fri Nov 7 16:12:56 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 7 Nov 2014 16:12:56 -0500 Subject: [vtkusers] Why does deletion of vtkpolydatamapper cause an infinite loop in vtkclearopenglerrors? In-Reply-To: References: Message-ID: If you can provide a small compilable example that illustrates the problem, I'm sure someone can help. On Fri, Nov 7, 2014 at 4:04 PM, Adam Bruss wrote: > Hello, > > We have a WinForms c++/cli CAD based application that uses VTK 6.1. One of > the application's features is playing a script which plays back operations > the user had previously done interactively. We pop a modal progress form > while the script is playing and do the non-ui work of the script in a > background thread. Part of the work of the background thread is creating and > deleting vtkPolyDataMappers. While the background thread is going and the > progress form is showing we need to update a display in the main thread by > calling vtkWin32RenderWindowInteractor::Render(). > > We have a timer setup so Render is called every few hundred milliseconds at > most in a UserControl::OnPaint event handler. This allows the view to update > while the script is playing giving the user feedback. > > This used to work in VTK 5. But now an infinite loop happens upon deletion > of a vtkPolyDataMapper in the background thread. The infinite loop is in > vtkClearOpenGLErrors: > > void vtkClearOpenGLErrors() > > { > > while (glGetError()!=GL_NO_ERROR){;} > > } > > Inside the vtkpolydatamapper is a vtkOpenGLDisplayListPainter. When this > gets deleted by vtkGarbageCollectorImpl::CollectInternal we get stuck in > vtkClearOpenGLErrors. > > Does anyone have experience with VTK and threading that could help? Do you > know anything about this? It's only an apparent problem in VTK 6.1. Is it > illegal to have the main UI thread calling Render on a > vtkWin32RenderWindowInteractor while a background thread is doing deletes on > a vtkPolyDataMapper? It isn't a timing issue. I think it might be an OpenGL > context issue but not sure how to fix it. The problem does go away if we > avoid calling Render on the display while the background thread is going but > we'd like to give the user feedback while the script is playing. > > Thanks, > > Adam > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From rabysam28 at gmail.com Fri Nov 7 23:43:32 2014 From: rabysam28 at gmail.com (Sam Raby) Date: Fri, 7 Nov 2014 22:43:32 -0600 Subject: [vtkusers] compilation of VTK6.1 with Qt5-enabled - Policy CMP0040 is not set.... In-Reply-To: References: Message-ID: Thanks Gib. Yes, the build is successful. -S On Sat, Nov 1, 2014 at 1:15 AM, Gib Bogle wrote: > They look to me like warnings, not errors. Is the build successful? > > Gib > ------------------------------ > *From:* vtkusers [vtkusers-bounces at vtk.org] on behalf of Sam Raby [ > rabysam28 at gmail.com] > *Sent:* Saturday, 1 November 2014 6:32 p.m. > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] compilation of VTK6.1 with Qt5-enabled - Policy > CMP0040 is not set.... > > I am compiling VTK 6.1 from [1] with Qt enabled (Qt 5.3.2 from [2]) > using cmake 3.0.2 from [3]. My OS is Ubuntu 12.04. > > I am running the following command [4] for ccmake: > > cd /path/to/VTK-Release-build > ccmake -DVTK_QT_VERSION:STRING=5 \ > -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt5.2.1-install/5.2.1/gcc_64/bin/qmake \ > -DVTK_Group_Qt:BOOL=ON \ > -DCMAKE_PREFIX_PATH:PATH=/path/to/qt.5.2.1-install/5.2.1/gcc_64/lib/cmake \ > -DBUILD_SHARED_LIBS:BOOL=ON > /path/to/VTK > > > but I'm getting the following error: > > *(ADD_CUSTOM_COMMAND):* > *Policy CMP0040 is not set: The target in the TARGET signature of* > *add_custom_command() must exist. Run "cmake --help-policy CMP0040" for **policy > details. Use the cmake_policy command to set the policy and* > *suppress this warning.* > > *The target name* > > *"/home/torabi/local2/VTK/VTK-6.1.0-build/ThirdParty/hdf5/vtkhdf5/H5Edefin.h"* > *is unknown in this context.* > *This warning is for project developers. Use -Wno-dev to suppress it.* > > Would you please hint me how to tackle this error? > > Thanks > -S > > [1] http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz > [2] > http://download.qt-project.org/official_releases/online_installers/qt-opensource-linux-x64-1.6.0-5-online.run > [3] http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz > [4] http://www.vtk.org/Wiki/VTK/Building/Linux#Qt5 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From george.gerber at gmail.com Sat Nov 8 10:22:31 2014 From: george.gerber at gmail.com (George) Date: Sat, 8 Nov 2014 08:22:31 -0700 (MST) Subject: [vtkusers] vtkPoints, vtkUnstructuredGrid data overwritten or not updated? Message-ID: <1415460151850-5729414.post@n5.nabble.com> Good day, I am trying to display 4 polyhedrons that are aligned along the x-axis, 4 along the y-axis and 4 along the z-axis. Below the section of code that does this. Basically I do a for-loop where the first loop is for the x-axis, the second y and the last z. When I view my .vtu file in paraview I only see 4 polyhedrons all aligned in one direction. When I view the properties of the data set I see that there are correctly 12 cells. I am a bit stumped. Why are the other 8 polyhedrons not showing? Could it be that the point data stored in MODEL['vtkpoints'] is overwritten at the start of each loop? Best regards, George for gamma in [gammax, gammay, gammaz]: for pt_local in pt1list: pt_global = dot(gamma.T,pt_local) MODEL['vtkpoints'].InsertNextPoint(self.x-10+pt_global[0], self.y+pt_global[1], self.z+pt_global[2]) face1Id = vtk.vtkIdList() face1Id.InsertNextId(len(face1list)) # Number faces that make up the cell. for face in face1list: # Loop over all the faces face1Id.InsertNextId(len(face)) # Number of points in face [face1Id.InsertNextId(i) for i in face] # Insert the pointIds for the face MODEL['vtkugrid'].InsertNextCell(vtk.VTK_POLYHEDRON, face1Id) -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkPoints-vtkUnstructuredGrid-data-overwritten-or-not-updated-tp5729414.html Sent from the VTK - Users mailing list archive at Nabble.com. From llz.leephi at 163.com Sun Nov 9 20:58:57 2014 From: llz.leephi at 163.com (=?GBK?B?wO63xrfG?=) Date: Mon, 10 Nov 2014 09:58:57 +0800 (CST) Subject: [vtkusers] errors when intalling VTK-6.1.0 Message-ID: <4e3fe0fc.9b90.149976ce7ef.Coremail.llz.leephi@163.com> Hi everyone: I've made a dir VTK-build in the same dir of VTK-6.1.0, and type the following orders: ccmkae ../VTK-6.1.0 make make intall However, when execute the "make", I met the following errors: 1 [ 0%] Built target VTKData 2 [ 0%] Building CXX object Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/Directory.cxx.o 3 In file included from /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h:60, 4 from /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:66, 5 from /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/char_traits.h:41, 6 from /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/string:42, 7 from /vol-th/home/liff/local/VTK-build/Utilities/KWSys/vtksys/stl/string:36, 8 from /vol-th/home/liff/local/VTK-build/Utilities/KWSys/vtksys/Encoding.hxx:16, 9 from /vol-th/home/liff/local/VTK-6.1.0/Utilities/KWSys/vtksys/Directory.cxx:17: 10 /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h:88: error: ????ize_t????has not been declared 11 /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h: In function ????oid std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])???? 12 /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h:92: error: ????ize_t????was not declared in this scope 13 /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h:92: error: expected ????????before ????_n??~Y 14 /usr/lib/gcc/x86_64-kylin-linux/4.4.7/../../../../include/c++/4.4.7/bits/move.h:92: error: ????_n????was not declared in this scope Do you know how to solve the problem? I've been confursed for several day, and thank you very much for helping. From Floria @ NSCC-TJ -------------- next part -------------- An HTML attachment was scrubbed... URL: From xjtuzxl at 163.com Mon Nov 10 00:48:22 2014 From: xjtuzxl at 163.com (Xianliang.Zeng) Date: Mon, 10 Nov 2014 13:48:22 +0800 (CST) Subject: [vtkusers] vtkHardwareSelector Can't work with vtkUnstructuredGrid data? Message-ID: <1b69711e.daf6.149983ef24f.Coremail.xjtuzxl@163.com> Hello I want to select cells in a vtkUnstructuredGrid data, and I created a vtkHardwareSelector for it. And then I found nothing can be selected. By the way, I test the vtkHardwareSelector with a vtkPolyData, and it works well. So, why can't vtkHardwareSelector select cells from vtkUnstructuredGrid? Best regards, Shane -------------- next part -------------- An HTML attachment was scrubbed... URL: From chasank at gmail.com Mon Nov 10 03:46:36 2014 From: chasank at gmail.com (chasank) Date: Mon, 10 Nov 2014 01:46:36 -0700 (MST) Subject: [vtkusers] vtkImageViewer2 and QVTKWidget In-Reply-To: <06db4d3164ed5d5ecacf69fe384abd0a.squirrel@webmail.umaryland.edu> References: <06db4d3164ed5d5ecacf69fe384abd0a.squirrel@webmail.umaryland.edu> Message-ID: <1415609196404-5729417.post@n5.nabble.com> First of all do not use application-type classes such as vtkImageViewer2 if you want to have full control on your application. -Add 4 vtkRenderer instances to a vtkRenderWindow. Set their locations with vtkViewport::SetViewport(double, double, double, double). - Add your vtkProp instances to your current vtkRenderers. -Write a custom class that inherits from vtkCommand for controlling interactions such as window leveling, scaling etc. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageViewer2-and-QVTKWidget-tp5729373p5729417.html Sent from the VTK - Users mailing list archive at Nabble.com. From Thomas.Busse at ge.com Mon Nov 10 03:48:34 2014 From: Thomas.Busse at ge.com (Busse, Thomas (GE Oil & Gas)) Date: Mon, 10 Nov 2014 08:48:34 +0000 Subject: [vtkusers] Depth peeling In-Reply-To: References: Message-ID: Thanks a lot for help. I have put a breakpoint at vtkOpenGLRenderer.cxx:541 The this->DepthPeelingIsSupported is 0. Digging a little bit deeper this is because : GLint alphaBits; glGetIntegerv(GL_ALPHA_BITS, &alphaBits); int supportsAtLeast8AlphaBits=alphaBits>=8; alphaBits is 0. I have checked that all other conditions for this->DepthPeelingIsSupported = supports_depth_texture && supports_shadow && supports_blend_func_separate && supports_shadow_funcs && supports_vertex_shader && supports_fragment_shader && supports_shader_objects && supports_occlusion_query && supports_multitexture && supports_GL_ARB_texture_rectangle && supports_edge_clamp && supportsAtLeast8AlphaBits && driver_support; are true. Do I have some settings wrong so that alphaBits is 0? Or is it a problem with my graphics card? Best Regards, Thomas From: David E DeMarle [mailto:dave.demarle at kitware.com] Sent: Freitag, 7. November 2014 18:00 To: Busse, Thomas (GE Oil & Gas) Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Depth peeling There can be other conditions. Need to more details (or sit down with a debugger) to know for sure if one of them is stopping you. Put a breakpoint at vtkOpenGLRenderer.cxx:541 to see if vtk thinks your card can do depth peeling (or run one of the vtk depth peeling tests). Put a breakpoint at vtkRenderer.cxx:599 to see if vtk thinks that there are translucent objects in your scene. The one has tripped me up before. If it is for you and you happen to be rendering multi block data with block opacity, try setting Mapper->SetScalarVisibilityOff to prevent the LUT from deciding. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Nov 7, 2014 at 9:24 AM, Busse, Thomas (GE Oil & Gas) > wrote: Hi, I tried to get depth peeling working but without success until now. My setup is VTK6.1 and a NVidia Quadro K300m under Windows. Here is the code snippet of the initialization: m_pVtkRenderWindow = pVtkMFCWindow->GetRenderWindow(); m_pVtkRenderWindow->Register(NULL); m_pVtkRenderWindow->AddRenderer(m_pVtkRenderer); // Use Depth Peeling for transparency m_pVtkRenderWindow->SetAlphaBitPlanes(1); m_pVtkRenderWindow->SetMultiSamples(0); m_pVtkRenderer->SetUseDepthPeeling(1); m_pVtkRenderer->SetMaximumNumberOfPeels(100); m_pVtkRenderer->SetOcclusionRatio(0.1); but after rendering a call to int depthPeelingWasUsed = m_pVtkRenderer->GetLastRenderingUsedDepthPeeling(); returns 0. Can someone help me on this? Is there some additional trick required to get it working? According specs the graphics card should fulfill all requirements. Best Regards, Thomas _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://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://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From li76pan at hotmail.com Mon Nov 10 08:17:39 2014 From: li76pan at hotmail.com (LiPan) Date: Mon, 10 Nov 2014 21:17:39 +0800 Subject: [vtkusers] Mixed Color with Depth Peeling Message-ID: Dear all, I was trying to use Depth Peeling to display several translucent polydata in one 3D scene. The problem is, if their colors are set with SetColor, everything works fine. However, if texture mapping is applied to one of the polygon, the colors of the rest polydata are mixed up with color of this texture map. In the attached simplified example code, I was trying to create two polydata. One is quad, the other is cube. Quad got a texture which is loaded from a jpg file. The image is nothing more than a square of red color. The color of cube is white. Opacity of both were set to 0.5. So, if you run the program, you'll see the cube polygon becomes red which comes from the texture image. I'm using vtk6.0 under Kubunto 12.04. glxinfo shows OpenGL version string: 4.4.0 NVIDIA 331.38. I've read the paper of Depth Peeling by Cass Everitt. Still couldn't understand where the problem comes from. Could anyone give me a hint? Thank you Pan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: DepthPeerlColorMix.cxx URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: texture.jpg Type: image/jpeg Size: 1808 bytes Desc: not available URL: From aashish.chaudhary at kitware.com Mon Nov 10 10:11:00 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 10 Nov 2014 10:11:00 -0500 Subject: [vtkusers] Depth peeling In-Reply-To: References: Message-ID: What kind of graphics card / driver version / and OS you are using? Any information related to this would be useful. - Aashish On Mon, Nov 10, 2014 at 3:48 AM, Busse, Thomas (GE Oil & Gas) < Thomas.Busse at ge.com> wrote: > Thanks a lot for help. > > > > I have put a breakpoint at vtkOpenGLRenderer.cxx:541 > > > > The this->DepthPeelingIsSupported is 0. > > Digging a little bit deeper this is because : > > > > GLint alphaBits; > > glGetIntegerv(GL_ALPHA_BITS, &alphaBits); > > int supportsAtLeast8AlphaBits=alphaBits>=8; > > > > alphaBits is 0. > > > > I have checked that all other conditions for > > this->DepthPeelingIsSupported = > > supports_depth_texture && > > supports_shadow && > > supports_blend_func_separate && > > supports_shadow_funcs && > > supports_vertex_shader && > > supports_fragment_shader && > > supports_shader_objects && > > supports_occlusion_query && > > supports_multitexture && > > supports_GL_ARB_texture_rectangle && > > supports_edge_clamp && > > supportsAtLeast8AlphaBits && > > driver_support; > > > > are true. > > > > Do I have some settings wrong so that alphaBits is 0? Or is it a problem > with my graphics card? > > > > Best Regards, > > Thomas > > > > > > > > > > *From:* David E DeMarle [mailto:dave.demarle at kitware.com] > *Sent:* Freitag, 7. November 2014 18:00 > *To:* Busse, Thomas (GE Oil & Gas) > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Depth peeling > > > > There can be other conditions. > > > > Need to more details (or sit down with a debugger) to know for sure if one > of them is stopping you. > > > > Put a breakpoint at vtkOpenGLRenderer.cxx:541 to see if vtk thinks your > card can do depth peeling (or run one of the vtk depth peeling tests). > > > > Put a breakpoint at vtkRenderer.cxx:599 to see if vtk thinks that there > are translucent objects in your scene. The one has tripped me up before. If > it is for you and you happen to be rendering multi block data with block > opacity, try setting Mapper->SetScalarVisibilityOff to prevent the LUT from > deciding. > > > > > > > > > > > > > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > > > On Fri, Nov 7, 2014 at 9:24 AM, Busse, Thomas (GE Oil & Gas) < > Thomas.Busse at ge.com> wrote: > > Hi, > > > > I tried to get depth peeling working but without success until now. > > > > My setup is VTK6.1 and a NVidia Quadro K300m under Windows. > > > > Here is the code snippet of the initialization: > > > > m_pVtkRenderWindow = pVtkMFCWindow->GetRenderWindow(); > > m_pVtkRenderWindow->Register(NULL); > > > > m_pVtkRenderWindow->AddRenderer(m_pVtkRenderer); > > > > // Use Depth Peeling for transparency > > m_pVtkRenderWindow->SetAlphaBitPlanes(1); > > m_pVtkRenderWindow->SetMultiSamples(0); > > m_pVtkRenderer->SetUseDepthPeeling(1); > > m_pVtkRenderer->SetMaximumNumberOfPeels(100); > > m_pVtkRenderer->SetOcclusionRatio(0.1); > > > > > > but after rendering a call to > > int depthPeelingWasUsed = > m_pVtkRenderer->GetLastRenderingUsedDepthPeeling(); > > returns 0. > > > > Can someone help me on this? > > Is there some additional trick required to get it working? > > > > According specs the graphics card should fulfill all requirements. > > > > Best Regards, > > Thomas > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://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 > > 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 dave.demarle at kitware.com Mon Nov 10 10:58:24 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 10 Nov 2014 10:58:24 -0500 Subject: [vtkusers] vtkHardwareSelector Can't work with vtkUnstructuredGrid data? In-Reply-To: <1b69711e.daf6.149983ef24f.Coremail.xjtuzxl@163.com> References: <1b69711e.daf6.149983ef24f.Coremail.xjtuzxl@163.com> Message-ID: VTK won't render UnstructuredGrid (UG) directly (other than in volume rendering) either. So, apply the vtkDataSetSurface (DSSF) filter to convert the outer skin of the UG data into a vtkPolyData and render+select that. The PassThough*Ids methods on the DSSF are there to maintain the correspondence of input cells to output cells so that you can figure out what exactly was selected in the UG. cheers David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Nov 10, 2014 at 12:48 AM, Xianliang.Zeng wrote: > Hello > > I want to select cells in a vtkUnstructuredGrid data, and I created a > vtkHardwareSelector for it. And then I found nothing can be selected. > By the way, I test the vtkHardwareSelector with a vtkPolyData, and it > works well. > So, why can't vtkHardwareSelector select cells from vtkUnstructuredGrid? > > Best regards, > Shane > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robrotheram at gmail.com Mon Nov 10 11:57:46 2014 From: robrotheram at gmail.com (Rob Rotheram) Date: Mon, 10 Nov 2014 16:57:46 +0000 Subject: [vtkusers] Visualising Vector field from an algorithm Message-ID: Hello all. I am a Uni student trying to visualise a vector field using data generated from an algorithm not from a file. the algorithm generates vector field of dimension [xs,ys,zs,3] from a proceedural function. By passing in different time arguements, algroithum(x,y,z,time); I am new to vtk, and I am playing around with using the example VectorField code: http://www.vtk.org/Wiki/VTK/Examples/Cxx/WishList/Visualization/VectorField What every I seem to do : image->SetDimensions(50,50,1); to image->SetDimensions(50,50,20); { float* pixel = static_cast(image->GetScalarPointer(10,10,10)); pixel[0] = 10; pixel[1] = 65; pixel[2] = -35; } or adding extra float* pixel ... code he arrows always point in the same axis just positive or negative I also tried setting vtkSmartPointer glyphFilter from vtkGlyph2D to 3D. Also how would one keep the arrow color constant instead changing from blue to red depending if the pixel is negative. Any help be appreciated. regards Robert Fletcher From afpena at gbt.tfo.upm.es Mon Nov 10 12:17:32 2014 From: afpena at gbt.tfo.upm.es (alberto) Date: Mon, 10 Nov 2014 10:17:32 -0700 (MST) Subject: [vtkusers] Combine images with different orientation and position settings Message-ID: <1415639852159-5729423.post@n5.nabble.com> Hello, I'm new over here and I need a little help: I'm trying to do a 3D volume reconstruction with a set of tracked US images. I have a set of png images and a text file with the position and heading of the US probe for each image. I'm not sure how to set orientation and origin for each one and combine them to create a volume. Any ideas? Thank you very much. Alberto Fern?ndez Pena -- View this message in context: http://vtk.1045678.n5.nabble.com/Combine-images-with-different-orientation-and-position-settings-tp5729423.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Mon Nov 10 13:51:21 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 10 Nov 2014 13:51:21 -0500 Subject: [vtkusers] Depth peeling In-Reply-To: References: Message-ID: > NVidia Quadro K300m under Windows. hmmm, why would glGetIntegerv(GL_ALPHA_BITS, &alphaBits) would return 0? Maybe the context isn't initialized correctly at this point in the program somehow... Thomas what does ctest -R Depth give you? David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Nov 10, 2014 at 10:11 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > What kind of graphics card / driver version / and OS you are using? Any > information related to this would be useful. > > - Aashish > > On Mon, Nov 10, 2014 at 3:48 AM, Busse, Thomas (GE Oil & Gas) < > Thomas.Busse at ge.com> wrote: > >> Thanks a lot for help. >> >> >> >> I have put a breakpoint at vtkOpenGLRenderer.cxx:541 >> >> >> >> The this->DepthPeelingIsSupported is 0. >> >> Digging a little bit deeper this is because : >> >> >> >> GLint alphaBits; >> >> glGetIntegerv(GL_ALPHA_BITS, &alphaBits); >> >> int supportsAtLeast8AlphaBits=alphaBits>=8; >> >> >> >> alphaBits is 0. >> >> >> >> I have checked that all other conditions for >> >> this->DepthPeelingIsSupported = >> >> supports_depth_texture && >> >> supports_shadow && >> >> supports_blend_func_separate && >> >> supports_shadow_funcs && >> >> supports_vertex_shader && >> >> supports_fragment_shader && >> >> supports_shader_objects && >> >> supports_occlusion_query && >> >> supports_multitexture && >> >> supports_GL_ARB_texture_rectangle && >> >> supports_edge_clamp && >> >> supportsAtLeast8AlphaBits && >> >> driver_support; >> >> >> >> are true. >> >> >> >> Do I have some settings wrong so that alphaBits is 0? Or is it a problem >> with my graphics card? >> >> >> >> Best Regards, >> >> Thomas >> >> >> >> >> >> >> >> >> >> *From:* David E DeMarle [mailto:dave.demarle at kitware.com] >> *Sent:* Freitag, 7. November 2014 18:00 >> *To:* Busse, Thomas (GE Oil & Gas) >> *Cc:* vtkusers at vtk.org >> *Subject:* Re: [vtkusers] Depth peeling >> >> >> >> There can be other conditions. >> >> >> >> Need to more details (or sit down with a debugger) to know for sure if >> one of them is stopping you. >> >> >> >> Put a breakpoint at vtkOpenGLRenderer.cxx:541 to see if vtk thinks your >> card can do depth peeling (or run one of the vtk depth peeling tests). >> >> >> >> Put a breakpoint at vtkRenderer.cxx:599 to see if vtk thinks that there >> are translucent objects in your scene. The one has tripped me up before. If >> it is for you and you happen to be rendering multi block data with block >> opacity, try setting Mapper->SetScalarVisibilityOff to prevent the LUT from >> deciding. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> David E DeMarle >> Kitware, Inc. >> R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4909 >> >> >> >> On Fri, Nov 7, 2014 at 9:24 AM, Busse, Thomas (GE Oil & Gas) < >> Thomas.Busse at ge.com> wrote: >> >> Hi, >> >> >> >> I tried to get depth peeling working but without success until now. >> >> >> >> My setup is VTK6.1 and a NVidia Quadro K300m under Windows. >> >> >> >> Here is the code snippet of the initialization: >> >> >> >> m_pVtkRenderWindow = pVtkMFCWindow->GetRenderWindow(); >> >> m_pVtkRenderWindow->Register(NULL); >> >> >> >> m_pVtkRenderWindow->AddRenderer(m_pVtkRenderer); >> >> >> >> // Use Depth Peeling for transparency >> >> m_pVtkRenderWindow->SetAlphaBitPlanes(1); >> >> m_pVtkRenderWindow->SetMultiSamples(0); >> >> m_pVtkRenderer->SetUseDepthPeeling(1); >> >> m_pVtkRenderer->SetMaximumNumberOfPeels(100); >> >> m_pVtkRenderer->SetOcclusionRatio(0.1); >> >> >> >> >> >> but after rendering a call to >> >> int depthPeelingWasUsed = >> m_pVtkRenderer->GetLastRenderingUsedDepthPeeling(); >> >> returns 0. >> >> >> >> Can someone help me on this? >> >> Is there some additional trick required to get it working? >> >> >> >> According specs the graphics card should fulfill all requirements. >> >> >> >> Best Regards, >> >> Thomas >> >> >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://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 >> >> 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 dave.demarle at kitware.com Mon Nov 10 16:22:32 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 10 Nov 2014 16:22:32 -0500 Subject: [vtkusers] See what our closest collaborators have been cooking up for IEEE SC 2014 Message-ID: Greetings again lists, If you are planning out what to see and do at this year's Supercomputing conference, please don't forget about the presentations we've got lined up at the Kitware booth. http://www.kitware.com/blog/home/post/773 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 gelwoody at gmail.com Mon Nov 10 18:05:49 2014 From: gelwoody at gmail.com (Graham Elwoody) Date: Mon, 10 Nov 2014 15:05:49 -0800 Subject: [vtkusers] using 3D contours to clip and clean a surface Message-ID: Greetings, I am a VTK user working with a 3D surface (polydata). My goal is to remove the small specks from the surface. Already at this point (and for applications considerations beyond removing the small specks), I've computed the convex hull of the surface, created a distance filter (representing the distance from the convex hull to the surface), created a 3d contour filter (partitioning the surface into ranges of various depths) and then ran a connectivity filter on the resulting contours. The contours look fine for my needs. Now I'd like to somehow march through the smaller contours by region (focusing only those with low cell count), compute their surface area (using VTK Mass Properties), remove the smaller contours/surfaces from the original 3D surface and fill the resulting holes. However, after a few days of researching how to do this ...I have not figured out a good approach. Can I somehow clip the original surface with the individual contours and apply the results to VTKMassProperties? Any help would be greatly appreciated. Cheers, Graham -------------- next part -------------- An HTML attachment was scrubbed... URL: From svaish at neocisinc.com Mon Nov 10 21:12:01 2014 From: svaish at neocisinc.com (Sarvagya Vaish) Date: Mon, 10 Nov 2014 21:12:01 -0500 Subject: [vtkusers] Polydata misbehaving in the presence of Image Volume Message-ID: I have Image Data that is being rendered using a Volume Mapper and Polydata that is being rendered using a Polydata Mapper. When I set the opacity of the actor corresponding to the polydata to anything other than 1.0, it starts misbehaving. The Image Data is always rendered on top of the polydata, even if it is positioned behind the semi-opaque polydata. Is there a solution to this rendering issue? Thanks, Survy -------------- next part -------------- An HTML attachment was scrubbed... URL: From wulihouxiaoshuai at 163.com Tue Nov 11 01:49:56 2014 From: wulihouxiaoshuai at 163.com (Emptystack) Date: Mon, 10 Nov 2014 23:49:56 -0700 (MST) Subject: [vtkusers] how to get the amount of remaining VRAM memory Message-ID: <1415688596534-5729430.post@n5.nabble.com> We all know that the VTK can get the whole memory of video card(through the vtkGPUInfo class), but I am trying to get the remaining(unused) dedicated video memory in my applications, and I have searched this problem many hours but I couldn't find the answer! Has anyone did this before? Looking forward to your reply! Best wishes! -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-get-the-amount-of-remaining-VRAM-memory-tp5729430.html Sent from the VTK - Users mailing list archive at Nabble.com. From Thomas.Busse at ge.com Tue Nov 11 05:00:16 2014 From: Thomas.Busse at ge.com (Busse, Thomas (GE Oil & Gas)) Date: Tue, 11 Nov 2014 10:00:16 +0000 Subject: [vtkusers] Depth peeling In-Reply-To: References: Message-ID: Hi, pVtkMFCWindow is created like this: // Initialize VTK window CWnd* item = GetDlgItem(IDC_VTK_WINDOW); m_pVtkMFCWindow = new vtkMFCWindow(item); in OnInitdialog(). Attached is the output of glview. For the ctest: I was not able to build this. In cmake I enabled BUILD_TESTING but this ended in 133 warnings and 1 build error. A note, most probably unrelated, but anyhow: Compilation of project vtkGUISupportMFC was not working in Visual Studio 2013 out-of-the-box. I had to change the properties ?Character Set? from ?Use Multi-Byte Character Set? to ?Use Unicode Character Set? (VTK6.1) Best Regards, Thomas From: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com] Sent: Montag, 10. November 2014 16:56 To: Busse, Thomas (GE Oil & Gas) Subject: Re: [vtkusers] Depth peeling Is pVtkMFCWindow is an instance of your own render window implementation? Also, Can you run glview from here (if possible) http://www.realtech-vr.com/glview/download.php and send us the result of that? It is possible that size of the alpha bit plane (8 vs 5 vs something) else is causing the issue. Also, make sure that you do it before you call render on the render window. - Aashish From: David E DeMarle [mailto:dave.demarle at kitware.com] Sent: Montag, 10. November 2014 19:51 To: Aashish Chaudhary Cc: Busse, Thomas (GE Oil & Gas); vtkusers at vtk.org Subject: Re: [vtkusers] Depth peeling > NVidia Quadro K300m under Windows. hmmm, why would glGetIntegerv(GL_ALPHA_BITS, &alphaBits) would return 0? Maybe the context isn't initialized correctly at this point in the program somehow... Thomas what does ctest -R Depth give you? David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Nov 10, 2014 at 10:11 AM, Aashish Chaudhary > wrote: What kind of graphics card / driver version / and OS you are using? Any information related to this would be useful. - Aashish On Mon, Nov 10, 2014 at 3:48 AM, Busse, Thomas (GE Oil & Gas) > wrote: Thanks a lot for help. I have put a breakpoint at vtkOpenGLRenderer.cxx:541 The this->DepthPeelingIsSupported is 0. Digging a little bit deeper this is because : GLint alphaBits; glGetIntegerv(GL_ALPHA_BITS, &alphaBits); int supportsAtLeast8AlphaBits=alphaBits>=8; alphaBits is 0. I have checked that all other conditions for this->DepthPeelingIsSupported = supports_depth_texture && supports_shadow && supports_blend_func_separate && supports_shadow_funcs && supports_vertex_shader && supports_fragment_shader && supports_shader_objects && supports_occlusion_query && supports_multitexture && supports_GL_ARB_texture_rectangle && supports_edge_clamp && supportsAtLeast8AlphaBits && driver_support; are true. Do I have some settings wrong so that alphaBits is 0? Or is it a problem with my graphics card? Best Regards, Thomas From: David E DeMarle [mailto:dave.demarle at kitware.com] Sent: Freitag, 7. November 2014 18:00 To: Busse, Thomas (GE Oil & Gas) Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Depth peeling There can be other conditions. Need to more details (or sit down with a debugger) to know for sure if one of them is stopping you. Put a breakpoint at vtkOpenGLRenderer.cxx:541 to see if vtk thinks your card can do depth peeling (or run one of the vtk depth peeling tests). Put a breakpoint at vtkRenderer.cxx:599 to see if vtk thinks that there are translucent objects in your scene. The one has tripped me up before. If it is for you and you happen to be rendering multi block data with block opacity, try setting Mapper->SetScalarVisibilityOff to prevent the LUT from deciding. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Nov 7, 2014 at 9:24 AM, Busse, Thomas (GE Oil & Gas) > wrote: Hi, I tried to get depth peeling working but without success until now. My setup is VTK6.1 and a NVidia Quadro K300m under Windows. Here is the code snippet of the initialization: m_pVtkRenderWindow = pVtkMFCWindow->GetRenderWindow(); m_pVtkRenderWindow->Register(NULL); m_pVtkRenderWindow->AddRenderer(m_pVtkRenderer); // Use Depth Peeling for transparency m_pVtkRenderWindow->SetAlphaBitPlanes(1); m_pVtkRenderWindow->SetMultiSamples(0); m_pVtkRenderer->SetUseDepthPeeling(1); m_pVtkRenderer->SetMaximumNumberOfPeels(100); m_pVtkRenderer->SetOcclusionRatio(0.1); but after rendering a call to int depthPeelingWasUsed = m_pVtkRenderer->GetLastRenderingUsedDepthPeeling(); returns 0. Can someone help me on this? Is there some additional trick required to get it working? According specs the graphics card should fulfill all requirements. Best Regards, Thomas _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://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://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 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: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: QuadroK300M_OpenGLView_Report.txt URL: From igorznt at gmail.com Tue Nov 11 06:52:26 2014 From: igorznt at gmail.com (igorznt) Date: Tue, 11 Nov 2014 04:52:26 -0700 (MST) Subject: [vtkusers] Recognize a screw in a CT Message-ID: <1415706746162-5729432.post@n5.nabble.com> I have to recognize a screw in a CT an locate the point on its bases and head. Does anyone knows how or could indicate a good material about? -- View this message in context: http://vtk.1045678.n5.nabble.com/Recognize-a-screw-in-a-CT-tp5729432.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Nov 11 08:52:01 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 11 Nov 2014 06:52:01 -0700 Subject: [vtkusers] Recognize a screw in a CT In-Reply-To: <1415706746162-5729432.post@n5.nabble.com> References: <1415706746162-5729432.post@n5.nabble.com> Message-ID: Hi Igor, This is something that connected component labelling can do fairly well. The procedure is as follows (roughly): 1) Find the brightness of the voxels within the screw. Find the brightness of the voxels surrounding the screw. Choose a threshold that separates them. Apply that threshold to the image to make a binary image. 2) Apply a 3D connected component labelling filter to label the objects in the binary image. 3) Identify the object that is most likely to be the screw, based on size, shape, or other characteristics. See the following website for a quick description of connected component labelling (the site describes it in 2D, but the methods works just as well in 3D): http://homepages.inf.ed.ac.uk/rbf/HIPR2/label.htm ITK has a ConnectedComponentImageFilter. For VTK, I have a vtkImageConnectivityFilter in one of my own repositories: https://github.com/dgobbi/AIRS/blob/master/ImageSegmentation/vtkImageConnectivityFilter.h - David On Tue, Nov 11, 2014 at 4:52 AM, igorznt wrote: > I have to recognize a screw in a CT an locate the point on its bases and > head. Does anyone knows how or could indicate a good material about? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lchauvin at bwh.harvard.edu Tue Nov 11 10:22:20 2014 From: lchauvin at bwh.harvard.edu (Laurent Chauvin) Date: Tue, 11 Nov 2014 10:22:20 -0500 Subject: [vtkusers] calibrate vtk camera In-Reply-To: References: Message-ID: Hello vtkusers, I have a camera (fish-eye style) and I'd like to replicate the same distortion of the camera to the virtual vtk camera. I computed distortion coefficients and camera matrix (focal length and principal point) but I'm struggling to apply these parameters to the vtk camera. I noticed there is a class called vtkWarpLens, that seems to take all these parameters (distortion, focal length, principal point, etc...). However, it seems it cannot be applied on a vtkCamera (it seems to require an image as input). Does anyone did something like that before ? Thank you. -Laurent On Wed, Nov 5, 2014 at 10:23 AM, Laurent Chauvin wrote: > Hello vtkusers, > > I'm trying to calibration a vtk camera so it has the same properties and > deformation as my real camera. > I used OpenCV to do the camera calibration and obtain the intrinsic > parameters. > > I applied the focal distance to the vtk camera and the view angle, but now > I'm wondering how to apply the principal point (optical center) to the vtk > camera. > > I saw there were some topics about it, but none of them really gave a > clear answer. > > Thank you. > -Laurent > > -- Laurent Chauvin, MS Surgical Navigation and Robotics Laboratory, Radiology Department Brigham And Women's Hospital, Harvard Medical School http://wiki.ncigt.org/index.php/User:Lchauvin -------------- next part -------------- An HTML attachment was scrubbed... URL: From abruss at awrcorp.com Tue Nov 11 12:28:28 2014 From: abruss at awrcorp.com (Adam Bruss) Date: Tue, 11 Nov 2014 17:28:28 +0000 Subject: [vtkusers] Why does deletion of vtkpolydatamapper cause an infinite loop in vtkclearopenglerrors? In-Reply-To: References: Message-ID: We fixed the problem by recompiling VTK with VTK_REPORT_OPENGL_ERRORS turned off. Thanks, Adam -----Original Message----- From: Bill Lorensen [mailto:bill.lorensen at gmail.com] Sent: Friday, November 7, 2014 3:13 PM To: Adam Bruss Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Why does deletion of vtkpolydatamapper cause an infinite loop in vtkclearopenglerrors? If you can provide a small compilable example that illustrates the problem, I'm sure someone can help. On Fri, Nov 7, 2014 at 4:04 PM, Adam Bruss wrote: > Hello, > > We have a WinForms c++/cli CAD based application that uses VTK 6.1. > One of the application's features is playing a script which plays back > operations the user had previously done interactively. We pop a modal > progress form while the script is playing and do the non-ui work of > the script in a background thread. Part of the work of the background > thread is creating and deleting vtkPolyDataMappers. While the > background thread is going and the progress form is showing we need to > update a display in the main thread by calling vtkWin32RenderWindowInteractor::Render(). > > We have a timer setup so Render is called every few hundred > milliseconds at most in a UserControl::OnPaint event handler. This > allows the view to update while the script is playing giving the user feedback. > > This used to work in VTK 5. But now an infinite loop happens upon > deletion of a vtkPolyDataMapper in the background thread. The infinite > loop is in > vtkClearOpenGLErrors: > > void vtkClearOpenGLErrors() > > { > > while (glGetError()!=GL_NO_ERROR){;} > > } > > Inside the vtkpolydatamapper is a vtkOpenGLDisplayListPainter. When > this gets deleted by vtkGarbageCollectorImpl::CollectInternal we get > stuck in vtkClearOpenGLErrors. > > Does anyone have experience with VTK and threading that could help? Do > you know anything about this? It's only an apparent problem in VTK > 6.1. Is it illegal to have the main UI thread calling Render on a > vtkWin32RenderWindowInteractor while a background thread is doing > deletes on a vtkPolyDataMapper? It isn't a timing issue. I think it > might be an OpenGL context issue but not sure how to fix it. The > problem does go away if we avoid calling Render on the display while > the background thread is going but we'd like to give the user feedback while the script is playing. > > Thanks, > > Adam > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Tue Nov 11 12:50:07 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 11 Nov 2014 12:50:07 -0500 Subject: [vtkusers] Why does deletion of vtkpolydatamapper cause an infinite loop in vtkclearopenglerrors? In-Reply-To: References: Message-ID: This was fixed last April and will be in the next release: commit 4f30bff38137241ecb8cdda89db9948e42f9cba3 Author: Bill Lorensen Date: Tue Apr 15 10:37:44 2014 -0400 COMP: Guard against infinite loop in vtkClearOpenGLErrors Some platforms/drivers do not properly clear the error flags after a call to glGetError(). This can lead to an infinite loop. This patch limits the number of calls to glGetError() to a user provided value or a default (16). Thanks to Richard Whitehead and Marco Sambin for reporting the problem. Change-Id: Ie63bec0b47cc6c8047cedf615c4c65f9bcdd30aa On Tue, Nov 11, 2014 at 12:28 PM, Adam Bruss wrote: > We fixed the problem by recompiling VTK with > > VTK_REPORT_OPENGL_ERRORS > > turned off. > > Thanks, > Adam > > -----Original Message----- > From: Bill Lorensen [mailto:bill.lorensen at gmail.com] > Sent: Friday, November 7, 2014 3:13 PM > To: Adam Bruss > Cc: vtkusers at vtk.org > Subject: Re: [vtkusers] Why does deletion of vtkpolydatamapper cause an infinite loop in vtkclearopenglerrors? > > If you can provide a small compilable example that illustrates the problem, I'm sure someone can help. > > > On Fri, Nov 7, 2014 at 4:04 PM, Adam Bruss wrote: >> Hello, >> >> We have a WinForms c++/cli CAD based application that uses VTK 6.1. >> One of the application's features is playing a script which plays back >> operations the user had previously done interactively. We pop a modal >> progress form while the script is playing and do the non-ui work of >> the script in a background thread. Part of the work of the background >> thread is creating and deleting vtkPolyDataMappers. While the >> background thread is going and the progress form is showing we need to >> update a display in the main thread by calling vtkWin32RenderWindowInteractor::Render(). >> >> We have a timer setup so Render is called every few hundred >> milliseconds at most in a UserControl::OnPaint event handler. This >> allows the view to update while the script is playing giving the user feedback. >> >> This used to work in VTK 5. But now an infinite loop happens upon >> deletion of a vtkPolyDataMapper in the background thread. The infinite >> loop is in >> vtkClearOpenGLErrors: >> >> void vtkClearOpenGLErrors() >> >> { >> >> while (glGetError()!=GL_NO_ERROR){;} >> >> } >> >> Inside the vtkpolydatamapper is a vtkOpenGLDisplayListPainter. When >> this gets deleted by vtkGarbageCollectorImpl::CollectInternal we get >> stuck in vtkClearOpenGLErrors. >> >> Does anyone have experience with VTK and threading that could help? Do >> you know anything about this? It's only an apparent problem in VTK >> 6.1. Is it illegal to have the main UI thread calling Render on a >> vtkWin32RenderWindowInteractor while a background thread is doing >> deletes on a vtkPolyDataMapper? It isn't a timing issue. I think it >> might be an OpenGL context issue but not sure how to fix it. The >> problem does go away if we avoid calling Render on the display while >> the background thread is going but we'd like to give the user feedback while the script is playing. >> >> Thanks, >> >> Adam >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From dave.demarle at kitware.com Tue Nov 11 22:50:17 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 11 Nov 2014 22:50:17 -0500 Subject: [vtkusers] vtkHardwareSelector Can't work with vtkUnstructuredGrid data? In-Reply-To: <15509cd1.149ac.149a2151e3d.Coremail.xjtuzxl@163.com> References: <1b69711e.daf6.149983ef24f.Coremail.xjtuzxl@163.com> <15509cd1.149ac.149a2151e3d.Coremail.xjtuzxl@163.com> Message-ID: I haven't seen it fail in a long time so I can not say what is wrong. In order for us to help you will have to provide a small sample of code so we can replicate the problem. ParaView uses the same hardware selector, it just has extra layers of complexity on top because of its client/server parallel render windows. Thus there must be something different in the setup it does from what your program does. hope that helps David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Nov 11, 2014 at 10:38 PM, Xianliang.Zeng wrote: > Thanks very much. > > vtkHardwareSelector seems to select point sometimes wrong, but it works > very well with cell. > Why doesn't paraview have such problem about selecting points? > > > At 2014-11-10 23:58:24, "David E DeMarle" > wrote: > > VTK won't render UnstructuredGrid (UG) directly (other than in volume > rendering) either. > > So, apply the vtkDataSetSurface (DSSF) filter to convert the outer skin of > the UG data into a vtkPolyData and render+select that. > > The PassThough*Ids methods on the DSSF are there to maintain the > correspondence of input cells to output cells so that you can figure out > what exactly was selected in the UG. > > cheers > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > On Mon, Nov 10, 2014 at 12:48 AM, Xianliang.Zeng wrote: > >> Hello >> >> I want to select cells in a vtkUnstructuredGrid data, and I created a >> vtkHardwareSelector for it. And then I found nothing can be selected. >> By the way, I test the vtkHardwareSelector with a vtkPolyData, and it >> works well. >> So, why can't vtkHardwareSelector select cells from vtkUnstructuredGrid? >> >> Best regards, >> Shane >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From xjtuzxl at 163.com Tue Nov 11 22:38:53 2014 From: xjtuzxl at 163.com (Xianliang.Zeng) Date: Wed, 12 Nov 2014 11:38:53 +0800 (CST) Subject: [vtkusers] vtkHardwareSelector Can't work with vtkUnstructuredGrid data? In-Reply-To: References: <1b69711e.daf6.149983ef24f.Coremail.xjtuzxl@163.com> Message-ID: <15509cd1.149ac.149a2151e3d.Coremail.xjtuzxl@163.com> Thanks very much. vtkHardwareSelector seems to select point sometimes wrong, but it works very well with cell. Why doesn't paraview have such problem about selecting points? At 2014-11-10 23:58:24, "David E DeMarle" wrote: VTK won't render UnstructuredGrid (UG) directly (other than in volume rendering) either. So, apply the vtkDataSetSurface (DSSF) filter to convert the outer skin of the UG data into a vtkPolyData and render+select that. The PassThough*Ids methods on the DSSF are there to maintain the correspondence of input cells to output cells so that you can figure out what exactly was selected in the UG. cheers David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Nov 10, 2014 at 12:48 AM, Xianliang.Zeng wrote: Hello I want to select cells in a vtkUnstructuredGrid data, and I created a vtkHardwareSelector for it. And then I found nothing can be selected. By the way, I test the vtkHardwareSelector with a vtkPolyData, and it works well. So, why can't vtkHardwareSelector select cells from vtkUnstructuredGrid? Best regards, Shane _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://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://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From xjtuzxl at 163.com Wed Nov 12 00:46:42 2014 From: xjtuzxl at 163.com (Xianliang.Zeng) Date: Wed, 12 Nov 2014 13:46:42 +0800 (CST) Subject: [vtkusers] vtkHardwareSelector Can't work with vtkUnstructuredGrid data? In-Reply-To: References: <1b69711e.daf6.149983ef24f.Coremail.xjtuzxl@163.com> <15509cd1.149ac.149a2151e3d.Coremail.xjtuzxl@163.com> Message-ID: <5bf15db0.1645b.149a28a2413.Coremail.xjtuzxl@163.com> Thanks again. I made a simple test code, and it's attached. In the test, when moving the mouse, the point under the mouse should be selected, which annotated by a small red ball. My test result is: sometime the selected point is not under the mouse, but appears elsewhere on the model. Best regards, Shane At 2014-11-12 11:50:17, "David E DeMarle" wrote: I haven't seen it fail in a long time so I can not say what is wrong. In order for us to help you will have to provide a small sample of code so we can replicate the problem. ParaView uses the same hardware selector, it just has extra layers of complexity on top because of its client/server parallel render windows. Thus there must be something different in the setup it does from what your program does. hope that helps David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Nov 11, 2014 at 10:38 PM, Xianliang.Zeng wrote: Thanks very much. vtkHardwareSelector seems to select point sometimes wrong, but it works very well with cell. Why doesn't paraview have such problem about selecting points? At 2014-11-10 23:58:24, "David E DeMarle" wrote: VTK won't render UnstructuredGrid (UG) directly (other than in volume rendering) either. So, apply the vtkDataSetSurface (DSSF) filter to convert the outer skin of the UG data into a vtkPolyData and render+select that. The PassThough*Ids methods on the DSSF are there to maintain the correspondence of input cells to output cells so that you can figure out what exactly was selected in the UG. cheers David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Nov 10, 2014 at 12:48 AM, Xianliang.Zeng wrote: Hello I want to select cells in a vtkUnstructuredGrid data, and I created a vtkHardwareSelector for it. And then I found nothing can be selected. By the way, I test the vtkHardwareSelector with a vtkPolyData, and it works well. So, why can't vtkHardwareSelector select cells from vtkUnstructuredGrid? Best regards, Shane _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://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://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: TestHardwareSelector2.cpp URL: From karsten.tausche at student.hpi.uni-potsdam.de Wed Nov 12 11:01:44 2014 From: karsten.tausche at student.hpi.uni-potsdam.de (Karsten Tausche) Date: Wed, 12 Nov 2014 17:01:44 +0100 Subject: [vtkusers] Missing update extent request in vtkExtractVOI? In-Reply-To: References: <54391E4E.8050907@student.hpi.uni-potsdam.de> <543AC335.2040607@student.hpi.uni-potsdam.de> Message-ID: <54638468.3010004@student.hpi.uni-potsdam.de> Hi, any news about that topic? I need to change the sampling rate of an image dynamically. Are there any other ways to achieve this? Best regards, Karsten On 2014-10-13 16:16, Berk Geveci wrote: > We completely rewrote vtkExtractVOI a few months ago and it doesn't > look like we didn't do a great job in fully evaluating it. I will > spend some quality time with it in the next few weeks. > > Best, > -berk > > On Sun, Oct 12, 2014 at 2:06 PM, Karsten Tausche > > wrote: > > I just realized that calling SetUpdateExtentToWholeExtent() on a > downstream algorithm (polyData in the example code) "fixes" this > error. > > > On 2014-10-11 14:10, Karsten Tausche wrote: >> Hi everyone, >> >> I tried to use vtkExtractVOI to decrease the resolution of a >> vtkImageData/vtkStructuredPoints data set. This works fine when I >> set the sample rate before I connect the filter to the pipeline. >> But changing the sample rate while rendering always results in an >> error like this: >> >> "ERROR: In >> ..\..\..\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, >> line 857 >> vtkCompositeDataPipeline (0000000005D6E1A0): The update extent >> specified in the information for output port 0 on algorithm >> vtkExtractVOI(0000000005D92710) is 0 10 0 10 0 0, which is >> outside the whole extent 0 9 0 10 0 0." >> >> This behavior also depends on the initial sample rate. With the >> defaults (1, 1, 1), the error message pops up after changing the >> rate, and the filter seems produce the expected result. When I >> set different initial values and increase them while rendering, I >> get the error message above, but the filter result seems correct. >> When decreasing the sample rate, I don't get an error, but the >> filter decreases the size of the rendered image. >> >> I'm using the current VTK master. I appended a small example the >> produces this error; it doesn't render any visible points but I >> didn't know how to enforce the required updates without adding >> the filter to a rendering pipeline. >> >> BTW the error also occurs with vtkStructuredGrid+vtkExtractGrid. >> >> Thanks, >> Karsten >> >> >> >> _______________________________________________ >> Powered bywww.kitware.com >> >> Visit other Kitware open-source projects athttp://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://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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Wed Nov 12 13:33:35 2014 From: totte at dunescientific.com (Totte Karlsson) Date: Wed, 12 Nov 2014 10:33:35 -0800 Subject: [vtkusers] vtkFollower Message-ID: <5463A7FF.3080500@dunescientific.com> Hello, I have an application that are using vtk (6.2) trough a custom static library (vtk linked to this one and built static too). In a scene rendered I have some vtk followers and everything works fine when interacting with the scene. However, when I build my intermediate library as DLL (vtk still static), everything works except that the vtkFollowers don't work properly. With properly I mean they do only face the camera sometimes and 'sporadically'. Anyone seen this behavior? any ideas? I'm using CodeGear XE3 compiler on windows. tk From totte at dunescientific.com Wed Nov 12 15:06:40 2014 From: totte at dunescientific.com (Totte Karlsson) Date: Wed, 12 Nov 2014 12:06:40 -0800 Subject: [vtkusers] vtkFollower In-Reply-To: <5463A7FF.3080500@dunescientific.com> References: <5463A7FF.3080500@dunescientific.com> Message-ID: <5463BDD0.2010509@dunescientific.com> I meant vtk version 6.1 , tk On 11/12/2014 10:33 AM, Totte Karlsson wrote: > Hello, > I have an application that are using vtk (6.2) trough a custom static > library (vtk linked to this one and built static too). > In a scene rendered I have some vtk followers and everything works > fine when interacting with the scene. > > However, when I build my intermediate library as DLL (vtk still > static), everything works except that the vtkFollowers don't work > properly. With properly I mean they do only face the camera sometimes > and 'sporadically'. > > Anyone seen this behavior? any ideas? > > I'm using CodeGear XE3 compiler on windows. > > tk > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers -- ......................... Totte Karlsson, Ph.D. Dune Scientific, LLC 425-296 1980 (office) 425-780 9648 (cell) www.dunescientific.com ......................... From flair.liu at gmail.com Wed Nov 12 15:26:01 2014 From: flair.liu at gmail.com (liu jianfei) Date: Wed, 12 Nov 2014 15:26:01 -0500 Subject: [vtkusers] vtkDelaunay3D Message-ID: Dear all I am using vtkDelaunay3D filter to create a mesh surface. However, the input points for vtkDelaunay3D will be dynamically changed. Please see the attached code. void radCanvas::SetLocalParetoPoints(vector & pts) { //LocalParetoPoints is defined as vtkPoints LocalParetoPoints->Initialize(); LocalParetoPoints->SetNumberOfPoints(pts.size()); for (int i=0; iSetPoint(i, pts.at(i).x, pts.at(i).y, pts.at (i).z); //LocalParetoPoly is defined as vtkPolyData LocalParetoPoly->Modified(); //LocalParetoDelaunay is defined as vtkDelaunay3D LocalParetoDelaunay->SetInputConnection(LocalParetoPoly->GetProducerPort()); //LocalParetoFilter is defined as vtkDataSetSurfaceFilter LocalParetoFilter->SetInputConnection(LocalParetoDelaunay->GetOutputPort()); LocalParetoFilter->Modified(); LocalParetoFilter->Update(); } For the first time when this program is imported with a set of 3d points, the program is working very well. However, if I modified points and imported into this function again, the program will be crashed. I attached the errors in the below where the program stopped at the line highlighted in red. I have checked a few local variables, where closestPoint = -1 and *cells is not defined. //============================================================== vtkIdType vtkDelaunay3D::FindEnclosingFaces(double x[3], vtkUnstructuredGrid *Mesh, vtkIdList *tetras, vtkIdList *faces, vtkIncrementalPointLocator *locator) { vtkIdType tetraId, i, numTetras; int j, insertFace; vtkIdType p1, p2, p3, nei; int hasNei; vtkIdType *tetraPts, npts; vtkIdType closestPoint; double xd[3]; xd[0]=x[0]; xd[1]=x[1]; xd[2]=x[2]; // Start off by finding closest point and tetras that use the point. // This will serve as the starting point to determine an enclosing // tetrahedron. (We just need a starting point if ( locator->IsInsertedPoint(x) >= 0 ) { this->NumberOfDuplicatePoints++; return 0; } closestPoint = locator->FindClosestInsertedPoint(x); vtkCellLinks *links = Mesh->GetCellLinks(); int numCells = links->GetNcells(closestPoint); vtkIdType *cells = links->GetCells(closestPoint); if ( numCells <= 0 ) //shouldn't happen { this->NumberOfDegeneracies++; return 0; } else { *tetraId = cells[0];* } // Okay, walk towards the containing tetrahedron tetraId = this->FindTetra(Mesh,xd,tetraId,0); if ( tetraId < 0 ) { this->NumberOfDegeneracies++; return 0; } //============================================================== Can anyone tell me how to fix this issue? Thank you. -- Sincerely Jianfei Liu -------------- next part -------------- An HTML attachment was scrubbed... URL: From zlvlezhnin at gmail.com Thu Nov 13 04:48:49 2014 From: zlvlezhnin at gmail.com (=?UTF-8?B?0JXQstCz0LXQvdC40Lkg0JvQtdC20L3QuNC9?=) Date: Thu, 13 Nov 2014 16:48:49 +0700 Subject: [vtkusers] VTK6 OpenGL Error Message-ID: I keep getting this error, then calling render in VTK6 : ERROR: In ..\..\..\Rendering\OpenGL\vtkOpenGLDisplayListPainter.cxx, line 188 vtkOpenGLDisplayListPainter (0000000006146D80): failed after RenderInternal 1 OpenGL errors detected 0 : (1280) Invalid enum My VTK_DEFINITIONS variable: vtkRenderingContext2D_AUTOINIT=1(vtkRenderingContextOpenGL);vtkRenderingCore_AUTOINIT=4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL);vtkRenderingVolume_AUTOINIT=1(vtkRenderingVolumeOpenGL) Maybe I have to change VTK_DEFINITIONS? There wasn't any errors in VTK5. -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Thu Nov 13 06:48:27 2014 From: DLRdave at aol.com (David Cole) Date: Thu, 13 Nov 2014 06:48:27 -0500 Subject: [vtkusers] vtkFollower In-Reply-To: <5463BDD0.2010509@dunescientific.com> References: <5463A7FF.3080500@dunescientific.com> <5463BDD0.2010509@dunescientific.com> Message-ID: Do you reference (link to) VTK from multiple DLLs, or just the one? On Wed, Nov 12, 2014 at 3:06 PM, Totte Karlsson wrote: > I meant vtk version 6.1 , > tk > > On 11/12/2014 10:33 AM, Totte Karlsson wrote: >> >> Hello, >> I have an application that are using vtk (6.2) trough a custom static >> library (vtk linked to this one and built static too). >> In a scene rendered I have some vtk followers and everything works fine >> when interacting with the scene. >> >> However, when I build my intermediate library as DLL (vtk still static), >> everything works except that the vtkFollowers don't work properly. With >> properly I mean they do only face the camera sometimes and 'sporadically'. >> >> Anyone seen this behavior? any ideas? >> >> I'm using CodeGear XE3 compiler on windows. >> >> tk >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://public.kitware.com/mailman/listinfo/vtkusers > > > -- > ......................... > Totte Karlsson, Ph.D. > Dune Scientific, LLC > 425-296 1980 (office) > 425-780 9648 (cell) > www.dunescientific.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From li76pan at hotmail.com Thu Nov 13 10:14:44 2014 From: li76pan at hotmail.com (LiPan) Date: Thu, 13 Nov 2014 23:14:44 +0800 Subject: [vtkusers] Mixed Color with Depth Peeling: Solved In-Reply-To: References: Message-ID: Hi all, I solved the problem. The trick is, vtkOpenGLTexture set the flag useTexture (used in vtkDepthPeeling_fs.glsl) to true and does not reset to zero again. This will map the same texture image to the following polygon data which actually does not use texture mapping. So I reset the flag to zero before a new actor is drawn in function vtkRenderer::UpdateTranslucentPolygonalGeometry(). This is only a quick and dirty solution of cause. regards Pan From: li76pan at hotmail.com To: vtkusers at vtk.org Date: Mon, 10 Nov 2014 21:17:39 +0800 Subject: [vtkusers] Mixed Color with Depth Peeling Dear all, I was trying to use Depth Peeling to display several translucent polydata in one 3D scene. The problem is, if their colors are set with SetColor, everything works fine. However, if texture mapping is applied to one of the polygon, the colors of the rest polydata are mixed up with color of this texture map. In the attached simplified example code, I was trying to create two polydata. One is quad, the other is cube. Quad got a texture which is loaded from a jpg file. The image is nothing more than a square of red color. The color of cube is white. Opacity of both were set to 0.5. So, if you run the program, you'll see the cube polygon becomes red which comes from the texture image. I'm using vtk6.0 under Kubunto 12.04. glxinfo shows OpenGL version string: 4.4.0 NVIDIA 331.38. I've read the paper of Depth Peeling by Cass Everitt. Still couldn't understand where the problem comes from. Could anyone give me a hint? Thank you Pan _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://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://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Thu Nov 13 11:35:15 2014 From: vsh at magellium.fr (Vincent32160) Date: Thu, 13 Nov 2014 09:35:15 -0700 (MST) Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> <1415282753706-5729393.post@n5.nabble.com> <1415370574070-5729402.post@n5.nabble.com> Message-ID: <1415896515919-5729459.post@n5.nabble.com> Hi David, I am still trying to unwrapped my cylinder. Unfortunately I don't get what you mean by "you can select one "radius" slice for viewing". Should I use a vtkImageViewer2 to do it? Another question: I would like also to unwrap cylinder which don't have the same center as the original cylinder. Is that possible with vtkImageReslice? Thanks a lot. David Gobbi wrote > Hi Vincent, > > The input to vtkImageReslice should be the original image > (before either stencil has been applied). In order for > vtkImageReslice to do the interpolation properly, it must > have neighbor voxels for each voxel it extracts. After it > has unwrapped the whole cylinder, you can select one > "radius" slice for viewing. > > With vtkImageReslice, you _must_ specify what output > sampling you want. Use SetOutputSpacing() to set the > radius, circumferential angle, and longitudinal sample > spacings. Also use SetOutputExtent() to set the > number of samples for each. > > I may have been wrong about having to invert the > transform. Try feeding it in without GetInverse(). > > Also, for the transform to work properly, the input image must > be centered. After all, in cylindrical coordinates the assuption > is that (0,0,0) is at the center of the cylinder. The filter > vtkImageChangeInformation can center the image (i.e. put > vtkImageChangeInformation with CenterImageOn() before > vtkImageReslice). > > Good luck, > > - David > > > On Fri, Nov 7, 2014 at 7:29 AM, Vincent32160 < > vsh@ > > wrote: > >> I now have a tube of data. On the right, you see stencilFiltrer2, the >> result >> of two vtkROIStencilSource (the first to remove the outer voxels and the >> second the inner) >> <http://vtk.1045678.n5.nabble.com/file/n5729402/output3.png> >> >> I try to use vtkCylindricalTransform and vtkImageReslice to unwrap the >> tube >> and I don't get the result I want. Could you help? >> >> //Image Reslice >> vtkCylindricalTransform * cylTransform = vtkCylindricalTransform::New(); >> >> vtkImageReslice * imageReslice = vtkImageReslice::New(); >> imageReslice->SetInputConnection(stencilFilter2->GetOutputPort()); >> imageReslice->SetResliceTransform(cylTransform->GetInverse()); >> imageReslice->Update(); >> >> // Create volume >> vtkSmartPointer > > outputOpacity = >> vtkSmartPointer > > ::New(); >> outputOpacity->AddPoint(-1000, 1.0); >> outputOpacity->AddPoint(3000, 0.0); >> >> // Create volume mapper >> vtkVolumeRayCastMapper * imageMapper3d = vtkVolumeRayCastMapper::New(); >> imageMapper3d->SetInputConnection(imageReslice->GetOutputPort()); >> imageMapper3d->SetVolumeRayCastFunction(rayCastFunction); >> >> // Volume property >> vtkSmartPointer > > outputVolumeProperty = >> vtkSmartPointer > > ::New(); >> outputVolumeProperty->SetScalarOpacity(outputOpacity); >> outputVolumeProperty->SetInterpolationTypeToLinear(); >> outputVolumeProperty->ShadeOn(); >> >> // Displayed volume >> vtkSmartPointer > > extractedVol = >> vtkSmartPointer > > ::New(); >> extractedVol->SetMapper(imageMapper3d); >> extractedVol->SetProperty(outputVolumeProperty); >> >> Thanks >> >> >> David Gobbi wrote >> > Hi Vincent, >> > >> > Use an opacity transfer function that makes the black voxels >> transparent. >> > >> > You can unwrap the tube by reslicing it through an inverse cylindrical >> > transformation (e.g. vtkCylindricalTransform and vtkImageReslice). >> > >> > - David >> > >> > On Thu, Nov 6, 2014 at 7:05 AM, Vincent32160 < >> >> > vsh@ >> >> > > wrote: >> > >> >> Thanks again David! >> >> >> >> As I want to keep a volume I chose solution 2. >> >> I used a volume mapper and the result is pretty good. >> >> The only problem is that I am not able to remove the black voxels >> around >> >> the >> >> cylinder. (See picture) >> >> <http://vtk.1045678.n5.nabble.com/file/n5729393/output2.png> >> >> >> >> The next step of my approach is to be able to keep only the voxels on >> the >> >> edges (meaning on a tube or hollow cylinder of 1-voxel thickness). And >> >> after >> >> that I would like to unfold the tube and have a flat surface of >> pixels. >> >> Let me know if you think that it is better to create a new thread for >> >> these >> >> two next steps. >> >> >> >> Thanks for your help. >> >> >> >> Vincent >> >> >> >> >> >> >> >> >> >> -- >> >> View this message in context: >> >> >> http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729393.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 >> >> >> >> 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 >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729402.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 >> >> 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- View this message in context: http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729459.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Thu Nov 13 11:58:25 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 13 Nov 2014 09:58:25 -0700 Subject: [vtkusers] Extract a tube of data from DICOM series data In-Reply-To: <1415896515919-5729459.post@n5.nabble.com> References: <1415206096618-5729381.post@n5.nabble.com> <1415270207505-5729390.post@n5.nabble.com> <1415282753706-5729393.post@n5.nabble.com> <1415370574070-5729402.post@n5.nabble.com> <1415896515919-5729459.post@n5.nabble.com> Message-ID: On Thu, Nov 13, 2014 at 9:35 AM, Vincent32160 wrote: > Hi David, > I am still trying to unwrapped my cylinder. > Unfortunately I don't get what you mean by "you can select one > "radius" slice for viewing". Should I use a vtkImageViewer2 to do it? > When the cylinder has been unwrapped (via vtkImageReslice and a vtkCylindricalTransform), you get a volume where the coordinates are (r,theta,z). So, yes, you could set the orientation of vtkImageViewer2 so that it extracts slices along the first axis instead of along the third axis. Or you could set the OutputExtent of vtkImageReslice so that it only produces the single "r" slice that you want. > Another question: I would like also to unwrap cylinder which don't have the > same center as the original cylinder. Is that possible with > vtkImageReslice? Yes. Use vtkImageChangeInformation's SetOutputOrigin() method to adjust the input image, instead of using CenterImageOn(). This will allow you to put the center of the cylinder anywhere you want. In VTK, the "Origin" of the image means the position, in physical coordinates, of the first voxel. So if you know what voxel you want to be at the center of the cylinder, you can use algebra to compute how to set the Origin so that the physical coordinates of that voxel are (0,0,0). Drawing diagrams helps. - David > David Gobbi wrote > > Hi Vincent, > > > > The input to vtkImageReslice should be the original image > > (before either stencil has been applied). In order for > > vtkImageReslice to do the interpolation properly, it must > > have neighbor voxels for each voxel it extracts. After it > > has unwrapped the whole cylinder, you can select one > > "radius" slice for viewing. > > > > With vtkImageReslice, you _must_ specify what output > > sampling you want. Use SetOutputSpacing() to set the > > radius, circumferential angle, and longitudinal sample > > spacings. Also use SetOutputExtent() to set the > > number of samples for each. > > > > I may have been wrong about having to invert the > > transform. Try feeding it in without GetInverse(). > > > > Also, for the transform to work properly, the input image must > > be centered. After all, in cylindrical coordinates the assuption > > is that (0,0,0) is at the center of the cylinder. The filter > > vtkImageChangeInformation can center the image (i.e. put > > vtkImageChangeInformation with CenterImageOn() before > > vtkImageReslice). > > > > Good luck, > > > > - David > > > > > > On Fri, Nov 7, 2014 at 7:29 AM, Vincent32160 < > > > vsh@ > > > > wrote: > > > >> I now have a tube of data. On the right, you see stencilFiltrer2, the > >> result > >> of two vtkROIStencilSource (the first to remove the outer voxels and the > >> second the inner) > >> <http://vtk.1045678.n5.nabble.com/file/n5729402/output3.png> > >> > >> I try to use vtkCylindricalTransform and vtkImageReslice to unwrap the > >> tube > >> and I don't get the result I want. Could you help? > >> > >> //Image Reslice > >> vtkCylindricalTransform * cylTransform = vtkCylindricalTransform::New(); > >> > >> vtkImageReslice * imageReslice = vtkImageReslice::New(); > >> imageReslice->SetInputConnection(stencilFilter2->GetOutputPort()); > >> imageReslice->SetResliceTransform(cylTransform->GetInverse()); > >> imageReslice->Update(); > >> > >> // Create volume > >> vtkSmartPointer > > > > outputOpacity = > >> vtkSmartPointer > > > > ::New(); > >> outputOpacity->AddPoint(-1000, 1.0); > >> outputOpacity->AddPoint(3000, 0.0); > >> > >> // Create volume mapper > >> vtkVolumeRayCastMapper * imageMapper3d = vtkVolumeRayCastMapper::New(); > >> imageMapper3d->SetInputConnection(imageReslice->GetOutputPort()); > >> imageMapper3d->SetVolumeRayCastFunction(rayCastFunction); > >> > >> // Volume property > >> vtkSmartPointer > > > > outputVolumeProperty = > >> vtkSmartPointer > > > > ::New(); > >> outputVolumeProperty->SetScalarOpacity(outputOpacity); > >> outputVolumeProperty->SetInterpolationTypeToLinear(); > >> outputVolumeProperty->ShadeOn(); > >> > >> // Displayed volume > >> vtkSmartPointer > > > > extractedVol = > >> vtkSmartPointer > > > > ::New(); > >> extractedVol->SetMapper(imageMapper3d); > >> extractedVol->SetProperty(outputVolumeProperty); > >> > >> Thanks > >> > >> > >> David Gobbi wrote > >> > Hi Vincent, > >> > > >> > Use an opacity transfer function that makes the black voxels > >> transparent. > >> > > >> > You can unwrap the tube by reslicing it through an inverse cylindrical > >> > transformation (e.g. vtkCylindricalTransform and vtkImageReslice). > >> > > >> > - David > >> > > >> > On Thu, Nov 6, 2014 at 7:05 AM, Vincent32160 < > >> > >> > vsh@ > >> > >> > > wrote: > >> > > >> >> Thanks again David! > >> >> > >> >> As I want to keep a volume I chose solution 2. > >> >> I used a volume mapper and the result is pretty good. > >> >> The only problem is that I am not able to remove the black voxels > >> around > >> >> the > >> >> cylinder. (See picture) > >> >> <http://vtk.1045678.n5.nabble.com/file/n5729393/output2.png> > >> >> > >> >> The next step of my approach is to be able to keep only the voxels on > >> the > >> >> edges (meaning on a tube or hollow cylinder of 1-voxel thickness). > And > >> >> after > >> >> that I would like to unfold the tube and have a flat surface of > >> pixels. > >> >> Let me know if you think that it is better to create a new thread for > >> >> these > >> >> two next steps. > >> >> > >> >> Thanks for your help. > >> >> > >> >> Vincent > >> >> > >> >> > >> >> > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> > http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729393.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 > >> >> > >> >> 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 > >> > > >> > Follow this link to subscribe/unsubscribe: > >> > http://public.kitware.com/mailman/listinfo/vtkusers > >> > >> > >> > >> > >> > >> -- > >> View this message in context: > >> > http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729402.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 > >> > >> 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 > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Extract-a-tube-of-data-from-DICOM-series-data-tp5729381p5729459.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Thu Nov 13 11:58:30 2014 From: berk.geveci at kitware.com (Berk Geveci) Date: Thu, 13 Nov 2014 11:58:30 -0500 Subject: [vtkusers] Missing update extent request in vtkExtractVOI? In-Reply-To: <54638468.3010004@student.hpi.uni-potsdam.de> References: <54391E4E.8050907@student.hpi.uni-potsdam.de> <543AC335.2040607@student.hpi.uni-potsdam.de> <54638468.3010004@student.hpi.uni-potsdam.de> Message-ID: We are still working on this. Meanwhile, you can use vtkImageResample. Best, -berk On Wed, Nov 12, 2014 at 11:01 AM, Karsten Tausche < karsten.tausche at student.hpi.uni-potsdam.de> wrote: > Hi, > > any news about that topic? > I need to change the sampling rate of an image dynamically. Are there any > other ways to achieve this? > > Best regards, > Karsten > > > On 2014-10-13 16:16, Berk Geveci wrote: > > We completely rewrote vtkExtractVOI a few months ago and it doesn't look > like we didn't do a great job in fully evaluating it. I will spend some > quality time with it in the next few weeks. > > Best, > -berk > > On Sun, Oct 12, 2014 at 2:06 PM, Karsten Tausche < > karsten.tausche at student.hpi.uni-potsdam.de> wrote: > >> I just realized that calling SetUpdateExtentToWholeExtent() on a >> downstream algorithm (polyData in the example code) "fixes" this error. >> >> >> On 2014-10-11 14:10, Karsten Tausche wrote: >> >> Hi everyone, >> >> I tried to use vtkExtractVOI to decrease the resolution of a >> vtkImageData/vtkStructuredPoints data set. This works fine when I set the >> sample rate before I connect the filter to the pipeline. But changing the >> sample rate while rendering always results in an error like this: >> >> "ERROR: In >> ..\..\..\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, line >> 857 >> vtkCompositeDataPipeline (0000000005D6E1A0): The update extent specified >> in the information for output port 0 on algorithm >> vtkExtractVOI(0000000005D92710) is 0 10 0 10 0 0, which is outside the >> whole extent 0 9 0 10 0 0." >> >> This behavior also depends on the initial sample rate. With the defaults >> (1, 1, 1), the error message pops up after changing the rate, and the >> filter seems produce the expected result. When I set different initial >> values and increase them while rendering, I get the error message above, >> but the filter result seems correct. When decreasing the sample rate, I >> don't get an error, but the filter decreases the size of the rendered >> image. >> >> I'm using the current VTK master. I appended a small example the produces >> this error; it doesn't render any visible points but I didn't know how to >> enforce the required updates without adding the filter to a rendering >> pipeline. >> >> BTW the error also occurs with vtkStructuredGrid+vtkExtractGrid. >> >> Thanks, >> Karsten >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://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://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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Nov 13 12:28:06 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 13 Nov 2014 10:28:06 -0700 Subject: [vtkusers] Missing update extent request in vtkExtractVOI? In-Reply-To: References: <54391E4E.8050907@student.hpi.uni-potsdam.de> <543AC335.2040607@student.hpi.uni-potsdam.de> <54638468.3010004@student.hpi.uni-potsdam.de> Message-ID: For resampling images, there's also vtkImageResize, which is much faster if you need to interpolate while resampling: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ResizeImage It provides three choices for choosing the output sampling: 1) SetResizeMethodToOutputSpacing() allows you directly select the sample spacing (in physical units) 2) SetResizeMethodToMagnificationFactors() allows you to select a factor by which to resample 3) SetResizeMethodToOutputDimensions() allows you to choose the size of the output grid The main advantage of this filter is that it is O(n) with respect to the interpolation kernel size, whereas vtkImageResample is O(n^3). Of course, for nearest-neighbor interpolation (e.g. decimation) it makes no difference, but for sinc interpolation (n=6 or higher) it makes a huge difference. For completeness, there is also vtkImageShrink3D for simple image decimation. - David On Thu, Nov 13, 2014 at 9:58 AM, Berk Geveci wrote: > We are still working on this. > > Meanwhile, you can use vtkImageResample. > > Best, > -berk > > On Wed, Nov 12, 2014 at 11:01 AM, Karsten Tausche < > karsten.tausche at student.hpi.uni-potsdam.de> wrote: > >> Hi, >> >> any news about that topic? >> I need to change the sampling rate of an image dynamically. Are there any >> other ways to achieve this? >> >> Best regards, >> Karsten >> >> >> On 2014-10-13 16:16, Berk Geveci wrote: >> >> We completely rewrote vtkExtractVOI a few months ago and it doesn't look >> like we didn't do a great job in fully evaluating it. I will spend some >> quality time with it in the next few weeks. >> >> Best, >> -berk >> >> On Sun, Oct 12, 2014 at 2:06 PM, Karsten Tausche < >> karsten.tausche at student.hpi.uni-potsdam.de> wrote: >> >>> I just realized that calling SetUpdateExtentToWholeExtent() on a >>> downstream algorithm (polyData in the example code) "fixes" this error. >>> >>> >>> On 2014-10-11 14:10, Karsten Tausche wrote: >>> >>> Hi everyone, >>> >>> I tried to use vtkExtractVOI to decrease the resolution of a >>> vtkImageData/vtkStructuredPoints data set. This works fine when I set the >>> sample rate before I connect the filter to the pipeline. But changing the >>> sample rate while rendering always results in an error like this: >>> >>> "ERROR: In >>> ..\..\..\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, line >>> 857 >>> vtkCompositeDataPipeline (0000000005D6E1A0): The update extent specified >>> in the information for output port 0 on algorithm >>> vtkExtractVOI(0000000005D92710) is 0 10 0 10 0 0, which is outside the >>> whole extent 0 9 0 10 0 0." >>> >>> This behavior also depends on the initial sample rate. With the defaults >>> (1, 1, 1), the error message pops up after changing the rate, and the >>> filter seems produce the expected result. When I set different initial >>> values and increase them while rendering, I get the error message above, >>> but the filter result seems correct. When decreasing the sample rate, I >>> don't get an error, but the filter decreases the size of the rendered >>> image. >>> >>> I'm using the current VTK master. I appended a small example the >>> produces this error; it doesn't render any visible points but I didn't know >>> how to enforce the required updates without adding the filter to a >>> rendering pipeline. >>> >>> BTW the error also occurs with vtkStructuredGrid+vtkExtractGrid. >>> >>> Thanks, >>> Karsten >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://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://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 >>> >>> 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.m.edwards at gmail.com Thu Nov 13 13:55:20 2014 From: paul.m.edwards at gmail.com (Paul Edwards) Date: Thu, 13 Nov 2014 18:55:20 +0000 Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: Hi, I've just noticed an issue with vtkPolyData. I had been calling vtkPolyData::DeleteCell to remove the unwanted cells, followed by a call to vtkPolyData::RemoveDeletedCells. The result is not as it should be in the latest version. To fix I just started reverting previous commits. I tracked it down to the following: bugfix 14459: Iterating through polydata cells incorrectly. commit: 44131c6d05375692af8b6b38cf4291983bdd8f45 Sorry but I do not have time to provide a test case or track where in this commit lies the problem. I just thought I would give details here in case anyone else notices the same problem and is searching for a solution. Best regards, Paul From robrotheram at gmail.com Thu Nov 13 18:52:37 2014 From: robrotheram at gmail.com (Rob Rotheram) Date: Thu, 13 Nov 2014 23:52:37 +0000 Subject: [vtkusers] How to write a .VTI /VTK or raw file Message-ID: Hello Guys I need to write a vti / vtk file that can be opened in volView or paraveiw the data I need to write is generated by a custom function, wont go into the detail of the function but it effectivity outputs a scaler vector x,y,z and a magnitude between 0-0.4 I need it to be in a format that volView or paraveiw can render it as a volume or isosurface. any help be appreciative. regards Robert Fletcher From cdavid.tran at gmail.com Fri Nov 14 00:04:27 2014 From: cdavid.tran at gmail.com (eternallite2) Date: Thu, 13 Nov 2014 22:04:27 -0700 (MST) Subject: [vtkusers] QVTKWidget with Keypresses in vtkInteractorStyleTrackballCamera Message-ID: <1415941467542-5729467.post@n5.nabble.com> Hello, I have a QT form with a QVTKWidget on the form (along with other buttons/textboxes/sliders, etc.); I notice that my vtkInteractorStyleTrackballCamera's OnKeyPress() method only works when the QVTKWidget has focus. If I click on a textbox or change focus to a slider, etc. then the keyboard event is no longer triggered for the QVTKWidget. Is it possible to somehow always track the keyboard events as long as the window has focus (since I usually have to click back on the QVTKWidget for the keyboard events to be read again). Thanks again! -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-with-Keypresses-in-vtkInteractorStyleTrackballCamera-tp5729467.html Sent from the VTK - Users mailing list archive at Nabble.com. From thomas.barusseau at epita.fr Fri Nov 14 05:38:51 2014 From: thomas.barusseau at epita.fr (baruss_t) Date: Fri, 14 Nov 2014 10:38:51 +0000 Subject: [vtkusers] Append attributes from a .vtm file ? Message-ID: <1415961535647.23140@epita.fr> Hello. I use a .vtm file with a MultiBlockDataSet to group all my scalars and open them at once. However, since I use several different scalars at the same coordinates, the ? Group Dataset ? filter automatically made by the MultiBlockDataSet is not correct, it displays my scalars? as "Partials", and doesn't display them well. I noticed that grouping my datas with the ? Append Attributes ? filter works. Is there some way to do it from a .vtm file? Thanks in advance. -- Thomas Barusseau -------------- next part -------------- An HTML attachment was scrubbed... URL: From aravind.bhat at tcs.com Fri Nov 14 06:47:02 2014 From: aravind.bhat at tcs.com (Aravind Bhat) Date: Fri, 14 Nov 2014 17:17:02 +0530 Subject: [vtkusers] ITK & VTK clarifications Message-ID: Hello, We have few queries using ITK and VTK. Request your help to clarify the doubts. 1. Does ActViz.NET C# wrapper support all the C++ libraries of VTK ( for eg: widgets like vtkDistanceWidget, vtkAngleRepresentation2D, vtkImageBlend ..etc ). Which VTK version that supports ActViz.NET C# wrapper ? 2. Does SimpleITK C# wrapper support all the C++ libraries of ITK. Which i ITK version supports SimpleITK C# wrapper ? 3. Can we integrate VTK & ITK C# wrappers with WPF/WinForms ( for e.g: integrate 2D Rendering window used by vtkImageViewer on WPF/WinForms. ) ? 4. Is super imposing two different input formats ( for eg .dcm and.jpg/.png )is supported in VTK ? 5. Does VTK support all dicom formats. ( eg Dicom with reference markers for calibration ) ? 6. Is ITK & VTK are cross platform compatible for eg for use in Apple IOS. Thnx Aravind Bhat Tata Consultancy Services Mailto: aravind.bhat at tcs.com Website: http://www.tcs.com ____________________________________________ Experience certainty. IT Services Business Solutions Consulting ____________________________________________ =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From totte at dunescientific.com Fri Nov 14 14:56:37 2014 From: totte at dunescientific.com (Totte Karlsson) Date: Fri, 14 Nov 2014 11:56:37 -0800 Subject: [vtkusers] vtkFollower In-Reply-To: References: <5463A7FF.3080500@dunescientific.com> <5463BDD0.2010509@dunescientific.com> Message-ID: <54665E75.5030600@dunescientific.com> On 11/13/2014 3:48 AM, David Cole wrote: > Do you reference (link to) VTK from multiple DLLs, or just the one? There are several DLL's using the 'one' that links to the vtk libs (I call it vtk-wrapper-lib below). Hiearchy is something like this (may look weird depending on the font): application / \ DLL-A DLL-B \ / VTK-wrapper-lib | vtk static libs If the VTK wrapper lib is built as a static lib everything seem to work fine. If I build it as a shared library, on the other hand, the vtkFollowers don't work properly. I also built all vtk libs as shared libs(dlls), but that does not seem to change anything. tk > On Wed, Nov 12, 2014 at 3:06 PM, Totte Karlsson > wrote: >> I meant vtk version 6.1 , >> tk >> >> On 11/12/2014 10:33 AM, Totte Karlsson wrote: >>> Hello, >>> I have an application that are using vtk (6.2) trough a custom static >>> library (vtk linked to this one and built static too). >>> In a scene rendered I have some vtk followers and everything works fine >>> when interacting with the scene. >>> >>> However, when I build my intermediate library as DLL (vtk still static), >>> everything works except that the vtkFollowers don't work properly. With >>> properly I mean they do only face the camera sometimes and 'sporadically'. >>> >>> Anyone seen this behavior? any ideas? >>> >>> I'm using CodeGear XE3 compiler on windows. >>> >>> tk >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://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://public.kitware.com/mailman/listinfo/vtkusers >> >> -- >> ......................... >> Totte Karlsson, Ph.D. >> Dune Scientific, LLC >> 425-296 1980 (office) >> 425-780 9648 (cell) >> www.dunescientific.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 >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers -- ......................... Totte Karlsson, Ph.D. Dune Scientific, LLC 425-296 1980 (office) 425-780 9648 (cell) www.dunescientific.com ......................... From andy.bauer at kitware.com Fri Nov 14 21:59:05 2014 From: andy.bauer at kitware.com (Andy Bauer) Date: Fri, 14 Nov 2014 21:59:05 -0500 Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: Hi Paul, I was part of that fix and I think it's correct. There may have been more to that fix though since it took a couple of shots before getting it correct so the git history may not be as pristine as desired. If you can give me more specifics on the bug though I can try to see what's going on with it. If I remember correctly though, that fix had to do with the fact that some places thought that the order of iterating through cells in a vtkPolyData was first through all vertex cells, then all line cells, then all polys and finally through all triangle strips, irregardless of the order that cells got inserted in (i.e. using InsertNextCell()). The reality is that for polydata that cells are indeed iterated through in their insertion order. The test that was added for those changes hopefully shows the proper functionality along with associated cell data manipulations as well. Regards, Andy On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards wrote: > Hi, > > I've just noticed an issue with vtkPolyData. I had been calling > vtkPolyData::DeleteCell to remove the unwanted cells, followed by a > call to vtkPolyData::RemoveDeletedCells. The result is not as it > should be in the latest version. To fix I just started reverting > previous commits. I tracked it down to the following: > > bugfix 14459: Iterating through polydata cells incorrectly. > commit: 44131c6d05375692af8b6b38cf4291983bdd8f45 > > Sorry but I do not have time to provide a test case or track where in > this commit lies the problem. I just thought I would give details > here in case anyone else notices the same problem and is searching for > a solution. > > Best regards, > Paul > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Sun Nov 16 15:13:18 2014 From: DLRdave at aol.com (David Cole) Date: Sun, 16 Nov 2014 15:13:18 -0500 Subject: [vtkusers] vtkFollower In-Reply-To: <54665E75.5030600@dunescientific.com> References: <5463A7FF.3080500@dunescientific.com> <5463BDD0.2010509@dunescientific.com> <54665E75.5030600@dunescientific.com> Message-ID: This seems quite odd. I would expect everything to work as you'd expect when everything is built as DLLs (including your VTK wrapper lib and all the VTK libraries...) However, VTK does have some global state, so if you are using it in a static library, you have to make sure that the VTK static library is linked into exactly one DLL *or* directly into the application itself. If you link the static lib VTK into multiple DLLs, then each one will have its own copy of VTK's global state, and stuff that depends on the global state will not work properly if you have calls dispersed and intertwined across multiple DLLs. (Every object's "modified time," for example, is based on one little bit of VTK's global state... and many things depend on comparing modified times for multiple objects to decide what needs updating. If that gets confused, then much misbehavior will eventually follow...) In short, the rule of thumb for linking VTK is: if linking statically, also link everything that uses VTK statically all directly into the same entity, either the application or a single DLL. And if that's not feasible, then use VTK in DLL form. Does that make sense? (Although it sounds like you have problems when building VTK in DLL form, which doesn't make a lot of sense to me...) HTH, David C. On Fri, Nov 14, 2014 at 2:56 PM, Totte Karlsson wrote: > > On 11/13/2014 3:48 AM, David Cole wrote: >> >> Do you reference (link to) VTK from multiple DLLs, or just the one? > > There are several DLL's using the 'one' that links to the vtk libs (I call > it vtk-wrapper-lib below). > Hiearchy is something like this (may look weird depending on the font): > > application > / \ > DLL-A DLL-B > \ / > VTK-wrapper-lib > | > vtk static libs > > > If the VTK wrapper lib is built as a static lib everything seem to work > fine. > If I build it as a shared library, on the other hand, the vtkFollowers don't > work properly. > I also built all vtk libs as shared libs(dlls), but that does not seem to > change anything. > > tk > > >> On Wed, Nov 12, 2014 at 3:06 PM, Totte Karlsson >> wrote: >>> >>> I meant vtk version 6.1 , >>> tk >>> >>> On 11/12/2014 10:33 AM, Totte Karlsson wrote: >>>> >>>> Hello, >>>> I have an application that are using vtk (6.2) trough a custom static >>>> library (vtk linked to this one and built static too). >>>> In a scene rendered I have some vtk followers and everything works fine >>>> when interacting with the scene. >>>> >>>> However, when I build my intermediate library as DLL (vtk still static), >>>> everything works except that the vtkFollowers don't work properly. With >>>> properly I mean they do only face the camera sometimes and >>>> 'sporadically'. >>>> >>>> Anyone seen this behavior? any ideas? >>>> >>>> I'm using CodeGear XE3 compiler on windows. >>>> >>>> tk >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://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://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> -- >>> ......................... >>> Totte Karlsson, Ph.D. >>> Dune Scientific, LLC >>> 425-296 1980 (office) >>> 425-780 9648 (cell) >>> www.dunescientific.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 >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers > > > -- > ......................... > Totte Karlsson, Ph.D. > Dune Scientific, LLC > 425-296 1980 (office) > 425-780 9648 (cell) > www.dunescientific.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From fearhope at gmail.com Mon Nov 17 03:39:42 2014 From: fearhope at gmail.com (fearhope) Date: Mon, 17 Nov 2014 01:39:42 -0700 (MST) Subject: [vtkusers] CMake hangs when installing vtk 5.0.1. In-Reply-To: <002201c6a6e2$e2dde350$4e28a588@rachidcvip> References: <002201c6a6e2$e2dde350$4e28a588@rachidcvip> Message-ID: <1416213582815-5729475.post@n5.nabble.com> I have same problem even now in 2014 !! however I found how to solve this problem! just kill explorer.exe process using windows task manager. then, compile the make files using CMake. when it's done, now turn the explorer.exe back on using task manager. That's it. I guess it was caused by cl.exe/link.exe and explorer.exe while waiting responses from them. Cheers! -- View this message in context: http://vtk.1045678.n5.nabble.com/CMake-hangs-when-installing-vtk-5-0-1-tp1227463p5729475.html Sent from the VTK - Users mailing list archive at Nabble.com. From paul.m.edwards at gmail.com Mon Nov 17 04:26:01 2014 From: paul.m.edwards at gmail.com (Paul Edwards) Date: Mon, 17 Nov 2014 09:26:01 +0000 Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: Hi Andy, I've attached a sample program demonstrating the issue. The example just loads the sphere.vtk file, removes all cells where the "Result" value is not 0 and writes the result to output.vtk. The tar file also contains the correct and incorrect output. Best regards, Paul On 15 November 2014 02:59, Andy Bauer wrote: > Hi Paul, > > I was part of that fix and I think it's correct. There may have been more to > that fix though since it took a couple of shots before getting it correct so > the git history may not be as pristine as desired. If you can give me more > specifics on the bug though I can try to see what's going on with it. If I > remember correctly though, that fix had to do with the fact that some places > thought that the order of iterating through cells in a vtkPolyData was first > through all vertex cells, then all line cells, then all polys and finally > through all triangle strips, irregardless of the order that cells got > inserted in (i.e. using InsertNextCell()). The reality is that for polydata > that cells are indeed iterated through in their insertion order. The test > that was added for those changes hopefully shows the proper functionality > along with associated cell data manipulations as well. > > Regards, > Andy > > > > On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards > wrote: >> >> Hi, >> >> I've just noticed an issue with vtkPolyData. I had been calling >> vtkPolyData::DeleteCell to remove the unwanted cells, followed by a >> call to vtkPolyData::RemoveDeletedCells. The result is not as it >> should be in the latest version. To fix I just started reverting >> previous commits. I tracked it down to the following: >> >> bugfix 14459: Iterating through polydata cells incorrectly. >> commit: 44131c6d05375692af8b6b38cf4291983bdd8f45 >> >> Sorry but I do not have time to provide a test case or track where in >> this commit lies the problem. I just thought I would give details >> here in case anyone else notices the same problem and is searching for >> a solution. >> >> Best regards, >> Paul >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkDeleteCellBug.tgz Type: application/x-gzip Size: 17890 bytes Desc: not available URL: From 15891495523 at 126.com Mon Nov 17 10:25:57 2014 From: 15891495523 at 126.com (zhq) Date: Mon, 17 Nov 2014 08:25:57 -0700 (MST) Subject: [vtkusers] I have some problems when deal with key press callback Message-ID: <1416237957418-5729478.post@n5.nabble.com> Deal all : What I want to do is : make a transform on a cone when a key (whatever) is pressed . the problem I met is : the cone will disappear in the window when a transform happen . My code is : #include #include #include #include #include #include #include #include #include #include #include #include #include "vtkActor.h" #include #include #include #include #include vtkSmartPointer cone = vtkSmartPointer::New(); vtkSmartPointer iren = vtkSmartPointer::New(); vtkSmartPointer trans = vtkSmartPointer::New(); vtkSmartPointer actor1 = vtkSmartPointer::New(); vtkSmartPointer actor2 = vtkSmartPointer::New(); vtkSmartPointer mapper1 = vtkSmartPointer::New(); vtkSmartPointer mapper2 = vtkSmartPointer::New(); int x=0,y=0,z=0; void MyCallbackFunc(vtkObject * , unsigned long eid , void * clientdata , void * calldata) { x++; trans->Translate(x,y,z) ; trans->Scale(2, 3, 1); trans->RotateX(0); vtkSmartPointer transformFilter = vtkSmartPointer::New(); transformFilter->SetInputConnection(cone->GetOutputPort()); transformFilter->SetTransform(trans); transformFilter->Update(); mapper1->SetInputConnection(transformFilter->GetOutputPort()); iren->Render(); } void main() { vtkSmartPointer renWin = vtkSmartPointer::New(); vtkSmartPointer sphereSource = vtkSmartPointer::New(); sphereSource->Update(); cone->Update(); mapper1->SetInputConnection(sphereSource->GetOutputPort()); mapper1->Update(); mapper2->SetInputConnection(cone->GetOutputPort()); mapper2->Update(); actor1->SetMapper(mapper1); actor2->SetMapper(mapper2); vtkSmartPointer ren = vtkSmartPointer::New(); ren->AddActor(actor1); ren->AddActor(actor2); vtkSmartPointer style = vtkSmartPointer::New(); iren->SetInteractorStyle(style); renWin->AddRenderer(ren); renWin->SetInteractor(iren); ren->SetBackground(0.3,0.6,0.3); vtkSmartPointer KeyPressCallback = vtkSmartPointer::New(); KeyPressCallback->SetCallback(&MyCallbackFunc); iren->AddObserver(vtkCommand::KeyPressEvent,KeyPressCallback); renWin->Render(); iren->Initialize(); iren->Start(); } Thanks in advance ! Zhq -- View this message in context: http://vtk.1045678.n5.nabble.com/I-have-some-problems-when-deal-with-key-press-callback-tp5729478.html Sent from the VTK - Users mailing list archive at Nabble.com. From andrew.crozier at medunigraz.at Mon Nov 17 10:28:52 2014 From: andrew.crozier at medunigraz.at (Andrew Crozier) Date: Mon, 17 Nov 2014 16:28:52 +0100 Subject: [vtkusers] PCA on vtkImageData Message-ID: <546A1434.9020608@medunigraz.at> Hi, I am trying to evaluate the principal components of a strucutre in a 3D volume image, to determine its spatial alignment for use in an automatic processing pipeline. The input is a vtkImageData, with multiple integer values (say, 0, 1, 2 and 3), and I want to perform PCA on the positions of all voxels with value 2, for example. I have looked at vtkPCAAnalysisFilter, and this requires an input of vtkPointSet. vtkImageDataToPointSet converts a vtkImageData to a vtkStructuredGrid, however I expect this to include all points in the original image. At the moment I seem to be missing some way of filtering out the points other than those of value 2. Any help provided for this would be greatly appreciated! Best wishes, Andrew Crozier Medical University of Graz From david.gobbi at gmail.com Mon Nov 17 11:16:29 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 17 Nov 2014 09:16:29 -0700 Subject: [vtkusers] PCA on vtkImageData In-Reply-To: <546A1434.9020608@medunigraz.at> References: <546A1434.9020608@medunigraz.at> Message-ID: Hi Andrew, The vtkThreshold filter will extract only the cells with the desired scalar values, and will output them as an unstructured grid. It isn't exactly what you want because it extracts cells, rather than points, but it might be worth a shot. - David On Mon, Nov 17, 2014 at 8:28 AM, Andrew Crozier < andrew.crozier at medunigraz.at> wrote: > Hi, > > I am trying to evaluate the principal components of a strucutre in a 3D > volume image, to determine its spatial alignment for use in an automatic > processing pipeline. > > The input is a vtkImageData, with multiple integer values (say, 0, 1, 2 > and 3), and I want to perform PCA on the positions of all voxels with value > 2, for example. > > I have looked at vtkPCAAnalysisFilter, and this requires an input of > vtkPointSet. vtkImageDataToPointSet converts a vtkImageData to a > vtkStructuredGrid, however I expect this to include all points in the > original image. At the moment I seem to be missing some way of filtering > out the points other than those of value 2. > > Any help provided for this would be greatly appreciated! > > Best wishes, > Andrew Crozier > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.crozier at medunigraz.at Mon Nov 17 11:34:29 2014 From: andrew.crozier at medunigraz.at (Andrew Crozier) Date: Mon, 17 Nov 2014 17:34:29 +0100 Subject: [vtkusers] PCA on vtkImageData In-Reply-To: References: <546A1434.9020608@medunigraz.at> Message-ID: <546A2395.9010206@medunigraz.at> Hi David, Thanks for the suggestion. I looked at the vtkThreshold filer, however it appears to export the boundary of the thresholded volume, whereas I require all points inside the volume. Have you any idea of how to achieve that? BW, Andrew On 17/11/14 17:16, David Gobbi wrote: > Hi Andrew, > > The vtkThreshold filter will extract only the cells with the desired > scalar values, and will output them as an unstructured grid. It > isn't exactly what you want because it extracts cells, rather than > points, but it might be worth a shot. > > - David > > On Mon, Nov 17, 2014 at 8:28 AM, Andrew Crozier > > > wrote: > > Hi, > > I am trying to evaluate the principal components of a strucutre in > a 3D volume image, to determine its spatial alignment for use in > an automatic processing pipeline. > > The input is a vtkImageData, with multiple integer values (say, 0, > 1, 2 and 3), and I want to perform PCA on the positions of all > voxels with value 2, for example. > > I have looked at vtkPCAAnalysisFilter, and this requires an input > of vtkPointSet. vtkImageDataToPointSet converts a vtkImageData to > a vtkStructuredGrid, however I expect this to include all points > in the original image. At the moment I seem to be missing some way > of filtering out the points other than those of value 2. > > Any help provided for this would be greatly appreciated! > > Best wishes, > Andrew Crozier > -- ------------------------------------------------------------------------ *Andrew Crozier* andrew.crozier at medunigraz.at Postdoctoral Researcher Institute for Biophysics Medical University of Graz -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Nov 17 11:40:46 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 17 Nov 2014 09:40:46 -0700 Subject: [vtkusers] PCA on vtkImageData In-Reply-To: <546A2395.9010206@medunigraz.at> References: <546A1434.9020608@medunigraz.at> <546A2395.9010206@medunigraz.at> Message-ID: Hi Andrew, It should export all the points in the volume, as long as they are within the applied thresholds. What is your evidence that it's only exporting the boundary? - David On Mon, Nov 17, 2014 at 9:34 AM, Andrew Crozier < andrew.crozier at medunigraz.at> wrote: > Hi David, > > Thanks for the suggestion. I looked at the vtkThreshold filer, however it > appears to export the boundary of the thresholded volume, whereas I require > all points inside the volume. Have you any idea of how to achieve that? > > BW, > Andrew > > > On 17/11/14 17:16, David Gobbi wrote: > > Hi Andrew, > > The vtkThreshold filter will extract only the cells with the desired > scalar values, and will output them as an unstructured grid. It > isn't exactly what you want because it extracts cells, rather than > points, but it might be worth a shot. > > - David > > On Mon, Nov 17, 2014 at 8:28 AM, Andrew Crozier < > andrew.crozier at medunigraz.at> wrote: > >> Hi, >> >> I am trying to evaluate the principal components of a strucutre in a 3D >> volume image, to determine its spatial alignment for use in an automatic >> processing pipeline. >> >> The input is a vtkImageData, with multiple integer values (say, 0, 1, 2 >> and 3), and I want to perform PCA on the positions of all voxels with value >> 2, for example. >> >> I have looked at vtkPCAAnalysisFilter, and this requires an input of >> vtkPointSet. vtkImageDataToPointSet converts a vtkImageData to a >> vtkStructuredGrid, however I expect this to include all points in the >> original image. At the moment I seem to be missing some way of filtering >> out the points other than those of value 2. >> >> Any help provided for this would be greatly appreciated! >> >> Best wishes, >> Andrew Crozier >> >> > -- > ------------------------------ > *Andrew Crozier* > andrew.crozier at medunigraz.at > > Postdoctoral Researcher > Institute for Biophysics > Medical University of Graz > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.crozier at medunigraz.at Mon Nov 17 12:25:14 2014 From: andrew.crozier at medunigraz.at (Andrew Crozier) Date: Mon, 17 Nov 2014 18:25:14 +0100 Subject: [vtkusers] PCA on vtkImageData In-Reply-To: References: <546A1434.9020608@medunigraz.at> <546A2395.9010206@medunigraz.at> Message-ID: <546A2F7A.1020300@medunigraz.at> I wrote it out with vtkUnstructuredGridWriter and loaded it up in Paraview. Showing it there with a 'Points' or '3D Glyphs' representation shows only vertices on the external surface of the specified region. (Python) code I used to generate: tf = vtk.vtkThreshold() tf.SetInput(img) tf.ThresholdBetween(1.5,2.5) tf.Update() op = tf.GetOutput() writer = vtk.vtkUnstructuredGridWriter() writer.SetFileName('thresh.vtk') writer.SetInput(op) writer.Write() Andrew On 17/11/14 17:40, David Gobbi wrote: > Hi Andrew, > > It should export all the points in the volume, as long as they are > within the applied thresholds. What is your evidence that it's only > exporting the boundary? > > - David > > On Mon, Nov 17, 2014 at 9:34 AM, Andrew Crozier > > > wrote: > > Hi David, > > Thanks for the suggestion. I looked at the vtkThreshold filer, > however it appears to export the boundary of the thresholded > volume, whereas I require all points inside the volume. Have you > any idea of how to achieve that? > > BW, > Andrew > > > On 17/11/14 17:16, David Gobbi wrote: >> Hi Andrew, >> >> The vtkThreshold filter will extract only the cells with the desired >> scalar values, and will output them as an unstructured grid. It >> isn't exactly what you want because it extracts cells, rather than >> points, but it might be worth a shot. >> >> - David >> >> On Mon, Nov 17, 2014 at 8:28 AM, Andrew Crozier >> > > wrote: >> >> Hi, >> >> I am trying to evaluate the principal components of a >> strucutre in a 3D volume image, to determine its spatial >> alignment for use in an automatic processing pipeline. >> >> The input is a vtkImageData, with multiple integer values >> (say, 0, 1, 2 and 3), and I want to perform PCA on the >> positions of all voxels with value 2, for example. >> >> I have looked at vtkPCAAnalysisFilter, and this requires an >> input of vtkPointSet. vtkImageDataToPointSet converts a >> vtkImageData to a vtkStructuredGrid, however I expect this to >> include all points in the original image. At the moment I >> seem to be missing some way of filtering out the points other >> than those of value 2. >> >> Any help provided for this would be greatly appreciated! >> >> Best wishes, >> Andrew Crozier >> > > -- > ------------------------------------------------------------------------ > *Andrew Crozier* > andrew.crozier at medunigraz.at > > Postdoctoral Researcher > Institute for Biophysics > Medical University of Graz > > -- ------------------------------------------------------------------------ *Andrew Crozier* andrew.crozier at medunigraz.at Postdoctoral Researcher Institute for Biophysics Medical University of Graz -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsh at magellium.fr Mon Nov 17 12:48:34 2014 From: vsh at magellium.fr (Vincent32160) Date: Mon, 17 Nov 2014 10:48:34 -0700 (MST) Subject: [vtkusers] JPEG2000 writer implementation Message-ID: <1416246514531-5729484.post@n5.nabble.com> Hi, I would like to write JPEG2000 images like vtkJPEGWriter is doing with jpeg. Is there a solution to do it simply? Should I overload a specific class (vtkImageWriter) ? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/JPEG2000-writer-implementation-tp5729484.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Mon Nov 17 13:21:36 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 17 Nov 2014 11:21:36 -0700 Subject: [vtkusers] PCA on vtkImageData In-Reply-To: <546A2F7A.1020300@medunigraz.at> References: <546A1434.9020608@medunigraz.at> <546A2395.9010206@medunigraz.at> <546A2F7A.1020300@medunigraz.at> Message-ID: Hi Andrew, My best guess is that the internal points are there, but ParaView is only showing the surface. From python you can call GetNumberOfPoints() on the data set to check if the number of points matches what you expect. - David On Mon, Nov 17, 2014 at 10:25 AM, Andrew Crozier < andrew.crozier at medunigraz.at> wrote: > I wrote it out with vtkUnstructuredGridWriter and loaded it up in > Paraview. Showing it there with a 'Points' or '3D Glyphs' representation > shows only vertices on the external surface of the specified region. > > (Python) code I used to generate: > > tf = vtk.vtkThreshold() > tf.SetInput(img) > tf.ThresholdBetween(1.5,2.5) > tf.Update() > op = tf.GetOutput() > > writer = vtk.vtkUnstructuredGridWriter() > writer.SetFileName('thresh.vtk') > writer.SetInput(op) > writer.Write() > > Andrew > > > On 17/11/14 17:40, David Gobbi wrote: > > Hi Andrew, > > It should export all the points in the volume, as long as they are > within the applied thresholds. What is your evidence that it's only > exporting the boundary? > > - David > > On Mon, Nov 17, 2014 at 9:34 AM, Andrew Crozier < > andrew.crozier at medunigraz.at> wrote: > >> Hi David, >> >> Thanks for the suggestion. I looked at the vtkThreshold filer, however it >> appears to export the boundary of the thresholded volume, whereas I require >> all points inside the volume. Have you any idea of how to achieve that? >> >> BW, >> Andrew >> >> >> On 17/11/14 17:16, David Gobbi wrote: >> >> Hi Andrew, >> >> The vtkThreshold filter will extract only the cells with the desired >> scalar values, and will output them as an unstructured grid. It >> isn't exactly what you want because it extracts cells, rather than >> points, but it might be worth a shot. >> >> - David >> >> On Mon, Nov 17, 2014 at 8:28 AM, Andrew Crozier < >> andrew.crozier at medunigraz.at> wrote: >> >>> Hi, >>> >>> I am trying to evaluate the principal components of a strucutre in a 3D >>> volume image, to determine its spatial alignment for use in an automatic >>> processing pipeline. >>> >>> The input is a vtkImageData, with multiple integer values (say, 0, 1, 2 >>> and 3), and I want to perform PCA on the positions of all voxels with value >>> 2, for example. >>> >>> I have looked at vtkPCAAnalysisFilter, and this requires an input of >>> vtkPointSet. vtkImageDataToPointSet converts a vtkImageData to a >>> vtkStructuredGrid, however I expect this to include all points in the >>> original image. At the moment I seem to be missing some way of filtering >>> out the points other than those of value 2. >>> >>> Any help provided for this would be greatly appreciated! >>> >>> Best wishes, >>> Andrew Crozier >>> >>> >> -- >> ------------------------------ >> *Andrew Crozier* >> andrew.crozier at medunigraz.at >> >> Postdoctoral Researcher >> Institute for Biophysics >> Medical University of Graz >> > > > -- > ------------------------------ > *Andrew Crozier* > andrew.crozier at medunigraz.at > > Postdoctoral Researcher > Institute for Biophysics > Medical University of Graz > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Mon Nov 17 17:37:24 2014 From: andy.bauer at kitware.com (Andy Bauer) Date: Mon, 17 Nov 2014 17:37:24 -0500 Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: Hi Paul, Thanks for the input. I'm at SC14 right now so I won't be able to look at this until I get back. Cheers, Andy On Mon, Nov 17, 2014 at 4:26 AM, Paul Edwards wrote: > Hi Andy, > > I've attached a sample program demonstrating the issue. The example > just loads the sphere.vtk file, removes all cells where the "Result" > value is not 0 and writes the result to output.vtk. The tar file also > contains the correct and incorrect output. > > Best regards, > Paul > > On 15 November 2014 02:59, Andy Bauer wrote: > > Hi Paul, > > > > I was part of that fix and I think it's correct. There may have been > more to > > that fix though since it took a couple of shots before getting it > correct so > > the git history may not be as pristine as desired. If you can give me > more > > specifics on the bug though I can try to see what's going on with it. If > I > > remember correctly though, that fix had to do with the fact that some > places > > thought that the order of iterating through cells in a vtkPolyData was > first > > through all vertex cells, then all line cells, then all polys and finally > > through all triangle strips, irregardless of the order that cells got > > inserted in (i.e. using InsertNextCell()). The reality is that for > polydata > > that cells are indeed iterated through in their insertion order. The test > > that was added for those changes hopefully shows the proper functionality > > along with associated cell data manipulations as well. > > > > Regards, > > Andy > > > > > > > > On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards > > wrote: > >> > >> Hi, > >> > >> I've just noticed an issue with vtkPolyData. I had been calling > >> vtkPolyData::DeleteCell to remove the unwanted cells, followed by a > >> call to vtkPolyData::RemoveDeletedCells. The result is not as it > >> should be in the latest version. To fix I just started reverting > >> previous commits. I tracked it down to the following: > >> > >> bugfix 14459: Iterating through polydata cells incorrectly. > >> commit: 44131c6d05375692af8b6b38cf4291983bdd8f45 > >> > >> Sorry but I do not have time to provide a test case or track where in > >> this commit lies the problem. I just thought I would give details > >> here in case anyone else notices the same problem and is searching for > >> a solution. > >> > >> Best regards, > >> Paul > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://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://public.kitware.com/mailman/listinfo/vtkusers > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Tue Nov 18 09:17:21 2014 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Tue, 18 Nov 2014 14:17:21 +0000 Subject: [vtkusers] vtkRenderingVolumeOpenGLNew Message-ID: <46CB11F12B9DC24D860D4082451B318A12C904D9@exchange3.microbrightfield.com> Hi all, I'm having an issue with the latest nightly build and the new vtkRenderingVolumeOpenGLNew flag. I was able to build the libraries successfully. The issue is when I try to use it in my program. When I'm compiling inside of my program, I first got the error that it was missing the . I found in the vtk thirdparty folder the directory for the ftgl files. Now, I'm getting an error that it can't find the vtkftglConfig.h. There is a vtkftgConfig.h.in file but not sure what to do with that. Doug Doug Hoppes I Senior Software Engineer I [cid:image007.png at 01CEF686.037AE7C0] T: 802-288-9290 E: dhoppes at mbfbioscience.com MBF Bioscience 185 Allen Brook Lane Williston, VT 05495 USA www.mbfbioscience.com http://www.mbfbioscience.com/blog [cid:image008.png at 01CEF686.037AE7C0] [cid:image011.png at 01CEF686.037AE7C0] [cid:image012.png at 01CEF686.037AE7C0] [cid:image014.png at 01CEF686.037AE7C0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 2645 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 787 bytes Desc: image002.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 927 bytes Desc: image003.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 1170 bytes Desc: image004.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 870 bytes Desc: image005.png URL: From aashish.chaudhary at kitware.com Tue Nov 18 09:47:27 2014 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 18 Nov 2014 09:47:27 -0500 Subject: [vtkusers] vtkRenderingVolumeOpenGLNew In-Reply-To: <46CB11F12B9DC24D860D4082451B318A12C904D9@exchange3.microbrightfield.com> References: <46CB11F12B9DC24D860D4082451B318A12C904D9@exchange3.microbrightfield.com> Message-ID: Hi Doug, Just wanted to make sure that you intentionally using the vtkRenderingVolumeOpenGLNew for your setup. If yes, then probably we are missing the reference to a dependency. We will check on that and will get back to you. On this note, if you want latest changes you may want to use OpenGL2 backend (which comes with OpenGL2 VolumeMappers) if that's an option. Thanks, Aashish On Tue, Nov 18, 2014 at 9:17 AM, Doug Hoppes wrote: > Hi all, > > > > I?m having an issue with the latest nightly build and the > new vtkRenderingVolumeOpenGLNew flag. I was able to build the libraries > successfully. The issue is when I try to use it in my program. > > > > When I?m compiling inside of my program, I first got the > error that it was missing the . I found in the vtk thirdparty > folder the directory for the ftgl files. Now, I?m getting an error that it > can?t find the vtkftglConfig.h. There is a vtkftgConfig.h.in file but > not sure what to do with that. > > > > Doug > > *Doug Hoppes I *Senior Software Engineer* I* [image: > cid:image007.png at 01CEF686.037AE7C0] > > > > T: 802-288-9290 E: dhoppes at mbfbioscience.com > > > > *MBF Bioscience* > > 185 Allen Brook Lane > > Williston, VT 05495 USA > > www.mbfbioscience.com > > http://www.mbfbioscience.com/blog > > > > [image: cid:image008.png at 01CEF686.037AE7C0] > [image: > cid:image011.png at 01CEF686.037AE7C0] > [image: > cid:image012.png at 01CEF686.037AE7C0] > [image: cid:image014.png at 01CEF686.037AE7C0] > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 927 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 2645 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 1170 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 787 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 870 bytes Desc: not available URL: From thomas.barusseau at epita.fr Tue Nov 18 10:23:24 2014 From: thomas.barusseau at epita.fr (baruss_t) Date: Tue, 18 Nov 2014 15:23:24 +0000 Subject: [vtkusers] ParaView's camera following a line generated from a PolyData dataset ? Message-ID: <1416324213188.11884@epita.fr> Hello. I finally have some nice pictures of my work with ParaView : http://i.imgur.com/3yEsMvk.png What you're seeing are lines, generated by a PolyData dataset, using line elements. I'd like the ParaView's camera to automatically follow one of these lines, because setting the path by hand is absolutely painful. Regards, -- Thomas Barusseau -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Tue Nov 18 14:12:29 2014 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Tue, 18 Nov 2014 12:12:29 -0700 (MST) Subject: [vtkusers] VTK+GDCM+JAVA error in CMake Message-ID: <1416337949104-5729490.post@n5.nabble.com> Hello, I have tried a couple of times to integrate GDCM in my project (with Java and VTK). (this was long ago) However, so far without success. I was able to use classes like gdcm.Scanner or gdcm.IPPSorter, but none of the vtkGDCM*-classes. Now I start a new try. But unfortunately I fail already with an error message in CMake: CMake Error at Utilities / VTK / CMakeLists.txt: 656 (message): Could not find file vtk.jar, VTK_JAVA_JAR is wrong: please set proper GDCM_VTK_JAVA_JAR: replacement var Where can I set vtk.jar? I use VTK 6.1, Java 1.7 (and 1.8 for testing purposes) on a Windows OS with 64bit. Thanks for any hints? -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-GDCM-JAVA-error-in-CMake-tp5729490.html Sent from the VTK - Users mailing list archive at Nabble.com. From ajam.nima at gmail.com Tue Nov 18 14:51:32 2014 From: ajam.nima at gmail.com (Nima Ajam Gard) Date: Tue, 18 Nov 2014 14:51:32 -0500 Subject: [vtkusers] VTK + Qt integration Message-ID: <1BC8F13A-142A-4C08-B1B7-3CA17E02F471@gmail.com> Hi, I am trying to integrate VTK and Qt but unfortunately for some reasons I cannot. Currently, I can run VTK's examples except those using Qt's user interface. For example, examples in tutorial work but examples in infovis cannot be run. I followed the guide on http://www.vtk.org/Wiki/VTK/Configure_and_Build . All parts were done successfully except : cmake -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake \ -DVTK_Group_Qt:BOOL=ON \ -DBUILD_SHARED_LIBRARIES:BOOL=ON \ /path/to/VTK when I was in VTK-build directory, it said that there was no path/to/VTK. So, I changed to VTK and removed /path/to/VTK and it worked. Whenever I tried to build an aforementioned example, Qt says : error:cannot find -lQVTK error: cannot find -lvtkRendering .... I really appreciate any help you can provide. Bests, Nima -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Nov 18 14:56:02 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 18 Nov 2014 12:56:02 -0700 Subject: [vtkusers] VTK+GDCM+JAVA error in CMake In-Reply-To: <1416337949104-5729490.post@n5.nabble.com> References: <1416337949104-5729490.post@n5.nabble.com> Message-ID: Hi Daniel, It sounds like it's asking you to set this variable in GDCM's CMakeCache.txt, if you are using the cmake gui then you will have to select the "advanced" view: GDCM_VTK_JAVA_JAR:FILEPATH=C:/Path/To/vtk.jar If you are interested, my own VTK dicom classes also have java wrappers: http://github.com/dgobbi/vtk-dicom - David On Tue, Nov 18, 2014 at 12:12 PM, -Daniel- wrote: > Hello, > > I have tried a couple of times to integrate GDCM in my project (with Java > and VTK). (this was long ago) > However, so far without success. I was able to use classes like > gdcm.Scanner > or gdcm.IPPSorter, but none of the vtkGDCM*-classes. > Now I start a new try. > But unfortunately I fail already with an error message in CMake: > CMake Error at Utilities / VTK / CMakeLists.txt: 656 (message): > Could not find file vtk.jar, VTK_JAVA_JAR is wrong: please set proper > GDCM_VTK_JAVA_JAR: replacement var > > Where can I set vtk.jar? > > I use VTK 6.1, Java 1.7 (and 1.8 for testing purposes) on a Windows OS with > 64bit. > > Thanks for any hints? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Nov 18 15:11:32 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 18 Nov 2014 15:11:32 -0500 Subject: [vtkusers] VTK + Qt integration In-Reply-To: <1BC8F13A-142A-4C08-B1B7-3CA17E02F471@gmail.com> References: <1BC8F13A-142A-4C08-B1B7-3CA17E02F471@gmail.com> Message-ID: What version vtk are you using? On Tue, Nov 18, 2014 at 2:51 PM, Nima Ajam Gard wrote: > Hi, > > I am trying to integrate VTK and Qt but unfortunately for some reasons I > cannot. Currently, I can run VTK's examples except those using Qt's user > interface. For example, examples in tutorial work but examples in infovis > cannot be run. > > I followed the guide on http://www.vtk.org/Wiki/VTK/Configure_and_Build. All > parts were done successfully except : > > cmake > -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake > \ > -DVTK_Group_Qt:BOOL=ON \ > -DBUILD_SHARED_LIBRARIES:BOOL=ON \ > /path/to/VTK > > when I was in VTK-build directory, it said that there was no path/to/VTK. > So, I changed to VTK and removed /path/to/VTK and it worked. > > Whenever I tried to build an aforementioned example, Qt says : > > error:cannot find -lQVTK > > error: cannot find -lvtkRendering .... > > I really appreciate any help you can provide. > > > Bests, > Nima > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Tue Nov 18 15:21:21 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 18 Nov 2014 15:21:21 -0500 Subject: [vtkusers] VTK + Qt integration In-Reply-To: <9F48B586-88C2-4A12-BD6D-91791E17E0A9@gmail.com> References: <1BC8F13A-142A-4C08-B1B7-3CA17E02F471@gmail.com> <9F48B586-88C2-4A12-BD6D-91791E17E0A9@gmail.com> Message-ID: The cmake you showed is for vtk 5.x. Many people use VTK and Qt. Can you be more specific by providing the exact cmake command line you are using? On Tue, Nov 18, 2014 at 3:15 PM, Nima Ajam Gard wrote: > Hi Bill, > > Since, I could not use VTK-6.1 properly, I changed to VTK-6.0 but still I have same problems. > > >> On Nov 18, 2014, at 3:11 PM, Bill Lorensen wrote: >> >> What version vtk are you using? >> >> >> On Tue, Nov 18, 2014 at 2:51 PM, Nima Ajam Gard wrote: >>> Hi, >>> >>> I am trying to integrate VTK and Qt but unfortunately for some reasons I >>> cannot. Currently, I can run VTK's examples except those using Qt's user >>> interface. For example, examples in tutorial work but examples in infovis >>> cannot be run. >>> >>> I followed the guide on http://www.vtk.org/Wiki/VTK/Configure_and_Build. All >>> parts were done successfully except : >>> >>> cmake >>> -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake >>> \ >>> -DVTK_Group_Qt:BOOL=ON \ >>> -DBUILD_SHARED_LIBRARIES:BOOL=ON \ >>> /path/to/VTK >>> >>> when I was in VTK-build directory, it said that there was no path/to/VTK. >>> So, I changed to VTK and removed /path/to/VTK and it worked. >>> >>> Whenever I tried to build an aforementioned example, Qt says : >>> >>> error:cannot find -lQVTK >>> >>> error: cannot find -lvtkRendering .... >>> >>> I really appreciate any help you can provide. >>> >>> >>> Bests, >>> Nima >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://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://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Tue Nov 18 16:02:47 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 18 Nov 2014 16:02:47 -0500 Subject: [vtkusers] VTK + Qt integration In-Reply-To: References: <1BC8F13A-142A-4C08-B1B7-3CA17E02F471@gmail.com> <9F48B586-88C2-4A12-BD6D-91791E17E0A9@gmail.com> Message-ID: Please keep the users list in this conversation. It is possible that those pages have not been updated for vtk6. There are some wiki examples that use Qt. For example see: http://www.vtk.org/Wiki/VTK/Examples/Cxx#Qt Bill On Tue, Nov 18, 2014 at 3:44 PM, Nima Ajam Gard wrote: > I exactly followed http://www.vtk.org/Wiki/VTK/Configure_and_Build. > All the commands I used came from above webpage. > > On Nov 18, 2014, at 3:21 PM, Bill Lorensen wrote: > > The cmake you showed is for vtk 5.x. > > Many people use VTK and Qt. Can you be more specific by providing the > exact cmake command line you are using? > > > On Tue, Nov 18, 2014 at 3:15 PM, Nima Ajam Gard wrote: > > Hi Bill, > > Since, I could not use VTK-6.1 properly, I changed to VTK-6.0 but still I > have same problems. > > > On Nov 18, 2014, at 3:11 PM, Bill Lorensen wrote: > > What version vtk are you using? > > > On Tue, Nov 18, 2014 at 2:51 PM, Nima Ajam Gard wrote: > > Hi, > > I am trying to integrate VTK and Qt but unfortunately for some reasons I > cannot. Currently, I can run VTK's examples except those using Qt's user > interface. For example, examples in tutorial work but examples in infovis > cannot be run. > > I followed the guide on http://www.vtk.org/Wiki/VTK/Configure_and_Build. All > parts were done successfully except : > > cmake > -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake > \ > -DVTK_Group_Qt:BOOL=ON \ > -DBUILD_SHARED_LIBRARIES:BOOL=ON \ > /path/to/VTK > > when I was in VTK-build directory, it said that there was no path/to/VTK. > So, I changed to VTK and removed /path/to/VTK and it worked. > > Whenever I tried to build an aforementioned example, Qt says : > > error:cannot find -lQVTK > > error: cannot find -lvtkRendering .... > > I really appreciate any help you can provide. > > > Bests, > Nima > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Unpaid intern in BillsBasement at noware dot com > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > > -- Unpaid intern in BillsBasement at noware dot com From ajam.nima at gmail.com Tue Nov 18 16:06:58 2014 From: ajam.nima at gmail.com (Nima Ajam Gard) Date: Tue, 18 Nov 2014 16:06:58 -0500 Subject: [vtkusers] VTK + Qt integration In-Reply-To: References: <1BC8F13A-142A-4C08-B1B7-3CA17E02F471@gmail.com> <9F48B586-88C2-4A12-BD6D-91791E17E0A9@gmail.com> Message-ID: <5D6CD617-30AC-48D6-AD2E-C056A0738EF3@gmail.com> Thanks Bill for your help. Pages are updated as you can see it has a ?new? subscript. > On Nov 18, 2014, at 4:02 PM, Bill Lorensen wrote: > > Please keep the users list in this conversation. > > It is possible that those pages have not been updated for vtk6. > > There are some wiki examples that use Qt. For example see: > http://www.vtk.org/Wiki/VTK/Examples/Cxx#Qt > > Bill > > On Tue, Nov 18, 2014 at 3:44 PM, Nima Ajam Gard wrote: >> I exactly followed http://www.vtk.org/Wiki/VTK/Configure_and_Build. >> All the commands I used came from above webpage. >> >> On Nov 18, 2014, at 3:21 PM, Bill Lorensen wrote: >> >> The cmake you showed is for vtk 5.x. >> >> Many people use VTK and Qt. Can you be more specific by providing the >> exact cmake command line you are using? >> >> >> On Tue, Nov 18, 2014 at 3:15 PM, Nima Ajam Gard wrote: >> >> Hi Bill, >> >> Since, I could not use VTK-6.1 properly, I changed to VTK-6.0 but still I >> have same problems. >> >> >> On Nov 18, 2014, at 3:11 PM, Bill Lorensen wrote: >> >> What version vtk are you using? >> >> >> On Tue, Nov 18, 2014 at 2:51 PM, Nima Ajam Gard wrote: >> >> Hi, >> >> I am trying to integrate VTK and Qt but unfortunately for some reasons I >> cannot. Currently, I can run VTK's examples except those using Qt's user >> interface. For example, examples in tutorial work but examples in infovis >> cannot be run. >> >> I followed the guide on http://www.vtk.org/Wiki/VTK/Configure_and_Build. All >> parts were done successfully except : >> >> cmake >> -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake >> \ >> -DVTK_Group_Qt:BOOL=ON \ >> -DBUILD_SHARED_LIBRARIES:BOOL=ON \ >> /path/to/VTK >> >> when I was in VTK-build directory, it said that there was no path/to/VTK. >> So, I changed to VTK and removed /path/to/VTK and it worked. >> >> Whenever I tried to build an aforementioned example, Qt says : >> >> error:cannot find -lQVTK >> >> error: cannot find -lvtkRendering .... >> >> I really appreciate any help you can provide. >> >> >> Bests, >> Nima >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://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://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> >> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com >> >> > > > > -- > Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Tue Nov 18 16:30:41 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 18 Nov 2014 16:30:41 -0500 Subject: [vtkusers] VTK + Qt integration In-Reply-To: <5D6CD617-30AC-48D6-AD2E-C056A0738EF3@gmail.com> References: <1BC8F13A-142A-4C08-B1B7-3CA17E02F471@gmail.com> <9F48B586-88C2-4A12-BD6D-91791E17E0A9@gmail.com> <5D6CD617-30AC-48D6-AD2E-C056A0738EF3@gmail.com> Message-ID: So, what is the cmake command you are using? On Tue, Nov 18, 2014 at 4:06 PM, Nima Ajam Gard wrote: > Thanks Bill for your help. Pages are updated as you can see it has a ?new? subscript. > >> On Nov 18, 2014, at 4:02 PM, Bill Lorensen wrote: >> >> Please keep the users list in this conversation. >> >> It is possible that those pages have not been updated for vtk6. >> >> There are some wiki examples that use Qt. For example see: >> http://www.vtk.org/Wiki/VTK/Examples/Cxx#Qt >> >> Bill >> >> On Tue, Nov 18, 2014 at 3:44 PM, Nima Ajam Gard wrote: >>> I exactly followed http://www.vtk.org/Wiki/VTK/Configure_and_Build. >>> All the commands I used came from above webpage. >>> >>> On Nov 18, 2014, at 3:21 PM, Bill Lorensen wrote: >>> >>> The cmake you showed is for vtk 5.x. >>> >>> Many people use VTK and Qt. Can you be more specific by providing the >>> exact cmake command line you are using? >>> >>> >>> On Tue, Nov 18, 2014 at 3:15 PM, Nima Ajam Gard wrote: >>> >>> Hi Bill, >>> >>> Since, I could not use VTK-6.1 properly, I changed to VTK-6.0 but still I >>> have same problems. >>> >>> >>> On Nov 18, 2014, at 3:11 PM, Bill Lorensen wrote: >>> >>> What version vtk are you using? >>> >>> >>> On Tue, Nov 18, 2014 at 2:51 PM, Nima Ajam Gard wrote: >>> >>> Hi, >>> >>> I am trying to integrate VTK and Qt but unfortunately for some reasons I >>> cannot. Currently, I can run VTK's examples except those using Qt's user >>> interface. For example, examples in tutorial work but examples in infovis >>> cannot be run. >>> >>> I followed the guide on http://www.vtk.org/Wiki/VTK/Configure_and_Build. All >>> parts were done successfully except : >>> >>> cmake >>> -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake >>> \ >>> -DVTK_Group_Qt:BOOL=ON \ >>> -DBUILD_SHARED_LIBRARIES:BOOL=ON \ >>> /path/to/VTK >>> >>> when I was in VTK-build directory, it said that there was no path/to/VTK. >>> So, I changed to VTK and removed /path/to/VTK and it worked. >>> >>> Whenever I tried to build an aforementioned example, Qt says : >>> >>> error:cannot find -lQVTK >>> >>> error: cannot find -lvtkRendering .... >>> >>> I really appreciate any help you can provide. >>> >>> >>> Bests, >>> Nima >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://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://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> >>> >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> >>> >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > -- Unpaid intern in BillsBasement at noware dot com From zarko at kg.ac.rs Tue Nov 18 17:40:01 2014 From: zarko at kg.ac.rs (zarko.milosevic) Date: Tue, 18 Nov 2014 15:40:01 -0700 (MST) Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: References: <1409670908520-5728537.post@n5.nabble.com> <1409737146129-5728549.post@n5.nabble.com> <1409751520521-5728555.post@n5.nabble.com> <1410184498184-5728608.post@n5.nabble.com> Message-ID: <1416350401054-5729498.post@n5.nabble.com> Hi David again, It`s been a while. I`m getting back to the same problem. If I put my own spacing for the output image then the resulted image will have wrong dimensions. If i try to measure something on the resulted oblique sectioned image those measures will not be realistic. Am I right ? Regards Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageReslice-and-appending-slices-tp5728537p5729498.html Sent from the VTK - Users mailing list archive at Nabble.com. From andrew.crozier at medunigraz.at Tue Nov 18 17:42:55 2014 From: andrew.crozier at medunigraz.at (Andrew Crozier) Date: Tue, 18 Nov 2014 23:42:55 +0100 Subject: [vtkusers] PCA on vtkImageData In-Reply-To: References: <546A1434.9020608@medunigraz.at> <546A2395.9010206@medunigraz.at> <546A2F7A.1020300@medunigraz.at> Message-ID: <546BCB6F.4010500@medunigraz.at> Hi David, Thanks, you were right. I was able to visualise the full point cloud in a VTK window using the vtkVertexGlyphFilter on the output of vtkThreshold. I was then able to adapt the PCA demo on the wiki (http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/PCADemo) to my purposes. Thanks again for the help and best wishes, Andrew On 17/11/14 19:21, David Gobbi wrote: > Hi Andrew, > > My best guess is that the internal points are there, but ParaView is > only showing the surface. From python you can call > GetNumberOfPoints() on the data set to check if the number of points > matches what you expect. > > - David > > On Mon, Nov 17, 2014 at 10:25 AM, Andrew Crozier > > > wrote: > > I wrote it out with vtkUnstructuredGridWriter and loaded it up in > Paraview. Showing it there with a 'Points' or '3D Glyphs' > representation shows only vertices on the external surface of the > specified region. > > (Python) code I used to generate: > > tf = vtk.vtkThreshold() > tf.SetInput(img) > tf.ThresholdBetween(1.5,2.5) > tf.Update() > op = tf.GetOutput() > > writer = vtk.vtkUnstructuredGridWriter() > writer.SetFileName('thresh.vtk') > writer.SetInput(op) > writer.Write() > > Andrew > > > On 17/11/14 17:40, David Gobbi wrote: >> Hi Andrew, >> >> It should export all the points in the volume, as long as they >> are within the applied thresholds. What is your evidence that >> it's only exporting the boundary? >> >> - David >> >> On Mon, Nov 17, 2014 at 9:34 AM, Andrew Crozier >> > > wrote: >> >> Hi David, >> >> Thanks for the suggestion. I looked at the vtkThreshold >> filer, however it appears to export the boundary of the >> thresholded volume, whereas I require all points inside the >> volume. Have you any idea of how to achieve that? >> >> BW, >> Andrew >> >> >> On 17/11/14 17:16, David Gobbi wrote: >>> Hi Andrew, >>> >>> The vtkThreshold filter will extract only the cells with the >>> desired >>> scalar values, and will output them as an unstructured grid. It >>> isn't exactly what you want because it extracts cells, >>> rather than >>> points, but it might be worth a shot. >>> >>> - David >>> >>> On Mon, Nov 17, 2014 at 8:28 AM, Andrew Crozier >>> >> > wrote: >>> >>> Hi, >>> >>> I am trying to evaluate the principal components of a >>> strucutre in a 3D volume image, to determine its spatial >>> alignment for use in an automatic processing pipeline. >>> >>> The input is a vtkImageData, with multiple integer >>> values (say, 0, 1, 2 and 3), and I want to perform PCA >>> on the positions of all voxels with value 2, for example. >>> >>> I have looked at vtkPCAAnalysisFilter, and this requires >>> an input of vtkPointSet. vtkImageDataToPointSet converts >>> a vtkImageData to a vtkStructuredGrid, however I expect >>> this to include all points in the original image. At the >>> moment I seem to be missing some way of filtering out >>> the points other than those of value 2. >>> >>> Any help provided for this would be greatly appreciated! >>> >>> Best wishes, >>> Andrew Crozier >>> >> >> -- >> ------------------------------------------------------------------------ >> *Andrew Crozier* >> andrew.crozier at medunigraz.at >> >> >> Postdoctoral Researcher >> Institute for Biophysics >> Medical University of Graz >> >> > > -- > ------------------------------------------------------------------------ > *Andrew Crozier* > andrew.crozier at medunigraz.at > > Postdoctoral Researcher > Institute for Biophysics > Medical University of Graz > > -- ------------------------------------------------------------------------ *Andrew Crozier* andrew.crozier at medunigraz.at Postdoctoral Researcher Institute for Biophysics Medical University of Graz -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Nov 18 17:55:59 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 18 Nov 2014 15:55:59 -0700 Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: <1416350401054-5729498.post@n5.nabble.com> References: <1409670908520-5728537.post@n5.nabble.com> <1409737146129-5728549.post@n5.nabble.com> <1409751520521-5728555.post@n5.nabble.com> <1410184498184-5728608.post@n5.nabble.com> <1416350401054-5729498.post@n5.nabble.com> Message-ID: On Tue, Nov 18, 2014 at 3:40 PM, zarko.milosevic wrote: > Hi David again, > > It`s been a while. I`m getting back to the same problem. If I put my own > spacing for the output image then the resulted image will have wrong > dimensions. If i try to measure something on the resulted oblique sectioned > image those measures will not be realistic. Am I right ? > If you set the output voxel spacing, then you _know_ the output voxel spacing. And in fact VTK knows the output voxel spacing too, because it is stored with the vtkImageData. You are always taking the voxel spacing into account when you are making your measurements, aren't you? If you do so, then all the measurements should be accurate. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Tue Nov 18 18:09:02 2014 From: zarko at kg.ac.rs (zarko.milosevic) Date: Tue, 18 Nov 2014 16:09:02 -0700 (MST) Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: References: <1409670908520-5728537.post@n5.nabble.com> <1409737146129-5728549.post@n5.nabble.com> <1409751520521-5728555.post@n5.nabble.com> <1410184498184-5728608.post@n5.nabble.com> <1416350401054-5729498.post@n5.nabble.com> Message-ID: <051501d00384$8272c370$87584a50$@kg.ac.rs> When 3d image is sliced with arbitrary, oblique slice than all sliced voxels would not have same spacing. Right ? But if I assume some output spacing then I will get inaccurate dimensions. Zarko From: David Gobbi [via VTK] [mailto:ml-node+s1045678n5729500h31 at n5.nabble.com] Sent: Tuesday, November 18, 2014 11:56 PM To: zarko.milosevic Subject: Re: vtkResliceImage and appending slices On Tue, Nov 18, 2014 at 3:40 PM, zarko.milosevic <[hidden email]> wrote: Hi David again, It`s been a while. I`m getting back to the same problem. If I put my own spacing for the output image then the resulted image will have wrong dimensions. If i try to measure something on the resulted oblique sectioned image those measures will not be realistic. Am I right ? If you set the output voxel spacing, then you _know_ the output voxel spacing. And in fact VTK knows the output voxel spacing too, because it is stored with the vtkImageData. You are always taking the voxel spacing into account when you are making your measurements, aren't you?? If you do so, then all the measurements should be accurate. ? - 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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _____ If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/vtkImageReslice-and-appending-slices-tp5728 537p5729500.html To unsubscribe from vtkImageReslice and appending slices, click here . NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageReslice-and-appending-slices-tp5728537p5729501.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Nov 18 18:14:04 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 18 Nov 2014 16:14:04 -0700 Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: <051501d00384$8272c370$87584a50$@kg.ac.rs> References: <1409670908520-5728537.post@n5.nabble.com> <1409737146129-5728549.post@n5.nabble.com> <1409751520521-5728555.post@n5.nabble.com> <1410184498184-5728608.post@n5.nabble.com> <1416350401054-5729498.post@n5.nabble.com> <051501d00384$8272c370$87584a50$@kg.ac.rs> Message-ID: On Tue, Nov 18, 2014 at 4:09 PM, zarko.milosevic wrote: > When 3d image is sliced with arbitrary, oblique slice than all sliced > voxels would not have same spacing. Right ? But if I assume some output > spacing then I will get inaccurate dimensions. > Whatever output spacing you set, vtkImageReslice will take it into account when it does the reslicing. > *From:* David Gobbi [via VTK] [mailto:[hidden email] > ] > *Sent:* Tuesday, November 18, 2014 11:56 PM > *To:* zarko.milosevic > *Subject:* Re: vtkResliceImage and appending slices > > > > On Tue, Nov 18, 2014 at 3:40 PM, zarko.milosevic <[hidden email] > > wrote: > > Hi David again, > > It`s been a while. I`m getting back to the same problem. If I put my own > spacing for the output image then the resulted image will have wrong > dimensions. If i try to measure something on the resulted oblique sectioned > image those measures will not be realistic. Am I right ? > > > > If you set the output voxel spacing, then you _know_ the output voxel > spacing. > > And in fact VTK knows the output voxel spacing too, because it is stored > with > > the vtkImageData. > > > > You are always taking the voxel spacing into account when you are making > > your measurements, aren't you?? If you do so, then all the measurements > > should be accurate. > > > > ? - David? > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajam.nima at gmail.com Tue Nov 18 19:57:53 2014 From: ajam.nima at gmail.com (Nima Ajam Gard) Date: Tue, 18 Nov 2014 19:57:53 -0500 Subject: [vtkusers] VTK + Qt integration In-Reply-To: References: <1BC8F13A-142A-4C08-B1B7-3CA17E02F471@gmail.com> <9F48B586-88C2-4A12-BD6D-91791E17E0A9@gmail.com> <5D6CD617-30AC-48D6-AD2E-C056A0738EF3@gmail.com> Message-ID: <9FC6E677-A824-4282-AA85-154B280E19D8@gmail.com> It is what I used to build CMake: ./configure --prefix=$HOME/software make make install And, it is how I configured VTK with CMake: mkdir $HOME/projects/VTK-build cd $HOME/projects/VTK-build ccmake $HOME/projects/VTK is it what you mean by cmake command? > On Nov 18, 2014, at 4:30 PM, Bill Lorensen wrote: > > So, what is the cmake command you are using? > > > On Tue, Nov 18, 2014 at 4:06 PM, Nima Ajam Gard wrote: >> Thanks Bill for your help. Pages are updated as you can see it has a ?new? subscript. >> >>> On Nov 18, 2014, at 4:02 PM, Bill Lorensen wrote: >>> >>> Please keep the users list in this conversation. >>> >>> It is possible that those pages have not been updated for vtk6. >>> >>> There are some wiki examples that use Qt. For example see: >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx#Qt >>> >>> Bill >>> >>> On Tue, Nov 18, 2014 at 3:44 PM, Nima Ajam Gard wrote: >>>> I exactly followed http://www.vtk.org/Wiki/VTK/Configure_and_Build. >>>> All the commands I used came from above webpage. >>>> >>>> On Nov 18, 2014, at 3:21 PM, Bill Lorensen wrote: >>>> >>>> The cmake you showed is for vtk 5.x. >>>> >>>> Many people use VTK and Qt. Can you be more specific by providing the >>>> exact cmake command line you are using? >>>> >>>> >>>> On Tue, Nov 18, 2014 at 3:15 PM, Nima Ajam Gard wrote: >>>> >>>> Hi Bill, >>>> >>>> Since, I could not use VTK-6.1 properly, I changed to VTK-6.0 but still I >>>> have same problems. >>>> >>>> >>>> On Nov 18, 2014, at 3:11 PM, Bill Lorensen wrote: >>>> >>>> What version vtk are you using? >>>> >>>> >>>> On Tue, Nov 18, 2014 at 2:51 PM, Nima Ajam Gard wrote: >>>> >>>> Hi, >>>> >>>> I am trying to integrate VTK and Qt but unfortunately for some reasons I >>>> cannot. Currently, I can run VTK's examples except those using Qt's user >>>> interface. For example, examples in tutorial work but examples in infovis >>>> cannot be run. >>>> >>>> I followed the guide on http://www.vtk.org/Wiki/VTK/Configure_and_Build. All >>>> parts were done successfully except : >>>> >>>> cmake >>>> -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake >>>> \ >>>> -DVTK_Group_Qt:BOOL=ON \ >>>> -DBUILD_SHARED_LIBRARIES:BOOL=ON \ >>>> /path/to/VTK >>>> >>>> when I was in VTK-build directory, it said that there was no path/to/VTK. >>>> So, I changed to VTK and removed /path/to/VTK and it worked. >>>> >>>> Whenever I tried to build an aforementioned example, Qt says : >>>> >>>> error:cannot find -lQVTK >>>> >>>> error: cannot find -lvtkRendering .... >>>> >>>> I really appreciate any help you can provide. >>>> >>>> >>>> Bests, >>>> Nima >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://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://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>>> >>>> >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Wed Nov 19 01:55:55 2014 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Tue, 18 Nov 2014 23:55:55 -0700 (MST) Subject: [vtkusers] VTK+GDCM+JAVA error in CMake In-Reply-To: References: <1416337949104-5729490.post@n5.nabble.com> Message-ID: <1416380155124-5729504.post@n5.nabble.com> Okay, but I dont find the variable, neither in the cmake gui nor in the CMakeCache.txt. -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-GDCM-JAVA-error-in-CMake-tp5729490p5729504.html Sent from the VTK - Users mailing list archive at Nabble.com. From jinxinliang at yahoo.com Wed Nov 19 01:56:31 2014 From: jinxinliang at yahoo.com (Jin Jeremy) Date: Tue, 18 Nov 2014 22:56:31 -0800 Subject: [vtkusers] use VTK as 2D window with 3D objects Message-ID: <1416380191.9237.YahooMailBasic@web120205.mail.ne1.yahoo.com> Hello All Gurus, I have a special requirement of graphics. I want to render a 3D scene, but I only look into one plane (for example, XZ plane) with parallel project, so it is actually only 2D graphics. But I still want to use VTK to render every object so they has beautiful 3D look. This is really easy to do as long as I set parallel pojection and proper camera. Challenge is the next, I want to display horizontal axes (X axes) and vertical axes (Z axes) which are always on the fixed position of window. For example, X axes is always 20 pixels from bottom edge, and Z axes is always 20 pixes from left edge. and I want, if I zoom in/zoom out/translate, the axes scale/tick value will change, but the axes position will remain. Of course I will disable rotation. Anybody can give advice how to implement this kind of axes? Thanks in advance. Jeremy From zarko at kg.ac.rs Wed Nov 19 04:04:05 2014 From: zarko at kg.ac.rs (zarko.milosevic) Date: Wed, 19 Nov 2014 02:04:05 -0700 (MST) Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: References: <1409737146129-5728549.post@n5.nabble.com> <1409751520521-5728555.post@n5.nabble.com> <1410184498184-5728608.post@n5.nabble.com> <1416350401054-5729498.post@n5.nabble.com> <051501d00384$8272c370$87584a50$@kg.ac.rs> Message-ID: <05aa01d003d7$ab9931a0$02cb94e0$@kg.ac.rs> So you think that I can consider dimensions of entities on sliced oblique image as accurate ? For example, if I measure diameter of blood vessel on oblique sliced image that diameter should have correct dimensions ? From: David Gobbi [via VTK] [mailto:ml-node+s1045678n5729502h93 at n5.nabble.com] Sent: Wednesday, November 19, 2014 12:15 AM To: zarko.milosevic Subject: Re: vtkResliceImage and appending slices On Tue, Nov 18, 2014 at 4:09 PM, zarko.milosevic <[hidden email]> wrote: When 3d image is sliced with arbitrary, oblique slice than all sliced voxels would not have same spacing. Right ? But if I assume some output spacing then I will get inaccurate dimensions. Whatever output spacing you set, vtkImageReslice will take it into account when it does the reslicing. From: David Gobbi [via VTK] [mailto:[hidden email] ] Sent: Tuesday, November 18, 2014 11:56 PM To: zarko.milosevic Subject: Re: vtkResliceImage and appending slices On Tue, Nov 18, 2014 at 3:40 PM, zarko.milosevic <[hidden email] > wrote: Hi David again, It`s been a while. I`m getting back to the same problem. If I put my own spacing for the output image then the resulted image will have wrong dimensions. If i try to measure something on the resulted oblique sectioned image those measures will not be realistic. Am I right ? If you set the output voxel spacing, then you _know_ the output voxel spacing. And in fact VTK knows the output voxel spacing too, because it is stored with the vtkImageData. You are always taking the voxel spacing into account when you are making your measurements, aren't you?? If you do so, then all the measurements should be accurate. ? - 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 Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _____ If you reply to this email, your message will be added to the discussion below: http://vtk.1045678.n5.nabble.com/vtkImageReslice-and-appending-slices-tp5728537p5729502.html To unsubscribe from vtkImageReslice and appending slices, click here . NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageReslice-and-appending-slices-tp5728537p5729506.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Nov 19 06:52:30 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 19 Nov 2014 06:52:30 -0500 Subject: [vtkusers] VTK + Qt integration In-Reply-To: <9FC6E677-A824-4282-AA85-154B280E19D8@gmail.com> References: <1BC8F13A-142A-4C08-B1B7-3CA17E02F471@gmail.com> <9F48B586-88C2-4A12-BD6D-91791E17E0A9@gmail.com> <5D6CD617-30AC-48D6-AD2E-C056A0738EF3@gmail.com> <9FC6E677-A824-4282-AA85-154B280E19D8@gmail.com> Message-ID: I mean the cmake command or CMakeLists.txt file you use to build your application. On Tue, Nov 18, 2014 at 7:57 PM, Nima Ajam Gard wrote: > It is what I used to build CMake: > > ./configure --prefix=$HOME/software > make > make install > > And, it is how I configured VTK with CMake: > > mkdir $HOME/projects/VTK-build > cd $HOME/projects/VTK-build > > ccmake $HOME/projects/VTK > > is it what you mean by cmake command? > > On Nov 18, 2014, at 4:30 PM, Bill Lorensen wrote: > > So, what is the cmake command you are using? > > > On Tue, Nov 18, 2014 at 4:06 PM, Nima Ajam Gard wrote: > > Thanks Bill for your help. Pages are updated as you can see it has a ?new? > subscript. > > On Nov 18, 2014, at 4:02 PM, Bill Lorensen wrote: > > Please keep the users list in this conversation. > > It is possible that those pages have not been updated for vtk6. > > There are some wiki examples that use Qt. For example see: > http://www.vtk.org/Wiki/VTK/Examples/Cxx#Qt > > Bill > > On Tue, Nov 18, 2014 at 3:44 PM, Nima Ajam Gard wrote: > > I exactly followed http://www.vtk.org/Wiki/VTK/Configure_and_Build. > All the commands I used came from above webpage. > > On Nov 18, 2014, at 3:21 PM, Bill Lorensen wrote: > > The cmake you showed is for vtk 5.x. > > Many people use VTK and Qt. Can you be more specific by providing the > exact cmake command line you are using? > > > On Tue, Nov 18, 2014 at 3:15 PM, Nima Ajam Gard wrote: > > Hi Bill, > > Since, I could not use VTK-6.1 properly, I changed to VTK-6.0 but still I > have same problems. > > > On Nov 18, 2014, at 3:11 PM, Bill Lorensen wrote: > > What version vtk are you using? > > > On Tue, Nov 18, 2014 at 2:51 PM, Nima Ajam Gard wrote: > > Hi, > > I am trying to integrate VTK and Qt but unfortunately for some reasons I > cannot. Currently, I can run VTK's examples except those using Qt's user > interface. For example, examples in tutorial work but examples in infovis > cannot be run. > > I followed the guide on http://www.vtk.org/Wiki/VTK/Configure_and_Build. All > parts were done successfully except : > > cmake > -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt-4.8.6-build/qt-everywhere-opensource-src-4.8.6/bin/qmake > \ > -DVTK_Group_Qt:BOOL=ON \ > -DBUILD_SHARED_LIBRARIES:BOOL=ON \ > /path/to/VTK > > when I was in VTK-build directory, it said that there was no path/to/VTK. > So, I changed to VTK and removed /path/to/VTK and it worked. > > Whenever I tried to build an aforementioned example, Qt says : > > error:cannot find -lQVTK > > error: cannot find -lvtkRendering .... > > I really appreciate any help you can provide. > > > Bests, > Nima > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Unpaid intern in BillsBasement at noware dot com > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > > > > > > -- > Unpaid intern in BillsBasement at noware dot com > > -- Unpaid intern in BillsBasement at noware dot com From david.gobbi at gmail.com Wed Nov 19 08:13:11 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 19 Nov 2014 06:13:11 -0700 Subject: [vtkusers] vtkResliceImage and appending slices In-Reply-To: <05aa01d003d7$ab9931a0$02cb94e0$@kg.ac.rs> References: <1409737146129-5728549.post@n5.nabble.com> <1409751520521-5728555.post@n5.nabble.com> <1410184498184-5728608.post@n5.nabble.com> <1416350401054-5729498.post@n5.nabble.com> <051501d00384$8272c370$87584a50$@kg.ac.rs> <05aa01d003d7$ab9931a0$02cb94e0$@kg.ac.rs> Message-ID: On Wed, Nov 19, 2014 at 2:04 AM, zarko.milosevic wrote: > So you think that I can consider dimensions of entities on sliced oblique > image as accurate ? For example, if I measure diameter of blood vessel on > oblique sliced image that diameter should have correct dimensions ? > Yes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at jslengineeringsoftware.com Wed Nov 19 09:40:22 2014 From: jim at jslengineeringsoftware.com (James Labiak) Date: Wed, 19 Nov 2014 09:40:22 -0500 Subject: [vtkusers] vtk installation CMake java problem Message-ID: <546CABD6.1090101@jslengineeringsoftware.com> Hello, I am trying to install vtk with Java wrapping. When I build in VS 2013, I get errors related to jogl classes not being found. I placed the missing classes java files in the vtk\rendering\jogl directories as necessary, but after CMake Configure and Generate steps, the jogl files are not being copied to the build directory Java\rendering\jogl directory and so I get the same errors upon build in VS 2013. Thanks, -- James Labiak JSL Engineering and Software 6545 Lainhart Rd. Altamont, NY 12009 Phone: 518-861-1113 Mobile: 231-638-3725 email: jim at jslengineeringsoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Nov 19 10:33:39 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 19 Nov 2014 08:33:39 -0700 Subject: [vtkusers] VTK+GDCM+JAVA error in CMake In-Reply-To: <1416380155124-5729504.post@n5.nabble.com> References: <1416337949104-5729490.post@n5.nabble.com> <1416380155124-5729504.post@n5.nabble.com> Message-ID: On Tue, Nov 18, 2014 at 11:55 PM, -Daniel- wrote: > Okay, but I dont find the variable, neither in the cmake gui nor in the > CMakeCache.txt. > If it isn't there, you can try adding it. If that doesn't work, you can ask on the GDCM mailing list: http://sourceforge.net/p/gdcm/mailman/gdcm-developers/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Nov 19 14:38:18 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 19 Nov 2014 13:38:18 -0600 Subject: [vtkusers] vtk installation CMake java problem In-Reply-To: <546CABD6.1090101@jslengineeringsoftware.com> References: <546CABD6.1090101@jslengineeringsoftware.com> Message-ID: Hi James, What do you mean by JOGL classes? Are you talking about the JOGL jar files? What did you change in your CMake configuration step? Seb On Wed, Nov 19, 2014 at 8:40 AM, James Labiak < jim at jslengineeringsoftware.com> wrote: > Hello, > I am trying to install vtk with Java wrapping. When I build in VS 2013, I > get errors related to jogl classes not being found. I placed the missing > classes java files in the vtk\rendering\jogl directories as necessary, but > after CMake Configure and Generate steps, the jogl files are not being > copied to the build directory Java\rendering\jogl directory and so I get > the same errors upon build in VS 2013. > Thanks, > > -- > James Labiak > JSL Engineering and Software > 6545 Lainhart Rd. > Altamont, NY 12009 > Phone: 518-861-1113 > Mobile: 231-638-3725 > email: jim at jslengineeringsoftware.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From coolastro at gmail.com Thu Nov 20 06:53:01 2014 From: coolastro at gmail.com (Bhargav Vaidya) Date: Thu, 20 Nov 2014 12:53:01 +0100 Subject: [vtkusers] Writing an array for each point as PointData in an Unstructured Grid. Message-ID: <7B491074-5AD7-4E3A-9E7E-2AB2E2C634C7@gmail.com> Hello, I have very recently started to look into the .vtu file formats to write particle data in an Unstructured grid. I have managed to write a simple xml file following standard examples. This works perfectly fine as I can visualize the particles and also plot velocity vectors. However, now I desire to write in the XML data file an array of (say 100 points) for each particle. Let me illustrate this better with a sample .vtu file /------------- section of my .vtu file ------- / / * Here comes the particle positions (px, py, pz) */ /* Here comes the particle velocity (vx, vy, vz) */ /* Here comes the particle ids (unique integer for each particle) */ /---------------------------------------------------------- */ What I would like to have is another block of DataArray such that each element is itself an array of say 100 float values for each particle.. Since I have 16 particles in the above file... Can I just write 16*100 float values using /* Here comes 16*100 float values */ Is it possible to write such a data in this format ? If yes how can I incorporate the information that the reader should consider 100 values as one chunk of data and associate it with a particular particle. Regards, Bhargav Vaidya Postdoc fellow Dept. of Physics, Uni. Torino From oesteban at die.upm.es Thu Nov 20 07:12:42 2014 From: oesteban at die.upm.es (Oscar Esteban) Date: Thu, 20 Nov 2014 13:12:42 +0100 Subject: [vtkusers] Off screen rendering Message-ID: Dear experts, I'm trying to write png files slicing a 3D volume through its coordinates planes, with the contours corresponding to the intersection of the plane and a number of surfaces (triangularized meshes). I need to run the code in a headless debian server. The code I'm trying is here: https://gist.github.com/oesteban/f22e155146ce6738b431 I have tried with no success with vtk-5.10.1 and vtk-6.1.0. I've tested on 5.10.1 with this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/OffScreenRendering, and 6.1.0 with https://gist.github.com/certik/5687727. Successful compilation of both versions included: VTK_OPENGL_HAS_OSMESA=ON VTK_USE_X=OFF VTK_USE_TK=OFF VTK_USE_OFFSCREEN=ON Program received signal SIGSEGV, Segmentation fault. __rawmemchr_sse2 () at ../sysdeps/x86_64/multiarch/../rawmemchr.S:31 31 ../sysdeps/x86_64/multiarch/../rawmemchr.S: No such file or directory. (gdb) bt #0 __rawmemchr_sse2 () at ../sysdeps/x86_64/multiarch/../rawmemchr.S:31 #1 0x00007ffff45fe150 in _IO_str_init_static_internal (sf=0x7fffffffc380, ptr=0x0, size=0, pstart=0x0) at strops.c:45 #2 0x00007ffff45f2875 in _IO_vsscanf (string=0x0, format=0x142d1c3 "%d.%d", args=0x7fffffffc4a0) at iovsscanf.c:44 #3 0x00007ffff45dea38 in __sscanf (s=0x0, format=0xffffffff
) at sscanf.c:34 #4 0x0000000000c5b549 in vtkOpenGLExtensionManager::ReadOpenGLExtensions() () #5 0x0000000000c5ac80 in vtkOpenGLExtensionManager::Update() () #6 0x0000000000c5a957 in vtkOpenGLExtensionManager::ExtensionSupported(char const*) () #7 0x0000000000bf131a in vtkOpenGLRenderWindow::OpenGLInitContext() () #8 0x0000000000bef19d in vtkOpenGLRenderWindow::OpenGLInit() () #9 0x0000000000bb566d in vtkOSOpenGLRenderWindow::Start() () #10 0x0000000000b2e900 in vtkRenderWindow::DoStereoRender() () #11 0x0000000000b2fc7d in vtkRenderWindow::DoFDRender() () #12 0x0000000000b30515 in vtkRenderWindow::DoAARender() () #13 0x0000000000b2eceb in vtkRenderWindow::Render() () #14 0x0000000000b399c5 in vtkWindowToImageFilter::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () #15 0x0000000000b39cc1 in vtkWindowToImageFilter::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () #16 0x0000000000920204 in vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) () #17 0x000000000091cd1c in vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () #18 0x000000000091bbe1 in vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () #19 0x000000000091f4a1 in vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () #20 0x0000000000927c61 in vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) () #21 0x000000000091dc87 in vtkDemandDrivenPipeline::UpdateData(int) () #22 0x0000000000929401 in vtkStreamingDemandDrivenPipeline::Update(int) () #23 0x000000000070752d in main () The same segfault is reported here: http://public.kitware.com/pipermail/vtkusers/2013-April/079007.html, however the solution they linked is not available anymore. Threads in the list around the pointed dates are: http://vtk.1045678.n5.nabble.com/VTK-offscreen-rendering-td4548419.html#a4856413 and http://www.vtk.org/pipermail/vtkusers/2011-July/068951.html. I did not try the patch in the last link, I would prefer not to modify VTK source. Thanks a lot. Best wishes, Oscar *______________________________________* *Oscar Esteban* PhD Student / Researcher Biomedical Image Technologies (BIT), UPM ETSI Telecomunicaci?n Lab. C203, Av. Complutense s/n - E-28040 Madrid (Spain) +34 915 495 700 ext.4234 Signal Processing Laboratory (LTS5), EPFL-STI-IEL-LTS5 ELD 224 (B?timent ELD), Station 11, CH-1015 Lausanne, Switzerland -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Thu Nov 20 08:32:55 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 20 Nov 2014 07:32:55 -0600 Subject: [vtkusers] Off screen rendering In-Reply-To: References: Message-ID: Which version of OSMesa did you point to? That's not exactly the same project described here but it should be almost the same CMake properties. http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/os_mesa Seb On Thu, Nov 20, 2014 at 6:12 AM, Oscar Esteban wrote: > Dear experts, > > I'm trying to write png files slicing a 3D volume through its coordinates > planes, with the contours corresponding to the intersection of the plane > and a number of surfaces (triangularized meshes). I need to run the code in > a headless debian server. The code I'm trying is here: > https://gist.github.com/oesteban/f22e155146ce6738b431 > > I have tried with no success with vtk-5.10.1 and vtk-6.1.0. I've tested on > 5.10.1 with this example: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/OffScreenRendering, > and 6.1.0 with https://gist.github.com/certik/5687727. > > Successful compilation of both versions included: > VTK_OPENGL_HAS_OSMESA=ON > VTK_USE_X=OFF > VTK_USE_TK=OFF > VTK_USE_OFFSCREEN=ON > > > Program received signal SIGSEGV, Segmentation fault. > __rawmemchr_sse2 () at ../sysdeps/x86_64/multiarch/../rawmemchr.S:31 > 31 ../sysdeps/x86_64/multiarch/../rawmemchr.S: No such file or > directory. > (gdb) bt > #0 __rawmemchr_sse2 () at ../sysdeps/x86_64/multiarch/../rawmemchr.S:31 > #1 0x00007ffff45fe150 in _IO_str_init_static_internal (sf=0x7fffffffc380, > ptr=0x0, size=0, pstart=0x0) at strops.c:45 > #2 0x00007ffff45f2875 in _IO_vsscanf (string=0x0, format=0x142d1c3 > "%d.%d", args=0x7fffffffc4a0) at iovsscanf.c:44 > #3 0x00007ffff45dea38 in __sscanf (s=0x0, format=0xffffffff
0xffffffff out of bounds>) at sscanf.c:34 > #4 0x0000000000c5b549 in > vtkOpenGLExtensionManager::ReadOpenGLExtensions() () > #5 0x0000000000c5ac80 in vtkOpenGLExtensionManager::Update() () > #6 0x0000000000c5a957 in > vtkOpenGLExtensionManager::ExtensionSupported(char const*) () > #7 0x0000000000bf131a in vtkOpenGLRenderWindow::OpenGLInitContext() () > #8 0x0000000000bef19d in vtkOpenGLRenderWindow::OpenGLInit() () > #9 0x0000000000bb566d in vtkOSOpenGLRenderWindow::Start() () > #10 0x0000000000b2e900 in vtkRenderWindow::DoStereoRender() () > #11 0x0000000000b2fc7d in vtkRenderWindow::DoFDRender() () > #12 0x0000000000b30515 in vtkRenderWindow::DoAARender() () > #13 0x0000000000b2eceb in vtkRenderWindow::Render() () > #14 0x0000000000b399c5 in > vtkWindowToImageFilter::RequestData(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > #15 0x0000000000b39cc1 in > vtkWindowToImageFilter::ProcessRequest(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > #16 0x0000000000920204 in vtkExecutive::CallAlgorithm(vtkInformation*, > int, vtkInformationVector**, vtkInformationVector*) () > #17 0x000000000091cd1c in > vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > #18 0x000000000091bbe1 in > vtkCompositeDataPipeline::ExecuteData(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > #19 0x000000000091f4a1 in > vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > #20 0x0000000000927c61 in > vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > #21 0x000000000091dc87 in vtkDemandDrivenPipeline::UpdateData(int) () > #22 0x0000000000929401 in vtkStreamingDemandDrivenPipeline::Update(int) () > #23 0x000000000070752d in main () > > The same segfault is reported here: > http://public.kitware.com/pipermail/vtkusers/2013-April/079007.html, > however the solution they linked is not available anymore. Threads in the > list around the pointed dates are: > http://vtk.1045678.n5.nabble.com/VTK-offscreen-rendering-td4548419.html#a4856413 > and http://www.vtk.org/pipermail/vtkusers/2011-July/068951.html. > > I did not try the patch in the last link, I would prefer not to modify VTK > source. > > Thanks a lot. Best wishes, > Oscar > > > *______________________________________* > *Oscar Esteban* > PhD Student / Researcher > > Biomedical Image Technologies (BIT), UPM > ETSI Telecomunicaci?n Lab. C203, Av. Complutense s/n - E-28040 Madrid > (Spain) > +34 915 495 700 ext.4234 > > Signal Processing Laboratory (LTS5), EPFL-STI-IEL-LTS5 > ELD 224 (B?timent ELD), Station 11, CH-1015 Lausanne, Switzerland > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From isimtic at gmail.com Thu Nov 20 10:39:38 2014 From: isimtic at gmail.com (=?UTF-8?B?QWhtZXQgRG/En2Fu?=) Date: Thu, 20 Nov 2014 17:39:38 +0200 Subject: [vtkusers] vtkCaptionActor2D always top on 3D object Message-ID: <546E0B3A.3000405@gmail.com> Hi Everyone, I have problem with vtkCaptionActor2D. How can I handle when a vtkCaptionActor2D behind the a 3D object, the object wont be behind of vtkCaptionActor2D. Kind Regards... From sebastien.jourdain at kitware.com Thu Nov 20 11:03:23 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 20 Nov 2014 10:03:23 -0600 Subject: [vtkusers] vtk installation CMake java problem In-Reply-To: References: <546CABD6.1090101@jslengineeringsoftware.com> <546DFF6B.3090909@jslengineeringsoftware.com> Message-ID: Hi James, Please keep the thread on the mailing list so other community members could benefit from your question as well. So first of all, why did you turn ON both VTK_JAVA_JOGL_COMPONENT and VTK_JAVA_SWT_COMPONENT? Turning any of those option require that you have already the SWT native library or the JOGL library installed on your system. On top of that, none of them is required to have a VTK with Java Wrapping working. In fact, you can probably just download the generated binaries from our VTK dashboard if you don't want to build VTK yourself here: http://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=Super-build Then if you truly want to build VTK and have the JOGL rendering classes available on top of the default ones, then the best approach is to get them using Maven. And you should make sure you provide the path to the proper jar inside your CMake config. (You may need to toggle the advance mode to see them). Seb > > On Thu, Nov 20, 2014 at 8:49 AM, James Labiak < > jim at jslengineeringsoftware.com> wrote: > >> Hi Seb, >> Thanks for picking up on this. I put images of the CMake process below, >> also the JOGL source directory files and the JOGL build directory files. >> Here are some errors that VS 2013 gives, which is how I noticed that the >> JOGL classes were missing from the build directory structure. If I should >> be placing JOGL jar files somewhere, then I'm not sure where to put >> it(them). >> Thanks, >> Jim >> >> 386>CUSTOMBUILD : warning : [options] bootstrap class path not set in >> conjunction with -source 1.5 >> 386> >> C:\vtk_build\java\vtk\rendering\jogl\vtkAbstractJoglComponent.java:3: >> error: package javax.media.opengl does not exist >> 386> import javax.media.opengl.GLAutoDrawable; >> >> 386> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:5: >> error: package javax.media.opengl.awt does not exist >> 386> import javax.media.opengl.awt.GLJPanel; >> >> 387> >> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglCanvasComponent.java:20: error: >> cannot find symbol >> 387> public vtkJoglCanvasComponent(vtkRenderWindow renderWindow, >> GLCapabilities capabilities) { >> 387> ^ >> 387> symbol: class GLCapabilities >> 387> location: class vtkJoglCanvasComponent >> 387> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:3: >> error: package javax.media.opengl does not exist >> 387> import javax.media.opengl.GLCapabilities; >> >> >> >> >> On 11/19/2014 2:38 PM, Sebastien Jourdain wrote: >> >> Hi James, >> >> What do you mean by JOGL classes? Are you talking about the JOGL jar >> files? >> What did you change in your CMake configuration step? >> >> Seb >> >> On Wed, Nov 19, 2014 at 8:40 AM, James Labiak < >> jim at jslengineeringsoftware.com> wrote: >> >>> Hello, >>> I am trying to install vtk with Java wrapping. When I build in VS 2013, >>> I get errors related to jogl classes not being found. I placed the missing >>> classes java files in the vtk\rendering\jogl directories as necessary, but >>> after CMake Configure and Generate steps, the jogl files are not being >>> copied to the build directory Java\rendering\jogl directory and so I get >>> the same errors upon build in VS 2013. >>> 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 >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> -- >> James Labiak >> JSL Engineering and Software >> 6545 Lainhart Rd. >> Altamont, NY 12009 >> Phone: 518-861-1113 >> Mobile: 231-638-3725 >> email: jim at jslengineeringsoftware.com >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From xjtuzxl at 163.com Fri Nov 21 01:49:29 2014 From: xjtuzxl at 163.com (Xianliang.Zeng) Date: Fri, 21 Nov 2014 14:49:29 +0800 (CST) Subject: [vtkusers] I have some problems when deal with key press callback In-Reply-To: <1416237957418-5729478.post@n5.nabble.com> References: <1416237957418-5729478.post@n5.nabble.com> Message-ID: <7984ecff.6f8f.149d11cd90b.Coremail.xjtuzxl@163.com> Try ren->ResetCamera() in you callback function just before Render(). At 2014-11-17 23:25:57, "zhq" <15891495523 at 126.com> wrote: >Deal all : > > What I want to do is : make a transform on a cone when a key >(whatever) is pressed . > > the problem I met is : the cone will disappear in the window when a >transform happen . > > My code is : > >#include >#include >#include >#include >#include >#include >#include >#include >#include >#include >#include >#include >#include "vtkActor.h" >#include >#include >#include >#include >#include >vtkSmartPointer cone = vtkSmartPointer::New(); > >vtkSmartPointer iren = >vtkSmartPointer::New(); >vtkSmartPointer trans = vtkSmartPointer::New(); >vtkSmartPointer actor1 = vtkSmartPointer::New(); >vtkSmartPointer actor2 = vtkSmartPointer::New(); >vtkSmartPointer mapper1 = >vtkSmartPointer::New(); >vtkSmartPointer mapper2 = >vtkSmartPointer::New(); > >int x=0,y=0,z=0; > >void MyCallbackFunc(vtkObject * , unsigned long eid , void * clientdata , >void * calldata) >{ > > x++; > > trans->Translate(x,y,z) ; > trans->Scale(2, 3, 1); > trans->RotateX(0); > > vtkSmartPointer transformFilter = > vtkSmartPointer::New(); > transformFilter->SetInputConnection(cone->GetOutputPort()); > transformFilter->SetTransform(trans); > transformFilter->Update(); > mapper1->SetInputConnection(transformFilter->GetOutputPort()); > iren->Render(); >} > >void main() >{ > > vtkSmartPointer renWin = >vtkSmartPointer::New(); > > vtkSmartPointer sphereSource = > vtkSmartPointer::New(); > sphereSource->Update(); > > cone->Update(); > > > > mapper1->SetInputConnection(sphereSource->GetOutputPort()); > mapper1->Update(); > > > mapper2->SetInputConnection(cone->GetOutputPort()); > mapper2->Update(); > > > actor1->SetMapper(mapper1); > > actor2->SetMapper(mapper2); > > vtkSmartPointer ren = vtkSmartPointer::New(); > ren->AddActor(actor1); > ren->AddActor(actor2); > > > > vtkSmartPointer style = >vtkSmartPointer::New(); > > iren->SetInteractorStyle(style); > renWin->AddRenderer(ren); > renWin->SetInteractor(iren); > > > ren->SetBackground(0.3,0.6,0.3); > > vtkSmartPointer KeyPressCallback = >vtkSmartPointer::New(); > KeyPressCallback->SetCallback(&MyCallbackFunc); > > > iren->AddObserver(vtkCommand::KeyPressEvent,KeyPressCallback); > > > renWin->Render(); > iren->Initialize(); > iren->Start(); >} > > Thanks in advance ! > >Zhq > > > >-- >View this message in context: http://vtk.1045678.n5.nabble.com/I-have-some-problems-when-deal-with-key-press-callback-tp5729478.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 > >Follow this link to subscribe/unsubscribe: >http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From sd016808 at gmail.com Fri Nov 21 02:41:55 2014 From: sd016808 at gmail.com (=?UTF-8?B?5oi05byY5a24?=) Date: Fri, 21 Nov 2014 15:41:55 +0800 Subject: [vtkusers] How to display the obj file with several textures? Message-ID: I can display the obj file with one texture, but when the obj file contains several textures then I don't know how to show it. I have grouped the vt and f to the submesh corresponding to their texture image. The obj file is like below: # 3 vertex textures in submesh 0 vt 0.36366 0.99907 vt 0.3628 0.99587 vt 0.36312 0.99569 # 3 vertex textures in submesh 1 vt 0.66907 0.98525 vt 0.66794 0.98268 vt 0.66887 0.98108 # 5 vertex textures in submesh 2 vt 0.65914 0.98112 vt 0.65258 0.97826 vt 0.65581 0.97424 vt 0.65254 0.97451 vt 0.65581 0.97424 ... # The material will be used for mesh 0 usemtl material_0 # Faces f 1/1/1 3/2/3 2/3/2 f 7/4/7 9/5/9 8/6/8 f 10/7/10 12/8/12 11/9/11 # The material will be used for mesh 1 usemtl material_1 # Faces f 61/323269/61 63/323270/63 62/323271/62 f 67/323272/67 69/323273/69 68/323274/68 f 70/323275/70 72/323276/72 71/323277/71 ... The mtl file is like below: # # Wavefront material file # newmtl material_0 Ka 0.2 0.2 0.2 Kd 0.8 0.8 0.8 Ks 1 1 1 d 1 Ns 75 illum 2 map_Kd 0.png ### newmtl material_1 Ka 0.2 0.2 0.2 Kd 0.8 0.8 0.8 Ks 1 1 1 d 1 Ns 75 illum 2 map_Kd 1.png ### newmtl material_2 Ka 0.2 0.2 0.2 Kd 0.8 0.8 0.8 Ks 1 1 1 d 1 Ns 75 illum 2 map_Kd 2.png ### newmtl material_3 Ka 0.2 0.2 0.2 Kd 0.8 0.8 0.8 Ks 1 1 1 d 1 Ns 75 illum 2 map_Kd 3.png ... Do I need multi-texturing? But I only have 4 texture units, it is not enough. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpaknezhad.2009 at gmail.com Fri Nov 21 02:46:56 2014 From: mpaknezhad.2009 at gmail.com (mahsa paknezhad) Date: Fri, 21 Nov 2014 15:46:56 +0800 Subject: [vtkusers] Structured_points & Binary VTK File Format Message-ID: Dear All, I am reading pixel values from grayscale dicom images in double format and i want to write a vtk file in STRUCTURED-POINTS and BINARY format. Would you please let me know to what format I should cast my double values and how should i arrange them in my BINARY vtk file. Regards, Mahsa -------------- next part -------------- An HTML attachment was scrubbed... URL: From maaschn at web.de Fri Nov 21 03:27:26 2014 From: maaschn at web.de (maaschn) Date: Fri, 21 Nov 2014 01:27:26 -0700 (MST) Subject: [vtkusers] crash because of auto rendering when hovering mouse over Window Message-ID: <1416558446969-5729529.post@n5.nabble.com> Hello, I have got an vtk application where I visualize a digitalisation process. This means that i am constantly manipulating underlaying polydata. The application crashes often when I hover the mouse over the window because the renderer wants to refresh the content which is updated at this moment. Is there a possibility to delay the render process untio I have updated the data or can I switch off the auto render function when I am hovering over the window? Thanks in advance Maaschn -- View this message in context: http://vtk.1045678.n5.nabble.com/crash-because-of-auto-rendering-when-hovering-mouse-over-Window-tp5729529.html Sent from the VTK - Users mailing list archive at Nabble.com. From oesteban at die.upm.es Fri Nov 21 04:06:26 2014 From: oesteban at die.upm.es (Oscar Esteban) Date: Fri, 21 Nov 2014 10:06:26 +0100 Subject: [vtkusers] Off screen rendering In-Reply-To: <78F9B6DDA0C6954984D71A2BE85A0A669573D6E3B8@fxdcvymbaay001.EQ1AAY.local> References: <78F9B6DDA0C6954984D71A2BE85A0A669573D6E3B8@fxdcvymbaay001.EQ1AAY.local> Message-ID: Thanks a lot :) I will try both solutions, Vincent's first as it is easier :D. Then, I'll recompile OSMesa because I'm using ubuntu's and debian's stable ones, and look like they are still in 6.5.3. Thank you so much. Oscar *______________________________________* *Oscar Esteban* PhD Student / Researcher Biomedical Image Technologies (BIT), UPM ETSI Telecomunicaci?n Lab. C203, Av. Complutense s/n - E-28040 Madrid (Spain) +34 915 495 700 ext.4234 Signal Processing Laboratory (LTS5), EPFL-STI-IEL-LTS5 ELD 224 (B?timent ELD), Station 11, CH-1015 Lausanne, Switzerland On 20 November 2014 14:59, Vincent SALEH wrote: > Hi Oscar, > > I am no expert but I would advise you to use > renderWindow->OffScreenRenderingOn(); instead of renderWindow-> > SetOffScreenRendering(1); with vtk-6.1.0. > > That worked fine for me. > > Good luck! > > > > Vincent > > > > *De :* vtkusers [mailto:vtkusers-bounces at vtk.org] *De la part de* > Sebastien Jourdain > *Envoy? :* jeudi 20 novembre 2014 14:33 > *? :* Oscar Esteban > *Cc :* vtkusers > *Objet :* Re: [vtkusers] Off screen rendering > > > > Which version of OSMesa did you point to? > > > > That's not exactly the same project described here but it should be almost > the same CMake properties. > > > > > http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/os_mesa > > > > Seb > > > > On Thu, Nov 20, 2014 at 6:12 AM, Oscar Esteban > wrote: > > Dear experts, > > > > I'm trying to write png files slicing a 3D volume through its coordinates > planes, with the contours corresponding to the intersection of the plane > and a number of surfaces (triangularized meshes). I need to run the code in > a headless debian server. The code I'm trying is here: > https://gist.github.com/oesteban/f22e155146ce6738b431 > > > > I have tried with no success with vtk-5.10.1 and vtk-6.1.0. I've tested on > 5.10.1 with this example: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/OffScreenRendering, > and 6.1.0 with https://gist.github.com/certik/5687727. > > > > Successful compilation of both versions included: > > VTK_OPENGL_HAS_OSMESA=ON > VTK_USE_X=OFF > > VTK_USE_TK=OFF > VTK_USE_OFFSCREEN=ON > > > > > > Program received signal SIGSEGV, Segmentation fault. > > __rawmemchr_sse2 () at ../sysdeps/x86_64/multiarch/../rawmemchr.S:31 > > 31 ../sysdeps/x86_64/multiarch/../rawmemchr.S: No such file or > directory. > > (gdb) bt > > #0 __rawmemchr_sse2 () at ../sysdeps/x86_64/multiarch/../rawmemchr.S:31 > > #1 0x00007ffff45fe150 in _IO_str_init_static_internal (sf=0x7fffffffc380, > ptr=0x0, size=0, pstart=0x0) at strops.c:45 > > #2 0x00007ffff45f2875 in _IO_vsscanf (string=0x0, format=0x142d1c3 > "%d.%d", args=0x7fffffffc4a0) at iovsscanf.c:44 > > #3 0x00007ffff45dea38 in __sscanf (s=0x0, format=0xffffffff
0xffffffff out of bounds>) at sscanf.c:34 > > #4 0x0000000000c5b549 in > vtkOpenGLExtensionManager::ReadOpenGLExtensions() () > > #5 0x0000000000c5ac80 in vtkOpenGLExtensionManager::Update() () > > #6 0x0000000000c5a957 in > vtkOpenGLExtensionManager::ExtensionSupported(char const*) () > > #7 0x0000000000bf131a in vtkOpenGLRenderWindow::OpenGLInitContext() () > > #8 0x0000000000bef19d in vtkOpenGLRenderWindow::OpenGLInit() () > > #9 0x0000000000bb566d in vtkOSOpenGLRenderWindow::Start() () > > #10 0x0000000000b2e900 in vtkRenderWindow::DoStereoRender() () > > #11 0x0000000000b2fc7d in vtkRenderWindow::DoFDRender() () > > #12 0x0000000000b30515 in vtkRenderWindow::DoAARender() () > > #13 0x0000000000b2eceb in vtkRenderWindow::Render() () > > #14 0x0000000000b399c5 in > vtkWindowToImageFilter::RequestData(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > > #15 0x0000000000b39cc1 in > vtkWindowToImageFilter::ProcessRequest(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > > #16 0x0000000000920204 in vtkExecutive::CallAlgorithm(vtkInformation*, > int, vtkInformationVector**, vtkInformationVector*) () > > #17 0x000000000091cd1c in > vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > > #18 0x000000000091bbe1 in > vtkCompositeDataPipeline::ExecuteData(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > > #19 0x000000000091f4a1 in > vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > > #20 0x0000000000927c61 in > vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, > vtkInformationVector**, vtkInformationVector*) () > > #21 0x000000000091dc87 in vtkDemandDrivenPipeline::UpdateData(int) () > > #22 0x0000000000929401 in vtkStreamingDemandDrivenPipeline::Update(int) () > > #23 0x000000000070752d in main () > > > > The same segfault is reported here: > http://public.kitware.com/pipermail/vtkusers/2013-April/079007.html, > however the solution they linked is not available anymore. Threads in the > list around the pointed dates are: > http://vtk.1045678.n5.nabble.com/VTK-offscreen-rendering-td4548419.html#a4856413 > and http://www.vtk.org/pipermail/vtkusers/2011-July/068951.html. > > > > I did not try the patch in the last link, I would prefer not to modify VTK > source. > > > > Thanks a lot. Best wishes, > > Oscar > > > > > > *______________________________________* > > *Oscar Esteban* > > PhD Student / Researcher > > > > Biomedical Image Technologies (BIT), UPM > ETSI Telecomunicaci?n Lab. C203, Av. Complutense s/n - E-28040 Madrid > (Spain) > +34 915 495 700 ext.4234 > > > > Signal Processing Laboratory (LTS5), EPFL-STI-IEL-LTS5 > ELD 224 (B?timent ELD), Station 11, CH-1015 Lausanne, Switzerland > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sd016808 at gmail.com Fri Nov 21 04:12:12 2014 From: sd016808 at gmail.com (sd016808) Date: Fri, 21 Nov 2014 02:12:12 -0700 (MST) Subject: [vtkusers] Blending multiple textures with different texture coordinates In-Reply-To: References: Message-ID: <1416561132940-5729531.post@n5.nabble.com> Hello, did you find the solution? I encounter the same question with you. If you have any idea, please tell me! Thanks! Harris -- View this message in context: http://vtk.1045678.n5.nabble.com/Blending-multiple-textures-with-different-texture-coordinates-tp5728659p5729531.html Sent from the VTK - Users mailing list archive at Nabble.com. From l.nagy at ed.ac.uk Fri Nov 21 04:29:04 2014 From: l.nagy at ed.ac.uk (Lesleis Nagy) Date: Fri, 21 Nov 2014 09:29:04 +0000 Subject: [vtkusers] Error Calculating Vector Field From Scalars (when using vtkArrayCalculator) Message-ID: Hello, I'm having some trouble calculating a vector field from a list of three scalars using the vtkArrayCalculator. When I attempt to run my program vtk gives me the following error message: ERROR: In /tmp/vtk5-Sa5a/VTK5.10.1/Filtering/vtkExecutive.cxx, line 756 vtkStreamingDemandDrivenPipeline (0x7fe8b9426170): Algorithm vtkArrayCalculator(0x7fe8b9425150) returned failure for request: vtkInformation (0x7fe8b94263c0) Debug: Off Modified Time: 207 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA_OBJECT FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 I have included a minimal sample program which is based on the vtkArrayCalculator unit tests, along with a sample tecplot data file that reproduces the error in a zipped tar file (attached). Additionally I'm compiling my code on OSX 10.9.5 using the homebrew installation of VTK5 (if any more information is required regarding my platform please let me know). Could someone please offer any assistance/advice as to where I'm going wrong? Kind regards Lesleis Nagy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.tar.gz Type: application/x-gzip Size: 103609 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From l.nagy at ed.ac.uk Fri Nov 21 04:40:10 2014 From: l.nagy at ed.ac.uk (Lesleis Nagy) Date: Fri, 21 Nov 2014 09:40:10 +0000 Subject: [vtkusers] Error Calculating Vector Field From Scalars (when using vtkArrayCalculator) In-Reply-To: References: Message-ID: <9ED3FD18-0837-477E-B575-D7AF07F083C9@ed.ac.uk> Hello, Apologies, I just realised that I've posted this question multiple times to the list. I've been re-ordering my mailboxes and was only seeing responses from vtkusers-owner! Apologies again for spamming the list. Les On 21 Nov 2014, at 09:29, Lesleis Nagy wrote: > Hello, > > I'm having some trouble calculating a vector field from a list of three scalars using the vtkArrayCalculator. When I attempt to run my program vtk gives me the following error message: > > ERROR: In /tmp/vtk5-Sa5a/VTK5.10.1/Filtering/vtkExecutive.cxx, line 756 > vtkStreamingDemandDrivenPipeline (0x7fe8b9426170): Algorithm vtkArrayCalculator(0x7fe8b9425150) returned failure for request: vtkInformation (0x7fe8b94263c0) > Debug: Off > Modified Time: 207 > Reference Count: 1 > Registered Events: (none) > Request: REQUEST_DATA_OBJECT > FORWARD_DIRECTION: 0 > ALGORITHM_AFTER_FORWARD: 1 > > I have included a minimal sample program which is based on the vtkArrayCalculator unit tests, along with a sample tecplot data file that reproduces the error in a zipped tar file (attached). Additionally I'm compiling my code on OSX 10.9.5 using the homebrew installation of VTK5 (if any more information is required regarding my platform please let me know). Could someone please offer any assistance/advice as to where I'm going wrong? > > Kind regards > Lesleis Nagy > > > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://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://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: From jim at jslengineeringsoftware.com Fri Nov 21 09:31:57 2014 From: jim at jslengineeringsoftware.com (James Labiak) Date: Fri, 21 Nov 2014 09:31:57 -0500 Subject: [vtkusers] vtk installation CMake java problem In-Reply-To: References: <546CABD6.1090101@jslengineeringsoftware.com> <546DFF6B.3090909@jslengineeringsoftware.com> Message-ID: <546F4CDD.2080000@jslengineeringsoftware.com> Hi Seb, The JOGL and SWT were red, so I thought that I needed them. I just want a standard installation that I can use in Java with Eclipse, then be able to distribute a program to another user. With them off, the installation seemed to work but a sample java file cone.java showed java path errors in Eclipse. I had set CLASSPATH sys var to C:\vtk_jar\vtk.jar;C:\vtk_build\Wrapping\Java; and included C:\Program Files\VTK\natives-Windows-AMD64 in the PATH variable as well as C:\jdk1.7.0_60\bin;C:\jdk1.7.0_60\jre\bin. From the VTK user's guide, it sounds like I want an installation with BUILD_SHARED_LIBS off for my distribution purpose. When I do that, I get tons of errors in VS 2013. Am compiling with 64 bit set in CMake. I'm not familiar with Maven, and wasn't sure what to do with the binary distribution files. Thanks, Jim On 11/20/2014 11:03 AM, Sebastien Jourdain wrote: > Hi James, > > Please keep the thread on the mailing list so other community members > could benefit from your question as well. > > So first of all, why did you turn ON both VTK_JAVA_JOGL_COMPONENT and > VTK_JAVA_SWT_COMPONENT? > > Turning any of those option require that you have already the SWT > native library or the JOGL library installed on your system. On top of > that, none of them is required to have a VTK with Java Wrapping working. > > In fact, you can probably just download the generated binaries from > our VTK dashboard if you don't want to build VTK yourself here: > > http://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=Super-build > > Then if you truly want to build VTK and have the JOGL rendering > classes available on top of the default ones, then the best approach > is to get them using Maven. And you should make sure you provide the > path to the proper jar inside your CMake config. (You may need to > toggle the advance mode to see them). > > Seb > > > On Thu, Nov 20, 2014 at 8:49 AM, James Labiak > > wrote: > > Hi Seb, > Thanks for picking up on this. I put images of the CMake > process below, also the JOGL source directory files and the > JOGL build directory files. Here are some errors that VS 2013 > gives, which is how I noticed that the JOGL classes were > missing from the build directory structure. If I should be > placing JOGL jar files somewhere, then I'm not sure where to > put it(them). > Thanks, > Jim > > 386>CUSTOMBUILD : warning : [options] bootstrap class path not > set in conjunction with -source 1.5 > 386> > C:\vtk_build\java\vtk\rendering\jogl\vtkAbstractJoglComponent.java:3: > error: package javax.media.opengl does not exist > 386> import javax.media.opengl.GLAutoDrawable; > > 386> > C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:5: > error: package javax.media.opengl.awt does not exist > 386> import javax.media.opengl.awt.GLJPanel; > > 387> > C:\vtk_build\java\vtk\rendering\jogl\vtkJoglCanvasComponent.java:20: > error: cannot find symbol > 387> public vtkJoglCanvasComponent(vtkRenderWindow > renderWindow, GLCapabilities capabilities) { > 387> ^ > 387> symbol: class GLCapabilities > 387> location: class vtkJoglCanvasComponent > 387> > C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:3: > error: package javax.media.opengl does not exist > 387> import javax.media.opengl.GLCapabilities; > > > > > On 11/19/2014 2:38 PM, Sebastien Jourdain wrote: >> Hi James, >> >> What do you mean by JOGL classes? Are you talking about the >> JOGL jar files? >> What did you change in your CMake configuration step? >> >> Seb >> >> On Wed, Nov 19, 2014 at 8:40 AM, James Labiak >> > > wrote: >> >> Hello, >> I am trying to install vtk with Java wrapping. When I >> build in VS 2013, I get errors related to jogl classes >> not being found. I placed the missing classes java files >> in the vtk\rendering\jogl directories as necessary, but >> after CMake Configure and Generate steps, the jogl files >> are not being copied to the build directory >> Java\rendering\jogl directory and so I get the same >> errors upon build in VS 2013. >> 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 >> >> 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 Fri Nov 21 10:45:18 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 21 Nov 2014 08:45:18 -0700 Subject: [vtkusers] vtk installation CMake java problem In-Reply-To: <546F4CDD.2080000@jslengineeringsoftware.com> References: <546CABD6.1090101@jslengineeringsoftware.com> <546DFF6B.3090909@jslengineeringsoftware.com> <546F4CDD.2080000@jslengineeringsoftware.com> Message-ID: Hi Jim, The red mean, "New option available base on your previous choice". For the BUILD_SHARED_LIBS = OFF, I have quite some doubt. That would mean you want a static build with the Java wrapping. And to my knowledge, that is not possible with Java. Otherwise, to have VTK works within the Eclipse development environment, I usually need 2 things: - Add the vtk.jar to the classpath of my project - (on Windows) expend the PATH env var to add the directory that contains all the dll of VTK. If you pick the option to package VTK for Java, then you will need to unzip the native JAR file and point to the content of its directory. Seb On Fri, Nov 21, 2014 at 7:31 AM, James Labiak < jim at jslengineeringsoftware.com> wrote: > Hi Seb, > The JOGL and SWT were red, so I thought that I needed them. I just want a > standard installation that I can use in Java with Eclipse, then be able to > distribute a program to another user. With them off, the installation > seemed to work but a sample java file cone.java showed java path errors in > Eclipse. I had set CLASSPATH sys var to > C:\vtk_jar\vtk.jar;C:\vtk_build\Wrapping\Java; and included C:\Program > Files\VTK\natives-Windows-AMD64 in the PATH variable as well as > C:\jdk1.7.0_60\bin;C:\jdk1.7.0_60\jre\bin. From the VTK user's guide, it > sounds like I want an installation with BUILD_SHARED_LIBS off for my > distribution purpose. When I do that, I get tons of errors in VS 2013. Am > compiling with 64 bit set in CMake. I'm not familiar with Maven, and wasn't > sure what to do with the binary distribution files. > Thanks, > Jim > > > > On 11/20/2014 11:03 AM, Sebastien Jourdain wrote: > > Hi James, > > Please keep the thread on the mailing list so other community members > could benefit from your question as well. > > So first of all, why did you turn ON both VTK_JAVA_JOGL_COMPONENT and > VTK_JAVA_SWT_COMPONENT? > > Turning any of those option require that you have already the SWT native > library or the JOGL library installed on your system. On top of that, none > of them is required to have a VTK with Java Wrapping working. > > In fact, you can probably just download the generated binaries from our > VTK dashboard if you don't want to build VTK yourself here: > > > http://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=Super-build > > Then if you truly want to build VTK and have the JOGL rendering classes > available on top of the default ones, then the best approach is to get them > using Maven. And you should make sure you provide the path to the proper > jar inside your CMake config. (You may need to toggle the advance mode to > see them). > > Seb > >> >> On Thu, Nov 20, 2014 at 8:49 AM, James Labiak < >> jim at jslengineeringsoftware.com> wrote: >> >>> Hi Seb, >>> Thanks for picking up on this. I put images of the CMake process below, >>> also the JOGL source directory files and the JOGL build directory files. >>> Here are some errors that VS 2013 gives, which is how I noticed that the >>> JOGL classes were missing from the build directory structure. If I should >>> be placing JOGL jar files somewhere, then I'm not sure where to put >>> it(them). >>> Thanks, >>> Jim >>> >>> 386>CUSTOMBUILD : warning : [options] bootstrap class path not set in >>> conjunction with -source 1.5 >>> 386> >>> C:\vtk_build\java\vtk\rendering\jogl\vtkAbstractJoglComponent.java:3: >>> error: package javax.media.opengl does not exist >>> 386> import javax.media.opengl.GLAutoDrawable; >>> >>> 386> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:5: >>> error: package javax.media.opengl.awt does not exist >>> 386> import javax.media.opengl.awt.GLJPanel; >>> >>> 387> >>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglCanvasComponent.java:20: error: >>> cannot find symbol >>> 387> public vtkJoglCanvasComponent(vtkRenderWindow renderWindow, >>> GLCapabilities capabilities) { >>> 387> ^ >>> 387> symbol: class GLCapabilities >>> 387> location: class vtkJoglCanvasComponent >>> 387> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:3: >>> error: package javax.media.opengl does not exist >>> 387> import javax.media.opengl.GLCapabilities; >>> >>> >>> >>> >>> On 11/19/2014 2:38 PM, Sebastien Jourdain wrote: >>> >>> Hi James, >>> >>> What do you mean by JOGL classes? Are you talking about the JOGL jar >>> files? >>> What did you change in your CMake configuration step? >>> >>> Seb >>> >>> On Wed, Nov 19, 2014 at 8:40 AM, James Labiak < >>> jim at jslengineeringsoftware.com> wrote: >>> >>>> Hello, >>>> I am trying to install vtk with Java wrapping. When I build in VS 2013, >>>> I get errors related to jogl classes not being found. I placed the missing >>>> classes java files in the vtk\rendering\jogl directories as necessary, but >>>> after CMake Configure and Generate steps, the jogl files are not being >>>> copied to the build directory Java\rendering\jogl directory and so I get >>>> the same errors upon build in VS 2013. >>>> 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 >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fengc at student.ethz.ch Fri Nov 21 11:34:19 2014 From: fengc at student.ethz.ch (Feng Chao) Date: Fri, 21 Nov 2014 16:34:19 +0000 Subject: [vtkusers] About variable length vtkCellArray Message-ID: <8718729D93E35F42ABAE7CF9D01CC12F1156F2C6@MBX110.d.ethz.ch> Dear All, I am new to VTK. I want to visualize polyhedrons. However in my polyhedrons the number of faces and number of nodes in each face is not known at compile time. Thus if I use vtkCellArray it gave me error message "variable length array "XX" is used". I figured out a solution like this, vtkIdType* p; for(int i=0;i From jim at jslengineeringsoftware.com Fri Nov 21 14:07:38 2014 From: jim at jslengineeringsoftware.com (James Labiak) Date: Fri, 21 Nov 2014 14:07:38 -0500 Subject: [vtkusers] vtk installation CMake java problem In-Reply-To: References: <546CABD6.1090101@jslengineeringsoftware.com> <546DFF6B.3090909@jslengineeringsoftware.com> <546F4CDD.2080000@jslengineeringsoftware.com> Message-ID: <546F8D7A.8090503@jslengineeringsoftware.com> Hi Seb, I followed your directions, and now Eclipse gives the error "Exception in thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava in java.library.path". I have set the Path to include the dll library, but there is no dll called vtkCommonJava. Jim On 11/21/2014 10:45 AM, Sebastien Jourdain wrote: > Hi Jim, > > The red mean, "New option available base on your previous choice". > For the BUILD_SHARED_LIBS = OFF, I have quite some doubt. That would > mean you want a static build with the Java wrapping. And to my > knowledge, that is not possible with Java. > > Otherwise, to have VTK works within the Eclipse development > environment, I usually need 2 things: > - Add the vtk.jar to the classpath of my project > - (on Windows) expend the PATH env var to add the directory that > contains all the dll of VTK. If you pick the option to package VTK for > Java, then you will need to unzip the native JAR file and point to the > content of its directory. > > Seb > > On Fri, Nov 21, 2014 at 7:31 AM, James Labiak > > wrote: > > Hi Seb, > The JOGL and SWT were red, so I thought that I needed them. I just > want a standard installation that I can use in Java with Eclipse, > then be able to distribute a program to another user. With them > off, the installation seemed to work but a sample java file > cone.java showed java path errors in Eclipse. I had set CLASSPATH > sys var to C:\vtk_jar\vtk.jar;C:\vtk_build\Wrapping\Java; and > included C:\Program Files\VTK\natives-Windows-AMD64 in the PATH > variable as well as C:\jdk1.7.0_60\bin;C:\jdk1.7.0_60\jre\bin. > From the VTK user's guide, it sounds like I want an installation > with BUILD_SHARED_LIBS off for my distribution purpose. When I do > that, I get tons of errors in VS 2013. Am compiling with 64 bit > set in CMake. I'm not familiar with Maven, and wasn't sure what to > do with the binary distribution files. > Thanks, > Jim > > > > On 11/20/2014 11:03 AM, Sebastien Jourdain wrote: >> Hi James, >> >> Please keep the thread on the mailing list so other community >> members could benefit from your question as well. >> >> So first of all, why did you turn ON both VTK_JAVA_JOGL_COMPONENT >> and VTK_JAVA_SWT_COMPONENT? >> >> Turning any of those option require that you have already the SWT >> native library or the JOGL library installed on your system. On >> top of that, none of them is required to have a VTK with Java >> Wrapping working. >> >> In fact, you can probably just download the generated binaries >> from our VTK dashboard if you don't want to build VTK yourself here: >> >> http://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=Super-build >> >> Then if you truly want to build VTK and have the JOGL rendering >> classes available on top of the default ones, then the best >> approach is to get them using Maven. And you should make sure you >> provide the path to the proper jar inside your CMake config. (You >> may need to toggle the advance mode to see them). >> >> Seb >> >> >> On Thu, Nov 20, 2014 at 8:49 AM, James Labiak >> > > wrote: >> >> Hi Seb, >> Thanks for picking up on this. I put images of the CMake >> process below, also the JOGL source directory files and >> the JOGL build directory files. Here are some errors that >> VS 2013 gives, which is how I noticed that the JOGL >> classes were missing from the build directory structure. >> If I should be placing JOGL jar files somewhere, then I'm >> not sure where to put it(them). >> Thanks, >> Jim >> >> 386>CUSTOMBUILD : warning : [options] bootstrap class >> path not set in conjunction with -source 1.5 >> 386> >> C:\vtk_build\java\vtk\rendering\jogl\vtkAbstractJoglComponent.java:3: >> error: package javax.media.opengl does not exist >> 386> import javax.media.opengl.GLAutoDrawable; >> >> 386> >> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:5: >> error: package javax.media.opengl.awt does not exist >> 386> import javax.media.opengl.awt.GLJPanel; >> >> 387> >> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglCanvasComponent.java:20: >> error: cannot find symbol >> 387> public vtkJoglCanvasComponent(vtkRenderWindow >> renderWindow, GLCapabilities capabilities) { >> 387> ^ >> 387> symbol: class GLCapabilities >> 387> location: class vtkJoglCanvasComponent >> 387> >> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:3: >> error: package javax.media.opengl does not exist >> 387> import javax.media.opengl.GLCapabilities; >> >> >> >> >> On 11/19/2014 2:38 PM, Sebastien Jourdain wrote: >>> Hi James, >>> >>> What do you mean by JOGL classes? Are you talking about >>> the JOGL jar files? >>> What did you change in your CMake configuration step? >>> >>> Seb >>> >>> On Wed, Nov 19, 2014 at 8:40 AM, James Labiak >>> >> > wrote: >>> >>> Hello, >>> I am trying to install vtk with Java wrapping. When >>> I build in VS 2013, I get errors related to jogl >>> classes not being found. I placed the missing >>> classes java files in the vtk\rendering\jogl >>> directories as necessary, but after CMake Configure >>> and Generate steps, the jogl files are not being >>> copied to the build directory Java\rendering\jogl >>> directory and so I get the same errors upon build in >>> VS 2013. >>> 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 >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> > > -- James Labiak JSL Engineering and Software 6545 Lainhart Rd. Altamont, NY 12009 Phone: 518-861-1113 Mobile: 231-638-3725 email: jim at jslengineeringsoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Fri Nov 21 14:19:22 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 21 Nov 2014 12:19:22 -0700 Subject: [vtkusers] vtk installation CMake java problem In-Reply-To: <546F8D7A.8090503@jslengineeringsoftware.com> References: <546CABD6.1090101@jslengineeringsoftware.com> <546DFF6B.3090909@jslengineeringsoftware.com> <546F4CDD.2080000@jslengineeringsoftware.com> <546F8D7A.8090503@jslengineeringsoftware.com> Message-ID: The PATH should point to the directory that contains the dll's, not the dll's themselves. On Fri, Nov 21, 2014 at 12:07 PM, James Labiak < jim at jslengineeringsoftware.com> wrote: > Hi Seb, > I followed your directions, and now Eclipse gives the error "Exception in > thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava in > java.library.path". I have set the Path to include the dll library, but > there is no dll called vtkCommonJava. > Jim > > > > On 11/21/2014 10:45 AM, Sebastien Jourdain wrote: > > Hi Jim, > > The red mean, "New option available base on your previous choice". > For the BUILD_SHARED_LIBS = OFF, I have quite some doubt. That would mean > you want a static build with the Java wrapping. And to my knowledge, that > is not possible with Java. > > Otherwise, to have VTK works within the Eclipse development environment, > I usually need 2 things: > - Add the vtk.jar to the classpath of my project > - (on Windows) expend the PATH env var to add the directory that contains > all the dll of VTK. If you pick the option to package VTK for Java, then > you will need to unzip the native JAR file and point to the content of its > directory. > > Seb > > On Fri, Nov 21, 2014 at 7:31 AM, James Labiak < > jim at jslengineeringsoftware.com> wrote: > >> Hi Seb, >> The JOGL and SWT were red, so I thought that I needed them. I just want a >> standard installation that I can use in Java with Eclipse, then be able to >> distribute a program to another user. With them off, the installation >> seemed to work but a sample java file cone.java showed java path errors in >> Eclipse. I had set CLASSPATH sys var to >> C:\vtk_jar\vtk.jar;C:\vtk_build\Wrapping\Java; and included C:\Program >> Files\VTK\natives-Windows-AMD64 in the PATH variable as well as >> C:\jdk1.7.0_60\bin;C:\jdk1.7.0_60\jre\bin. From the VTK user's guide, it >> sounds like I want an installation with BUILD_SHARED_LIBS off for my >> distribution purpose. When I do that, I get tons of errors in VS 2013. Am >> compiling with 64 bit set in CMake. I'm not familiar with Maven, and wasn't >> sure what to do with the binary distribution files. >> Thanks, >> Jim >> >> >> >> On 11/20/2014 11:03 AM, Sebastien Jourdain wrote: >> >> Hi James, >> >> Please keep the thread on the mailing list so other community members >> could benefit from your question as well. >> >> So first of all, why did you turn ON both VTK_JAVA_JOGL_COMPONENT and >> VTK_JAVA_SWT_COMPONENT? >> >> Turning any of those option require that you have already the SWT >> native library or the JOGL library installed on your system. On top of >> that, none of them is required to have a VTK with Java Wrapping working. >> >> In fact, you can probably just download the generated binaries from our >> VTK dashboard if you don't want to build VTK yourself here: >> >> >> http://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=Super-build >> >> Then if you truly want to build VTK and have the JOGL rendering classes >> available on top of the default ones, then the best approach is to get them >> using Maven. And you should make sure you provide the path to the proper >> jar inside your CMake config. (You may need to toggle the advance mode to >> see them). >> >> Seb >> >>> >>> On Thu, Nov 20, 2014 at 8:49 AM, James Labiak < >>> jim at jslengineeringsoftware.com> wrote: >>> >>>> Hi Seb, >>>> Thanks for picking up on this. I put images of the CMake process below, >>>> also the JOGL source directory files and the JOGL build directory files. >>>> Here are some errors that VS 2013 gives, which is how I noticed that the >>>> JOGL classes were missing from the build directory structure. If I should >>>> be placing JOGL jar files somewhere, then I'm not sure where to put >>>> it(them). >>>> Thanks, >>>> Jim >>>> >>>> 386>CUSTOMBUILD : warning : [options] bootstrap class path not set in >>>> conjunction with -source 1.5 >>>> 386> >>>> C:\vtk_build\java\vtk\rendering\jogl\vtkAbstractJoglComponent.java:3: >>>> error: package javax.media.opengl does not exist >>>> 386> import javax.media.opengl.GLAutoDrawable; >>>> >>>> 386> >>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:5: error: >>>> package javax.media.opengl.awt does not exist >>>> 386> import javax.media.opengl.awt.GLJPanel; >>>> >>>> 387> >>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglCanvasComponent.java:20: error: >>>> cannot find symbol >>>> 387> public vtkJoglCanvasComponent(vtkRenderWindow renderWindow, >>>> GLCapabilities capabilities) { >>>> 387> ^ >>>> 387> symbol: class GLCapabilities >>>> 387> location: class vtkJoglCanvasComponent >>>> 387> >>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:3: error: >>>> package javax.media.opengl does not exist >>>> 387> import javax.media.opengl.GLCapabilities; >>>> >>>> >>>> >>>> >>>> On 11/19/2014 2:38 PM, Sebastien Jourdain wrote: >>>> >>>> Hi James, >>>> >>>> What do you mean by JOGL classes? Are you talking about the JOGL jar >>>> files? >>>> What did you change in your CMake configuration step? >>>> >>>> Seb >>>> >>>> On Wed, Nov 19, 2014 at 8:40 AM, James Labiak < >>>> jim at jslengineeringsoftware.com> wrote: >>>> >>>>> Hello, >>>>> I am trying to install vtk with Java wrapping. When I build in VS >>>>> 2013, I get errors related to jogl classes not being found. I placed the >>>>> missing classes java files in the vtk\rendering\jogl directories as >>>>> necessary, but after CMake Configure and Generate steps, the jogl files are >>>>> not being copied to the build directory Java\rendering\jogl directory and >>>>> so I get the same errors upon build in VS 2013. >>>>> 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 >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >> > > -- > James Labiak > JSL Engineering and Software > 6545 Lainhart Rd. > Altamont, NY 12009 > Phone: 518-861-1113 > Mobile: 231-638-3725 > email: jim at jslengineeringsoftware.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at jslengineeringsoftware.com Fri Nov 21 15:35:37 2014 From: jim at jslengineeringsoftware.com (James Labiak) Date: Fri, 21 Nov 2014 15:35:37 -0500 Subject: [vtkusers] vtk installation CMake java problem In-Reply-To: References: <546CABD6.1090101@jslengineeringsoftware.com> <546DFF6B.3090909@jslengineeringsoftware.com> <546F4CDD.2080000@jslengineeringsoftware.com> <546F8D7A.8090503@jslengineeringsoftware.com> Message-ID: <546FA219.4030508@jslengineeringsoftware.com> I believe that is what I have. PATH includes directory which contains the dlls. On 11/21/2014 2:19 PM, Sebastien Jourdain wrote: > The PATH should point to the directory that contains the dll's, not > the dll's themselves. > > > > On Fri, Nov 21, 2014 at 12:07 PM, James Labiak > > wrote: > > Hi Seb, > I followed your directions, and now Eclipse gives the error > "Exception in thread "main" java.lang.UnsatisfiedLinkError: no > vtkCommonJava in java.library.path". I have set the Path to > include the dll library, but there is no dll called vtkCommonJava. > Jim > > > > On 11/21/2014 10:45 AM, Sebastien Jourdain wrote: >> Hi Jim, >> >> The red mean, "New option available base on your previous choice". >> For the BUILD_SHARED_LIBS = OFF, I have quite some doubt. That >> would mean you want a static build with the Java wrapping. And to >> my knowledge, that is not possible with Java. >> >> Otherwise, to have VTK works within the Eclipse development >> environment, I usually need 2 things: >> - Add the vtk.jar to the classpath of my project >> - (on Windows) expend the PATH env var to add the directory that >> contains all the dll of VTK. If you pick the option to package >> VTK for Java, then you will need to unzip the native JAR file and >> point to the content of its directory. >> >> Seb >> >> On Fri, Nov 21, 2014 at 7:31 AM, James Labiak >> > > wrote: >> >> Hi Seb, >> The JOGL and SWT were red, so I thought that I needed them. I >> just want a standard installation that I can use in Java with >> Eclipse, then be able to distribute a program to another >> user. With them off, the installation seemed to work but a >> sample java file cone.java showed java path errors in >> Eclipse. I had set CLASSPATH sys var to >> C:\vtk_jar\vtk.jar;C:\vtk_build\Wrapping\Java; and included >> C:\Program Files\VTK\natives-Windows-AMD64 in the PATH >> variable as well as >> C:\jdk1.7.0_60\bin;C:\jdk1.7.0_60\jre\bin. From the VTK >> user's guide, it sounds like I want an installation with >> BUILD_SHARED_LIBS off for my distribution purpose. When I do >> that, I get tons of errors in VS 2013. Am compiling with 64 >> bit set in CMake. I'm not familiar with Maven, and wasn't >> sure what to do with the binary distribution files. >> Thanks, >> Jim >> >> >> >> On 11/20/2014 11:03 AM, Sebastien Jourdain wrote: >>> Hi James, >>> >>> Please keep the thread on the mailing list so other >>> community members could benefit from your question as well. >>> >>> So first of all, why did you turn ON both >>> VTK_JAVA_JOGL_COMPONENT and VTK_JAVA_SWT_COMPONENT? >>> >>> Turning any of those option require that you have already >>> the SWT native library or the JOGL library installed on your >>> system. On top of that, none of them is required to have a >>> VTK with Java Wrapping working. >>> >>> In fact, you can probably just download the generated >>> binaries from our VTK dashboard if you don't want to build >>> VTK yourself here: >>> >>> http://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=Super-build >>> >>> Then if you truly want to build VTK and have the JOGL >>> rendering classes available on top of the default ones, then >>> the best approach is to get them using Maven. And you should >>> make sure you provide the path to the proper jar inside your >>> CMake config. (You may need to toggle the advance mode to >>> see them). >>> >>> Seb >>> >>> >>> On Thu, Nov 20, 2014 at 8:49 AM, James Labiak >>> >> > wrote: >>> >>> Hi Seb, >>> Thanks for picking up on this. I put images of the >>> CMake process below, also the JOGL source directory >>> files and the JOGL build directory files. Here are >>> some errors that VS 2013 gives, which is how I >>> noticed that the JOGL classes were missing from the >>> build directory structure. If I should be placing >>> JOGL jar files somewhere, then I'm not sure where to >>> put it(them). >>> Thanks, >>> Jim >>> >>> 386>CUSTOMBUILD : warning : [options] bootstrap >>> class path not set in conjunction with -source 1.5 >>> 386> >>> C:\vtk_build\java\vtk\rendering\jogl\vtkAbstractJoglComponent.java:3: >>> error: package javax.media.opengl does not exist >>> 386> import javax.media.opengl.GLAutoDrawable; >>> >>> 386> >>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:5: >>> error: package javax.media.opengl.awt does not exist >>> 386> import javax.media.opengl.awt.GLJPanel; >>> >>> 387> >>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglCanvasComponent.java:20: >>> error: cannot find symbol >>> 387> public vtkJoglCanvasComponent(vtkRenderWindow >>> renderWindow, GLCapabilities capabilities) { >>> 387> ^ >>> 387> symbol: class GLCapabilities >>> 387> location: class vtkJoglCanvasComponent >>> 387> >>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:3: >>> error: package javax.media.opengl does not exist >>> 387> import javax.media.opengl.GLCapabilities; >>> >>> >>> >>> >>> On 11/19/2014 2:38 PM, Sebastien Jourdain wrote: >>>> Hi James, >>>> >>>> What do you mean by JOGL classes? Are you talking >>>> about the JOGL jar files? >>>> What did you change in your CMake configuration step? >>>> >>>> Seb >>>> >>>> On Wed, Nov 19, 2014 at 8:40 AM, James Labiak >>>> >>> > wrote: >>>> >>>> Hello, >>>> I am trying to install vtk with Java wrapping. >>>> When I build in VS 2013, I get errors related >>>> to jogl classes not being found. I placed the >>>> missing classes java files in the >>>> vtk\rendering\jogl directories as necessary, >>>> but after CMake Configure and Generate steps, >>>> the jogl files are not being copied to the >>>> build directory Java\rendering\jogl directory >>>> and so I get the same errors upon build in VS >>>> 2013. >>>> 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 >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >> >> > > -- > James Labiak > JSL Engineering and Software > 6545 Lainhart Rd. > Altamont, NY 12009 > Phone:518-861-1113 > Mobile:231-638-3725 > email:jim at jslengineeringsoftware.com > > -- James Labiak JSL Engineering and Software 6545 Lainhart Rd. Altamont, NY 12009 Phone: 518-861-1113 Mobile: 231-638-3725 email: jim at jslengineeringsoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hdgdgiji.png Type: image/png Size: 1119 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ddbajdjf.png Type: image/png Size: 22288 bytes Desc: not available URL: From bill.lorensen at gmail.com Fri Nov 21 15:49:49 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 21 Nov 2014 15:49:49 -0500 Subject: [vtkusers] Error Calculating Vector Field From Scalars (when using vtkArrayCalculator) In-Reply-To: <9ED3FD18-0837-477E-B575-D7AF07F083C9@ed.ac.uk> References: <9ED3FD18-0837-477E-B575-D7AF07F083C9@ed.ac.uk> Message-ID: Here is a working version. #include "vtkSmartPointer.h" #include "vtkTecplotReader.h" #include "vtkArrayCalculator.h" #include "vtkMultiBlockDataSet.h" #include "vtkUnstructuredGrid.h" #include "vtkPointData.h" #include "vtkDoubleArray.h" #include "vtkFloatArray.h" int main(int argc, char** argv) { std::cout << "Loading tecplot file" << std::endl; vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("sphere.tec"); reader->Update(); std::cout << "Data arrays: " << std::endl; for (int i = 0; i < reader->GetNumberOfDataArrays(); ++i) { std::cout << "\t" << reader->GetDataArrayName(i) << std::endl; } std::cout << std::endl; std::cout << "Calculating vector field from scalars" << endl; vtkSmartPointer mag = vtkSmartPointer::New(); mag->SetAttributeModeToUsePointData(); mag->AddScalarArrayName("Mx"); mag->AddScalarArrayName("My"); mag->AddScalarArrayName("Mz"); mag->SetFunction("Mx*iHat + My*jHat + Mz*kHat"); mag->SetResultArrayName("mag"); mag->SetInputData(reader->GetOutput()->GetBlock(0)); mag->Update(); vtkUnstructuredGrid * usg = vtkUnstructuredGrid::SafeDownCast(mag->GetOutput()); vtkSmartPointer magArray= vtkDoubleArray::SafeDownCast( usg->GetPointData()->GetArray("mag")); vtkSmartPointer mxArray= vtkFloatArray::SafeDownCast( usg->GetPointData()->GetArray("Mx")); vtkSmartPointer myArray= vtkFloatArray::SafeDownCast( usg->GetPointData()->GetArray("My")); vtkSmartPointer mzArray= vtkFloatArray::SafeDownCast( usg->GetPointData()->GetArray("Mz")); for(vtkIdType i = 0; i < magArray->GetNumberOfTuples(); i++) { double magVal[3]; magArray->GetTuple(i, magVal); std::cout << i << ": " << mxArray->GetValue(i) << " , " << myArray->GetValue(i) << " , " << mzArray->GetValue(i) << " = " << "(" << magVal[0] << ", " << magVal[1] << ", " << magVal[2] << ")" << std::endl; } return EXIT_SUCCESS; } On Fri, Nov 21, 2014 at 4:40 AM, Lesleis Nagy wrote: > Hello, > > Apologies, I just realised that I've posted this question multiple times to > the list. I've been re-ordering my mailboxes and was only seeing responses > from vtkusers-owner! > > Apologies again for spamming the list. > Les > > On 21 Nov 2014, at 09:29, Lesleis Nagy wrote: > > Hello, > > I'm having some trouble calculating a vector field from a list of three > scalars using the vtkArrayCalculator. When I attempt to run my program vtk > gives me the following error message: > > ERROR: In /tmp/vtk5-Sa5a/VTK5.10.1/Filtering/vtkExecutive.cxx, line 756 > vtkStreamingDemandDrivenPipeline (0x7fe8b9426170): Algorithm > vtkArrayCalculator(0x7fe8b9425150) returned failure for request: > vtkInformation (0x7fe8b94263c0) > Debug: Off > Modified Time: 207 > Reference Count: 1 > Registered Events: (none) > Request: REQUEST_DATA_OBJECT > FORWARD_DIRECTION: 0 > ALGORITHM_AFTER_FORWARD: 1 > > I have included a minimal sample program which is based on the > vtkArrayCalculator unit tests, along with a sample tecplot data file that > reproduces the error in a zipped tar file (attached). Additionally I'm > compiling my code on OSX 10.9.5 using the homebrew installation of VTK5 (if > any more information is required regarding my platform please let me know). > Could someone please offer any assistance/advice as to where I'm going > wrong? > > Kind regards > Lesleis Nagy > > > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > > > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From sebastien.jourdain at kitware.com Fri Nov 21 16:21:55 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 21 Nov 2014 14:21:55 -0700 Subject: [vtkusers] vtk installation CMake java problem In-Reply-To: <546FA219.4030508@jslengineeringsoftware.com> References: <546CABD6.1090101@jslengineeringsoftware.com> <546DFF6B.3090909@jslengineeringsoftware.com> <546F4CDD.2080000@jslengineeringsoftware.com> <546F8D7A.8090503@jslengineeringsoftware.com> <546FA219.4030508@jslengineeringsoftware.com> Message-ID: Is your path properly available in Eclipse? Usually, I directly set it in Eclipse? DYLD_LIBRARY_PATH is similar to PATH on Mac. [image: Inline image 1] On Fri, Nov 21, 2014 at 1:35 PM, James Labiak < jim at jslengineeringsoftware.com> wrote: > I believe that is what I have. PATH includes directory which contains the > dlls. > > > > > > On 11/21/2014 2:19 PM, Sebastien Jourdain wrote: > > The PATH should point to the directory that contains the dll's, not the > dll's themselves. > > > > On Fri, Nov 21, 2014 at 12:07 PM, James Labiak < > jim at jslengineeringsoftware.com> wrote: > >> Hi Seb, >> I followed your directions, and now Eclipse gives the error "Exception in >> thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava in >> java.library.path". I have set the Path to include the dll library, but >> there is no dll called vtkCommonJava. >> Jim >> >> >> >> On 11/21/2014 10:45 AM, Sebastien Jourdain wrote: >> >> Hi Jim, >> >> The red mean, "New option available base on your previous choice". >> For the BUILD_SHARED_LIBS = OFF, I have quite some doubt. That would >> mean you want a static build with the Java wrapping. And to my knowledge, >> that is not possible with Java. >> >> Otherwise, to have VTK works within the Eclipse development >> environment, I usually need 2 things: >> - Add the vtk.jar to the classpath of my project >> - (on Windows) expend the PATH env var to add the directory that contains >> all the dll of VTK. If you pick the option to package VTK for Java, then >> you will need to unzip the native JAR file and point to the content of its >> directory. >> >> Seb >> >> On Fri, Nov 21, 2014 at 7:31 AM, James Labiak < >> jim at jslengineeringsoftware.com> wrote: >> >>> Hi Seb, >>> The JOGL and SWT were red, so I thought that I needed them. I just want >>> a standard installation that I can use in Java with Eclipse, then be able >>> to distribute a program to another user. With them off, the installation >>> seemed to work but a sample java file cone.java showed java path errors in >>> Eclipse. I had set CLASSPATH sys var to >>> C:\vtk_jar\vtk.jar;C:\vtk_build\Wrapping\Java; and included C:\Program >>> Files\VTK\natives-Windows-AMD64 in the PATH variable as well as >>> C:\jdk1.7.0_60\bin;C:\jdk1.7.0_60\jre\bin. From the VTK user's guide, it >>> sounds like I want an installation with BUILD_SHARED_LIBS off for my >>> distribution purpose. When I do that, I get tons of errors in VS 2013. Am >>> compiling with 64 bit set in CMake. I'm not familiar with Maven, and wasn't >>> sure what to do with the binary distribution files. >>> Thanks, >>> Jim >>> >>> >>> >>> On 11/20/2014 11:03 AM, Sebastien Jourdain wrote: >>> >>> Hi James, >>> >>> Please keep the thread on the mailing list so other community members >>> could benefit from your question as well. >>> >>> So first of all, why did you turn ON both VTK_JAVA_JOGL_COMPONENT and >>> VTK_JAVA_SWT_COMPONENT? >>> >>> Turning any of those option require that you have already the SWT >>> native library or the JOGL library installed on your system. On top of >>> that, none of them is required to have a VTK with Java Wrapping working. >>> >>> In fact, you can probably just download the generated binaries from >>> our VTK dashboard if you don't want to build VTK yourself here: >>> >>> >>> http://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=Super-build >>> >>> Then if you truly want to build VTK and have the JOGL rendering >>> classes available on top of the default ones, then the best approach is to >>> get them using Maven. And you should make sure you provide the path to the >>> proper jar inside your CMake config. (You may need to toggle the advance >>> mode to see them). >>> >>> Seb >>> >>>> >>>> On Thu, Nov 20, 2014 at 8:49 AM, James Labiak < >>>> jim at jslengineeringsoftware.com> wrote: >>>> >>>>> Hi Seb, >>>>> Thanks for picking up on this. I put images of the CMake process >>>>> below, also the JOGL source directory files and the JOGL build directory >>>>> files. Here are some errors that VS 2013 gives, which is how I noticed that >>>>> the JOGL classes were missing from the build directory structure. If I >>>>> should be placing JOGL jar files somewhere, then I'm not sure where to put >>>>> it(them). >>>>> Thanks, >>>>> Jim >>>>> >>>>> 386>CUSTOMBUILD : warning : [options] bootstrap class path not set in >>>>> conjunction with -source 1.5 >>>>> 386> >>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkAbstractJoglComponent.java:3: >>>>> error: package javax.media.opengl does not exist >>>>> 386> import javax.media.opengl.GLAutoDrawable; >>>>> >>>>> 386> >>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:5: error: >>>>> package javax.media.opengl.awt does not exist >>>>> 386> import javax.media.opengl.awt.GLJPanel; >>>>> >>>>> 387> >>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglCanvasComponent.java:20: error: >>>>> cannot find symbol >>>>> 387> public vtkJoglCanvasComponent(vtkRenderWindow renderWindow, >>>>> GLCapabilities capabilities) { >>>>> 387> ^ >>>>> 387> symbol: class GLCapabilities >>>>> 387> location: class vtkJoglCanvasComponent >>>>> 387> >>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:3: error: >>>>> package javax.media.opengl does not exist >>>>> 387> import javax.media.opengl.GLCapabilities; >>>>> >>>>> >>>>> >>>>> >>>>> On 11/19/2014 2:38 PM, Sebastien Jourdain wrote: >>>>> >>>>> Hi James, >>>>> >>>>> What do you mean by JOGL classes? Are you talking about the JOGL jar >>>>> files? >>>>> What did you change in your CMake configuration step? >>>>> >>>>> Seb >>>>> >>>>> On Wed, Nov 19, 2014 at 8:40 AM, James Labiak < >>>>> jim at jslengineeringsoftware.com> wrote: >>>>> >>>>>> Hello, >>>>>> I am trying to install vtk with Java wrapping. When I build in VS >>>>>> 2013, I get errors related to jogl classes not being found. I placed the >>>>>> missing classes java files in the vtk\rendering\jogl directories as >>>>>> necessary, but after CMake Configure and Generate steps, the jogl files are >>>>>> not being copied to the build directory Java\rendering\jogl directory and >>>>>> so I get the same errors upon build in VS 2013. >>>>>> 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 >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>> >>> >> >> -- >> James Labiak >> JSL Engineering and Software >> 6545 Lainhart Rd. >> Altamont, NY 12009 >> Phone: 518-861-1113 >> Mobile: 231-638-3725 >> email: jim at jslengineeringsoftware.com >> >> > > -- > James Labiak > JSL Engineering and Software > 6545 Lainhart Rd. > Altamont, NY 12009 > Phone: 518-861-1113 > Mobile: 231-638-3725 > email: jim at jslengineeringsoftware.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: eclipse-path.png Type: image/png Size: 123741 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ddbajdjf.png Type: image/png Size: 22288 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hdgdgiji.png Type: image/png Size: 1119 bytes Desc: not available URL: From rekha.pyage at gmail.com Sat Nov 22 05:28:25 2014 From: rekha.pyage at gmail.com (rekha) Date: Sat, 22 Nov 2014 03:28:25 -0700 (MST) Subject: [vtkusers] polydata clipping Message-ID: <1416652105321-5729549.post@n5.nabble.com> hello all... can one help me with using polydata clipping... how can i use http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget2 with vtkClipPolyData.. thanks in advance.. -- View this message in context: http://vtk.1045678.n5.nabble.com/polydata-clipping-tp5729549.html Sent from the VTK - Users mailing list archive at Nabble.com. From andy.bauer at kitware.com Sat Nov 22 11:42:38 2014 From: andy.bauer at kitware.com (Andy Bauer) Date: Sat, 22 Nov 2014 11:42:38 -0500 Subject: [vtkusers] About variable length vtkCellArray In-Reply-To: <8718729D93E35F42ABAE7CF9D01CC12F1156F2C6@MBX110.d.ethz.ch> References: <8718729D93E35F42ABAE7CF9D01CC12F1156F2C6@MBX110.d.ethz.ch> Message-ID: Your code looks to be incomplete or wrong. Your p variable isn't assigned any dynamic memory. On Fri, Nov 21, 2014 at 11:34 AM, Feng Chao wrote: > Dear All, > > I am new to VTK. I want to visualize polyhedrons. However in my > polyhedrons the number of faces and number of nodes in each face is not > known at compile time. Thus if I use vtkCellArray it gave me error message > "variable length array "XX" is used". I figured out a solution like this, > > vtkIdType* p; > for(int i=0;i { > *p=sth; > p++ > } > for(int i=0;i { > p--; > } > > and it works very well on my test code. Unfortunately I am working with a > software using PETSc library and assign dynamic memory this way gives me > some PETSc errors. I wonder on VTK side do you have better solution for > variable length array like this? For example some class like > vtkCellStandardVector to support std::vector of c++? > > Thank you! > > Best, > Chao > > ------------------------------ > Chao Feng (??) > > Master student in Computational Biology & Bioinformatics > ETH Z?rich, Zuerich > Switzerland > > Iber Group, Department of Biosystems Science and Engineering, > ETH Z?rich, Basel > Switzerland > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zlvlezhnin at gmail.com Sun Nov 23 02:44:30 2014 From: zlvlezhnin at gmail.com (Evgenii Lezhnin) Date: Sun, 23 Nov 2014 13:44:30 +0600 Subject: [vtkusers] invalid enum Message-ID: <5471905E.3020007@gmail.com> I'm building VTK6 with examples on Windows 7. Source is git master checkout. After running any example, for instance cone2 I'm getting an error: "failed after RenderInternal 1 OpenGL errors detected 0 : (1280) Invalid enum" How can I solve this problem? From andy.bauer at kitware.com Sun Nov 23 12:37:46 2014 From: andy.bauer at kitware.com (Andy Bauer) Date: Sun, 23 Nov 2014 12:37:46 -0500 Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: Hi Paul, I have a potential fix for this bug at http://review.source.kitware.com/#/t/5040/. It feels like a hack but I couldn't figure out a better way to do it yet. I also modified a test to verify that the proper cells were getting removed, based on the cell's points. If you see a better way to do this, please let me know. Thanks, Andy On Mon, Nov 17, 2014 at 5:37 PM, Andy Bauer wrote: > Hi Paul, > > Thanks for the input. I'm at SC14 right now so I won't be able to look at > this until I get back. > > Cheers, > Andy > > On Mon, Nov 17, 2014 at 4:26 AM, Paul Edwards > wrote: > >> Hi Andy, >> >> I've attached a sample program demonstrating the issue. The example >> just loads the sphere.vtk file, removes all cells where the "Result" >> value is not 0 and writes the result to output.vtk. The tar file also >> contains the correct and incorrect output. >> >> Best regards, >> Paul >> >> On 15 November 2014 02:59, Andy Bauer wrote: >> > Hi Paul, >> > >> > I was part of that fix and I think it's correct. There may have been >> more to >> > that fix though since it took a couple of shots before getting it >> correct so >> > the git history may not be as pristine as desired. If you can give me >> more >> > specifics on the bug though I can try to see what's going on with it. >> If I >> > remember correctly though, that fix had to do with the fact that some >> places >> > thought that the order of iterating through cells in a vtkPolyData was >> first >> > through all vertex cells, then all line cells, then all polys and >> finally >> > through all triangle strips, irregardless of the order that cells got >> > inserted in (i.e. using InsertNextCell()). The reality is that for >> polydata >> > that cells are indeed iterated through in their insertion order. The >> test >> > that was added for those changes hopefully shows the proper >> functionality >> > along with associated cell data manipulations as well. >> > >> > Regards, >> > Andy >> > >> > >> > >> > On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards > > >> > wrote: >> >> >> >> Hi, >> >> >> >> I've just noticed an issue with vtkPolyData. I had been calling >> >> vtkPolyData::DeleteCell to remove the unwanted cells, followed by a >> >> call to vtkPolyData::RemoveDeletedCells. The result is not as it >> >> should be in the latest version. To fix I just started reverting >> >> previous commits. I tracked it down to the following: >> >> >> >> bugfix 14459: Iterating through polydata cells incorrectly. >> >> commit: 44131c6d05375692af8b6b38cf4291983bdd8f45 >> >> >> >> Sorry but I do not have time to provide a test case or track where in >> >> this commit lies the problem. I just thought I would give details >> >> here in case anyone else notices the same problem and is searching for >> >> a solution. >> >> >> >> Best regards, >> >> Paul >> >> _______________________________________________ >> >> Powered by www.kitware.com >> >> >> >> Visit other Kitware open-source projects at >> >> http://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://public.kitware.com/mailman/listinfo/vtkusers >> > >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vianamp at gmail.com Sun Nov 23 17:30:50 2014 From: vianamp at gmail.com (matheus_viana) Date: Sun, 23 Nov 2014 15:30:50 -0700 (MST) Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: <1416781850031-5729553.post@n5.nabble.com> Hi guys. This is just to inform that I also found the same problem when unwanted cells are deleted. I will check Andy's solution now. -m -- View this message in context: http://vtk.1045678.n5.nabble.com/Fwd-Bug-in-vtkPolyData-tp5729465p5729553.html Sent from the VTK - Users mailing list archive at Nabble.com. From vianamp at gmail.com Sun Nov 23 18:57:08 2014 From: vianamp at gmail.com (matheus_viana) Date: Sun, 23 Nov 2014 16:57:08 -0700 (MST) Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: <1416781850031-5729553.post@n5.nabble.com> References: <1416781850031-5729553.post@n5.nabble.com> Message-ID: <1416787028044-5729554.post@n5.nabble.com> Hi Andy. Your solution is working fine for me. Let's see if someone comes up with something else. Thanks though. -m -- View this message in context: http://vtk.1045678.n5.nabble.com/Fwd-Bug-in-vtkPolyData-tp5729465p5729554.html Sent from the VTK - Users mailing list archive at Nabble.com. From Orlando.RIVERA at mtu.de Mon Nov 24 07:49:05 2014 From: Orlando.RIVERA at mtu.de (RIVERA, Orlando) Date: Mon, 24 Nov 2014 12:49:05 +0000 Subject: [vtkusers] Set a vtkStringArray and vtkIntArray as output Message-ID: Dear Community I have been trying for a while and I checked some examples as well I just want in a reader by RequestData to add two extra output ports one for vtkStringArray and one to vtkIntArray Something lilke: void RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector){ { ...... vtkSmartPointer outinfo1= outputVector->GetInformationObject(1); vtkSmartPointer strArr= vtkStringArray::SafeDownCast(outInfo1->Get(vtkDataObject::DATA_OBJECT())); strArr->SetNumberOfValues() ; ... } I think I need to tell outputVector somewhere that its second element is a vtkStringArray? I saw all plugins send vtkPoint, Grids etc but nothing like string-int arrays .Sorry for my naivety ! Regards Orlando -- MTU Aero Engines AG Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. Rainer Martens, Michael Schrey?gg, Dr. Stefan Weingartner Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt Sitz der Gesellschaft/Registered Office: Muenchen Handelsregister/Commercial Register: Muenchen HRB 157206 Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet. This e-mail and any attached documents are proprietary to MTU, confidential or protected by law. If you are not the intended recipient, please advise the sender and delete this message and its attachments. Any unauthorised storing, copying or distribution is prohibited. From jim at jslengineeringsoftware.com Mon Nov 24 09:51:09 2014 From: jim at jslengineeringsoftware.com (James Labiak) Date: Mon, 24 Nov 2014 09:51:09 -0500 Subject: [vtkusers] vtk installation CMake java problem In-Reply-To: References: <546CABD6.1090101@jslengineeringsoftware.com> <546DFF6B.3090909@jslengineeringsoftware.com> <546F4CDD.2080000@jslengineeringsoftware.com> <546F8D7A.8090503@jslengineeringsoftware.com> <546FA219.4030508@jslengineeringsoftware.com> Message-ID: <547345DD.30100@jslengineeringsoftware.com> First, thanks for all of your help in getting VTK configured; I really appreciate it. I'm trying to document this well this in case other users find this thread. I think that my last question is how to run my application on other computers that don't have VTK installed (best method to make the libraries available on the other machines). Maybe it wasn't necessary in my case to set the path in eclipse, because I got DemoJavaVTK.java working from http://www.particleincell.com/blog/2011/vtk-java-visualization/ Maybe it is though in other cases or if I compiled it into a standalone program. I do have everything set in the Win 7 PATH and CLASSPATH env. variables. However, Cone.java from the VTK Examples\Tutorial\Step1Java\Cone still gives the library errors. There is no dll called vtkCommonJava.dll in version 6.1.0, but it appears from older internet posts that maybe this file existed in a previous release of VTK (?). If I comment out the lines that try to load the following libraries // static { // System.out.println(System.getProperty("java.library.path")); // //System.loadLibrary("vtkCommonJava"); // //System.loadLibrary("vtkFilteringJava"); // //System.loadLibrary("vtkIOJava"); // //System.loadLibrary("vtkImagingJava"); // //System.loadLibrary("vtkGraphicsJava"); // //System.loadLibrary("vtkRenderingJava"); // } then add a section to load all libraries static { if (!vtkNativeLibrary.LoadAllNativeLibraries()) { for (vtkNativeLibrary lib : vtkNativeLibrary.values()) { if (!lib.IsLoaded()) System.out.println(lib.GetLibraryName() + " not loaded"); } System.out.println("Make sure the search path is correct: "); System.out.println(System.getProperty("java.library.path")); } vtkNativeLibrary.DisableOutputWindow(null); } Cone.java works correctly. Some other examples also appear to work correctly if I repeat the above to load all of the libraries. On 11/21/2014 4:21 PM, Sebastien Jourdain wrote: > Is your path properly available in Eclipse? > > Usually, I directly set it in Eclipse? > > DYLD_LIBRARY_PATH is similar to PATH on Mac. > > Inline image 1 > > On Fri, Nov 21, 2014 at 1:35 PM, James Labiak > > wrote: > > I believe that is what I have. PATH includes directory which > contains the dlls. > > > > > > On 11/21/2014 2:19 PM, Sebastien Jourdain wrote: >> The PATH should point to the directory that contains the dll's, >> not the dll's themselves. >> >> >> >> On Fri, Nov 21, 2014 at 12:07 PM, James Labiak >> > > wrote: >> >> Hi Seb, >> I followed your directions, and now Eclipse gives the error >> "Exception in thread "main" java.lang.UnsatisfiedLinkError: >> no vtkCommonJava in java.library.path". I have set the Path >> to include the dll library, but there is no dll called >> vtkCommonJava. >> Jim >> >> >> >> On 11/21/2014 10:45 AM, Sebastien Jourdain wrote: >>> Hi Jim, >>> >>> The red mean, "New option available base on your previous >>> choice". >>> For the BUILD_SHARED_LIBS = OFF, I have quite some doubt. >>> That would mean you want a static build with the Java >>> wrapping. And to my knowledge, that is not possible with Java. >>> >>> Otherwise, to have VTK works within the Eclipse development >>> environment, I usually need 2 things: >>> - Add the vtk.jar to the classpath of my project >>> - (on Windows) expend the PATH env var to add the directory >>> that contains all the dll of VTK. If you pick the option to >>> package VTK for Java, then you will need to unzip the native >>> JAR file and point to the content of its directory. >>> >>> Seb >>> >>> On Fri, Nov 21, 2014 at 7:31 AM, James Labiak >>> >> > wrote: >>> >>> Hi Seb, >>> The JOGL and SWT were red, so I thought that I needed >>> them. I just want a standard installation that I can use >>> in Java with Eclipse, then be able to distribute a >>> program to another user. With them off, the installation >>> seemed to work but a sample java file cone.java showed >>> java path errors in Eclipse. I had set CLASSPATH sys var >>> to C:\vtk_jar\vtk.jar;C:\vtk_build\Wrapping\Java; and >>> included C:\Program Files\VTK\natives-Windows-AMD64 in >>> the PATH variable as well as >>> C:\jdk1.7.0_60\bin;C:\jdk1.7.0_60\jre\bin. From the VTK >>> user's guide, it sounds like I want an installation with >>> BUILD_SHARED_LIBS off for my distribution purpose. When >>> I do that, I get tons of errors in VS 2013. Am compiling >>> with 64 bit set in CMake. I'm not familiar with Maven, >>> and wasn't sure what to do with the binary distribution >>> files. >>> Thanks, >>> Jim >>> >>> >>> >>> On 11/20/2014 11:03 AM, Sebastien Jourdain wrote: >>>> Hi James, >>>> >>>> Please keep the thread on the mailing list so other >>>> community members could benefit from your question as well. >>>> >>>> So first of all, why did you turn ON both >>>> VTK_JAVA_JOGL_COMPONENT and VTK_JAVA_SWT_COMPONENT? >>>> >>>> Turning any of those option require that you have >>>> already the SWT native library or the JOGL library >>>> installed on your system. On top of that, none of them >>>> is required to have a VTK with Java Wrapping working. >>>> >>>> In fact, you can probably just download the generated >>>> binaries from our VTK dashboard if you don't want to >>>> build VTK yourself here: >>>> >>>> http://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=Super-build >>>> >>>> Then if you truly want to build VTK and have the JOGL >>>> rendering classes available on top of the default ones, >>>> then the best approach is to get them using Maven. And >>>> you should make sure you provide the path to the proper >>>> jar inside your CMake config. (You may need to toggle >>>> the advance mode to see them). >>>> >>>> Seb >>>> >>>> >>>> On Thu, Nov 20, 2014 at 8:49 AM, James Labiak >>>> >>> > wrote: >>>> >>>> Hi Seb, >>>> Thanks for picking up on this. I put images of >>>> the CMake process below, also the JOGL source >>>> directory files and the JOGL build directory >>>> files. Here are some errors that VS 2013 gives, >>>> which is how I noticed that the JOGL classes >>>> were missing from the build directory >>>> structure. If I should be placing JOGL jar >>>> files somewhere, then I'm not sure where to put >>>> it(them). >>>> Thanks, >>>> Jim >>>> >>>> 386>CUSTOMBUILD : warning : [options] bootstrap >>>> class path not set in conjunction with -source 1.5 >>>> 386> >>>> C:\vtk_build\java\vtk\rendering\jogl\vtkAbstractJoglComponent.java:3: >>>> error: package javax.media.opengl does not exist >>>> 386> import javax.media.opengl.GLAutoDrawable; >>>> >>>> 386> >>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:5: >>>> error: package javax.media.opengl.awt does not >>>> exist >>>> 386> import javax.media.opengl.awt.GLJPanel; >>>> >>>> 387> >>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglCanvasComponent.java:20: >>>> error: cannot find symbol >>>> 387> public >>>> vtkJoglCanvasComponent(vtkRenderWindow >>>> renderWindow, GLCapabilities capabilities) { >>>> 387> ^ >>>> 387> symbol: class GLCapabilities >>>> 387> location: class vtkJoglCanvasComponent >>>> 387> >>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:3: >>>> error: package javax.media.opengl does not exist >>>> 387> import javax.media.opengl.GLCapabilities; >>>> >>>> >>>> >>>> >>>> On 11/19/2014 2:38 PM, Sebastien Jourdain wrote: >>>>> Hi James, >>>>> >>>>> What do you mean by JOGL classes? Are you >>>>> talking about the JOGL jar files? >>>>> What did you change in your CMake >>>>> configuration step? >>>>> >>>>> Seb >>>>> >>>>> On Wed, Nov 19, 2014 at 8:40 AM, James Labiak >>>>> >>>> > wrote: >>>>> >>>>> Hello, >>>>> I am trying to install vtk with Java >>>>> wrapping. When I build in VS 2013, I get >>>>> errors related to jogl classes not being >>>>> found. I placed the missing classes java >>>>> files in the vtk\rendering\jogl >>>>> directories as necessary, but after CMake >>>>> Configure and Generate steps, the jogl >>>>> files are not being copied to the build >>>>> directory Java\rendering\jogl directory >>>>> and so I get the same errors upon build in >>>>> VS 2013. >>>>> 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 >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>> >>> >> >> -- >> James Labiak >> JSL Engineering and Software >> 6545 Lainhart Rd. >> Altamont, NY 12009 >> Phone:518-861-1113 >> Mobile:231-638-3725 >> email:jim at jslengineeringsoftware.com >> >> > > -- > James Labiak > JSL Engineering and Software > 6545 Lainhart Rd. > Altamont, NY 12009 > Phone:518-861-1113 > Mobile:231-638-3725 > email:jim at jslengineeringsoftware.com > > -- James Labiak JSL Engineering and Software 6545 Lainhart Rd. Altamont, NY 12009 Phone: 518-861-1113 Mobile: 231-638-3725 email: jim at jslengineeringsoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 123741 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1119 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 22288 bytes Desc: not available URL: From sebastien.jourdain at kitware.com Mon Nov 24 10:48:18 2014 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 24 Nov 2014 08:48:18 -0700 Subject: [vtkusers] vtk installation CMake java problem In-Reply-To: <547345DD.30100@jslengineeringsoftware.com> References: <546CABD6.1090101@jslengineeringsoftware.com> <546DFF6B.3090909@jslengineeringsoftware.com> <546F4CDD.2080000@jslengineeringsoftware.com> <546F8D7A.8090503@jslengineeringsoftware.com> <546FA219.4030508@jslengineeringsoftware.com> <547345DD.30100@jslengineeringsoftware.com> Message-ID: Hi James, you right, the examples code should be updated to properly load the libraries. The name of those libraries changed between VTK 5 and 6 and we forgot fix that example code base to properly use the generic way to load them. Seb On Mon, Nov 24, 2014 at 7:51 AM, James Labiak < jim at jslengineeringsoftware.com> wrote: > First, thanks for all of your help in getting VTK configured; I really > appreciate it. I'm trying to document this well this in case other users > find this thread. I think that my last question is how to run my > application on other computers that don't have VTK installed (best method > to make the libraries available on the other machines). > > Maybe it wasn't necessary in my case to set the path in eclipse, because I > got DemoJavaVTK.java working from > http://www.particleincell.com/blog/2011/vtk-java-visualization/ > Maybe it is though in other cases or if I compiled it into a standalone > program. I do have everything set in the Win 7 PATH and CLASSPATH env. > variables. > However, Cone.java from the VTK Examples\Tutorial\Step1Java\Cone still > gives the library errors. There is no dll called vtkCommonJava.dll in > version 6.1.0, but it appears from older internet posts that maybe this > file existed in a previous release of VTK (?). If I comment out the lines > that try to load the following libraries > // static { > // System.out.println(System.getProperty("java.library.path")); > // //System.loadLibrary("vtkCommonJava"); > // //System.loadLibrary("vtkFilteringJava"); > // //System.loadLibrary("vtkIOJava"); > // //System.loadLibrary("vtkImagingJava"); > // //System.loadLibrary("vtkGraphicsJava"); > // //System.loadLibrary("vtkRenderingJava"); > // } > > then add a section to load all libraries > > static > { > if (!vtkNativeLibrary.LoadAllNativeLibraries()) > { > for (vtkNativeLibrary lib : vtkNativeLibrary.values()) > { > if (!lib.IsLoaded()) > System.out.println(lib.GetLibraryName() + " not > loaded"); > } > > System.out.println("Make sure the search path is correct: "); > System.out.println(System.getProperty("java.library.path")); > } > vtkNativeLibrary.DisableOutputWindow(null); > } > > Cone.java works correctly. Some other examples also appear to work > correctly if I repeat the above to load all of the libraries. > > > > > > On 11/21/2014 4:21 PM, Sebastien Jourdain wrote: > > Is your path properly available in Eclipse? > > Usually, I directly set it in Eclipse? > > DYLD_LIBRARY_PATH is similar to PATH on Mac. > > [image: Inline image 1] > > On Fri, Nov 21, 2014 at 1:35 PM, James Labiak < > jim at jslengineeringsoftware.com> wrote: > >> I believe that is what I have. PATH includes directory which contains >> the dlls. >> >> >> >> >> >> On 11/21/2014 2:19 PM, Sebastien Jourdain wrote: >> >> The PATH should point to the directory that contains the dll's, not the >> dll's themselves. >> >> >> >> On Fri, Nov 21, 2014 at 12:07 PM, James Labiak < >> jim at jslengineeringsoftware.com> wrote: >> >>> Hi Seb, >>> I followed your directions, and now Eclipse gives the error "Exception >>> in thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava in >>> java.library.path". I have set the Path to include the dll library, but >>> there is no dll called vtkCommonJava. >>> Jim >>> >>> >>> >>> On 11/21/2014 10:45 AM, Sebastien Jourdain wrote: >>> >>> Hi Jim, >>> >>> The red mean, "New option available base on your previous choice". >>> For the BUILD_SHARED_LIBS = OFF, I have quite some doubt. That would >>> mean you want a static build with the Java wrapping. And to my knowledge, >>> that is not possible with Java. >>> >>> Otherwise, to have VTK works within the Eclipse development >>> environment, I usually need 2 things: >>> - Add the vtk.jar to the classpath of my project >>> - (on Windows) expend the PATH env var to add the directory that >>> contains all the dll of VTK. If you pick the option to package VTK for >>> Java, then you will need to unzip the native JAR file and point to the >>> content of its directory. >>> >>> Seb >>> >>> On Fri, Nov 21, 2014 at 7:31 AM, James Labiak < >>> jim at jslengineeringsoftware.com> wrote: >>> >>>> Hi Seb, >>>> The JOGL and SWT were red, so I thought that I needed them. I just want >>>> a standard installation that I can use in Java with Eclipse, then be able >>>> to distribute a program to another user. With them off, the installation >>>> seemed to work but a sample java file cone.java showed java path errors in >>>> Eclipse. I had set CLASSPATH sys var to >>>> C:\vtk_jar\vtk.jar;C:\vtk_build\Wrapping\Java; and included C:\Program >>>> Files\VTK\natives-Windows-AMD64 in the PATH variable as well as >>>> C:\jdk1.7.0_60\bin;C:\jdk1.7.0_60\jre\bin. From the VTK user's guide, it >>>> sounds like I want an installation with BUILD_SHARED_LIBS off for my >>>> distribution purpose. When I do that, I get tons of errors in VS 2013. Am >>>> compiling with 64 bit set in CMake. I'm not familiar with Maven, and wasn't >>>> sure what to do with the binary distribution files. >>>> Thanks, >>>> Jim >>>> >>>> >>>> >>>> On 11/20/2014 11:03 AM, Sebastien Jourdain wrote: >>>> >>>> Hi James, >>>> >>>> Please keep the thread on the mailing list so other community members >>>> could benefit from your question as well. >>>> >>>> So first of all, why did you turn ON both VTK_JAVA_JOGL_COMPONENT and >>>> VTK_JAVA_SWT_COMPONENT? >>>> >>>> Turning any of those option require that you have already the SWT >>>> native library or the JOGL library installed on your system. On top of >>>> that, none of them is required to have a VTK with Java Wrapping working. >>>> >>>> In fact, you can probably just download the generated binaries from >>>> our VTK dashboard if you don't want to build VTK yourself here: >>>> >>>> >>>> http://open.cdash.org/index.php?project=VTK&filtercount=1&field1=groupname/string&compare1=63&value1=Super-build >>>> >>>> Then if you truly want to build VTK and have the JOGL rendering >>>> classes available on top of the default ones, then the best approach is to >>>> get them using Maven. And you should make sure you provide the path to the >>>> proper jar inside your CMake config. (You may need to toggle the advance >>>> mode to see them). >>>> >>>> Seb >>>> >>>>> >>>>> On Thu, Nov 20, 2014 at 8:49 AM, James Labiak < >>>>> jim at jslengineeringsoftware.com> wrote: >>>>> >>>>>> Hi Seb, >>>>>> Thanks for picking up on this. I put images of the CMake process >>>>>> below, also the JOGL source directory files and the JOGL build directory >>>>>> files. Here are some errors that VS 2013 gives, which is how I noticed that >>>>>> the JOGL classes were missing from the build directory structure. If I >>>>>> should be placing JOGL jar files somewhere, then I'm not sure where to put >>>>>> it(them). >>>>>> Thanks, >>>>>> Jim >>>>>> >>>>>> 386>CUSTOMBUILD : warning : [options] bootstrap class path not set in >>>>>> conjunction with -source 1.5 >>>>>> 386> >>>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkAbstractJoglComponent.java:3: >>>>>> error: package javax.media.opengl does not exist >>>>>> 386> import javax.media.opengl.GLAutoDrawable; >>>>>> >>>>>> 386> >>>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:5: error: >>>>>> package javax.media.opengl.awt does not exist >>>>>> 386> import javax.media.opengl.awt.GLJPanel; >>>>>> >>>>>> 387> >>>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglCanvasComponent.java:20: error: >>>>>> cannot find symbol >>>>>> 387> public vtkJoglCanvasComponent(vtkRenderWindow renderWindow, >>>>>> GLCapabilities capabilities) { >>>>>> 387> >>>>>> ^ >>>>>> 387> symbol: class GLCapabilities >>>>>> 387> location: class vtkJoglCanvasComponent >>>>>> 387> >>>>>> C:\vtk_build\java\vtk\rendering\jogl\vtkJoglPanelComponent.java:3: error: >>>>>> package javax.media.opengl does not exist >>>>>> 387> import javax.media.opengl.GLCapabilities; >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On 11/19/2014 2:38 PM, Sebastien Jourdain wrote: >>>>>> >>>>>> Hi James, >>>>>> >>>>>> What do you mean by JOGL classes? Are you talking about the JOGL >>>>>> jar files? >>>>>> What did you change in your CMake configuration step? >>>>>> >>>>>> Seb >>>>>> >>>>>> On Wed, Nov 19, 2014 at 8:40 AM, James Labiak < >>>>>> jim at jslengineeringsoftware.com> wrote: >>>>>> >>>>>>> Hello, >>>>>>> I am trying to install vtk with Java wrapping. When I build in VS >>>>>>> 2013, I get errors related to jogl classes not being found. I placed the >>>>>>> missing classes java files in the vtk\rendering\jogl directories as >>>>>>> necessary, but after CMake Configure and Generate steps, the jogl files are >>>>>>> not being copied to the build directory Java\rendering\jogl directory and >>>>>>> so I get the same errors upon build in VS 2013. >>>>>>> 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 >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>> >>>> >>> >>> -- >>> James Labiak >>> JSL Engineering and Software >>> 6545 Lainhart Rd. >>> Altamont, NY 12009 >>> Phone: 518-861-1113 >>> Mobile: 231-638-3725 >>> email: jim at jslengineeringsoftware.com >>> >>> >> >> -- >> James Labiak >> JSL Engineering and Software >> 6545 Lainhart Rd. >> Altamont, NY 12009 >> Phone: 518-861-1113 >> Mobile: 231-638-3725 >> email: jim at jslengineeringsoftware.com >> >> > > -- > James Labiak > JSL Engineering and Software > 6545 Lainhart Rd. > Altamont, NY 12009 > Phone: 518-861-1113 > Mobile: 231-638-3725 > email: jim at jslengineeringsoftware.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 123741 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1119 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 22288 bytes Desc: not available URL: From simon.d.hewitt at gmail.com Mon Nov 24 14:11:11 2014 From: simon.d.hewitt at gmail.com (Simon Hewitt) Date: Mon, 24 Nov 2014 19:11:11 +0000 Subject: [vtkusers] MacPort VTK6.1.0 failed Message-ID: I ran sudo port vtk @6.1.0 It failed within a cmake element looking for ieeefp.h I can't find out much about this (except it may be Intel 486 specific??) I have tried every way I can find and cannot get VTK running MacBook Pro (retina 13 inch mid 2014) OS X 10.10.1 any suggestions welcome. Thanks Simon acports.org_release_tarballs_ports_graphics_vtk/vtk/work/build/CMakeFiles/CMakeTmp' /opt/local/bin/cmake -E cmake_progress_report /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk/vtk/work/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec3525172040.dir/CheckIncludeFiles.c.o /usr/bin/clang -pipe -Os -arch x86_64 -w -w -arch x86_64 -mmacosx-version-min=10.10 -o CMakeFiles/cmTryCompileExec3525172040.dir/CheckIncludeFiles.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk/vtk/work/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk/vtk/work/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: fatal error: 'ieeefp.h' file not found #include ^ 1 error generated. -- Simon Hewitt (+44) 07584 658227 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Nov 24 16:17:06 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 24 Nov 2014 14:17:06 -0700 Subject: [vtkusers] MacPort VTK6.1.0 failed In-Reply-To: References: Message-ID: Hi Simon, In the output you sent, cmake is simply checking to see if ieeefp.h is there, so after the "file not found" cmake is supposed to continue along after recording the fact that ieeefp.h doesn't exist on your system. I don't use macports, but when I do a manual build of VTK on my system I see this output: (on OS X 10.9): -- Looking for 28 include files stdio.h, ..., ieeefp.h -- Looking for 28 include files stdio.h, ..., ieeefp.h - not found -- Looking for 28 include files stdio.h, ..., math.h -- Looking for 28 include files stdio.h, ..., math.h - found -- Looking for 29 include files stdio.h, ..., nan.h -- Looking for 29 include files stdio.h, ..., nan.h - not found and then it keeps going until it's done. So it's odd that, for your build, it stops after ieeefp.h instead of continuing. Is there any other output that your build produced when it failed? VTK undergoes nightly build tests on many platforms (including OS X 10.10), but not specifically with macports. - David On Mon, Nov 24, 2014 at 12:11 PM, Simon Hewitt wrote: > I ran sudo port vtk @6.1.0 > > It failed within a cmake element looking for ieeefp.h > I can't find out much about this (except it may be Intel 486 specific??) > > I have tried every way I can find and cannot get VTK running > MacBook Pro (retina 13 inch mid 2014) > OS X 10.10.1 > > any suggestions welcome. > Thanks > Simon > > > acports.org_release_tarballs_ports_graphics_vtk/vtk/work/build/CMakeFiles/CMakeTmp' > /opt/local/bin/cmake -E cmake_progress_report > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk/vtk/work/build/CMakeFiles/CMakeTmp/CMakeFiles > 1 > Building C object > CMakeFiles/cmTryCompileExec3525172040.dir/CheckIncludeFiles.c.o > /usr/bin/clang -pipe -Os -arch x86_64 -w -w -arch x86_64 > -mmacosx-version-min=10.10 -o > CMakeFiles/cmTryCompileExec3525172040.dir/CheckIncludeFiles.c.o -c > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk/vtk/work/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_vtk/vtk/work/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: > fatal error: 'ieeefp.h' file not found > #include > ^ > 1 error generated. > -- > Simon Hewitt > (+44) 07584 658227 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lars-friedrich at gmx.net Tue Nov 25 03:09:02 2014 From: lars-friedrich at gmx.net (Lars Friedrich Lars) Date: Tue, 25 Nov 2014 09:09:02 +0100 Subject: [vtkusers] Rendering shadow example in QVTKGraphicsItem gives frame buffer and openGL errors Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: CMakeLists.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: CompositeView.cxx URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: CompositeView.h URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: MainGUI.cxx URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: MainGUI.h URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ShadowsQVTKView.cxx URL: From Orlando.RIVERA at mtu.de Tue Nov 25 04:23:54 2014 From: Orlando.RIVERA at mtu.de (RIVERA, Orlando) Date: Tue, 25 Nov 2014 09:23:54 +0000 Subject: [vtkusers] vtkStringArray and /or vtkIntArray as outputVector Message-ID: Dear Community I have been trying for a while and I checked some examples as well I just want in a reader by RequestData to add two extra output ports one for vtkStringArray and one to vtkIntArray , Something lilke: void RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector){ { ...... vtkSmartPointer outinfo1= outputVector->GetInformationObject(1); vtkSmartPointer strArr= vtkStringArray::SafeDownCast(outInfo1->Get(vtkDataObject::DATA_OBJECT())); strArr->SetNumberOfValues() ; ... } I think I need to tell outputVector somewhere that its second element is a vtkStringArray? I saw all plugins send vtkPoint, Grids etc but nothing like string-int arrays .Sorry for my naivety ! Cheers Orlando -- MTU Aero Engines AG Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. Rainer Martens, Michael Schrey?gg, Dr. Stefan Weingartner Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt Sitz der Gesellschaft/Registered Office: Muenchen Handelsregister/Commercial Register: Muenchen HRB 157206 Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet. This e-mail and any attached documents are proprietary to MTU, confidential or protected by law. If you are not the intended recipient, please advise the sender and delete this message and its attachments. Any unauthorised storing, copying or distribution is prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas.Busse at ge.com Tue Nov 25 08:27:02 2014 From: Thomas.Busse at ge.com (Busse, Thomas (GE Oil & Gas)) Date: Tue, 25 Nov 2014 13:27:02 +0000 Subject: [vtkusers] Scale one dimension Message-ID: Hi, is it easily possible to stretch one coordinate (e.g. z) in the global coordinate system? Such that all actors are positioned and scaled accordingly. Or do I have to loop over all actor and change their position and scale individually. Best Regards, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Nov 25 08:54:52 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 25 Nov 2014 06:54:52 -0700 Subject: [vtkusers] vtkStringArray and /or vtkIntArray as outputVector In-Reply-To: References: Message-ID: Hi Orlando, An array cannot, by itself, be an output. Instead, the array must be attached to a vtkDataObject. vtkDataObject *output = outInfo->Get(vtkDataObject::DATA_OBJECT()); vtkSmartPointer strArr = vtkStringArray::New(); strArray->SetName("Strings"); // set name to whatever you want output->GetFieldData()->AddArray(strArray); The "FieldData" of a vtkDataObject is a collection of arrays, you can add an unlimited number of arrays to it, and then retrieve them later: vtkStringArray *a = vtkStringArray::SafeDownCast( output->GetFieldData()->GetAbstractArray("Strings")); You don't need to add any new outputs to the algorithm. You can just add the arrays to the FieldData of an output that already exists. - David On Tue, Nov 25, 2014 at 2:23 AM, RIVERA, Orlando wrote: > Dear Community > > > > I have been trying for a while and I checked some examples as well > > > > I just want in a reader by RequestData to add two extra output ports > one for vtkStringArray and one to vtkIntArray , > > > > Something lilke: > > > > void RequestData(vtkInformation*, vtkInformationVector**, > vtkInformationVector* outputVector){ > > { > > ...... > > vtkSmartPointer outinfo1= > outputVector->GetInformationObject(1); > > vtkSmartPointer strArr= > vtkStringArray::SafeDownCast(outInfo1->Get(vtkDataObject::DATA_OBJECT())); > > strArr->SetNumberOfValues() ; > > ... > > } > > > > I think I need to tell outputVector somewhere that its second element is > a vtkStringArray? I saw all plugins send vtkPoint, Grids etc but > nothing like string-int arrays .Sorry for my naivety ! > > > > Cheers > > > > Orlando > > > -- > *MTU Aero Engines AG* > Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. Rainer > Martens, Michael Schrey?gg, Dr. Stefan Weingartner > Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus > Eberhardt > Sitz der Gesellschaft/Registered Office: Muenchen > Handelsregister/Commercial Register: Muenchen HRB 157206 > > Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder > rechtlich geschuetzte Informationen. > Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte > den Absender und loeschen Sie diese > E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder > Weiterleiten ist nicht gestattet. > > This e-mail and any attached documents are proprietary to MTU, > confidential or protected by law. > If you are not the intended recipient, please advise the sender and delete > this message and its attachments. > Any unauthorised storing, copying or distribution is prohibited. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Nov 25 08:58:49 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 25 Nov 2014 06:58:49 -0700 Subject: [vtkusers] vtkStringArray and /or vtkIntArray as outputVector In-Reply-To: References: Message-ID: I noticed a mistake in the code that I wrote. The creation of the array should be done like this: vtkSmartPointer strArr = vtkSmartPointer::New(); On Tue, Nov 25, 2014 at 6:54 AM, David Gobbi wrote: > Hi Orlando, > > An array cannot, by itself, be an output. > Instead, the array must be attached to a vtkDataObject. > > vtkDataObject *output = outInfo->Get(vtkDataObject::DATA_OBJECT()); > vtkSmartPointer strArr = vtkStringArray::New(); > strArray->SetName("Strings"); // set name to whatever you want > output->GetFieldData()->AddArray(strArray); > > The "FieldData" of a vtkDataObject is a collection of arrays, you > can add an unlimited number of arrays to it, and then retrieve them > later: > > vtkStringArray *a = vtkStringArray::SafeDownCast( > output->GetFieldData()->GetAbstractArray("Strings")); > > You don't need to add any new outputs to the algorithm. You can just > add the arrays to the FieldData of an output that already exists. > > - David > > > > On Tue, Nov 25, 2014 at 2:23 AM, RIVERA, Orlando > wrote: > >> Dear Community >> >> >> >> I have been trying for a while and I checked some examples as well >> >> >> >> I just want in a reader by RequestData to add two extra output >> ports one for vtkStringArray and one to vtkIntArray , >> >> >> >> Something lilke: >> >> >> >> void RequestData(vtkInformation*, vtkInformationVector**, >> vtkInformationVector* outputVector){ >> >> { >> >> ...... >> >> vtkSmartPointer outinfo1= >> outputVector->GetInformationObject(1); >> >> vtkSmartPointer strArr= >> vtkStringArray::SafeDownCast(outInfo1->Get(vtkDataObject::DATA_OBJECT())); >> >> strArr->SetNumberOfValues() ; >> >> ... >> >> } >> >> >> >> I think I need to tell outputVector somewhere that its second element is >> a vtkStringArray? I saw all plugins send vtkPoint, Grids etc but >> nothing like string-int arrays .Sorry for my naivety ! >> >> >> >> Cheers >> >> >> >> Orlando >> >> >> -- >> *MTU Aero Engines AG* >> Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. >> Rainer Martens, Michael Schrey?gg, Dr. Stefan Weingartner >> Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus >> Eberhardt >> Sitz der Gesellschaft/Registered Office: Muenchen >> Handelsregister/Commercial Register: Muenchen HRB 157206 >> >> Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder >> rechtlich geschuetzte Informationen. >> Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte >> den Absender und loeschen Sie diese >> E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder >> Weiterleiten ist nicht gestattet. >> >> This e-mail and any attached documents are proprietary to MTU, >> confidential or protected by law. >> If you are not the intended recipient, please advise the sender and >> delete this message and its attachments. >> Any unauthorised storing, copying or distribution is prohibited. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Nov 25 11:10:03 2014 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 25 Nov 2014 11:10:03 -0500 Subject: [vtkusers] Scale one dimension In-Reply-To: References: Message-ID: Try scaling on the camera. http://www.vtk.org/doc/nightly/html/classvtkCamera.html#ae57a645aad5fc2b6012ed32c0672d0b9 David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Nov 25, 2014 at 8:27 AM, Busse, Thomas (GE Oil & Gas) < Thomas.Busse at ge.com> wrote: > Hi, > > is it easily possible to stretch one coordinate (e.g. z) in the global > coordinate system? > Such that all actors are positioned and scaled accordingly. > > Or do I have to loop over all actor and change their position and scale > individually. > > Best Regards, > Thomas > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://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://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas.Busse at ge.com Wed Nov 26 03:23:50 2014 From: Thomas.Busse at ge.com (Busse, Thomas (GE Oil & Gas)) Date: Wed, 26 Nov 2014 08:23:50 +0000 Subject: [vtkusers] Scale one dimension In-Reply-To: References: Message-ID: This does work. But only as long as I do not rotate the camera. Is there some solution available that is independent of the camera angle? From: David E DeMarle [mailto:dave.demarle at kitware.com] Sent: Dienstag, 25. November 2014 17:10 To: Busse, Thomas (GE Oil & Gas) Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Scale one dimension Try scaling on the camera. http://www.vtk.org/doc/nightly/html/classvtkCamera.html#ae57a645aad5fc2b6012ed32c0672d0b9 David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Nov 25, 2014 at 8:27 AM, Busse, Thomas (GE Oil & Gas) > wrote: Hi, is it easily possible to stretch one coordinate (e.g. z) in the global coordinate system? Such that all actors are positioned and scaled accordingly. Or do I have to loop over all actor and change their position and scale individually. Best Regards, Thomas _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://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://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.franzburg at gmx.de Wed Nov 26 05:22:28 2014 From: michael.franzburg at gmx.de (Michael Franzburg) Date: Wed, 26 Nov 2014 11:22:28 +0100 Subject: [vtkusers] Draw line between Points Message-ID: An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Nov 26 07:39:09 2014 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 26 Nov 2014 07:39:09 -0500 Subject: [vtkusers] Draw line between Points In-Reply-To: References: Message-ID: There should be 1 less line than there are points. The loop for(i = 0; i < number_of_points; i++) { vtkSmartPointer line = vtkSmartPointer::New(); line->GetPointIds()->SetId(0,i); line->GetPointIds()->SetId(1,i+1); lines->InsertNextCell(line); } } should go to number_of_points - 1. On Wed, Nov 26, 2014 at 5:22 AM, Michael Franzburg wrote: > Hi vtkusers, > I just started using VTK and i'm currently having some problems with simply > drawing lines between different points. > What i basically want to do is to read a file of coordinates (which works) > and then connect these points whith lines. I basically adapted the code from > this wiki example: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/LongLine > As i understand this example my code should now connect the 1st point with > the 2nd and so on. However for some reason this doesnt happen. When i define > my points as: > 1.0 1.0 0.0 > 2.0 1.0 0.0 > 1.0 2.0 0.0 > 2.0 2.0 0.0 > They get connected with eachother however they get connected with the origin > aswell. > If somebody could explain to me why this happens i would be grateful. > Regards, > Michael > > ************************************** > float coord[number_of_points][3]; > for (i = 0; i < number_of_points; i++) > { > fin >> coord[i][0] >> coord[i][1] >> coord[i][2]; > } > > vtkSmartPointer points = vtkSmartPointer::New(); > for (i = 0; i < number_of_points; i++) > { > points->InsertNextPoint(coord[i]); > } > > vtkSmartPointer lines = vtkSmartPointer::New(); > > for(i = 0; i < number_of_points; i++) > { > vtkSmartPointer line = vtkSmartPointer::New(); > line->GetPointIds()->SetId(0,i); > line->GetPointIds()->SetId(1,i+1); > lines->InsertNextCell(line); > } > } > > // Create a polydata to store everything in > vtkSmartPointer linesPolyData = > vtkSmartPointer::New(); > > // Add the points to the dataset > linesPolyData->SetPoints(points); > > // Add the lines to the dataset > linesPolyData->SetLines(lines); > > // Setup actor and mapper > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputData(linesPolyData); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > > // Setup render window, renderer, and interactor > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > renderer->AddActor(actor); > > renderWindow->Render(); > renderWindowInteractor->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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From rekha.pyage at gmail.com Wed Nov 26 23:42:27 2014 From: rekha.pyage at gmail.com (reks) Date: Wed, 26 Nov 2014 21:42:27 -0700 (MST) Subject: [vtkusers] polydata clipping Message-ID: <1417063347767-5729572.post@n5.nabble.com> hello all. m working on 3d clipping but m not able to perform it interactively... can anybody plz help me with this. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget2 here the data is not being clipped and in http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ImplicitDataSetClipping the data is clipped but it is not interactive.. can anyone plz tel me how to make the vtkBoxWidget2 faces as the clipping plane so that wen any face of it crosses the polydata it shud b clipped. thanks in advance reks -- View this message in context: http://vtk.1045678.n5.nabble.com/polydata-clipping-tp5729572.html Sent from the VTK - Users mailing list archive at Nabble.com. From paul.m.edwards at gmail.com Thu Nov 27 06:23:36 2014 From: paul.m.edwards at gmail.com (Paul Edwards) Date: Thu, 27 Nov 2014 11:23:36 +0000 Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: Hi Andy, I've attached a patch that uses a slightly different approach which only changes vtkPolyData::RemoveDeletedCells. The code looks simpler and it passes your new test although I am assuming it is ok to ShallowCopy the vtkPolyData at the top of the function. I'll let you decide if it is better! Note: the patch is for the VTK with the current ParaView master (v6.1.0-2506-g2e5a3c9) Best regards, Paul On 23 November 2014 at 17:37, Andy Bauer wrote: > Hi Paul, > > I have a potential fix for this bug at > http://review.source.kitware.com/#/t/5040/. It feels like a hack but I > couldn't figure out a better way to do it yet. I also modified a test to > verify that the proper cells were getting removed, based on the cell's > points. > > If you see a better way to do this, please let me know. > > Thanks, > Andy > > On Mon, Nov 17, 2014 at 5:37 PM, Andy Bauer wrote: >> >> Hi Paul, >> >> Thanks for the input. I'm at SC14 right now so I won't be able to look at >> this until I get back. >> >> Cheers, >> Andy >> >> On Mon, Nov 17, 2014 at 4:26 AM, Paul Edwards >> wrote: >>> >>> Hi Andy, >>> >>> I've attached a sample program demonstrating the issue. The example >>> just loads the sphere.vtk file, removes all cells where the "Result" >>> value is not 0 and writes the result to output.vtk. The tar file also >>> contains the correct and incorrect output. >>> >>> Best regards, >>> Paul >>> >>> On 15 November 2014 02:59, Andy Bauer wrote: >>> > Hi Paul, >>> > >>> > I was part of that fix and I think it's correct. There may have been >>> > more to >>> > that fix though since it took a couple of shots before getting it >>> > correct so >>> > the git history may not be as pristine as desired. If you can give me >>> > more >>> > specifics on the bug though I can try to see what's going on with it. >>> > If I >>> > remember correctly though, that fix had to do with the fact that some >>> > places >>> > thought that the order of iterating through cells in a vtkPolyData was >>> > first >>> > through all vertex cells, then all line cells, then all polys and >>> > finally >>> > through all triangle strips, irregardless of the order that cells got >>> > inserted in (i.e. using InsertNextCell()). The reality is that for >>> > polydata >>> > that cells are indeed iterated through in their insertion order. The >>> > test >>> > that was added for those changes hopefully shows the proper >>> > functionality >>> > along with associated cell data manipulations as well. >>> > >>> > Regards, >>> > Andy >>> > >>> > >>> > >>> > On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards >>> > >>> > wrote: >>> >> >>> >> Hi, >>> >> >>> >> I've just noticed an issue with vtkPolyData. I had been calling >>> >> vtkPolyData::DeleteCell to remove the unwanted cells, followed by a >>> >> call to vtkPolyData::RemoveDeletedCells. The result is not as it >>> >> should be in the latest version. To fix I just started reverting >>> >> previous commits. I tracked it down to the following: >>> >> >>> >> bugfix 14459: Iterating through polydata cells incorrectly. >>> >> commit: 44131c6d05375692af8b6b38cf4291983bdd8f45 >>> >> >>> >> Sorry but I do not have time to provide a test case or track where in >>> >> this commit lies the problem. I just thought I would give details >>> >> here in case anyone else notices the same problem and is searching for >>> >> a solution. >>> >> >>> >> Best regards, >>> >> Paul >>> >> _______________________________________________ >>> >> Powered by www.kitware.com >>> >> >>> >> Visit other Kitware open-source projects at >>> >> http://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://public.kitware.com/mailman/listinfo/vtkusers >>> > >>> > >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: fix_polydata_remove_cell_pme.patch Type: text/x-patch Size: 3671 bytes Desc: not available URL: From Lukasz.Dowhan at isko-engineers.de Thu Nov 27 06:34:32 2014 From: Lukasz.Dowhan at isko-engineers.de (Dowhan, Lukasz) Date: Thu, 27 Nov 2014 11:34:32 +0000 Subject: [vtkusers] Rotate the camera around a specific point Message-ID: <0bf62b5527e144909f7020c5d8bdb46b@exchange1s0.ISKO.NET> Hello, I am using VTK 6.1 as Python wrapper. For some time I have been struggling with a vtkCamera problem. I would like to rotate the camera around a specific point. By default the camera rotates around the focal point. The focal point can be set wit camera.SetFocalPoint() method. But using this method the scene is moved to the center of the viewport (and then it is possible to rotate around that defined point). And that I would like to avoid. I would like to rotate the camera around a specific point (as it is with focal point) but without moving the scene to the center. A small example that demonstrates the problem (it interacts with left mouse click on the cone, then the new point is defined): ## code ## from vtk import vtkConeSource, vtkPolyDataMapper, vtkActor, vtkRenderer, vtkRenderWindow, vtkRenderWindowInteractor, vtkInteractorStyleTrackballCamera class MyInteractorStyle(vtkInteractorStyleTrackballCamera): def __init__(self): self.AddObserver('LeftButtonPressEvent', self.OnLeftButtonDown, -1) def OnLeftButtonDown(self, obj, event): picker = self.GetInteractor().GetPicker() camera = self.GetCurrentRenderer().GetActiveCamera() if self.PositionPicked() != 0: camera.SetFocalPoint(picker.GetPickPosition()) vtkInteractorStyleTrackballCamera.OnLeftButtonDown(self) def PositionPicked(self): click_pos = self.GetInteractor().GetEventPosition() picker = self.GetInteractor().GetPicker() t = picker.Pick(click_pos[0], click_pos[1], 0, self.GetCurrentRenderer()) return t if __name__ == "__main__": cone = vtkConeSource() cone.Update() mapper = vtkPolyDataMapper() mapper.SetInputData(cone.GetOutput()) mapper.ScalarVisibilityOn() mapper.SetScalarModeToUsePointData() mapper.SetColorModeToMapScalars() actor = vtkActor() actor.SetMapper(mapper) renderer = vtkRenderer() renderWindow = vtkRenderWindow() renderWindow.AddRenderer(renderer) renderWindowInteractor = vtkRenderWindowInteractor() renderWindowInteractor.SetRenderWindow(renderWindow) style = MyInteractorStyle() style.SetCurrentRenderer(renderer) renderWindowInteractor.SetInteractorStyle(style) renderer.AddActor(actor) renderWindow.Render() renderWindowInteractor.Start() ## end code ## I have dealt with the camera?s transformations after setting the focal point, but without any success. I have also tried to implement my own Camera class (that inherits vtkCamera) in order to rewrite/modify the Azimuth() and Elevation() methods as they are responsible for the rotation. For some reason it does not work with the modified SetPosition() and SetFocalPoint() methods (they also have to be reimplemented in order to update the transformations from Azimuth() and Elevation()). I wrote that class based on the original vtkCamera.cxx implementation. The code with my camera is pretty long, but I can provide it if needed. I have search probably every vtk post on the internet and I did not found a solution for my issue. Maybe I am missing something? ? Thanks in advance for any help! Best regards, lukasz Dr.-Ing. Lukasz Dowhan CAE Prozesse und Optimierung ISKO engineers AG Taunusstr. 42, 80807 M?nchen Fon: +49 89 37062-247 Fax: +49 89 37062-191 Mail: Lukasz.Dowhan at isko-engineers.de [cid:image85a5dd.PNG at 56fbcc64.4197f06c] [cid:imageabe85f.PNG at 3f98ebe7.4a876f46] http://www.isko-engineers.de Sitz der AG: D-80807 Muenchen, Registergericht Muenchen HRB 129 078 Vorsitzender des Aufsichtsrates: Michael Welzel Vorstand: Michael Probst, Michael Krause USt-IdNr.: DE 812 837 909 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image85a5dd.PNG Type: image/png Size: 27099 bytes Desc: image85a5dd.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imageabe85f.PNG Type: image/png Size: 24254 bytes Desc: imageabe85f.PNG URL: From paul.m.edwards at gmail.com Thu Nov 27 06:52:10 2014 From: paul.m.edwards at gmail.com (Paul Edwards) Date: Thu, 27 Nov 2014 11:52:10 +0000 Subject: [vtkusers] Fwd: Bug in vtkPolyData In-Reply-To: References: Message-ID: BTW there would be a problem with your implementation if vtkPolyData::InsertNextCell was called after a call to vtkPolyData::DeleteCell (and before vtkPolyData::RemoveDeletedCells) as it would not append to vtkPolyData::CellsCopy. I'm not sure if that is allowed but your implementation would result in a index out of bounds. On 27 November 2014 at 11:23, Paul Edwards wrote: > Hi Andy, > > I've attached a patch that uses a slightly different approach which > only changes vtkPolyData::RemoveDeletedCells. The code looks simpler > and it passes your new test although I am assuming it is ok to > ShallowCopy the vtkPolyData at the top of the function. I'll let you > decide if it is better! > > Note: the patch is for the VTK with the current ParaView master > (v6.1.0-2506-g2e5a3c9) > > Best regards, > Paul > > On 23 November 2014 at 17:37, Andy Bauer wrote: >> Hi Paul, >> >> I have a potential fix for this bug at >> http://review.source.kitware.com/#/t/5040/. It feels like a hack but I >> couldn't figure out a better way to do it yet. I also modified a test to >> verify that the proper cells were getting removed, based on the cell's >> points. >> >> If you see a better way to do this, please let me know. >> >> Thanks, >> Andy >> >> On Mon, Nov 17, 2014 at 5:37 PM, Andy Bauer wrote: >>> >>> Hi Paul, >>> >>> Thanks for the input. I'm at SC14 right now so I won't be able to look at >>> this until I get back. >>> >>> Cheers, >>> Andy >>> >>> On Mon, Nov 17, 2014 at 4:26 AM, Paul Edwards >>> wrote: >>>> >>>> Hi Andy, >>>> >>>> I've attached a sample program demonstrating the issue. The example >>>> just loads the sphere.vtk file, removes all cells where the "Result" >>>> value is not 0 and writes the result to output.vtk. The tar file also >>>> contains the correct and incorrect output. >>>> >>>> Best regards, >>>> Paul >>>> >>>> On 15 November 2014 02:59, Andy Bauer wrote: >>>> > Hi Paul, >>>> > >>>> > I was part of that fix and I think it's correct. There may have been >>>> > more to >>>> > that fix though since it took a couple of shots before getting it >>>> > correct so >>>> > the git history may not be as pristine as desired. If you can give me >>>> > more >>>> > specifics on the bug though I can try to see what's going on with it. >>>> > If I >>>> > remember correctly though, that fix had to do with the fact that some >>>> > places >>>> > thought that the order of iterating through cells in a vtkPolyData was >>>> > first >>>> > through all vertex cells, then all line cells, then all polys and >>>> > finally >>>> > through all triangle strips, irregardless of the order that cells got >>>> > inserted in (i.e. using InsertNextCell()). The reality is that for >>>> > polydata >>>> > that cells are indeed iterated through in their insertion order. The >>>> > test >>>> > that was added for those changes hopefully shows the proper >>>> > functionality >>>> > along with associated cell data manipulations as well. >>>> > >>>> > Regards, >>>> > Andy >>>> > >>>> > >>>> > >>>> > On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards >>>> > >>>> > wrote: >>>> >> >>>> >> Hi, >>>> >> >>>> >> I've just noticed an issue with vtkPolyData. I had been calling >>>> >> vtkPolyData::DeleteCell to remove the unwanted cells, followed by a >>>> >> call to vtkPolyData::RemoveDeletedCells. The result is not as it >>>> >> should be in the latest version. To fix I just started reverting >>>> >> previous commits. I tracked it down to the following: >>>> >> >>>> >> bugfix 14459: Iterating through polydata cells incorrectly. >>>> >> commit: 44131c6d05375692af8b6b38cf4291983bdd8f45 >>>> >> >>>> >> Sorry but I do not have time to provide a test case or track where in >>>> >> this commit lies the problem. I just thought I would give details >>>> >> here in case anyone else notices the same problem and is searching for >>>> >> a solution. >>>> >> >>>> >> Best regards, >>>> >> Paul >>>> >> _______________________________________________ >>>> >> Powered by www.kitware.com >>>> >> >>>> >> Visit other Kitware open-source projects at >>>> >> http://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://public.kitware.com/mailman/listinfo/vtkusers >>>> > >>>> > >>> >>> >> From majcjc at gmail.com Fri Nov 28 05:55:53 2014 From: majcjc at gmail.com (Lin M) Date: Fri, 28 Nov 2014 18:55:53 +0800 Subject: [vtkusers] How to display a object without lighting? Message-ID: Hi guys, I implemented a Spherical Harmonics Lighting in my program and set the illuminance as the vertex color. I hope to display the object just with the color array which I set and do not add any effect from the light in vtk. (Or it can be interpreted each vertex illuminated itself, the brightness is stored in its color) If I just switch off the light, it shows all dark. So this is not workable. Any suggestions? Thank you! Best, Lin -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Fri Nov 28 06:46:12 2014 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Fri, 28 Nov 2014 04:46:12 -0700 (MST) Subject: [vtkusers] imageViewer size within QVTKWidget Message-ID: <1417175172257-5729578.post@n5.nabble.com> I am creating a DICOM viewer, which works fine on my Mac Thunderbolt display but on my Macbook Pro 15" screen, the ImageViewer only fills the bottom ~quarter of the QVTKWidget. The relevant part of my code looks like this: * imageViewer->SetInputConnection(reader->GetOutputPort()); imageViewer->SetRenderWindow(qvtk->GetRenderWindow()); imageViewer->Render(); qvtk->show();* I also get these errors showing, but they do not cause the program to crash (and only display for the first object I render for each run of the program): *ERROR: In /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx, line 1202 vtkOpenGLRenderer (0x10b284b60): failed after Clear 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 574 vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation ERROR: In /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, line 574 vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1 OpenGL errors detected 0 : (1286) Invalid framebuffer operation* Not sure if the two errors are linked, but any help would be appreciated. Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-tp5729578.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Nov 28 09:02:20 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 28 Nov 2014 07:02:20 -0700 Subject: [vtkusers] imageViewer size within QVTKWidget In-Reply-To: <1417175172257-5729578.post@n5.nabble.com> References: <1417175172257-5729578.post@n5.nabble.com> Message-ID: Hi Richard, It sounds like the vtkRenderWindow size is not being updated when the QWidget size changes. This could cause both the incorrect rendering and the OpenGL error. It probably happens only on the MacBook because the small screen size forces an extra resize event. Hopefully someone else on the list has seen this problem and can chime in with a fix. - David On Fri, Nov 28, 2014 at 4:46 AM, mbcx9rb9 wrote: > I am creating a DICOM viewer, which works fine on my Mac Thunderbolt > display > but on my Macbook Pro 15" screen, the ImageViewer only fills the bottom > ~quarter of the QVTKWidget. The relevant part of my code looks like this: > > * imageViewer->SetInputConnection(reader->GetOutputPort()); > imageViewer->SetRenderWindow(qvtk->GetRenderWindow()); > imageViewer->Render(); > qvtk->show();* > > I also get these errors showing, but they do not cause the program to crash > (and only display for the first object I render for each run of the > program): > > *ERROR: In > > /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx, > line 1202 > vtkOpenGLRenderer (0x10b284b60): failed after Clear 1 OpenGL errors > detected > 0 : (1286) Invalid framebuffer operation > > > ERROR: In > > /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 574 > vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1 > OpenGL > errors detected > 0 : (1286) Invalid framebuffer operation > > > ERROR: In > > /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 574 > vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1 > OpenGL > errors detected > 0 : (1286) Invalid framebuffer operation* > > Not sure if the two errors are linked, but any help would be appreciated. > Thanks > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.ansari at gmail.com Fri Nov 28 10:34:19 2014 From: david.ansari at gmail.com (Davood Ansari) Date: Fri, 28 Nov 2014 10:34:19 -0500 Subject: [vtkusers] Changing Colormap range/Color bar interactively Message-ID: Hi all This has been a question for a long time and I am not sure if it can e done effectively. Imagine you have visualized some unstructured grid with a particular color map But it would be nice if we can modify the color bar and the scalar range interactively while the render window is open. Any suggestions would be appreciated. Thank you Davood -- Davood Ansari O.B. Research Scientist Computational EM and Physics Lab Department of Electrical and Computer Engineering Northeastern University Email: dansari at ece.neu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Nov 28 16:33:24 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 28 Nov 2014 14:33:24 -0700 Subject: [vtkusers] How to display a object without lighting? In-Reply-To: References: Message-ID: Hi Lin, Lighting is always required (otherwise everything is black, so I think that what you need is ambient lighting, instead of directional lighting: mapper->SetAmbient(1.0); mapper->SetDiffuse(0.0); mapper->SetSpecular(0.0); - David On Fri, Nov 28, 2014 at 3:55 AM, Lin M wrote: > > Hi guys, > > I implemented a Spherical Harmonics Lighting in my program and set the > illuminance as the vertex color. I hope to display the object just with the > color array which I set and do not add any effect from the light in vtk. > (Or it can be interpreted each vertex illuminated itself, the brightness is > stored in its color) If I just switch off the light, it shows all dark. So > this is not workable. Any suggestions? Thank you! > > Best, > Lin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From majcjc at gmail.com Fri Nov 28 21:43:08 2014 From: majcjc at gmail.com (Lin M) Date: Sat, 29 Nov 2014 10:43:08 +0800 Subject: [vtkusers] How to display a object without lighting? In-Reply-To: References: Message-ID: Hi David, Thanks! I did't find these functions in mapper. I assume you mean actor->GetProperty()->SetAmbient(1.0), etc? And I also found a function actor->GetProperty()->LightingOff(). This seems to meet my requirement. Best, Lin On Sat, Nov 29, 2014 at 5:33 AM, David Gobbi wrote: > Hi Lin, > > Lighting is always required (otherwise everything is black, so I think > that what you need is ambient lighting, instead of directional lighting: > > mapper->SetAmbient(1.0); > mapper->SetDiffuse(0.0); > mapper->SetSpecular(0.0); > > - David > > > On Fri, Nov 28, 2014 at 3:55 AM, Lin M wrote: > >> >> Hi guys, >> >> I implemented a Spherical Harmonics Lighting in my program and set the >> illuminance as the vertex color. I hope to display the object just with the >> color array which I set and do not add any effect from the light in vtk. >> (Or it can be interpreted each vertex illuminated itself, the brightness is >> stored in its color) If I just switch off the light, it shows all dark. So >> this is not workable. Any suggestions? Thank you! >> >> Best, >> Lin >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thrawn.chimera at gmail.com Fri Nov 28 23:43:22 2014 From: thrawn.chimera at gmail.com (Impdive) Date: Fri, 28 Nov 2014 21:43:22 -0700 (MST) Subject: [vtkusers] Setting up camera for OpenGL render Message-ID: <1417236202735-5729587.post@n5.nabble.com> I'm trying to do some volume rendering in OpenGL using 3D textures and billboarding, and so I'm essentially drawing a series of planes along the z-axis (or normal to the z-axis if you prefer). I'm using VTK's windowing and rendering tools for this, and I'm struggling to get my camera working right. My volume rendering is based on a 64x64x64 rectilinear grid, so I thought I would use SetFocalPoint(32,32,32); to set the focal point to the center of the grid, and then I could just have my camera direction be something like SetPosition(0,0,-1) or SetPosition(0,0,1). That didn't work - I got a completely black screen, and rotating the camera didn't seem to help. Doing something like this: rens[0]->GetActiveCamera()->SetFocalPoint(32,32,32); rens[0]->GetActiveCamera()->SetPosition(100,100,100); rens[0]->GetActiveCamera()->SetViewUp(0,1,0); rens[0]->GetActiveCamera()->SetDistance(100); (rens[0] is my vtkRenderer here) would allow the planes to come onscreen if I scrolled on the trackpad persistently enough, but they were still at an angle rather than facing me dead-on. Could anyone help me figure out why my initial understanding was incorrect, and what I should be doing instead? Thanks so much. -- View this message in context: http://vtk.1045678.n5.nabble.com/Setting-up-camera-for-OpenGL-render-tp5729587.html Sent from the VTK - Users mailing list archive at Nabble.com. From pattersonnp at gmail.com Sat Nov 29 13:01:29 2014 From: pattersonnp at gmail.com (Nick Patterson) Date: Sat, 29 Nov 2014 18:01:29 +0000 Subject: [vtkusers] imageViewer size within QVTKWidget In-Reply-To: <1417175172257-5729578.post@n5.nabble.com> References: <1417175172257-5729578.post@n5.nabble.com> Message-ID: <4B7FB8C0-759E-4A46-B274-8A0F5DAEA102@gmail.com> I similarly see this problem and and have not yet found the resolution. Information at the bottom of the page associated with:- http://www.vtk.org/Wiki/VTK/OpenGL_Errors highlights this Mac specific problem, but is next to useless in actually explaining the problem since they don?t indicate exactly what is meant by ?restructure your code?. If you find a solution, please let me know. Nick. > On 28 Nov 2014, at 11:46, mbcx9rb9 wrote: > > I am creating a DICOM viewer, which works fine on my Mac Thunderbolt display > but on my Macbook Pro 15" screen, the ImageViewer only fills the bottom > ~quarter of the QVTKWidget. The relevant part of my code looks like this: > > * imageViewer->SetInputConnection(reader->GetOutputPort()); > imageViewer->SetRenderWindow(qvtk->GetRenderWindow()); > imageViewer->Render(); > qvtk->show();* > > I also get these errors showing, but they do not cause the program to crash > (and only display for the first object I render for each run of the > program): > > *ERROR: In > /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx, > line 1202 > vtkOpenGLRenderer (0x10b284b60): failed after Clear 1 OpenGL errors detected > 0 : (1286) Invalid framebuffer operation > > > ERROR: In > /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 574 > vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1 OpenGL > errors detected > 0 : (1286) Invalid framebuffer operation > > > ERROR: In > /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > line 574 > vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1 OpenGL > errors detected > 0 : (1286) Invalid framebuffer operation* > > Not sure if the two errors are linked, but any help would be appreciated. > Thanks > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-tp5729578.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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From david.gobbi at gmail.com Sat Nov 29 16:27:44 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 29 Nov 2014 14:27:44 -0700 Subject: [vtkusers] imageViewer size within QVTKWidget In-Reply-To: <4B7FB8C0-759E-4A46-B274-8A0F5DAEA102@gmail.com> References: <1417175172257-5729578.post@n5.nabble.com> <4B7FB8C0-759E-4A46-B274-8A0F5DAEA102@gmail.com> Message-ID: Hi Nick, Richard, It's possible that VTK is being asked to render before Qt is ready. If this is the case, you might be able to fix it by putting guards around the call to Render in QVTKWidget.cxx, i.e. by replacing this (around line 475): iren->Render(); with this: if (updatesEnabled() && isVisible()) { iren->Render(); } I'm not sure if it will work, but it might be worth a try. - David On Sat, Nov 29, 2014 at 11:01 AM, Nick Patterson wrote: > I similarly see this problem and and have not yet found the resolution. > Information at the bottom of the page associated with:- > > http://www.vtk.org/Wiki/VTK/OpenGL_Errors > > highlights this Mac specific problem, but is next to useless in actually > explaining the problem since they don't indicate exactly what is meant by > "restructure your code". > > If you find a solution, please let me know. > > Nick. > > > > On 28 Nov 2014, at 11:46, mbcx9rb9 wrote: > > > > I am creating a DICOM viewer, which works fine on my Mac Thunderbolt > display > > but on my Macbook Pro 15" screen, the ImageViewer only fills the bottom > > ~quarter of the QVTKWidget. The relevant part of my code looks like this: > > > > * imageViewer->SetInputConnection(reader->GetOutputPort()); > > imageViewer->SetRenderWindow(qvtk->GetRenderWindow()); > > imageViewer->Render(); > > qvtk->show();* > > > > I also get these errors showing, but they do not cause the program to > crash > > (and only display for the first object I render for each run of the > > program): > > > > *ERROR: In > > > /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx, > > line 1202 > > vtkOpenGLRenderer (0x10b284b60): failed after Clear 1 OpenGL errors > detected > > 0 : (1286) Invalid framebuffer operation > > > > > > ERROR: In > > > /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > > line 574 > > vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1 > OpenGL > > errors detected > > 0 : (1286) Invalid framebuffer operation > > > > > > ERROR: In > > > /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx, > > line 574 > > vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1 > OpenGL > > errors detected > > 0 : (1286) Invalid framebuffer operation* > > > > Not sure if the two errors are linked, but any help would be appreciated. > > Thanks > > > > > > > > -- > > View this message in context: > http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-tp5729578.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 > > > > 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 > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julio.hoffimann at gmail.com Sat Nov 29 19:16:26 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Sat, 29 Nov 2014 16:16:26 -0800 Subject: [vtkusers] QVTKApplication over QApplication Message-ID: Dear all, I'm very new to VTK, what issues QVTKApplication can deal that QApplication cannot? What is the practical consequence of adopting one over the other? In the case that QVTKApplication is preferred, what exactly needs to be changed in a working code? Sincerely, J?lio. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpaknezhad.2009 at gmail.com Sat Nov 29 22:13:24 2014 From: mpaknezhad.2009 at gmail.com (mahsa paknezhad) Date: Sun, 30 Nov 2014 11:13:24 +0800 Subject: [vtkusers] Rendering VTK file bright voxels rendered black Message-ID: Dear All, I am rendering a vtk File and I am using the ScalarOpacityFunction to map the scalar values in the file to different opacity values. The range of values in the VTK file is [0, 255] and I am using the following lines of code to the mapping: mitk::StandaloneDataStorage::Pointer ds = mitk::StandaloneDataStorage::New(); mitk::DataNode::Pointer node = nodeReader->GetOutput(); ds->Add(node); mitk::Image::Pointer image = dynamic_cast(node->GetData()); if(image.IsNotNull()) { node->SetProperty("volumerendering", mitk::BoolProperty::New(true)); mitk::TransferFunction::Pointer tf = mitk::TransferFunction::New(); tf->GetScalarOpacityFunction()->AddPoint (0.0, 0.0 ); tf->GetScalarOpacityFunction()->AddPoint (40.0, 0.0 ); tf->GetScalarOpacityFunction()->AddPoint (230.0, 0.9 ); tf->GetScalarOpacityFunction()->AddPoint (255.0, 1.0 ); node->SetProperty ( "TransferFunction", mitk::TransferFunctionProperty::New ( tf.GetPointer() ) ); QmitkRenderWindow renderWindow; renderWindow.GetRenderer()->SetDataStorage(ds); renderWindow.GetRenderer()->SetMapperID(mitk::BaseRenderer::Standard3D); renderWindow.show(); renderWindow.resize( 256, 256 ); mitk::RenderingManager::GetInstance()->RequestUpdateAll(); } However, there is a problem in the rendering result. The problem is that the very bright voxels are rendered in black while other voxels are rendered well. I have checked the file and I am sure that there is no problem with the values of the voxels that are supposed to be bright (I mean they really have high values in the range of [0 255]). I also played with values that I am feeding to the transfer function like setting mappings for values more than 255 (just in case the scalars in the file might be more than 255) still no difference. Would you please let me know what I am doing wrong. Regards, Mahsa -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.j.redmond at gmail.com Sun Nov 30 10:52:20 2014 From: michael.j.redmond at gmail.com (redmod79) Date: Sun, 30 Nov 2014 08:52:20 -0700 (MST) Subject: [vtkusers] vtk python, point picker, UseCellsOff attribute error Message-ID: <1417362740491-5729592.post@n5.nabble.com> When using vtkPointPicker in python (vtk 6.1), trying to use UseCellsOff and related methods results in an attribute error... it seems like using cell points is on by default, and I don't want it to be... I want to be able to pick the raw points created as shown below and not the cell points (ids 1, 2, 3, 4 of the cell) points = vtk.vtkPoints() ... points added ugrid = vtk.vtkUnstructuredGrid() ugrid.SetPoints(points) for i in range(cell_count): cell = some cell created using points ugrid.InsertNextCell(cell) mapper = vtk.vtkMapper() mapper.SetInputData(ugrid) actor = vtk.vtkActor() actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderer.AddActor(actor) ... in another part of the code using a custom interactor style picker = vtk.vtkPointPicker() picker.UseCellsOff() ... this causes the attribute error doing print dir(picker) shows no methods UseCellsOff or related methods Thank you for your help. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-python-point-picker-UseCellsOff-attribute-error-tp5729592.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Sun Nov 30 11:44:14 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 30 Nov 2014 09:44:14 -0700 Subject: [vtkusers] vtk python, point picker, UseCellsOff attribute error In-Reply-To: <1417362740491-5729592.post@n5.nabble.com> References: <1417362740491-5729592.post@n5.nabble.com> Message-ID: Hi Michael, The UseCells option did not exist in VTK 6.1, it was only added to VTK a few weeks ago. In other words, in VTK 6.1 the picking is _always_ done from the raw points (and even in the latest VTK master branch, UseCells is Off by default). - David On Sun, Nov 30, 2014 at 8:52 AM, redmod79 wrote: > When using vtkPointPicker in python (vtk 6.1), trying to use UseCellsOff > and > related methods results in an attribute error... it seems like using cell > points is on by default, and I don't want it to be... I want to be able to > pick the raw points created as shown below and not the cell points (ids 1, > 2, 3, 4 of the cell) > > points = vtk.vtkPoints() > ... points added > > ugrid = vtk.vtkUnstructuredGrid() > > ugrid.SetPoints(points) > > for i in range(cell_count): > cell = some cell created using points > ugrid.InsertNextCell(cell) > > mapper = vtk.vtkMapper() > mapper.SetInputData(ugrid) > actor = vtk.vtkActor() > actor.SetMapper(mapper) > > renderer = vtk.vtkRenderer() > renderer.AddActor(actor) > > ... in another part of the code using a custom interactor style > > picker = vtk.vtkPointPicker() > > picker.UseCellsOff() ... this causes the attribute error > > > > doing print dir(picker) shows no methods UseCellsOff or related methods > > Thank you for your help. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.j.redmond at gmail.com Sun Nov 30 12:18:25 2014 From: michael.j.redmond at gmail.com (redmod79) Date: Sun, 30 Nov 2014 10:18:25 -0700 (MST) Subject: [vtkusers] vtk python, point picker, UseCellsOff attribute error In-Reply-To: References: <1417362740491-5729592.post@n5.nabble.com> Message-ID: <1417367905579-5729594.post@n5.nabble.com> David, thank you for your reply. My current experience with the vtkPointPicker seems to indicate that the cell points are on by default. Or maybe something else fishy is going on. I have a finite element mesh with many elements - nodes, bars, tri's, and quads. My custom interactor style is set up to pick a node (point) or element (cell) when the mouse moves. It first tries a point, and if no point is selected, it tries a cell. When I have my mouse over the center of a cell, it selects the cell as desired. When my mouse is near the corner of the cell it selects a point (not desired). If I go near each corner of the cell it will select a point with id's 0, 1, 2, or 3, depending on the cell type and corner I'm in, but each corner has a unique id (0, 1, 2, or 3), which suggests to be it is selecting the cell points. The point doesn't get highlighted because the code is highlighting the raw point instead of the cell point. This behavior is the same for all cells in the mesh. If I put my mouse directly over the point, it will highlight the point correctly as desired. I'm not sure what to make of this if it isn't selecting the cell points. Thanks for your help. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-python-point-picker-UseCellsOff-attribute-error-tp5729592p5729594.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Sun Nov 30 13:33:15 2014 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 30 Nov 2014 11:33:15 -0700 Subject: [vtkusers] vtk python, point picker, UseCellsOff attribute error In-Reply-To: <1417367905579-5729594.post@n5.nabble.com> References: <1417362740491-5729592.post@n5.nabble.com> <1417367905579-5729594.post@n5.nabble.com> Message-ID: Hi Michael, You say that you're interactor tries to pick a point first, and then if it fails, it tries to pick a cell? So you are using a vtkPointPicker for the first part, and a vtkCellPicker for the second part? Do you have just one DataSet in the scene, or more than one? Is each "point" in a vtkVertex cell? Overall, I don't have a clear enough picture to give you much assistance. I can say, however, that vtkPointPicker is not giving you cell points. In VTK 6.1 the vtkPointPicker has no cell code in it whatsoever (you can look at the code yourself to see that this is true). - David On Sun, Nov 30, 2014 at 10:18 AM, redmod79 wrote: > David, thank you for your reply. > > My current experience with the vtkPointPicker seems to indicate that the > cell points are on by default. Or maybe something else fishy is going on. > > I have a finite element mesh with many elements - nodes, bars, tri's, and > quads. My custom interactor style is set up to pick a node (point) or > element (cell) when the mouse moves. It first tries a point, and if no > point is selected, it tries a cell. > > When I have my mouse over the center of a cell, it selects the cell as > desired. When my mouse is near the corner of the cell it selects a point > (not desired). If I go near each corner of the cell it will select a point > with id's 0, 1, 2, or 3, depending on the cell type and corner I'm in, but > each corner has a unique id (0, 1, 2, or 3), which suggests to be it is > selecting the cell points. The point doesn't get highlighted because the > code is highlighting the raw point instead of the cell point. This > behavior > is the same for all cells in the mesh. > > If I put my mouse directly over the point, it will highlight the point > correctly as desired. I'm not sure what to make of this if it isn't > selecting the cell points. > > Thanks for your help. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.j.redmond at gmail.com Sun Nov 30 15:17:43 2014 From: michael.j.redmond at gmail.com (redmod79) Date: Sun, 30 Nov 2014 13:17:43 -0700 (MST) Subject: [vtkusers] vtk python, point picker, UseCellsOff attribute error In-Reply-To: References: <1417362740491-5729592.post@n5.nabble.com> <1417367905579-5729594.post@n5.nabble.com> Message-ID: <1417378663683-5729596.post@n5.nabble.com> David, I think I fixed the problem, thanks to your question about having one dataset. I have one main dataset that contains the points and cells, contained in one actor. When a cell is selected, sometimes it is behind other cells and I can't see the selection. The only way I know how to remedy this is to create a new dataset and new actor with the cell edges in it, projected onto the display (is there a better way? probably needs a new thread). As a result, when a cell is selected there were then two datasets/actors for the pointpicker to pick from. It was picking the points from the second dataset. I used the PickFromList option on the pointpicker to pick only from the main actor, and now it appears to be working as desired. Thanks for your help! -- View this message in context: http://vtk.1045678.n5.nabble.com/vtk-python-point-picker-UseCellsOff-attribute-error-tp5729592p5729596.html Sent from the VTK - Users mailing list archive at Nabble.com. From julio.hoffimann at gmail.com Sun Nov 30 18:29:48 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Sun, 30 Nov 2014 15:29:48 -0800 Subject: [vtkusers] [VTK 6.2] Issue with QVTKWidget on Qt5 Message-ID: Dear all, Consider the following code: #include #include #include #include int main( int argc, char **argv ){ QApplication app(argc,argv); QMainWindow *mainWindow = new QMainWindow; QVTKWidget *widget = new QVTKWidget; mainWindow->setCentralWidget(widget); mainWindow->show(); return app.exec();} If I compile it on my Linux box with Qt5 and VTK 6.2, I get a black window with strange effects whenever I try to resize it. It may be a graphics card issue, can you reproduce it? Also, what is the difference between QVTKWidget and QVTKWidget2? I wasn't able to find them in the Doxygen online reference. Best, J?lio. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julio.hoffimann at gmail.com Sun Nov 30 18:46:33 2014 From: julio.hoffimann at gmail.com (=?UTF-8?Q?J=C3=BAlio_Hoffimann?=) Date: Sun, 30 Nov 2014 15:46:33 -0800 Subject: [vtkusers] [VTK 6.2] Issue with QVTKWidget on Qt5 In-Reply-To: References: Message-ID: Nevermind, problem solved. I needed to add a vtkRenderer to the vtkRenderWindow returned by widget->GetRenderWindow(). The question about QVTKWidget2 remains open. -J?lio 2014-11-30 15:29 GMT-08:00 J?lio Hoffimann : > Dear all, > > Consider the following code: > > #include #include #include #include > int main( int argc, char **argv ){ > QApplication app(argc,argv); > QMainWindow *mainWindow = new QMainWindow; > > QVTKWidget *widget = new QVTKWidget; > mainWindow->setCentralWidget(widget); > > mainWindow->show(); > return app.exec();} > > If I compile it on my Linux box with Qt5 and VTK 6.2, I get a black window > with strange effects whenever I try to resize it. It may be a graphics card > issue, can you reproduce it? > > Also, what is the difference between QVTKWidget and QVTKWidget2? I wasn't > able to find them in the Doxygen online reference. > > Best, > J?lio. > -------------- next part -------------- An HTML attachment was scrubbed... URL: