From elvis.stansvik at orexplore.com Fri Jul 1 03:01:18 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 1 Jul 2016 09:01:18 +0200 Subject: [vtkusers] Which Vtk Module to build to have access to "vtkButterflySubdivisionFilter.h" , "vtkLoopSubdivisionFilter.h" and "vtkLinearSubdivisionFilter.h" In-Reply-To: References: Message-ID: 2016-06-30 17:32 GMT+02:00 Remi Charrier : > Hi, > > I would like to try the following filters: > "vtkButterflySubdivisionFilter.h" > "vtkLoopSubdivisionFilter.h" > "vtkLinearSubdivisionFilter.h" > in order to increase the number of cells in my 3D models. > > I have the source files but they didn't compile as I probably did not > include them in the CMake process. However I still don't understand where > to find to which vtkmodule a specific file is linked. I thought it was > based on the folders name but in this case, the path is : > VTK-7.0.0\Filters\Modeling > in the cmakelist.txt of this folder I find that it may be associated with > vtkFiltersModeling > But I don't have this module or entry in the Cmake window. > Any help would be welcome. > Thanks in advance > David Gobbi recently pointed me at a handy script included in the VTK source. You can run it on your files/directories an it will try to determine which modules you need besed on the headers you include. Running it on just those three headers, I get: estan at newton:~/orexplore/VTK$ cat test.cpp #include #include #include estan at newton:~/orexplore/VTK$ Utilities/Maintenance/WhatModulesVTK.py . test.cpp Modules and their dependencies: find_package(VTK COMPONENTS vtkCommonComputationalGeometry vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkCommonMisc vtkCommonSystem vtkCommonTransforms vtkFiltersCore vtkFiltersGeneral vtkFiltersModeling vtkFiltersSources vtkkwiml ) Your application code includes 13 of 189 vtk modules. All modules referenced in the files: find_package(VTK COMPONENTS vtkFiltersModeling ) Your application code includes 1 of 189 vtk modules. Minimal set of modules: find_package(VTK COMPONENTS vtkFiltersModeling ) Your application code includes 1 of 189 vtk modules. estan at newton:~/orexplore/VTK$ I don't know why you don't have the vtkFiltersModeling module, but it would help to see your CMakeLists.txt and CMake output I think. Elvis R?mi > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From remi.charrier at gmail.com Fri Jul 1 03:09:09 2016 From: remi.charrier at gmail.com (Remi Charrier) Date: Fri, 1 Jul 2016 09:09:09 +0200 Subject: [vtkusers] Which Vtk Module to build to have access to "vtkButterflySubdivisionFilter.h" , "vtkLoopSubdivisionFilter.h" and "vtkLinearSubdivisionFilter.h" In-Reply-To: References: Message-ID: Dear all, Thanks for your answer, it solved my problem. In fact, I did not included the vtkFiltersModeling in my CMakeList.txt. Now that it is done it solved my problem. Anyway I will try the script you mentioned as it is not always obvious which module to include ... Thanks again for such prompt answers. Please find my CMakeList.txt after this message. CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5 FATAL_ERROR) if(POLICY CMP0020) cmake_policy(SET CMP0020 NEW) endif() if(POLICY CMP0025) cmake_policy(SET CMP0025 NEW) # CMake 3.0 endif() if (POLICY CMP0043) cmake_policy(SET CMP0043 NEW) # CMake 3.0 endif() if(POLICY CMP0053) cmake_policy(SET CMP0053 NEW) # CMake 3.1 endif() ############################################# # PROJECT: Reagix# ############################################# PROJECT(Reagix) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) ##################################### # FIND PACKAGES IF BUILDING OUTSIDE # ################################-line 20##### find_package (VTK COMPONENTS vtkCommonCore vtkFiltersSources vtkInteractionStyle vtkRenderingCore vtkIOCore vtkIOGeometry vtkIOPLY vtkRenderingCore # vtkRenderingVolume vtkFiltersModeling vtkRenderingVolumeOpenGL2 vtkRenderingOpenGL2${VTK_RENDERING_BACKEND} vtkRenderingVolume${VTK_RENDERING_BACKEND} #for qt app vtkGUISupportQt vtkIOImage ) include ( ${VTK_USE_FILE} ) include_Directories (${CMAKE_CURRENT_BINARY_DIR}) ############################################# # SOURCE FILE SPECIFICATION # ############################################# SET(LOGIC_SOURCE main.cxx RemiRenderer.cxx LoadHeartModel.cxx LoadMR.cxx CreateCatheterModel.cxx ReagixApp.cxx ReagixQtApp.cxx DataCenter.cxx # RemiSTLReader.cxx. # vtkSTLReader.cxx ) #SET(LOGIC_QT_SOURCE # QHello.cxx) # The headers for the Logic code SET(LOGIC_HEADERS ReagixQtApp.h RemiRenderer.h LoadHeartModel.h LoadMR.h DataCenter.h CreateCatheterModel.h ReagixApp.h ) find_package(Qt5 COMPONENTS Core REQUIRED QUIET) ############################################# # LIBRARIES AND EXTERNAL CODE # ############################################# ADD_EXECUTABLE(Reagix ${LOGIC_HEADERS} ${LOGIC_SOURCE}) qt5_use_modules(Reagix Core Gui Widgets) TARGET_LINK_LIBRARIES(Reagix ${VTK_LIBRARIES} ) 2016-07-01 9:01 GMT+02:00 Elvis Stansvik : > 2016-06-30 17:32 GMT+02:00 Remi Charrier : > >> Hi, >> >> I would like to try the following filters: >> "vtkButterflySubdivisionFilter.h" >> "vtkLoopSubdivisionFilter.h" >> "vtkLinearSubdivisionFilter.h" >> in order to increase the number of cells in my 3D models. >> >> I have the source files but they didn't compile as I probably did not >> include them in the CMake process. However I still don't understand where >> to find to which vtkmodule a specific file is linked. I thought it was >> based on the folders name but in this case, the path is : >> VTK-7.0.0\Filters\Modeling >> in the cmakelist.txt of this folder I find that it may be associated with >> vtkFiltersModeling >> But I don't have this module or entry in the Cmake window. >> Any help would be welcome. >> Thanks in advance >> > > David Gobbi recently pointed me at a handy script included in the VTK > source. You can run it on your files/directories an it will try to > determine which modules you need besed on the headers you include. > > Running it on just those three headers, I get: > > estan at newton:~/orexplore/VTK$ cat test.cpp > #include > #include > #include > estan at newton:~/orexplore/VTK$ Utilities/Maintenance/WhatModulesVTK.py . > test.cpp > Modules and their dependencies: > find_package(VTK COMPONENTS > vtkCommonComputationalGeometry > vtkCommonCore > vtkCommonDataModel > vtkCommonExecutionModel > vtkCommonMath > vtkCommonMisc > vtkCommonSystem > vtkCommonTransforms > vtkFiltersCore > vtkFiltersGeneral > vtkFiltersModeling > vtkFiltersSources > vtkkwiml > ) > Your application code includes 13 of 189 vtk modules. > > All modules referenced in the files: > find_package(VTK COMPONENTS > vtkFiltersModeling > ) > Your application code includes 1 of 189 vtk modules. > > Minimal set of modules: > find_package(VTK COMPONENTS > vtkFiltersModeling > ) > Your application code includes 1 of 189 vtk modules. > > > estan at newton:~/orexplore/VTK$ > > I don't know why you don't have the vtkFiltersModeling module, but it > would help to see your CMakeLists.txt and CMake output I think. > > Elvis > > R?mi >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Jul 1 03:27:13 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 1 Jul 2016 09:27:13 +0200 Subject: [vtkusers] Which Vtk Module to build to have access to "vtkButterflySubdivisionFilter.h" , "vtkLoopSubdivisionFilter.h" and "vtkLinearSubdivisionFilter.h" In-Reply-To: References: Message-ID: 2016-07-01 9:09 GMT+02:00 Remi Charrier : > Dear all, > Thanks for your answer, it solved my problem. In fact, I did not included > the vtkFiltersModeling in my CMakeList.txt. Now that it is done it solved > my problem. Anyway I will try the script you mentioned as it is not always > obvious which module to include ... > Glad it worked out. Elvis > Thanks again for such prompt answers. Please find my CMakeList.txt after > this message. > > CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5 FATAL_ERROR) > if(POLICY CMP0020) > cmake_policy(SET CMP0020 NEW) > endif() > if(POLICY CMP0025) > cmake_policy(SET CMP0025 NEW) # CMake 3.0 > endif() > if (POLICY CMP0043) > cmake_policy(SET CMP0043 NEW) # CMake 3.0 > endif() > if(POLICY CMP0053) > cmake_policy(SET CMP0053 NEW) # CMake 3.1 > endif() > > ############################################# > # PROJECT: Reagix# > ############################################# > PROJECT(Reagix) > > > # Find includes in corresponding build directories > set(CMAKE_INCLUDE_CURRENT_DIR ON) > # Instruct CMake to run moc automatically when needed. > set(CMAKE_AUTOMOC ON) > > > ##################################### > # FIND PACKAGES IF BUILDING OUTSIDE # > ################################-line 20##### > > find_package (VTK COMPONENTS > vtkCommonCore > vtkFiltersSources > vtkInteractionStyle > vtkRenderingCore > vtkIOCore > vtkIOGeometry > vtkIOPLY > vtkRenderingCore > # vtkRenderingVolume > vtkFiltersModeling > vtkRenderingVolumeOpenGL2 > vtkRenderingOpenGL2${VTK_RENDERING_BACKEND} > vtkRenderingVolume${VTK_RENDERING_BACKEND} > > > > #for qt app > vtkGUISupportQt > vtkIOImage > ) > > > > include ( ${VTK_USE_FILE} ) > > include_Directories (${CMAKE_CURRENT_BINARY_DIR}) > > ############################################# > # SOURCE FILE SPECIFICATION # > ############################################# > > > SET(LOGIC_SOURCE > main.cxx > RemiRenderer.cxx > LoadHeartModel.cxx > LoadMR.cxx > CreateCatheterModel.cxx > ReagixApp.cxx > ReagixQtApp.cxx > DataCenter.cxx > # RemiSTLReader.cxx. > # vtkSTLReader.cxx > ) > > #SET(LOGIC_QT_SOURCE > # QHello.cxx) > > > # The headers for the Logic code > SET(LOGIC_HEADERS > ReagixQtApp.h > RemiRenderer.h > LoadHeartModel.h > LoadMR.h > DataCenter.h > CreateCatheterModel.h > ReagixApp.h > ) > > > find_package(Qt5 COMPONENTS Core REQUIRED QUIET) > > > ############################################# > # LIBRARIES AND EXTERNAL CODE # > ############################################# > > ADD_EXECUTABLE(Reagix ${LOGIC_HEADERS} ${LOGIC_SOURCE}) > qt5_use_modules(Reagix Core Gui Widgets) > TARGET_LINK_LIBRARIES(Reagix ${VTK_LIBRARIES} ) > > > > > > > > > 2016-07-01 9:01 GMT+02:00 Elvis Stansvik : > >> 2016-06-30 17:32 GMT+02:00 Remi Charrier : >> >>> Hi, >>> >>> I would like to try the following filters: >>> "vtkButterflySubdivisionFilter.h" >>> "vtkLoopSubdivisionFilter.h" >>> "vtkLinearSubdivisionFilter.h" >>> in order to increase the number of cells in my 3D models. >>> >>> I have the source files but they didn't compile as I probably did not >>> include them in the CMake process. However I still don't understand where >>> to find to which vtkmodule a specific file is linked. I thought it was >>> based on the folders name but in this case, the path is : >>> VTK-7.0.0\Filters\Modeling >>> in the cmakelist.txt of this folder I find that it may be associated >>> with vtkFiltersModeling >>> But I don't have this module or entry in the Cmake window. >>> Any help would be welcome. >>> Thanks in advance >>> >> >> David Gobbi recently pointed me at a handy script included in the VTK >> source. You can run it on your files/directories an it will try to >> determine which modules you need besed on the headers you include. >> >> Running it on just those three headers, I get: >> >> estan at newton:~/orexplore/VTK$ cat test.cpp >> #include >> #include >> #include >> estan at newton:~/orexplore/VTK$ Utilities/Maintenance/WhatModulesVTK.py . >> test.cpp >> Modules and their dependencies: >> find_package(VTK COMPONENTS >> vtkCommonComputationalGeometry >> vtkCommonCore >> vtkCommonDataModel >> vtkCommonExecutionModel >> vtkCommonMath >> vtkCommonMisc >> vtkCommonSystem >> vtkCommonTransforms >> vtkFiltersCore >> vtkFiltersGeneral >> vtkFiltersModeling >> vtkFiltersSources >> vtkkwiml >> ) >> Your application code includes 13 of 189 vtk modules. >> >> All modules referenced in the files: >> find_package(VTK COMPONENTS >> vtkFiltersModeling >> ) >> Your application code includes 1 of 189 vtk modules. >> >> Minimal set of modules: >> find_package(VTK COMPONENTS >> vtkFiltersModeling >> ) >> Your application code includes 1 of 189 vtk modules. >> >> >> estan at newton:~/orexplore/VTK$ >> >> I don't know why you don't have the vtkFiltersModeling module, but it >> would help to see your CMakeLists.txt and CMake output I think. >> >> Elvis >> >> R?mi >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.Buykx at tnodiana.com Fri Jul 1 03:53:39 2016 From: A.Buykx at tnodiana.com (Andreas Buykx) Date: Fri, 1 Jul 2016 07:53:39 +0000 Subject: [vtkusers] vtkMultiBlockDataSet and vtkDataSetSurfaceFilter Message-ID: <65D987BE62E58141AA480A59A8B5BBEA71F06A7B@srv-mail.diana.local> Hi, My finite element mesh is stored in a vtkMultiBlockDataSet. I use a vtkCompositeDataPipeline to process my algorithms. Visualizing the outer surface of the mesh using vtkDataSetSurfaceFilter generates the outer surface of each block, instead of the outer surface of the entire mesh. In the source algorithm I can define ghost cells, but to know how many levels of ghost cells I have to generate I should be reading the UPDATE_NUMBER_OF_GHOST_LEVELS, if I understand correctly. Looking at vtkDataSetSurfaceFilter it seems that it requests ghost cells only if UPDATE_NUMBER_OF_PIECES > 1. Similar code is in vtkFeatureEdges and several other algorithms that I use. So it seems that I have to fool my pipeline into thinking that it processes multiple pieces, by setting UPDATE_NUMBER_OF_PIECES to >1. Is that possible at all? Should I also set other update information, like UPDATE_PIECE_NUMBER? Where in the pipeline should I set this information? Is there an alternative way of doing this? Thanks for your advice. Kind regards, Andreas Buykx -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Fri Jul 1 04:13:27 2016 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Fri, 1 Jul 2016 01:13:27 -0700 (MST) Subject: [vtkusers] Custom cursor shapes In-Reply-To: References: <91D8CC7A-821C-4A5E-9519-97A8A3611E45@gmail.com> <1467271001238-5739006.post@n5.nabble.com> Message-ID: <1467360807276-5739043.post@n5.nabble.com> Hello Enzo, the type of myVTKPanel is a extended vtkCanvas. -- View this message in context: http://vtk.1045678.n5.nabble.com/Custom-cursor-shapes-tp5738967p5739043.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.stansvik at orexplore.com Fri Jul 1 09:07:14 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 1 Jul 2016 15:07:14 +0200 Subject: [vtkusers] Dealing with QTBUG-40889 Message-ID: I'm in the unfortunate situation of having to support Qt 5.5.1, and I'm hit by https://bugreports.qt.io/browse/QTBUG-40889 which was fixed in 5.6 with https://codereview.qt-project.org/#/c/126136/ I've been trying to find a way to work around this bug using a combination of native and non-native event filters in Qt, but haven't really found a good solution. The problem is I want to use the built-in interactor styles in VTK, such as vtkInteractorStyleTrackballCamera, and these makes calls to Render() as fast as the mouse events arrive. I have to ask: Is this really a good idea, shoudn't the rendering be governed by a timer during the interaction (say dolly), to be more robust against a flood of mouse events? The reason Qt has even buffered events (and hence opened up for compression, barring that bug) is that the main thread is overworked. And this is due to VTK rendering at every mouse move event. If I make my own completely custom interactor style, I of course have full control and can let a timer govern the rendering, but I was hoping to leverage the built-in ones. And it's not possible to subclass them and disable just the Render calls unfortunately. At the moment I don't quite know what to do. Moving the camera around in a VTK window is like syrup, and our product is to run using the Qt 5.5.1 that is packaged in *buntu Xenial :( Thanks for any advice, especially if you've worked around this problem yourself somehow. Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Jul 1 09:35:08 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 1 Jul 2016 15:35:08 +0200 Subject: [vtkusers] Dealing with QTBUG-40889 In-Reply-To: References: Message-ID: 2016-07-01 15:07 GMT+02:00 Elvis Stansvik : > I'm in the unfortunate situation of having to support Qt 5.5.1, and I'm > hit by > > https://bugreports.qt.io/browse/QTBUG-40889 > > which was fixed in 5.6 with > > https://codereview.qt-project.org/#/c/126136/ > > I've been trying to find a way to work around this bug using a combination > of native and non-native event filters in Qt, but haven't really found a > good solution. > > The problem is I want to use the built-in interactor styles in VTK, such > as vtkInteractorStyleTrackballCamera, and these makes calls to Render() as > fast as the mouse events arrive. > > I have to ask: Is this really a good idea, shoudn't the rendering be > governed by a timer during the interaction (say dolly), to be more robust > against a flood of mouse events? The reason Qt has even buffered events > (and hence opened up for compression, barring that bug) is that the main > thread is overworked. And this is due to VTK rendering at every mouse move > event. > > If I make my own completely custom interactor style, I of course have full > control and can let a timer govern the rendering, but I was hoping to > leverage the built-in ones. And it's not possible to subclass them and > disable just the Render calls unfortunately. > > At the moment I don't quite know what to do. Moving the camera around in a > VTK window is like syrup, and our product is to run using the Qt 5.5.1 that > is packaged in *buntu Xenial :( > > Thanks for any advice, especially if you've worked around this problem > yourself somehow. > I was thinking: Surely ParaView (when compiled against Qt 5.5.x) must be facing this problem as well? I'm sure the ParaView folks would like this combo to work well, since Ubuntu 16.04 is an LTS release that will see very widespread use. Any ParaView developers who could speak up? Elvis > Elvis > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chuck.atkins at kitware.com Fri Jul 1 12:58:32 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Fri, 1 Jul 2016 12:58:32 -0400 Subject: [vtkusers] Issues when using Mesa 11.2.2 In-Reply-To: References: Message-ID: Ken, Just to close the loop on this, I saw this issue pop up on the mesa-users list and helped Patricio's colleague, Edson, fix it. You can check out the thread here if you'd like: https://lists.freedesktop.org/archives/mesa-users/2016-June/001175.html . To make a long story short, there's some murky / conflicting configure options for the current mesa release. I was able to get get them up and running and I fixed the issue upstream a while ago. Sorry I didn't see it over here first :-/ - Chuck On Tue, Jun 28, 2016 at 5:51 PM, Ken Martin wrote: > Setting MESA_GL_VERSION_OVERRIDE = 3.2 means your graphics library does > not support OpenGL 3.2 normally. If you are using Mesa 11.2.2 I suspect > that means you are not using the llvmpipe driver (which does support 3.2) > but some other driver. glxinfo can help narrow that down to see what driver > is being used. > > Thanks > Ken > > On Tue, Jun 28, 2016 at 5:37 PM, Patricio Palma C. > wrote: > >> Hello Expert >> >> I'm testing VTK 7.1(git) with OpenGL2 using Mesa 11.2.2 and it fails at >> when rendering the structure. >> >> The first error I got is: >> >> ERROR: In vtkShaderProgram.cxx, line 370 >> vtkShaderProgram (0xa385610): Error: GL_EXT_gpu_shader4: required >> extension is not supported. >> Error: failed to preprocess the source. >> >> This was solved by defining MESA_GL_VERSION_OVERRIDE = 3.2 >> >> After that VTK request GLSL at least 1.50 then variable >> MESA_GL_VERSION_OVERRIDE is defined as 150 >> >> After that I got the following message: >> >> Program received signal SIGSEGV, Segmentation fault. >> 0x00002aaaaf55181b in vtkShaderProgram::FindUniform(char const*) () at >> Rendering/OpenGL2/vtkShaderProgram.cxx:772 >> 772 if (name == NULL || !this->Linked) >> >> ?Do you have any idea on how I could solve this crash? >> >> Regards? >> -- >> Patricio Palma Contreras >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luciano.geronimo.fnord at gmail.com Fri Jul 1 15:28:54 2016 From: luciano.geronimo.fnord at gmail.com (Luciano Geronimo) Date: Fri, 1 Jul 2016 16:28:54 -0300 Subject: [vtkusers] Rendering opencl data Message-ID: As far as I know, to render data that has been processed using opencl I have to copy the data from the GPU back to the main memory, putting it in a vtkImage and, when that image is used by a mapper, the data is copied back to the GPU. I need that because I would like to use the itk::GPUImage to do heavy processing and render it. Assuming I understood correctly, are there any mappers/actors to render opencl images int VTK? -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Jul 1 15:30:39 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 1 Jul 2016 21:30:39 +0200 Subject: [vtkusers] Rendering opencl data In-Reply-To: References: Message-ID: Not that I am aware of. - Cory On Fri, Jul 1, 2016 at 9:28 PM, Luciano Geronimo wrote: > As far as I know, to render data that has been processed using opencl I have > to copy the data from the GPU back to the main memory, putting it in a > vtkImage and, when that image is used by a mapper, the data is copied back > to the GPU. > > I need that because I would like to use the itk::GPUImage to do heavy > processing and render it. > > Assuming I understood correctly, are there any mappers/actors to render > opencl images int VTK? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. From clinton at elemtech.com Fri Jul 1 18:08:19 2016 From: clinton at elemtech.com (clinton at elemtech.com) Date: Fri, 1 Jul 2016 16:08:19 -0600 (MDT) Subject: [vtkusers] Dealing with QTBUG-40889 In-Reply-To: References: Message-ID: <484245716.125627680.1467410899638.JavaMail.zimbra@elemtech.com> ----- On Jul 1, 2016, at 7:07 AM, Elvis Stansvik wrote: > I'm in the unfortunate situation of having to support Qt 5.5.1, and I'm hit by > https://bugreports.qt.io/browse/QTBUG-40889 > which was fixed in 5.6 with > https://codereview.qt-project.org/#/c/126136/ > I've been trying to find a way to work around this bug using a combination of > native and non-native event filters in Qt, but haven't really found a good > solution. > The problem is I want to use the built-in interactor styles in VTK, such as > vtkInteractorStyleTrackballCamera, and these makes calls to Render() as fast as > the mouse events arrive. > I have to ask: Is this really a good idea, shoudn't the rendering be governed by > a timer during the interaction (say dolly), to be more robust against a flood > of mouse events? The reason Qt has even buffered events (and hence opened up > for compression, barring that bug) is that the main thread is overworked. And > this is due to VTK rendering at every mouse move event. > If I make my own completely custom interactor style, I of course have full > control and can let a timer govern the rendering, but I was hoping to leverage > the built-in ones. And it's not possible to subclass them and disable just the > Render calls unfortunately. > At the moment I don't quite know what to do. Moving the camera around in a VTK > window is like syrup, and our product is to run using the Qt 5.5.1 that is > packaged in *buntu Xenial :( > Thanks for any advice, especially if you've worked around this problem yourself > somehow. > Elvis I think this problem is related to not following the Qt recommended way of doing rendering with mouse events. What Qt 5.5 would like to do is give you 2 or maybe 3 mouse events per render. To do that with VTK, you can implement a render callback for the interactor, which calls QVTKWidget::update(), then overload QVTKWidget::paintEvent() to call vtkRenderWindow::Render() instead of vtkRenderWindowInteractor::Render(). This is what I have done to gain back the responsiveness. I've had thoughts in the past about proposing a vtkRenderWindowInteractor::RequestRender() function which the interactor style classes can use, which might help solve this problem. But then with Qt 5.6, the problem goes away. Clint -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jul 1 19:13:42 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 1 Jul 2016 17:13:42 -0600 Subject: [vtkusers] Dealing with QTBUG-40889 In-Reply-To: <484245716.125627680.1467410899638.JavaMail.zimbra@elemtech.com> References: <484245716.125627680.1467410899638.JavaMail.zimbra@elemtech.com> Message-ID: On Fri, Jul 1, 2016 at 4:08 PM, wrote: > > > ----- On Jul 1, 2016, at 7:07 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > > I'm in the unfortunate situation of having to support Qt 5.5.1, and I'm > hit by > > https://bugreports.qt.io/browse/QTBUG-40889 > > which was fixed in 5.6 with > > https://codereview.qt-project.org/#/c/126136/ > > I've been trying to find a way to work around this bug using a combination > of native and non-native event filters in Qt, but haven't really found a > good solution. > > The problem is I want to use the built-in interactor styles in VTK, such > as vtkInteractorStyleTrackballCamera, and these makes calls to Render() as > fast as the mouse events arrive. > > I have to ask: Is this really a good idea, shoudn't the rendering be > governed by a timer during the interaction (say dolly), to be more robust > against a flood of mouse events? The reason Qt has even buffered events > (and hence opened up for compression, barring that bug) is that the main > thread is overworked. And this is due to VTK rendering at every mouse move > event. > > If I make my own completely custom interactor style, I of course have full > control and can let a timer govern the rendering, but I was hoping to > leverage the built-in ones. And it's not possible to subclass them and > disable just the Render calls unfortunately. > > At the moment I don't quite know what to do. Moving the camera around in a > VTK window is like syrup, and our product is to run using the Qt 5.5.1 that > is packaged in *buntu Xenial :( > > Thanks for any advice, especially if you've worked around this problem > yourself somehow. > > Elvis > > > I think this problem is related to not following the Qt recommended way of > doing rendering with mouse events. > What Qt 5.5 would like to do is give you 2 or maybe 3 mouse events per > render. > > To do that with VTK, you can implement a render callback for the > interactor, which calls QVTKWidget::update(), then overload > QVTKWidget::paintEvent() to call vtkRenderWindow::Render() instead of > vtkRenderWindowInteractor::Render(). > > This is what I have done to gain back the responsiveness. > I've had thoughts in the past about proposing > a vtkRenderWindowInteractor::RequestRender() function which the interactor > style classes can use, which might help solve this problem. But then with > Qt 5.6, the problem goes away. > I don't use the interactors, but apart from that my Qt widget does what Clint describes: void cbQtWidget::paintEvent(QPaintEvent *) { if (updatesEnabled()) { m_ViewFrame->Render(); // calls vtkRenderWindow::Render() } } This is the only place where I allow a render to occur. Qt is 100% in charge. However, since VTK no longer renders for every input event, I have to be careful when I use the VTK picker. I wrote a method called UpdatePropsForPick() that I call for every input event, and it ensures that the picking works correctly regardless of whether the Render()s are actually happening. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sat Jul 2 06:12:20 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sat, 2 Jul 2016 12:12:20 +0200 Subject: [vtkusers] Dealing with QTBUG-40889 In-Reply-To: References: <484245716.125627680.1467410899638.JavaMail.zimbra@elemtech.com> Message-ID: Thanks to both of you for your answers. 2016-07-02 1:13 GMT+02:00 David Gobbi : > On Fri, Jul 1, 2016 at 4:08 PM, wrote: > >> >> >> ----- On Jul 1, 2016, at 7:07 AM, Elvis Stansvik < >> elvis.stansvik at orexplore.com> wrote: >> >> I'm in the unfortunate situation of having to support Qt 5.5.1, and I'm >> hit by >> >> https://bugreports.qt.io/browse/QTBUG-40889 >> >> which was fixed in 5.6 with >> >> https://codereview.qt-project.org/#/c/126136/ >> >> I've been trying to find a way to work around this bug using a >> combination of native and non-native event filters in Qt, but haven't >> really found a good solution. >> >> The problem is I want to use the built-in interactor styles in VTK, such >> as vtkInteractorStyleTrackballCamera, and these makes calls to Render() as >> fast as the mouse events arrive. >> >> I have to ask: Is this really a good idea, shoudn't the rendering be >> governed by a timer during the interaction (say dolly), to be more robust >> against a flood of mouse events? The reason Qt has even buffered events >> (and hence opened up for compression, barring that bug) is that the main >> thread is overworked. And this is due to VTK rendering at every mouse move >> event. >> >> If I make my own completely custom interactor style, I of course have >> full control and can let a timer govern the rendering, but I was hoping to >> leverage the built-in ones. And it's not possible to subclass them and >> disable just the Render calls unfortunately. >> >> At the moment I don't quite know what to do. Moving the camera around in >> a VTK window is like syrup, and our product is to run using the Qt 5.5.1 >> that is packaged in *buntu Xenial :( >> >> Thanks for any advice, especially if you've worked around this problem >> yourself somehow. >> >> Elvis >> >> >> I think this problem is related to not following the Qt recommended way >> of doing rendering with mouse events. >> What Qt 5.5 would like to do is give you 2 or maybe 3 mouse events per >> render. >> >> To do that with VTK, you can implement a render callback for the >> interactor, which calls QVTKWidget::update(), then overload >> QVTKWidget::paintEvent() to call vtkRenderWindow::Render() instead of >> vtkRenderWindowInteractor::Render(). >> >> This is what I have done to gain back the responsiveness. >> I've had thoughts in the past about proposing >> a vtkRenderWindowInteractor::RequestRender() function which the interactor >> style classes can use, which might help solve this problem. But then with >> Qt 5.6, the problem goes away. >> > This worked great and is a much simpler workaround than I had in mind. Thanks! For reference to others, what I did in the QVTKWidget subclass I was experimenting with was: SampleWidget::SampleWidget(QWidget *parent, Qt::WindowFlags f) : QVTKWidget(parent, f) { // Set up some stuff (cylinder, polymapper, renderer) GetInteractor()->AddObserver(vtkCommand::RenderEvent, this, &SampleWidget::onInteractorRender); GetInteractor()->SetEnableRender(false); } void SampleWidget::paintEvent(QPaintEvent *event) { Q_UNUSED(event); if (updatesEnabled()) { GetRenderWindow()->Render(); } } void SampleWidget::onInteractorRender(vtkObject* caller, long unsigned int eventId, void* callData) { Q_UNUSED(caller); Q_UNUSED(eventId); Q_UNUSED(callData); update(); } The GetInteractor()->SetEnableRender(false) was one important part, otherwise the interactor would still issue direct calls to Render on the render window. > > I don't use the interactors, but apart from that my Qt widget does what > Clint describes: > > void cbQtWidget::paintEvent(QPaintEvent *) > { > if (updatesEnabled()) { > m_ViewFrame->Render(); // calls vtkRenderWindow::Render() > } > } > > This is the only place where I allow a render to occur. Qt is 100% in > charge. > Yep, this worked fine. And with Clint's maneuver I could also make use of the interactor/interactor styles. > > However, since VTK no longer renders for every input event, I have to be > careful when I use the VTK picker. I wrote a method called > UpdatePropsForPick() that I call for every input event, and it ensures that > the picking works correctly regardless of whether the Render()s are > actually happening. > Ah, this is good advice. Would you mind sharing how it ensures this? Not necessarily in code, but just in a few words? I'm quite new to VTK and haven't done any picking yet. Elvis > > - David > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sat Jul 2 06:41:08 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sat, 2 Jul 2016 12:41:08 +0200 Subject: [vtkusers] Dealing with QTBUG-40889 In-Reply-To: References: <484245716.125627680.1467410899638.JavaMail.zimbra@elemtech.com> Message-ID: 2016-07-02 12:12 GMT+02:00 Elvis Stansvik : > Thanks to both of you for your answers. > > 2016-07-02 1:13 GMT+02:00 David Gobbi : > >> On Fri, Jul 1, 2016 at 4:08 PM, wrote: >> >>> >>> >>> ----- On Jul 1, 2016, at 7:07 AM, Elvis Stansvik < >>> elvis.stansvik at orexplore.com> wrote: >>> >>> I'm in the unfortunate situation of having to support Qt 5.5.1, and I'm >>> hit by >>> >>> https://bugreports.qt.io/browse/QTBUG-40889 >>> >>> which was fixed in 5.6 with >>> >>> https://codereview.qt-project.org/#/c/126136/ >>> >>> I've been trying to find a way to work around this bug using a >>> combination of native and non-native event filters in Qt, but haven't >>> really found a good solution. >>> >>> The problem is I want to use the built-in interactor styles in VTK, such >>> as vtkInteractorStyleTrackballCamera, and these makes calls to Render() as >>> fast as the mouse events arrive. >>> >>> I have to ask: Is this really a good idea, shoudn't the rendering be >>> governed by a timer during the interaction (say dolly), to be more robust >>> against a flood of mouse events? The reason Qt has even buffered events >>> (and hence opened up for compression, barring that bug) is that the main >>> thread is overworked. And this is due to VTK rendering at every mouse move >>> event. >>> >>> If I make my own completely custom interactor style, I of course have >>> full control and can let a timer govern the rendering, but I was hoping to >>> leverage the built-in ones. And it's not possible to subclass them and >>> disable just the Render calls unfortunately. >>> >>> At the moment I don't quite know what to do. Moving the camera around in >>> a VTK window is like syrup, and our product is to run using the Qt 5.5.1 >>> that is packaged in *buntu Xenial :( >>> >>> Thanks for any advice, especially if you've worked around this problem >>> yourself somehow. >>> >>> Elvis >>> >>> >>> I think this problem is related to not following the Qt recommended way >>> of doing rendering with mouse events. >>> What Qt 5.5 would like to do is give you 2 or maybe 3 mouse events per >>> render. >>> >>> To do that with VTK, you can implement a render callback for the >>> interactor, which calls QVTKWidget::update(), then overload >>> QVTKWidget::paintEvent() to call vtkRenderWindow::Render() instead of >>> vtkRenderWindowInteractor::Render(). >>> >>> This is what I have done to gain back the responsiveness. >>> I've had thoughts in the past about proposing >>> a vtkRenderWindowInteractor::RequestRender() function which the interactor >>> style classes can use, which might help solve this problem. But then with >>> Qt 5.6, the problem goes away. >>> >> > This worked great and is a much simpler workaround than I had in mind. > Thanks! > > For reference to others, what I did in the QVTKWidget subclass I was > experimenting with was: > > SampleWidget::SampleWidget(QWidget *parent, Qt::WindowFlags f) : > QVTKWidget(parent, f) > { > // Set up some stuff (cylinder, polymapper, renderer) > > GetInteractor()->AddObserver(vtkCommand::RenderEvent, this, > &SampleWidget::onInteractorRender); > In fact, I could use update() as the callback directly: GetInteractor()->AddObserver(vtkCommand::RenderEvent, this, &SampleWidget::update); Elvis > GetInteractor()->SetEnableRender(false); > } > > void SampleWidget::paintEvent(QPaintEvent *event) > { > Q_UNUSED(event); > > if (updatesEnabled()) { > GetRenderWindow()->Render(); > } > } > > void SampleWidget::onInteractorRender(vtkObject* caller, long unsigned int > eventId, void* callData) > { > Q_UNUSED(caller); > Q_UNUSED(eventId); > Q_UNUSED(callData); > > update(); > } > > The GetInteractor()->SetEnableRender(false) was one important part, > otherwise the interactor would still issue direct calls to Render on the > render window. > > >> >> I don't use the interactors, but apart from that my Qt widget does what >> Clint describes: >> >> void cbQtWidget::paintEvent(QPaintEvent *) >> { >> if (updatesEnabled()) { >> m_ViewFrame->Render(); // calls vtkRenderWindow::Render() >> } >> } >> >> This is the only place where I allow a render to occur. Qt is 100% in >> charge. >> > > Yep, this worked fine. And with Clint's maneuver I could also make use of > the interactor/interactor styles. > > >> >> However, since VTK no longer renders for every input event, I have to be >> careful when I use the VTK picker. I wrote a method called >> UpdatePropsForPick() that I call for every input event, and it ensures that >> the picking works correctly regardless of whether the Render()s are >> actually happening. >> > > Ah, this is good advice. Would you mind sharing how it ensures this? Not > necessarily in code, but just in a few words? I'm quite new to VTK and > haven't done any picking yet. > > Elvis > > >> >> - David >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sat Jul 2 07:09:05 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sat, 2 Jul 2016 13:09:05 +0200 Subject: [vtkusers] CMake best practice for using VTK? In-Reply-To: References: Message-ID: 2016-06-27 22:10 GMT+02:00 David Gobbi : > > > On Mon, Jun 27, 2016 at 1:44 PM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> I'm using the trio >> >> find_package(VTK REQUIRED) >> >> include(${VTK_USE_FILE}) >> >> target_link_libraries(myapp ${VTK_LIBRARIES}) >> >> in my CMakeLists.txt, to find and link against VTK, like is done in the >> VTK examples. >> >> I'm surprised by two things: >> >> 1. The shear amount of libraries that are linked against. Are all these >> really necessary, or is it possible to more selective somehow? Is there >> something like Qt's CMake system, where you can pull in just a certain Qt >> module with target_link_libraries(myapp Qt5::Widgets) ? >> >> 2. How come the .so files are specified directly as inputs, with their >> full paths? Isn't the common method to just add the appropriate -l (and >> possibly -L if needed) flags? >> > > I build my own list that contains only the libraries that I need, and I > also try to be careful about public vs. private linkage. For example: > > set(VTK_LIBS vtkCommonCore vtkCommonDataModel vtkImagingCore > vtkIOImage) > # Also link vtkIOMPIImage if present, it has factories for vtkIOImage > list(FIND VTK_LIBRARIES vtkIOMPIImage TMP_INDEX) > if(TMP_INDEX GREATER -1) > set(VTK_LIBS ${VTK_LIBS} vtkIOMPIImage) > endif() > > target_link_libraries(${LIB_NAME} LINK_PUBLIC ${VTK_LIBS}) > # target_link_libraries(${LIB_NAME} LINK_PRIVATE ) > > To find out what modules you need to link, the script > VTK/Utilities/Maintenance/WhatModulesVTK.py can be of some use. > I'm actually a little unsure which set of modules that the script prints I should be using. It prints three set of modules: referenced, minimal and maximal. E.g: Modules and their dependencies: find_package(VTK COMPONENTS vtkCommonColor vtkCommonComputationalGeometry vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkCommonMisc vtkCommonSystem vtkCommonTransforms vtkFiltersCore vtkFiltersGeneral vtkFiltersSources vtkGUISupportQt vtkImagingCore vtkInteractionStyle vtkRenderingCore vtkRenderingOpenGL vtkkwiml ) Your application code includes 18 of 189 vtk modules. All modules referenced in the files: find_package(VTK COMPONENTS vtkCommonCore vtkFiltersSources vtkGUISupportQt vtkRenderingCore vtkRenderingOpenGL ) Your application code includes 5 of 189 vtk modules. Minimal set of modules: find_package(VTK COMPONENTS vtkCommonCore vtkFiltersSources vtkGUISupportQt ) Your application code includes 3 of 189 vtk modules. Would it be enough to use the minimal set? When would I want to use one of the other two? Elvis > I know this doesn't cover all of your points, but unfortunately this is as > complete an answer as I have time to give right now. Hopefully someone > else can jump in and provide more details. > > - David > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Jul 2 08:03:17 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 2 Jul 2016 06:03:17 -0600 Subject: [vtkusers] Dealing with QTBUG-40889 In-Reply-To: References: <484245716.125627680.1467410899638.JavaMail.zimbra@elemtech.com> Message-ID: On Sat, Jul 2, 2016 at 4:12 AM, Elvis Stansvik wrote: > >> However, since VTK no longer renders for every input event, I have to be >> careful when I use the VTK picker. I wrote a method called >> UpdatePropsForPick() that I call for every input event, and it ensures that >> the picking works correctly regardless of whether the Render()s are >> actually happening. >> > > Ah, this is good advice. Would you mind sharing how it ensures this? Not > necessarily in code, but just in a few words? I'm quite new to VTK and > haven't done any picking yet. > Here's the code. It is only for pickers derived from vtkPicker (I use it with vtkCellPicker). Pickers derived from vtkPicker work by interrogating the data, i.e. they don't use OpenGL for the picking. Perhaps I should contribute this to VTK as a vtkPicker method. void UpdatePropsForPick(vtkPicker *picker, vtkRenderer *renderer) { // Go through all Prop3Ds that might be picked and update their data. // This is necessary if any data has changed since the last render. vtkPropCollection *props; if (picker->GetPickFromList()) { props = picker->GetPickList(); } else { props = renderer->GetViewProps(); } vtkProp *prop; vtkCollectionSimpleIterator pit; props->InitTraversal(pit); while ((prop = props->GetNextProp(pit)) != 0) { if (!prop->GetPickable() || !prop->GetVisibility()) { continue; } vtkAssemblyPath *path; prop->InitPathTraversal(); while ((path = prop->GetNextPath()) != 0) { vtkProp *anyProp = path->GetLastNode()->GetViewProp(); vtkActor *actor; vtkVolume *volume; vtkImageSlice *imageActor; if ((actor = vtkActor::SafeDownCast(anyProp)) != 0) { actor->GetMapper()->Update(); } else if ((volume = vtkVolume::SafeDownCast(anyProp)) != 0) { volume->GetMapper()->Update(); } else if ((imageActor = vtkImageSlice::SafeDownCast(anyProp)) != 0) { imageActor->GetMapper()->Update(); } } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sat Jul 2 08:24:02 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sat, 2 Jul 2016 14:24:02 +0200 Subject: [vtkusers] Dealing with QTBUG-40889 In-Reply-To: References: <484245716.125627680.1467410899638.JavaMail.zimbra@elemtech.com> Message-ID: 2016-07-02 14:03 GMT+02:00 David Gobbi : > On Sat, Jul 2, 2016 at 4:12 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> >>> However, since VTK no longer renders for every input event, I have to be >>> careful when I use the VTK picker. I wrote a method called >>> UpdatePropsForPick() that I call for every input event, and it ensures that >>> the picking works correctly regardless of whether the Render()s are >>> actually happening. >>> >> >> Ah, this is good advice. Would you mind sharing how it ensures this? Not >> necessarily in code, but just in a few words? I'm quite new to VTK and >> haven't done any picking yet. >> > > Here's the code. It is only for pickers derived from vtkPicker (I use it > with vtkCellPicker). Pickers derived from vtkPicker work by interrogating > the data, i.e. they don't use OpenGL for the picking. Perhaps I should > contribute this to VTK as a vtkPicker method. > Thanks a lot for this snippet. I'll get back to it should I need to do any picking (I expect I will). Elvis > void UpdatePropsForPick(vtkPicker *picker, vtkRenderer *renderer) > { > // Go through all Prop3Ds that might be picked and update their data. > // This is necessary if any data has changed since the last render. > vtkPropCollection *props; > if (picker->GetPickFromList()) { > props = picker->GetPickList(); > } > else { > props = renderer->GetViewProps(); > } > > vtkProp *prop; > vtkCollectionSimpleIterator pit; > props->InitTraversal(pit); > while ((prop = props->GetNextProp(pit)) != 0) { > if (!prop->GetPickable() || !prop->GetVisibility()) { > continue; > } > vtkAssemblyPath *path; > prop->InitPathTraversal(); > while ((path = prop->GetNextPath()) != 0) { > vtkProp *anyProp = path->GetLastNode()->GetViewProp(); > > vtkActor *actor; > vtkVolume *volume; > vtkImageSlice *imageActor; > > if ((actor = vtkActor::SafeDownCast(anyProp)) != 0) { > actor->GetMapper()->Update(); > } > else if ((volume = vtkVolume::SafeDownCast(anyProp)) != 0) { > volume->GetMapper()->Update(); > } > else if ((imageActor = vtkImageSlice::SafeDownCast(anyProp)) != 0) { > imageActor->GetMapper()->Update(); > } > } > } > } > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Jul 2 08:45:20 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 2 Jul 2016 06:45:20 -0600 Subject: [vtkusers] CMake best practice for using VTK? In-Reply-To: References: Message-ID: On Sat, Jul 2, 2016 at 5:09 AM, Elvis Stansvik wrote: > > > I'm actually a little unsure which set of modules that the script prints I > should be using. It prints three set of modules: referenced, minimal and > maximal. E.g: > > Modules and their dependencies: > find_package(VTK COMPONENTS > vtkCommonColor > vtkCommonComputationalGeometry > vtkCommonCore > vtkCommonDataModel > vtkCommonExecutionModel > vtkCommonMath > vtkCommonMisc > vtkCommonSystem > vtkCommonTransforms > vtkFiltersCore > vtkFiltersGeneral > vtkFiltersSources > vtkGUISupportQt > vtkImagingCore > vtkInteractionStyle > vtkRenderingCore > vtkRenderingOpenGL > vtkkwiml > ) > Your application code includes 18 of 189 vtk modules. > > All modules referenced in the files: > find_package(VTK COMPONENTS > vtkCommonCore > vtkFiltersSources > vtkGUISupportQt > vtkRenderingCore > vtkRenderingOpenGL > ) > Your application code includes 5 of 189 vtk modules. > > Minimal set of modules: > find_package(VTK COMPONENTS > vtkCommonCore > vtkFiltersSources > vtkGUISupportQt > ) > Your application code includes 3 of 189 vtk modules. > > > Would it be enough to use the minimal set? When would I want to use one of > the other two? > The minimal set should work. But I always use the middle set, because I want to directly link every library that contains a class that I directly utilize. If I rely on library dependencies to bring in all the libraries I use, then I will be out of luck if a future release of VTK manages to eliminate some of the dependencies I was relying on. Note that the fact that this list contains an OpenGL/OpenGL2 library means extra logic is required when building the link line. I end up with a mess of cmake code that looks like this: # Set VTK_LIBS to the libs I want to link set(VTK_LIBS vtkCommonCore vtkCommonDataModel vtkImagingCore vtkIOImage vtkIOSQL vtkRenderingImage vtkRenderingFreeType) # Conditionally add these libs if present in VTK_LIBRARIES set(VTK_FACTORY_LIBS vtkIOMPIImage vtkIOMySQL vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL vtkRenderingOpenGL2 vtkRenderingFreeTypeOpenGL2) foreach(TMP_LIB ${VTK_FACTORY_LIBS}) list(FIND VTK_LIBRARIES ${TMP_LIB} TMP_INDEX) if(TMP_INDEX GREATER -1) set(VTK_LIBS ${VTK_LIBS} ${TMP_LIB}) endif() endforeach() -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sat Jul 2 09:23:56 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sat, 2 Jul 2016 15:23:56 +0200 Subject: [vtkusers] CMake best practice for using VTK? In-Reply-To: References: Message-ID: Den 2 juli 2016 2:45 em skrev "David Gobbi" : > > On Sat, Jul 2, 2016 at 5:09 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: >> >> >> I'm actually a little unsure which set of modules that the script prints I should be using. It prints three set of modules: referenced, minimal and maximal. E.g: >> >> Modules and their dependencies: >> find_package(VTK COMPONENTS >> vtkCommonColor >> vtkCommonComputationalGeometry >> vtkCommonCore >> vtkCommonDataModel >> vtkCommonExecutionModel >> vtkCommonMath >> vtkCommonMisc >> vtkCommonSystem >> vtkCommonTransforms >> vtkFiltersCore >> vtkFiltersGeneral >> vtkFiltersSources >> vtkGUISupportQt >> vtkImagingCore >> vtkInteractionStyle >> vtkRenderingCore >> vtkRenderingOpenGL >> vtkkwiml >> ) >> Your application code includes 18 of 189 vtk modules. >> >> All modules referenced in the files: >> find_package(VTK COMPONENTS >> vtkCommonCore >> vtkFiltersSources >> vtkGUISupportQt >> vtkRenderingCore >> vtkRenderingOpenGL >> ) >> Your application code includes 5 of 189 vtk modules. >> >> Minimal set of modules: >> find_package(VTK COMPONENTS >> vtkCommonCore >> vtkFiltersSources >> vtkGUISupportQt >> ) >> Your application code includes 3 of 189 vtk modules. >> >> >> Would it be enough to use the minimal set? When would I want to use one of the other two? > > > The minimal set should work. But I always use the middle set, because I want to directly link every library that contains a class that I directly utilize. If I rely on library dependencies to bring in all the libraries I use, then I will be out of luck if a future release of VTK manages to eliminate some of the dependencies I was relying on. Ah yes, makes sense. > > Note that the fact that this list contains an OpenGL/OpenGL2 library means extra logic is required when building the link line. I end up with a mess of cmake code that looks like this: > > # Set VTK_LIBS to the libs I want to link > set(VTK_LIBS > vtkCommonCore vtkCommonDataModel vtkImagingCore > vtkIOImage vtkIOSQL > vtkRenderingImage vtkRenderingFreeType) > # Conditionally add these libs if present in VTK_LIBRARIES > set(VTK_FACTORY_LIBS > vtkIOMPIImage vtkIOMySQL > vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL > vtkRenderingOpenGL2 vtkRenderingFreeTypeOpenGL2) > foreach(TMP_LIB ${VTK_FACTORY_LIBS}) > list(FIND VTK_LIBRARIES ${TMP_LIB} TMP_INDEX) > if(TMP_INDEX GREATER -1) > set(VTK_LIBS ${VTK_LIBS} ${TMP_LIB}) > endif() > endforeach() Thanks, I might do this later, but for now I think I want to require the OpenGL2 backend and thus link against vtkRenderingOpenGL2 unconditionally. The app will initially run on a computer we provide as part of our product (analysis machine), so we'll have full control of the environment in which it runs. But this might change. Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From midi1990 at hotmail.fr Sat Jul 2 15:27:06 2016 From: midi1990 at hotmail.fr (mehdi) Date: Sat, 2 Jul 2016 12:27:06 -0700 (MST) Subject: [vtkusers] extract actors but keep their positions Message-ID: <1467487626518-5739069.post@n5.nabble.com> Hello, I'm able to extract many actors from one initial actor and display them with different colors. However, when I change the position of the initial actor (not the camera) before extracting the actors, the positions of the latter is the same as when the initial actor was not mooved. Is there a function to handle this? here is a code snippet: appendFilter->AddInputData(vtkPolyData::SafeDownCast(actor->GetMapper()->GetInput())); appendFilter->Update(); vtkPolyDataConnectivityFilter *connectivityFilter =vtkPolyDataConnectivityFilter::New(); connectivityFilter->SetInputConnection(appendFilter->GetOutputPort()); connectivityFilter->SetExtractionModeToAllRegions(); connectivityFilter->Update(); nbracteurs=connectivityFilter->GetNumberOfExtractedRegions(); connectivityFilter->SetExtractionModeToSpecifiedRegions(); for (i=0; iUpdate(); connectivityFilter->InitializeSpecifiedRegionList(); connectivityFilter->AddSpecifiedRegion(i); connectivityFilter->Update(); vtkPolyData *output = vtkPolyData::New(); output->DeepCopy(connectivityFilter->GetOutput()); vtkPolyDataMapper *mapper =vtkPolyDataMapper::New(); mapper->SetInputData(output); mapper->Update(); vtkActor *actor2=vtkActor::New(); actor2->SetMapper(mapper); m_renderer->AddActor(actor2); } -- View this message in context: http://vtk.1045678.n5.nabble.com/extract-actors-but-keep-their-positions-tp5739069.html Sent from the VTK - Users mailing list archive at Nabble.com. From zhangjiang.dudu at gmail.com Sat Jul 2 22:36:46 2016 From: zhangjiang.dudu at gmail.com (=?utf-8?B?5byg5rGf?=) Date: Sat, 2 Jul 2016 21:36:46 -0500 Subject: [vtkusers] read and partition unstructured grid data in parallel Message-ID: Hi, I am trying to read and partition an unstructured grid data for parallel applications. I am new to VTK. So anyone can tell me how to do this or show me the example code? Thanks very mech. Best regards From elvis.stansvik at orexplore.com Sun Jul 3 13:57:13 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sun, 3 Jul 2016 19:57:13 +0200 Subject: [vtkusers] Pass data in reader without copying? Message-ID: If I'm writing my own custom volume reader, and I have the read data in memory (say as a float*). If I know the data is in the right format/layout, can I somehow pass ownership of that data to the output of the algorithm without incurring a copy? I've been looking at some of the simpler readers that come with VTK, but all of them seems to copy the read data to the output (?). Thanks, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sun Jul 3 13:59:41 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sun, 3 Jul 2016 19:59:41 +0200 Subject: [vtkusers] Pass data in reader without copying? In-Reply-To: References: Message-ID: 2016-07-03 19:57 GMT+02:00 Elvis Stansvik : > If I'm writing my own custom volume reader, and I have the read data in > memory (say as a float*). If I know the data is in the right format/layout, > can I somehow pass ownership of that data to the output of the algorithm > without incurring a copy? > > I've been looking at some of the simpler readers that come with VTK, but > all of them seems to copy the read data to the output (?). > Looking at vtkImageData, what I would like (I think) is some way of setting the pointer that is returned by vtkImageData::GetScalarPointer. Elvis > Thanks, > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Jul 3 14:19:33 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 3 Jul 2016 12:19:33 -0600 Subject: [vtkusers] Pass data in reader without copying? In-Reply-To: References: Message-ID: On Sun, Jul 3, 2016 at 11:59 AM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > 2016-07-03 19:57 GMT+02:00 Elvis Stansvik : > >> If I'm writing my own custom volume reader, and I have the read data in >> memory (say as a float*). If I know the data is in the right format/layout, >> can I somehow pass ownership of that data to the output of the algorithm >> without incurring a copy? >> >> I've been looking at some of the simpler readers that come with VTK, but >> all of them seems to copy the read data to the output (?). >> > > Looking at vtkImageData, what I would like (I think) is some way of > setting the pointer that is returned by vtkImageData::GetScalarPointer. > Here is a cut & paste of code from vtkImageImport. Read the the documentation for vtkAbstractArray::SetVoidArray() carefully. vtkImageData *data = vtkImageData::SafeDownCast(output); data->SetExtent(0,0,0,0,0,0); data->AllocateScalars(outInfo); vtkIdType size = this->NumberOfScalarComponents; size *= this->DataExtent[1] - this->DataExtent[0] + 1; size *= this->DataExtent[3] - this->DataExtent[2] + 1; size *= this->DataExtent[5] - this->DataExtent[4] + 1; data->SetExtent(this->DataExtent); data->GetPointData()->GetScalars()->SetVoidArray(inputPtr, size, 1); data->GetPointData()->GetScalars()->SetName(this->ScalarArrayName); - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Sun Jul 3 15:06:05 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Sun, 3 Jul 2016 21:06:05 +0200 Subject: [vtkusers] Pass data in reader without copying? In-Reply-To: References: Message-ID: 2016-07-03 20:19 GMT+02:00 David Gobbi : > On Sun, Jul 3, 2016 at 11:59 AM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> 2016-07-03 19:57 GMT+02:00 Elvis Stansvik : >> >>> If I'm writing my own custom volume reader, and I have the read data in >>> memory (say as a float*). If I know the data is in the right format/layout, >>> can I somehow pass ownership of that data to the output of the algorithm >>> without incurring a copy? >>> >>> I've been looking at some of the simpler readers that come with VTK, but >>> all of them seems to copy the read data to the output (?). >>> >> >> Looking at vtkImageData, what I would like (I think) is some way of >> setting the pointer that is returned by vtkImageData::GetScalarPointer. >> > > Here is a cut & paste of code from vtkImageImport. Read the the > documentation for vtkAbstractArray::SetVoidArray() carefully. > Ah, thanks a lot. I should have found that. Elvis > > vtkImageData *data = vtkImageData::SafeDownCast(output); > data->SetExtent(0,0,0,0,0,0); > data->AllocateScalars(outInfo); > vtkIdType size = this->NumberOfScalarComponents; > size *= this->DataExtent[1] - this->DataExtent[0] + 1; > size *= this->DataExtent[3] - this->DataExtent[2] + 1; > size *= this->DataExtent[5] - this->DataExtent[4] + 1; > data->SetExtent(this->DataExtent); > data->GetPointData()->GetScalars()->SetVoidArray(inputPtr, size, 1); > data->GetPointData()->GetScalars()->SetName(this->ScalarArrayName); > > - David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhangjiang.dudu at gmail.com Sun Jul 3 23:57:23 2016 From: zhangjiang.dudu at gmail.com (=?utf-8?B?5byg5rGf?=) Date: Sun, 3 Jul 2016 22:57:23 -0500 Subject: [vtkusers] unstructured data partition Message-ID: Hi, I would like to partition the unstructured data using vtkUnstructuredGridReader for further parallel application. The thought is to partition and assign one part of the data (mesh) to each process. The code is at below. However, the generated result of each process is somehow not very correct. For example, for one data partition of a process, the number of points is 3, and the number of cells is 5. But these 5 cells are the same (actually one cell contains 3 points). So how to avoid this? Can this code reach to my goal of data partitioning? vtkMPIController *contr = vtkMPIController::New(); contr->Initialize(&argc, &argv); vtkMultiProcessController::SetGlobalController(contr); int numProcs = contr->GetNumberOfProcesses(); int me = contr->GetLocalProcessId(); vtkUnstructuredGridReader *reader = vtkUnstructuredGridReader::New(); vtkUnstructuredGrid *ds = vtkUnstructuredGrid::New(); reader->SetFileName(?data.vtk"); reader->Update(); ds = reader->GetOutput(); vtkDistributedDataFilter *dd = vtkDistributedDataFilter::New(); dd->SetInputData(ds); dd->SetController(contr); dd->UseMinimalMemoryOff(); dd->SetBoundaryModeToAssignToOneRegion(); dd->Update(); -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Mon Jul 4 07:28:03 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 4 Jul 2016 07:28:03 -0400 Subject: [vtkusers] vtkMultiBlockDataSet and vtkDataSetSurfaceFilter In-Reply-To: <65D987BE62E58141AA480A59A8B5BBEA71F06A7B@srv-mail.diana.local> References: <65D987BE62E58141AA480A59A8B5BBEA71F06A7B@srv-mail.diana.local> Message-ID: Hi Andreas, There is a long answer but it's early in the morning so I'll go with a short one :-) Yes, normally you would check for UPDATE_NUMBER_OF_GHOST_LEVELS etc. However, this is not required. You can always produce ghost cells even if you are not asked for it. Best, -berk On Fri, Jul 1, 2016 at 3:53 AM, Andreas Buykx wrote: > Hi, > > > > My finite element mesh is stored in a vtkMultiBlockDataSet. I use a > vtkCompositeDataPipeline to process my algorithms. > > > > Visualizing the outer surface of the mesh using vtkDataSetSurfaceFilter > generates the outer surface of each block, instead of the outer surface of > the entire mesh. > > In the source algorithm I can define ghost cells, but to know how many > levels of ghost cells I have to generate I should be reading the > UPDATE_NUMBER_OF_GHOST_LEVELS, if I understand correctly. Looking at > vtkDataSetSurfaceFilter it seems that it requests ghost cells only if > UPDATE_NUMBER_OF_PIECES > 1. Similar code is in vtkFeatureEdges and several > other algorithms that I use. > > > > So it seems that I have to fool my pipeline into thinking that it > processes multiple pieces, by setting UPDATE_NUMBER_OF_PIECES to >1. Is > that possible at all? Should I also set other update information, like > UPDATE_PIECE_NUMBER? Where in the pipeline should I set this information? > Is there an alternative way of doing this? > > > > Thanks for your advice. Kind regards, > > Andreas Buykx > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hirsch at st.ovgu.de Mon Jul 4 12:33:06 2016 From: jan.hirsch at st.ovgu.de (jhirsch) Date: Mon, 4 Jul 2016 09:33:06 -0700 (MST) Subject: [vtkusers] How to align ScalarBar With axis of xyPlotActor? Message-ID: <1467649986157-5739079.post@n5.nabble.com> Hello guys, I have the idea to position a scalar bar justified to the y-axis of a xyPlotActor with the length of the x-axis. This way I save space and labels, because the min and max values of the plot and scalar bar are the same. The first image shows what I have so far. The second image shows what I want to achieve. Any ideas? Maybe there already is a class or object that does that? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-align-ScalarBar-With-axis-of-xyPlotActor-tp5739079.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.stansvik at orexplore.com Mon Jul 4 15:13:49 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 4 Jul 2016 21:13:49 +0200 Subject: [vtkusers] Strange behavior with vtkCubeAxesActor Message-ID: While doing some experimenting, I encountered a strange behavior with vtkCubeAxesActor. The setup I had was this: SampleWidget::SampleWidget(QWidget *parent, Qt::WindowFlags flags) : VTKWidget(parent, flags) { auto renderer = vtkSmartPointer::New(); renderer->SetBackground(1.0, 1.0, 1.0); auto reader = vtkSmartPointer::New(); reader->setFileName("/home/estan/testvolume.hdf5"); reader->setDataSetName("reconstruction"); auto volumeMapper = vtkSmartPointer::New(); volumeMapper->SetInputConnection(reader->GetOutputPort()); auto volumeProperty = vtkSmartPointer::New(); volumeProperty->SetInterpolationTypeToLinear(); volumeProperty->ShadeOff(); auto opacity = vtkSmartPointer::New(); opacity->AddPoint(0.0,1.0); opacity->AddPoint(1.0,1.0); volumeProperty->SetScalarOpacity(opacity); auto color = vtkSmartPointer::New(); color->AddRGBPoint(0.0,1.0,1.0,1.0); color->AddRGBPoint(1.0,0.0,0.0,0.0); volumeProperty->SetColor(color); auto volume = vtkSmartPointer::New(); volume->SetMapper(volumeMapper); volume->SetProperty(volumeProperty); renderer->AddVolume(volume); auto camera = renderer->GetActiveCamera(); camera->SetParallelProjection(true); auto cubeAxesActor = vtkSmartPointer::New(); cubeAxesActor->SetFlyModeToOuterEdges(); cubeAxesActor->SetBounds(volume->GetBounds()); cubeAxesActor->SetCamera(renderer->GetActiveCamera()); cubeAxesActor->GetTitleTextProperty(0)->SetColor(1.0, 0.0, 0.0); cubeAxesActor->GetLabelTextProperty(0)->SetColor(1.0, 0.0, 0.0); cubeAxesActor->GetTitleTextProperty(1)->SetColor(0.0, 1.0, 0.0); cubeAxesActor->GetLabelTextProperty(1)->SetColor(0.0, 1.0, 0.0); cubeAxesActor->GetTitleTextProperty(2)->SetColor(0.0, 0.0, 1.0); cubeAxesActor->GetLabelTextProperty(2)->SetColor(0.0, 0.0, 1.0); renderer->AddActor(cubeAxesActor); renderer->ResetCamera(); GetRenderWindow()->AddRenderer(renderer); } And I got the attached result. Notice how the axis labels don't quite line up with the bounding box edge of my volume, and how numbers further away are much larger (!) than numbers closer to the camera. If I don't turn on parallell projection on the camera, the effect is less noticable, but still there: The numbers are all the same size, but the labels still don't line up with the bounding box edges properly. Anyone have an idea what's the problem could be? Thanks in advance, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cubeaxesactor.png Type: image/png Size: 30870 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Mon Jul 4 15:31:16 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 4 Jul 2016 21:31:16 +0200 Subject: [vtkusers] Strange behavior with vtkCubeAxesActor In-Reply-To: References: Message-ID: Actually, with perspective projection it seems quite okay. See attached screenshot. So is this a limitation with vtkCubeAxesActor? It doesn't like parallel projection? Elvis 2016-07-04 21:13 GMT+02:00 Elvis Stansvik : > While doing some experimenting, I encountered a strange behavior with > vtkCubeAxesActor. > > The setup I had was this: > > > SampleWidget::SampleWidget(QWidget *parent, Qt::WindowFlags flags) > : VTKWidget(parent, flags) > { > auto renderer = vtkSmartPointer::New(); > renderer->SetBackground(1.0, 1.0, 1.0); > > auto reader = vtkSmartPointer::New(); > reader->setFileName("/home/estan/testvolume.hdf5"); > reader->setDataSetName("reconstruction"); > > auto volumeMapper = vtkSmartPointer::New(); > volumeMapper->SetInputConnection(reader->GetOutputPort()); > > auto volumeProperty = vtkSmartPointer::New(); > volumeProperty->SetInterpolationTypeToLinear(); > volumeProperty->ShadeOff(); > > auto opacity = vtkSmartPointer::New(); > opacity->AddPoint(0.0,1.0); > opacity->AddPoint(1.0,1.0); > volumeProperty->SetScalarOpacity(opacity); > > auto color = vtkSmartPointer::New(); > color->AddRGBPoint(0.0,1.0,1.0,1.0); > color->AddRGBPoint(1.0,0.0,0.0,0.0); > volumeProperty->SetColor(color); > > auto volume = vtkSmartPointer::New(); > volume->SetMapper(volumeMapper); > volume->SetProperty(volumeProperty); > renderer->AddVolume(volume); > > auto camera = renderer->GetActiveCamera(); > camera->SetParallelProjection(true); > > auto cubeAxesActor = vtkSmartPointer::New(); > cubeAxesActor->SetFlyModeToOuterEdges(); > cubeAxesActor->SetBounds(volume->GetBounds()); > cubeAxesActor->SetCamera(renderer->GetActiveCamera()); > cubeAxesActor->GetTitleTextProperty(0)->SetColor(1.0, 0.0, 0.0); > cubeAxesActor->GetLabelTextProperty(0)->SetColor(1.0, 0.0, 0.0); > cubeAxesActor->GetTitleTextProperty(1)->SetColor(0.0, 1.0, 0.0); > cubeAxesActor->GetLabelTextProperty(1)->SetColor(0.0, 1.0, 0.0); > cubeAxesActor->GetTitleTextProperty(2)->SetColor(0.0, 0.0, 1.0); > cubeAxesActor->GetLabelTextProperty(2)->SetColor(0.0, 0.0, 1.0); > > renderer->AddActor(cubeAxesActor); > > renderer->ResetCamera(); > > GetRenderWindow()->AddRenderer(renderer); > } > > And I got the attached result. Notice how the axis labels don't quite line > up with the bounding box edge of my volume, and how numbers further away > are much larger (!) than numbers closer to the camera. > > If I don't turn on parallell projection on the camera, the effect is less > noticable, but still there: The numbers are all the same size, but the > labels still don't line up with the bounding box edges properly. > > Anyone have an idea what's the problem could be? > > Thanks in advance, > Elvis > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cubeaxesactor_perspective.png Type: image/png Size: 30449 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Tue Jul 5 03:32:40 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 5 Jul 2016 09:32:40 +0200 Subject: [vtkusers] Best practice to subclass vtkImageReader2, or vtkImageAlgorithm okay? Message-ID: Hi all, I've implemented a basic image reader to read a volume from a data set in a HDF5 file. I subclassed vtkImageAlgorithm and reimplemented RequestInformation and RequestData. I realize now that to be a good "VTK citizen", I should probably have subclassed vtkImageReader2 instead. But looking at the vtkImageReader2.h header, much of the additional API / protected member variables it imposes don't make sense for my use case. E.g: virtual void SetFileNames(vtkStringArray *); vtkGetObjectMacro(FileNames, vtkStringArray); My reader will not support multiple files. virtual void SetFilePrefix(const char *); vtkGetStringMacro(FilePrefix); virtual void SetFilePattern(const char *); vtkGetStringMacro(FilePattern); I have no pressing need for this. virtual void SetMemoryBuffer(void *); virtual void *GetMemoryBuffer() { return this->MemoryBuffer; } virtual void SetMemoryBufferLength(vtkIdType buflen); vtkIdType GetMemoryBufferLength() { return this->MemoryBufferLength; } I'll support loading from files on disk only. virtual void SetDataScalarType(int type); ... vtkGetMacro(DataScalarType, int); In my reader, the scalar datatype is always deduced from looking at the file. It doesn't make sense to let the user set it. (I guess this API is meant more for "raw" format readers?). I could implement the getter. vtkSetMacro(NumberOfScalarComponents,int); vtkGetMacro(NumberOfScalarComponents,int); This I could obviously implement. vtkSetVector6Macro(DataExtent,int); vtkGetVector6Macro(DataExtent,int); Again, the setter doesn't make sense for my format, but I could of course implement the getter. The same is true for other setters/getters like spacing, origin, byte order et.c. But before I go on, let me get to my questions: * What will I "lose" by basing my reader on vtkImageAlgorithm instead of vtkImageReader2. Will my reader be unusable with some parts of VTK? Which? * Is it frowned upon to make an image reader that derives directly from vtkImageAlgorithm instead of vtkImageReader2 or vtkImageReader? Thanks, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Jul 5 03:34:59 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 5 Jul 2016 09:34:59 +0200 Subject: [vtkusers] Best practice to subclass vtkImageReader2, or vtkImageAlgorithm okay? In-Reply-To: References: Message-ID: 2016-07-05 9:32 GMT+02:00 Elvis Stansvik : > Hi all, > > I've implemented a basic image reader to read a volume from a data set in > a HDF5 file. I subclassed vtkImageAlgorithm and reimplemented > RequestInformation and RequestData. > > I realize now that to be a good "VTK citizen", I should probably have > subclassed vtkImageReader2 instead. > > But looking at the vtkImageReader2.h header, much of the additional API / > protected member variables it imposes don't make sense for my use case. E.g: > > virtual void SetFileNames(vtkStringArray *); > vtkGetObjectMacro(FileNames, vtkStringArray); > > My reader will not support multiple files. > > virtual void SetFilePrefix(const char *); > vtkGetStringMacro(FilePrefix); > > virtual void SetFilePattern(const char *); > vtkGetStringMacro(FilePattern); > > I have no pressing need for this. > > virtual void SetMemoryBuffer(void *); > virtual void *GetMemoryBuffer() { return this->MemoryBuffer; } > > virtual void SetMemoryBufferLength(vtkIdType buflen); > vtkIdType GetMemoryBufferLength() { return this->MemoryBufferLength; } > > I'll support loading from files on disk only. > > virtual void SetDataScalarType(int type); > ... > vtkGetMacro(DataScalarType, int); > > In my reader, the scalar datatype is always deduced from looking at the > file. It doesn't make sense to let the user set it. (I guess this API is > meant more for "raw" format readers?). I could implement the getter. > > vtkSetMacro(NumberOfScalarComponents,int); > vtkGetMacro(NumberOfScalarComponents,int); > > This I could obviously implement. > Sorry, here I meant just the getter. This is again a case where the setter doesn't make sense for me, since the number of scalar components is always 1 in my format (or possibly some other number in the future, but always derived from what's in the file automatically, not to be set by the user). Elvis > > vtkSetVector6Macro(DataExtent,int); > vtkGetVector6Macro(DataExtent,int); > > Again, the setter doesn't make sense for my format, but I could of course > implement the getter. > > The same is true for other setters/getters like spacing, origin, byte > order et.c. > > But before I go on, let me get to my questions: > > * What will I "lose" by basing my reader on vtkImageAlgorithm instead of > vtkImageReader2. Will my reader be unusable with some parts of VTK? Which? > > * Is it frowned upon to make an image reader that derives directly from > vtkImageAlgorithm instead of vtkImageReader2 or vtkImageReader? > > Thanks, > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Jul 5 03:48:21 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 5 Jul 2016 09:48:21 +0200 Subject: [vtkusers] Implementing vtkImageAlgorithm::RequestData vs ExecuteDataWithInformation Message-ID: The ExecuteDataWithInformation function is described as a convenience function that image readers can implement instead of RequestData. The former is called by the latter as follows: //---------------------------------------------------------------------------- // This is the superclasses style of Execute method. Convert it into // an imaging style Execute method. int vtkImageAlgorithm::RequestData( vtkInformation* request, vtkInformationVector** vtkNotUsed( inputVector ), vtkInformationVector* outputVector) { // the default implimentation is to do what the old pipeline did find what // output is requesting the data, and pass that into ExecuteData // which output port did the request come from int outputPort = request->Get(vtkDemandDrivenPipeline::FROM_OUTPUT_PORT()); // if output port is negative then that means this filter is calling the // update directly, in that case just assume port 0 if (outputPort == -1) { outputPort = 0; } // get the data object vtkInformation *outInfo = outputVector->GetInformationObject(outputPort); // call ExecuteData this->SetErrorCode( vtkErrorCode::NoError ); if (outInfo) { this->ExecuteDataWithInformation( outInfo->Get(vtkDataObject::DATA_OBJECT()), outInfo ); } else { this->ExecuteData(NULL); } // Check for any error set by downstream filter (IO in most case) if ( this->GetErrorCode() ) { return 0; } return 1; } So all it does is get the output port from which the request came from, request the output information and output data object and pass it along to ExecuteDataWithInformation. In my case I only have one output port (port 0), so that's what I used when I implemented RequestData. I'm wondering if I should switch to implementing ExecuteDataWithInformation. The last thing it does is check for errors set by downstream filters with GetErrorCode(). Is this something I should be doing? I can't see that any of the other image readers that have chosen to implement RequestData are doing this (vtkDEMReader, vtkVolume16Reader, ...). Thanks for any advice, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From flaviu2 at yahoo.com Tue Jul 5 03:53:22 2016 From: flaviu2 at yahoo.com (Flaviu2) Date: Tue, 5 Jul 2016 07:53:22 +0000 (UTC) Subject: [vtkusers] vtkDICOMImageReader GetSpacing get z spaging 0 References: <735754172.1845317.1467705202773.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <735754172.1845317.1467705202773.JavaMail.yahoo@mail.yahoo.com> Hi all of you. I have an vtkDICOMImageReader object, named m_pDICOMReader, used into app that made multiplanar reconstruction. In order to do that, I get origin, spacing and extend, just like this: m_pDICOMReader->GetOutput()->GetExtent(nExtent);m_pDICOMReader->GetOutput()->GetSpacing(dSpacing);m_pDICOMReader->GetOutput()->GetOrigin(dOrigin); but I noticed that on some CT with 1.255 mm, with many slices (778 slices), the z spacing (dSpacing[2]) is 0... why ? Could you help me ? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Jul 5 04:04:25 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 5 Jul 2016 10:04:25 +0200 Subject: [vtkusers] Implementing vtkImageAlgorithm::RequestData vs ExecuteDataWithInformation In-Reply-To: References: Message-ID: 2016-07-05 9:48 GMT+02:00 Elvis Stansvik : > The ExecuteDataWithInformation function is described as a convenience > function that image readers can implement instead of RequestData. The > former is called by the latter as follows: > > > //---------------------------------------------------------------------------- > // This is the superclasses style of Execute method. Convert it into > // an imaging style Execute method. > int vtkImageAlgorithm::RequestData( > vtkInformation* request, > vtkInformationVector** vtkNotUsed( inputVector ), > vtkInformationVector* outputVector) > { > // the default implimentation is to do what the old pipeline did find > what > // output is requesting the data, and pass that into ExecuteData > > // which output port did the request come from > int outputPort = > request->Get(vtkDemandDrivenPipeline::FROM_OUTPUT_PORT()); > > // if output port is negative then that means this filter is calling the > // update directly, in that case just assume port 0 > if (outputPort == -1) > { > outputPort = 0; > } > > // get the data object > vtkInformation *outInfo = > outputVector->GetInformationObject(outputPort); > // call ExecuteData > this->SetErrorCode( vtkErrorCode::NoError ); > if (outInfo) > { > this->ExecuteDataWithInformation( > outInfo->Get(vtkDataObject::DATA_OBJECT()), > outInfo ); > } > else > { > this->ExecuteData(NULL); > } > // Check for any error set by downstream filter (IO in most case) > if ( this->GetErrorCode() ) > { > return 0; > } > > return 1; > } > > So all it does is get the output port from which the request came from, > request the output information and output data object and pass it along to > ExecuteDataWithInformation. In my case I only have one output port (port > 0), so that's what I used when I implemented RequestData. > > I'm wondering if I should switch to implementing > ExecuteDataWithInformation. The last thing it does is check for errors set > by downstream filters with GetErrorCode(). Is this something I should be > doing? I can't > Sorry I meant "the last thing vtkImageAlgorithm::RequestData does", not "the last thing it does". Elvis > see that any of the other image readers that have chosen to implement > RequestData are doing this (vtkDEMReader, vtkVolume16Reader, ...). > > Thanks for any advice, > Elvis > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivameline at gmail.com Tue Jul 5 05:11:42 2016 From: olivameline at gmail.com (Olivier Ameline) Date: Tue, 5 Jul 2016 02:11:42 -0700 (MST) Subject: [vtkusers] Problem executing VTK in release mode with Visual Studio 2013 Message-ID: <1467709902493-5739093.post@n5.nabble.com> Hello everyone, I'm trying to execute the VTK-Qt example "SimpleView" (available here ) in Windows 10 with Visual Studio 2013, but it does not work in release mode. I have compiled VTK 6.2.0 with Qt 5.4.2 using Visual Studio 2013 (in a folder C:/VTK-build-MSVC2013-x64). Then, I have added the following line in the CMakeLists (just after project(SimpleView)) : set(VTK_DIR "C:/VTK-build-MSVC2013-x64") I have compiled in debug and release mode successfully, and the executables are created. I have also added the VTK debug/release .dll in the folders where the executables are. The execution works well in debug mode, but not in release mode : the program starts and exit immediately. I receive no error message. More generally, I never could execute any program VTK compiled with Visual Studio in release mode. What am I doing wrong ? Thanks for help. Olivier -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-executing-VTK-in-release-mode-with-Visual-Studio-2013-tp5739093.html Sent from the VTK - Users mailing list archive at Nabble.com. From ich_daniel at habmalnefrage.de Tue Jul 5 06:41:02 2016 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Tue, 5 Jul 2016 03:41:02 -0700 (MST) Subject: [vtkusers] Are there a option to find cells to an edge? Message-ID: <1467715262209-5739094.post@n5.nabble.com> Hello everybody, my main concern is to create a watertight object that represents the difference between two objects. Here a fundamental question in advance. Is there a possibility to found cells from a point to a "boundary or contour"? Now I want to describe my problem in more detail. I have two Polydata objects (red and blue) whose spatial difference is to be visualized. (See picture) For this I have already tried several ways. Currently a group of (marked) cells from the first polydata (red) is extruded in a predetermined direction. This extruded object intersects my second polydata object (blue). All contained therein points are belong to the second polydata (ie the object of comparison) But unfortunately I need the cells, not the points ... Now I look for from any highlighted cell (red polydatas, see the picture) in a predetermined direction (via FindCellsAlongLine(..)) the corresponding neighboring cell. This works quite well so far (see figure "green"). However at 32-bit systems there is a memory overflow when using more than 2,000 labeled cells. The search of each (red) cell to the adjacent (blue) cell slows down the system. That should be optimized.. Now my idea of ??a cell that is approximately in the middle of the second (blue) polydata to find all the neighboring cells to the "edge" or contour (which was previously set). Maybe some kind of advanced feature of FindPointsWithinRadius(..). How can I achieve this? I am thankful for every hint! -- View this message in context: http://vtk.1045678.n5.nabble.com/Are-there-a-option-to-find-cells-to-an-edge-tp5739094.html Sent from the VTK - Users mailing list archive at Nabble.com. From lasso at queensu.ca Tue Jul 5 09:55:51 2016 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 5 Jul 2016 13:55:51 +0000 Subject: [vtkusers] Problem executing VTK in release mode with Visual Studio 2013 In-Reply-To: <1467709902493-5739093.post@n5.nabble.com> References: <1467709902493-5739093.post@n5.nabble.com> Message-ID: In debug mode all variables are initialized to NULL but in release mode uninitialized variables have random contents. This is the most common cause why a software that runs fine in debug mode crashes in release mode. Make sure you initialize all variables, especially simple pointers to objects and char arrays. Andras From: Olivier Ameline Sent: Tuesday, July 5, 2016 11:12 AM To: vtkusers at vtk.org Subject: [vtkusers] Problem executing VTK in release mode with Visual Studio 2013 Hello everyone, I'm trying to execute the VTK-Qt example "SimpleView" (available here ) in Windows 10 with Visual Studio 2013, but it does not work in release mode. I have compiled VTK 6.2.0 with Qt 5.4.2 using Visual Studio 2013 (in a folder C:/VTK-build-MSVC2013-x64). Then, I have added the following line in the CMakeLists (just after project(SimpleView)) : set(VTK_DIR "C:/VTK-build-MSVC2013-x64") I have compiled in debug and release mode successfully, and the executables are created. I have also added the VTK debug/release .dll in the folders where the executables are. The execution works well in debug mode, but not in release mode : the program starts and exit immediately. I receive no error message. More generally, I never could execute any program VTK compiled with Visual Studio in release mode. What am I doing wrong ? Thanks for help. Olivier -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-executing-VTK-in-release-mode-with-Visual-Studio-2013-tp5739093.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Jul 5 10:45:22 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 5 Jul 2016 16:45:22 +0200 Subject: [vtkusers] Timing steps of a pipeline? Message-ID: Hi, Sorry if this has come up before, I actually have a vague memory of seeing the question asked somewhere, but my google skills are failing me and I can't find it at the moment: Is there any central place in VTK where I can turn on timing measurements of each step of a pipeline? Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivameline at gmail.com Tue Jul 5 10:53:53 2016 From: olivameline at gmail.com (Olivier Ameline) Date: Tue, 5 Jul 2016 07:53:53 -0700 (MST) Subject: [vtkusers] Problem executing VTK in release mode with Visual Studio 2013 In-Reply-To: References: <1467709902493-5739093.post@n5.nabble.com> Message-ID: <1467730433578-5739107.post@n5.nabble.com> Thank you Andras for your answer. I am aware of this problem with uninitialized variables, but the code that I try to execute in release mode is a VTK example (available here ). The code is very simple (only 2 small .cpp) and I don't see any uninitialized variable. Except if, for instance, this->TableView = vtkSmartPointer::New(); does not count as an initialization ? Olivier -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-executing-VTK-in-release-mode-with-Visual-Studio-2013-tp5739093p5739107.html Sent from the VTK - Users mailing list archive at Nabble.com. From zhangjiang.dudu at gmail.com Tue Jul 5 11:33:24 2016 From: zhangjiang.dudu at gmail.com (=?utf-8?B?5byg5rGf?=) Date: Tue, 5 Jul 2016 10:33:24 -0500 Subject: [vtkusers] A problem of data partitioning Message-ID: Hi, In the below code, I was trying to read and partition an unstructured grid data (11.7 GB). However, it always came out an error that: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc =================================================================================== = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = PID 14658 RUNNING AT compute001 = EXIT CODE: 134 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES =================================================================================== Actually the memory of my computer is about 1.5 TB (96*16 GB modules). I think the memory is enough. Can anyone help me about this problem? Any operation in the program is wrong? int main(int argc, char** argv) { vtkMPIController *contr = vtkMPIController::New(); contr->Initialize(&argc, &argv); vtkMultiProcessController::SetGlobalController(contr); int numProcs = contr->GetNumberOfProcesses(); int me = contr->GetLocalProcessId(); vtkUnstructuredGridReader *reader = vtkUnstructuredGridReader::New(); vtkUnstructuredGrid *ds = NULL; if (me == 0) { reader->SetFileName(?data.vtk"); ds = reader->GetOutput(); reader->Update(); } else { ds = vtkUnstructuredGrid::New(); } vtkDistributedDataFilter *dd = vtkDistributedDataFilter::New(); dd->SetInputData(ds); dd->SetController(contr); dd->UseMinimalMemoryOff(); dd->SetBoundaryModeToAssignToOneRegion(); dd->Update(); int ncells = vtkUnstructuredGrid::SafeDownCast(dd->GetOutput())->GetNumberOfCells(); fprintf(stderr, "rank = %d, number of cells = %d\n", me, ncells); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From enzo.matsumiya at gmail.com Tue Jul 5 13:04:31 2016 From: enzo.matsumiya at gmail.com (Enzo Matsumiya) Date: Tue, 5 Jul 2016 14:04:31 -0300 Subject: [vtkusers] Update() methods on multithreaded applications Message-ID: <27CB2361-E24C-4AF3-9FF7-9DFCAA9D7E5E@gmail.com> Hello, My API implements a method to open a DICOM study and some methods for image processing using ITK. When using my test application, I call these methods but they lock the UI, as expected, since I'm using VTK and ITK from an object on the same thread as the application's UI. What is the correct way to deal with that, considering I need constant communication from the UI controls with my VTK objects? Thanks From sunilmathew at triassicsolutions.com Tue Jul 5 13:08:14 2016 From: sunilmathew at triassicsolutions.com (Sunil Mathew) Date: Tue, 5 Jul 2016 12:08:14 -0500 Subject: [vtkusers] Build instructions for vtk7 for parallel processing & GPU use Message-ID: Hi All, I was wondering if there's any build instructions to choose the right configuration settings on CMake GUI for building vtk7 with parallel processing turned on. I have errors about MPI etc. I'd also like help on how to utilize the parallel processing capabilities. Also does vtk7 make use of the GPU for rendering if it's available on a machine. Thanks, Sunil -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Jul 5 13:50:27 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 5 Jul 2016 11:50:27 -0600 Subject: [vtkusers] Update() methods on multithreaded applications In-Reply-To: <27CB2361-E24C-4AF3-9FF7-9DFCAA9D7E5E@gmail.com> References: <27CB2361-E24C-4AF3-9FF7-9DFCAA9D7E5E@gmail.com> Message-ID: Hi Enzo, If you have an ITK pipeline or a VTK pipeline that only doesn't do any display (i.e. that only does IO or processing), then put it into a QThread so that it can update asynchronously. When the thread re-joins your application, you get the pipeline's output and connect it to your display pipeline. On Tue, Jul 5, 2016 at 11:04 AM, Enzo Matsumiya wrote: > Hello, > > My API implements a method to open a DICOM study and some methods for > image processing using ITK. > When using my test application, I call these methods but they lock the UI, > as expected, since I'm using VTK and ITK from an object on the same thread > as the application's UI. > > What is the correct way to deal with that, considering I need constant > communication from the UI controls with my VTK objects? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aniqah.mair at queensu.ca Tue Jul 5 14:47:14 2016 From: aniqah.mair at queensu.ca (Aniqah Mair) Date: Tue, 5 Jul 2016 14:47:14 -0400 Subject: [vtkusers] Deforming 3-dimensional meshes Message-ID: <577C00B2.6080400@queensu.ca> Hi everyone, What facilities does VTK have for manipulating 3-dimensional meshes? I currently have 3-dimensional models represented by vtkPolyData objects. What I want to do is ignore the points made to construct this model, and treat it as one large mesh that can be "poked" inwards and "tugged" outwards at points along the surface to modify the shape of the model as if it were made of clay. The user who will be deforming the mesh will be limited to one finger to perform these actions, and the manipulation of the surface will be done on 2-dimensional slices of the model. If you know of any built-in functionality that would help me accomplish this (or a different way to approach this problem), your help would be greatly appreciated. Thank you, Aniqah From lasso at queensu.ca Tue Jul 5 15:17:33 2016 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 5 Jul 2016 19:17:33 +0000 Subject: [vtkusers] Problem executing VTK in release mode with Visual Studio 2013 In-Reply-To: <1467730433578-5739107.post@n5.nabble.com> References: <1467709902493-5739093.post@n5.nabble.com> , <1467730433578-5739107.post@n5.nabble.com> Message-ID: I haven't found ant obvious problem in the code. Check that you don?t have any directories in the path that contains debug-mode DLLs. You can also build your code as RelWithDebInfo and run it in a debugger to see where the problem occurs. Andras From: Olivier Ameline Sent: Tuesday, July 5, 2016 4:54 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] Problem executing VTK in release mode with Visual Studio 2013 Thank you Andras for your answer. I am aware of this problem with uninitialized variables, but the code that I try to execute in release mode is a VTK example (available here ). The code is very simple (only 2 small .cpp) and I don't see any uninitialized variable. Except if, for instance, this->TableView = vtkSmartPointer::New(); does not count as an initialization ? Olivier -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-executing-VTK-in-release-mode-with-Visual-Studio-2013-tp5739093p5739107.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Jul 5 17:11:23 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 5 Jul 2016 23:11:23 +0200 Subject: [vtkusers] Returning filter output from thread using shallow copying vs smart pointer Message-ID: Just as I was going to ask a threading question on this list, someone else did :) Oh well here's another one: I'm rendering a compressed volume, and I've noticed that a big chunk of the time-to-first-render for me is the initial reading of the volume. To keep the UI responsive while the reading takes place, I decided to give QtConcurrent::run + QFuture + QFutureWatcher a try as a mechanism to put the reading in a different thread. Here's a shortened version of what I did: auto future = QtConcurrent::run([&]() -> vtkImageData * { auto reader = vtkSmartPointer::New(); reader->setFileName("big_compressed_volume.hdf5"); reader->Update(); auto output = reader->GetOutput(); auto result = output->NewInstance(); result->ShallowCopy(output); return result; }); auto futureWatcher = new QFutureWatcher(this); connect(futureWatcher, &QFutureWatcher::finished, [=]() { auto imageData = futureWatcher->result(); // ... Create the rendering part of the pipeline GetRenderWindow()->Render(); }); futureWatcher->setFuture(future); This works great. Using QtConcurrent::run, I spin up a thread in which the reading takes place. When the resulting vtkImageData is ready, I return a shallow copy of it, which in turn causes the QFutureWatcher I set up to emit the finished signal, upon which I construct the remaining (rendering) part of the pipeline (which doesn't take much time compared to the reading, about ~1/6 of the time). Now to my questions: 1. Is this safe? Since the reader is destroyed by the time the rest of the pipeline takes over (courtesy of using Qt signal delivery as a synchronization point), there's no risk of concurrent access to VTK objects here, right? 2. Can I always use this approach for segments of my pipeline up until the rendering parts (up to the mapper?), or are there non-rendering parts of VTK which simply cannot run in a separate thread? 3. Regarding the shallow copying, I first tried to return just return vtkSmartPointer(reader->GetOutput()); from the reader function. My thinking with this was that * I create a smart pointer, which should raise the ref count of the object to 2, since the reader itself is still alive at that point and also holds a reference, * a copy is then made of the smart pointer (for the return value of the function), raising the refcount to 3, * when the function finally returns, the vtkSmartPointer I created, as well as the vtkSmartPointer holding the reader goes out of scope and destructs, which means the ref count goes down to 1. But that's not what happens, I had a look at the ref count of the image data I finally got in my slot (from futureWatcher->result()), and it was 2, not 1 like I expected. I'm obviously misunderstanding something here, anyone care to enlighten me? Does the ref counting mechanism not work across thread boundaries? Many thanks in advance, Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Jul 5 17:45:07 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 5 Jul 2016 23:45:07 +0200 Subject: [vtkusers] Returning filter output from thread using shallow copying vs smart pointer In-Reply-To: References: Message-ID: 2016-07-05 23:30 GMT+02:00 Shawn Waldon : > Hi Elvis, > > I've done something fairly similar in one of my applications, returning a > vtkSmartPointer via a Qt signal/slot from a background > thread. And as far as I know the reference counting should work fine since > the reference count is an atomic integer. It has worked fine for me so far > and VTK_DEBUG_LEAKS doesn't complain so the reference counts are working > somehow. > > My guess about your reference count question: You are returning the smart > pointer by value. The QFuture must be storing the smart pointer so that it > can return it from the result() function. And when you return it that way > it creates a second smart pointer, which would increment the reference > count to 2. > Ah, of course. Thanks! So then it's not a problem, my QFuture will be destroyed shortly thereafter as well. And thanks for also bringing up VTK_DEBUG_LEAKS, I didn't know about. But, so I can assume that both approaches (raw pointer, return a shallow copy) and returning a vtkSmartPointer are safe ways of doing this in this case? Nothing in the VTK ref counting machinery that could go wrong? Do you know if there are any things/gotchas or parts of VTK to watch out for when putting parts of a pipeline in a separate thread like this? Elvis > > HTH, > Shawn > > On Tue, Jul 5, 2016 at 5:11 PM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> Just as I was going to ask a threading question on this list, someone >> else did :) Oh well here's another one: >> >> I'm rendering a compressed volume, and I've noticed that a big chunk of >> the time-to-first-render for me is the initial reading of the volume. To >> keep the UI responsive while the reading takes place, I decided to give >> QtConcurrent::run + QFuture + QFutureWatcher a try as a mechanism to put >> the reading in a different thread. >> >> Here's a shortened version of what I did: >> >> auto future = QtConcurrent::run([&]() -> vtkImageData * { >> auto reader = vtkSmartPointer::New(); >> reader->setFileName("big_compressed_volume.hdf5"); >> reader->Update(); >> >> auto output = reader->GetOutput(); >> auto result = output->NewInstance(); >> result->ShallowCopy(output); >> >> return result; >> }); >> >> auto futureWatcher = new QFutureWatcher(this); >> >> connect(futureWatcher, &QFutureWatcher::finished, >> [=]() { >> auto imageData = futureWatcher->result(); >> >> // ... Create the rendering part of the pipeline >> >> GetRenderWindow()->Render(); >> }); >> >> futureWatcher->setFuture(future); >> >> This works great. Using QtConcurrent::run, I spin up a thread in which >> the reading takes place. When the resulting vtkImageData is ready, I return >> a shallow copy of it, which in turn causes the QFutureWatcher I set up to >> emit the finished signal, upon which I construct the remaining (rendering) >> part of the pipeline (which doesn't take much time compared to the reading, >> about ~1/6 of the time). >> >> Now to my questions: >> >> 1. Is this safe? Since the reader is destroyed by the time the rest of >> the pipeline takes over (courtesy of using Qt signal delivery as a >> synchronization point), there's no risk of concurrent access to VTK objects >> here, right? >> >> 2. Can I always use this approach for segments of my pipeline up until >> the rendering parts (up to the mapper?), or are there non-rendering parts >> of VTK which simply cannot run in a separate thread? >> >> 3. Regarding the shallow copying, I first tried to return just >> >> return vtkSmartPointer(reader->GetOutput()); >> >> from the reader function. My thinking with this was that >> >> * I create a smart pointer, which should raise the ref count of the >> object to 2, since the reader itself is still alive at that point and also >> holds a reference, >> * a copy is then made of the smart pointer (for the return value of >> the function), raising the refcount to 3, >> * when the function finally returns, the vtkSmartPointer I created, as >> well as the vtkSmartPointer holding the reader goes out of scope and >> destructs, which means the ref count goes down to 1. >> >> But that's not what happens, I had a look at the ref count of the image >> data I finally got in my slot (from futureWatcher->result()), and it was 2, >> not 1 like I expected. >> >> I'm obviously misunderstanding something here, anyone care to enlighten >> me? Does the ref counting mechanism not work across thread boundaries? >> >> Many thanks in advance, >> >> Elvis >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Tue Jul 5 17:57:50 2016 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Tue, 5 Jul 2016 17:57:50 -0400 Subject: [vtkusers] Returning filter output from thread using shallow copying vs smart pointer In-Reply-To: References: Message-ID: On Tue, Jul 5, 2016 at 5:45 PM, Elvis Stansvik wrote: > 2016-07-05 23:30 GMT+02:00 Shawn Waldon : > >> Hi Elvis, >> >> I've done something fairly similar in one of my applications, returning a >> vtkSmartPointer via a Qt signal/slot from a background >> thread. And as far as I know the reference counting should work fine since >> the reference count is an atomic integer. It has worked fine for me so far >> and VTK_DEBUG_LEAKS doesn't complain so the reference counts are working >> somehow. >> >> My guess about your reference count question: You are returning the >> smart pointer by value. The QFuture must be storing the smart pointer so >> that it can return it from the result() function. And when you return it >> that way it creates a second smart pointer, which would increment the >> reference count to 2. >> > > Ah, of course. Thanks! So then it's not a problem, my QFuture will be > destroyed shortly thereafter as well. > > And thanks for also bringing up VTK_DEBUG_LEAKS, I didn't know about. > > But, so I can assume that both approaches (raw pointer, return a shallow > copy) and returning a vtkSmartPointer are safe ways of doing this in this > case? Nothing in the VTK ref counting machinery that could go wrong? > The main thing to avoid is the reference count of the vtk object going to 0. So I think the safest way to do this is to pass the vtkSmartPointer around. You could probably pass the raw pointer if you tweaked the reference count manually, but the whole point of smart pointers is to avoid having to do that. I don't really see a reason to do a shallow copy. If the background thread was going to hang onto the object to do further changes to it, you would want a deep copy since most vtk objects are not threadsafe. Keep in mind that if the filter that produced it is re-executed then the data object will get overwritten (most filters reuse output objects when re-executed). But it sounds like you are letting the pipeline that produced it be deleted while just keeping the object itself. > > Do you know if there are any things/gotchas or parts of VTK to watch out > for when putting parts of a pipeline in a separate thread like this? > The only thing I know of is that rendering and associated things (mappers, actors, etc) have to be done in the foreground thread. If others on the list know about more, I would be glad to learn about them too. HTH, Shawn > Elvis > > >> >> HTH, >> Shawn >> >> On Tue, Jul 5, 2016 at 5:11 PM, Elvis Stansvik < >> elvis.stansvik at orexplore.com> wrote: >> >>> Just as I was going to ask a threading question on this list, someone >>> else did :) Oh well here's another one: >>> >>> I'm rendering a compressed volume, and I've noticed that a big chunk of >>> the time-to-first-render for me is the initial reading of the volume. To >>> keep the UI responsive while the reading takes place, I decided to give >>> QtConcurrent::run + QFuture + QFutureWatcher a try as a mechanism to put >>> the reading in a different thread. >>> >>> Here's a shortened version of what I did: >>> >>> auto future = QtConcurrent::run([&]() -> vtkImageData * { >>> auto reader = vtkSmartPointer::New(); >>> reader->setFileName("big_compressed_volume.hdf5"); >>> reader->Update(); >>> >>> auto output = reader->GetOutput(); >>> auto result = output->NewInstance(); >>> result->ShallowCopy(output); >>> >>> return result; >>> }); >>> >>> auto futureWatcher = new QFutureWatcher(this); >>> >>> connect(futureWatcher, &QFutureWatcher::finished, >>> [=]() { >>> auto imageData = futureWatcher->result(); >>> >>> // ... Create the rendering part of the pipeline >>> >>> GetRenderWindow()->Render(); >>> }); >>> >>> futureWatcher->setFuture(future); >>> >>> This works great. Using QtConcurrent::run, I spin up a thread in which >>> the reading takes place. When the resulting vtkImageData is ready, I return >>> a shallow copy of it, which in turn causes the QFutureWatcher I set up to >>> emit the finished signal, upon which I construct the remaining (rendering) >>> part of the pipeline (which doesn't take much time compared to the reading, >>> about ~1/6 of the time). >>> >>> Now to my questions: >>> >>> 1. Is this safe? Since the reader is destroyed by the time the rest of >>> the pipeline takes over (courtesy of using Qt signal delivery as a >>> synchronization point), there's no risk of concurrent access to VTK objects >>> here, right? >>> >>> 2. Can I always use this approach for segments of my pipeline up until >>> the rendering parts (up to the mapper?), or are there non-rendering parts >>> of VTK which simply cannot run in a separate thread? >>> >>> 3. Regarding the shallow copying, I first tried to return just >>> >>> return vtkSmartPointer(reader->GetOutput()); >>> >>> from the reader function. My thinking with this was that >>> >>> * I create a smart pointer, which should raise the ref count of the >>> object to 2, since the reader itself is still alive at that point and also >>> holds a reference, >>> * a copy is then made of the smart pointer (for the return value of >>> the function), raising the refcount to 3, >>> * when the function finally returns, the vtkSmartPointer I created, >>> as well as the vtkSmartPointer holding the reader goes out of scope and >>> destructs, which means the ref count goes down to 1. >>> >>> But that's not what happens, I had a look at the ref count of the image >>> data I finally got in my slot (from futureWatcher->result()), and it was 2, >>> not 1 like I expected. >>> >>> I'm obviously misunderstanding something here, anyone care to enlighten >>> me? Does the ref counting mechanism not work across thread boundaries? >>> >>> Many thanks in advance, >>> >>> Elvis >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhangjiang.dudu at gmail.com Wed Jul 6 00:45:08 2016 From: zhangjiang.dudu at gmail.com (=?utf-8?B?5byg5rGf?=) Date: Tue, 5 Jul 2016 23:45:08 -0500 Subject: [vtkusers] point to process id after data partitioning Message-ID: Hi, I use vtkDistributedDataFilter to partition the unstructured data. And my question is, after the partitioning, given a point, how can I know which process owns it? Thanks. Best regards, From elvis.stansvik at orexplore.com Wed Jul 6 02:50:17 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 6 Jul 2016 08:50:17 +0200 Subject: [vtkusers] Returning filter output from thread using shallow copying vs smart pointer In-Reply-To: References: Message-ID: 2016-07-05 23:57 GMT+02:00 Shawn Waldon : > > > On Tue, Jul 5, 2016 at 5:45 PM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> 2016-07-05 23:30 GMT+02:00 Shawn Waldon : >> >>> Hi Elvis, >>> >>> I've done something fairly similar in one of my applications, returning >>> a vtkSmartPointer via a Qt signal/slot from a background >>> thread. And as far as I know the reference counting should work fine since >>> the reference count is an atomic integer. It has worked fine for me so far >>> and VTK_DEBUG_LEAKS doesn't complain so the reference counts are working >>> somehow. >>> >>> My guess about your reference count question: You are returning the >>> smart pointer by value. The QFuture must be storing the smart pointer so >>> that it can return it from the result() function. And when you return it >>> that way it creates a second smart pointer, which would increment the >>> reference count to 2. >>> >> >> Ah, of course. Thanks! So then it's not a problem, my QFuture will be >> destroyed shortly thereafter as well. >> >> And thanks for also bringing up VTK_DEBUG_LEAKS, I didn't know about. >> >> But, so I can assume that both approaches (raw pointer, return a shallow >> copy) and returning a vtkSmartPointer are safe ways of doing this in this >> case? Nothing in the VTK ref counting machinery that could go wrong? >> > > The main thing to avoid is the reference count of the vtk object going to > 0. So I think the safest way to do this is to pass the vtkSmartPointer > around. You could probably pass the raw pointer if you tweaked the > reference count manually, but the whole point of smart pointers is to avoid > having to do that. I don't really see a reason to do a shallow copy. If > the background thread was going to hang onto the object to do further > changes to it, you would want a deep copy since most vtk objects are not > threadsafe. Keep in mind that if the filter that produced it is > re-executed then the data object will get overwritten (most filters reuse > output objects when re-executed). But it sounds like you are letting the > pipeline that produced it be deleted while just keeping the object itself. > Yes, that seemed like the safest thing to do. To have it as a one-off thread which just produces a result, not one that is reused. The shallow copying is something I found from Berk in this old thread (no pun intended) from 2014: http://public.kitware.com/pipermail/vtkusers/2014-March/083477.html In his example there he passes by raw pointer across threads, and use double shallow copying (shallow copying both in the producer and consumer thread). But maybe that was just something that had to be done in the past, when the refcounting machinery was more susceptible to corruption in a multi-thread scenario? Berk, do you remember the reason for the shallow copying? Because like Shawn above, I don't quite see the reason for it either, now that I think about it. > >> >> Do you know if there are any things/gotchas or parts of VTK to watch out >> for when putting parts of a pipeline in a separate thread like this? >> > > The only thing I know of is that rendering and associated things (mappers, > actors, etc) have to be done in the foreground thread. If others on the > list know about more, I would be glad to learn about them too. > Alright, yes that I've gathered as well. Another thing I've seen warned against is having pipeline connections across threads. That is, a filter must not have its input connection set to the output port of a filter living in another thread. Is that also still generally true? Elvis > > HTH, > Shawn > > >> Elvis >> >> >>> >>> HTH, >>> Shawn >>> >>> On Tue, Jul 5, 2016 at 5:11 PM, Elvis Stansvik < >>> elvis.stansvik at orexplore.com> wrote: >>> >>>> Just as I was going to ask a threading question on this list, someone >>>> else did :) Oh well here's another one: >>>> >>>> I'm rendering a compressed volume, and I've noticed that a big chunk of >>>> the time-to-first-render for me is the initial reading of the volume. To >>>> keep the UI responsive while the reading takes place, I decided to give >>>> QtConcurrent::run + QFuture + QFutureWatcher a try as a mechanism to put >>>> the reading in a different thread. >>>> >>>> Here's a shortened version of what I did: >>>> >>>> auto future = QtConcurrent::run([&]() -> vtkImageData * { >>>> auto reader = vtkSmartPointer::New(); >>>> reader->setFileName("big_compressed_volume.hdf5"); >>>> reader->Update(); >>>> >>>> auto output = reader->GetOutput(); >>>> auto result = output->NewInstance(); >>>> result->ShallowCopy(output); >>>> >>>> return result; >>>> }); >>>> >>>> auto futureWatcher = new QFutureWatcher(this); >>>> >>>> connect(futureWatcher, &QFutureWatcher::finished, >>>> [=]() { >>>> auto imageData = futureWatcher->result(); >>>> >>>> // ... Create the rendering part of the pipeline >>>> >>>> GetRenderWindow()->Render(); >>>> }); >>>> >>>> futureWatcher->setFuture(future); >>>> >>>> This works great. Using QtConcurrent::run, I spin up a thread in which >>>> the reading takes place. When the resulting vtkImageData is ready, I return >>>> a shallow copy of it, which in turn causes the QFutureWatcher I set up to >>>> emit the finished signal, upon which I construct the remaining (rendering) >>>> part of the pipeline (which doesn't take much time compared to the reading, >>>> about ~1/6 of the time). >>>> >>>> Now to my questions: >>>> >>>> 1. Is this safe? Since the reader is destroyed by the time the rest of >>>> the pipeline takes over (courtesy of using Qt signal delivery as a >>>> synchronization point), there's no risk of concurrent access to VTK objects >>>> here, right? >>>> >>>> 2. Can I always use this approach for segments of my pipeline up until >>>> the rendering parts (up to the mapper?), or are there non-rendering parts >>>> of VTK which simply cannot run in a separate thread? >>>> >>>> 3. Regarding the shallow copying, I first tried to return just >>>> >>>> return vtkSmartPointer(reader->GetOutput()); >>>> >>>> from the reader function. My thinking with this was that >>>> >>>> * I create a smart pointer, which should raise the ref count of the >>>> object to 2, since the reader itself is still alive at that point and also >>>> holds a reference, >>>> * a copy is then made of the smart pointer (for the return value of >>>> the function), raising the refcount to 3, >>>> * when the function finally returns, the vtkSmartPointer I created, >>>> as well as the vtkSmartPointer holding the reader goes out of scope and >>>> destructs, which means the ref count goes down to 1. >>>> >>>> But that's not what happens, I had a look at the ref count of the image >>>> data I finally got in my slot (from futureWatcher->result()), and it was 2, >>>> not 1 like I expected. >>>> >>>> I'm obviously misunderstanding something here, anyone care to enlighten >>>> me? Does the ref counting mechanism not work across thread boundaries? >>>> >>>> Many thanks in advance, >>>> >>>> Elvis >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Jul 6 03:05:41 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 6 Jul 2016 09:05:41 +0200 Subject: [vtkusers] Returning filter output from thread using shallow copying vs smart pointer In-Reply-To: References: Message-ID: 2016-07-06 8:50 GMT+02:00 Elvis Stansvik : > 2016-07-05 23:57 GMT+02:00 Shawn Waldon : > >> >> >> On Tue, Jul 5, 2016 at 5:45 PM, Elvis Stansvik < >> elvis.stansvik at orexplore.com> wrote: >> >>> 2016-07-05 23:30 GMT+02:00 Shawn Waldon : >>> >>>> Hi Elvis, >>>> >>>> I've done something fairly similar in one of my applications, returning >>>> a vtkSmartPointer via a Qt signal/slot from a background >>>> thread. And as far as I know the reference counting should work fine since >>>> the reference count is an atomic integer. It has worked fine for me so far >>>> and VTK_DEBUG_LEAKS doesn't complain so the reference counts are working >>>> somehow. >>>> >>>> My guess about your reference count question: You are returning the >>>> smart pointer by value. The QFuture must be storing the smart pointer so >>>> that it can return it from the result() function. And when you return it >>>> that way it creates a second smart pointer, which would increment the >>>> reference count to 2. >>>> >>> >>> Ah, of course. Thanks! So then it's not a problem, my QFuture will be >>> destroyed shortly thereafter as well. >>> >>> And thanks for also bringing up VTK_DEBUG_LEAKS, I didn't know about. >>> >>> But, so I can assume that both approaches (raw pointer, return a shallow >>> copy) and returning a vtkSmartPointer are safe ways of doing this in this >>> case? Nothing in the VTK ref counting machinery that could go wrong? >>> >> >> The main thing to avoid is the reference count of the vtk object going to >> 0. So I think the safest way to do this is to pass the vtkSmartPointer >> around. You could probably pass the raw pointer if you tweaked the >> reference count manually, but the whole point of smart pointers is to avoid >> having to do that. I don't really see a reason to do a shallow copy. If >> the background thread was going to hang onto the object to do further >> changes to it, you would want a deep copy since most vtk objects are not >> threadsafe. Keep in mind that if the filter that produced it is >> re-executed then the data object will get overwritten (most filters reuse >> output objects when re-executed). But it sounds like you are letting the >> pipeline that produced it be deleted while just keeping the object itself. >> > > Yes, that seemed like the safest thing to do. To have it as a one-off > thread which just produces a result, not one that is reused. > I realize now that one thing that I do lose with the approach I took is requests for subextents (e.g. using vtkExtractVOI), which my reader is ready to handle. I always have to read the entire volume as it is now. What would be the best thing to do if I want to keep support for requesting subextents? To make a vtkExtractVOI work downstream, would I have to make a special "source" filter that spins of a thread to do the reading? That wouldn't work anyway I think, because then I'd block in the RequestData of the filter that is one down from that special source filter, while the thread is doing its work... not sure there is a solution for this..? Elvis > The shallow copying is something I found from Berk in this old thread (no > pun intended) from 2014: > > http://public.kitware.com/pipermail/vtkusers/2014-March/083477.html > > In his example there he passes by raw pointer across threads, and use > double shallow copying (shallow copying both in the producer and consumer > thread). > > But maybe that was just something that had to be done in the past, when > the refcounting machinery was more susceptible to corruption in a > multi-thread scenario? > > Berk, do you remember the reason for the shallow copying? Because like > Shawn above, I don't quite see the reason for it either, now that I think > about it. > > >> >>> >>> Do you know if there are any things/gotchas or parts of VTK to watch out >>> for when putting parts of a pipeline in a separate thread like this? >>> >> >> The only thing I know of is that rendering and associated things >> (mappers, actors, etc) have to be done in the foreground thread. If others >> on the list know about more, I would be glad to learn about them too. >> > > Alright, yes that I've gathered as well. > > Another thing I've seen warned against is having pipeline connections > across threads. That is, a filter must not have its input connection set to > the output port of a filter living in another thread. Is that also still > generally true? > > Elvis > > >> >> HTH, >> Shawn >> >> >>> Elvis >>> >>> >>>> >>>> HTH, >>>> Shawn >>>> >>>> On Tue, Jul 5, 2016 at 5:11 PM, Elvis Stansvik < >>>> elvis.stansvik at orexplore.com> wrote: >>>> >>>>> Just as I was going to ask a threading question on this list, someone >>>>> else did :) Oh well here's another one: >>>>> >>>>> I'm rendering a compressed volume, and I've noticed that a big chunk >>>>> of the time-to-first-render for me is the initial reading of the volume. To >>>>> keep the UI responsive while the reading takes place, I decided to give >>>>> QtConcurrent::run + QFuture + QFutureWatcher a try as a mechanism to put >>>>> the reading in a different thread. >>>>> >>>>> Here's a shortened version of what I did: >>>>> >>>>> auto future = QtConcurrent::run([&]() -> vtkImageData * { >>>>> auto reader = vtkSmartPointer::New(); >>>>> reader->setFileName("big_compressed_volume.hdf5"); >>>>> reader->Update(); >>>>> >>>>> auto output = reader->GetOutput(); >>>>> auto result = output->NewInstance(); >>>>> result->ShallowCopy(output); >>>>> >>>>> return result; >>>>> }); >>>>> >>>>> auto futureWatcher = new QFutureWatcher(this); >>>>> >>>>> connect(futureWatcher, &QFutureWatcher::finished, >>>>> [=]() { >>>>> auto imageData = futureWatcher->result(); >>>>> >>>>> // ... Create the rendering part of the pipeline >>>>> >>>>> GetRenderWindow()->Render(); >>>>> }); >>>>> >>>>> futureWatcher->setFuture(future); >>>>> >>>>> This works great. Using QtConcurrent::run, I spin up a thread in which >>>>> the reading takes place. When the resulting vtkImageData is ready, I return >>>>> a shallow copy of it, which in turn causes the QFutureWatcher I set up to >>>>> emit the finished signal, upon which I construct the remaining (rendering) >>>>> part of the pipeline (which doesn't take much time compared to the reading, >>>>> about ~1/6 of the time). >>>>> >>>>> Now to my questions: >>>>> >>>>> 1. Is this safe? Since the reader is destroyed by the time the rest of >>>>> the pipeline takes over (courtesy of using Qt signal delivery as a >>>>> synchronization point), there's no risk of concurrent access to VTK objects >>>>> here, right? >>>>> >>>>> 2. Can I always use this approach for segments of my pipeline up until >>>>> the rendering parts (up to the mapper?), or are there non-rendering parts >>>>> of VTK which simply cannot run in a separate thread? >>>>> >>>>> 3. Regarding the shallow copying, I first tried to return just >>>>> >>>>> return vtkSmartPointer(reader->GetOutput()); >>>>> >>>>> from the reader function. My thinking with this was that >>>>> >>>>> * I create a smart pointer, which should raise the ref count of the >>>>> object to 2, since the reader itself is still alive at that point and also >>>>> holds a reference, >>>>> * a copy is then made of the smart pointer (for the return value of >>>>> the function), raising the refcount to 3, >>>>> * when the function finally returns, the vtkSmartPointer I created, >>>>> as well as the vtkSmartPointer holding the reader goes out of scope and >>>>> destructs, which means the ref count goes down to 1. >>>>> >>>>> But that's not what happens, I had a look at the ref count of the >>>>> image data I finally got in my slot (from futureWatcher->result()), and it >>>>> was 2, not 1 like I expected. >>>>> >>>>> I'm obviously misunderstanding something here, anyone care to >>>>> enlighten me? Does the ref counting mechanism not work across thread >>>>> boundaries? >>>>> >>>>> Many thanks in advance, >>>>> >>>>> Elvis >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aborsic at ne-scientific.com Wed Jul 6 04:21:56 2016 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Wed, 6 Jul 2016 10:21:56 +0200 Subject: [vtkusers] Rendering Problem with OpenGL2 backed Message-ID: Dear VTK Users, I would like to report a problem I am experiencing with the OpenGL2 back-end and which does not occur under the OpenGL back-end. I am using a custom filter that implements a level set method for segmenting images, and I can display the evolution of the level set process using VTK 5.10 or newer versions of VTK configured to use OpenGL, but not under OpenGL2. In the application there is a for loop where the level set filter is set to run a small number of level set iterations (e.g. 5) and than the visualization pipeline is updated to show the the zero level set surface extracted with a vtkContourFilter. The above worked fine under OpenGL but I get the following error under OpenGL2 The above error occurs on the second visualization attempt A Python snippet below shows the relevant code: ls.SetIter(5) # tell the filter to run 5 level set iterations every time Update() is called for i in range(num_cycles): print("LS iteration %i of %i\n" % (i*5, num_cycles*5)) ls.Modified() # set the modified flag on the level set filter so that the Update() call results in a re-run ls.Update() # run more iterations of the level set filter contour_filter.Update() # update the zero level set surface renWin.Render() # re-render the screen print("Terminated running LS iterations") The environment in Windows 10 64bit, VTK 7.0.0, Python 3.5.1 I will be happy to post a full source code example if that helps. Any comment is welcome, Thanks, Best Regards, Andrea -- ++++++++++++++++++++++++++++++++++++ Andrea Borsic Ph.D. Founder NE Scientific LLC Tel: +1 603 676 7450 Web: www.ne-scientific.com Twitter: https://twitter.com/ne_scientific -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ilofghfoncdidmhf.png Type: image/png Size: 2797 bytes Desc: not available URL: From lonni.besancon at gmail.com Wed Jul 6 08:38:28 2016 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Wed, 6 Jul 2016 05:38:28 -0700 (MST) Subject: [vtkusers] From .vtp and PolyData to ImageData Message-ID: <1467808708281-5739138.post@n5.nabble.com> Hello everyone, I have a working code that can read and display .vtk and .vti file with the following code (just an extract of the code, because it's too long). /vtkSmartPointer loadTypedDataSet(const std::string& fileName){ vtkNew reader; LOGI("Loading file: %s...", fileName.c_str()); reader->SetFileName(fileName.c_str()); vtkNew errorObserver; reader->AddObserver(vtkCommand::ErrorEvent, errorObserver.GetPointer()); reader->Update(); if (errorObserver->hasError()) { // TODO? Throw a different type of error to let Java code // display a helpful message to the user throw std::runtime_error("Error loading data: " + errorObserver->getErrorMessage()); } vtkSmartPointer data = vtkSmartPointer::New(); data->DeepCopy(reader->GetOutputDataObject(0)); return data; } const std::string ext = fileName.substr(fileName.find_last_of(".") + 1); if (ext == "vtk") data = loadTypedDataSet(fileName); else if (ext == "vti") data = loadTypedDataSet(fileName); else throw std::runtime_error("Error loading data: unknown extension: \"" + ext + "\""); / Except that now I would like to adapt it to render .vtp files (such as bunny.vtp or teapot.vtp). I was wondering if you could point me in the right direction there. For the remaining part of my code I really need to be able to manipulate vtkImageData, so I would like to be able to obtain an image data from the input file if possible. Have a good day and thanks in advance for the help, -- View this message in context: http://vtk.1045678.n5.nabble.com/From-vtp-and-PolyData-to-ImageData-tp5739138.html Sent from the VTK - Users mailing list archive at Nabble.com. From mathieu.westphal at kitware.com Wed Jul 6 10:49:09 2016 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Wed, 6 Jul 2016 16:49:09 +0200 Subject: [vtkusers] VTK/Paraview Courses in October Message-ID: Hello Kitware will be holding a 2-day VTK and ParaView course on October 11th and 12th 2016 in Lyon, France. Please visit our web site for more information and registration details at VTK (English) : http://training.kitware.fr/browse/130 VTK (French) : http://formations.kitware.fr/browse/130 ParaView (English) : http://training.kitware.fr/browse/131 ParaView (French) : http://formations.kitware.fr/browse/131 Note that the course will be taught in English. If you have any question, please contact us at formations at http://www.kitware.fr Thank you, Mathieu Westphal -------------- next part -------------- An HTML attachment was scrubbed... URL: From olivameline at gmail.com Wed Jul 6 11:12:26 2016 From: olivameline at gmail.com (Olivier Ameline) Date: Wed, 6 Jul 2016 08:12:26 -0700 (MST) Subject: [vtkusers] Problem executing VTK in release mode with Visual Studio 2013 In-Reply-To: References: <1467709902493-5739093.post@n5.nabble.com> <1467730433578-5739107.post@n5.nabble.com> Message-ID: <1467817946305-5739141.post@n5.nabble.com> Thanks, it's working now ! I have suppressed all VTK debug-mode .dll from the "path" environment variable. I also needed to copy-paste all .dll of Qt in the folder where the executable "SimpleView.exe" leaves. Another question : Is there a means not to have to copy-paste the .dll of Qt ? I tried to add the corresponding folder in the "path" environment variable, but it does not work. Olivier -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-executing-VTK-in-release-mode-with-Visual-Studio-2013-tp5739093p5739141.html Sent from the VTK - Users mailing list archive at Nabble.com. From bebe0705 at colorado.edu Wed Jul 6 13:09:33 2016 From: bebe0705 at colorado.edu (BBerco) Date: Wed, 6 Jul 2016 10:09:33 -0700 (MST) Subject: [vtkusers] QVTK Widget and Retina MacBook (High-DPI screen) Message-ID: <1467824973975-5739142.post@n5.nabble.com> Hello everyone, I have started developing a GUI application on my Retina MacBook Pro. One of the core component of the GUI is a QVTKWidget used to embed VTK graphics within the QT GUI. Obviously, I am encountering a bug: only the lower left portion of the QVTKWidget is actually used for rendering, while the remainder of the area stays dark/riddled with artefacts. This is the exact same issue as in the archived post indicated below. http://vtk.1045678.n5.nabble.com/QVTKWidget-and-MacOS-problems-td5729620.html The workaround mentioned in the post (running the GUI in low resolution) "works", in the sense that the QVTK Widget shows properly, but 1) the graphics inside the Widget are aliased 2) The window buttons and window title appear blurry. Has someone come up with a fix enabling QVTK Widgets to work on Retina Macbooks? Thanks, Ben -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTK-Widget-and-Retina-MacBook-High-DPI-screen-tp5739142.html Sent from the VTK - Users mailing list archive at Nabble.com. From guilherme.gallo at eldorado.org.br Wed Jul 6 13:54:31 2016 From: guilherme.gallo at eldorado.org.br (Guilherme Alcarde Gallo) Date: Wed, 6 Jul 2016 17:54:31 +0000 Subject: [vtkusers] Problems in rendering volume with vtkOpenVR Message-ID: <4930d29af69b429e9e0f3ed399b7f678@serv031.corp.eldorado.org.br> Hello all! I have succeeded in building VTK with vtkOpenVR remote module and running a simple Cone example in my OSVR HMD. But when I've attempted to run the volume rendering example "GPURenderDemo", I got a black screen and a lot of repetitive errors: ERROR: In C:\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 2035 vtkTextureObject (0000000BE6462060): failed at glCopyTexImage2D 6402 1 OpenGL errors detected 0 : (1282) Invalid operation Also, I have tried to run the CPU-based volume rendering example "FixedPointVolumeRayCastMapperCT". Although the performance is poor, it works, since the texture successfully appears in the HMD and its tracking is integrated with the WindowInteractor. My colleague has made an investigation about this issue comparing both examples, he concluded that the problem is related with the "SmartVolumeMapper" class. So I would like to ask a few questions: 1) Does the remote module vtkOpenVR has support for volume rendering? 2a) If it does, what I'm doing wrong? Is there any problem with SmartVolumeMapper implementation for running vtkOpenVr applications? 2b) If it don't, how I can add volume rendering support for vtkOpenVR? (I and my team are willing to do this) Thank you very much! Guilherme -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangq1979 at outlook.com Wed Jul 6 16:14:17 2016 From: wangq1979 at outlook.com (Wang Q) Date: Wed, 6 Jul 2016 20:14:17 +0000 Subject: [vtkusers] Plausible bubbles Message-ID: Hello vtk guys, I simply use spheres as bubbles, but with solid appearance and default lightning by vtk, which looks not good. I suppose that texture, opacity, and lightning should be added to them to make them plausible. I did some research, and tried different ways, but cannot get a great one. I was wondering if anyone did this before or have any hint to achieve something like the ones by below link. https://www.google.co.uk/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=&url=https%3A%2F%2Fwww.vectorstock.com%2Froyalty-free-vector%2Fbubble-soap-light-vector-1558013&bvm=bv.126130881,d.ZGg&psig=AFQjCNGRoch9fmkACKiiotg_Tz1F6Smtaw&ust=1467922375235773 best regards, Chiang -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed Jul 6 16:30:03 2016 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 6 Jul 2016 16:30:03 -0400 Subject: [vtkusers] Problems in rendering volume with vtkOpenVR In-Reply-To: <4930d29af69b429e9e0f3ed399b7f678@serv031.corp.eldorado.org.br> References: <4930d29af69b429e9e0f3ed399b7f678@serv031.corp.eldorado.org.br> Message-ID: I have not tested volume rendering with vtkOpenVR but ... I can't think of any reason it would not work. I suspect there is maybe a some sort of issue with the volume renderer copying the frame back into (or out of) the frame buffer. I suspect if you can find the issue the fix will be pretty easy. If I get a chance I'll try giving it a shot. On Wed, Jul 6, 2016 at 1:54 PM, Guilherme Alcarde Gallo < guilherme.gallo at eldorado.org.br> wrote: > Hello all! > > > > I have succeeded in building VTK with vtkOpenVR remote module and running > a simple Cone example in my OSVR HMD. > > But when I?ve attempted to run the volume rendering example > "GPURenderDemo", I got a black screen and a lot of repetitive errors: > > *ERROR: In* > > *C:\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx,* > > *line 2035* > > *vtkTextureObject (0000000BE6462060): failed at glCopyTexImage2D 6402 1 > OpenGL errors detected* > > * 0 : (1282) Invalid operation* > > > > Also, I have tried to run the CPU-based volume rendering example > ?FixedPointVolumeRayCastMapperCT?. > > Although the performance is poor, it works, since the texture successfully > appears in the HMD and its tracking is integrated with the WindowInteractor. > > > > My colleague has made an investigation about this issue comparing both > examples, he concluded that the problem is related with the > ?SmartVolumeMapper? class. > > > > So I would like to ask a few questions: > > 1) Does the remote module vtkOpenVR has support for volume > rendering? > > 2a) If it does, what I'm doing wrong? Is there any problem with > SmartVolumeMapper implementation for running vtkOpenVr applications? > > 2b) If it don?t, how I can add volume rendering support for vtkOpenVR? (I > and my team are willing to do this) > > > > Thank you very much! > > Guilherme > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Thu Jul 7 07:44:16 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Thu, 7 Jul 2016 07:44:16 -0400 Subject: [vtkusers] vtkMultiBlockDataSet and vtkDataSetSurfaceFilter In-Reply-To: <65D987BE62E58141AA480A59A8B5BBEA71F0818D@srv-mail.diana.local> References: <65D987BE62E58141AA480A59A8B5BBEA71F06A7B@srv-mail.diana.local> <65D987BE62E58141AA480A59A8B5BBEA71F0818D@srv-mail.diana.local> Message-ID: Hi Andreas, You can produce as many levels as you'd like but if all you are interested is removing the internal boundaries, one level would be plenty. There is actually a way to mark the surface vertices to avoid internal surfaces but it is not a well established/tested path so I recommend the ghost cell path for now. Best, -berk On Wed, Jul 6, 2016 at 2:22 AM, Andreas Buykx wrote: > Hi Berk, > > > > Does this mean that I only need to produce one level of ghost cells? I > sort of can understand that when the ghost cells are not removed anymore? > > > > Kind regards, > > Andreas > > > > *From:* Berk Geveci [mailto:berk.geveci at kitware.com] > *Sent:* Monday, July 04, 2016 1:28 PM > *To:* Andreas Buykx > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] vtkMultiBlockDataSet and vtkDataSetSurfaceFilter > > > > Hi Andreas, > > > > There is a long answer but it's early in the morning so I'll go with a > short one :-) Yes, normally you would check for > UPDATE_NUMBER_OF_GHOST_LEVELS etc. However, this is not required. You can > always produce ghost cells even if you are not asked for it. > > > > Best, > > -berk > > > > On Fri, Jul 1, 2016 at 3:53 AM, Andreas Buykx > wrote: > > Hi, > > > > My finite element mesh is stored in a vtkMultiBlockDataSet. I use a > vtkCompositeDataPipeline to process my algorithms. > > > > Visualizing the outer surface of the mesh using vtkDataSetSurfaceFilter > generates the outer surface of each block, instead of the outer surface of > the entire mesh. > > In the source algorithm I can define ghost cells, but to know how many > levels of ghost cells I have to generate I should be reading the > UPDATE_NUMBER_OF_GHOST_LEVELS, if I understand correctly. Looking at > vtkDataSetSurfaceFilter it seems that it requests ghost cells only if > UPDATE_NUMBER_OF_PIECES > 1. Similar code is in vtkFeatureEdges and several > other algorithms that I use. > > > > So it seems that I have to fool my pipeline into thinking that it > processes multiple pieces, by setting UPDATE_NUMBER_OF_PIECES to >1. Is > that possible at all? Should I also set other update information, like > UPDATE_PIECE_NUMBER? Where in the pipeline should I set this information? > Is there an alternative way of doing this? > > > > Thanks for your advice. Kind regards, > > Andreas Buykx > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Jul 7 09:44:27 2016 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 7 Jul 2016 09:44:27 -0400 Subject: [vtkusers] Problems in rendering volume with vtkOpenVR In-Reply-To: References: <4930d29af69b429e9e0f3ed399b7f678@serv031.corp.eldorado.org.br> Message-ID: I pushed a fix to the OpenVR remote module. You will need to make sure you set MultiSamples(0) on your renderwindow before you render as the issue involved reading from a multisampled buffer. I did test with a simple Volume Rendering example and it worked. There did seem to be a clipping/bbox issue with the volume when I adjusted it's position and orientation but I suspect that is a bug in the volume rendering code. Thanks Ken On Wed, Jul 6, 2016 at 4:30 PM, Ken Martin wrote: > I have not tested volume rendering with vtkOpenVR but ... I can't think of > any reason it would not work. I suspect there is maybe a some sort of issue > with the volume renderer copying the frame back into (or out of) the frame > buffer. I suspect if you can find the issue the fix will be pretty easy. If > I get a chance I'll try giving it a shot. > > On Wed, Jul 6, 2016 at 1:54 PM, Guilherme Alcarde Gallo < > guilherme.gallo at eldorado.org.br> wrote: > >> Hello all! >> >> >> >> I have succeeded in building VTK with vtkOpenVR remote module and running >> a simple Cone example in my OSVR HMD. >> >> But when I?ve attempted to run the volume rendering example >> "GPURenderDemo", I got a black screen and a lot of repetitive errors: >> >> *ERROR: In* >> >> *C:\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx,* >> >> *line 2035* >> >> *vtkTextureObject (0000000BE6462060): failed at glCopyTexImage2D 6402 1 >> OpenGL errors detected* >> >> * 0 : (1282) Invalid operation* >> >> >> >> Also, I have tried to run the CPU-based volume rendering example >> ?FixedPointVolumeRayCastMapperCT?. >> >> Although the performance is poor, it works, since the texture >> successfully appears in the HMD and its tracking is integrated with the >> WindowInteractor. >> >> >> >> My colleague has made an investigation about this issue comparing both >> examples, he concluded that the problem is related with the >> ?SmartVolumeMapper? class. >> >> >> >> So I would like to ask a few questions: >> >> 1) Does the remote module vtkOpenVR has support for volume >> rendering? >> >> 2a) If it does, what I'm doing wrong? Is there any problem with >> SmartVolumeMapper implementation for running vtkOpenVr applications? >> >> 2b) If it don?t, how I can add volume rendering support for vtkOpenVR? (I >> and my team are willing to do this) >> >> >> >> Thank you very much! >> >> Guilherme >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From enzo.matsumiya at gmail.com Thu Jul 7 09:49:20 2016 From: enzo.matsumiya at gmail.com (Enzo Matsumiya) Date: Thu, 7 Jul 2016 10:49:20 -0300 Subject: [vtkusers] Update() methods on multithreaded applications In-Reply-To: References: <27CB2361-E24C-4AF3-9FF7-9DFCAA9D7E5E@gmail.com> Message-ID: Thanks David. I solved it using QFuture instead (I don't know why QThread and boost::thread were not working). > On Jul 5, 2016, at 14:50, David Gobbi wrote: > > Hi Enzo, > > If you have an ITK pipeline or a VTK pipeline that only doesn't do any display (i.e. that only does IO or processing), then put it into a QThread so that it can update asynchronously. When the thread re-joins your application, you get the pipeline's output and connect it to your display pipeline. > > On Tue, Jul 5, 2016 at 11:04 AM, Enzo Matsumiya > wrote: > Hello, > > My API implements a method to open a DICOM study and some methods for image processing using ITK. > When using my test application, I call these methods but they lock the UI, as expected, since I'm using VTK and ITK from an object on the same thread as the application's UI. > > What is the correct way to deal with that, considering I need constant communication from the UI controls with my VTK objects? > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Thu Jul 7 15:06:48 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Thu, 7 Jul 2016 15:06:48 -0400 Subject: [vtkusers] The VTK hackathon Message-ID: Yesterday, we had a great hackathon. It was a great turnout. See below for a full list of attendees. This time, our focus was on cleaning up the issue tracker ? for maintenance as well as in anticipation of a move to the Gitlab tracker. As of today, 55 bugs have been closed! There are also merge requests for a few more. In addition, we worked on resolving merge requests. 31 merged or closed! Not bad. We plan on holding these hackathon monthly going forward. Attendees: * Utkarsh Ayachit* Ben Boeckel* Shawn Walden* Dave DeMarle* Andy Bauer* Chuck Atkins* Rob Maynard* Marcus Hanwell* Dan Lipsa* Seb Jourdain* Alvaro Sanchez* Berk Geveci* Will Schroeder* Dave Thompson* Cory Quammen* Tim Thirion* David Gobbi* Betsy McPhail* Sujin Philip* Sean McBride -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Fri Jul 8 03:37:56 2016 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Fri, 8 Jul 2016 00:37:56 -0700 (MST) Subject: [vtkusers] Are there a option to find cells to an edge? In-Reply-To: <1467715262209-5739094.post@n5.nabble.com> References: <1467715262209-5739094.post@n5.nabble.com> Message-ID: <1467963476708-5739171.post@n5.nabble.com> Does no one have an idea or hint? By what means it is possible to find the cells within an object? Thanks in advance! -- View this message in context: http://vtk.1045678.n5.nabble.com/Are-there-a-option-to-find-cells-to-an-edge-tp5739094p5739171.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.edmunds at icr.ac.uk Fri Jul 8 04:04:20 2016 From: david.edmunds at icr.ac.uk (Dave Edmunds) Date: Fri, 8 Jul 2016 01:04:20 -0700 (MST) Subject: [vtkusers] QVTK Widget and Retina MacBook (High-DPI screen) In-Reply-To: <1467824973975-5739142.post@n5.nabble.com> References: <1467824973975-5739142.post@n5.nabble.com> Message-ID: <1467965060897-5739172.post@n5.nabble.com> Hi Ben, I have exactly the same problem as you, I posted a question to the mailing list last week about this: http://vtk.1045678.n5.nabble.com/QVTKWidget-on-Mac-Retina-displays-td5738934.html I haven't received any replies yet. Perhaps we should file a bug report on the tracker? Kind regards, Dave -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTK-Widget-and-Retina-MacBook-High-DPI-screen-tp5739142p5739172.html Sent from the VTK - Users mailing list archive at Nabble.com. From ich_daniel at habmalnefrage.de Fri Jul 8 04:12:46 2016 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Fri, 8 Jul 2016 01:12:46 -0700 (MST) Subject: [vtkusers] Are there a option to find cells to an edge? In-Reply-To: <1467963476708-5739171.post@n5.nabble.com> References: <1467715262209-5739094.post@n5.nabble.com> <1467963476708-5739171.post@n5.nabble.com> Message-ID: <1467965566785-5739173.post@n5.nabble.com> Most likely would be helpful the function "cellocator.FindCellsInBounds(bounds, foundcells);". However, this is not supported in Java. Are there other ways instead? -- View this message in context: http://vtk.1045678.n5.nabble.com/Are-there-a-option-to-find-cells-to-an-edge-tp5739094p5739173.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Fri Jul 8 09:07:36 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Fri, 8 Jul 2016 15:07:36 +0200 Subject: [vtkusers] vtkImageReslice rotation and resampling question Message-ID: Hi all, I have a fairly simple problem, and one that I?m sure has previously been solved here, but I?m struggling to find the right keywords to find a useful thread. I would like to superpose a kernel vtkImageData (kernel.png) onto a grid vtkImageData (grid.png). The kernel will be rotated (superpose.png), however, so the kernel will requiring resampling before superposition is possible (superposition_and_resample.png). What is the best way to do this? I feel like I can simply use vtkImageReslice, but I?m not 100%. Thanks in advance for any pointers. Regards, Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: kernel.png Type: image/png Size: 3153 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: grid.png Type: image/png Size: 7905 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: superposition.png Type: image/png Size: 20880 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: superposition_and_resample.png Type: image/png Size: 7907 bytes Desc: not available URL: From Francois.Rongere at ec-nantes.fr Fri Jul 8 09:55:24 2016 From: Francois.Rongere at ec-nantes.fr (=?UTF-8?B?RnJhbsOnb2lzIFJvbmfDqHJl?=) Date: Fri, 8 Jul 2016 15:55:24 +0200 Subject: [vtkusers] vtkRenderWindowInteractor.Start() most of time does not open a Window Message-ID: Hi, I managed to build a convenience python class to show some meshes. The problem I have is that when the vtkWindowInteractor.Start() method is called, most of the time nothing happen and sometime I get the wanted window. I tried calling the vtkWindowInteractor.Initialize() method and it seems that this is the real culprit... The really strage thing is that sometimes it is successful... In the case where it fails, I get no error message but the code seem to enter in the event loop as the command line is not released with no mean to take the hand back with a CTRL-C as the event loop does not support it, so it freezes my terminal. A try/except block catches no error too... I have no clue of what is happening and how to start debugging. I attached an example of this with example data file. I am running python 2.7 with vtk 6.3.0 on a Debian Jessie workstation. Any help appreciated, Best regards, Fran?ois. -------------- next part -------------- A non-text attachment was scrubbed... Name: mesh.vtp Type: text/xml Size: 6401 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MMviewer.py Type: text/x-python Size: 7902 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test_MMviewer.py Type: text/x-python Size: 389 bytes Desc: not available URL: From ken.martin at kitware.com Fri Jul 8 10:22:53 2016 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 8 Jul 2016 10:22:53 -0400 Subject: [vtkusers] Problems in rendering volume with vtkOpenVR In-Reply-To: References: <4930d29af69b429e9e0f3ed399b7f678@serv031.corp.eldorado.org.br> Message-ID: Hmm I think this was outside but I was close to the volume, also the view angle was close to 120 degrees as opposed to VTK's more typical 30 On Fri, Jul 8, 2016 at 10:13 AM, Alvaro Sanchez wrote: > This merge request might fix the issue ( > https://gitlab.kitware.com/vtk/vtk/merge_requests/1655). I could > reproduce the problem but only when having the camera inside the bounding > box of a rotated volume. > > Let me know if this helps, thanks. > > Alvaro > > > > On Thu, Jul 7, 2016 at 9:44 AM, Ken Martin wrote: > >> I pushed a fix to the OpenVR remote module. You will need to make sure >> you set MultiSamples(0) on your renderwindow before you render as the issue >> involved reading from a multisampled buffer. I did test with a simple >> Volume Rendering example and it worked. There did seem to be a >> clipping/bbox issue with the volume when I adjusted it's position and >> orientation but I suspect that is a bug in the volume rendering code. >> >> Thanks >> Ken >> >> On Wed, Jul 6, 2016 at 4:30 PM, Ken Martin >> wrote: >> >>> I have not tested volume rendering with vtkOpenVR but ... I can't think >>> of any reason it would not work. I suspect there is maybe a some sort of >>> issue with the volume renderer copying the frame back into (or out of) the >>> frame buffer. I suspect if you can find the issue the fix will be pretty >>> easy. If I get a chance I'll try giving it a shot. >>> >>> On Wed, Jul 6, 2016 at 1:54 PM, Guilherme Alcarde Gallo < >>> guilherme.gallo at eldorado.org.br> wrote: >>> >>>> Hello all! >>>> >>>> >>>> >>>> I have succeeded in building VTK with vtkOpenVR remote module and >>>> running a simple Cone example in my OSVR HMD. >>>> >>>> But when I?ve attempted to run the volume rendering example >>>> "GPURenderDemo", I got a black screen and a lot of repetitive errors: >>>> >>>> *ERROR: In* >>>> >>>> *C:\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx,* >>>> >>>> *line 2035* >>>> >>>> *vtkTextureObject (0000000BE6462060): failed at glCopyTexImage2D 6402 1 >>>> OpenGL errors detected* >>>> >>>> * 0 : (1282) Invalid operation* >>>> >>>> >>>> >>>> Also, I have tried to run the CPU-based volume rendering example >>>> ?FixedPointVolumeRayCastMapperCT?. >>>> >>>> Although the performance is poor, it works, since the texture >>>> successfully appears in the HMD and its tracking is integrated with the >>>> WindowInteractor. >>>> >>>> >>>> >>>> My colleague has made an investigation about this issue comparing both >>>> examples, he concluded that the problem is related with the >>>> ?SmartVolumeMapper? class. >>>> >>>> >>>> >>>> So I would like to ask a few questions: >>>> >>>> 1) Does the remote module vtkOpenVR has support for volume >>>> rendering? >>>> >>>> 2a) If it does, what I'm doing wrong? Is there any problem with >>>> SmartVolumeMapper implementation for running vtkOpenVr applications? >>>> >>>> 2b) If it don?t, how I can add volume rendering support for vtkOpenVR? >>>> (I and my team are willing to do this) >>>> >>>> >>>> >>>> Thank you very much! >>>> >>>> Guilherme >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> Ken Martin PhD >>> Chairman & CFO >>> Kitware Inc. >>> 28 Corporate Drive >>> Clifton Park NY 12065 >>> 518 371 3971 >>> >>> This communication, including all attachments, contains confidential and >>> legally privileged information, and it is intended only for the use of the >>> addressee. Access to this email by anyone else is unauthorized. If you are >>> not the intended recipient, any disclosure, copying, distribution or any >>> action taken in reliance on it is prohibited and may be unlawful. If you >>> received this communication in error please notify us immediately and >>> destroy the original message. Thank you. >>> >> >> >> >> -- >> Ken Martin PhD >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > > > -- > Alvaro Sanchez > Kitware, Inc. > Senior R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4901 > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.meiler at simetris.de Fri Jul 8 10:22:15 2016 From: martin.meiler at simetris.de (Martin Meiler) Date: Fri, 8 Jul 2016 16:22:15 +0200 Subject: [vtkusers] Possible Bug in vtkOrientationMarkerWidget / vtkProp Message-ID: <1cf921bf-566a-ccd5-586d-1628c7d7a93d@simetris.de> Hello everybody, I am facing a problem when using a vtkOrientationMarkerWidget in a python/pyQt environment. python 2.7.3 vtk 6.1 pyQt: 4.10.1 I first define the axesActor and axesMarker and later in the code ... > self.axesActor = vtk.vtkAxesActor() > self.axesMarker = vtk.vtkOrientationMarkerWidget() > self.axesMarker.SetDefaultRenderer(self.renderer) > > self.axesMarker.SetInteractor(self.interact) > > self.axesMarker.SetOrientationMarker(self.axesActor) > > self.axesMarker.SetOutlineColor(0.9300, 0.5700, 0.1300) > > self.axesMarker.SetViewport(0.8, 0.0, 1.0, 0.2) > > self.axesMarker.SetEnabled(0) > > self.renderer.AddActor(self.axesActor) > > self.axesActor.VisibilityOn() > ... change the size of the orientation markers. > self.axesActor.SetTotalLength(delta, delta, delta) If the parameter delta is larger equal 5e-3, than everything looks fine. However if I use values smaller than 5e-3 the tips of the axesActor suddenly all point in x-Direction and the labels are not readable. Can someone reproduce this behavior? Is this a bug? Please find attached a python file that allows to reproduce this behavior (at least on my machine). Best regards Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- # -*- coding: utf-8 -*- """ Created on Fri Jul 08 15:50:36 2016 @author: martin """ import sys import vtk from PyQt4 import QtGui from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor class MainWindow(QtGui.QMainWindow): def __init__(self, parent = None, radius=0.5): super(MainWindow, self).__init__(parent) self._sphereRad = radius self._initUI() self._initVtk() def _initUI(self): """ This method sets up the pyqt items """ frame = QtGui.QFrame() self.vtkWidget = QVTKRenderWindowInteractor(frame) main_lhbox = QtGui.QHBoxLayout() main_lhbox.addWidget(self.vtkWidget) frame.setLayout(main_lhbox) self.setCentralWidget(frame) self.show() def _initVtk(self): """ This method sets up the vtk objects """ self.attrib = vtk.vtkCompositeDataDisplayAttributes() self.mapper = vtk.vtkCompositePolyDataMapper2() self.mapper.SetCompositeDataDisplayAttributes(self.attrib) # Create an actor self.actor = vtk.vtkActor() self.actor.SetMapper(self.mapper) self.actor.GetProperty().SetInterpolationToFlat() self.actor.GetProperty().EdgeVisibilityOff() self.actor.GetProperty().SetOpacity(0.5) self.renderer = vtk.vtkRenderer() self.renderer.GradientBackgroundOn(); self.renderer.SetBackground(1,1,1); self.renderer.SetBackground2(37./255, 127./255, 194./255); self.renderer.AddActor(self.actor) self.vtkWidget.GetRenderWindow().AddRenderer(self.renderer) self.interact = self.vtkWidget.GetRenderWindow().GetInteractor() self.interact.Initialize() self.sphere = vtk.vtkSphereSource() self.sphere.SetRadius(self._sphereRad) self.sphere.Modified() self.geoF = vtk.vtkDataSetSurfaceFilter() self.axesActor = vtk.vtkAxesActor() self.axesMarker = vtk.vtkOrientationMarkerWidget() self.axesMarker.SetDefaultRenderer(self.renderer) self.axesMarker.SetInteractor(self.interact) self.axesMarker.SetOrientationMarker(self.axesActor) self.axesMarker.SetOutlineColor(0.9300, 0.5700, 0.1300) self.axesMarker.SetEnabled(0) self.renderer.AddActor(self.axesActor) self.axesActor.VisibilityOn() self.axesActor.SetTotalLength(0.5*self._sphereRad, 0.5*self._sphereRad, 0.5*self._sphereRad) self.geoF.SetInputConnection(self.sphere.GetOutputPort()) self.mapper.SetInputConnection(self.geoF.GetOutputPort()) style = vtk.vtkInteractorStyleTrackballCamera() self.renderer.GetActiveCamera().ParallelProjectionOff() self.interact.SetInteractorStyle(style) style.EnabledOn() self.renderer.ResetCamera(self.mapper.GetBounds()) if __name__ == "__main__": app = QtGui.QApplication(sys.argv) window = MainWindow(radius=9e-3) sys.exit(app.exec_()) From Francois.Rongere at ec-nantes.fr Fri Jul 8 10:31:06 2016 From: Francois.Rongere at ec-nantes.fr (=?UTF-8?B?RnJhbsOnb2lzIFJvbmfDqHJl?=) Date: Fri, 8 Jul 2016 16:31:06 +0200 Subject: [vtkusers] vtkRenderWindowInteractor.Start() most of time does not open a Window In-Reply-To: References: Message-ID: Hi again, Don't loose your time on that problem: I solved it. This is the/vtkRenderWindow.FullScreenOn()/ that causes the problem (I have made a procedural version of the code by adding iteratively my different instructions). So I replaced it by /vtkRenderWindow.SetSize(1024, 768)/ and it works everytime. So maybe a bug in /FullScreenOn()/. My workstation has 2 screens though... But it causes me to ask a way of getting the resolution of my screen with vtk. Any idea ? Cheers, Fran?ois On 08/07/2016 15:55, Fran?ois Rong?re wrote: > Hi, > > I managed to build a convenience python class to show some meshes. The > problem I have is that when the vtkWindowInteractor.Start() method is > called, most of the time nothing happen and sometime I get the wanted > window. I tried calling the vtkWindowInteractor.Initialize() method > and it seems that this is the real culprit... The really strage thing > is that sometimes it is successful... > > In the case where it fails, I get no error message but the code seem > to enter in the event loop as the command line is not released with no > mean to take the hand back with a CTRL-C as the event loop does not > support it, so it freezes my terminal. A try/except block catches no > error too... > > I have no clue of what is happening and how to start debugging. > > I attached an example of this with example data file. > > I am running python 2.7 with vtk 6.3.0 on a Debian Jessie workstation. > > Any help appreciated, > > Best regards, > > Fran?ois. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Fri Jul 8 10:45:25 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 8 Jul 2016 10:45:25 -0400 Subject: [vtkusers] QVTK Widget and Retina MacBook (High-DPI screen) In-Reply-To: <1467824973975-5739142.post@n5.nabble.com> References: <1467824973975-5739142.post@n5.nabble.com> Message-ID: <20160708144525.GC26651@megas.kitware.com> On Wed, Jul 06, 2016 at 10:09:33 -0700, BBerco wrote: > Has someone come up with a fix enabling QVTK Widgets to work on Retina > Macbooks? IIRC, Qt4 does not support HiDPI displays; you'll need to use Qt5. --Ben From david.edmunds at icr.ac.uk Fri Jul 8 11:03:15 2016 From: david.edmunds at icr.ac.uk (Dave Edmunds) Date: Fri, 8 Jul 2016 08:03:15 -0700 (MST) Subject: [vtkusers] QVTK Widget and Retina MacBook (High-DPI screen) In-Reply-To: <20160708144525.GC26651@megas.kitware.com> References: <1467824973975-5739142.post@n5.nabble.com> <20160708144525.GC26651@megas.kitware.com> Message-ID: <1467990195610-5739181.post@n5.nabble.com> I am using Qt5 and experience exactly the same problem with QVTKWidget. Regards, Dave -- View this message in context: http://vtk.1045678.n5.nabble.com/QVTK-Widget-and-Retina-MacBook-High-DPI-screen-tp5739142p5739181.html Sent from the VTK - Users mailing list archive at Nabble.com. From ben.boeckel at kitware.com Fri Jul 8 11:05:19 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 8 Jul 2016 11:05:19 -0400 Subject: [vtkusers] QVTK Widget and Retina MacBook (High-DPI screen) In-Reply-To: <1467990195610-5739181.post@n5.nabble.com> References: <1467824973975-5739142.post@n5.nabble.com> <20160708144525.GC26651@megas.kitware.com> <1467990195610-5739181.post@n5.nabble.com> Message-ID: <20160708150519.GB5418@megas.kitware.com> On Fri, Jul 08, 2016 at 08:03:15 -0700, Dave Edmunds wrote: > I am using Qt5 and experience exactly the same problem with QVTKWidget. Hmm, OK, thanks. I guess we're missing the requisite setup. Ken? --Ben From david.gobbi at gmail.com Fri Jul 8 11:42:01 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 8 Jul 2016 09:42:01 -0600 Subject: [vtkusers] vtkImageReslice rotation and resampling question In-Reply-To: References: Message-ID: Hi Richard, Yes, you can use vtkImageReslice for this. It would work like this: Let's define T as the transform that gives the position and orientation of the kernel within the larger image. To resample the kernel, you would give vtkImageReslice the inverse of T as the ResliceTransform, and you would supply the larger image as a reference image, e.g. the code would look like this (using Python): reslice = vtkImageReslice() reslice.SetInputData(kernel_image) reslice.SetInformationInput(big_image) reslice.SetResliceTransform(inverse_transform) reslice.SetInterpolationModeToLinear() reslice.Update() This will produce something like the bottom image from your original email. In order for the kernel resampling to work properly, your kernel image must have a border which is all zeros. If this must be done over and over again (i.e. if you need to superimpose the kernel hundreds of times at various locations within the larger image) then the above procedure won't be fast enough. Another possibility is to use the vtkImageInterpolator class and some of your own ingenuity to create a fast method for resampling and superposing the kernel. During my PhD, I wrote a custom VTK class that superposed kernels into a volume in order to do 3D ultrasound reconstruction, but I never generalized it: https://github.com/dgobbi/AIGS/blob/master/Ultrasound/vtkFreehandUltrasound.h Some further development of this code was done for the PLUS toolkit: https://app.assembla.com/spaces/plus/subversion/source/HEAD/trunk/PlusLib/src/PlusVolumeReconstruction However, as far as I know, VTK doesn't provide an efficient general-purpose way of superposing kernels at different positions and orientations into a 3D volume. - David On Fri, Jul 8, 2016 at 7:07 AM, Richard Brown wrote: > > Hi all, > > I have a fairly simple problem, and one that I?m sure has previously been > solved here, but I?m struggling to find the right keywords to find a useful > thread. > > I would like to superpose a kernel vtkImageData (kernel.png) onto a grid > vtkImageData (grid.png). The kernel will be rotated (superpose.png), > however, so the kernel will requiring resampling before superposition is > possible (superposition_and_resample.png). > > What is the best way to do this? I feel like I can simply use > vtkImageReslice, but I?m not 100%. > > Thanks in advance for any pointers. > > Regards, > Richard > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Fri Jul 8 14:56:49 2016 From: bebe0705 at colorado.edu (BBerco) Date: Fri, 8 Jul 2016 11:56:49 -0700 (MST) Subject: [vtkusers] Best practice to interact/update with data through interactor ? Message-ID: <1468004209188-5739184.post@n5.nabble.com> Hello everyone, I am working on a hybrid QT/VTK software where point clouds are represented inside a QVTK widget. My question pertains to user interaction with the underlying data (i.e, the point cloud coordinates): Using an instance of vtkInteractorStyleRubberBandPick, I can select one or several points among those displayed. The current implementation of the interactor returns the ID of the selected point (thanks to vtkIdFilter). This ID tells me which point in the model is currently selected. Now, let's assume that the user desires to translate the selected point (through QT pop-up window opened if at least one point is selected). Obviously, the underlying data set must be modified accordingly AND the view must be updated to reflect the data update. What is the best way to achieve this? Can one access & edit the underlying data starting all the way up from the rendering window and then going down to the actor, mapper and eventually vtkPolyData of interest? Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Best-practice-to-interact-update-with-data-through-interactor-tp5739184.html Sent from the VTK - Users mailing list archive at Nabble.com. From mbarrow at eng.ucsd.edu Fri Jul 8 16:35:26 2016 From: mbarrow at eng.ucsd.edu (Michael Barrow) Date: Fri, 8 Jul 2016 15:35:26 -0500 Subject: [vtkusers] Issue with vtkHardwareSelector on nvidia graphics card over ssh Message-ID: hello all. The vtkHardwareSelector class seems to be broken with nvidia's stock libGL.so on my system This is with nvidia binary driver version 352 on ubuntu 14.04 with vtk6. I am using x forwarding via ssh which may be the issue. To reproduce just build and run the example: ExtractVisibleCells http://www.vtk.org/Wiki/VTK/Examples/Cxx/Filtering/ExtractVisibleCells The example fails to render a red overlay on visible faces on my system, but works on another with no GPU. The vtk SphereSource does render correctly and I am able to manipulate it in the render window with my mouse. Best, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From jp4work at gmail.com Sat Jul 9 12:18:11 2016 From: jp4work at gmail.com (JIA Pei) Date: Sat, 9 Jul 2016 09:18:11 -0700 Subject: [vtkusers] (no subject) Message-ID: -- Pei JIA, Ph.D. Email: jp4work at gmail.com cell in Canada: +1 778-863-5816 cell in China: +86 186-8244-3503 Welcome to Vision Open http://www.visionopen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jp4work at gmail.com Sat Jul 9 12:20:23 2016 From: jp4work at gmail.com (JIA Pei) Date: Sat, 9 Jul 2016 09:20:23 -0700 Subject: [vtkusers] recipe for target 'CMakeFiles/VTKData.dir/all' failed Message-ID: Hi, all: Anybody met the same issue as mine? How to deal with it? I failed to build VTK-git from source always, and I met similar error messages always like the following: -- Downloaded object: "/home/jiapei/Downloads/visualization/VTK/VTK/build/ExternalData/Objects/MD5/2dfa743d851ae91dd2df5fdf5e3aec04" make[2]: Leaving directory '/home/jiapei/Downloads/visualization/VTK/VTK/build' CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/VTKData.dir/all' failed make[1]: *** [CMakeFiles/VTKData.dir/all] Error 2 make[1]: Leaving directory '/home/jiapei/Downloads/visualization/VTK/VTK/build' Makefile:141: recipe for target 'all' failed make: *** [all] Error 2 cheers -- Pei JIA, Ph.D. Email: jp4work at gmail.com cell in Canada: +1 778-863-5816 cell in China: +86 186-8244-3503 Welcome to Vision Open http://www.visionopen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Sun Jul 10 07:48:10 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Sun, 10 Jul 2016 07:48:10 -0400 Subject: [vtkusers] Best practice to interact/update with data through interactor ? In-Reply-To: <1468004209188-5739184.post@n5.nabble.com> References: <1468004209188-5739184.post@n5.nabble.com> Message-ID: Hi there, When you say translate point through the Qt pop-up window, do you mean you wish to render the geometry in a separate pop-up? In terms of selection, you might have had a pointer to vtkPolyData that you provided as input to vtkIdFilter. If not, you could use the vtkPropPicker to get the actor under the mouse cursor. Once you have the actor, you can do actor->GetMapper()->GetInput() to get the vtkPolyData. Hope that helps. *Sankhesh* On Fri, Jul 8, 2016 at 2:56 PM, BBerco wrote: > Hello everyone, > > I am working on a hybrid QT/VTK software where point clouds are represented > inside a QVTK widget. > > My question pertains to user interaction with the underlying data (i.e, the > point cloud coordinates): > > Using an instance of vtkInteractorStyleRubberBandPick, I can select one or > several points among those displayed. The current implementation of the > interactor returns the ID of the selected point (thanks to vtkIdFilter). > This ID tells me which point in the model is currently selected. > > Now, let's assume that the user desires to translate the selected point > (through QT pop-up window opened if at least one point is selected). > Obviously, the underlying data set must be modified accordingly AND the > view > must be updated to reflect the data update. > > What is the best way to achieve this? Can one access & edit the underlying > data starting all the way up from the rendering window and then going down > to the actor, mapper and eventually vtkPolyData of interest? > > Thanks! > > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Best-practice-to-interact-update-with-data-through-interactor-tp5739184.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From i.v.ankudinov at mail.ru Mon Jul 11 08:39:54 2016 From: i.v.ankudinov at mail.ru (IlinkaGrap) Date: Mon, 11 Jul 2016 05:39:54 -0700 (MST) Subject: [vtkusers] Connectivity by Edge Message-ID: <1468240794566-5739191.post@n5.nabble.com> Dear VTK users, vtkConnectivityFilter allows to remove the unconnected by point components. Is there a way to remove components that are connected by point only, and leave those that are connected by edges? -- View this message in context: http://vtk.1045678.n5.nabble.com/Connectivity-by-Edge-tp5739191.html Sent from the VTK - Users mailing list archive at Nabble.com. From remi.charrier at gmail.com Mon Jul 11 08:54:01 2016 From: remi.charrier at gmail.com (Remi Charrier) Date: Mon, 11 Jul 2016 14:54:01 +0200 Subject: [vtkusers] Issues in creating Positional vtkLight Message-ID: Hi all, I am trying to create a positional vtkLight (without having necessary the spotlight (vtkLightActor)) and I have troubles with the function: setPositional when setting it to 1 it makes my rendering crashes without clear message when I add the light to the renderer. Indeed, I never managed to have simultaneously the lightning generated by the vtkLight and the vtkLightActor allowing me to visualize the position of the light. Here is a piece of my code: vtkSmartPointer light = vtkSmartPointer::New(); *light->SetPositional(1);* light->SetPosition(-15, 21, 5); light->SetLightTypeToSceneLight(); light->SetFocalPoint(m_FocusPoint[0], m_FocusPoint[1], m_FocusPoint[2]); light->SetColor(1, 1, 1.0); light->SetIntensity(1)); light->SetConeAngle(angle); light->SetSwitch(true); if (m_SpotLightsVisible == false) { *m_Renderer->AddLight(m_LigthsCollection[i]);* } if (m_SpotLightsVisible == true) { vtkSmartPointer lightActor = vtkSmartPointer::New(); lightActor->SetLight(*light*); m_Renderer->AddViewProp(lightActor); m_Renderer->Render(); std::cout << "ligth can not be added when using spots ligths..." << std::endl; } } Let me know if you need more information to understand what it is going on with my lights. R?mi -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Mon Jul 11 09:36:34 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 11 Jul 2016 09:36:34 -0400 Subject: [vtkusers] vtkMultiBlockDataSet and vtkDataSetSurfaceFilter In-Reply-To: <65D987BE62E58141AA480A59A8B5BBEA71F092B8@srv-mail.diana.local> References: <65D987BE62E58141AA480A59A8B5BBEA71F06A7B@srv-mail.diana.local> <65D987BE62E58141AA480A59A8B5BBEA71F0818D@srv-mail.diana.local> <65D987BE62E58141AA480A59A8B5BBEA71F092B8@srv-mail.diana.local> Message-ID: > Thanks, I will go for the ghost levels. Out of curiosity, what is this ?marking surface vertices?? Sounds like an interesting feature for other purposes as well. It is done through the point-wise ghost array. Best, -berk On Fri, Jul 8, 2016 at 4:16 AM, Andreas Buykx wrote: > Thanks, I will go for the ghost levels. Out of curiosity, what is this > ?marking surface vertices?? Sounds like an interesting feature for other > purposes as well. > > > > Kind regards, > > Andreas > > > > *From:* Berk Geveci [mailto:berk.geveci at kitware.com] > *Sent:* Thursday, July 07, 2016 1:44 PM > *To:* Andreas Buykx; VTK Users > > *Subject:* Re: [vtkusers] vtkMultiBlockDataSet and vtkDataSetSurfaceFilter > > > > Hi Andreas, > > > > You can produce as many levels as you'd like but if all you are interested > is removing the internal boundaries, one level would be plenty. There is > actually a way to mark the surface vertices to avoid internal surfaces but > it is not a well established/tested path so I recommend the ghost cell path > for now. > > > > Best, > > -berk > > > > On Wed, Jul 6, 2016 at 2:22 AM, Andreas Buykx > wrote: > > Hi Berk, > > > > Does this mean that I only need to produce one level of ghost cells? I > sort of can understand that when the ghost cells are not removed anymore? > > > > Kind regards, > > Andreas > > > > *From:* Berk Geveci [mailto:berk.geveci at kitware.com] > *Sent:* Monday, July 04, 2016 1:28 PM > *To:* Andreas Buykx > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] vtkMultiBlockDataSet and vtkDataSetSurfaceFilter > > > > Hi Andreas, > > > > There is a long answer but it's early in the morning so I'll go with a > short one :-) Yes, normally you would check for > UPDATE_NUMBER_OF_GHOST_LEVELS etc. However, this is not required. You can > always produce ghost cells even if you are not asked for it. > > > > Best, > > -berk > > > > On Fri, Jul 1, 2016 at 3:53 AM, Andreas Buykx > wrote: > > Hi, > > > > My finite element mesh is stored in a vtkMultiBlockDataSet. I use a > vtkCompositeDataPipeline to process my algorithms. > > > > Visualizing the outer surface of the mesh using vtkDataSetSurfaceFilter > generates the outer surface of each block, instead of the outer surface of > the entire mesh. > > In the source algorithm I can define ghost cells, but to know how many > levels of ghost cells I have to generate I should be reading the > UPDATE_NUMBER_OF_GHOST_LEVELS, if I understand correctly. Looking at > vtkDataSetSurfaceFilter it seems that it requests ghost cells only if > UPDATE_NUMBER_OF_PIECES > 1. Similar code is in vtkFeatureEdges and several > other algorithms that I use. > > > > So it seems that I have to fool my pipeline into thinking that it > processes multiple pieces, by setting UPDATE_NUMBER_OF_PIECES to >1. Is > that possible at all? Should I also set other update information, like > UPDATE_PIECE_NUMBER? Where in the pipeline should I set this information? > Is there an alternative way of doing this? > > > > Thanks for your advice. Kind regards, > > Andreas Buykx > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Jul 11 11:27:34 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 11 Jul 2016 17:27:34 +0200 Subject: [vtkusers] AppImage packaging: GLEW could not be initialized Message-ID: Hi all, In exploring different deployment options, I'm now trying to create an AppImage of a VTK+Qt application. For those who don't know, AppImage is a packaging format where the application, including (almost) all of its dependencies are put into a self-extracting ISO image called an AppImage. Doing this takes quite a bit of manual work, but if you do things correctly and build the image on a good base system (I'm using CentOS 6), the image should run on a multitude of distros. I've had some success: The resulting image runs on e.g. Ubuntu Xenial. I'm now trying it on my Arch Linux laptop (not a common/easy target for AppImages, but I'd like to make it work since I run it personally), and get: ERROR: In /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 533 vtkXOpenGLRenderWindow (0x1e48140): GLEW could not be initialized. This is due to a glewInit() call failing during initialization of the render window, and I've debugged it to the underlying call to glGetString(GL_VERSION) in VTK's forked GLEW library returning NULL. Does anyone have an idea why this might happen? The VTK I'm using here is configured as follows: cmake3 \ -DCMAKE_INSTALL_PREFIX=/usr \ -DVTK_Group_Qt=ON \ -DVTK_QT_VERSION=5 \ -DVTK_Group_Imaging=ON \ -DVTK_Group_Views=ON \ -DVTK_Group_MPI=OFF \ -DVTK_Group_Tk=OFF \ -DVTK_Group_Web=OFF \ -DBUILD_TESTING=OFF \ -DVTK_USE_SYSTEM_LIBRARIES=ON \ -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ -DCMAKE_BUILD_TYPE=Debug \ .. And it uses the OpenGL2 backend. It was built inside a CentOS 6 Docker container on a Kubuntu 16.04 host with HD 4400 Intel graphics adapter. The target system is an older laptop with up-to-date Arch Linux and a weaker HD 3000 Intel graphics adapter. Now, packaging apps that use OpenGL is a bit tricky, because you can't bundle e.g. libX11, libGL and some other libraries that are dependant on the user's graphics adapter/environment. The libraries that I've chosen to _not_ bundle are: libz.so.1 libm.so.6 libSM.so.6 libICE.so.6 libX11.so.6 libXext.so.6 libXt.so.6 libstdc++.so.6 libgcc_s.so.1 libc.so.6 libpthread.so.0 librt.so.1 libGL.so.1 libdl.so.2 libuuid.so.1 libxcb.so.1 libxcb-dri3.so.0 libxcb-present.so.0 libxcb-randr.so.0 libxcb-xfixes.so.0 libxcb-render.so.0 libxcb-shape.so.0 libxcb-sync.so.1 libxshmfence.so.1 libglapi.so.0 libXdamage.so.1 libXfixes.so.3 libX11-xcb.so.1 libxcb-glx.so.0 libxcb-dri2.so.0 libXxf86vm.so.1 libdrm.so.2 libXau.so.6 libXdmcp.so.6 This may be a little too liberal, and it could be that I should be bundling some of these. But it seems to work fine since the AppImage runs without problem on Kubuntu 16.04. The application also runs fine if I build VTK and the application "normally" on the Arch host and run it (using OpenGL2 backend), so the graphics adapter should be capable enough. It's just when I try to run the CentOS 6-built AppImage on the Arch host that it fails. The application essentially just creates a QVTKWidget and renders a volume into its rendering window. I saw that one (perhaps likely?) reason for glGetString(GL_VERSION) returning NULL is that initialization of the GL context failed (or wasn't fully done yet). If this is the case, does anyone know where I can debug this further in VTK? Where is the OpenGL context in VTK set up when using QVTKWidget + OpenGL2 backend? Finally: Has anyone else tried packaging VTK applications as AppImages? I know ParaView is provided as a prebuilt Linux binary with VTK bundled, so I can imagine the ParaView folks has ran into some issues like this? Thanks in advance for any advice. Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Jul 11 11:34:15 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 11 Jul 2016 17:34:15 +0200 Subject: [vtkusers] AppImage packaging: GLEW could not be initialized In-Reply-To: References: Message-ID: This is the backtrace from gdb running in Qt Creator, taken after I paused execution right after the glGetString(GL_VERSION) call in glewContextInit, which returned 0x0 into the variable "s". So this is the "reason", while I'm still looking for the cause... Elvis Thread 1 (Thread 0x7ffff7f607c0 (LWP 5261)): #0 glewContextInit () at /tmp/VTK-7.0.0/ThirdParty/glew/vtkglew/src/glew.c:10191 s = 0x0 dot = 0 major = -13760 minor = 32767 extStart = 0x7ffff06bcd58 "\252#" extEnd = 0x7a4970 "\001" #1 0x00007ffff19c2096 in glewInit () at /tmp/VTK-7.0.0/ThirdParty/glew/vtkglew/src/glew.c:14407 r = 32767 #2 0x00007ffff3cb5e48 in vtkOpenGLRenderWindow::OpenGLInitContext (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx:529 result = 0 m_valid = false lineWidthRange = {0, 0} #3 0x00007ffff3cb589f in vtkOpenGLRenderWindow::OpenGLInit (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx:318 No locals. #4 0x00007ffff3d48703 in vtkXOpenGLRenderWindow::WindowInitialize (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:971 ren = 0x0 #5 0x00007ffff3d48749 in vtkXOpenGLRenderWindow::Initialize (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:980 No locals. #6 0x00007ffff3d48b8f in vtkXOpenGLRenderWindow::Start (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:1107 No locals. #7 0x00007ffff23cc75f in vtkRenderWindow::DoStereoRender (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/Core/vtkRenderWindow.cxx:752 rsit = 0x7fffffffcc30 #8 0x00007ffff23cc72d in vtkRenderWindow::DoFDRender (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/Core/vtkRenderWindow.cxx:741 i = 1751607667 #9 0x00007ffff23cc100 in vtkRenderWindow::DoAARender (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/Core/vtkRenderWindow.cxx:620 i = 0 #10 0x00007ffff23cb6e5 in vtkRenderWindow::Render (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/Core/vtkRenderWindow.cxx:436 size = 0x6d4010 x = 0 y = 6895456 p1 = 0x6d2ca0 #11 0x00007ffff3cb63aa in vtkOpenGLRenderWindow::Render (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx:597 No locals. #12 0x00007ffff3d4b7ab in vtkXOpenGLRenderWindow::Render (this=0x6d3f90) at /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx:1853 attribs = {x = 0, y = 0, width = -188422787, height = 32767, border_width = 2, depth = 0, visual = 0x6d2b00, root = 8133696, c_class = 8128160, bit_gravity = 0, win_gravity = 0, backing_store = 0, backing_planes = 7961424, backing_pixel = 2, save_under = -188524167, colormap = 1, map_installed = 7154432, map_state = 0, all_event_masks = 42957801120, your_event_mask = 7154720, do_not_propagate_mask = 140737488342640, override_redirect = 7154720, screen = 0x693760} #13 0x00000000004139e9 in VTKWidget::paintEvent (this=0x6d2c20, event=0x7fffffffd6a0) at /tmp/insight/src/VTKWidget.cpp:37 No locals. #14 0x00007ffff59c9439 in QWidget::event(QEvent*) () from /home/estan/image/usr/lib/libQt5Widgets.so.5 No symbol table info available. #15 0x00007ffff66c53bb in QVTKWidget::event (this=0x6d2c20, e=0x7fffffffd6a0) at /tmp/VTK-7.0.0/GUISupport/Qt/QVTKWidget.cxx:396 No locals. #16 0x00007ffff5980974 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/estan/image/usr/lib/libQt5Widgets.so.5 No symbol table info available. #17 0x00007ffff598633e in QApplication::notify(QObject*, QEvent*) () from /home/estan/image/usr/lib/libQt5Widgets.so.5 No symbol table info available. #18 0x00007ffff4c28034 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/estan/image/usr/lib/libQt5Core.so.5 No symbol table info available. #19 0x00007ffff59b43d2 in QWidgetPrivate::sendPaintEvent(QRegion const&) () from /home/estan/image/usr/lib/libQt5Widgets.so.5 No symbol table info available. #20 0x00007ffff59cab8b in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /home/estan/image/usr/lib/libQt5Widgets.so.5 No symbol table info available. #21 0x00007ffff5991075 in QWidgetPrivate::repaint_sys(QRegion const&) () from /home/estan/image/usr/lib/libQt5Widgets.so.5 No symbol table info available. #22 0x00007ffff59e8efb in ?? () from /home/estan/image/usr/lib/libQt5Widgets.so.5 No symbol table info available. #23 0x00007ffff5980974 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/estan/image/usr/lib/libQt5Widgets.so.5 No symbol table info available. #24 0x00007ffff598633e in QApplication::notify(QObject*, QEvent*) () from /home/estan/image/usr/lib/libQt5Widgets.so.5 No symbol table info available. #25 0x00007ffff4c28034 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/estan/image/usr/lib/libQt5Core.so.5 No symbol table info available. #26 0x00007ffff51b7e2e in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () from /home/estan/image/usr/lib/libQt5Gui.so.5 No symbol table info available. #27 0x00007ffff51be39d in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /home/estan/image/usr/lib/libQt5Gui.so.5 No symbol table info available. #28 0x00007ffff519f5db in QWindowSystemInterface::sendWindowSystemEvents(QFlags) () from /home/estan/image/usr/lib/libQt5Gui.so.5 No symbol table info available. #29 0x00007fffe5903650 in ?? () from /home/estan/image/usr/lib/libQt5XcbQpa.so.5 No symbol table info available. #30 0x00007fffebce3642 in g_main_context_dispatch () from /home/estan/image/usr/lib/libglib-2.0.so.0 No symbol table info available. #31 0x00007fffebce7c98 in ?? () from /home/estan/image/usr/lib/libglib-2.0.so.0 No symbol table info available. #32 0x00007fffebce7e4c in g_main_context_iteration () from /home/estan/image/usr/lib/libglib-2.0.so.0 No symbol table info available. #33 0x00007ffff4c75afb in QEventDispatcherGlib::processEvents(QFlags) () from /home/estan/image/usr/lib/libQt5Core.so.5 No symbol table info available. #34 0x00007ffff4c26eab in QEventLoop::exec(QFlags) () from /home/estan/image/usr/lib/libQt5Core.so.5 No symbol table info available. #35 0x00007ffff4c2b3d0 in QCoreApplication::exec() () from /home/estan/image/usr/lib/libQt5Core.so.5 No symbol table info available. #36 0x000000000040f62b in main (argc=1, argv=0x7fffffffe678) at /tmp/insight/src/main.cpp:18 app = window = { = {}, = { = {centralWidget = 0x6d2670, verticalLayout = 0x6d24c0, sampleWidget = 0x6d2c20, menuBar = 0x6f9520, mainToolBar = 0x6f36f0, statusBar = 0x6fd320}, }, static staticMetaObject = {d = {superdata = 0x7ffff60a3ea0 , stringdata = 0x4153c0 , data = 0x415400 , static_metacall = 0x413fdc , relatedMetaObjects = 0x0, extradata = 0x0}}} 2016-07-11 17:27 GMT+02:00 Elvis Stansvik : > Hi all, > > In exploring different deployment options, I'm now trying to create an > AppImage of a VTK+Qt application. For those who don't know, AppImage is a > packaging format where the application, including (almost) all of its > dependencies are put into a self-extracting ISO image called an AppImage. > > Doing this takes quite a bit of manual work, but if you do things > correctly and build the image on a good base system (I'm using CentOS 6), > the image should run on a multitude of distros. > > I've had some success: The resulting image runs on e.g. Ubuntu Xenial. > > I'm now trying it on my Arch Linux laptop (not a common/easy target for > AppImages, but I'd like to make it work since I run it personally), and get: > > ERROR: In /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line > 533 > vtkXOpenGLRenderWindow (0x1e48140): GLEW could not be initialized. > > This is due to a glewInit() call failing during initialization of the > render window, and I've debugged it to the underlying call to > glGetString(GL_VERSION) in VTK's forked GLEW library returning NULL. > > Does anyone have an idea why this might happen? The VTK I'm using here is > configured as follows: > > cmake3 \ > -DCMAKE_INSTALL_PREFIX=/usr \ > -DVTK_Group_Qt=ON \ > -DVTK_QT_VERSION=5 \ > -DVTK_Group_Imaging=ON \ > -DVTK_Group_Views=ON \ > -DVTK_Group_MPI=OFF \ > -DVTK_Group_Tk=OFF \ > -DVTK_Group_Web=OFF \ > -DBUILD_TESTING=OFF \ > -DVTK_USE_SYSTEM_LIBRARIES=ON \ > -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ > -DCMAKE_BUILD_TYPE=Debug \ > .. > > And it uses the OpenGL2 backend. > > It was built inside a CentOS 6 Docker container on a Kubuntu 16.04 host > with HD 4400 Intel graphics adapter. The target system is an older laptop > with up-to-date Arch Linux and a weaker HD 3000 Intel graphics adapter. > > Now, packaging apps that use OpenGL is a bit tricky, because you can't > bundle e.g. libX11, libGL and some other libraries that are dependant on > the user's graphics adapter/environment. > > The libraries that I've chosen to _not_ bundle are: > > libz.so.1 > libm.so.6 > libSM.so.6 > libICE.so.6 > libX11.so.6 > libXext.so.6 > libXt.so.6 > libstdc++.so.6 > libgcc_s.so.1 > libc.so.6 > libpthread.so.0 > librt.so.1 > libGL.so.1 > libdl.so.2 > libuuid.so.1 > libxcb.so.1 > libxcb-dri3.so.0 > libxcb-present.so.0 > libxcb-randr.so.0 > libxcb-xfixes.so.0 > libxcb-render.so.0 > libxcb-shape.so.0 > libxcb-sync.so.1 > libxshmfence.so.1 > libglapi.so.0 > libXdamage.so.1 > libXfixes.so.3 > libX11-xcb.so.1 > libxcb-glx.so.0 > libxcb-dri2.so.0 > libXxf86vm.so.1 > libdrm.so.2 > libXau.so.6 > libXdmcp.so.6 > > This may be a little too liberal, and it could be that I should be > bundling some of these. But it seems to work fine since the AppImage runs > without problem on Kubuntu 16.04. > > The application also runs fine if I build VTK and the application > "normally" on the Arch host and run it (using OpenGL2 backend), so the > graphics adapter should be capable enough. It's just when I try to run the > CentOS 6-built AppImage on the Arch host that it fails. > > The application essentially just creates a QVTKWidget and renders a volume > into its rendering window. > > I saw that one (perhaps likely?) reason for glGetString(GL_VERSION) > returning NULL is that initialization of the GL context failed (or wasn't > fully done yet). If this is the case, does anyone know where I can debug > this further in VTK? Where is the OpenGL context in VTK set up when using > QVTKWidget + OpenGL2 backend? > > Finally: Has anyone else tried packaging VTK applications as AppImages? > > I know ParaView is provided as a prebuilt Linux binary with VTK bundled, > so I can imagine the ParaView folks has ran into some issues like this? > > Thanks in advance for any advice. > > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Jul 11 15:54:45 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 11 Jul 2016 21:54:45 +0200 Subject: [vtkusers] AppImage packaging: GLEW could not be initialized In-Reply-To: References: Message-ID: I now have a minimal example I can share: https://drive.google.com/open?id=0B1a2u6qVxaL7S2d3OF9uR3Q2amc This is an AppImage (hello.appimage), built just the way I build my application. It shows a sphere in a QVTKWidget. The download is 62 MB since the VTK bundled in the image includes debugging symbols. It would be great if other people could download and execute the image on their distros, to see if it runs. I've tested it only on Kubuntu 16.04 (where it works) and Arch Linux (where it crashes like described in previous mails). Specifically it would be _very_ interesting if someone with 1. Arch Linux, or 2. a somewhat old Intel graphics chipset, or (even better) 3. both of the above, could try running it, and see if they can reproduce my crash (failure to initialize GLEW). I'm attaching the sources and scripts (hello.tar.gz) from which I built this example. If you want to build it yourself, just type "make" in the extracted directory. All you need is Docker and Make, everything else is taken care of inside a CentOS 6 Docker container. Many thanks in advance. Elvis 2016-07-11 17:27 GMT+02:00 Elvis Stansvik : > Hi all, > > In exploring different deployment options, I'm now trying to create an > AppImage of a VTK+Qt application. For those who don't know, AppImage is a > packaging format where the application, including (almost) all of its > dependencies are put into a self-extracting ISO image called an AppImage. > > Doing this takes quite a bit of manual work, but if you do things > correctly and build the image on a good base system (I'm using CentOS 6), > the image should run on a multitude of distros. > > I've had some success: The resulting image runs on e.g. Ubuntu Xenial. > > I'm now trying it on my Arch Linux laptop (not a common/easy target for > AppImages, but I'd like to make it work since I run it personally), and get: > > ERROR: In /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line > 533 > vtkXOpenGLRenderWindow (0x1e48140): GLEW could not be initialized. > > This is due to a glewInit() call failing during initialization of the > render window, and I've debugged it to the underlying call to > glGetString(GL_VERSION) in VTK's forked GLEW library returning NULL. > > Does anyone have an idea why this might happen? The VTK I'm using here is > configured as follows: > > cmake3 \ > -DCMAKE_INSTALL_PREFIX=/usr \ > -DVTK_Group_Qt=ON \ > -DVTK_QT_VERSION=5 \ > -DVTK_Group_Imaging=ON \ > -DVTK_Group_Views=ON \ > -DVTK_Group_MPI=OFF \ > -DVTK_Group_Tk=OFF \ > -DVTK_Group_Web=OFF \ > -DBUILD_TESTING=OFF \ > -DVTK_USE_SYSTEM_LIBRARIES=ON \ > -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ > -DCMAKE_BUILD_TYPE=Debug \ > .. > > And it uses the OpenGL2 backend. > > It was built inside a CentOS 6 Docker container on a Kubuntu 16.04 host > with HD 4400 Intel graphics adapter. The target system is an older laptop > with up-to-date Arch Linux and a weaker HD 3000 Intel graphics adapter. > > Now, packaging apps that use OpenGL is a bit tricky, because you can't > bundle e.g. libX11, libGL and some other libraries that are dependant on > the user's graphics adapter/environment. > > The libraries that I've chosen to _not_ bundle are: > > libz.so.1 > libm.so.6 > libSM.so.6 > libICE.so.6 > libX11.so.6 > libXext.so.6 > libXt.so.6 > libstdc++.so.6 > libgcc_s.so.1 > libc.so.6 > libpthread.so.0 > librt.so.1 > libGL.so.1 > libdl.so.2 > libuuid.so.1 > libxcb.so.1 > libxcb-dri3.so.0 > libxcb-present.so.0 > libxcb-randr.so.0 > libxcb-xfixes.so.0 > libxcb-render.so.0 > libxcb-shape.so.0 > libxcb-sync.so.1 > libxshmfence.so.1 > libglapi.so.0 > libXdamage.so.1 > libXfixes.so.3 > libX11-xcb.so.1 > libxcb-glx.so.0 > libxcb-dri2.so.0 > libXxf86vm.so.1 > libdrm.so.2 > libXau.so.6 > libXdmcp.so.6 > > This may be a little too liberal, and it could be that I should be > bundling some of these. But it seems to work fine since the AppImage runs > without problem on Kubuntu 16.04. > > The application also runs fine if I build VTK and the application > "normally" on the Arch host and run it (using OpenGL2 backend), so the > graphics adapter should be capable enough. It's just when I try to run the > CentOS 6-built AppImage on the Arch host that it fails. > > The application essentially just creates a QVTKWidget and renders a volume > into its rendering window. > > I saw that one (perhaps likely?) reason for glGetString(GL_VERSION) > returning NULL is that initialization of the GL context failed (or wasn't > fully done yet). If this is the case, does anyone know where I can debug > this further in VTK? Where is the OpenGL context in VTK set up when using > QVTKWidget + OpenGL2 backend? > > Finally: Has anyone else tried packaging VTK applications as AppImages? > > I know ParaView is provided as a prebuilt Linux binary with VTK bundled, > so I can imagine the ParaView folks has ran into some issues like this? > > Thanks in advance for any advice. > > Elvis > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hello.tar.gz Type: application/x-gzip Size: 4372 bytes Desc: not available URL: From ken.martin at kitware.com Mon Jul 11 16:06:14 2016 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 11 Jul 2016 16:06:14 -0400 Subject: [vtkusers] AppImage packaging: GLEW could not be initialized In-Reply-To: References: Message-ID: glew failing to initialize typically means that opengl has not been initialized, specifically by creating an opengl context. e.g. the this->ContextId is 0. Such as around calls to glXCreateContextAttribsARB in vtkXOpenGLRenderWindow.cxx. FWIW I do not believe we support the Intel HD3000 on Linux for OpenGL2. You would need either mesa with software rendering, a more recent intel CPU, or a dedicated graphics card and driver. Ken On Mon, Jul 11, 2016 at 3:54 PM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > I now have a minimal example I can share: > > https://drive.google.com/open?id=0B1a2u6qVxaL7S2d3OF9uR3Q2amc > > This is an AppImage (hello.appimage), built just the way I build my > application. It shows a sphere in a QVTKWidget. The download is 62 MB since > the VTK bundled in the image includes debugging symbols. > > It would be great if other people could download and execute the image on > their distros, to see if it runs. I've tested it only on Kubuntu 16.04 > (where it works) and Arch Linux (where it crashes like described in > previous mails). > > Specifically it would be _very_ interesting if someone with > > 1. Arch Linux, or > 2. a somewhat old Intel graphics chipset, or (even better) > 3. both of the above, > > could try running it, and see if they can reproduce my crash (failure to > initialize GLEW). > > I'm attaching the sources and scripts (hello.tar.gz) from which I built > this example. If you want to build it yourself, just type "make" in the > extracted directory. All you need is Docker and Make, everything else is > taken care of inside a CentOS 6 Docker container. > > Many thanks in advance. > > Elvis > > 2016-07-11 17:27 GMT+02:00 Elvis Stansvik : > >> Hi all, >> >> In exploring different deployment options, I'm now trying to create an >> AppImage of a VTK+Qt application. For those who don't know, AppImage is a >> packaging format where the application, including (almost) all of its >> dependencies are put into a self-extracting ISO image called an AppImage. >> >> Doing this takes quite a bit of manual work, but if you do things >> correctly and build the image on a good base system (I'm using CentOS 6), >> the image should run on a multitude of distros. >> >> I've had some success: The resulting image runs on e.g. Ubuntu Xenial. >> >> I'm now trying it on my Arch Linux laptop (not a common/easy target for >> AppImages, but I'd like to make it work since I run it personally), and get: >> >> ERROR: In /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, >> line 533 >> vtkXOpenGLRenderWindow (0x1e48140): GLEW could not be initialized. >> >> This is due to a glewInit() call failing during initialization of the >> render window, and I've debugged it to the underlying call to >> glGetString(GL_VERSION) in VTK's forked GLEW library returning NULL. >> >> Does anyone have an idea why this might happen? The VTK I'm using here is >> configured as follows: >> >> cmake3 \ >> -DCMAKE_INSTALL_PREFIX=/usr \ >> -DVTK_Group_Qt=ON \ >> -DVTK_QT_VERSION=5 \ >> -DVTK_Group_Imaging=ON \ >> -DVTK_Group_Views=ON \ >> -DVTK_Group_MPI=OFF \ >> -DVTK_Group_Tk=OFF \ >> -DVTK_Group_Web=OFF \ >> -DBUILD_TESTING=OFF \ >> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >> -DCMAKE_BUILD_TYPE=Debug \ >> .. >> >> And it uses the OpenGL2 backend. >> >> It was built inside a CentOS 6 Docker container on a Kubuntu 16.04 host >> with HD 4400 Intel graphics adapter. The target system is an older laptop >> with up-to-date Arch Linux and a weaker HD 3000 Intel graphics adapter. >> >> Now, packaging apps that use OpenGL is a bit tricky, because you can't >> bundle e.g. libX11, libGL and some other libraries that are dependant on >> the user's graphics adapter/environment. >> >> The libraries that I've chosen to _not_ bundle are: >> >> libz.so.1 >> libm.so.6 >> libSM.so.6 >> libICE.so.6 >> libX11.so.6 >> libXext.so.6 >> libXt.so.6 >> libstdc++.so.6 >> libgcc_s.so.1 >> libc.so.6 >> libpthread.so.0 >> librt.so.1 >> libGL.so.1 >> libdl.so.2 >> libuuid.so.1 >> libxcb.so.1 >> libxcb-dri3.so.0 >> libxcb-present.so.0 >> libxcb-randr.so.0 >> libxcb-xfixes.so.0 >> libxcb-render.so.0 >> libxcb-shape.so.0 >> libxcb-sync.so.1 >> libxshmfence.so.1 >> libglapi.so.0 >> libXdamage.so.1 >> libXfixes.so.3 >> libX11-xcb.so.1 >> libxcb-glx.so.0 >> libxcb-dri2.so.0 >> libXxf86vm.so.1 >> libdrm.so.2 >> libXau.so.6 >> libXdmcp.so.6 >> >> This may be a little too liberal, and it could be that I should be >> bundling some of these. But it seems to work fine since the AppImage runs >> without problem on Kubuntu 16.04. >> >> The application also runs fine if I build VTK and the application >> "normally" on the Arch host and run it (using OpenGL2 backend), so the >> graphics adapter should be capable enough. It's just when I try to run the >> CentOS 6-built AppImage on the Arch host that it fails. >> >> The application essentially just creates a QVTKWidget and renders a >> volume into its rendering window. >> >> I saw that one (perhaps likely?) reason for glGetString(GL_VERSION) >> returning NULL is that initialization of the GL context failed (or wasn't >> fully done yet). If this is the case, does anyone know where I can debug >> this further in VTK? Where is the OpenGL context in VTK set up when using >> QVTKWidget + OpenGL2 backend? >> >> Finally: Has anyone else tried packaging VTK applications as AppImages? >> >> I know ParaView is provided as a prebuilt Linux binary with VTK bundled, >> so I can imagine the ParaView folks has ran into some issues like this? >> >> Thanks in advance for any advice. >> >> Elvis >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Jul 11 16:14:53 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 11 Jul 2016 22:14:53 +0200 Subject: [vtkusers] AppImage packaging: GLEW could not be initialized In-Reply-To: References: Message-ID: 2016-07-11 22:06 GMT+02:00 Ken Martin : > glew failing to initialize typically means that opengl has not been > initialized, specifically by creating an opengl context. e.g. the > this->ContextId is 0. Such as around calls to > > glXCreateContextAttribsARB > > in vtkXOpenGLRenderWindow.cxx. > Ah, thanks for the pointers. I'll dig around. > > > FWIW I do not believe we support the Intel HD3000 on Linux for OpenGL2. > You would need either mesa with software rendering, a more recent intel > CPU, or a dedicated graphics card and driver. > Hm, but the application runs fine if it's built on the machine itself. I only have this problem with the AppImage (so I think it has something to do with how I build/package it as such). It's a Thinkpad X220 (Sandybridge) with HD 3000 graphics, running 11.2.2 and the 2.99.917+668+gc28e62f version of the intel driver. When I run it like this (built on the target laptop), the VTK 7.0.0 I use is configured with for lib in EXPAT FREETYPE JPEG PNG TIFF ZLIB LIBXML2 OGGTHEORA TWISTED ZOPE SIX AUTOBAHN MPI4PY JSONCPP GLEW GL2PS; do cmake_system_flags+="-DVTK_USE_SYSTEM_${lib}:BOOL=ON " done cmake \ -Wno-dev \ -DCMAKE_SKIP_RPATH=ON \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \ -DBUILD_DOCUMENTATION:BOOL=ON \ -DDOCUMENTATION_HTML_HELP:BOOL=ON \ -DDOCUMENTATION_HTML_TARZ:BOOL=ON \ -DBUILD_EXAMPLES:BOOL=ON \ -DVTK_USE_FFMPEG_ENCODER:BOOL=ON \ -DVTK_BUILD_ALL_MODULES:BOOL=ON \ -DVTK_USE_LARGE_DATA:BOOL=ON \ -DVTK_QT_VERSION:STRING="5" \ -DVTK_WRAP_JAVA:BOOL=ON \ -DVTK_WRAP_PYTHON:BOOL=ON \ -DVTK_WRAP_TCL:BOOL=ON \ -DCMAKE_CXX_FLAGS="-D__STDC_CONSTANT_MACROS" \ -DVTK_CUSTOM_LIBRARY_SUFFIX="" \ -DVTK_INSTALL_INCLUDE_DIR:PATH=include/vtk \ -DVTK_INSTALL_TCL_DIR=/usr/lib/tcl${_tkver}/vtk/ \ -DVTK_PYTHON_VERSION=3 \ -DPYTHON_EXECUTABLE=/usr/bin/python3 \ -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m \ -DPYTHON_LIBRARY=/usr/lib/libpython3.5m.so \ -DVTK_USE_SYSTEM_HDF5=OFF \ ${cmake_system_flags} \ -DCMAKE_BUILD_TYPE=Release \ "${srcdir}/VTK-$pkgver" \ -GNinja and so uses the OpenGL2 backend. But you're saying this shouldn't really work? Elvis > > Ken > > > > > On Mon, Jul 11, 2016 at 3:54 PM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> I now have a minimal example I can share: >> >> https://drive.google.com/open?id=0B1a2u6qVxaL7S2d3OF9uR3Q2amc >> >> This is an AppImage (hello.appimage), built just the way I build my >> application. It shows a sphere in a QVTKWidget. The download is 62 MB since >> the VTK bundled in the image includes debugging symbols. >> >> It would be great if other people could download and execute the image on >> their distros, to see if it runs. I've tested it only on Kubuntu 16.04 >> (where it works) and Arch Linux (where it crashes like described in >> previous mails). >> >> Specifically it would be _very_ interesting if someone with >> >> 1. Arch Linux, or >> 2. a somewhat old Intel graphics chipset, or (even better) >> 3. both of the above, >> >> could try running it, and see if they can reproduce my crash (failure to >> initialize GLEW). >> >> I'm attaching the sources and scripts (hello.tar.gz) from which I built >> this example. If you want to build it yourself, just type "make" in the >> extracted directory. All you need is Docker and Make, everything else is >> taken care of inside a CentOS 6 Docker container. >> >> Many thanks in advance. >> >> Elvis >> >> 2016-07-11 17:27 GMT+02:00 Elvis Stansvik : >> >>> Hi all, >>> >>> In exploring different deployment options, I'm now trying to create an >>> AppImage of a VTK+Qt application. For those who don't know, AppImage is a >>> packaging format where the application, including (almost) all of its >>> dependencies are put into a self-extracting ISO image called an AppImage. >>> >>> Doing this takes quite a bit of manual work, but if you do things >>> correctly and build the image on a good base system (I'm using CentOS 6), >>> the image should run on a multitude of distros. >>> >>> I've had some success: The resulting image runs on e.g. Ubuntu Xenial. >>> >>> I'm now trying it on my Arch Linux laptop (not a common/easy target for >>> AppImages, but I'd like to make it work since I run it personally), and get: >>> >>> ERROR: In /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, >>> line 533 >>> vtkXOpenGLRenderWindow (0x1e48140): GLEW could not be initialized. >>> >>> This is due to a glewInit() call failing during initialization of the >>> render window, and I've debugged it to the underlying call to >>> glGetString(GL_VERSION) in VTK's forked GLEW library returning NULL. >>> >>> Does anyone have an idea why this might happen? The VTK I'm using here >>> is configured as follows: >>> >>> cmake3 \ >>> -DCMAKE_INSTALL_PREFIX=/usr \ >>> -DVTK_Group_Qt=ON \ >>> -DVTK_QT_VERSION=5 \ >>> -DVTK_Group_Imaging=ON \ >>> -DVTK_Group_Views=ON \ >>> -DVTK_Group_MPI=OFF \ >>> -DVTK_Group_Tk=OFF \ >>> -DVTK_Group_Web=OFF \ >>> -DBUILD_TESTING=OFF \ >>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>> -DCMAKE_BUILD_TYPE=Debug \ >>> .. >>> >>> And it uses the OpenGL2 backend. >>> >>> It was built inside a CentOS 6 Docker container on a Kubuntu 16.04 host >>> with HD 4400 Intel graphics adapter. The target system is an older laptop >>> with up-to-date Arch Linux and a weaker HD 3000 Intel graphics adapter. >>> >>> Now, packaging apps that use OpenGL is a bit tricky, because you can't >>> bundle e.g. libX11, libGL and some other libraries that are dependant on >>> the user's graphics adapter/environment. >>> >>> The libraries that I've chosen to _not_ bundle are: >>> >>> libz.so.1 >>> libm.so.6 >>> libSM.so.6 >>> libICE.so.6 >>> libX11.so.6 >>> libXext.so.6 >>> libXt.so.6 >>> libstdc++.so.6 >>> libgcc_s.so.1 >>> libc.so.6 >>> libpthread.so.0 >>> librt.so.1 >>> libGL.so.1 >>> libdl.so.2 >>> libuuid.so.1 >>> libxcb.so.1 >>> libxcb-dri3.so.0 >>> libxcb-present.so.0 >>> libxcb-randr.so.0 >>> libxcb-xfixes.so.0 >>> libxcb-render.so.0 >>> libxcb-shape.so.0 >>> libxcb-sync.so.1 >>> libxshmfence.so.1 >>> libglapi.so.0 >>> libXdamage.so.1 >>> libXfixes.so.3 >>> libX11-xcb.so.1 >>> libxcb-glx.so.0 >>> libxcb-dri2.so.0 >>> libXxf86vm.so.1 >>> libdrm.so.2 >>> libXau.so.6 >>> libXdmcp.so.6 >>> >>> This may be a little too liberal, and it could be that I should be >>> bundling some of these. But it seems to work fine since the AppImage runs >>> without problem on Kubuntu 16.04. >>> >>> The application also runs fine if I build VTK and the application >>> "normally" on the Arch host and run it (using OpenGL2 backend), so the >>> graphics adapter should be capable enough. It's just when I try to run the >>> CentOS 6-built AppImage on the Arch host that it fails. >>> >>> The application essentially just creates a QVTKWidget and renders a >>> volume into its rendering window. >>> >>> I saw that one (perhaps likely?) reason for glGetString(GL_VERSION) >>> returning NULL is that initialization of the GL context failed (or wasn't >>> fully done yet). If this is the case, does anyone know where I can debug >>> this further in VTK? Where is the OpenGL context in VTK set up when using >>> QVTKWidget + OpenGL2 backend? >>> >>> Finally: Has anyone else tried packaging VTK applications as AppImages? >>> >>> I know ParaView is provided as a prebuilt Linux binary with VTK bundled, >>> so I can imagine the ParaView folks has ran into some issues like this? >>> >>> Thanks in advance for any advice. >>> >>> Elvis >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Jul 11 16:15:37 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 11 Jul 2016 22:15:37 +0200 Subject: [vtkusers] AppImage packaging: GLEW could not be initialized In-Reply-To: References: Message-ID: 2016-07-11 22:14 GMT+02:00 Elvis Stansvik : > 2016-07-11 22:06 GMT+02:00 Ken Martin : > >> glew failing to initialize typically means that opengl has not been >> initialized, specifically by creating an opengl context. e.g. the >> this->ContextId is 0. Such as around calls to >> >> glXCreateContextAttribsARB >> >> in vtkXOpenGLRenderWindow.cxx. >> > > Ah, thanks for the pointers. I'll dig around. > > >> >> >> FWIW I do not believe we support the Intel HD3000 on Linux for OpenGL2. >> You would need either mesa with software rendering, a more recent intel >> CPU, or a dedicated graphics card and driver. >> > > Hm, but the application runs fine if it's built on the machine itself. I > only have this problem with the AppImage (so I think it has something to do > with how I build/package it as such). It's a Thinkpad X220 (Sandybridge) > with HD 3000 graphics, running 11.2.2 and the > *running Mesa 11.2.2. Elvis 2.99.917+668+gc28e62f version of the intel driver. > > When I run it like this (built on the target laptop), the VTK 7.0.0 I use > is configured with > > for lib in EXPAT FREETYPE JPEG PNG TIFF ZLIB LIBXML2 OGGTHEORA TWISTED > ZOPE SIX AUTOBAHN MPI4PY JSONCPP GLEW GL2PS; do > cmake_system_flags+="-DVTK_USE_SYSTEM_${lib}:BOOL=ON " > done > > cmake \ > -Wno-dev \ > -DCMAKE_SKIP_RPATH=ON \ > -DBUILD_SHARED_LIBS:BOOL=ON \ > -DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \ > -DBUILD_DOCUMENTATION:BOOL=ON \ > -DDOCUMENTATION_HTML_HELP:BOOL=ON \ > -DDOCUMENTATION_HTML_TARZ:BOOL=ON \ > -DBUILD_EXAMPLES:BOOL=ON \ > -DVTK_USE_FFMPEG_ENCODER:BOOL=ON \ > -DVTK_BUILD_ALL_MODULES:BOOL=ON \ > -DVTK_USE_LARGE_DATA:BOOL=ON \ > -DVTK_QT_VERSION:STRING="5" \ > -DVTK_WRAP_JAVA:BOOL=ON \ > -DVTK_WRAP_PYTHON:BOOL=ON \ > -DVTK_WRAP_TCL:BOOL=ON \ > -DCMAKE_CXX_FLAGS="-D__STDC_CONSTANT_MACROS" \ > -DVTK_CUSTOM_LIBRARY_SUFFIX="" \ > -DVTK_INSTALL_INCLUDE_DIR:PATH=include/vtk \ > -DVTK_INSTALL_TCL_DIR=/usr/lib/tcl${_tkver}/vtk/ \ > -DVTK_PYTHON_VERSION=3 \ > -DPYTHON_EXECUTABLE=/usr/bin/python3 \ > -DPYTHON_INCLUDE_DIR=/usr/include/python3.5m \ > -DPYTHON_LIBRARY=/usr/lib/libpython3.5m.so \ > -DVTK_USE_SYSTEM_HDF5=OFF \ > ${cmake_system_flags} \ > -DCMAKE_BUILD_TYPE=Release \ > "${srcdir}/VTK-$pkgver" \ > -GNinja > > and so uses the OpenGL2 backend. > > But you're saying this shouldn't really work? > > Elvis > > >> >> Ken >> >> >> >> >> On Mon, Jul 11, 2016 at 3:54 PM, Elvis Stansvik < >> elvis.stansvik at orexplore.com> wrote: >> >>> I now have a minimal example I can share: >>> >>> https://drive.google.com/open?id=0B1a2u6qVxaL7S2d3OF9uR3Q2amc >>> >>> This is an AppImage (hello.appimage), built just the way I build my >>> application. It shows a sphere in a QVTKWidget. The download is 62 MB since >>> the VTK bundled in the image includes debugging symbols. >>> >>> It would be great if other people could download and execute the image >>> on their distros, to see if it runs. I've tested it only on Kubuntu 16.04 >>> (where it works) and Arch Linux (where it crashes like described in >>> previous mails). >>> >>> Specifically it would be _very_ interesting if someone with >>> >>> 1. Arch Linux, or >>> 2. a somewhat old Intel graphics chipset, or (even better) >>> 3. both of the above, >>> >>> could try running it, and see if they can reproduce my crash (failure to >>> initialize GLEW). >>> >>> I'm attaching the sources and scripts (hello.tar.gz) from which I built >>> this example. If you want to build it yourself, just type "make" in the >>> extracted directory. All you need is Docker and Make, everything else is >>> taken care of inside a CentOS 6 Docker container. >>> >>> Many thanks in advance. >>> >>> Elvis >>> >>> 2016-07-11 17:27 GMT+02:00 Elvis Stansvik >>> : >>> >>>> Hi all, >>>> >>>> In exploring different deployment options, I'm now trying to create an >>>> AppImage of a VTK+Qt application. For those who don't know, AppImage is a >>>> packaging format where the application, including (almost) all of its >>>> dependencies are put into a self-extracting ISO image called an AppImage. >>>> >>>> Doing this takes quite a bit of manual work, but if you do things >>>> correctly and build the image on a good base system (I'm using CentOS 6), >>>> the image should run on a multitude of distros. >>>> >>>> I've had some success: The resulting image runs on e.g. Ubuntu Xenial. >>>> >>>> I'm now trying it on my Arch Linux laptop (not a common/easy target for >>>> AppImages, but I'd like to make it work since I run it personally), and get: >>>> >>>> ERROR: In /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, >>>> line 533 >>>> vtkXOpenGLRenderWindow (0x1e48140): GLEW could not be initialized. >>>> >>>> This is due to a glewInit() call failing during initialization of the >>>> render window, and I've debugged it to the underlying call to >>>> glGetString(GL_VERSION) in VTK's forked GLEW library returning NULL. >>>> >>>> Does anyone have an idea why this might happen? The VTK I'm using here >>>> is configured as follows: >>>> >>>> cmake3 \ >>>> -DCMAKE_INSTALL_PREFIX=/usr \ >>>> -DVTK_Group_Qt=ON \ >>>> -DVTK_QT_VERSION=5 \ >>>> -DVTK_Group_Imaging=ON \ >>>> -DVTK_Group_Views=ON \ >>>> -DVTK_Group_MPI=OFF \ >>>> -DVTK_Group_Tk=OFF \ >>>> -DVTK_Group_Web=OFF \ >>>> -DBUILD_TESTING=OFF \ >>>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>>> -DCMAKE_BUILD_TYPE=Debug \ >>>> .. >>>> >>>> And it uses the OpenGL2 backend. >>>> >>>> It was built inside a CentOS 6 Docker container on a Kubuntu 16.04 host >>>> with HD 4400 Intel graphics adapter. The target system is an older laptop >>>> with up-to-date Arch Linux and a weaker HD 3000 Intel graphics adapter. >>>> >>>> Now, packaging apps that use OpenGL is a bit tricky, because you can't >>>> bundle e.g. libX11, libGL and some other libraries that are dependant on >>>> the user's graphics adapter/environment. >>>> >>>> The libraries that I've chosen to _not_ bundle are: >>>> >>>> libz.so.1 >>>> libm.so.6 >>>> libSM.so.6 >>>> libICE.so.6 >>>> libX11.so.6 >>>> libXext.so.6 >>>> libXt.so.6 >>>> libstdc++.so.6 >>>> libgcc_s.so.1 >>>> libc.so.6 >>>> libpthread.so.0 >>>> librt.so.1 >>>> libGL.so.1 >>>> libdl.so.2 >>>> libuuid.so.1 >>>> libxcb.so.1 >>>> libxcb-dri3.so.0 >>>> libxcb-present.so.0 >>>> libxcb-randr.so.0 >>>> libxcb-xfixes.so.0 >>>> libxcb-render.so.0 >>>> libxcb-shape.so.0 >>>> libxcb-sync.so.1 >>>> libxshmfence.so.1 >>>> libglapi.so.0 >>>> libXdamage.so.1 >>>> libXfixes.so.3 >>>> libX11-xcb.so.1 >>>> libxcb-glx.so.0 >>>> libxcb-dri2.so.0 >>>> libXxf86vm.so.1 >>>> libdrm.so.2 >>>> libXau.so.6 >>>> libXdmcp.so.6 >>>> >>>> This may be a little too liberal, and it could be that I should be >>>> bundling some of these. But it seems to work fine since the AppImage runs >>>> without problem on Kubuntu 16.04. >>>> >>>> The application also runs fine if I build VTK and the application >>>> "normally" on the Arch host and run it (using OpenGL2 backend), so the >>>> graphics adapter should be capable enough. It's just when I try to run the >>>> CentOS 6-built AppImage on the Arch host that it fails. >>>> >>>> The application essentially just creates a QVTKWidget and renders a >>>> volume into its rendering window. >>>> >>>> I saw that one (perhaps likely?) reason for glGetString(GL_VERSION) >>>> returning NULL is that initialization of the GL context failed (or wasn't >>>> fully done yet). If this is the case, does anyone know where I can debug >>>> this further in VTK? Where is the OpenGL context in VTK set up when using >>>> QVTKWidget + OpenGL2 backend? >>>> >>>> Finally: Has anyone else tried packaging VTK applications as AppImages? >>>> >>>> I know ParaView is provided as a prebuilt Linux binary with VTK >>>> bundled, so I can imagine the ParaView folks has ran into some issues like >>>> this? >>>> >>>> Thanks in advance for any advice. >>>> >>>> Elvis >>>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Ken Martin PhD >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Jul 11 16:33:22 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 11 Jul 2016 22:33:22 +0200 Subject: [vtkusers] AppImage packaging: GLEW could not be initialized In-Reply-To: References: Message-ID: 2016-07-11 22:06 GMT+02:00 Ken Martin : > glew failing to initialize typically means that opengl has not been > initialized, specifically by creating an opengl context. e.g. the > this->ContextId is 0. Such as around calls to > > glXCreateContextAttribsARB > I can confirm that this one is returning a 0 ContextId :( It makes me wonder why it works if I build + run on the target, but not when I run my AppImage-packaged version (which is built on CentOS 6 and includes a bundled VTK, similarly built). Ideas for debugging further are greatly appreciated. Elvis > > in vtkXOpenGLRenderWindow.cxx. > > > FWIW I do not believe we support the Intel HD3000 on Linux for OpenGL2. > You would need either mesa with software rendering, a more recent intel > CPU, or a dedicated graphics card and driver. > > Ken > > > > > On Mon, Jul 11, 2016 at 3:54 PM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > >> I now have a minimal example I can share: >> >> https://drive.google.com/open?id=0B1a2u6qVxaL7S2d3OF9uR3Q2amc >> >> This is an AppImage (hello.appimage), built just the way I build my >> application. It shows a sphere in a QVTKWidget. The download is 62 MB since >> the VTK bundled in the image includes debugging symbols. >> >> It would be great if other people could download and execute the image on >> their distros, to see if it runs. I've tested it only on Kubuntu 16.04 >> (where it works) and Arch Linux (where it crashes like described in >> previous mails). >> >> Specifically it would be _very_ interesting if someone with >> >> 1. Arch Linux, or >> 2. a somewhat old Intel graphics chipset, or (even better) >> 3. both of the above, >> >> could try running it, and see if they can reproduce my crash (failure to >> initialize GLEW). >> >> I'm attaching the sources and scripts (hello.tar.gz) from which I built >> this example. If you want to build it yourself, just type "make" in the >> extracted directory. All you need is Docker and Make, everything else is >> taken care of inside a CentOS 6 Docker container. >> >> Many thanks in advance. >> >> Elvis >> >> 2016-07-11 17:27 GMT+02:00 Elvis Stansvik : >> >>> Hi all, >>> >>> In exploring different deployment options, I'm now trying to create an >>> AppImage of a VTK+Qt application. For those who don't know, AppImage is a >>> packaging format where the application, including (almost) all of its >>> dependencies are put into a self-extracting ISO image called an AppImage. >>> >>> Doing this takes quite a bit of manual work, but if you do things >>> correctly and build the image on a good base system (I'm using CentOS 6), >>> the image should run on a multitude of distros. >>> >>> I've had some success: The resulting image runs on e.g. Ubuntu Xenial. >>> >>> I'm now trying it on my Arch Linux laptop (not a common/easy target for >>> AppImages, but I'd like to make it work since I run it personally), and get: >>> >>> ERROR: In /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, >>> line 533 >>> vtkXOpenGLRenderWindow (0x1e48140): GLEW could not be initialized. >>> >>> This is due to a glewInit() call failing during initialization of the >>> render window, and I've debugged it to the underlying call to >>> glGetString(GL_VERSION) in VTK's forked GLEW library returning NULL. >>> >>> Does anyone have an idea why this might happen? The VTK I'm using here >>> is configured as follows: >>> >>> cmake3 \ >>> -DCMAKE_INSTALL_PREFIX=/usr \ >>> -DVTK_Group_Qt=ON \ >>> -DVTK_QT_VERSION=5 \ >>> -DVTK_Group_Imaging=ON \ >>> -DVTK_Group_Views=ON \ >>> -DVTK_Group_MPI=OFF \ >>> -DVTK_Group_Tk=OFF \ >>> -DVTK_Group_Web=OFF \ >>> -DBUILD_TESTING=OFF \ >>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>> -DCMAKE_BUILD_TYPE=Debug \ >>> .. >>> >>> And it uses the OpenGL2 backend. >>> >>> It was built inside a CentOS 6 Docker container on a Kubuntu 16.04 host >>> with HD 4400 Intel graphics adapter. The target system is an older laptop >>> with up-to-date Arch Linux and a weaker HD 3000 Intel graphics adapter. >>> >>> Now, packaging apps that use OpenGL is a bit tricky, because you can't >>> bundle e.g. libX11, libGL and some other libraries that are dependant on >>> the user's graphics adapter/environment. >>> >>> The libraries that I've chosen to _not_ bundle are: >>> >>> libz.so.1 >>> libm.so.6 >>> libSM.so.6 >>> libICE.so.6 >>> libX11.so.6 >>> libXext.so.6 >>> libXt.so.6 >>> libstdc++.so.6 >>> libgcc_s.so.1 >>> libc.so.6 >>> libpthread.so.0 >>> librt.so.1 >>> libGL.so.1 >>> libdl.so.2 >>> libuuid.so.1 >>> libxcb.so.1 >>> libxcb-dri3.so.0 >>> libxcb-present.so.0 >>> libxcb-randr.so.0 >>> libxcb-xfixes.so.0 >>> libxcb-render.so.0 >>> libxcb-shape.so.0 >>> libxcb-sync.so.1 >>> libxshmfence.so.1 >>> libglapi.so.0 >>> libXdamage.so.1 >>> libXfixes.so.3 >>> libX11-xcb.so.1 >>> libxcb-glx.so.0 >>> libxcb-dri2.so.0 >>> libXxf86vm.so.1 >>> libdrm.so.2 >>> libXau.so.6 >>> libXdmcp.so.6 >>> >>> This may be a little too liberal, and it could be that I should be >>> bundling some of these. But it seems to work fine since the AppImage runs >>> without problem on Kubuntu 16.04. >>> >>> The application also runs fine if I build VTK and the application >>> "normally" on the Arch host and run it (using OpenGL2 backend), so the >>> graphics adapter should be capable enough. It's just when I try to run the >>> CentOS 6-built AppImage on the Arch host that it fails. >>> >>> The application essentially just creates a QVTKWidget and renders a >>> volume into its rendering window. >>> >>> I saw that one (perhaps likely?) reason for glGetString(GL_VERSION) >>> returning NULL is that initialization of the GL context failed (or wasn't >>> fully done yet). If this is the case, does anyone know where I can debug >>> this further in VTK? Where is the OpenGL context in VTK set up when using >>> QVTKWidget + OpenGL2 backend? >>> >>> Finally: Has anyone else tried packaging VTK applications as AppImages? >>> >>> I know ParaView is provided as a prebuilt Linux binary with VTK bundled, >>> so I can imagine the ParaView folks has ran into some issues like this? >>> >>> Thanks in advance for any advice. >>> >>> Elvis >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Jul 12 11:36:47 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 12 Jul 2016 17:36:47 +0200 Subject: [vtkusers] AppImage packaging: GLEW could not be initialized In-Reply-To: References: Message-ID: 2016-07-11 22:33 GMT+02:00 Elvis Stansvik : > 2016-07-11 22:06 GMT+02:00 Ken Martin : > >> glew failing to initialize typically means that opengl has not been >> initialized, specifically by creating an opengl context. e.g. the >> this->ContextId is 0. Such as around calls to >> >> glXCreateContextAttribsARB >> > > I can confirm that this one is returning a 0 ContextId :( It makes me > wonder why it works if I build + run on the target, but not when I run my > AppImage-packaged version (which is built on CentOS 6 and includes a > bundled VTK, similarly built). Ideas for debugging further are greatly > appreciated. > After some more testing, where I've been running the image in various Docker containers on the build host (Ubuntu 16.04, Debian 8.5 and OpenSUSE 13.2 all worked), I ran into the crash again on Fedora 24. But note that this time it was running on the build host, which has Haswell graphics. So I'm suspecting the reason for the failure has something to do with library versions. Perhaps I'm too aggressive with excluding some things when I'm bundling the libraries, and that this causes issues on Arch and Fedora 24, since they have very recent library versions? The list of libraries I chose not to bundle is in my original mail. Anyone who can spot something they think I really should be bundling? I obviously can't bundle libX11 and libGL, but have I been to vigorous in excluding some of the other related libraries? Elvis > > Elvis > > >> >> in vtkXOpenGLRenderWindow.cxx. >> >> >> FWIW I do not believe we support the Intel HD3000 on Linux for OpenGL2. >> You would need either mesa with software rendering, a more recent intel >> CPU, or a dedicated graphics card and driver. >> >> Ken >> >> >> >> >> On Mon, Jul 11, 2016 at 3:54 PM, Elvis Stansvik < >> elvis.stansvik at orexplore.com> wrote: >> >>> I now have a minimal example I can share: >>> >>> https://drive.google.com/open?id=0B1a2u6qVxaL7S2d3OF9uR3Q2amc >>> >>> This is an AppImage (hello.appimage), built just the way I build my >>> application. It shows a sphere in a QVTKWidget. The download is 62 MB since >>> the VTK bundled in the image includes debugging symbols. >>> >>> It would be great if other people could download and execute the image >>> on their distros, to see if it runs. I've tested it only on Kubuntu 16.04 >>> (where it works) and Arch Linux (where it crashes like described in >>> previous mails). >>> >>> Specifically it would be _very_ interesting if someone with >>> >>> 1. Arch Linux, or >>> 2. a somewhat old Intel graphics chipset, or (even better) >>> 3. both of the above, >>> >>> could try running it, and see if they can reproduce my crash (failure to >>> initialize GLEW). >>> >>> I'm attaching the sources and scripts (hello.tar.gz) from which I built >>> this example. If you want to build it yourself, just type "make" in the >>> extracted directory. All you need is Docker and Make, everything else is >>> taken care of inside a CentOS 6 Docker container. >>> >>> Many thanks in advance. >>> >>> Elvis >>> >>> 2016-07-11 17:27 GMT+02:00 Elvis Stansvik >>> : >>> >>>> Hi all, >>>> >>>> In exploring different deployment options, I'm now trying to create an >>>> AppImage of a VTK+Qt application. For those who don't know, AppImage is a >>>> packaging format where the application, including (almost) all of its >>>> dependencies are put into a self-extracting ISO image called an AppImage. >>>> >>>> Doing this takes quite a bit of manual work, but if you do things >>>> correctly and build the image on a good base system (I'm using CentOS 6), >>>> the image should run on a multitude of distros. >>>> >>>> I've had some success: The resulting image runs on e.g. Ubuntu Xenial. >>>> >>>> I'm now trying it on my Arch Linux laptop (not a common/easy target for >>>> AppImages, but I'd like to make it work since I run it personally), and get: >>>> >>>> ERROR: In /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, >>>> line 533 >>>> vtkXOpenGLRenderWindow (0x1e48140): GLEW could not be initialized. >>>> >>>> This is due to a glewInit() call failing during initialization of the >>>> render window, and I've debugged it to the underlying call to >>>> glGetString(GL_VERSION) in VTK's forked GLEW library returning NULL. >>>> >>>> Does anyone have an idea why this might happen? The VTK I'm using here >>>> is configured as follows: >>>> >>>> cmake3 \ >>>> -DCMAKE_INSTALL_PREFIX=/usr \ >>>> -DVTK_Group_Qt=ON \ >>>> -DVTK_QT_VERSION=5 \ >>>> -DVTK_Group_Imaging=ON \ >>>> -DVTK_Group_Views=ON \ >>>> -DVTK_Group_MPI=OFF \ >>>> -DVTK_Group_Tk=OFF \ >>>> -DVTK_Group_Web=OFF \ >>>> -DBUILD_TESTING=OFF \ >>>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>>> -DCMAKE_BUILD_TYPE=Debug \ >>>> .. >>>> >>>> And it uses the OpenGL2 backend. >>>> >>>> It was built inside a CentOS 6 Docker container on a Kubuntu 16.04 host >>>> with HD 4400 Intel graphics adapter. The target system is an older laptop >>>> with up-to-date Arch Linux and a weaker HD 3000 Intel graphics adapter. >>>> >>>> Now, packaging apps that use OpenGL is a bit tricky, because you can't >>>> bundle e.g. libX11, libGL and some other libraries that are dependant on >>>> the user's graphics adapter/environment. >>>> >>>> The libraries that I've chosen to _not_ bundle are: >>>> >>>> libz.so.1 >>>> libm.so.6 >>>> libSM.so.6 >>>> libICE.so.6 >>>> libX11.so.6 >>>> libXext.so.6 >>>> libXt.so.6 >>>> libstdc++.so.6 >>>> libgcc_s.so.1 >>>> libc.so.6 >>>> libpthread.so.0 >>>> librt.so.1 >>>> libGL.so.1 >>>> libdl.so.2 >>>> libuuid.so.1 >>>> libxcb.so.1 >>>> libxcb-dri3.so.0 >>>> libxcb-present.so.0 >>>> libxcb-randr.so.0 >>>> libxcb-xfixes.so.0 >>>> libxcb-render.so.0 >>>> libxcb-shape.so.0 >>>> libxcb-sync.so.1 >>>> libxshmfence.so.1 >>>> libglapi.so.0 >>>> libXdamage.so.1 >>>> libXfixes.so.3 >>>> libX11-xcb.so.1 >>>> libxcb-glx.so.0 >>>> libxcb-dri2.so.0 >>>> libXxf86vm.so.1 >>>> libdrm.so.2 >>>> libXau.so.6 >>>> libXdmcp.so.6 >>>> >>>> This may be a little too liberal, and it could be that I should be >>>> bundling some of these. But it seems to work fine since the AppImage runs >>>> without problem on Kubuntu 16.04. >>>> >>>> The application also runs fine if I build VTK and the application >>>> "normally" on the Arch host and run it (using OpenGL2 backend), so the >>>> graphics adapter should be capable enough. It's just when I try to run the >>>> CentOS 6-built AppImage on the Arch host that it fails. >>>> >>>> The application essentially just creates a QVTKWidget and renders a >>>> volume into its rendering window. >>>> >>>> I saw that one (perhaps likely?) reason for glGetString(GL_VERSION) >>>> returning NULL is that initialization of the GL context failed (or wasn't >>>> fully done yet). If this is the case, does anyone know where I can debug >>>> this further in VTK? Where is the OpenGL context in VTK set up when using >>>> QVTKWidget + OpenGL2 backend? >>>> >>>> Finally: Has anyone else tried packaging VTK applications as AppImages? >>>> >>>> I know ParaView is provided as a prebuilt Linux binary with VTK >>>> bundled, so I can imagine the ParaView folks has ran into some issues like >>>> this? >>>> >>>> Thanks in advance for any advice. >>>> >>>> Elvis >>>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Ken Martin PhD >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Tue Jul 12 11:57:29 2016 From: tjlp at netease.com (Liu_tj) Date: Tue, 12 Jul 2016 23:57:29 +0800 (CST) Subject: [vtkusers] How to get CT value of a point on DICOM image Message-ID: <2ee816e6.a.155dfd3d3c8.Coremail.tjlp@netease.com> Hi, VTK guys, I used vtkImageViewer2 to display DICOM series. I want to display the CT value of a point when mouse moves. How to achieve that? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Tue Jul 12 11:59:37 2016 From: tjlp at netease.com (Liu_tj) Date: Tue, 12 Jul 2016 23:59:37 +0800 (CST) Subject: [vtkusers] How to save the line, point distance, angle I draw on 3D model? Message-ID: <7e31f525.c.155dfd5c9dc.Coremail.tjlp@netease.com> Hi, VTK guys, I generated a 3D model for DICOM series. And I might draw some lines, point distance label, angle, etc on the 3D model. How can I save all the objects I draw with the 3D model? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From edrecon at gmail.com Tue Jul 12 15:46:24 2016 From: edrecon at gmail.com (=?UTF-8?Q?Edson_Contreras_C=C3=A1rdenas?=) Date: Tue, 12 Jul 2016 15:46:24 -0400 Subject: [vtkusers] Somehow mesa-12 first rendering is slow Message-ID: Hello world, I'm trying to get running my application with VTK-7.0-OpenGL2 and mesa-12.0 and it gets slow with the first render. (after I call m_renderer->Render() it takes 5-7 seconds to show the image and after that everything goes smooth and ok) The thing is that I try Chuck's libGL.so (paraview pre-built binary) and it takes a second or maybe 2 seconds performing the same action, with the same actors. I'm building mesa-12.0 with the following configuration: (same that Chuck sent me in a mesa-users thread) OS = RHEL6.6 CC = gcc(5.2.0) CXX = g++(5.2.0) BASELIBS_PREFIX=/remote/sharedLibs ../mesa-12.0.0/configure \ --with-llvm-prefix=${BASELIBS_PREFIX}/llvm-3.8 \ --enable-opengl --disable-gles1 --disable-gles2 \ --disable-va --disable-gbm --disable-xvmc --disable-vdpau \ --enable-shared-glapi \ --disable-texture-float \ --disable-dri --with-dri-drivers= \ --enable-gallium-llvm --disable-llvm-shared-libs \ --with-gallium-drivers=swrast,swr \ --disable-egl --disable-gbm --with-egl-platforms= \ --enable-gallium-osmesa \ --enable-glx \ --prefix=${BASELIBS_PREFIX}/mesa-12.0 edsonc at mesa-tests:~> setenv LD_LIBRARY_PATH ${BASELIBS_PREFIX}/mesa-12.0/lib:${LD_LIBRARY_PATH} edsonc at mesa-tests:~> glxinfo | grep -i opengl OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 128 bits) OpenGL version string: 3.2 (Core Profile) Mesa 12.0.0 OpenGL shading language version string: 3.30 OpenGL extensions: My guess is that I'm building wrong llvm-3.8 library. In any case, I also add the flags of how I built it. ../llvm-3.8.0.src/configure \ --prefix=${BASELIBS_PREFIX}/llvm-3.8 \ --disable-shared \ --enable-optimized \ --enable-cxx1y The prebuilt binary that I'm referring above, is located under: https://data.kitware.com/#user/56eac32b8d777f0457177859/folder/56eac32b8d777f045717785a Thanks for your support. Regards, Edson -------------- next part -------------- An HTML attachment was scrubbed... URL: From guilherme.gallo at eldorado.org.br Tue Jul 12 15:58:03 2016 From: guilherme.gallo at eldorado.org.br (Guilherme Alcarde Gallo) Date: Tue, 12 Jul 2016 19:58:03 +0000 Subject: [vtkusers] Problems in rendering volume with vtkOpenVR In-Reply-To: References: <4930d29af69b429e9e0f3ed399b7f678@serv031.corp.eldorado.org.br> Message-ID: <40fc28a3ef994902b81a14584178b7b1@serv031.corp.eldorado.org.br> I have tested what you suggested with the updated OpenVR remote module and deactivated the MultiSampling on the RenderWindow. It worked like a charm! Thank you very much! Best regards, Guilherme From: Ken Martin [mailto:ken.martin at kitware.com] Sent: quinta-feira, 7 de julho de 2016 10:44 To: Guilherme Alcarde Gallo ; Alvaro Sanchez ; Sankhesh Jhaveri Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Problems in rendering volume with vtkOpenVR I pushed a fix to the OpenVR remote module. You will need to make sure you set MultiSamples(0) on your renderwindow before you render as the issue involved reading from a multisampled buffer. I did test with a simple Volume Rendering example and it worked. There did seem to be a clipping/bbox issue with the volume when I adjusted it's position and orientation but I suspect that is a bug in the volume rendering code. Thanks Ken On Wed, Jul 6, 2016 at 4:30 PM, Ken Martin > wrote: I have not tested volume rendering with vtkOpenVR but ... I can't think of any reason it would not work. I suspect there is maybe a some sort of issue with the volume renderer copying the frame back into (or out of) the frame buffer. I suspect if you can find the issue the fix will be pretty easy. If I get a chance I'll try giving it a shot. On Wed, Jul 6, 2016 at 1:54 PM, Guilherme Alcarde Gallo > wrote: Hello all! I have succeeded in building VTK with vtkOpenVR remote module and running a simple Cone example in my OSVR HMD. But when I?ve attempted to run the volume rendering example "GPURenderDemo", I got a black screen and a lot of repetitive errors: ERROR: In C:\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 2035 vtkTextureObject (0000000BE6462060): failed at glCopyTexImage2D 6402 1 OpenGL errors detected 0 : (1282) Invalid operation Also, I have tried to run the CPU-based volume rendering example ?FixedPointVolumeRayCastMapperCT?. Although the performance is poor, it works, since the texture successfully appears in the HMD and its tracking is integrated with the WindowInteractor. My colleague has made an investigation about this issue comparing both examples, he concluded that the problem is related with the ?SmartVolumeMapper? class. So I would like to ask a few questions: 1) Does the remote module vtkOpenVR has support for volume rendering? 2a) If it does, what I'm doing wrong? Is there any problem with SmartVolumeMapper implementation for running vtkOpenVr applications? 2b) If it don?t, how I can add volume rendering support for vtkOpenVR? (I and my team are willing to do this) Thank you very much! Guilherme _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Jul 13 04:55:09 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 13 Jul 2016 10:55:09 +0200 Subject: [vtkusers] AppImage packaging: GLEW could not be initialized In-Reply-To: References: Message-ID: 2016-07-12 17:36 GMT+02:00 Elvis Stansvik : > 2016-07-11 22:33 GMT+02:00 Elvis Stansvik : > >> 2016-07-11 22:06 GMT+02:00 Ken Martin : >> >>> glew failing to initialize typically means that opengl has not been >>> initialized, specifically by creating an opengl context. e.g. the >>> this->ContextId is 0. Such as around calls to >>> >>> glXCreateContextAttribsARB >>> >> >> I can confirm that this one is returning a 0 ContextId :( It makes me >> wonder why it works if I build + run on the target, but not when I run my >> AppImage-packaged version (which is built on CentOS 6 and includes a >> bundled VTK, similarly built). Ideas for debugging further are greatly >> appreciated. >> > > After some more testing, where I've been running the image in various > Docker containers on the build host (Ubuntu 16.04, Debian 8.5 and OpenSUSE > 13.2 all worked), I ran into the crash again on Fedora 24. But note that > this time it was running on the build host, which has Haswell graphics. > > So I'm suspecting the reason for the failure has something to do with > library versions. Perhaps I'm too aggressive with excluding some things > when I'm bundling the libraries, and that this causes issues on Arch and > Fedora 24, since they have very recent library versions? > > The list of libraries I chose not to bundle is in my original mail. Anyone > who can spot something they think I really should be bundling? I obviously > can't bundle libX11 and libGL, but have I been to vigorous in excluding > some of the other related libraries? > Okay, I finally have closure on this issue: The problem on the Arch machine (the Sandybridge one with HD3000) had nothing to do with its graphics capabilities: https://bugs.archlinux.org/task/48994 In short: I can't ship a bundled libgcrypt, since it is depended on by both the Qt plugins (which I must ship) and Mesa (which I can't ship), and the version on Arch against which mesa was linked is too new to be compatible with the one I was shipping. Solution: Don't ship libgcrypt. The app now runs fine on the Arch machine. It was running with LIBGL_DEBUG=verbose that revealed this as the cause: libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/i965_dri.so libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/i965_dri.so libGL: dlopen /usr/lib/xorg/modules/dri/i965_dri.so failed (/usr/lib/libgcrypt.so.20: symbol gpgrt_lock_lock, version GPG_ERROR_1.0 not defined in file libgpg-error.so.0 with link time reference) libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965 The problem on the Fedora machine, which I thought at first was the same issue since the error was the same ("GLEW could not be initialized"), was a simple PEBKAC: I had forgot to install mesa-dri-drivers in the Docker container where I was testing. This was again revealed by running with LIBGL_DEBUG=verbose: libGL: OpenDriver: trying /usr/lib64/dri/tls/i965_dri.so libGL: OpenDriver: trying /usr/lib64/dri/i965_dri.so libGL: dlopen /usr/lib64/dri/i965_dri.so failed (/usr/lib64/dri/i965_dri.so: cannot open shared object file: No such file or directory) libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965 Installing mesa-dri-drivers solved the issue and the the app is now running fine on Fedora as well. So all is well now! I'm still interested in what you said about HD 3000 Ken, that it's not supported by the OpenGL2 backend. Because here it seems to run fine (although my test application is simple, it just renders a volume with vtkGPUVolumeRayCastMapper). Can I expect trouble on this machine using other parts of VTK? Elvis > Elvis > > >> >> Elvis >> >> >>> >>> in vtkXOpenGLRenderWindow.cxx. >>> >>> >>> FWIW I do not believe we support the Intel HD3000 on Linux for OpenGL2. >>> You would need either mesa with software rendering, a more recent intel >>> CPU, or a dedicated graphics card and driver. >>> >>> Ken >>> >>> >>> >>> >>> On Mon, Jul 11, 2016 at 3:54 PM, Elvis Stansvik < >>> elvis.stansvik at orexplore.com> wrote: >>> >>>> I now have a minimal example I can share: >>>> >>>> https://drive.google.com/open?id=0B1a2u6qVxaL7S2d3OF9uR3Q2amc >>>> >>>> This is an AppImage (hello.appimage), built just the way I build my >>>> application. It shows a sphere in a QVTKWidget. The download is 62 MB since >>>> the VTK bundled in the image includes debugging symbols. >>>> >>>> It would be great if other people could download and execute the image >>>> on their distros, to see if it runs. I've tested it only on Kubuntu 16.04 >>>> (where it works) and Arch Linux (where it crashes like described in >>>> previous mails). >>>> >>>> Specifically it would be _very_ interesting if someone with >>>> >>>> 1. Arch Linux, or >>>> 2. a somewhat old Intel graphics chipset, or (even better) >>>> 3. both of the above, >>>> >>>> could try running it, and see if they can reproduce my crash (failure >>>> to initialize GLEW). >>>> >>>> I'm attaching the sources and scripts (hello.tar.gz) from which I built >>>> this example. If you want to build it yourself, just type "make" in the >>>> extracted directory. All you need is Docker and Make, everything else is >>>> taken care of inside a CentOS 6 Docker container. >>>> >>>> Many thanks in advance. >>>> >>>> Elvis >>>> >>>> 2016-07-11 17:27 GMT+02:00 Elvis Stansvik >>> >: >>>> >>>>> Hi all, >>>>> >>>>> In exploring different deployment options, I'm now trying to create an >>>>> AppImage of a VTK+Qt application. For those who don't know, AppImage is a >>>>> packaging format where the application, including (almost) all of its >>>>> dependencies are put into a self-extracting ISO image called an AppImage. >>>>> >>>>> Doing this takes quite a bit of manual work, but if you do things >>>>> correctly and build the image on a good base system (I'm using CentOS 6), >>>>> the image should run on a multitude of distros. >>>>> >>>>> I've had some success: The resulting image runs on e.g. Ubuntu Xenial. >>>>> >>>>> I'm now trying it on my Arch Linux laptop (not a common/easy target >>>>> for AppImages, but I'd like to make it work since I run it personally), and >>>>> get: >>>>> >>>>> ERROR: In /tmp/VTK-7.0.0/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, >>>>> line 533 >>>>> vtkXOpenGLRenderWindow (0x1e48140): GLEW could not be initialized. >>>>> >>>>> This is due to a glewInit() call failing during initialization of the >>>>> render window, and I've debugged it to the underlying call to >>>>> glGetString(GL_VERSION) in VTK's forked GLEW library returning NULL. >>>>> >>>>> Does anyone have an idea why this might happen? The VTK I'm using here >>>>> is configured as follows: >>>>> >>>>> cmake3 \ >>>>> -DCMAKE_INSTALL_PREFIX=/usr \ >>>>> -DVTK_Group_Qt=ON \ >>>>> -DVTK_QT_VERSION=5 \ >>>>> -DVTK_Group_Imaging=ON \ >>>>> -DVTK_Group_Views=ON \ >>>>> -DVTK_Group_MPI=OFF \ >>>>> -DVTK_Group_Tk=OFF \ >>>>> -DVTK_Group_Web=OFF \ >>>>> -DBUILD_TESTING=OFF \ >>>>> -DVTK_USE_SYSTEM_LIBRARIES=ON \ >>>>> -DVTK_USE_SYSTEM_LIBPROJ4=OFF \ >>>>> -DCMAKE_BUILD_TYPE=Debug \ >>>>> .. >>>>> >>>>> And it uses the OpenGL2 backend. >>>>> >>>>> It was built inside a CentOS 6 Docker container on a Kubuntu 16.04 >>>>> host with HD 4400 Intel graphics adapter. The target system is an older >>>>> laptop with up-to-date Arch Linux and a weaker HD 3000 Intel graphics >>>>> adapter. >>>>> >>>>> Now, packaging apps that use OpenGL is a bit tricky, because you can't >>>>> bundle e.g. libX11, libGL and some other libraries that are dependant on >>>>> the user's graphics adapter/environment. >>>>> >>>>> The libraries that I've chosen to _not_ bundle are: >>>>> >>>>> libz.so.1 >>>>> libm.so.6 >>>>> libSM.so.6 >>>>> libICE.so.6 >>>>> libX11.so.6 >>>>> libXext.so.6 >>>>> libXt.so.6 >>>>> libstdc++.so.6 >>>>> libgcc_s.so.1 >>>>> libc.so.6 >>>>> libpthread.so.0 >>>>> librt.so.1 >>>>> libGL.so.1 >>>>> libdl.so.2 >>>>> libuuid.so.1 >>>>> libxcb.so.1 >>>>> libxcb-dri3.so.0 >>>>> libxcb-present.so.0 >>>>> libxcb-randr.so.0 >>>>> libxcb-xfixes.so.0 >>>>> libxcb-render.so.0 >>>>> libxcb-shape.so.0 >>>>> libxcb-sync.so.1 >>>>> libxshmfence.so.1 >>>>> libglapi.so.0 >>>>> libXdamage.so.1 >>>>> libXfixes.so.3 >>>>> libX11-xcb.so.1 >>>>> libxcb-glx.so.0 >>>>> libxcb-dri2.so.0 >>>>> libXxf86vm.so.1 >>>>> libdrm.so.2 >>>>> libXau.so.6 >>>>> libXdmcp.so.6 >>>>> >>>>> This may be a little too liberal, and it could be that I should be >>>>> bundling some of these. But it seems to work fine since the AppImage runs >>>>> without problem on Kubuntu 16.04. >>>>> >>>>> The application also runs fine if I build VTK and the application >>>>> "normally" on the Arch host and run it (using OpenGL2 backend), so the >>>>> graphics adapter should be capable enough. It's just when I try to run the >>>>> CentOS 6-built AppImage on the Arch host that it fails. >>>>> >>>>> The application essentially just creates a QVTKWidget and renders a >>>>> volume into its rendering window. >>>>> >>>>> I saw that one (perhaps likely?) reason for glGetString(GL_VERSION) >>>>> returning NULL is that initialization of the GL context failed (or wasn't >>>>> fully done yet). If this is the case, does anyone know where I can debug >>>>> this further in VTK? Where is the OpenGL context in VTK set up when using >>>>> QVTKWidget + OpenGL2 backend? >>>>> >>>>> Finally: Has anyone else tried packaging VTK applications as AppImages? >>>>> >>>>> I know ParaView is provided as a prebuilt Linux binary with VTK >>>>> bundled, so I can imagine the ParaView folks has ran into some issues like >>>>> this? >>>>> >>>>> Thanks in advance for any advice. >>>>> >>>>> Elvis >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> Ken Martin PhD >>> Chairman & CFO >>> Kitware Inc. >>> 28 Corporate Drive >>> Clifton Park NY 12065 >>> 518 371 3971 >>> >>> This communication, including all attachments, contains confidential and >>> legally privileged information, and it is intended only for the use of the >>> addressee. Access to this email by anyone else is unauthorized. If you are >>> not the intended recipient, any disclosure, copying, distribution or any >>> action taken in reliance on it is prohibited and may be unlawful. If you >>> received this communication in error please notify us immediately and >>> destroy the original message. Thank you. >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arasakumaran at yahoo.com Wed Jul 13 07:21:24 2016 From: arasakumaran at yahoo.com (arasu) Date: Wed, 13 Jul 2016 11:21:24 +0000 (UTC) Subject: [vtkusers] Drawing lines on a 2D image in response to user mouse click References: <1470912827.2300075.1468408884683.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1470912827.2300075.1468408884683.JavaMail.yahoo@mail.yahoo.com> Hi, ? I have 2D data (usually double - sometimes unsigned short ) that I need to display using pseudocolor and let the user choose a point to divide the image into 4 quadrants - by drawing a vertical and horizontal line where they have clicked. I have learnt to display the data after importing with vtkImageImport. - I have done this with ImageViewer2, as well as by using ?Mapper / Actor /Interator. I see the examples of PickPixel, PointPicker etc. and see how we can get the point where the user clicked. ?I also saw someone respond to a similiar question some time ago about using vtkLineWidget2. ?However the example does not help me as the line needs to be where the user clicked and the line itself should move to the new point where clicked if the user clicks elsewhere on the picture. ?? I would appreciate some pointers, sample code or a link to an example that I have missed. Thanks? -------------- next part -------------- An HTML attachment was scrubbed... URL: From chuck.atkins at kitware.com Wed Jul 13 08:27:09 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Wed, 13 Jul 2016 08:27:09 -0400 Subject: [vtkusers] Somehow mesa-12 first rendering is slow In-Reply-To: References: Message-ID: Hi Edson, It looks like you're getting llvmpipe correctly so that's good. Your suspicion regarding the llvm build is a good place to start. If you look in the el6/Dockerfile in the repo I sent you, you can see the entire build configuration of the image, including llvm. Try configuring llvm with CMake instead of autotools using the following: cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/path/to/llvm/install \ -DLLVM_BUILD_LLVM_DYLIB=ON \ -DLLVM_ENABLE_RTTI=ON \ -DLLVM_TARGETS_TO_BUILD=X86 \ -DLLVM_INSTALL_UTILS=ON \ /path/to/llvm/source - Chuck On Tue, Jul 12, 2016 at 3:46 PM, Edson Contreras C?rdenas wrote: > Hello world, > > I'm trying to get running my application with VTK-7.0-OpenGL2 and > mesa-12.0 and it gets slow with the first render. (after I call > m_renderer->Render() it takes 5-7 seconds to show the image and after that > everything goes smooth and ok) > > The thing is that I try Chuck's libGL.so (paraview pre-built binary) and > it takes a second or maybe 2 seconds performing the same action, with the > same actors. I'm building mesa-12.0 with the following configuration: (same > that Chuck sent me in a mesa-users thread) > > OS = RHEL6.6 > CC = gcc(5.2.0) > CXX = g++(5.2.0) > > BASELIBS_PREFIX=/remote/sharedLibs > > ../mesa-12.0.0/configure \ > --with-llvm-prefix=${BASELIBS_PREFIX}/llvm-3.8 \ > --enable-opengl --disable-gles1 --disable-gles2 \ > --disable-va --disable-gbm --disable-xvmc --disable-vdpau \ > --enable-shared-glapi \ > --disable-texture-float \ > --disable-dri --with-dri-drivers= \ > --enable-gallium-llvm --disable-llvm-shared-libs \ > --with-gallium-drivers=swrast,swr \ > --disable-egl --disable-gbm --with-egl-platforms= \ > --enable-gallium-osmesa \ > --enable-glx \ > --prefix=${BASELIBS_PREFIX}/mesa-12.0 > > edsonc at mesa-tests:~> setenv LD_LIBRARY_PATH > ${BASELIBS_PREFIX}/mesa-12.0/lib:${LD_LIBRARY_PATH} > > edsonc at mesa-tests:~> glxinfo | grep -i opengl > OpenGL vendor string: VMware, Inc. > OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 128 bits) > OpenGL version string: 3.2 (Core Profile) Mesa 12.0.0 > OpenGL shading language version string: 3.30 > OpenGL extensions: > > > My guess is that I'm building wrong llvm-3.8 library. In any case, I also > add the flags of how I built it. > > > ../llvm-3.8.0.src/configure \ > --prefix=${BASELIBS_PREFIX}/llvm-3.8 \ > --disable-shared \ > --enable-optimized \ > --enable-cxx1y > > > The prebuilt binary that I'm referring above, is located under: > > > https://data.kitware.com/#user/56eac32b8d777f0457177859/folder/56eac32b8d777f045717785a > > Thanks for your support. > > Regards, > Edson > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Wed Jul 13 09:12:31 2016 From: julien.jomier at kitware.com (Julien Jomier) Date: Wed, 13 Jul 2016 15:12:31 +0200 Subject: [vtkusers] ANN: CMake Course - October 10 in Lyon, France Message-ID: Kitware will be holding a CMake training course on October 10, 2016 at Kitware's office in Lyon, France. This one-day course will cover CMake, CTest, CPack and CDash. Visit our website for more information and registration details (early registration and student discounts available): http://training.kitware.fr/browse/129 Note that the course will be taught in English. If you have any questions, please contact me directly or training at kitware.fr. We are looking forward to seeing you in Lyon, Julien -- Kitware SAS 26 rue Louis Gu?rin 69100 Villeurbanne, France http://www.kitware.eu From jose.de.paula at live.com Wed Jul 13 09:25:58 2016 From: jose.de.paula at live.com (Jose Barreto) Date: Wed, 13 Jul 2016 06:25:58 -0700 (MST) Subject: [vtkusers] vtkResliceCursorThickLineRepresentation2 change the lines auxiliary Message-ID: <1468416358268-5739245.post@n5.nabble.com> Hi guys, I tryed set the lines auxiliary of "vtkResliceCursorThickLineRepresentation2" for visible false. But I not find this options in "vtkResliceCursorThickLineRepresentation2", only the method GetResliceCursorWidget2()->GetRepresentation())->GetResliceCursorActor()->GetCenterlineProperty(0)->SetEdgeColor. This method change the line center, but the lines that indicate the Thickness continue with the first color. I want to change the color of them or disable them. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkResliceCursorThickLineRepresentation2-change-the-lines-auxiliary-tp5739245.html Sent from the VTK - Users mailing list archive at Nabble.com. From martin.affolter at ntb.ch Wed Jul 13 10:21:06 2016 From: martin.affolter at ntb.ch (Affolter Martin) Date: Wed, 13 Jul 2016 14:21:06 +0000 Subject: [vtkusers] switch between on- and offscreen rendering Message-ID: Hi vtkusers It seems that switching between on- and offscreen is no longer supported in VTK 7.0 on Windows. We used to create images from a view with the code below in VTK 6.1. Switching to offscreen-rendering allowed us to create an image even if the view itself wasn't visible in the UI (e.g. when put in a tab). Can anyone confirm that this is not possible anymore, or is there a build option I am not aware of? I haven't found much information on this in the mailing list, the blog or the changes listed for migrating from 6.x to 7.0. Of course, I would also be interested in an alternative solution. Thanks. The code: void VTKView::WriteImage( const _TCHAR * fileName, const _TCHAR * imageType, int magnification ){ std::_tstring extension( imageType ); std::_tstring fName = CADH_Service::AppendExtension(fileName, extension); this->m_RenWin->OffScreenRenderingOn(); // <--- switch to offscreen rendering, since window might be hidden vtkRenderLargeImage * renderLarge = vtkRenderLargeImage::New(); renderLarge->SetInput( m_Renderer ); renderLarge->SetMagnification( magnification ); vtkImageWriter * imageWriter = NULL; try{ if( extension.compare( _T( "bmp" )) == 0 ){ imageWriter = vtkBMPWriter::New(); } else if( extension.compare( _T( "png" )) == 0 ){ imageWriter = vtkPNGWriter::New(); } else if( extension.compare( _T( "jpeg" )) == 0 || extension.compare( _T( "jpg" )) == 0){ imageWriter = vtkJPEGWriter::New(); } else if( extension.compare( _T( "pnm" )) == 0 ){ imageWriter = vtkPNMWriter::New(); } else if( extension.compare( _T( "ps" )) == 0 ){ imageWriter = vtkPostScriptWriter::New(); } else if( extension.compare( _T( "tif" )) == 0 || extension.compare( _T( "tiff" )) == 0){ imageWriter = vtkTIFFWriter::New(); } else { throw std::_tstring(_T(" Exception in VTKView::WriteImage, picture format not supported.")); } if( imageWriter ){ imageWriter->SetInputConnection( renderLarge->GetOutputPort() ); imageWriter->SetFileName( fName.c_str() ); imageWriter->Write(); imageWriter->Delete(); } } catch( std::_tstring str ){ if ( m_RenWin->GetOffScreenRendering() > 0 ){ m_RenWin->OffScreenRenderingOff(); } renderLarge->Delete(); throw str; } catch(...) { if ( m_RenWin->GetOffScreenRendering() > 0 ){ m_RenWin->OffScreenRenderingOff(); } renderLarge->Delete(); throw std::_tstring(_T(" Exception in VTKView::WriteImage, procedure aborted.")); } renderLarge->Delete(); this->m_RenWin->OffScreenRenderingOff(); // <--- switch back to onscreen rendering } Martin Affolter MSc FHO in Engineering Wissenschaftlicher Mitarbeiter ___________________________________________ NTB Interstaatliche Hochschule f?r Technik Buchs Institut f?r Ingenieurinformatik Sch?nauweg 4 CH-9013 St. Gallen Tel: +41 81 755 32 49 Web: http://www.ntb.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: From edrecon at gmail.com Wed Jul 13 11:07:53 2016 From: edrecon at gmail.com (=?UTF-8?Q?Edson_Contreras_C=C3=A1rdenas?=) Date: Wed, 13 Jul 2016 11:07:53 -0400 Subject: [vtkusers] Somehow mesa-12 first rendering is slow In-Reply-To: References: Message-ID: Hi Chuck, As I thought and you suggested, the problem was llvm. I've already built and tested it using cmake and your flags, and works faster. (at least now behaves like your prebuilt binary) Thanks for all your support and quick response :-) Regards, Edson 2016-07-13 8:27 GMT-04:00 Chuck Atkins : > Hi Edson, > It looks like you're getting llvmpipe correctly so that's good. Your > suspicion regarding the llvm build is a good place to start. If you look > in the el6/Dockerfile in the repo I sent you, you can see the entire build > configuration of the image, including llvm. Try configuring llvm with > CMake instead of autotools using the following: > > cmake \ > -DCMAKE_BUILD_TYPE=Release \ > -DCMAKE_INSTALL_PREFIX=/path/to/llvm/install \ > -DLLVM_BUILD_LLVM_DYLIB=ON \ > -DLLVM_ENABLE_RTTI=ON \ > -DLLVM_TARGETS_TO_BUILD=X86 \ > -DLLVM_INSTALL_UTILS=ON \ > /path/to/llvm/source > > > - Chuck > > On Tue, Jul 12, 2016 at 3:46 PM, Edson Contreras C?rdenas < > edrecon at gmail.com> wrote: > >> Hello world, >> >> I'm trying to get running my application with VTK-7.0-OpenGL2 and >> mesa-12.0 and it gets slow with the first render. (after I call >> m_renderer->Render() it takes 5-7 seconds to show the image and after that >> everything goes smooth and ok) >> >> The thing is that I try Chuck's libGL.so (paraview pre-built binary) and >> it takes a second or maybe 2 seconds performing the same action, with the >> same actors. I'm building mesa-12.0 with the following configuration: (same >> that Chuck sent me in a mesa-users thread) >> >> OS = RHEL6.6 >> CC = gcc(5.2.0) >> CXX = g++(5.2.0) >> >> BASELIBS_PREFIX=/remote/sharedLibs >> >> ../mesa-12.0.0/configure \ >> --with-llvm-prefix=${BASELIBS_PREFIX}/llvm-3.8 \ >> --enable-opengl --disable-gles1 --disable-gles2 \ >> --disable-va --disable-gbm --disable-xvmc --disable-vdpau \ >> --enable-shared-glapi \ >> --disable-texture-float \ >> --disable-dri --with-dri-drivers= \ >> --enable-gallium-llvm --disable-llvm-shared-libs \ >> --with-gallium-drivers=swrast,swr \ >> --disable-egl --disable-gbm --with-egl-platforms= \ >> --enable-gallium-osmesa \ >> --enable-glx \ >> --prefix=${BASELIBS_PREFIX}/mesa-12.0 >> >> edsonc at mesa-tests:~> setenv LD_LIBRARY_PATH >> ${BASELIBS_PREFIX}/mesa-12.0/lib:${LD_LIBRARY_PATH} >> >> edsonc at mesa-tests:~> glxinfo | grep -i opengl >> OpenGL vendor string: VMware, Inc. >> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 128 bits) >> OpenGL version string: 3.2 (Core Profile) Mesa 12.0.0 >> OpenGL shading language version string: 3.30 >> OpenGL extensions: >> >> >> My guess is that I'm building wrong llvm-3.8 library. In any case, I also >> add the flags of how I built it. >> >> >> ../llvm-3.8.0.src/configure \ >> --prefix=${BASELIBS_PREFIX}/llvm-3.8 \ >> --disable-shared \ >> --enable-optimized \ >> --enable-cxx1y >> >> >> The prebuilt binary that I'm referring above, is located under: >> >> >> https://data.kitware.com/#user/56eac32b8d777f0457177859/folder/56eac32b8d777f045717785a >> >> Thanks for your support. >> >> Regards, >> Edson >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -- Atte. Edson Ren? Contreras C?rdenas Ingeniero Civil Electr?nico TCAD R&D Software Engineer II Synopsys Chile -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Jul 13 11:20:44 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 13 Jul 2016 11:20:44 -0400 Subject: [vtkusers] Anyone using the WindBlade reader? Message-ID: Hey folks, Is anyone out there actively using the WindBlade reader? If not, I would like to demote it to an external module. 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 chenjianyyzz at 163.com Wed Jul 13 11:45:07 2016 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Wed, 13 Jul 2016 08:45:07 -0700 (MST) Subject: [vtkusers] how to know VTK pipeline finishes the image processing Message-ID: <1468424707520-5739250.post@n5.nabble.com> Hi, I have a VTK program, which allow the user to open the DICOM folder and load and volume render. the first time the DICOM series load is always quite good, but when the user switch to another DICOM series, problem comes, it crashes once the user move the mouse to the viewer. and I find when the user stop about 5 seconds after switch to diffeent DICOM series, and then do the same operation as above, then the crash normally will not happen. which lead me to think if there's anything internal in VTK pipeline has not be done, which cause the crash. but after 5 seconds, it will normally done all the task. does anybody know if there a tag inside the VTK shows all the tasks in the pipeline are done? -- View this message in context: http://vtk.1045678.n5.nabble.com/how-to-know-VTK-pipeline-finishes-the-image-processing-tp5739250.html Sent from the VTK - Users mailing list archive at Nabble.com. From elvis.stansvik at orexplore.com Wed Jul 13 14:02:30 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 13 Jul 2016 20:02:30 +0200 Subject: [vtkusers] Somehow mesa-12 first rendering is slow In-Reply-To: References: Message-ID: 2016-07-13 14:27 GMT+02:00 Chuck Atkins : > Hi Edson, > It looks like you're getting llvmpipe correctly so that's good. Your > suspicion regarding the llvm build is a good place to start. If you look > in the el6/Dockerfile in the repo I sent you, you can see the entire build > configuration of the image, including llvm. Try configuring llvm > I'm curious which repo this is. Is it public? Cheers, Elvis > with CMake instead of autotools using the following: > > cmake \ > -DCMAKE_BUILD_TYPE=Release \ > -DCMAKE_INSTALL_PREFIX=/path/to/llvm/install \ > -DLLVM_BUILD_LLVM_DYLIB=ON \ > -DLLVM_ENABLE_RTTI=ON \ > -DLLVM_TARGETS_TO_BUILD=X86 \ > -DLLVM_INSTALL_UTILS=ON \ > /path/to/llvm/source > > > - Chuck > > On Tue, Jul 12, 2016 at 3:46 PM, Edson Contreras C?rdenas < > edrecon at gmail.com> wrote: > >> Hello world, >> >> I'm trying to get running my application with VTK-7.0-OpenGL2 and >> mesa-12.0 and it gets slow with the first render. (after I call >> m_renderer->Render() it takes 5-7 seconds to show the image and after that >> everything goes smooth and ok) >> >> The thing is that I try Chuck's libGL.so (paraview pre-built binary) and >> it takes a second or maybe 2 seconds performing the same action, with the >> same actors. I'm building mesa-12.0 with the following configuration: (same >> that Chuck sent me in a mesa-users thread) >> >> OS = RHEL6.6 >> CC = gcc(5.2.0) >> CXX = g++(5.2.0) >> >> BASELIBS_PREFIX=/remote/sharedLibs >> >> ../mesa-12.0.0/configure \ >> --with-llvm-prefix=${BASELIBS_PREFIX}/llvm-3.8 \ >> --enable-opengl --disable-gles1 --disable-gles2 \ >> --disable-va --disable-gbm --disable-xvmc --disable-vdpau \ >> --enable-shared-glapi \ >> --disable-texture-float \ >> --disable-dri --with-dri-drivers= \ >> --enable-gallium-llvm --disable-llvm-shared-libs \ >> --with-gallium-drivers=swrast,swr \ >> --disable-egl --disable-gbm --with-egl-platforms= \ >> --enable-gallium-osmesa \ >> --enable-glx \ >> --prefix=${BASELIBS_PREFIX}/mesa-12.0 >> >> edsonc at mesa-tests:~> setenv LD_LIBRARY_PATH >> ${BASELIBS_PREFIX}/mesa-12.0/lib:${LD_LIBRARY_PATH} >> >> edsonc at mesa-tests:~> glxinfo | grep -i opengl >> OpenGL vendor string: VMware, Inc. >> OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 128 bits) >> OpenGL version string: 3.2 (Core Profile) Mesa 12.0.0 >> OpenGL shading language version string: 3.30 >> OpenGL extensions: >> >> >> My guess is that I'm building wrong llvm-3.8 library. In any case, I also >> add the flags of how I built it. >> >> >> ../llvm-3.8.0.src/configure \ >> --prefix=${BASELIBS_PREFIX}/llvm-3.8 \ >> --disable-shared \ >> --enable-optimized \ >> --enable-cxx1y >> >> >> The prebuilt binary that I'm referring above, is located under: >> >> >> https://data.kitware.com/#user/56eac32b8d777f0457177859/folder/56eac32b8d777f045717785a >> >> Thanks for your support. >> >> Regards, >> Edson >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From redbaronqueen at gmail.com Wed Jul 13 14:34:03 2016 From: redbaronqueen at gmail.com (Aleksandar Atanasov) Date: Wed, 13 Jul 2016 20:34:03 +0200 Subject: [vtkusers] Installing VTK 7 on Windows 10 using MinGW In-Reply-To: References: Message-ID: Hi all! The wiki article (http://www.vtk.org/Wiki/VTK/Building/Windows) on building VTK on a Windows machine describes the whole procedure using the `Visual C++ Compiler`. However if you have `MinGW` (for example in my case I have the Qt 5.7 SDK with MinGW 5.3) you can easily do the whole build and install with the tools shipped with it. For the installation use `mingw32-make.exe install` (or the 64bit equivalent) inside a normal prompt (or Powershell) if you want to install it to a location where you have normal access privileges or an Administrative prompt (or Powershell) if you want to install it to let's say C:\VTK (as was in my case). Since I don't have an account for the Wiki it would be really great if the article is expanded to include the things I've described above. Regards, RB -------------- next part -------------- An HTML attachment was scrubbed... URL: From chuck.atkins at kitware.com Wed Jul 13 15:00:55 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Wed, 13 Jul 2016 15:00:55 -0400 Subject: [vtkusers] Somehow mesa-12 first rendering is slow In-Reply-To: References: Message-ID: > > It looks like you're getting llvmpipe correctly so that's good. Your >> suspicion regarding the llvm build is a good place to start. If you look >> in the el6/Dockerfile in the repo I sent you >> > > I'm curious which repo this is. Is it public? > Sure! Given that creating a working Mesa build is often a non-trivial process, we tried to streamline and standardize it for our internal use by creating a minimal docker image to perform the build. Based on some initial work by Utkarsh, I've created a set of Docker images for building the latest Mesa from git on different Linux OSs. You can find the repo which currently contains the docker files for el6 and el7 here: https://gitlab.kitware.com/paraview/mesa-builds There's a readme in there that should tell you how to use it (assuming of course that you have docker installed). -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Jul 13 16:39:51 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 13 Jul 2016 22:39:51 +0200 Subject: [vtkusers] Somehow mesa-12 first rendering is slow In-Reply-To: References: Message-ID: 2016-07-13 21:00 GMT+02:00 Chuck Atkins : > It looks like you're getting llvmpipe correctly so that's good. Your >>> suspicion regarding the llvm build is a good place to start. If you look >>> in the el6/Dockerfile in the repo I sent you >>> >> >> I'm curious which repo this is. Is it public? >> > > Sure! Given that creating a working Mesa build is often a non-trivial > process, we tried to streamline and standardize it for our internal use by > creating a minimal docker image to perform the build. Based on some > initial work by Utkarsh, I've created a set of Docker images for building > the latest Mesa from git on different Linux OSs. You can find the repo > which currently contains the docker files for el6 and el7 here: > > https://gitlab.kitware.com/paraview/mesa-builds > > There's a readme in there that should tell you how to use it (assuming of > course that you have docker installed). > Thanks! The reason I was curious is I'm currently experimenting with packaging an app as an AppImage [1], such that it can run across multiple distros. I'm currently not bundling Mesa, instead ttreating it as a prerequisite along with some other things. But should I start bundling it, it's always helpful to see how others have built it. (I'm doing the building of the AppImage in a CentOS 6 Docker container). Elvis [1] http://appimage.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Wed Jul 13 16:49:29 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 13 Jul 2016 22:49:29 +0200 Subject: [vtkusers] Somehow mesa-12 first rendering is slow In-Reply-To: References: Message-ID: 2016-07-13 22:39 GMT+02:00 Elvis Stansvik : > 2016-07-13 21:00 GMT+02:00 Chuck Atkins : > >> It looks like you're getting llvmpipe correctly so that's good. Your >>>> suspicion regarding the llvm build is a good place to start. If you look >>>> in the el6/Dockerfile in the repo I sent you >>>> >>> >>> I'm curious which repo this is. Is it public? >>> >> >> Sure! Given that creating a working Mesa build is often a non-trivial >> process, we tried to streamline and standardize it for our internal use by >> creating a minimal docker image to perform the build. Based on some >> initial work by Utkarsh, I've created a set of Docker images for building >> the latest Mesa from git on different Linux OSs. You can find the repo >> which currently contains the docker files for el6 and el7 here: >> >> https://gitlab.kitware.com/paraview/mesa-builds >> >> There's a readme in there that should tell you how to use it (assuming of >> course that you have docker installed). >> > > Thanks! The reason I was curious is I'm currently experimenting with > packaging an app as an AppImage [1], such that it can run across multiple > distros. I'm currently not bundling Mesa, instead ttreating it as a > prerequisite along with some other things. But should I start bundling it, > it's always helpful to see how others have built it. (I'm doing the > building of the AppImage in a CentOS 6 Docker container). > Just one other question regarding your use of these builds: Are these Mesa builds with software rasterizers something you ship with Paraview as a fallback for when hardware is not up to snuff, or for other certain situations? Or will you always be using software rendering (OpenSWR?) going forward? No hardware? Elvis > Elvis > > [1] http://appimage.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From remi.charrier at gmail.com Thu Jul 14 03:46:21 2016 From: remi.charrier at gmail.com (Remi Charrier) Date: Thu, 14 Jul 2016 09:46:21 +0200 Subject: [vtkusers] How to extract rectangular regions from a vtkActor Message-ID: Dear all, I am trying to extract specific rectangular regions (a box) from a vtkActor. (I want to extract only the parts I need of a vtkActor so that my filters run faster). So far, I managed to do this by using the vtkExtractPolyDataGeometry filter and defining the regions I am interested in in the SetImplicitFunction. However this filter takes as input the vtkPolyData* linked to my vtkActor and not the vtkActor itself. It seems that by doing this, It does not consider the transform I have applied to my vtkActor through the SetPosition() function. I managed to find a way to apply the transform to the vtkPolyData itself and not to the vtkActor but I have the feeling that makes everything slower than what it could. So here is my question: Is there an extract filter that can be applied to a vtkActor and not to the vtkPolyData and that therefore consider the User Transform set to the vtkActor? I tried to find something by myself but I may be missing some key words... Best Regards, R?mi -------------- next part -------------- An HTML attachment was scrubbed... URL: From chuck.atkins at kitware.com Thu Jul 14 09:16:09 2016 From: chuck.atkins at kitware.com (Chuck Atkins) Date: Thu, 14 Jul 2016 09:16:09 -0400 Subject: [vtkusers] Somehow mesa-12 first rendering is slow In-Reply-To: References: Message-ID: > > Just one other question regarding your use of these builds: Are these Mesa > builds with software rasterizers something you ship with Paraview as a > fallback for when hardware is not up to snuff, or for other certain > situations? Or will you always be using software rendering (OpenSWR?) going > forward? No hardware? > It's entirely for a fallback. The preference is to always use the native GPU for OpenGL rendering. When various situations have a need for software rendering (thin clients, for example), the system supplied Mesa is usually insufficient to provide an adequate OpenGL version so we ship mesa binaries with the ParaView clients and giv the user an explicit option to manually use them if needed (it won't happen automatically). -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jul 14 09:27:51 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 14 Jul 2016 09:27:51 -0400 Subject: [vtkusers] Installing VTK 7 on Windows 10 using MinGW In-Reply-To: References: Message-ID: Hi Aleksandar, Please send me your prefered username offlist for the wiki and I'll make an account for you so that you can improve the page. Unfortunately we recently had to shut down easy creation of wiki and bugtracker accounts after spambots discovered them so now all accounts must be created by someone at kitware. thanks David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Wed, Jul 13, 2016 at 2:34 PM, Aleksandar Atanasov < redbaronqueen at gmail.com> wrote: > Hi all! > > The wiki article (http://www.vtk.org/Wiki/VTK/Building/Windows) on > building VTK on a Windows machine describes the whole procedure using the > `Visual C++ Compiler`. However if you have `MinGW` (for example in my case > I have the Qt 5.7 SDK with MinGW 5.3) you can easily do the whole build > and install with the tools shipped with it. For the installation use > `mingw32-make.exe install` (or the 64bit equivalent) inside a normal prompt > (or Powershell) if you want to install it to a location where you have > normal access privileges or an Administrative prompt (or Powershell) if you > want to install it to let's say C:\VTK (as was in my case). > > Since I don't have an account for the Wiki it would be really great if the > article is expanded to include the things I've described above. > > Regards, > RB > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jul 14 09:45:41 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 14 Jul 2016 09:45:41 -0400 Subject: [vtkusers] wiki down for maintainance this morning Message-ID: Should be back up soon after the upgrade. 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 elvis.stansvik at orexplore.com Thu Jul 14 11:59:24 2016 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 14 Jul 2016 17:59:24 +0200 Subject: [vtkusers] Somehow mesa-12 first rendering is slow In-Reply-To: References: Message-ID: 2016-07-14 15:16 GMT+02:00 Chuck Atkins : > Just one other question regarding your use of these builds: Are these Mesa >> builds with software rasterizers something you ship with Paraview as a >> fallback for when hardware is not up to snuff, or for other certain >> situations? Or will you always be using software rendering (OpenSWR?) going >> forward? No hardware? >> > > It's entirely for a fallback. The preference is to always use the native > GPU for OpenGL rendering. When various situations have a need for software > rendering (thin clients, for example), the system supplied Mesa is usually > insufficient to provide an adequate OpenGL version so we ship mesa binaries > with the ParaView clients and giv the user an explicit option to manually > use them if needed (it won't happen automatically). > Thanks for clarifying, and that makes sense. Elvis -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Jul 14 16:28:43 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 14 Jul 2016 16:28:43 -0400 Subject: [vtkusers] QVTKWidget on Mac Retina displays In-Reply-To: <1467022955133-5738934.post@n5.nabble.com> References: <1467022955133-5738934.post@n5.nabble.com> Message-ID: Sean, This sounds like something in your wheelhouse. Interested in tackling? Maybe the code in the linked archived email could be added to vtkCocoaRenderWindow.mm? Thanks, Cory On Mon, Jun 27, 2016 at 6:22 AM, Dave Edmunds wrote: > Hi all, > > I am using Qt 5.5 and VTK 6.3. When I render using a QVTKWidget, on an > external monitor everything looks great, but on my Macbook Pro retina > display, my application is only rendered to the lower left quadrant of the > screen. This is presumably because of the retina display treating each real > pixel as a 2x2 block. > > Simon provided a workaround in this post: > http://public.kitware.com/pipermail/vtkusers/2015-February/090117.html > > Unfortunately, I can't make use of the Objective C commands he used. > > Has this been fixed, or does anyone know a pure C++ workaround for this > issue? > > Kind regards, > > Dave > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-on-Mac-Retina-displays-tp5738934.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen R&D Engineer Kitware, Inc. From chenjianyyzz at 163.com Fri Jul 15 08:39:25 2016 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Fri, 15 Jul 2016 05:39:25 -0700 (MST) Subject: [vtkusers] How can I know which RenderWindowControl I clicked Message-ID: <1468586365814-5739265.post@n5.nabble.com> Hi, I have a array of RenderWindowControl, and each of them have a LeftButtonPressEvt: mRenderWindowControls[i].RenderWindow.GetInteractor().LeftButtonPressEvt += new vtkObject.vtkObjectEventHandler(myClickEvt); now my question is, inside myClickEvt, how can I know the click happends from which RenderWindowControl? public void myClickEvt(vtkObject sender, vtkObjectEventArgs e) { //How can I know which RenderWindowControl I clicked inside the function myClickEvt? } -- View this message in context: http://vtk.1045678.n5.nabble.com/How-can-I-know-which-RenderWindowControl-I-clicked-tp5739265.html Sent from the VTK - Users mailing list archive at Nabble.com. From DLRdave at aol.com Fri Jul 15 10:20:14 2016 From: DLRdave at aol.com (David Cole) Date: Fri, 15 Jul 2016 10:20:14 -0400 Subject: [vtkusers] How can I know which RenderWindowControl I clicked In-Reply-To: <1468586365814-5739265.post@n5.nabble.com> References: <1468586365814-5739265.post@n5.nabble.com> Message-ID: this? Isn't it a method of the class? Or the sender param? > On Jul 15, 2016, at 8:39 AM, chenjianyyzz wrote: > > Hi, > > I have a array of RenderWindowControl, and each of them have a > LeftButtonPressEvt: > > mRenderWindowControls[i].RenderWindow.GetInteractor().LeftButtonPressEvt += > new vtkObject.vtkObjectEventHandler(myClickEvt); > > now my question is, inside myClickEvt, how can I know the click happends > from which RenderWindowControl? > > public void myClickEvt(vtkObject sender, vtkObjectEventArgs e) > { > //How can I know which RenderWindowControl I clicked inside the function > myClickEvt? > } > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-can-I-know-which-RenderWindowControl-I-clicked-tp5739265.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From tossin at gmail.com Fri Jul 15 19:01:28 2016 From: tossin at gmail.com (Evan Kao) Date: Fri, 15 Jul 2016 16:01:28 -0700 Subject: [vtkusers] Emulating Paraview 5's Interactive Select Points in VTK Message-ID: Hello all, I'm trying to emulate Paraview 5's Interactive Select Points feature in VTK by constantly monitoring the 'MouseMoveEvent' and obtaining the closest point on the desired actor. However, I run into some severe "jitteriness" as seen in this video (the marker is represented by a green sphere). In constrast, the marker in Interactive Select Points mode in Paraview is predictable and steady. What can I do to better replicate Paraview? Thanks, Evan Kao -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsqdmg at gmail.com Sun Jul 17 07:17:20 2016 From: jsqdmg at gmail.com (Yundi Quan) Date: Sun, 17 Jul 2016 04:17:20 -0700 Subject: [vtkusers] 3d interpolation Message-ID: Hi, I have a 100x100x100 3D data on a irregular grid. Is there a fast way to interpolate it onto a regular grid? I tried griddata from scipy. It seems to take too long. Is there a subroutine in vtk to handle such problems? Yundi -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Mon Jul 18 10:02:39 2016 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Mon, 18 Jul 2016 10:02:39 -0400 Subject: [vtkusers] Emulating Paraview 5's Interactive Select Points in VTK In-Reply-To: References: Message-ID: ParaView does use a cache for selecting, It capture the full frame buffer in the vtkHardwareSelector and then reuse that as the mouse moves around. Utkarsh On Fri, Jul 15, 2016 at 7:01 PM, Evan Kao wrote: > Hello all, > > I'm trying to emulate Paraview 5's Interactive Select Points feature in > VTK by constantly monitoring the 'MouseMoveEvent' and obtaining the closest > point on the desired actor. However, I run into some severe "jitteriness" > as seen in this video (the > marker is represented by a green sphere). In constrast, the marker in > Interactive Select Points mode in Paraview is predictable and steady. > > What can I do to better replicate Paraview? > > Thanks, > Evan Kao > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.wormser at gmx.de Tue Jul 19 03:45:14 2016 From: max.wormser at gmx.de (Maximilian Wormser) Date: Tue, 19 Jul 2016 09:45:14 +0200 Subject: [vtkusers] vtkTubeFilter doesn't create a closed loop Message-ID: <000401d1e191$7d2ec660$778c5320$@gmx.de> Hey all, I want to create closed loops with vtkTubeFilter, but at the point where the first and the last point meet there is always a misconnection. vtkStripper and vtkCleanPolyData do not help in this case. I already posted my problem to stackoverflow, but without any solutions so far. Here is a link to my submission: http://stackoverflow.com/questions/38266711/creating-a-closed-loop-with-vtkt ubefilter Here's a minimal working example to reproduce the behavior: import vtk def rendering(mapper): """Takes mapper and handles the rendering.""" actor = vtk.vtkActor() actor.SetMapper(mapper) # Create a renderer, render window, and interactor renderer = vtk.vtkRenderer() renderWindow = vtk.vtkRenderWindow() renderWindow.AddRenderer(renderer) renderWindowInteractor = vtk.vtkRenderWindowInteractor() renderWindowInteractor.SetRenderWindow(renderWindow) # Add the actors to the scene renderer.AddActor(actor) # Render and interact renderWindow.Render() renderWindowInteractor.Start() return pts = vtk.vtkPoints() pts.SetNumberOfPoints(4) pts.SetPoint(0, 0.5, 0, 0) pts.SetPoint(1, 1, 0.5, 0) pts.SetPoint(2, 0.5, 1, 0) pts.SetPoint(3, 0, 0.5, 0) lines = vtk.vtkCellArray() lines.InsertNextCell(5) lines.InsertCellPoint(0) lines.InsertCellPoint(1) lines.InsertCellPoint(2) lines.InsertCellPoint(3) lines.InsertCellPoint(0) poly = vtk.vtkPolyData() poly.SetPoints(pts) poly.SetLines(lines) tubes = vtk.vtkTubeFilter() tubes.SetInputData(poly) tubes.CappingOn() tubes.SidesShareVerticesOff() tubes.SetNumberOfSides(4) tubes.SetRadius(0.1) tubes.Update() mapper = vtk.vtkPolyDataMapper() mapper.SetInputData(tubes.GetOutput()) rendering(mapper) Thanks in advance for any help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.moelle at googlemail.com Tue Jul 19 05:11:07 2016 From: h.moelle at googlemail.com (=?UTF-8?Q?Hagen_M=c3=b6lle?=) Date: Tue, 19 Jul 2016 11:11:07 +0200 Subject: [vtkusers] vtkChartXY lines not visible when using logarithmic x axis Message-ID: <578DEEAB.40908@googlemail.com> Hi, I want to report a bug for vtkChartXY. Bug environment: a) I am using VTK 6.2. I checked my test code on machines running Windows 7 (Visual Studio 2012/2015) and Ubuntu 15.10/Ubuntu 16.04 (gcc). On all these systems the bug is visible. b) I can also reproduce the bug in VTK 7.0 (here I used an Ubuntu 16.04 machine and compiled VTK 7.0 using OpenGL2 interface). Bug description: I am using vtkChartXY to display one line. I also enabled logarithmic x axis (chartXY->GetAxis(vtkAxis::BOTTOM)->SetLogScale(true);). Nothing more special. In the compiled application I start zooming into the chart using the mouse wheel, making sure I always have a line displayed in the view. At some zoom level this line just disappears. At the zoom level the line disappears I did the following: 1. Zooming more into the chart the line will not appear again. 2. Zooming out twice (with mouse wheel) the line will reappear. How to reproduce the bug: I basically used the LinePlot example for vtkChartXY (see http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot). I added one line to the example code marked with *** (line was added after line 54 in example code). I added the full code to the end of the Email. --------------- // Add multiple line plots, setting the colors etc vtkSmartPointer chart= vtkSmartPointer::New(); *** chart.Get()->GetAxis(vtkAxis::BOTTOM)->SetLogScale(true); view->GetScene()->AddItem(chart); --------------- Compile and execute the program. See my bug description above to visualize the bug. Please contact me if you need more information. I can also provide images of the bug if needed. I hope the bug can be fixed. Hagen. #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int, char *[]) { // Create a table with some points in it vtkSmartPointer table = vtkSmartPointer::New(); vtkSmartPointer arrX = vtkSmartPointer::New(); arrX->SetName("X Axis"); table->AddColumn(arrX); vtkSmartPointer arrC = vtkSmartPointer::New(); arrC->SetName("Cosine"); table->AddColumn(arrC); vtkSmartPointer arrS = vtkSmartPointer::New(); arrS->SetName("Sine"); table->AddColumn(arrS); // Fill in the table with some example values int numPoints = 69; float inc = 7.5 / (numPoints-1); table->SetNumberOfRows(numPoints); for (int i = 0; i < numPoints; ++i) { table->SetValue(i, 0, i * inc); table->SetValue(i, 1, cos(i * inc)); table->SetValue(i, 2, sin(i * inc)); } // Set up the view vtkSmartPointer view = vtkSmartPointer::New(); view->GetRenderer()->SetBackground(1.0, 1.0, 1.0); // Add multiple line plots, setting the colors etc vtkSmartPointer chart = vtkSmartPointer::New(); chart.Get()->GetAxis(vtkAxis::BOTTOM)->SetLogScale(true); view->GetScene()->AddItem(chart); vtkPlot *line = chart->AddPlot(vtkChart::LINE); #if VTK_MAJOR_VERSION <= 5 line->SetInput(table, 0, 1); #else line->SetInputData(table, 0, 1); #endif line->SetColor(0, 255, 0, 255); line->SetWidth(1.0); line = chart->AddPlot(vtkChart::LINE); #if VTK_MAJOR_VERSION <= 5 line->SetInput(table, 0, 2); #else line->SetInputData(table, 0, 2); #endif line->SetColor(255, 0, 0, 255); line->SetWidth(5.0); // For dotted line, the line type can be from 2 to 5 for different dash/dot // patterns (see enum in vtkPen containing DASH_LINE, value 2): #ifndef WIN32 line->GetPen()->SetLineType(vtkPen::DASH_LINE); #endif // (ifdef-ed out on Windows because DASH_LINE does not work on Windows // machines with built-in Intel HD graphics card...) //view->GetRenderWindow()->SetMultiSamples(0); // Start interactor view->GetInteractor()->Initialize(); view->GetInteractor()->Start(); return EXIT_SUCCESS; } From lihouxing at yeah.net Tue Jul 19 05:01:45 2016 From: lihouxing at yeah.net (lihouxing) Date: Tue, 19 Jul 2016 17:01:45 +0800 Subject: [vtkusers] vtkTubeFilter doesn't create a closed loop References: <000401d1e191$7d2ec660$778c5320$@gmx.de> Message-ID: <76an62q0k0j5buuervejvgju.1468918905065@email.android.com> An HTML attachment was scrubbed... URL: From max.wormser at gmx.de Tue Jul 19 06:38:29 2016 From: max.wormser at gmx.de (Maximilian Wormser) Date: Tue, 19 Jul 2016 12:38:29 +0200 Subject: [vtkusers] vtkTubeFilter doesn't create a closed loop In-Reply-To: <76an62q0k0j5buuervejvgju.1468918905065@email.android.com> References: <000401d1e191$7d2ec660$778c5320$@gmx.de> <76an62q0k0j5buuervejvgju.1468918905065@email.android.com> Message-ID: <001101d1e1a9$b13e5570$13bb0050$@gmx.de> Good idea, but SetCappingOff or SetCappingOn do not change the underlying problem. Von: lihouxing [mailto:lihouxing at yeah.net] Gesendet: Dienstag, 19. Juli 2016 11:02 An: max.wormser at gmx.de; vtkusers at vtk.org Betreff: Re:[vtkusers] vtkTubeFilter doesn't create a closed loop maybe you should set "capping off" ???????? ? Maximilian Wormser >?2016?7?19? ??3:51??? Hey all, I want to create closed loops with vtkTubeFilter, but at the point where the first and the last point meet there is always a misconnection. vtkStripper and vtkCleanPolyData do not help in this case. I already posted my problem to stackoverflow, but without any solutions so far. Here is a link to my submission: http://stackoverflow.com/questions/38266711/creating-a-closed-loop-with-vtktubefilter Here?s a minimal working example to reproduce the behavior: import vtk def rendering(mapper): """Takes mapper and handles the rendering.""" actor = vtk.vtkActor() actor.SetMapper(mapper) # Create a renderer, render window, and interactor renderer = vtk.vtkRenderer() renderWindow = vtk.vtkRenderWindow() renderWindow.AddRenderer(renderer) renderWindowInteractor = vtk.vtkRenderWindowInteractor() renderWindowInteractor.SetRenderWindow(renderWindow) # Add the actors to the scene renderer.AddActor(actor) # Render and interact renderWindow.Render() renderWindowInteractor.Start() return pts = vtk.vtkPoints() pts.SetNumberOfPoints(4) pts.SetPoint(0, 0.5, 0, 0) pts.SetPoint(1, 1, 0.5, 0) pts.SetPoint(2, 0.5, 1, 0) pts.SetPoint(3, 0, 0.5, 0) lines = vtk.vtkCellArray() lines.InsertNextCell(5) lines.InsertCellPoint(0) lines.InsertCellPoint(1) lines.InsertCellPoint(2) lines.InsertCellPoint(3) lines.InsertCellPoint(0) poly = vtk.vtkPolyData() poly.SetPoints(pts) poly.SetLines(lines) tubes = vtk.vtkTubeFilter() tubes.SetInputData(poly) tubes.CappingOn() tubes.SidesShareVerticesOff() tubes.SetNumberOfSides(4) tubes.SetRadius(0.1) tubes.Update() mapper = vtk.vtkPolyDataMapper() mapper.SetInputData(tubes.GetOutput()) rendering(mapper) Thanks in advance for any help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Jul 19 08:58:11 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 19 Jul 2016 06:58:11 -0600 Subject: [vtkusers] vtkTubeFilter doesn't create a closed loop In-Reply-To: <001101d1e1a9$b13e5570$13bb0050$@gmx.de> References: <000401d1e191$7d2ec660$778c5320$@gmx.de> <76an62q0k0j5buuervejvgju.1468918905065@email.android.com> <001101d1e1a9$b13e5570$13bb0050$@gmx.de> Message-ID: Hi Maximilian, I did a quick read-through of the code for vtkTubeFilter, and it doesn't check to see if the first and last points are the same point. So unless someone provides a fix, you might be out of luck. - David On Tue, Jul 19, 2016 at 4:38 AM, Maximilian Wormser wrote: > Good idea, but SetCappingOff or SetCappingOn do not change the underlying > problem. > > > > *Von:* lihouxing [mailto:lihouxing at yeah.net] > *Gesendet:* Dienstag, 19. Juli 2016 11:02 > *An:* max.wormser at gmx.de; vtkusers at vtk.org > *Betreff:* Re:[vtkusers] vtkTubeFilter doesn't create a closed loop > > > > maybe you should set "capping off" > > > > > > > > ???????? > > ? Maximilian Wormser ?2016?7?19? ??3:51??? > > Hey all, > > > > I want to create closed loops with vtkTubeFilter, but at the point where > the first and the last point meet there is always a misconnection. > vtkStripper and vtkCleanPolyData do not help in this case. I already posted > my problem to stackoverflow, but without any solutions so far. Here is a > link to my submission: > http://stackoverflow.com/questions/38266711/creating-a-closed-loop-with-vtktubefilter > > > > Here?s a minimal working example to reproduce the behavior: > > > > import vtk > > > > > > def rendering(mapper): > > """Takes mapper and handles the rendering.""" > > actor = vtk.vtkActor() > > actor.SetMapper(mapper) > > > > # Create a renderer, render window, and interactor > > renderer = vtk.vtkRenderer() > > renderWindow = vtk.vtkRenderWindow() > > renderWindow.AddRenderer(renderer) > > renderWindowInteractor = vtk.vtkRenderWindowInteractor() > > renderWindowInteractor.SetRenderWindow(renderWindow) > > # Add the actors to the scene > > renderer.AddActor(actor) > > # Render and interact > > renderWindow.Render() > > renderWindowInteractor.Start() > > return > > > > pts = vtk.vtkPoints() > > pts.SetNumberOfPoints(4) > > pts.SetPoint(0, 0.5, 0, 0) > > pts.SetPoint(1, 1, 0.5, 0) > > pts.SetPoint(2, 0.5, 1, 0) > > pts.SetPoint(3, 0, 0.5, 0) > > > > lines = vtk.vtkCellArray() > > lines.InsertNextCell(5) > > lines.InsertCellPoint(0) > > lines.InsertCellPoint(1) > > lines.InsertCellPoint(2) > > lines.InsertCellPoint(3) > > lines.InsertCellPoint(0) > > > > poly = vtk.vtkPolyData() > > poly.SetPoints(pts) > > poly.SetLines(lines) > > > > tubes = vtk.vtkTubeFilter() > > tubes.SetInputData(poly) > > tubes.CappingOn() > > tubes.SidesShareVerticesOff() > > tubes.SetNumberOfSides(4) > > tubes.SetRadius(0.1) > > tubes.Update() > > > > mapper = vtk.vtkPolyDataMapper() > > mapper.SetInputData(tubes.GetOutput()) > > rendering(mapper) > > > > Thanks in advance for any help! > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.wormser at gmx.de Tue Jul 19 09:09:11 2016 From: max.wormser at gmx.de (Maximilian Wormser) Date: Tue, 19 Jul 2016 15:09:11 +0200 Subject: [vtkusers] vtkTubeFilter doesn't create a closed loop In-Reply-To: References: <000401d1e191$7d2ec660$778c5320$@gmx.de> <76an62q0k0j5buuervejvgju.1468918905065@email.android.com> <001101d1e1a9$b13e5570$13bb0050$@gmx.de> Message-ID: <002001d1e1be$be353950$3a9fabf0$@gmx.de> Oh what a shame :( do you know where the best place is to submit this as a feature request? Von: David Gobbi [mailto:david.gobbi at gmail.com] Gesendet: Dienstag, 19. Juli 2016 14:58 An: Maximilian Wormser Cc: VTK Users Betreff: Re: [vtkusers] vtkTubeFilter doesn't create a closed loop Hi Maximilian, I did a quick read-through of the code for vtkTubeFilter, and it doesn't check to see if the first and last points are the same point. So unless someone provides a fix, you might be out of luck. - David On Tue, Jul 19, 2016 at 4:38 AM, Maximilian Wormser > wrote: Good idea, but SetCappingOff or SetCappingOn do not change the underlying problem. Von: lihouxing [mailto:lihouxing at yeah.net ] Gesendet: Dienstag, 19. Juli 2016 11:02 An: max.wormser at gmx.de ; vtkusers at vtk.org Betreff: Re:[vtkusers] vtkTubeFilter doesn't create a closed loop maybe you should set "capping off" ???????? ? Maximilian Wormser >?2016?7?19? ??3:51??? Hey all, I want to create closed loops with vtkTubeFilter, but at the point where the first and the last point meet there is always a misconnection. vtkStripper and vtkCleanPolyData do not help in this case. I already posted my problem to stackoverflow, but without any solutions so far. Here is a link to my submission: http://stackoverflow.com/questions/38266711/creating-a-closed-loop-with-vtktubefilter Here?s a minimal working example to reproduce the behavior: import vtk def rendering(mapper): """Takes mapper and handles the rendering.""" actor = vtk.vtkActor() actor.SetMapper(mapper) # Create a renderer, render window, and interactor renderer = vtk.vtkRenderer() renderWindow = vtk.vtkRenderWindow() renderWindow.AddRenderer(renderer) renderWindowInteractor = vtk.vtkRenderWindowInteractor() renderWindowInteractor.SetRenderWindow(renderWindow) # Add the actors to the scene renderer.AddActor(actor) # Render and interact renderWindow.Render() renderWindowInteractor.Start() return pts = vtk.vtkPoints() pts.SetNumberOfPoints(4) pts.SetPoint(0, 0.5, 0, 0) pts.SetPoint(1, 1, 0.5, 0) pts.SetPoint(2, 0.5, 1, 0) pts.SetPoint(3, 0, 0.5, 0) lines = vtk.vtkCellArray() lines.InsertNextCell(5) lines.InsertCellPoint(0) lines.InsertCellPoint(1) lines.InsertCellPoint(2) lines.InsertCellPoint(3) lines.InsertCellPoint(0) poly = vtk.vtkPolyData() poly.SetPoints(pts) poly.SetLines(lines) tubes = vtk.vtkTubeFilter() tubes.SetInputData(poly) tubes.CappingOn() tubes.SidesShareVerticesOff() tubes.SetNumberOfSides(4) tubes.SetRadius(0.1) tubes.Update() mapper = vtk.vtkPolyDataMapper() mapper.SetInputData(tubes.GetOutput()) rendering(mapper) Thanks in advance for any help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Tue Jul 19 09:30:34 2016 From: berk.geveci at kitware.com (Berk Geveci) Date: Tue, 19 Jul 2016 09:30:34 -0400 Subject: [vtkusers] Kitware is hiring Message-ID: Apologies for duplicate postings ======================== Hi folks, Kitware is seeking to hire highly skilled research and development engineers (R&D Engineers) with strong software engineering experience to work on biomechanical modelling and simulation projects. Kitware is developing surgical simulation and computational tools for patient-specific structural and fluid dynamics models that would allow surgeons to plan surgeries and to practice and advance their surgical skills in a risk-free environment. The target clinical applications include open and laparoscopic surgical procedures such as cardiovascular interventions, neurosurgery, nasal surgery, and orthopedic surgery. For the full posting see: https://goo.gl/2VQ5v1 JOB DESCRIPTION Kitware is seeking to hire highly skilled Research and Development Engineers (R&D Engineers) with strong software engineering experience to work on biomechanical modelling and simulation projects. Kitware is developing surgical simulation and computational tools for patient-specific structural and fluid dynamics models that would allow surgeons to plan surgeries and to practice and advance their surgical skills in a risk-free environment. The target clinical applications include open and laparoscopic surgical procedures such as cardiovascular interventions, neurosurgery, nasal surgery, and orthopedic surgery. Qualifications * Masters degree or PhD. in mechanical engineering, applied mathematics or a related field with emphasis in biomedical applications. * Experience in simulation workflow i.e tuning simulations by varying their discretization, constitutive equations, and solver parameters to obtain convergence with minimal computational effort is strongly desirable. * Knowledge of inner-workings of numerical methods such as finite elements, finite difference and numerical solvers is extremely desirable. * Specific knowledge of biomechanical modeling of bone and soft tissue as well as the interaction between these tissues and other materials. * Experience in programming a simulation software and participation in software development workflows is desirable. * Prior experience with other open source physics-based medical simulation software is a plus. * Prior experience developing algorithms to perform fluid-structure interaction and computational fluid dynamics simulations is a plus. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Tue Jul 19 09:46:35 2016 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 19 Jul 2016 13:46:35 +0000 Subject: [vtkusers] vtkTubeFilter doesn't create a closed loop In-Reply-To: <002001d1e1be$be353950$3a9fabf0$@gmx.de> References: <000401d1e191$7d2ec660$778c5320$@gmx.de> <76an62q0k0j5buuervejvgju.1468918905065@email.android.com> <001101d1e1a9$b13e5570$13bb0050$@gmx.de> <002001d1e1be$be353950$3a9fabf0$@gmx.de> Message-ID: If start and end points of the tube are the same then http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html will merge them. Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Maximilian Wormser Sent: July 19, 2016 9:09 To: 'David Gobbi' Cc: 'VTK Users' Subject: Re: [vtkusers] vtkTubeFilter doesn't create a closed loop Oh what a shame :( do you know where the best place is to submit this as a feature request? Von: David Gobbi [mailto:david.gobbi at gmail.com] Gesendet: Dienstag, 19. Juli 2016 14:58 An: Maximilian Wormser > Cc: VTK Users > Betreff: Re: [vtkusers] vtkTubeFilter doesn't create a closed loop Hi Maximilian, I did a quick read-through of the code for vtkTubeFilter, and it doesn't check to see if the first and last points are the same point. So unless someone provides a fix, you might be out of luck. - David On Tue, Jul 19, 2016 at 4:38 AM, Maximilian Wormser > wrote: Good idea, but SetCappingOff or SetCappingOn do not change the underlying problem. Von: lihouxing [mailto:lihouxing at yeah.net] Gesendet: Dienstag, 19. Juli 2016 11:02 An: max.wormser at gmx.de; vtkusers at vtk.org Betreff: Re:[vtkusers] vtkTubeFilter doesn't create a closed loop maybe you should set "capping off" ???????? ? Maximilian Wormser >?2016?7?19? ??3:51??? Hey all, I want to create closed loops with vtkTubeFilter, but at the point where the first and the last point meet there is always a misconnection. vtkStripper and vtkCleanPolyData do not help in this case. I already posted my problem to stackoverflow, but without any solutions so far. Here is a link to my submission: http://stackoverflow.com/questions/38266711/creating-a-closed-loop-with-vtktubefilter Here?s a minimal working example to reproduce the behavior: import vtk def rendering(mapper): """Takes mapper and handles the rendering.""" actor = vtk.vtkActor() actor.SetMapper(mapper) # Create a renderer, render window, and interactor renderer = vtk.vtkRenderer() renderWindow = vtk.vtkRenderWindow() renderWindow.AddRenderer(renderer) renderWindowInteractor = vtk.vtkRenderWindowInteractor() renderWindowInteractor.SetRenderWindow(renderWindow) # Add the actors to the scene renderer.AddActor(actor) # Render and interact renderWindow.Render() renderWindowInteractor.Start() return pts = vtk.vtkPoints() pts.SetNumberOfPoints(4) pts.SetPoint(0, 0.5, 0, 0) pts.SetPoint(1, 1, 0.5, 0) pts.SetPoint(2, 0.5, 1, 0) pts.SetPoint(3, 0, 0.5, 0) lines = vtk.vtkCellArray() lines.InsertNextCell(5) lines.InsertCellPoint(0) lines.InsertCellPoint(1) lines.InsertCellPoint(2) lines.InsertCellPoint(3) lines.InsertCellPoint(0) poly = vtk.vtkPolyData() poly.SetPoints(pts) poly.SetLines(lines) tubes = vtk.vtkTubeFilter() tubes.SetInputData(poly) tubes.CappingOn() tubes.SidesShareVerticesOff() tubes.SetNumberOfSides(4) tubes.SetRadius(0.1) tubes.Update() mapper = vtk.vtkPolyDataMapper() mapper.SetInputData(tubes.GetOutput()) rendering(mapper) Thanks in advance for any help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Jul 19 10:05:38 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 19 Jul 2016 08:05:38 -0600 Subject: [vtkusers] vtkTubeFilter doesn't create a closed loop In-Reply-To: References: <000401d1e191$7d2ec660$778c5320$@gmx.de> <76an62q0k0j5buuervejvgju.1468918905065@email.android.com> <001101d1e1a9$b13e5570$13bb0050$@gmx.de> <002001d1e1be$be353950$3a9fabf0$@gmx.de> Message-ID: That's a good point. If the first segment and the last segment of the loop are in exactly the same direction, then the "ends" of the generated tube should coincide with each other exactly. On Tue, Jul 19, 2016 at 7:46 AM, Andras Lasso wrote: > If start and end points of the tube are the same then > http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html will merge > them. > > > > Andras > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Maximilian > Wormser > *Sent:* July 19, 2016 9:09 > *To:* 'David Gobbi' > *Cc:* 'VTK Users' > *Subject:* Re: [vtkusers] vtkTubeFilter doesn't create a closed loop > > > > Oh what a shame :( do you know where the best place is to submit this as a > feature request? > > > > *Von:* David Gobbi [mailto:david.gobbi at gmail.com ] > *Gesendet:* Dienstag, 19. Juli 2016 14:58 > *An:* Maximilian Wormser > *Cc:* VTK Users > *Betreff:* Re: [vtkusers] vtkTubeFilter doesn't create a closed loop > > > > Hi Maximilian, > > > > I did a quick read-through of the code for vtkTubeFilter, and it doesn't > check to see if the first and last points are the same point. So unless > someone provides a fix, you might be out of luck. > > > > - David > > > > On Tue, Jul 19, 2016 at 4:38 AM, Maximilian Wormser > wrote: > > Good idea, but SetCappingOff or SetCappingOn do not change the underlying > problem. > > > > *Von:* lihouxing [mailto:lihouxing at yeah.net] > *Gesendet:* Dienstag, 19. Juli 2016 11:02 > *An:* max.wormser at gmx.de; vtkusers at vtk.org > *Betreff:* Re:[vtkusers] vtkTubeFilter doesn't create a closed loop > > > > maybe you should set "capping off" > > > > > > > > ???????? > > ? Maximilian Wormser ?2016?7?19? ??3:51??? > > Hey all, > > > > I want to create closed loops with vtkTubeFilter, but at the point where > the first and the last point meet there is always a misconnection. > vtkStripper and vtkCleanPolyData do not help in this case. I already posted > my problem to stackoverflow, but without any solutions so far. Here is a > link to my submission: > http://stackoverflow.com/questions/38266711/creating-a-closed-loop-with-vtktubefilter > > > > Here?s a minimal working example to reproduce the behavior: > > > > import vtk > > > > > > def rendering(mapper): > > """Takes mapper and handles the rendering.""" > > actor = vtk.vtkActor() > > actor.SetMapper(mapper) > > > > # Create a renderer, render window, and interactor > > renderer = vtk.vtkRenderer() > > renderWindow = vtk.vtkRenderWindow() > > renderWindow.AddRenderer(renderer) > > renderWindowInteractor = vtk.vtkRenderWindowInteractor() > > renderWindowInteractor.SetRenderWindow(renderWindow) > > # Add the actors to the scene > > renderer.AddActor(actor) > > # Render and interact > > renderWindow.Render() > > renderWindowInteractor.Start() > > return > > > > pts = vtk.vtkPoints() > > pts.SetNumberOfPoints(4) > > pts.SetPoint(0, 0.5, 0, 0) > > pts.SetPoint(1, 1, 0.5, 0) > > pts.SetPoint(2, 0.5, 1, 0) > > pts.SetPoint(3, 0, 0.5, 0) > > > > lines = vtk.vtkCellArray() > > lines.InsertNextCell(5) > > lines.InsertCellPoint(0) > > lines.InsertCellPoint(1) > > lines.InsertCellPoint(2) > > lines.InsertCellPoint(3) > > lines.InsertCellPoint(0) > > > > poly = vtk.vtkPolyData() > > poly.SetPoints(pts) > > poly.SetLines(lines) > > > > tubes = vtk.vtkTubeFilter() > > tubes.SetInputData(poly) > > tubes.CappingOn() > > tubes.SidesShareVerticesOff() > > tubes.SetNumberOfSides(4) > > tubes.SetRadius(0.1) > > tubes.Update() > > > > mapper = vtk.vtkPolyDataMapper() > > mapper.SetInputData(tubes.GetOutput()) > > rendering(mapper) > > > > Thanks in advance for any help! > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From max.wormser at gmx.de Tue Jul 19 10:58:39 2016 From: max.wormser at gmx.de (mwormser) Date: Tue, 19 Jul 2016 07:58:39 -0700 (MST) Subject: [vtkusers] vtkTubeFilter doesn't create a closed loop In-Reply-To: References: <000401d1e191$7d2ec660$778c5320$@gmx.de> <76an62q0k0j5buuervejvgju.1468918905065@email.android.com> <001101d1e1a9$b13e5570$13bb0050$@gmx.de> <002001d1e1be$be353950$3a9fabf0$@gmx.de> Message-ID: <1468940319802-5739290.post@n5.nabble.com> Another good idea, thanks! But that means that instead of defining i.e. a square by 4 points I'd have to choose a 5th one that lies on one line in order for them to meet at 0? angle. But still, considering the feature that I want is apparently not implemented yet, I might use that as a fix. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkTubeFilter-doesn-t-create-a-closed-loop-tp5739279p5739290.html Sent from the VTK - Users mailing list archive at Nabble.com. From magnus_elden at hotmail.com Wed Jul 20 08:06:10 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Wed, 20 Jul 2016 14:06:10 +0200 Subject: [vtkusers] How to enable the xdmf module and read xdmf files. Message-ID: HI, I downloaded and built the XDMF source from www.xdmf.org by cloning git clone git://xdmf.org/Xdmf.git. I then went to CMake and enabled Module_vtkxdmf2 and VTK_USE_SYSTEM_XDMF2 and set the directory path. I tried building it and after some hassle I managed to get it done. However, I was unable to include any XDMF reader headers so I guessed that I also needed to enable the Module_vtkIOXdmf2 so I did that. Configured and built again, but not I was not able to build the IO module because XDMFArray was ambiguous and several functions and types were not defined. I am building this on windows 10 using Visual Studio 2015. I am using Cmake 3.6.0. What is the difference between XDMF, XDMF2 and XDMF3? How can I read an .xdmf file to volume render it? What version of VTK do I need? What version of XDMF do I need? Where can I get these libraries? Anything else I should know? I have been wrestling with this for about a week now and I must be doing something wrong. I was also unable to find any tutorials or guides on how to achieve this. If there are any, please point me in the right direction. Yours, Magnus Elden -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Jul 20 08:34:55 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 20 Jul 2016 08:34:55 -0400 Subject: [vtkusers] How to enable the xdmf module and read xdmf files. In-Reply-To: References: Message-ID: On Wed, Jul 20, 2016 at 8:06 AM, Magnus Elden wrote: > HI, > > > > I downloaded and built the XDMF source from www.xdmf.org by cloning git > clone git://xdmf.org/Xdmf.git. > > I then went to CMake and enabled Module_vtkxdmf2 and VTK_USE_SYSTEM_XDMF2 > and set the directory path. I tried building it and after some hassle I > managed to get it done. However, I was unable to include any XDMF reader > headers so I guessed that I also needed to enable the Module_vtkIOXdmf2 so > I did that. Configured and built again, but not I was not able to build the > IO module because XDMFArray was ambiguous and several functions and types > were not defined. > > > I recommend against VTK_USE_SYSTEM_XDMF* since that capability is largely unproven/untested. Instead, let VTK use the version of XDMF in XDMF. As of a month ago the version in VTK is the same as the tip of the master branch of xdmf with extraneous things that VTK doesn't use removed. Prior to that there was much more divergence. > I am building this on windows 10 using Visual Studio 2015. I am using > Cmake 3.6.0. > > > > What is the difference between XDMF, XDMF2 and XDMF3? > Different revisions of the same library/format. See xdmf.org for details. VTK has two revisions of the same library because of technical differences between them the most important of which is that 3 requires boost headers which VTK does not provide. > > How can I read an .xdmf file to volume render it? > You might want to just download a ParaView binary and open the xdmf file. But you can do the same from VTK starting with any volume rendering example and switching the source/reader to vtkXdmf*Reader. What version of VTK do I need? > XDMF was promoted from ParaView to VTK in VTK version 5.10 as I recall. Anything after that should be fine. > What version of XDMF do I need? > I recommend xdmf3, which is as of a few months ago the tip of the one true xdmf repo. Xdmf2 is back in the history if you need it. > Where can I get these libraries? > See xdmf.org for instructions on how to get and build any of the versions. But as I said, just use VTK's version for simplicity. > Anything else I should know? > > For xdmf3 you need to download and untar boost somewhere on your system and tell cmake where it is. > > > I have been wrestling with this for about a week now and I must be doing > something wrong. > > I was also unable to find any tutorials or guides on how to achieve this. > If there are any, please point me in the right direction. > > > > Yours, > > Magnus Elden > > good luck > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Wed Jul 20 08:46:22 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Wed, 20 Jul 2016 08:46:22 -0400 Subject: [vtkusers] How to enable the xdmf module and read xdmf files. In-Reply-To: References: Message-ID: On Wed, Jul 20, 2016 at 8:34 AM, David E DeMarle wrote: > > > use the version of XDMF in XDMF. As of a month ago the version in VTK is > the same as the tip of the master branch of > typo: use the version of XDMF in VTK. > > XDMF was promoted from ParaView to VTK in VTK version 5.10 as I recall. > Anything after that should be fine. > mistake: 6.0 not 5.10 -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Wed Jul 20 09:55:58 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Wed, 20 Jul 2016 15:55:58 +0200 Subject: [vtkusers] vtkImageReslice rotation and resampling question In-Reply-To: References: Message-ID: Hi David, I?ve been working through your advice and I get an error: Attempt to get an input array for an index that has not been specified My code looks like yours: vtkSmartPointer imageReslice = vtkSmartPointer::New(); imageReslice->SetInputData(kernelImageData); imageReslice->SetInformation(doseGrid->GetInformation()); imageReslice->SetInterpolationModeToLinear(); imageReslice->SetResliceTransform(transform); imageReslice->Update(); It seems like the error is coming from doseGrid (when I comment it out, the error goes away). The dose grid was initialised like this: vtkSmartPointer doseGrid = vtkSmartPointer::New(); doseGrid->SetOrigin(0.,0.,0.); doseGrid->SetDimensions(500,500,500); doseGrid->SetSpacing(0.5,0.5,0.5); doseGrid->AllocateScalars(VTK_DOUBLE,1); Any idea what I?ve done wrong? Regards, Richard > On 08 Jul 2016, at 17:42, David Gobbi wrote: > > Hi Richard, > > Yes, you can use vtkImageReslice for this. It would work like this: > > Let's define T as the transform that gives the position and orientation of the kernel within the larger image. To resample the kernel, you would give vtkImageReslice the inverse of T as the ResliceTransform, and you would supply the larger image as a reference image, e.g. the code would look like this (using Python): > > reslice = vtkImageReslice() > reslice.SetInputData(kernel_image) > reslice.SetInformationInput(big_image) > reslice.SetResliceTransform(inverse_transform) > reslice.SetInterpolationModeToLinear() > reslice.Update() > > This will produce something like the bottom image from your original email. In order for the kernel resampling to work properly, your kernel image must have a border which is all zeros. If this must be done over and over again (i.e. if you need to superimpose the kernel hundreds of times at various locations within the larger image) then the above procedure won't be fast enough. Another possibility is to use the vtkImageInterpolator class and some of your own ingenuity to create a fast method for resampling and superposing the kernel. > > During my PhD, I wrote a custom VTK class that superposed kernels into a volume in order to do 3D ultrasound reconstruction, but I never generalized it: > https://github.com/dgobbi/AIGS/blob/master/Ultrasound/vtkFreehandUltrasound.h > > Some further development of this code was done for the PLUS toolkit: > https://app.assembla.com/spaces/plus/subversion/source/HEAD/trunk/PlusLib/src/PlusVolumeReconstruction > > However, as far as I know, VTK doesn't provide an efficient general-purpose way of superposing kernels at different positions and orientations into a 3D volume. > > - David > > > > On Fri, Jul 8, 2016 at 7:07 AM, Richard Brown > wrote: > > Hi all, > > I have a fairly simple problem, and one that I?m sure has previously been solved here, but I?m struggling to find the right keywords to find a useful thread. > > I would like to superpose a kernel vtkImageData (kernel.png) onto a grid vtkImageData (grid.png). The kernel will be rotated (superpose.png), however, so the kernel will requiring resampling before superposition is possible (superposition_and_resample.png). > > What is the best way to do this? I feel like I can simply use vtkImageReslice, but I?m not 100%. > > Thanks in advance for any pointers. > > Regards, > Richard > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jul 20 10:01:32 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 20 Jul 2016 08:01:32 -0600 Subject: [vtkusers] vtkImageReslice rotation and resampling question In-Reply-To: References: Message-ID: Hi Richard, SetInformationInput(), not SetInformation(). The former (the one you need to use) requires a vtkImageData as input. It provides the reference image that defines the geometry for the reslicing. - David On Wed, Jul 20, 2016 at 7:55 AM, Richard Brown wrote: > Hi David, > > I?ve been working through your advice and I get an error: > Attempt to get an input array for an index that has not been specified > > My code looks like yours: > vtkSmartPointer imageReslice = vtkSmartPointer< > vtkImageReslice>::New(); > > imageReslice->SetInputData(kernelImageData); > > imageReslice->SetInformation(doseGrid->GetInformation()); > > imageReslice->SetInterpolationModeToLinear(); > > imageReslice->SetResliceTransform(transform); > > imageReslice->Update(); > > > It seems like the error is coming from doseGrid (when I comment it out, > the error goes away). The dose grid was initialised like this: > > vtkSmartPointer doseGrid = vtkSmartPointer::New(); > > doseGrid->SetOrigin(0.,0.,0.); > > doseGrid->SetDimensions(500,500,500); > > doseGrid->SetSpacing(0.5,0.5,0.5); > > doseGrid->AllocateScalars(VTK_DOUBLE,1); > > > Any idea what I?ve done wrong? > > Regards, > Richard > > On 08 Jul 2016, at 17:42, David Gobbi wrote: > > Hi Richard, > > Yes, you can use vtkImageReslice for this. It would work like this: > > Let's define T as the transform that gives the position and orientation of > the kernel within the larger image. To resample the kernel, you would give > vtkImageReslice the inverse of T as the ResliceTransform, and you would > supply the larger image as a reference image, e.g. the code would look like > this (using Python): > > reslice = vtkImageReslice() > reslice.SetInputData(kernel_image) > reslice.SetInformationInput(big_image) > reslice.SetResliceTransform(inverse_transform) > reslice.SetInterpolationModeToLinear() > reslice.Update() > > This will produce something like the bottom image from your original > email. In order for the kernel resampling to work properly, your kernel > image must have a border which is all zeros. If this must be done over and > over again (i.e. if you need to superimpose the kernel hundreds of times at > various locations within the larger image) then the above procedure won't > be fast enough. Another possibility is to use the vtkImageInterpolator > class and some of your own ingenuity to create a fast method for resampling > and superposing the kernel. > > During my PhD, I wrote a custom VTK class that superposed kernels into a > volume in order to do 3D ultrasound reconstruction, but I never generalized > it: > > https://github.com/dgobbi/AIGS/blob/master/Ultrasound/vtkFreehandUltrasound.h > > Some further development of this code was done for the PLUS toolkit: > > https://app.assembla.com/spaces/plus/subversion/source/HEAD/trunk/PlusLib/src/PlusVolumeReconstruction > > However, as far as I know, VTK doesn't provide an efficient > general-purpose way of superposing kernels at different positions and > orientations into a 3D volume. > > - David > > > > On Fri, Jul 8, 2016 at 7:07 AM, Richard Brown > wrote: > >> >> Hi all, >> >> I have a fairly simple problem, and one that I?m sure has previously been >> solved here, but I?m struggling to find the right keywords to find a useful >> thread. >> >> I would like to superpose a kernel vtkImageData (kernel.png) onto a grid >> vtkImageData (grid.png). The kernel will be rotated (superpose.png), >> however, so the kernel will requiring resampling before superposition is >> possible (superposition_and_resample.png). >> >> What is the best way to do this? I feel like I can simply use >> vtkImageReslice, but I?m not 100%. >> >> Thanks in advance for any pointers. >> >> Regards, >> Richard >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Wed Jul 20 10:11:22 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Wed, 20 Jul 2016 16:11:22 +0200 Subject: [vtkusers] vtkImageReslice rotation and resampling question In-Reply-To: References: Message-ID: David, That sorted it, thanks. So the resampled kernel has the same dimensions as the dose grid? My kernel is very small compared to my dose grid, so superposition will be slower than necessary. Is this why, in your original response, you said the method isn?t very fast if it needs to be used many times? Regards, Richard > On 20 Jul 2016, at 16:01, David Gobbi wrote: > > Hi Richard, > > SetInformationInput(), not SetInformation(). The former (the one you need to use) requires a vtkImageData as input. It provides the reference image that defines the geometry for the reslicing. > > - David > > On Wed, Jul 20, 2016 at 7:55 AM, Richard Brown > wrote: > Hi David, > > I?ve been working through your advice and I get an error: > Attempt to get an input array for an index that has not been specified > > My code looks like yours: > vtkSmartPointer imageReslice = vtkSmartPointer::New(); > imageReslice->SetInputData(kernelImageData); > imageReslice->SetInformation(doseGrid->GetInformation()); > imageReslice->SetInterpolationModeToLinear(); > imageReslice->SetResliceTransform(transform); > imageReslice->Update(); > > It seems like the error is coming from doseGrid (when I comment it out, the error goes away). The dose grid was initialised like this: > vtkSmartPointer doseGrid = vtkSmartPointer::New(); > doseGrid->SetOrigin(0.,0.,0.); > doseGrid->SetDimensions(500,500,500); > doseGrid->SetSpacing(0.5,0.5,0.5); > doseGrid->AllocateScalars(VTK_DOUBLE,1); > > Any idea what I?ve done wrong? > > Regards, > Richard > >> On 08 Jul 2016, at 17:42, David Gobbi > wrote: >> >> Hi Richard, >> >> Yes, you can use vtkImageReslice for this. It would work like this: >> >> Let's define T as the transform that gives the position and orientation of the kernel within the larger image. To resample the kernel, you would give vtkImageReslice the inverse of T as the ResliceTransform, and you would supply the larger image as a reference image, e.g. the code would look like this (using Python): >> >> reslice = vtkImageReslice() >> reslice.SetInputData(kernel_image) >> reslice.SetInformationInput(big_image) >> reslice.SetResliceTransform(inverse_transform) >> reslice.SetInterpolationModeToLinear() >> reslice.Update() >> >> This will produce something like the bottom image from your original email. In order for the kernel resampling to work properly, your kernel image must have a border which is all zeros. If this must be done over and over again (i.e. if you need to superimpose the kernel hundreds of times at various locations within the larger image) then the above procedure won't be fast enough. Another possibility is to use the vtkImageInterpolator class and some of your own ingenuity to create a fast method for resampling and superposing the kernel. >> >> During my PhD, I wrote a custom VTK class that superposed kernels into a volume in order to do 3D ultrasound reconstruction, but I never generalized it: >> https://github.com/dgobbi/AIGS/blob/master/Ultrasound/vtkFreehandUltrasound.h >> >> Some further development of this code was done for the PLUS toolkit: >> https://app.assembla.com/spaces/plus/subversion/source/HEAD/trunk/PlusLib/src/PlusVolumeReconstruction >> >> However, as far as I know, VTK doesn't provide an efficient general-purpose way of superposing kernels at different positions and orientations into a 3D volume. >> >> - David >> >> >> >> On Fri, Jul 8, 2016 at 7:07 AM, Richard Brown > wrote: >> >> Hi all, >> >> I have a fairly simple problem, and one that I?m sure has previously been solved here, but I?m struggling to find the right keywords to find a useful thread. >> >> I would like to superpose a kernel vtkImageData (kernel.png) onto a grid vtkImageData (grid.png). The kernel will be rotated (superpose.png), however, so the kernel will requiring resampling before superposition is possible (superposition_and_resample.png). >> >> What is the best way to do this? I feel like I can simply use vtkImageReslice, but I?m not 100%. >> >> Thanks in advance for any pointers. >> >> Regards, >> Richard >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jul 20 10:58:30 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 20 Jul 2016 08:58:30 -0600 Subject: [vtkusers] vtkImageReslice rotation and resampling question In-Reply-To: References: Message-ID: Hi Richard, Yes, the resampled kernel will be the full size of your dose grid. To avoid this, you would have to compute for yourself what the bounds of the resampled kernel are, and then use the reslice->SetOutputExtent() method to declare those bounds. Or, you could avoid using vtkImageReslice altogether and use vtkImageInterpolator directly instead. The best option, if your kernel is defined by an analytic function, is to transform the x,y,z coords of that function and evaluate the dose directly on your grid. - David On Wed, Jul 20, 2016 at 8:11 AM, Richard Brown wrote: > David, > > That sorted it, thanks. > > So the resampled kernel has the same dimensions as the dose grid? My > kernel is very small compared to my dose grid, so superposition will be > slower than necessary. > > Is this why, in your original response, you said the method isn?t very > fast if it needs to be used many times? > > Regards, > Richard > > On 20 Jul 2016, at 16:01, David Gobbi wrote: > > Hi Richard, > > SetInformationInput(), not SetInformation(). The former (the one you need > to use) requires a vtkImageData as input. It provides the reference image > that defines the geometry for the reslicing. > > - David > > On Wed, Jul 20, 2016 at 7:55 AM, Richard Brown > wrote: > >> Hi David, >> >> I?ve been working through your advice and I get an error: >> Attempt to get an input array for an index that has not been specified >> >> My code looks like yours: >> vtkSmartPointer imageReslice = vtkSmartPointer< >> vtkImageReslice>::New(); >> >> imageReslice->SetInputData(kernelImageData); >> >> imageReslice->SetInformation(doseGrid->GetInformation()); >> >> imageReslice->SetInterpolationModeToLinear(); >> >> imageReslice->SetResliceTransform(transform); >> >> imageReslice->Update(); >> >> >> It seems like the error is coming from doseGrid (when I comment it out, >> the error goes away). The dose grid was initialised like this: >> >> vtkSmartPointer doseGrid = vtkSmartPointer::New(); >> >> doseGrid->SetOrigin(0.,0.,0.); >> >> doseGrid->SetDimensions(500,500,500); >> >> doseGrid->SetSpacing(0.5,0.5,0.5); >> >> doseGrid->AllocateScalars(VTK_DOUBLE,1); >> >> >> Any idea what I?ve done wrong? >> >> Regards, >> Richard >> >> On 08 Jul 2016, at 17:42, David Gobbi wrote: >> >> Hi Richard, >> >> Yes, you can use vtkImageReslice for this. It would work like this: >> >> Let's define T as the transform that gives the position and orientation >> of the kernel within the larger image. To resample the kernel, you would >> give vtkImageReslice the inverse of T as the ResliceTransform, and you >> would supply the larger image as a reference image, e.g. the code would >> look like this (using Python): >> >> reslice = vtkImageReslice() >> reslice.SetInputData(kernel_image) >> reslice.SetInformationInput(big_image) >> reslice.SetResliceTransform(inverse_transform) >> reslice.SetInterpolationModeToLinear() >> reslice.Update() >> >> This will produce something like the bottom image from your original >> email. In order for the kernel resampling to work properly, your kernel >> image must have a border which is all zeros. If this must be done over and >> over again (i.e. if you need to superimpose the kernel hundreds of times at >> various locations within the larger image) then the above procedure won't >> be fast enough. Another possibility is to use the vtkImageInterpolator >> class and some of your own ingenuity to create a fast method for resampling >> and superposing the kernel. >> >> During my PhD, I wrote a custom VTK class that superposed kernels into a >> volume in order to do 3D ultrasound reconstruction, but I never generalized >> it: >> >> https://github.com/dgobbi/AIGS/blob/master/Ultrasound/vtkFreehandUltrasound.h >> >> Some further development of this code was done for the PLUS toolkit: >> >> https://app.assembla.com/spaces/plus/subversion/source/HEAD/trunk/PlusLib/src/PlusVolumeReconstruction >> >> However, as far as I know, VTK doesn't provide an efficient >> general-purpose way of superposing kernels at different positions and >> orientations into a 3D volume. >> >> - David >> >> >> >> On Fri, Jul 8, 2016 at 7:07 AM, Richard Brown > > wrote: >> >>> >>> Hi all, >>> >>> I have a fairly simple problem, and one that I?m sure has previously >>> been solved here, but I?m struggling to find the right keywords to find a >>> useful thread. >>> >>> I would like to superpose a kernel vtkImageData (kernel.png) onto a grid >>> vtkImageData (grid.png). The kernel will be rotated (superpose.png), >>> however, so the kernel will requiring resampling before superposition is >>> possible (superposition_and_resample.png). >>> >>> What is the best way to do this? I feel like I can simply use >>> vtkImageReslice, but I?m not 100%. >>> >>> Thanks in advance for any pointers. >>> >>> Regards, >>> Richard >>> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From h.moelle at googlemail.com Thu Jul 21 02:58:27 2016 From: h.moelle at googlemail.com (=?UTF-8?Q?Hagen_M=c3=b6lle?=) Date: Thu, 21 Jul 2016 08:58:27 +0200 Subject: [vtkusers] vtkChartXY lines not visible when using logarithmic x axis Message-ID: <570bbfa0-d6bc-0e71-6964-55b2fa70dee7@googlemail.com> Hi, I want to report a bug for vtkChartXY. So I already send this Email two days ago to the vtkUsers mailing list without receiving any answer. The bug is not visible in the vtk bug tracker too. Thus I send the Email again. Bug environment: a) I am using VTK 6.2. I checked my test code on machines running Windows 7 (Visual Studio 2012/2015) and Ubuntu 15.10/Ubuntu 16.04 (gcc). On all these systems the bug is visible. b) I can also reproduce the bug in VTK 7.0 (here I used an Ubuntu 16.04 machine and compiled VTK 7.0 using OpenGL2 interface). Bug description: I am using vtkChartXY to display one line. I also enabled logarithmic x axis (chartXY->GetAxis(vtkAxis::BOTTOM)->SetLogScale(true);). Nothing more special. In the compiled application I start zooming into the chart using the mouse wheel, making sure I always have a line displayed in the view. At some zoom level this line just disappears. At the zoom level the line disappears I did the following: 1. Zooming more into the chart the line will not appear again. 2. Zooming out twice (with mouse wheel) the line will reappear. How to reproduce the bug: I basically used the LinePlot example for vtkChartXY (see http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot). I added one line to the example code marked with *** (line was added after line 54 in example code). I added the full code to the end of the Email. --------------- // Add multiple line plots, setting the colors etc vtkSmartPointer chart= vtkSmartPointer::New(); *** chart.Get()->GetAxis(vtkAxis::BOTTOM)->SetLogScale(true); view->GetScene()->AddItem(chart); --------------- Compile and execute the program. See my bug description above to visualize the bug. Please contact me if you need more information. I can also provide images of the bug if needed. I hope the bug can be fixed. Hagen. #include #include #include #include #include #include #include #include #include #include #include #include #include int main(int, char *[]) { // Create a table with some points in it vtkSmartPointer table = vtkSmartPointer::New(); vtkSmartPointer arrX = vtkSmartPointer::New(); arrX->SetName("X Axis"); table->AddColumn(arrX); vtkSmartPointer arrC = vtkSmartPointer::New(); arrC->SetName("Cosine"); table->AddColumn(arrC); vtkSmartPointer arrS = vtkSmartPointer::New(); arrS->SetName("Sine"); table->AddColumn(arrS); // Fill in the table with some example values int numPoints = 69; float inc = 7.5 / (numPoints-1); table->SetNumberOfRows(numPoints); for (int i = 0; i < numPoints; ++i) { table->SetValue(i, 0, i * inc); table->SetValue(i, 1, cos(i * inc)); table->SetValue(i, 2, sin(i * inc)); } // Set up the view vtkSmartPointer view = vtkSmartPointer::New(); view->GetRenderer()->SetBackground(1.0, 1.0, 1.0); // Add multiple line plots, setting the colors etc vtkSmartPointer chart = vtkSmartPointer::New(); chart.Get()->GetAxis(vtkAxis::BOTTOM)->SetLogScale(true); view->GetScene()->AddItem(chart); vtkPlot *line = chart->AddPlot(vtkChart::LINE); #if VTK_MAJOR_VERSION <= 5 line->SetInput(table, 0, 1); #else line->SetInputData(table, 0, 1); #endif line->SetColor(0, 255, 0, 255); line->SetWidth(1.0); line = chart->AddPlot(vtkChart::LINE); #if VTK_MAJOR_VERSION <= 5 line->SetInput(table, 0, 2); #else line->SetInputData(table, 0, 2); #endif line->SetColor(255, 0, 0, 255); line->SetWidth(5.0); // For dotted line, the line type can be from 2 to 5 for different dash/dot // patterns (see enum in vtkPen containing DASH_LINE, value 2): #ifndef WIN32 line->GetPen()->SetLineType(vtkPen::DASH_LINE); #endif // (ifdef-ed out on Windows because DASH_LINE does not work on Windows // machines with built-in Intel HD graphics card...) //view->GetRenderWindow()->SetMultiSamples(0); // Start interactor view->GetInteractor()->Initialize(); view->GetInteractor()->Start(); return EXIT_SUCCESS; } From richard.j.brown at live.co.uk Thu Jul 21 05:07:26 2016 From: richard.j.brown at live.co.uk (Richard Brown) Date: Thu, 21 Jul 2016 11:07:26 +0200 Subject: [vtkusers] vtkImageReslice rotation and resampling question In-Reply-To: References: Message-ID: David, To minimise computing time, I would like to then shrink my kernel after resampling it. Is there a method in VTK to reduce a vtkImageData?s extent, such that the cuboid is smallest possible without omitting any non-zero voxels (as in the images below). Regards, Richard > On 20 Jul 2016, at 16:58, David Gobbi wrote: > > Hi Richard, > > Yes, the resampled kernel will be the full size of your dose grid. To avoid this, you would have to compute for yourself what the bounds of the resampled kernel are, and then use the reslice->SetOutputExtent() method to declare those bounds. Or, you could avoid using vtkImageReslice altogether and use vtkImageInterpolator directly instead. > > The best option, if your kernel is defined by an analytic function, is to transform the x,y,z coords of that function and evaluate the dose directly on your grid. > > - David > > > On Wed, Jul 20, 2016 at 8:11 AM, Richard Brown > wrote: > David, > > That sorted it, thanks. > > So the resampled kernel has the same dimensions as the dose grid? My kernel is very small compared to my dose grid, so superposition will be slower than necessary. > > Is this why, in your original response, you said the method isn?t very fast if it needs to be used many times? > > Regards, > Richard > >> On 20 Jul 2016, at 16:01, David Gobbi > wrote: >> >> Hi Richard, >> >> SetInformationInput(), not SetInformation(). The former (the one you need to use) requires a vtkImageData as input. It provides the reference image that defines the geometry for the reslicing. >> >> - David >> >> On Wed, Jul 20, 2016 at 7:55 AM, Richard Brown > wrote: >> Hi David, >> >> I?ve been working through your advice and I get an error: >> Attempt to get an input array for an index that has not been specified >> >> My code looks like yours: >> vtkSmartPointer imageReslice = vtkSmartPointer::New(); >> imageReslice->SetInputData(kernelImageData); >> imageReslice->SetInformation(doseGrid->GetInformation()); >> imageReslice->SetInterpolationModeToLinear(); >> imageReslice->SetResliceTransform(transform); >> imageReslice->Update(); >> >> It seems like the error is coming from doseGrid (when I comment it out, the error goes away). The dose grid was initialised like this: >> vtkSmartPointer doseGrid = vtkSmartPointer::New(); >> doseGrid->SetOrigin(0.,0.,0.); >> doseGrid->SetDimensions(500,500,500); >> doseGrid->SetSpacing(0.5,0.5,0.5); >> doseGrid->AllocateScalars(VTK_DOUBLE,1); >> >> Any idea what I?ve done wrong? >> >> Regards, >> Richard >> >>> On 08 Jul 2016, at 17:42, David Gobbi > wrote: >>> >>> Hi Richard, >>> >>> Yes, you can use vtkImageReslice for this. It would work like this: >>> >>> Let's define T as the transform that gives the position and orientation of the kernel within the larger image. To resample the kernel, you would give vtkImageReslice the inverse of T as the ResliceTransform, and you would supply the larger image as a reference image, e.g. the code would look like this (using Python): >>> >>> reslice = vtkImageReslice() >>> reslice.SetInputData(kernel_image) >>> reslice.SetInformationInput(big_image) >>> reslice.SetResliceTransform(inverse_transform) >>> reslice.SetInterpolationModeToLinear() >>> reslice.Update() >>> >>> This will produce something like the bottom image from your original email. In order for the kernel resampling to work properly, your kernel image must have a border which is all zeros. If this must be done over and over again (i.e. if you need to superimpose the kernel hundreds of times at various locations within the larger image) then the above procedure won't be fast enough. Another possibility is to use the vtkImageInterpolator class and some of your own ingenuity to create a fast method for resampling and superposing the kernel. >>> >>> During my PhD, I wrote a custom VTK class that superposed kernels into a volume in order to do 3D ultrasound reconstruction, but I never generalized it: >>> https://github.com/dgobbi/AIGS/blob/master/Ultrasound/vtkFreehandUltrasound.h >>> >>> Some further development of this code was done for the PLUS toolkit: >>> https://app.assembla.com/spaces/plus/subversion/source/HEAD/trunk/PlusLib/src/PlusVolumeReconstruction >>> >>> However, as far as I know, VTK doesn't provide an efficient general-purpose way of superposing kernels at different positions and orientations into a 3D volume. >>> >>> - David >>> >>> >>> >>> On Fri, Jul 8, 2016 at 7:07 AM, Richard Brown > wrote: >>> >>> Hi all, >>> >>> I have a fairly simple problem, and one that I?m sure has previously been solved here, but I?m struggling to find the right keywords to find a useful thread. >>> >>> I would like to superpose a kernel vtkImageData (kernel.png) onto a grid vtkImageData (grid.png). The kernel will be rotated (superpose.png), however, so the kernel will requiring resampling before superposition is possible (superposition_and_resample.png). >>> >>> What is the best way to do this? I feel like I can simply use vtkImageReslice, but I?m not 100%. >>> >>> Thanks in advance for any pointers. >>> >>> Regards, >>> Richard >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: superposition_and_resample.png Type: image/png Size: 7907 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: superposition_and_resample.png Type: image/png Size: 3363 bytes Desc: not available URL: From zarko at kg.ac.rs Thu Jul 21 07:09:48 2016 From: zarko at kg.ac.rs (zarko.milosevic) Date: Thu, 21 Jul 2016 04:09:48 -0700 (MST) Subject: [vtkusers] vtkDICOMDirectory and vtkDICOMReader issue with files in the stack. Message-ID: <1469099388965-5739305.post@n5.nabble.com> I`ve been using vtkDICOMDirectory for finding DICOM series in provided folder path. vtkDICOMDirectory find all the studies in the path and gives all series, files of DICOM images, corresponding to the found studies.This is what i get for some case. I select some of the series, get files corresponding to that series, load it using vtkDICOMReader and visualize it using vtkImageViewer // get files for selected series vtkStringArray *sortedFiles = vtkRepresentationReslice::_DICOMDIRECTORY->GetFileNamesForSeries(serieID); // read files vtkSmartPointer reader = vtkSmartPointer::New(); reader-> SetFileNames(sortedFiles ); reader-> AutoRescaleOff(); reader-> UpdateInformation(); vtkSmartPointer rescale = vtkSmartPointer::New(); rescale-> SetInputConnection(reader ->GetOutputPort()); rescale-> Update(); vtkDICOMMetaData *metaData = reader ->GetMetaData(); const vtkDICOMValue &window = metaData ->GetAttributeValue(DC::WindowWidth), & level = metaData->GetAttributeValue (DC::WindowCenter); double dWindow = window. AsDouble(); double dLevel = level. AsDouble(); vtkSmartPointer lut = vtkSmartPointer::New(); lut-> SetValueRange(0.0, 1.0); // from black to white lut-> SetSaturationRange(0.0, 0.0);// no color saturation lut-> SetRange(dLevel - 0.5 * dWindow , dLevel + 0.5 * dWindow ); lut-> SetRampToLinear(); lut-> Build(); vtkSmartPointer colorMapper = vtkSmartPointer::New(); colorMapper->SetLookupTable (lut ); colorMapper->SetInputConnection (rescale ->GetOutputPort()); // visualize loaded image _imageViewer->SetInput(colorMapper->GetOutput()); _imageViewer->GetRenderer ()->ResetCamera();Now issued are the highilighted cases on figure above. When i load second highlighted case imageViewer shows only one slice.I figured out later that issues series have two stacks and when i load second stack i get in viewer 301 slices. vtkStringArray *stackNames = reader ->GetStackIDs(); reader-> SetDesiredStackID(stackNames ->GetValue(1));But, how to find out how many images is in which of the avalable stacks so my project will be able to choose automatically which stack will be loaded ?Now real problem gives me first highlighted series which have 0 stacks and 1 time slot. It have 30 files but when i load it it have only one slice shown.Also, is there some way to recognize these testing series, with only few files, without counting files so i can avoid loading it in the project. I can put some threshold based on the number of files but it would be better if there is some DICOM tag which can give me info if series is testing one or not.Thank in advanceZarko -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDICOMDirectory-and-vtkDICOMReader-issue-with-files-in-the-stack-tp5739305.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 Thu Jul 21 08:31:50 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 21 Jul 2016 06:31:50 -0600 Subject: [vtkusers] vtkImageReslice rotation and resampling question In-Reply-To: References: Message-ID: Hi Richard, In my previous email I recommended using SetOutputExtent(), because that will allow you to resample the kernel directly onto a smaller grid, which is much more efficient than shrinking the grid after resampling. You can compute the extent of this "shrunken" grid analytically. Given the original kernel extent (before resampling), compute the x,y,z coords of the 8 corner points. Then apply the transformation to those 8 corner points, and compute the new bounding box by finding the new x_min, x_max, y_min, y_max, z_min, z_max. Convert these bounds to an extent by using floor() and ceil() operations. - David On Thu, Jul 21, 2016 at 3:07 AM, Richard Brown wrote: > David, > > To minimise computing time, I would like to then shrink my kernel after > resampling it. > > Is there a method in VTK to reduce a vtkImageData?s extent, such that the > cuboid is smallest possible without omitting any non-zero voxels (as in the > images below). > > Regards, > Richard > > > On 20 Jul 2016, at 16:58, David Gobbi wrote: > > Hi Richard, > > Yes, the resampled kernel will be the full size of your dose grid. To > avoid this, you would have to compute for yourself what the bounds of the > resampled kernel are, and then use the reslice->SetOutputExtent() method to > declare those bounds. Or, you could avoid using vtkImageReslice altogether > and use vtkImageInterpolator directly instead. > > The best option, if your kernel is defined by an analytic function, is to > transform the x,y,z coords of that function and evaluate the dose directly > on your grid. > > - David > > > On Wed, Jul 20, 2016 at 8:11 AM, Richard Brown > wrote: > >> David, >> >> That sorted it, thanks. >> >> So the resampled kernel has the same dimensions as the dose grid? My >> kernel is very small compared to my dose grid, so superposition will be >> slower than necessary. >> >> Is this why, in your original response, you said the method isn?t very >> fast if it needs to be used many times? >> >> Regards, >> Richard >> >> On 20 Jul 2016, at 16:01, David Gobbi wrote: >> >> Hi Richard, >> >> SetInformationInput(), not SetInformation(). The former (the one you >> need to use) requires a vtkImageData as input. It provides the reference >> image that defines the geometry for the reslicing. >> >> - David >> >> On Wed, Jul 20, 2016 at 7:55 AM, Richard Brown < >> richard.j.brown at live.co.uk> wrote: >> >>> Hi David, >>> >>> I?ve been working through your advice and I get an error: >>> Attempt to get an input array for an index that has not been specified >>> >>> My code looks like yours: >>> vtkSmartPointer imageReslice = vtkSmartPointer< >>> vtkImageReslice>::New(); >>> >>> imageReslice->SetInputData(kernelImageData); >>> >>> imageReslice->SetInformation(doseGrid->GetInformation()); >>> >>> imageReslice->SetInterpolationModeToLinear(); >>> >>> imageReslice->SetResliceTransform(transform); >>> >>> imageReslice->Update(); >>> >>> >>> It seems like the error is coming from doseGrid (when I comment it out, >>> the error goes away). The dose grid was initialised like this: >>> >>> vtkSmartPointer doseGrid = vtkSmartPointer::New(); >>> >>> doseGrid->SetOrigin(0.,0.,0.); >>> >>> doseGrid->SetDimensions(500,500,500); >>> >>> doseGrid->SetSpacing(0.5,0.5,0.5); >>> >>> doseGrid->AllocateScalars(VTK_DOUBLE,1); >>> >>> >>> Any idea what I?ve done wrong? >>> >>> Regards, >>> Richard >>> >>> On 08 Jul 2016, at 17:42, David Gobbi wrote: >>> >>> Hi Richard, >>> >>> Yes, you can use vtkImageReslice for this. It would work like this: >>> >>> Let's define T as the transform that gives the position and orientation >>> of the kernel within the larger image. To resample the kernel, you would >>> give vtkImageReslice the inverse of T as the ResliceTransform, and you >>> would supply the larger image as a reference image, e.g. the code would >>> look like this (using Python): >>> >>> reslice = vtkImageReslice() >>> reslice.SetInputData(kernel_image) >>> reslice.SetInformationInput(big_image) >>> reslice.SetResliceTransform(inverse_transform) >>> reslice.SetInterpolationModeToLinear() >>> reslice.Update() >>> >>> This will produce something like the bottom image from your original >>> email. In order for the kernel resampling to work properly, your kernel >>> image must have a border which is all zeros. If this must be done over and >>> over again (i.e. if you need to superimpose the kernel hundreds of times at >>> various locations within the larger image) then the above procedure won't >>> be fast enough. Another possibility is to use the vtkImageInterpolator >>> class and some of your own ingenuity to create a fast method for resampling >>> and superposing the kernel. >>> >>> During my PhD, I wrote a custom VTK class that superposed kernels into a >>> volume in order to do 3D ultrasound reconstruction, but I never generalized >>> it: >>> >>> https://github.com/dgobbi/AIGS/blob/master/Ultrasound/vtkFreehandUltrasound.h >>> >>> Some further development of this code was done for the PLUS toolkit: >>> >>> https://app.assembla.com/spaces/plus/subversion/source/HEAD/trunk/PlusLib/src/PlusVolumeReconstruction >>> >>> However, as far as I know, VTK doesn't provide an efficient >>> general-purpose way of superposing kernels at different positions and >>> orientations into a 3D volume. >>> >>> - David >>> >>> >>> >>> On Fri, Jul 8, 2016 at 7:07 AM, Richard Brown < >>> richard.j.brown at live.co.uk> wrote: >>> >>>> >>>> Hi all, >>>> >>>> I have a fairly simple problem, and one that I?m sure has previously >>>> been solved here, but I?m struggling to find the right keywords to find a >>>> useful thread. >>>> >>>> I would like to superpose a kernel vtkImageData (kernel.png) onto a >>>> grid vtkImageData (grid.png). The kernel will be rotated (superpose.png), >>>> however, so the kernel will requiring resampling before superposition is >>>> possible (superposition_and_resample.png). >>>> >>>> What is the best way to do this? I feel like I can simply use >>>> vtkImageReslice, but I?m not 100%. >>>> >>>> Thanks in advance for any pointers. >>>> >>>> Regards, >>>> Richard >>>> >>> >>> >>> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: superposition_and_resample.png Type: image/png Size: 7907 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: superposition_and_resample.png Type: image/png Size: 3363 bytes Desc: not available URL: From david.gobbi at gmail.com Thu Jul 21 09:04:37 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 21 Jul 2016 07:04:37 -0600 Subject: [vtkusers] vtkDICOMDirectory and vtkDICOMReader issue with files in the stack. In-Reply-To: <1469099388965-5739305.post@n5.nabble.com> References: <1469099388965-5739305.post@n5.nabble.com> Message-ID: Hi Zarko, After calling reader->SetDesiredStackID() and reader->UpdateInformation(), you can call reader->GetFileIndexArray()->GetNumberOfValues() to get the number of slices in the stack. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Jul 21 10:14:29 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 21 Jul 2016 10:14:29 -0400 Subject: [vtkusers] How to enable the xdmf module and read xdmf files. In-Reply-To: References: Message-ID: Please keep the discussion on the mailing list for all to contribute to and benefit from. Yes libXDMF depends on libHDF5, for both I tend to use the version in VTK, especially on windows where HDF5 wasn't available until recently. It looks like you are doing that, but still the linker isn't finding the things it needs from libHDF5 for some unknown reason. I see in your cache that cmake finds some parts of an installed HDF5 but for the most part it seems it should be using VTKs version. Two things to try: 1) a new build in a different directory in case stale information in the build system is not getting cleared somewhere. 2) If you are using cmake 3.6.0, back off to 3.5.2 to avoid a regression introduced with the improved cmake find_system_hdf5 that unfortunately wasn't detected in the release candidates. hope that helps David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Jul 21, 2016 at 2:56 AM, Magnus Elden wrote: > HI, > > > > I am terribly sorry to bother you again, but after I followed your advice > I checked to use XDMF3 and NOT use system xdmf. Please see this link: > http://puu.sh/q93fT/511bf104c8.png > > I left the HDF5 settings set to default values as well. Please see this > link: http://puu.sh/q93iy/774b9d6563.png > > > > It configured and generated the files with no problem, but when building I > get linker errors saying that H5open, amongst others, are unresolved > external symbols. Please refer to this link: http://pastebin.com/JymvyWwx > > > > I looked through the settings of the project XdmfCore and found some > libraries that had something to do with HDF5. I tried doing a complete > search through the VTK folders to see if I could find a library with a name > that might refer to the HDF5 standard that was not included, but I was > unable to do so. > > > > The libraries that were included are: > > kernel32.lib > > user32.lib > > gdi32.lib > > winspool.lib > > shell32.lib > > ole32.lib > > oleaut32.lib > > uuid.lib > > comdlg32.lib > > advapi32.lib > > D:\Libraries\VTK\Build\lib\Release\vtkhdf5_hl-7.1.lib > > D:\Libraries\VTK\Build\lib\Release\vtkhdf5-7.1.lib > > D:\Libraries\VTK\Build\lib\Release\vtklibxml2-7.1.lib > > D:\Libraries\VTK\Build\lib\Release\vtkzlib-7.1.lib > > > > The only thing I find suspicious is the lack of a CPP library. When I used > the HDF5 library by itself I had to include the HDF5 library and > HDF5_CPP.lib in order to get it to work. Is this a similar situation? > > I am not sure if it might help, but I attached the complete cache so that > you have all the information that CMake uses. > > > > Once again, I am terribly sorry for bothering you again. > > > > Yours, > > Magnus Elden > > > > > > *From:* David E DeMarle [mailto:dave.demarle at kitware.com] > *Sent:* Wednesday, 20 July, 2016 16:53 > *To:* Magnus Elden > > *Subject:* Re: [vtkusers] How to enable the xdmf module and read xdmf > files. > > > > Welcome! > > > David E DeMarle > Kitware, Inc. > R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > > > On Wed, Jul 20, 2016 at 10:30 AM, Magnus Elden > wrote: > > That solved it. > > > > I have no idea why it failed the first time. That was the reason for why I > tried compiling the XDMF library by itself and link to it. > > > > Thank you for your help. > > > > Yours, > > Magnus Elden > > > > *From:* David E DeMarle [mailto:dave.demarle at kitware.com] > *Sent:* Wednesday, 20 July, 2016 14:35 > *To:* Magnus Elden > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] How to enable the xdmf module and read xdmf > files. > > > > > > On Wed, Jul 20, 2016 at 8:06 AM, Magnus Elden > wrote: > > HI, > > > > I downloaded and built the XDMF source from www.xdmf.org by cloning git > clone git://xdmf.org/Xdmf.git. > > I then went to CMake and enabled Module_vtkxdmf2 and VTK_USE_SYSTEM_XDMF2 > and set the directory path. I tried building it and after some hassle I > managed to get it done. However, I was unable to include any XDMF reader > headers so I guessed that I also needed to enable the Module_vtkIOXdmf2 so > I did that. Configured and built again, but not I was not able to build the > IO module because XDMFArray was ambiguous and several functions and types > were not defined. > > > > > > I recommend against VTK_USE_SYSTEM_XDMF* since that capability is largely > unproven/untested. Instead, let VTK use the version of XDMF in XDMF. As of > a month ago the version in VTK is the same as the tip of the master branch > of xdmf with extraneous things that VTK doesn't use removed. Prior to that > there was much more divergence. > > > > I am building this on windows 10 using Visual Studio 2015. I am using > Cmake 3.6.0. > > > > What is the difference between XDMF, XDMF2 and XDMF3? > > > > Different revisions of the same library/format. See xdmf.org for details. > VTK has two revisions of the same library because of technical differences > between them the most important of which is that 3 requires boost headers > which VTK does not provide. > > > > How can I read an .xdmf file to volume render it? > > > > You might want to just download a ParaView binary and open the xdmf file. > But you can do the same from VTK starting with any volume rendering example > and switching the source/reader to vtkXdmf*Reader. > > > > What version of VTK do I need? > > > > XDMF was promoted from ParaView to VTK in VTK version 5.10 as I recall. > Anything after that should be fine. > > > > What version of XDMF do I need? > > > > I recommend xdmf3, which is as of a few months ago the tip of the one true > xdmf repo. Xdmf2 is back in the history if you need it. > > > > Where can I get these libraries? > > > > See xdmf.org for instructions on how to get and build any of the > versions. But as I said, just use VTK's version for simplicity. > > > > Anything else I should know? > > > > For xdmf3 you need to download and untar boost somewhere on your system > and tell cmake where it is. > > > > > > I have been wrestling with this for about a week now and I must be doing > something wrong. > > I was also unable to find any tutorials or guides on how to achieve this. > If there are any, please point me in the right direction. > > > > Yours, > > Magnus Elden > > > > > > good luck > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From champ_sanjeet at yahoo.com Thu Jul 21 13:21:56 2016 From: champ_sanjeet at yahoo.com (Sanjeet Rohilla) Date: Thu, 21 Jul 2016 17:21:56 +0000 (UTC) Subject: [vtkusers] QVTKWidget screen turns out white References: <909869058.2602177.1469121716843.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <909869058.2602177.1469121716843.JavaMail.yahoo@mail.yahoo.com> Hi vtk Users I have encountered a strange issue, whenever I scrolls slices in the QVTKWidget, the screen turns out white with no image.I have used vtkImageViewer2 and also display text? using vtktextActor on the screen along with slices. The whole task is done using python and QVTKWidget. Please let me know, the solution for this problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Fri Jul 22 04:00:25 2016 From: zarko at kg.ac.rs (zarko.milosevic) Date: Fri, 22 Jul 2016 01:00:25 -0700 (MST) Subject: [vtkusers] vtkDICOMDirectory and vtkDICOMReader issue with files in the stack. In-Reply-To: References: <1469099388965-5739305.post@n5.nabble.com> Message-ID: <1469174425262-5739310.post@n5.nabble.com> David thank you for the quick respond. Yes that is what i needed. Also, do you have idea what is the catch with images that does not have multiple stacks nor time slots but still are loaded as one slice ? Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDICOMDirectory-and-vtkDICOMReader-issue-with-files-in-the-stack-tp5739305p5739310.html Sent from the VTK - Users mailing list archive at Nabble.com. From Gerald.Lodron at joanneum.at Fri Jul 22 06:39:57 2016 From: Gerald.Lodron at joanneum.at (Lodron, Gerald) Date: Fri, 22 Jul 2016 10:39:57 +0000 Subject: [vtkusers] Number of neighbours for each cell Message-ID: <5b84795420f04c02a9d619bec030c54e@RZJMBX2.jr1.local> Hi I have a mesh (vtkPolyData with all triangles) where i want to visualize the number of neighbouring cells/triangles for each cell/triangle. (I later may want to threshold/filter it with that number to remove "noisy" triangles on border with low number of neighbours) Is there a filter for that available? Best regards ------------------------------------------------------------------------------------ Gerald Lodron Researcher of Machine Vision Applications Group DIGITAL - Institute for Information and Communication Technologies JOANNEUM RESEARCH Forschungsgesellschaft mbH Steyrergasse 17, 8010 Graz, AUSTRIA phone: +43-316-876-1751 general fax: +43-316-876-1751 web: http://www.joanneum.at/digital e-mail: gerald.lodron at joanneum.at -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jul 22 08:48:11 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 22 Jul 2016 06:48:11 -0600 Subject: [vtkusers] vtkDICOMDirectory and vtkDICOMReader issue with files in the stack. In-Reply-To: <1469174425262-5739310.post@n5.nabble.com> References: <1469099388965-5739305.post@n5.nabble.com> <1469174425262-5739310.post@n5.nabble.com> Message-ID: In addition to sorting by StackID, the series is also sorted into "stacks" if: 1) the ImageOrientationPatient changes partway through the series 2) the ImagePositionPatient vs. InstanceNumber plot fits multiple lines One common case is where a series has a locator image, e.g. where a CT series starts with an image that shows what portion of the anatomy is covered by the series. What are the circumstances under which you see only a single slice? - David On Fri, Jul 22, 2016 at 2:00 AM, zarko.milosevic wrote: > David thank you for the quick respond. Yes that is what i needed. > Also, do you have idea what is the catch with images that does not have > multiple stacks nor time slots but still are loaded as one slice ? > > Zarko > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zarko at kg.ac.rs Fri Jul 22 10:48:25 2016 From: zarko at kg.ac.rs (zarko.milosevic) Date: Fri, 22 Jul 2016 07:48:25 -0700 (MST) Subject: [vtkusers] vtkDICOMDirectory and vtkDICOMReader issue with files in the stack. In-Reply-To: References: <1469099388965-5739305.post@n5.nabble.com> <1469174425262-5739310.post@n5.nabble.com> Message-ID: <1469198905189-5739321.post@n5.nabble.com> Mostly i work with CT images and, in most cases, i had that situation where there is one locator image and because of that i had two stacks. In those circumstances i just load the stack with largest number of dedicated files. Is there some other, more elegant, solution to identify the purposes of stacks ? Via some DICOM tag for example. So for those cases i have some temporary solution. I have problem with some cases where loaded image have one slice and where series have one stack and no time slots. How should i identify those proposed situations ? To go throught files using fileindex array and compare if those values (ImageOrientationPatient, ImagePositionPatient vs. InstanceNumber) is changing in files? If so what would be solution ? Zarko -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkDICOMDirectory-and-vtkDICOMReader-issue-with-files-in-the-stack-tp5739305p5739321.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Jul 22 11:30:02 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 22 Jul 2016 09:30:02 -0600 Subject: [vtkusers] vtkDICOMDirectory and vtkDICOMReader issue with files in the stack. In-Reply-To: <1469198905189-5739321.post@n5.nabble.com> References: <1469099388965-5739305.post@n5.nabble.com> <1469174425262-5739310.post@n5.nabble.com> <1469198905189-5739321.post@n5.nabble.com> Message-ID: I'm not aware of any standard DICOM tags that identify locator images. That's why I check the ImageOrientationPatient, and if it doesn't match the rest of the series, I sort the image into a different stack. My co-worker enhanced our dicom browser so that, when the user clicks on a series, a thumbnail image is displayed for each stack so that the user can choose. Choosing the stack with the largest number of images is reasonable. - David On Fri, Jul 22, 2016 at 8:48 AM, zarko.milosevic wrote: > Mostly i work with CT images and, in most cases, i had that situation where > there is one locator image and because of that i had two stacks. > In those circumstances i just load the stack with largest number of > dedicated files. > Is there some other, more elegant, solution to identify the purposes of > stacks ? Via some DICOM tag for example. > > So for those cases i have some temporary solution. > > I have problem with some cases where loaded image have one slice and where > series have one stack and no time slots. > > How should i identify those proposed situations ? To go throught files > using > fileindex array and compare if those values (ImageOrientationPatient, > ImagePositionPatient vs. InstanceNumber) is changing in files? > > If so what would be solution ? > > Zarko > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From magnus_elden at hotmail.com Fri Jul 22 12:11:22 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Fri, 22 Jul 2016 18:11:22 +0200 Subject: [vtkusers] Reading an XDMF file using the vtkXdmf3Reader class fails even though the function CanReadFile() returns true. Message-ID: I am trying to modify the SmartVolumeMapper example to read an .xdmf file, but I get an error when calling the Update() function. 1 1'Value' not in itemProperties in XdmfTime::populateItem The error above is all I have been able to get out of the function. What am I doing wrong? The .xdmf, .h5 and .hdf5 are all in the same folder and the "1 1" output before the error shows that it can be read. I am using VisualStudio 2015 and no other libraries than VTK. I am building everything as x64 Release. The error occurs between '1' and '2'. (Please refer to the printf() calls below.) This is a minimal program that causes the error: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static void CreateImageData(vtkImageData* im); int main(int argc, char *argv[]) { vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("C:/Users/NoobsDeSroobs/Downloads/testVolume.xdmf"); printf("1 %d" , reader->CanReadFile("C:/Users/NoobsDeSroobs/Downloads/testVolume.xdmf")); reader->Update(); printf("2"); int numArrays = reader->GetNumberOfPointArrays(); printf("3"); for (int i = 0; i < numArrays; i++) { printf("Name of index %d is: %s", i, reader->GetPointArrayName(i)); printf("2"); } return 0; } Finally, I noticed that the standard way of copying the read data to the vtkImageData is by doing a shallow copy of the output of the reader, but imageData->ShallowCopy(reader->GetOutput()) does not compile as GetOutput() does not exist. I have a feeling this might have something to do with the fact that this is a 4D file and not a standard 3D file. If possible a working example would be great to have. Finally, some functions like Update() and Read() are not listed in the documentation: http://www.vtk.org/doc/nightly/html/classvtkXdmf3Reader.html Just a heads up. Thank you so much for your help. Yours, Magnus Elden -------------- next part -------------- An HTML attachment was scrubbed... URL: From technword at gmail.com Sat Jul 23 19:35:01 2016 From: technword at gmail.com (High Techno) Date: Sat, 23 Jul 2016 23:35:01 +0000 Subject: [vtkusers] 3D coordinate plot surface reconstraction vtk 6.3.0 Message-ID: Currently i'm working on a project for rendering 3D surface of a human skull from series of images taken by Ct(computed tomography)scanner.first i create a 3D array that contains gray level of 3D volume. second step i create a vtkimagedata from the 3D array and then i use the filter vtkmarchingcube to extract the surface.all this steps are done perfectly. My problem is i cant plot reconstructed surface 3D coordinate. this image can explain more, this what i have now :reconstructed surface and i want to do somthing like that: surface plotted i found lot of example about plotting in vtk such as :ScatterPlot and also some examples for picking. and others any help will be welcome thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: From magnus_elden at hotmail.com Sun Jul 24 00:36:46 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Sun, 24 Jul 2016 06:36:46 +0200 Subject: [vtkusers] How to set opacity of a certain color to 0? Message-ID: I am cutting a volume using vtkCutter and I want to remove everything that is black or close to black. Normally this would be done using a transfer function, but I can not seem to find where to put it. This is the flow of my program(shortened): vtkPiecewiseFunction *opacityFun = vtkPiecewiseFunction::New(); vtkDataSet *dataSet; vtkSmartPointer reader = vtkSmartPointer::New(); dataSet = vtkDataSet::SafeDownCast(reader->GetOutput()); reader->GetOutput()->GetBounds(bounds); vtkSmartPointer plane = vtkSmartPointer::New(); // Create cutter double high = plane->EvaluateFunction((bounds[1] + bounds[0]) / 2.0, (bounds[3] + bounds[2]) / 2.0, bounds[5]); vtkSmartPointer cutter = vtkSmartPointer::New(); cutter->SetInputConnection(reader->GetOutputPort()); cutter->SetCutFunction(plane); cutter->GenerateValues( numberOfCuts, 0.9, 0.9*high); vtkSmartPointer cutterMapper = vtkSmartPointer::New(); cutterMapper->SetInputConnection(cutter->GetOutputPort()); // Create cut actor vtkSmartPointer cutterActor = vtkSmartPointer::New(); cutterActor->GetProperty()->SetLineWidth(2); cutterActor->SetMapper(cutterMapper); // Create renderers and add actors of plane and model vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddActor(cutterActor); //Code to render and interact with the cuts. Where in this code do I apply the transfer function? Do I use a lookup table? For now I want all colours to have opacity of 1 except for black that should have opacity = 0. How can this be done? I am using C++ and none of the examples seem to fit with the flow of my program. They either work only on volumes, which my poly data cut is not, or the function they use does not exist in any of the classes I am using. I tried setting a lookuptable with opacity ranges, I tried using a vtkPiecewiseFunction, but nothing seems to work. Thank you for your help. Yours, Magnus Elden -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Sun Jul 24 11:11:57 2016 From: tjlp at netease.com (Liu_tj) Date: Sun, 24 Jul 2016 23:11:57 +0800 (CST) Subject: [vtkusers] How to make sure to select a point really on 3D model when drawing angle for the model Message-ID: <68527fc4.b.1561d7673fb.Coremail.tjlp@netease.com> Hi, VTK guys, I generated a 3D model based on a series of DICOM images. Now I want to draw angle on the 3D model using vtkAngleWidget. My C# code is as below: vtkAngleWidget angleWidget = vtkAngleWidget.New(); angleWidget.SetInteractor(renwin.GetInteractor()); angleWidget.CreateDefaultRepresentation(); angleWidget.On(); renwin.Render(); return angleWidget; And I can select 3 points and draw an angle. But actually these 3 points are not on the 3D model. When I rotate the model, you can see it clearly as the attachment. How can I ensure that the selected points are on the 3D model? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: AngleOn3DModel.jpg Type: image/jpeg Size: 76477 bytes Desc: not available URL: From prajwal.sapare at gmail.com Sun Jul 24 11:53:25 2016 From: prajwal.sapare at gmail.com (Prajwal Sapare) Date: Sun, 24 Jul 2016 17:53:25 +0200 Subject: [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - Qt5WebKitWidgets Message-ID: Hello, I am trying to build VTK(6.3.0) into QT 5.7.0. (Windows Platform) . I set the source directory and then the build directory and press Configure in Cmake. Error is CMake Error at C:/Qt/5.7.0/qtbase/lib/cmake/Qt5/Qt5Config.cmake:26 (find_package): Could not find a package configuration file provided by "Qt5WebKitWidgets" with any of the following names: Qt5WebKitWidgetsConfig.cmake qt5webkitwidgets-config.cmake Add the installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH or set "Qt5WebKitWidgets_DIR" to a directory containing one of the above files. If "Qt5WebKitWidgets" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): GUISupport/QtWebkit/CMakeLists.txt:10 (find_package) I am not getting a right solution, and not understanding. To some extent I understood these webkit libraries were available in Qt4 version. However in Qt5 it's been deleted and incorporated into Qt webengine. Any leads to solve this issue is appreciated. I saw some solutions wherein they ask to make qt5Webkit optional in Cmakelists.txt. How should I do that and where will I find CMakelists.txt? Regards, Prajwal Regards, Prajwal -------------- next part -------------- An HTML attachment was scrubbed... URL: From magnus_elden at hotmail.com Sun Jul 24 12:18:51 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Sun, 24 Jul 2016 18:18:51 +0200 Subject: [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - Qt5WebKitWidgets In-Reply-To: References: Message-ID: I built it using configure with commands. Start visual studio developer command prompt and navigate to the source folder. Then write ?configure ?skip webkit ?skip webengine -skip -prefix -open-source -nomake examples -nomake tests?. When the configuration is done you simply run the command ?nmake?. You might want to set the platform by writing -platform . This should build the entire Qt library WITHOUT the web stuff. Then you can install it by writing ?nmake install?. Later, when building VTK using cmake just link to the install directory if cmake didn?t find it automatically. Hope this helps. Yours, Magnus Elden From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Prajwal Sapare Sent: Sunday, 24 July, 2016 17:53 To: vtkusers at vtk.org Subject: [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - Qt5WebKitWidgets Hello, I am trying to build VTK(6.3.0) into QT 5.7.0. (Windows Platform) . I set the source directory and then the build directory and press Configure in Cmake. Error is CMake Error at C:/Qt/5.7.0/qtbase/lib/cmake/Qt5/Qt5Config.cmake:26 (find_package): Could not find a package configuration file provided by "Qt5WebKitWidgets" with any of the following names: Qt5WebKitWidgetsConfig.cmake qt5webkitwidgets-config.cmake Add the installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH or set "Qt5WebKitWidgets_DIR" to a directory containing one of the above files. If "Qt5WebKitWidgets" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): GUISupport/QtWebkit/CMakeLists.txt:10 (find_package) I am not getting a right solution, and not understanding. To some extent I understood these webkit libraries were available in Qt4 version. However in Qt5 it's been deleted and incorporated into Qt webengine. Any leads to solve this issue is appreciated. I saw some solutions wherein they ask to make qt5Webkit optional in Cmakelists.txt. How should I do that and where will I find CMakelists.txt? Regards, Prajwal Regards, Prajwal -------------- next part -------------- An HTML attachment was scrubbed... URL: From prajwal.sapare at gmail.com Sun Jul 24 13:20:34 2016 From: prajwal.sapare at gmail.com (Prajwal Sapare) Date: Sun, 24 Jul 2016 19:20:34 +0200 Subject: [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - Qt5WebKitWidgets In-Reply-To: References: Message-ID: Hello Magnus, vtkusers, The config option u used has webkit option, but I can't use it for Qt5.7.0. The configure options that I actually need to use is, configure -debug-and-release -opensource -shared -no-qt3support -qt-sql-sqlite -phonon -phonon-backend -no-webkit -no-script -platform win32-msvc2013 However, for Qt5.7.0 the options webkit, phonon aren't supported. So I just used, configure -debug-and-release -opensource -shared -qt-sql-sqlite -platform win32-msvc2013 I wasn't able to disable webkit option to build. How can I do that? Regards, Prajwal On Sun, Jul 24, 2016 at 6:18 PM, Magnus Elden wrote: > I built it using configure with commands. > > > > Start visual studio developer command prompt and navigate to the source > folder. Then write ?configure ?skip webkit ?skip webengine -skip webmodules> -prefix -open-source -nomake examples -nomake > tests?. > > > > When the configuration is done you simply run the command ?nmake?. You > might want to set the platform by writing -platform . > > > > This should build the entire Qt library WITHOUT the web stuff. Then you > can install it by writing ?nmake install?. > > > > Later, when building VTK using cmake just link to the install directory if > cmake didn?t find it automatically. > > > > Hope this helps. > > > > Yours, > > Magnus Elden > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Prajwal > Sapare > *Sent:* Sunday, 24 July, 2016 17:53 > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - > Qt5WebKitWidgets > > > > Hello, > > I am trying to build VTK(6.3.0) into QT 5.7.0. (Windows Platform) > . > I set the source directory and then the build directory and press > Configure in Cmake. > > Error is > > > > > > > > > > > > > > *CMake Error at C:/Qt/5.7.0/qtbase/lib/cmake/Qt5/Qt5Config.cmake:26 > (find_package):Could not find a package configuration file provided by > "Qt5WebKitWidgets"with any of the following > names:Qt5WebKitWidgetsConfig.cmakeqt5webkitwidgets-config.cmakeAdd the > installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH orset > "Qt5WebKitWidgets_DIR" to a directory containing one of the abovefiles. If > "Qt5WebKitWidgets" provides a separate development package orSDK, be sure > it has been installed.Call Stack (most recent call > first):GUISupport/QtWebkit/CMakeLists.txt:10 (find_package)* > > I am not getting a right solution, and not understanding. To some extent I > understood these webkit libraries were available in Qt4 version. However in > Qt5 it's been deleted and incorporated into Qt webengine. > > Any leads to solve this issue is appreciated. I saw some solutions wherein > they ask to make qt5Webkit optional in Cmakelists.txt. How should I do that > and where will I find CMakelists.txt? > > > > Regards, > > Prajwal > > Regards, > Prajwal > -------------- next part -------------- An HTML attachment was scrubbed... URL: From magnus_elden at hotmail.com Sun Jul 24 14:52:34 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Sun, 24 Jul 2016 20:52:34 +0200 Subject: [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - Qt5WebKitWidgets In-Reply-To: References: Message-ID: I built Qt 5.7 using that option. Have you downloaded and updated the submodules? ?-skip webchannel -skip webengine -skip webkit? is what I wrote and it worked for me. What error are you getting? Yours, Magnus Elden From: Prajwal Sapare [mailto:prajwal.sapare at gmail.com] Sent: Sunday, 24 July, 2016 19:21 To: Magnus Elden Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - Qt5WebKitWidgets Hello Magnus, vtkusers, The config option u used has webkit option, but I can't use it for Qt5.7.0. The configure options that I actually need to use is, configure -debug-and-release -opensource -shared -no-qt3support -qt-sql-sqlite -phonon -phonon-backend -no-webkit -no-script -platform win32-msvc2013 However, for Qt5.7.0 the options webkit, phonon aren't supported. So I just used, configure -debug-and-release -opensource -shared -qt-sql-sqlite -platform win32-msvc2013 I wasn't able to disable webkit option to build. How can I do that? Regards, Prajwal On Sun, Jul 24, 2016 at 6:18 PM, Magnus Elden > wrote: I built it using configure with commands. Start visual studio developer command prompt and navigate to the source folder. Then write ?configure ?skip webkit ?skip webengine -skip -prefix -open-source -nomake examples -nomake tests?. When the configuration is done you simply run the command ?nmake?. You might want to set the platform by writing -platform . This should build the entire Qt library WITHOUT the web stuff. Then you can install it by writing ?nmake install?. Later, when building VTK using cmake just link to the install directory if cmake didn?t find it automatically. Hope this helps. Yours, Magnus Elden From: vtkusers [mailto:vtkusers-bounces at vtk.org ] On Behalf Of Prajwal Sapare Sent: Sunday, 24 July, 2016 17:53 To: vtkusers at vtk.org Subject: [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - Qt5WebKitWidgets Hello, I am trying to build VTK(6.3.0) into QT 5.7.0. (Windows Platform) . I set the source directory and then the build directory and press Configure in Cmake. Error is CMake Error at C:/Qt/5.7.0/qtbase/lib/cmake/Qt5/Qt5Config.cmake:26 (find_package): Could not find a package configuration file provided by "Qt5WebKitWidgets" with any of the following names: Qt5WebKitWidgetsConfig.cmake qt5webkitwidgets-config.cmake Add the installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH or set "Qt5WebKitWidgets_DIR" to a directory containing one of the above files. If "Qt5WebKitWidgets" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): GUISupport/QtWebkit/CMakeLists.txt:10 (find_package) I am not getting a right solution, and not understanding. To some extent I understood these webkit libraries were available in Qt4 version. However in Qt5 it's been deleted and incorporated into Qt webengine. Any leads to solve this issue is appreciated. I saw some solutions wherein they ask to make qt5Webkit optional in Cmakelists.txt. How should I do that and where will I find CMakelists.txt? Regards, Prajwal Regards, Prajwal -------------- next part -------------- An HTML attachment was scrubbed... URL: From prajwal.sapare at gmail.com Sun Jul 24 16:42:40 2016 From: prajwal.sapare at gmail.com (Prajwal Sapare) Date: Sun, 24 Jul 2016 22:42:40 +0200 Subject: [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - Qt5WebKitWidgets In-Reply-To: References: Message-ID: What do you mean by updating the submodules? How to do that and which submodules? Below is error I obtained when using the option -skip webkit Error-[Attempting to skip non-existant module] *Update: *In other system I built 4.7.3 skipping webkit, however, in CMake build for VTK it is again looking for QTWebkit_Library. I want to disable this search for QT_Webkit library in CMake. How to do? Regards, Prajwal On Sun, Jul 24, 2016 at 8:52 PM, Magnus Elden wrote: > I built Qt 5.7 using that option. Have you downloaded and updated the > submodules? > > > > ?-*skip* webchannel -*skip webengine* -*skip* webkit? is what I wrote and > it worked for me. What error are you getting? > > > > Yours, > > Magnus Elden > > > > *From:* Prajwal Sapare [mailto:prajwal.sapare at gmail.com] > *Sent:* Sunday, 24 July, 2016 19:21 > *To:* Magnus Elden > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Integration of VTK into QT - VS2013 : CMake > Error - Qt5WebKitWidgets > > > > Hello Magnus, vtkusers, > > > > The config option u used has webkit option, but I can't use it for Qt5.7.0. > > > > The configure options that I actually need to use is, > > *configure -debug-and-release -opensource -shared -no-qt3support > -qt-sql-sqlite -phonon -phonon-backend -no-webkit -no-script -platform > win32-msvc2013* > > > > However, for Qt5.7.0 the options webkit, phonon aren't supported. > > So I just used, > > *configure -debug-and-release -opensource -shared -qt-sql-sqlite -platform > win32-msvc2013* > > > > I wasn't able to disable webkit option to build. How can I do that? > > > > > > Regards, > > Prajwal > > > > On Sun, Jul 24, 2016 at 6:18 PM, Magnus Elden > wrote: > > I built it using configure with commands. > > > > Start visual studio developer command prompt and navigate to the source > folder. Then write ?configure ?skip webkit ?skip webengine -skip webmodules> -prefix -open-source -nomake examples -nomake > tests?. > > > > When the configuration is done you simply run the command ?nmake?. You > might want to set the platform by writing -platform . > > > > This should build the entire Qt library WITHOUT the web stuff. Then you > can install it by writing ?nmake install?. > > > > Later, when building VTK using cmake just link to the install directory if > cmake didn?t find it automatically. > > > > Hope this helps. > > > > Yours, > > Magnus Elden > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Prajwal > Sapare > *Sent:* Sunday, 24 July, 2016 17:53 > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - > Qt5WebKitWidgets > > > > Hello, > > I am trying to build VTK(6.3.0) into QT 5.7.0. (Windows Platform) > . > I set the source directory and then the build directory and press > Configure in Cmake. > > Error is > > > > > > > > > > > > > > *CMake Error at C:/Qt/5.7.0/qtbase/lib/cmake/Qt5/Qt5Config.cmake:26 > (find_package):Could not find a package configuration file provided by > "Qt5WebKitWidgets"with any of the following > names:Qt5WebKitWidgetsConfig.cmakeqt5webkitwidgets-config.cmakeAdd the > installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH orset > "Qt5WebKitWidgets_DIR" to a directory containing one of the abovefiles. If > "Qt5WebKitWidgets" provides a separate development package orSDK, be sure > it has been installed.Call Stack (most recent call > first):GUISupport/QtWebkit/CMakeLists.txt:10 (find_package)* > > I am not getting a right solution, and not understanding. To some extent I > understood these webkit libraries were available in Qt4 version. However in > Qt5 it's been deleted and incorporated into Qt webengine. > > Any leads to solve this issue is appreciated. I saw some solutions wherein > they ask to make qt5Webkit optional in Cmakelists.txt. How should I do that > and where will I find CMakelists.txt? > > > > Regards, > > Prajwal > > Regards, > Prajwal > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Sun Jul 24 21:02:29 2016 From: tjlp at netease.com (Liu_tj) Date: Mon, 25 Jul 2016 09:02:29 +0800 (CST) Subject: [vtkusers] How to make sure to select a point really on 3D model when drawing angle for the model In-Reply-To: <68527fc4.b.1561d7673fb.Coremail.tjlp@netease.com> References: <68527fc4.b.1561d7673fb.Coremail.tjlp@netease.com> Message-ID: Now I change my code and use vtkAngleRepresentation3D as the representation of vtkAngleWidget. The code is as follow: vtkAngleWidget angleWidget = vtkAngleWidget.New(); angleWidget.SetInteractor(renwin.GetInteractor()); vtkAngleRepresentation3D rep3d = vtkAngleRepresentation3D.New(); angleWidget.SetRepresentation(rep3d); angleWidget.On(); renwin.Render(); return angleWidget; Now I can pick a 3D point. But still the question: How to make sure to select a point really on 3D model? Thanks Liu Peng ?2016-07-24?"Liu_tj" ??? -----????----- ???:"Liu_tj" ????:2016?07?24? ??? ???:"vtkusers" ??:[vtkusers] How to make sure to select a point really on 3D model when drawing angle for the model Hi, VTK guys, I generated a 3D model based on a series of DICOM images. Now I want to draw angle on the 3D model using vtkAngleWidget. My C# code is as below: vtkAngleWidget angleWidget = vtkAngleWidget.New(); angleWidget.SetInteractor(renwin.GetInteractor()); angleWidget.CreateDefaultRepresentation(); angleWidget.On(); renwin.Render(); return angleWidget; And I can select 3 points and draw an angle. But actually these 3 points are not on the 3D model. When I rotate the model, you can see it clearly as the attachment. How can I ensure that the selected points are on the 3D model? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.amaclean at gmail.com Sun Jul 24 22:19:16 2016 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Mon, 25 Jul 2016 12:19:16 +1000 Subject: [vtkusers] How to set opacity of a certain color to 0? Message-ID: Hi Magnus, These examples may help: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/NamedColors http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/AssignColorsFromLUT http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ElevationBandsWithGlyphs For example in the first link,a colour called "My Red" is created with an alpha of 0.5. //////////// double rgba[4]; // Test setting and getting colors here. // We are also modifying alpha. namedColors->GetColor("Red",rgba); rgba[3] = 0.5; namedColors->SetColor("My Red",rgba); namedColors->GetColor("My Red",rgba); //////////// In the lookup table "My Red" is added, then "DarkGreen"with an opacity of 0.3. You could create a colour called "My Black"in a similar fashion with an alpha of 0. Then that example and the other ones should demonstrate how to create lookup tables. I hope this helps. Regards Andrew > ---------- Forwarded message ---------- > From: Magnus Elden > To: > Cc: > Date: Sun, 24 Jul 2016 06:36:46 +0200 > Subject: [vtkusers] How to set opacity of a certain color to 0? > > I am cutting a volume using vtkCutter and I want to remove everything that > is black or close to black. Normally this would be done using a transfer > function, but I can not seem to find where to put it. > > This is the flow of my program(shortened): > > > > vtkPiecewiseFunction *opacityFun = vtkPiecewiseFunction::New(); > > > > vtkDataSet *dataSet; > > vtkSmartPointer reader = > > vtkSmartPointer::New(); > > dataSet = vtkDataSet::SafeDownCast(reader->GetOutput()); > > > > > > reader->GetOutput()->GetBounds(bounds); > > > > vtkSmartPointer plane = > > vtkSmartPointer::New(); > > > > > > // Create cutter > > double high = plane->EvaluateFunction((bounds[1] + bounds[0]) / > 2.0, > > (bounds[3] + bounds[2]) / 2.0, > > bounds[5]); > > > > vtkSmartPointer cutter = > > vtkSmartPointer::New(); > > cutter->SetInputConnection(reader->GetOutputPort()); > > cutter->SetCutFunction(plane); > > cutter->GenerateValues( > > numberOfCuts, > > 0.9, > > 0.9*high); > > > > vtkSmartPointer cutterMapper = > > vtkSmartPointer::New(); > > cutterMapper->SetInputConnection(cutter->GetOutputPort()); > > > > > > // Create cut actor > > vtkSmartPointer cutterActor = > > vtkSmartPointer::New(); > > cutterActor->GetProperty()->SetLineWidth(2); > > cutterActor->SetMapper(cutterMapper); > > > > // Create renderers and add actors of plane and model > > vtkSmartPointer renderer = > > vtkSmartPointer::New(); > > renderer->AddActor(cutterActor); > > > > //Code to render and interact with the cuts. > > > > > > Where in this code do I apply the transfer function? Do I use a lookup > table? For now I want all colours to have opacity of 1 except for black > that should have opacity = 0. How can this be done? I am using C++ and none > of the examples seem to fit with the flow of my program. They either work > only on volumes, which my poly data cut is not, or the function they use > does not exist in any of the classes I am using. I tried setting a > lookuptable with opacity ranges, I tried using a vtkPiecewiseFunction, but > nothing seems to work. > > > > Thank you for your help. > > Yours, > > Magnus Elden > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Mon Jul 25 11:31:53 2016 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 25 Jul 2016 11:31:53 -0400 Subject: [vtkusers] [ITK-dev] c:\.git\hooks In-Reply-To: References: Message-ID: I ran all the SetupForDevelopment scripts in ITK git folder. The C:/.git folder was not created. Thanks for suggestion though. This problem is not annoying enough because it is easy to solve by deleting C:/.git folder. I will not spend more time randomly examining everything git-related. If somebody else comes forward with the same problem then we might be able to determine what we have in common and narrow down the problem to perhaps make it reasonably tractable. So if anyone runs into this, don't be shy! On Fri, Jul 22, 2016 at 9:14 AM, Brad King wrote: > On 07/22/2016 09:00 AM, D?enan Zuki? wrote: > > occasionally, a folder "C:\.git\hooks" appears on my computer. > [snip] > > but support people think that git hooks in some of my projects > > (almost all instances of ITK, VTK and Slicer builds) are causing > > this behavior. Did anyone else encounter this or something similar? > > Dig through our Utilities/SetupForDevelopment.sh scripts (or equivalent > in each project) and the scripts it invokes. See if running any of > them causes this to happen. Otherwise check whether running CMake on > each project causes it in case there is any attempt to install hooks > that way. > > You'll likely have to diligently check for the folder after each step > of working with each project until you figure out which one causes it. > > -Brad > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zamir.khan at gmail.com Mon Jul 25 12:04:50 2016 From: zamir.khan at gmail.com (zkhan) Date: Mon, 25 Jul 2016 09:04:50 -0700 (MST) Subject: [vtkusers] Building Activiz 7.0 In-Reply-To: References: Message-ID: <1469462690487-5739336.post@n5.nabble.com> Hi Matias, Did you have any success with building Activiz 7.0? I'm currently headed down the same path. Thank you, Zamir -- View this message in context: http://vtk.1045678.n5.nabble.com/Building-Activiz-7-0-tp5737877p5739336.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Mon Jul 25 12:32:40 2016 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 25 Jul 2016 12:32:40 -0400 Subject: [vtkusers] Reading an XDMF file using the vtkXdmf3Reader class fails even though the function CanReadFile() returns true. In-Reply-To: References: Message-ID: On Fri, Jul 22, 2016 at 12:11 PM, Magnus Elden wrote: > I am trying to modify the SmartVolumeMapper example to read an .xdmf file, > but I get an error when calling the Update() function. > > > > 1 1'Value' not in itemProperties in XdmfTime::populateItem > > > > The error above is all I have been able to get out of the function. What > am I doing wrong? The .xdmf, .h5 and .hdf5 are all in the same folder and > the ?1 1? output before the error shows that it can be read. I am using > VisualStudio 2015 and no other libraries than VTK. I am building everything > as x64 Release. The error occurs between ?1? and ?2?. (Please refer to the > printf() calls below.) > > Looks like a syntax error in the xdmf file. See the section about time in http://xdmf.org/index.php/XDMF_Model_and_Format and if still stuck, post a snippet to the xdmf mailing list. > > This is a minimal program that causes the error: > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > > > static void CreateImageData(vtkImageData* im); > > > > int main(int argc, char *argv[]) > > { > > vtkSmartPointer reader = > > vtkSmartPointer::New(); > > > > reader->SetFileName( > "C:/Users/NoobsDeSroobs/Downloads/testVolume.xdmf"); > > printf("1 %d" , reader->CanReadFile( > "C:/Users/NoobsDeSroobs/Downloads/testVolume.xdmf")); > > reader->Update(); > > printf("2"); > > int numArrays = reader->GetNumberOfPointArrays(); > > printf("3"); > > for (int i = 0; i < numArrays; i++) { > > printf("Name of index %d is: %s", i, reader-> > GetPointArrayName(i)); > > printf("2"); > > } > > > > return 0; > > } > > > > > > Finally, I noticed that the standard way of copying the read data to the > vtkImageData is by doing a shallow copy of the output of the reader, but imageData->ShallowCopy(reader->GetOutput()) > does not compile as GetOutput() does not exist. > Use GetOutputData() this was an API change in VTK version 6.0. GetOutput() split into GetOutputPort() /* for connecting filters */ and GetOutputData() /* for getting the data object */ See http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput > I have a feeling this might have something to do with the fact that this > is a 4D file and not a standard 3D file. > > > > If possible a working example would be great to have. > > > > Finally, some functions like Update() and Read() are not listed in the > documentation: http://www.vtk.org/doc/nightly/html/ > > Navigate the inheritance hierarchy graph, or more easily click the "List of all members" link on the top right of the vtk doxygen page to see the methods of the ancestor classes as well as those implemented in the child class. classvtkXdmf3Reader.html > Just a > heads up. > > > > Thank you so much for your help. > > > > Yours, > > Magnus Elden > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Mon Jul 25 14:45:27 2016 From: bebe0705 at colorado.edu (BBerco) Date: Mon, 25 Jul 2016 11:45:27 -0700 (MST) Subject: [vtkusers] Index of points stored in vtkPolyData? Message-ID: <1469472327986-5739338.post@n5.nabble.com> Dear all, I'm storing point coordinates in a vtkPolyData object *points_polydata*. The corresponding points are then displayed in a VTK window. Using the proper interactor, I am able to "select" points that are inside a rectangular box using * vtkSmartPointer selectVisiblePoints = vtkSmartPointer::New(); //... Extra lines where the renderer is associated with selectVisiblePoints selectVisiblePoints -> SetInputDataObject(points_polydata); vtkSmartPointer visiblePointsPolyData = selectVisiblePoints->GetOutput(); * *visiblePointsPolyData* stores the coordinates of the selected points, as I can print them with *vtkSmartPointer points = visiblePointsPolyData->GetPoints(); for (int i = 0 ; i < points->GetNumberOfPoints(); ++i){ double p[3]; points -> GetPoint (i, p); std::cout << p[0]<< p[1] << p[2] << std::endl; } * >From this, I would like to be able to modify the coordinates of the selected points in the original *points_polydata*. To do so, I would need the index of the selected points to know where they stand in the original *points_polydata* (for instance, the 3 selected points are the 2n, 4th and 6th points in *points_polydata*). I know that I could use a getClosestPoint() method on each of the selected point against the original *points_polydata* to directly get this association, but I am afraid this could become inefficient when *points_polydata* contains a large number of points. How would you do this? Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Index-of-points-stored-in-vtkPolyData-tp5739338.html Sent from the VTK - Users mailing list archive at Nabble.com. From matimontg at gmail.com Mon Jul 25 17:40:26 2016 From: matimontg at gmail.com (Matias Montroull) Date: Mon, 25 Jul 2016 21:40:26 +0000 Subject: [vtkusers] Building Activiz 7.0 In-Reply-To: <1469462690487-5739336.post@n5.nabble.com> References: <1469462690487-5739336.post@n5.nabble.com> Message-ID: Hi Zkhan, no success, I gave up finally. I was able to build 6.X but not 7.0 so far.. If you succeed let me know! Thanks, Matias. El lun., 25 de jul. de 2016 a la(s) 13:05, zkhan escribi?: > Hi Matias, > > Did you have any success with building Activiz 7.0? I'm currently headed > down the same path. > > Thank you, > Zamir > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Building-Activiz-7-0-tp5737877p5739336.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From tossin at gmail.com Mon Jul 25 19:06:03 2016 From: tossin at gmail.com (Evan Kao) Date: Mon, 25 Jul 2016 16:06:03 -0700 Subject: [vtkusers] Possible bug: TransformFilter does not transform vectors for line polydata. Message-ID: Hello all, I attached a .vtp file of a line that has vector point data. When I apply a transform filter (code is provided below), the points are transformed properly, but the vectors are not: Original Transformed [image: Inline image 2] [image: Inline image 3] It turns out the vectors weren't transformed at all for some reason: Before After [image: Inline image 4] However, the vectors do transform properly when I'm transforming a 3D unstructured grid with tetrahedral and hexahedral cells. I thought the bug might be related to the topology, but when I put the polyline through a vtkDelauany3D filter, the transform still didn't work correctly. What's going on here? I should mention I tested this in both VTK (v7.0) and Paraview (v5.0). Thanks, Evan Kao Code: import vtk tf = (-0.0040248411422550, 0.9994518507299456, 0.0328602910252758, -0.0002179778201077, -0.9998799178301331, -0.0045139785455129, 0.0148247737823206, 0.2103193900724151, 0.0149649782420806, -0.0327966777307833, 0.9993500024295978, -0.0002392083616021, 0.0000000000000000, 0.0000000000000000, 0.0000000000000000, 1.0000000000000000) transform = vtk.vtkTransform() transform.SetMatrix(tf) transformFilter = vtk.vtkTransformFilter() transformFilter.SetInputData(input) transformFilter.SetTransform(transform) transformFilter.Update() output = transformFilter.GetOutput() -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: original geometry and vectors.png Type: image/png Size: 8638 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Spreadsheet comparison.png Type: image/png Size: 18448 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: transformed geometry and vectors.png Type: image/png Size: 7671 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: line.vtp Type: application/octet-stream Size: 15782 bytes Desc: not available URL: From cory.quammen at kitware.com Mon Jul 25 22:07:27 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 25 Jul 2016 22:07:27 -0400 Subject: [vtkusers] Possible bug: TransformFilter does not transform vectors for line polydata. In-Reply-To: References: Message-ID: Evan, I recall this being an issue that was reported on the bug tracker, but can't for the life of me find it. Mind filing a bug report? Note that it is probably only reasonable to transform the array that is designated as the "active vectors" array, as one could have multiple component arrays that do not represent a vector and therefore should not be transformed by the vtkTransformFilter. Thanks, Cory On Mon, Jul 25, 2016 at 7:06 PM, Evan Kao wrote: > Hello all, > > I attached a .vtp file of a line that has vector point data. When I apply > a transform filter (code is provided below), the points are transformed > properly, but the vectors are not: > > Original > Transformed > [image: Inline image 2] [image: Inline image 3] > > It turns out the vectors weren't transformed at all for some reason: > > Before After > [image: Inline image 4] > > However, the vectors do transform properly when I'm transforming a 3D > unstructured grid with tetrahedral and hexahedral cells. I thought the bug > might be related to the topology, but when I put the polyline through a > vtkDelauany3D filter, the transform still didn't work correctly. What's > going on here? > > I should mention I tested this in both VTK (v7.0) and Paraview (v5.0). > > Thanks, > Evan Kao > > > > > Code: > > import vtk > > > tf = (-0.0040248411422550, 0.9994518507299456, 0.0328602910252758, -0.0002179778201077, > > -0.9998799178301331, -0.0045139785455129, 0.0148247737823206, 0.2103193900724151, > > 0.0149649782420806, -0.0327966777307833, 0.9993500024295978, -0.0002392083616021, > > 0.0000000000000000, 0.0000000000000000, 0.0000000000000000, 1.0000000000000000) > > > transform = vtk.vtkTransform() > > transform.SetMatrix(tf) > > > transformFilter = vtk.vtkTransformFilter() > > transformFilter.SetInputData(input) > > transformFilter.SetTransform(transform) > > transformFilter.Update() > > output = transformFilter.GetOutput() > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: transformed geometry and vectors.png Type: image/png Size: 7671 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: original geometry and vectors.png Type: image/png Size: 8638 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Spreadsheet comparison.png Type: image/png Size: 18448 bytes Desc: not available URL: From donyyo at gmail.com Tue Jul 26 05:15:30 2016 From: donyyo at gmail.com (donyyo) Date: Tue, 26 Jul 2016 02:15:30 -0700 (MST) Subject: [vtkusers] How to get polydata from vtkWarpVector? Message-ID: <1469524530772-5739346.post@n5.nabble.com> Hi, I'm trying to enlarge the surface using vtkWarpVector following http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/WarpSurface . How can I get the polydata from the vtkSmartPointer warp? Thanks! Dony. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-polydata-from-vtkWarpVector-tp5739346.html Sent from the VTK - Users mailing list archive at Nabble.com. From giorgosragos at gmail.com Tue Jul 26 05:21:44 2016 From: giorgosragos at gmail.com (Giorgos Ragkousis) Date: Tue, 26 Jul 2016 10:21:44 +0100 Subject: [vtkusers] How to get polydata from vtkWarpVector? In-Reply-To: <1469524530772-5739346.post@n5.nabble.com> References: <1469524530772-5739346.post@n5.nabble.com> Message-ID: Hi Dony, Did you try the warp->GetPolyDataOutput()? Giorgos On Tue, Jul 26, 2016 at 10:15 AM, donyyo wrote: > Hi, > I'm trying to enlarge the surface using vtkWarpVector following > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/WarpSurface > . > How can I get the polydata from the vtkSmartPointer warp? > Thanks! > > Dony. > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-get-polydata-from-vtkWarpVector-tp5739346.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Georgios Ragkousis -------------- next part -------------- An HTML attachment was scrubbed... URL: From donyyo at gmail.com Tue Jul 26 05:32:59 2016 From: donyyo at gmail.com (donyyo) Date: Tue, 26 Jul 2016 02:32:59 -0700 (MST) Subject: [vtkusers] How to get polydata from vtkWarpVector? In-Reply-To: References: <1469524530772-5739346.post@n5.nabble.com> Message-ID: <1469525579961-5739349.post@n5.nabble.com> Hi Giorgos, It works. Thanks! Dony. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-polydata-from-vtkWarpVector-tp5739346p5739349.html Sent from the VTK - Users mailing list archive at Nabble.com. From prajwal.sapare at gmail.com Tue Jul 26 05:46:38 2016 From: prajwal.sapare at gmail.com (Prajwal Sapare) Date: Tue, 26 Jul 2016 11:46:38 +0200 Subject: [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - Qt5WebKitWidgets In-Reply-To: References: Message-ID: Hi !! I solved that issue. There is a bug in v6.3.0, and it's solved in v7.0.0. Thank You. Regards, Prajwal On Mon, Jul 25, 2016 at 12:44 PM, Magnus Elden wrote: > Then I have no idea what is causing it. I built and installed Qt as I have > told you and then, when building VTK, I left everything to be default. > > The only difference is that I used visual studio 2015. > > > > I am sorry I was unable to help. If I remember something I will contact > you. Until then I can only wish you luck. > > > > Yours, > > Magnus Elden > > > > *From:* Prajwal Sapare [mailto:prajwal.sapare at gmail.com] > *Sent:* Monday, 25 July, 2016 11:54 > *To:* Magnus Elden > > *Subject:* Re: [vtkusers] Integration of VTK into QT - VS2013 : CMake > Error - Qt5WebKitWidgets > > > > If I don't skip I do not get errors in build of Qt. But CMAke is looking > for Qt Webkit libraries when building VTK. I want to make this thing > optional as it is hindering my build. > > > > Regards, > > Prajwal > > > > On Mon, Jul 25, 2016 at 2:52 AM, Magnus Elden > wrote: > > Because I assumed you had downloaded the git repository. > > > > If you DON?T skip it you get a build error? If you remove just ?-skip > webkit? and keep skipping webengine and the rest? > > > > Please give this a read: https://wiki.qt.io/Building_Qt_5_from_Git > > > > Yours, > > Magnus Elden > > > > *From:* Prajwal Sapare [mailto:prajwal.sapare at gmail.com] > *Sent:* Sunday, 24 July, 2016 22:43 > > > *To:* Magnus Elden > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Integration of VTK into QT - VS2013 : CMake > Error - Qt5WebKitWidgets > > > > What do you mean by updating the submodules? How to do that and which > submodules? > > > > Below is error I obtained when using the option -skip webkit > > > > Error-[Attempting to skip non-existant module] > > > > *Update: *In other system I built 4.7.3 skipping webkit, however, in > CMake build for VTK it is again looking for QTWebkit_Library. > > > > I want to disable this search for QT_Webkit library in CMake. How to do? > > > > Regards, > > Prajwal > > > > > > On Sun, Jul 24, 2016 at 8:52 PM, Magnus Elden > wrote: > > I built Qt 5.7 using that option. Have you downloaded and updated the > submodules? > > > > ?-*skip* webchannel -*skip webengine* -*skip* webkit? is what I wrote and > it worked for me. What error are you getting? > > > > Yours, > > Magnus Elden > > > > *From:* Prajwal Sapare [mailto:prajwal.sapare at gmail.com] > *Sent:* Sunday, 24 July, 2016 19:21 > *To:* Magnus Elden > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Integration of VTK into QT - VS2013 : CMake > Error - Qt5WebKitWidgets > > > > Hello Magnus, vtkusers, > > > > The config option u used has webkit option, but I can't use it for Qt5.7.0. > > > > The configure options that I actually need to use is, > > *configure -debug-and-release -opensource -shared -no-qt3support > -qt-sql-sqlite -phonon -phonon-backend -no-webkit -no-script -platform > win32-msvc2013* > > > > However, for Qt5.7.0 the options webkit, phonon aren't supported. > > So I just used, > > *configure -debug-and-release -opensource -shared -qt-sql-sqlite -platform > win32-msvc2013* > > > > I wasn't able to disable webkit option to build. How can I do that? > > > > > > Regards, > > Prajwal > > > > On Sun, Jul 24, 2016 at 6:18 PM, Magnus Elden > wrote: > > I built it using configure with commands. > > > > Start visual studio developer command prompt and navigate to the source > folder. Then write ?configure ?skip webkit ?skip webengine -skip webmodules> -prefix -open-source -nomake examples -nomake > tests?. > > > > When the configuration is done you simply run the command ?nmake?. You > might want to set the platform by writing -platform . > > > > This should build the entire Qt library WITHOUT the web stuff. Then you > can install it by writing ?nmake install?. > > > > Later, when building VTK using cmake just link to the install directory if > cmake didn?t find it automatically. > > > > Hope this helps. > > > > Yours, > > Magnus Elden > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Prajwal > Sapare > *Sent:* Sunday, 24 July, 2016 17:53 > *To:* vtkusers at vtk.org > *Subject:* [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - > Qt5WebKitWidgets > > > > Hello, > > I am trying to build VTK(6.3.0) into QT 5.7.0. (Windows Platform) > . > I set the source directory and then the build directory and press > Configure in Cmake. > > Error is > > > > > > > > > > > > > > *CMake Error at C:/Qt/5.7.0/qtbase/lib/cmake/Qt5/Qt5Config.cmake:26 > (find_package):Could not find a package configuration file provided by > "Qt5WebKitWidgets"with any of the following > names:Qt5WebKitWidgetsConfig.cmakeqt5webkitwidgets-config.cmakeAdd the > installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH orset > "Qt5WebKitWidgets_DIR" to a directory containing one of the abovefiles. If > "Qt5WebKitWidgets" provides a separate development package orSDK, be sure > it has been installed.Call Stack (most recent call > first):GUISupport/QtWebkit/CMakeLists.txt:10 (find_package)* > > I am not getting a right solution, and not understanding. To some extent I > understood these webkit libraries were available in Qt4 version. However in > Qt5 it's been deleted and incorporated into Qt webengine. > > Any leads to solve this issue is appreciated. I saw some solutions wherein > they ask to make qt5Webkit optional in Cmakelists.txt. How should I do that > and where will I find CMakelists.txt? > > > > Regards, > > Prajwal > > Regards, > Prajwal > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjlp at netease.com Tue Jul 26 08:52:06 2016 From: tjlp at netease.com (Liu_tj) Date: Tue, 26 Jul 2016 20:52:06 +0800 (CST) Subject: [vtkusers] How to ensure to select a point really on 3D model Message-ID: <7cbec255.20.1562743230d.Coremail.tjlp@netease.com> Hi, VTK guys, I generated a 3D model based on a series of DICOM images. Now I want to draw angle on the 3D model using vtkAngleWidget. My C# code is as below: vtkAngleWidget angleWidget = vtkAngleWidget.New(); angleWidget.SetInteractor(renwin.GetInteractor()); vtkAngleRepresentation3D rep3d = vtkAngleRepresentation3D.New(); angleWidget.SetRepresentation(rep3d); angleWidget.On(); renwin.Render(); return angleWidget; And I can select 3 points and draw an angle. But the problem is that the 3 points I select are not no the 3d model. How to achieve that? Thanks Liu Peng -------------- next part -------------- An HTML attachment was scrubbed... URL: From joaolsvieira at gmail.com Tue Jul 26 10:48:18 2016 From: joaolsvieira at gmail.com (=?UTF-8?Q?Jo=C3=A3o_Luis?=) Date: Tue, 26 Jul 2016 10:48:18 -0400 Subject: [vtkusers] vtkPlaneSource by vtkPlaneWidget Message-ID: Hello vtkusers, I am trying to draw a vtkPlaneSource from a vtkPlaneWidget after some user interactions. I had extracted Point1, Point2, Normal and Center from my Widget as well. However, applying against a vtkPlaneSource the result does not reflect the vtkPlaneWidget's definitions chosen by the user. It means, basically size and orientation of the final plane. Many thanks for any help. following my snapshot. planeWidget = vtkSmartPointer::New(); planeWidget->SetInteractor(mouseClickCallback->renderWindowInteractor); //iren is vtkRenderWindowInteractor planeWidget->SetInputConnection(mydataset); planeWidget->SetPlaceFactor(1.0); planeWidget->SetHandleSize(0.03); planeWidget->SetResolution(10); planeWidget->GetHandleProperty()->SetColor(0, 0.6, 0.1); planeWidget->GetPlaneProperty()->SetColor(0, 0.3, 1); planeWidget->GetPlaneProperty()->SetEdgeColor(0, 0.9, 1); planeWidget->GetPlaneProperty()->SetEdgeVisibility(1); planeWidget->PlaceWidget(); planeWidget->SetRepresentationToSurface(); planeWidget->GetPolyData(planeW); planeWidget->AddObserver(vtkCommand::InteractionEvent, mouseClickCallback); planeWidget->SetNormal(normalVector[0], normalVector[1], normalVector[2]); // normal of my target plane planeWidget->SetCenter(center[0], center[1], center[2]); // origin of my target plane planeWidget->UpdatePlacement(); planeWidget->EnabledOn(); Callback Interactions _plane = vtkPlane::New(); vtkPolyData *polydata = vtkPolyData::New(); vtkSmartPointer extractEdges = vtkSmartPointer::New(); planeWidget->GetPlane(_plane); planeWidget->GetPolyData(polydata); planeWidget->GetPoint1(Point1); planeWidget->GetPoint2(Point2); planeWidget->GetCenter(Center); extractEdges->SetInputData(0, polydata); extractEdges->Update(); vtkSmartPointer newPlane = vtkSmartPointer::New(); newPlane->SetNormal(planeWidget->GetNormal()); newPlane->SetOrigin(planeWidget->GetOrigin()); VtkPlaneSource vtkSmartPointer planeSource = vtkSmartPointer::New(); planeSource->SetPoint1(Point1[0], Point1[1], Point1[2]);//Point1 planeSource->SetPoint2(Point2[0], Point2[1], Point2[2]);//Point2 //planeSource->SetOrigin(newPlane->Origin[0], newPlane->Origin[1], newPlane->Origin[2]);// planeSource->SetCenter(Center[0], Center[1], Center[2]); planeSource->SetNormal(newPlane->GetNormal()[0], newPlane->GetNormal()[1], newPlane->GetNormal()[2]); planeSource->Update(); Anybody here knows whats is wrong with my solution? Once, again many thanks for any help. Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From enzo.matsumiya at gmail.com Tue Jul 26 10:59:17 2016 From: enzo.matsumiya at gmail.com (Enzo Matsumiya) Date: Tue, 26 Jul 2016 11:59:17 -0300 Subject: [vtkusers] Move vtkActor2D with mouse Message-ID: Hi, I have a vtkActor2D which is a vtkSphere cut with a vtkPlane, so it's actually a circle. I want to be able to move this actor with the mouse. I could do it using the picker, but since the line is very thin, it's very hard do click on it. How can I implement some kind of "threshold" area to enable selecting the actor and move it with the mouse? Kind of how vtkResliceCursorWidget or vtkDistanceWidget implements it. Thanks! From luis.vieira at vektore.com Tue Jul 26 10:52:25 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 26 Jul 2016 10:52:25 -0400 Subject: [vtkusers] vtkPlaneSource from a vtkPlaneWidget Message-ID: <0bfd01d1e74d$534e3f30$f9eabd90$@vektore.com> Hello vtkusers, I am trying to draw a vtkPlaneSource from a vtkPlaneWidget after some user interactions. I had extracted Point1, Point2, Normal and Center from my Widget as well. However, applying against a vtkPlaneSource the result does not reflect the vtkPlaneWidget's definitions chosen by the user. It means, basically size and orientation of the final plane. Many thanks for any help. following my snapshot. planeWidget = vtkSmartPointer::New(); planeWidget->SetInteractor(mouseClickCallback->renderWindowInteractor); //iren is vtkRenderWindowInteractor planeWidget->SetInputConnection(mydataset); planeWidget->SetPlaceFactor(1.0); planeWidget->SetHandleSize(0.03); planeWidget->SetResolution(10); planeWidget->GetHandleProperty()->SetColor(0, 0.6, 0.1); planeWidget->GetPlaneProperty()->SetColor(0, 0.3, 1); planeWidget->GetPlaneProperty()->SetEdgeColor(0, 0.9, 1); planeWidget->GetPlaneProperty()->SetEdgeVisibility(1); planeWidget->PlaceWidget(); planeWidget->SetRepresentationToSurface(); planeWidget->GetPolyData(planeW); planeWidget->AddObserver(vtkCommand::InteractionEvent, mouseClickCallback); planeWidget->SetNormal(normalVector[0], normalVector[1], normalVector[2]); // normal of my target plane planeWidget->SetCenter(center[0], center[1], center[2]); // origin of my target plane planeWidget->UpdatePlacement(); planeWidget->EnabledOn(); Callback Interactions _plane = vtkPlane::New(); vtkPolyData *polydata = vtkPolyData::New(); vtkSmartPointer extractEdges = vtkSmartPointer::New(); planeWidget->GetPlane(_plane); planeWidget->GetPolyData(polydata); planeWidget->GetPoint1(Point1); planeWidget->GetPoint2(Point2); planeWidget->GetCenter(Center); extractEdges->SetInputData(0, polydata); extractEdges->Update(); vtkSmartPointer newPlane = vtkSmartPointer::New(); newPlane->SetNormal(planeWidget->GetNormal()); newPlane->SetOrigin(planeWidget->GetOrigin()); VtkPlaneSource vtkSmartPointer planeSource = vtkSmartPointer::New(); planeSource->SetPoint1(Point1[0], Point1[1], Point1[2]);//Point1 planeSource->SetPoint2(Point2[0], Point2[1], Point2[2]);//Point2 //planeSource->SetOrigin(newPlane->Origin[0], newPlane->Origin[1], newPlane->Origin[2]);// planeSource->SetCenter(Center[0], Center[1], Center[2]); planeSource->SetNormal(newPlane->GetNormal()[0], newPlane->GetNormal()[1], newPlane->GetNormal()[2]); planeSource->Update(); Anybody here knows whats is wrong with my solution? Once, again many thanks for any help. Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinander at gmail.com Tue Jul 26 11:22:36 2016 From: chinander at gmail.com (Mike Chinander) Date: Tue, 26 Jul 2016 10:22:36 -0500 Subject: [vtkusers] vtkPlaneSource from a vtkPlaneWidget In-Reply-To: <0bfd01d1e74d$534e3f30$f9eabd90$@vektore.com> References: <0bfd01d1e74d$534e3f30$f9eabd90$@vektore.com> Message-ID: For vtkPlaneSource, you have to set the Origin (you have this commented out), Point1, and Point2. You shouldn't have to set the PlaneSource's normal unless you want to change it's orientation as defined by the origin and the two points. On Tue, Jul 26, 2016 at 9:52 AM, Luis Vieira wrote: > Hello vtkusers, > > > > I am trying to draw a vtkPlaneSource from a vtkPlaneWidget after some user > interactions. I had extracted Point1, Point2, Normal and Center from my > Widget as well. However, applying against a vtkPlaneSource the result does > not reflect the vtkPlaneWidget's definitions chosen by the user. It means, > basically size and orientation of the final plane. Many thanks for any help. > > > > following my snapshot. > > > > planeWidget = vtkSmartPointer::New(); > > planeWidget->SetInteractor(mouseClickCallback->renderWindowInteractor); > //iren is vtkRenderWindowInteractor > > planeWidget->SetInputConnection(mydataset); > > planeWidget->SetPlaceFactor(1.0); > > planeWidget->SetHandleSize(0.03); > > planeWidget->SetResolution(10); > > planeWidget->GetHandleProperty()->SetColor(0, 0.6, 0.1); > > planeWidget->GetPlaneProperty()->SetColor(0, 0.3, 1); > > planeWidget->GetPlaneProperty()->SetEdgeColor(0, 0.9, 1); > > planeWidget->GetPlaneProperty()->SetEdgeVisibility(1); > > planeWidget->PlaceWidget(); > > planeWidget->SetRepresentationToSurface(); > > planeWidget->GetPolyData(planeW); > > planeWidget->AddObserver(vtkCommand::InteractionEvent, mouseClickCallback); > > planeWidget->SetNormal(normalVector[0], normalVector[1], normalVector[2]); > // normal of my target plane > > planeWidget->SetCenter(center[0], center[1], center[2]); // origin of my > target plane > > planeWidget->UpdatePlacement(); > > planeWidget->EnabledOn(); > > > > Callback Interactions > > > > _plane = vtkPlane::New(); > > vtkPolyData *polydata = vtkPolyData::New(); > > vtkSmartPointer extractEdges = > > vtkSmartPointer::New(); > > planeWidget->GetPlane(_plane); > > planeWidget->GetPolyData(polydata); > > planeWidget->GetPoint1(Point1); > > planeWidget->GetPoint2(Point2); > > planeWidget->GetCenter(Center); > > extractEdges->SetInputData(0, polydata); > > extractEdges->Update(); > > > > vtkSmartPointer newPlane = vtkSmartPointer::New(); > > newPlane->SetNormal(planeWidget->GetNormal()); > > newPlane->SetOrigin(planeWidget->GetOrigin()); > > > > VtkPlaneSource > > > > vtkSmartPointer planeSource = > > vtkSmartPointer::New(); > > planeSource->SetPoint1(Point1[0], Point1[1], Point1[2]);//Point1 > > planeSource->SetPoint2(Point2[0], Point2[1], Point2[2]);//Point2 > > //planeSource->SetOrigin(newPlane->Origin[0], newPlane->Origin[1], > newPlane->Origin[2]);// > > planeSource->SetCenter(Center[0], Center[1], Center[2]); > > planeSource->SetNormal(newPlane->GetNormal()[0], newPlane->GetNormal()[1], > newPlane->GetNormal()[2]); > > planeSource->Update(); > > > > > > Anybody here knows whats is wrong with my solution? Once, again many > thanks for any help. > > > > > > *Luis * > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Tue Jul 26 12:36:00 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 26 Jul 2016 12:36:00 -0400 Subject: [vtkusers] Contents of vtkusers digest Vol 147, Issue 28 vtkPlaneSource from a vtkPlaneWidget Message-ID: <200901d1e75b$cb5105e0$61f311a0$@vektore.com> Worked, Thank you very much Mike. Luis Vieira, Message: 9 Date: Tue, 26 Jul 2016 10:22:36 -0500 From: Mike Chinander To: VTK Users Subject: Re: [vtkusers] vtkPlaneSource from a vtkPlaneWidget Message-ID: Content-Type: text/plain; charset="utf-8" For vtkPlaneSource, you have to set the Origin (you have this commented out), Point1, and Point2. You shouldn't have to set the PlaneSource's normal unless you want to change it's orientation as defined by the origin and the two points. On Tue, Jul 26, 2016 at 9:52 AM, Luis Vieira wrote: > Hello vtkusers, > > > > I am trying to draw a vtkPlaneSource from a vtkPlaneWidget after some > user interactions. I had extracted Point1, Point2, Normal and Center > from my Widget as well. However, applying against a vtkPlaneSource the > result does not reflect the vtkPlaneWidget's definitions chosen by the > user. It means, basically size and orientation of the final plane. Many thanks for any help. > > > > following my snapshot. > > > > planeWidget = vtkSmartPointer::New(); > > planeWidget->SetInteractor(mouseClickCallback->renderWindowInteractor) > planeWidget->; > //iren is vtkRenderWindowInteractor > > planeWidget->SetInputConnection(mydataset); > > planeWidget->SetPlaceFactor(1.0); > > planeWidget->SetHandleSize(0.03); > > planeWidget->SetResolution(10); > > planeWidget->GetHandleProperty()->SetColor(0, 0.6, 0.1); > > planeWidget->GetPlaneProperty()->SetColor(0, 0.3, 1); > > planeWidget->GetPlaneProperty()->SetEdgeColor(0, 0.9, 1); > > planeWidget->GetPlaneProperty()->SetEdgeVisibility(1); > > planeWidget->PlaceWidget(); > > planeWidget->SetRepresentationToSurface(); > > planeWidget->GetPolyData(planeW); > > planeWidget->AddObserver(vtkCommand::InteractionEvent, > planeWidget->mouseClickCallback); > > planeWidget->SetNormal(normalVector[0], normalVector[1], > planeWidget->normalVector[2]); > // normal of my target plane > > planeWidget->SetCenter(center[0], center[1], center[2]); // origin of > planeWidget->my > target plane > > planeWidget->UpdatePlacement(); > > planeWidget->EnabledOn(); > > > > Callback Interactions > > > > _plane = vtkPlane::New(); > > vtkPolyData *polydata = vtkPolyData::New(); > > vtkSmartPointer extractEdges = > > vtkSmartPointer::New(); > > planeWidget->GetPlane(_plane); > > planeWidget->GetPolyData(polydata); > > planeWidget->GetPoint1(Point1); > > planeWidget->GetPoint2(Point2); > > planeWidget->GetCenter(Center); > > extractEdges->SetInputData(0, polydata); > > extractEdges->Update(); > > > > vtkSmartPointer newPlane = vtkSmartPointer::New(); > > newPlane->SetNormal(planeWidget->GetNormal()); > > newPlane->SetOrigin(planeWidget->GetOrigin()); > > > > VtkPlaneSource > > > > vtkSmartPointer planeSource = > > vtkSmartPointer::New(); > > planeSource->SetPoint1(Point1[0], Point1[1], Point1[2]);//Point1 > > planeSource->SetPoint2(Point2[0], Point2[1], Point2[2]);//Point2 > > //planeSource->SetOrigin(newPlane->Origin[0], newPlane->Origin[1], > newPlane->Origin[2]);// > > planeSource->SetCenter(Center[0], Center[1], Center[2]); > > planeSource->SetNormal(newPlane->GetNormal()[0], > planeSource->newPlane->GetNormal()[1], > newPlane->GetNormal()[2]); > > planeSource->Update(); > > > > > > Anybody here knows whats is wrong with my solution? Once, again many > thanks for any help. > > > > > > *Luis * > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Subject: Digest Footer _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers ------------------------------ End of vtkusers Digest, Vol 147, Issue 28 ***************************************** From tossin at gmail.com Tue Jul 26 12:43:19 2016 From: tossin at gmail.com (Evan Kao) Date: Tue, 26 Jul 2016 09:43:19 -0700 Subject: [vtkusers] Possible bug: TransformFilter does not transform vectors for line polydata. In-Reply-To: References: Message-ID: Ah, actually I think that was my problem. I didn't consider that only the active vectors were transformed. Thanks, Evan On Mon, Jul 25, 2016 at 7:07 PM, Cory Quammen wrote: > Evan, > > I recall this being an issue that was reported on the bug tracker, but > can't for the life of me find it. Mind filing a bug report? > > Note that it is probably only reasonable to transform the array that is > designated as the "active vectors" array, as one could have multiple > component arrays that do not represent a vector and therefore should not be > transformed by the vtkTransformFilter. > > Thanks, > Cory > > On Mon, Jul 25, 2016 at 7:06 PM, Evan Kao wrote: > >> Hello all, >> >> I attached a .vtp file of a line that has vector point data. When I >> apply a transform filter (code is provided below), the points are >> transformed properly, but the vectors are not: >> >> Original >> Transformed >> [image: Inline image 2] [image: Inline image 3] >> >> It turns out the vectors weren't transformed at all for some reason: >> >> Before After >> [image: Inline image 4] >> >> However, the vectors do transform properly when I'm transforming a 3D >> unstructured grid with tetrahedral and hexahedral cells. I thought the bug >> might be related to the topology, but when I put the polyline through a >> vtkDelauany3D filter, the transform still didn't work correctly. What's >> going on here? >> >> I should mention I tested this in both VTK (v7.0) and Paraview (v5.0). >> >> Thanks, >> Evan Kao >> >> >> >> >> Code: >> >> import vtk >> >> >> tf = (-0.0040248411422550, 0.9994518507299456, 0.0328602910252758, -0.0002179778201077, >> >> -0.9998799178301331, -0.0045139785455129, 0.0148247737823206, 0.2103193900724151, >> >> 0.0149649782420806, -0.0327966777307833, 0.9993500024295978, -0.0002392083616021, >> >> 0.0000000000000000, 0.0000000000000000, 0.0000000000000000, 1.0000000000000000) >> >> >> transform = vtk.vtkTransform() >> >> transform.SetMatrix(tf) >> >> >> transformFilter = vtk.vtkTransformFilter() >> >> transformFilter.SetInputData(input) >> >> transformFilter.SetTransform(transform) >> >> transformFilter.Update() >> >> output = transformFilter.GetOutput() >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: transformed geometry and vectors.png Type: image/png Size: 7671 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: original geometry and vectors.png Type: image/png Size: 8638 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Spreadsheet comparison.png Type: image/png Size: 18448 bytes Desc: not available URL: From luis.vieira at vektore.com Tue Jul 26 12:46:47 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Tue, 26 Jul 2016 12:46:47 -0400 Subject: [vtkusers] vtk-developers Digest, Vol 147, Issue 36 In-Reply-To: References: Message-ID: <281e01d1e75d$4d1e9640$e75bc2c0$@vektore.com> Worked, Thank you very much Mike For vtkPlaneSource, you have to set the Origin (you have this commented out), Point1, and Point2. You shouldn't have to set the PlaneSource's normal unless you want to change it's orientation as defined by the origin and the two points. On Tue, Jul 26, 2016 at 9:52 AM, Luis Vieira wrote: > Hello vtkusers, > > > > I am trying to draw a vtkPlaneSource from a vtkPlaneWidget after some user > interactions. I had extracted Point1, Point2, Normal and Center from my > Widget as well. However, applying against a vtkPlaneSource the result does > not reflect the vtkPlaneWidget's definitions chosen by the user. It means, > basically size and orientation of the final plane. Many thanks for any help. > > > > following my snapshot. > > > > planeWidget = vtkSmartPointer::New(); > > planeWidget->SetInteractor(mouseClickCallback->renderWindowInteractor); > //iren is vtkRenderWindowInteractor > > planeWidget->SetInputConnection(mydataset); > > planeWidget->SetPlaceFactor(1.0); > > planeWidget->SetHandleSize(0.03); > > planeWidget->SetResolution(10); > > planeWidget->GetHandleProperty()->SetColor(0, 0.6, 0.1); > > planeWidget->GetPlaneProperty()->SetColor(0, 0.3, 1); > > planeWidget->GetPlaneProperty()->SetEdgeColor(0, 0.9, 1); > > planeWidget->GetPlaneProperty()->SetEdgeVisibility(1); > > planeWidget->PlaceWidget(); > > planeWidget->SetRepresentationToSurface(); > > planeWidget->GetPolyData(planeW); > > planeWidget->AddObserver(vtkCommand::InteractionEvent, mouseClickCallback); > > planeWidget->SetNormal(normalVector[0], normalVector[1], normalVector[2]); > // normal of my target plane > > planeWidget->SetCenter(center[0], center[1], center[2]); // origin of my > target plane > > planeWidget->UpdatePlacement(); > > planeWidget->EnabledOn(); > > > > Callback Interactions > > > > _plane = vtkPlane::New(); > > vtkPolyData *polydata = vtkPolyData::New(); > > vtkSmartPointer extractEdges = > > vtkSmartPointer::New(); > > planeWidget->GetPlane(_plane); > > planeWidget->GetPolyData(polydata); > > planeWidget->GetPoint1(Point1); > > planeWidget->GetPoint2(Point2); > > planeWidget->GetCenter(Center); > > extractEdges->SetInputData(0, polydata); > > extractEdges->Update(); > > > > vtkSmartPointer newPlane = vtkSmartPointer::New(); > > newPlane->SetNormal(planeWidget->GetNormal()); > > newPlane->SetOrigin(planeWidget->GetOrigin()); > > > > VtkPlaneSource > > > > vtkSmartPointer planeSource = > > vtkSmartPointer::New(); > > planeSource->SetPoint1(Point1[0], Point1[1], Point1[2]);//Point1 > > planeSource->SetPoint2(Point2[0], Point2[1], Point2[2]);//Point2 > > //planeSource->SetOrigin(newPlane->Origin[0], newPlane->Origin[1], > newPlane->Origin[2]);// > > planeSource->SetCenter(Center[0], Center[1], Center[2]); > > planeSource->SetNormal(newPlane->GetNormal()[0], newPlane->GetNormal()[1], > newPlane->GetNormal()[2]); > > planeSource->Update(); > > > > > > Anybody here knows whats is wrong with my solution? Once, again many > thanks for any help. > > > > > > *Luis * -----Original Message----- From: vtk-developers [mailto:vtk-developers-bounces at vtk.org] On Behalf Of vtk-developers-request at vtk.org Sent: July 26, 2016 10:59 AM To: vtk-developers at vtk.org Subject: vtk-developers Digest, Vol 147, Issue 36 Send vtk-developers mailing list submissions to vtk-developers at vtk.org To subscribe or unsubscribe via the World Wide Web, visit http://public.kitware.com/mailman/listinfo/vtk-developers or, via email, send a message with subject or body 'help' to vtk-developers-request at vtk.org You can reach the person managing the list at vtk-developers-owner at vtk.org When replying, please edit your Subject line so it is more specific than "Re: Contents of vtk-developers digest..." Today's Topics: 1. Re: Rogue7 vtktiff dashboard build failure (Ben Boeckel) 2. vtkPlaneSource by vtkPlaneWidget (Jo?o Luis) 3. vtkPlaneSource from a vtkPlaneWidget (Luis Vieira) ---------------------------------------------------------------------- Message: 1 Date: Tue, 26 Jul 2016 10:42:35 -0400 From: Ben Boeckel To: Sean McBride Cc: VTK Developers , David Gobbi Subject: Re: [vtk-developers] Rogue7 vtktiff dashboard build failure Message-ID: <20160726144235.GB14126 at rotor> Content-Type: text/plain; charset=utf-8 On Tue, Jul 26, 2016 at 10:22:52 -0400, Ben Boeckel wrote: > Now to figure out why the difference happens? tiff MR up: https://gitlab.kitware.com/third-party/tiff/merge_requests/1/commits --Ben ------------------------------ Message: 2 Date: Tue, 26 Jul 2016 10:49:15 -0400 From: Jo?o Luis To: vtk-developers at vtk.org Subject: [vtk-developers] vtkPlaneSource by vtkPlaneWidget Message-ID: Content-Type: text/plain; charset="utf-8" Hello vtkdevelopers, I am trying to draw a vtkPlaneSource from a vtkPlaneWidget after some user interactions. I had extracted Point1, Point2, Normal and Center from my Widget as well. However, applying against a vtkPlaneSource the result does not reflect the vtkPlaneWidget's definitions chosen by the user. It means, basically size and orientation of the final plane. Many thanks for any help. following my snapshot. planeWidget = vtkSmartPointer::New(); planeWidget->SetInteractor(mouseClickCallback->renderWindowInteractor); //iren is vtkRenderWindowInteractor planeWidget->SetInputConnection(mydataset); planeWidget->SetPlaceFactor(1.0); planeWidget->SetHandleSize(0.03); planeWidget->SetResolution(10); planeWidget->GetHandleProperty()->SetColor(0, 0.6, 0.1); planeWidget->GetPlaneProperty()->SetColor(0, 0.3, 1); planeWidget->GetPlaneProperty()->SetEdgeColor(0, 0.9, 1); planeWidget->GetPlaneProperty()->SetEdgeVisibility(1); planeWidget->PlaceWidget(); planeWidget->SetRepresentationToSurface(); planeWidget->GetPolyData(planeW); planeWidget->AddObserver(vtkCommand::InteractionEvent, planeWidget->mouseClickCallback); SetNormal(normalVector[0], planeWidget->normalVector[1], normalVector[2]); // normal of my target plane planeWidget->SetCenter(center[0], center[1], center[2]); // origin of my target plane planeWidget->UpdatePlacement(); planeWidget->EnabledOn(); Callback Interactions _plane = vtkPlane::New(); vtkPolyData *polydata = vtkPolyData::New(); vtkSmartPointer extractEdges = vtkSmartPointer::New(); planeWidget->GetPlane(_plane); planeWidget->GetPolyData(polydata); planeWidget->GetPoint1(Point1); planeWidget->GetPoint2(Point2); planeWidget->GetCenter(Center); extractEdges->SetInputData(0, polydata); Update(); vtkSmartPointer newPlane = vtkSmartPointer::New(); newPlane->SetNormal(planeWidget->GetNormal()); newPlane->SetOrigin(planeWidget->GetOrigin()); VtkPlaneSource vtkSmartPointer planeSource = vtkSmartPointer::New(); planeSource->SetPoint1(Point1[0], Point1[1], Point1[2]);//Point1 planeSource->SetPoint2(Point2[0], Point2[1], Point2[2]);//Point2 //planeSource->SetOrigin(newPlane->Origin[0], newPlane->Origin[1], newPlane->Origin[2]);// planeSource->SetCenter(Center[0], Center[1], Center[2]); planeSource->SetNormal(newPlane->GetNormal()[0], planeSource->newPlane->GetNormal()[1], newPlane->GetNormal()[2]); planeSource->Update(); Anybody here knows whats is wrong with my solution? Once, again many thanks for any help. Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Tue, 26 Jul 2016 10:51:51 -0400 From: "Luis Vieira" To: Subject: [vtk-developers] vtkPlaneSource from a vtkPlaneWidget Message-ID: <0be401d1e74d$3efd70f0$bcf852d0$@vektore.com> Content-Type: text/plain; charset="us-ascii" Hello vtkdevelopers, I am trying to draw a vtkPlaneSource from a vtkPlaneWidget after some user interactions. I had extracted Point1, Point2, Normal and Center from my Widget as well. However, applying against a vtkPlaneSource the result does not reflect the vtkPlaneWidget's definitions chosen by the user. It means, basically size and orientation of the final plane. Many thanks for any help. following my snapshot. planeWidget = vtkSmartPointer::New(); planeWidget->SetInteractor(mouseClickCallback->renderWindowInteractor); //iren is vtkRenderWindowInteractor planeWidget->SetInputConnection(mydataset); planeWidget->SetPlaceFactor(1.0); planeWidget->SetHandleSize(0.03); planeWidget->SetResolution(10); planeWidget->GetHandleProperty()->SetColor(0, 0.6, 0.1); planeWidget->GetPlaneProperty()->SetColor(0, 0.3, 1); planeWidget->GetPlaneProperty()->SetEdgeColor(0, 0.9, 1); planeWidget->GetPlaneProperty()->SetEdgeVisibility(1); planeWidget->PlaceWidget(); planeWidget->SetRepresentationToSurface(); planeWidget->GetPolyData(planeW); planeWidget->AddObserver(vtkCommand::InteractionEvent, planeWidget->mouseClickCallback); planeWidget->SetNormal(normalVector[0], normalVector[1], planeWidget->normalVector[2]); // normal of my target plane planeWidget->SetCenter(center[0], center[1], center[2]); // origin of my target plane planeWidget->UpdatePlacement(); planeWidget->EnabledOn(); Callback Interactions _plane = vtkPlane::New(); vtkPolyData *polydata = vtkPolyData::New(); vtkSmartPointer extractEdges = vtkSmartPointer::New(); planeWidget->GetPlane(_plane); planeWidget->GetPolyData(polydata); planeWidget->GetPoint1(Point1); planeWidget->GetPoint2(Point2); planeWidget->GetCenter(Center); extractEdges->SetInputData(0, polydata); extractEdges->Update(); vtkSmartPointer newPlane = vtkSmartPointer::New(); newPlane->SetNormal(planeWidget->GetNormal()); newPlane->SetOrigin(planeWidget->GetOrigin()); VtkPlaneSource vtkSmartPointer planeSource = vtkSmartPointer::New(); planeSource->SetPoint1(Point1[0], Point1[1], Point1[2]);//Point1 planeSource->SetPoint2(Point2[0], Point2[1], Point2[2]);//Point2 //planeSource->SetOrigin(newPlane->Origin[0], newPlane->Origin[1], newPlane->Origin[2]);// planeSource->SetCenter(Center[0], Center[1], Center[2]); planeSource->SetNormal(newPlane->GetNormal()[0], planeSource->newPlane->GetNormal()[1], newPlane->GetNormal()[2]); planeSource->Update(); Anybody here knows what is wrong with my solution? Once, again many thanks for any help. Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Subject: Digest Footer _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Search the list archives at: http://markmail.org/search/?q=vtk-developers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtk-developers ------------------------------ End of vtk-developers Digest, Vol 147, Issue 36 *********************************************** From bebe0705 at colorado.edu Tue Jul 26 17:34:29 2016 From: bebe0705 at colorado.edu (BBerco) Date: Tue, 26 Jul 2016 14:34:29 -0700 (MST) Subject: [vtkusers] Index of points stored in vtkPolyData? In-Reply-To: <1469472327986-5739338.post@n5.nabble.com> References: <1469472327986-5739338.post@n5.nabble.com> Message-ID: <1469568869657-5739367.post@n5.nabble.com> The end of my last message was maybe a bit misleading. Basically, I am wondering if the vtkPolyData *points_polydata* can be augmented with an id "column" such that each point is associated with an ID. So that the subset *visiblePointsPolyData* contains not only the coordinates of the visible points, but their ID as well. I am still reluctant to use a closest point approach to find the correspondence between the two sets, since this would be redundant with the rubber band selection, as the latter already provides the coordinates of the visible points (which would just need to be augmented with the ID of the visible points to make me a happy person). -- View this message in context: http://vtk.1045678.n5.nabble.com/Index-of-points-stored-in-vtkPolyData-tp5739338p5739367.html Sent from the VTK - Users mailing list archive at Nabble.com. From stephen at missouri.edu Tue Jul 26 20:30:02 2016 From: stephen at missouri.edu (Montgomery-Smith, Stephen) Date: Wed, 27 Jul 2016 00:30:02 +0000 Subject: [vtkusers] share/cmake/hdf5/libhdf5.settings Message-ID: <1d013468-d41b-6a48-f51c-070c939c4f38@missouri.edu> When I install vtk on FreeBSD, it installs a file called /usr/local/share/cmake/hdf5/libhdf5.settings But this file conflicts with another file of the same name installed by another package. Is this file actually needed? Or could I simply decide not to include it in the installation? Thanks, Stephen From cory.quammen at kitware.com Tue Jul 26 22:42:14 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 26 Jul 2016 22:42:14 -0400 Subject: [vtkusers] Index of points stored in vtkPolyData? In-Reply-To: <1469568869657-5739367.post@n5.nabble.com> References: <1469472327986-5739338.post@n5.nabble.com> <1469568869657-5739367.post@n5.nabble.com> Message-ID: vtkIdFilter does what you want: http://www.vtk.org/doc/nightly/html/classvtkIdFilter.html Just call vtkIdFilter::PointIdsOn() to generate point IDs. You can get the ids from your visiblePointsPolyData with visiblePointsPolyData->GetPointData()->GetArray("vtkIdFilter_Ids"). If you don't like the array name "vtkIdFilter_Ids", you can change it with vtkIdFilter::SetIdsArrayName(const char *) HTH, Cory On Tue, Jul 26, 2016 at 5:34 PM, BBerco wrote: > The end of my last message was maybe a bit misleading. > > Basically, I am wondering if the vtkPolyData *points_polydata* can be > augmented with an id "column" such that each point is associated with an ID. > So that the subset *visiblePointsPolyData* contains not only the coordinates > of the visible points, but their ID as well. > > I am still reluctant to use a closest point approach to find the > correspondence between the two sets, since this would be redundant with the > rubber band selection, as the latter already provides the coordinates of the > visible points (which would just need to be augmented with the ID of the > visible points to make me a happy person). > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Index-of-points-stored-in-vtkPolyData-tp5739338p5739367.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen R&D Engineer Kitware, Inc. From prajwal.sapare at gmail.com Wed Jul 27 09:52:25 2016 From: prajwal.sapare at gmail.com (Prajwal Sapare) Date: Wed, 27 Jul 2016 15:52:25 +0200 Subject: [vtkusers] Unable to run a sample program Message-ID: I just try to build a sample program, but I am getting an error stating this... 1>------ Build started: Project: ConsoleApplication1, Configuration: Debug Win32 ------ 1> stdafx.cpp 1> ConsoleApplication1.cpp 1>ConsoleApplication1.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class vtkAlgorithmOutput * __thiscall vtkAlgorithm::GetOutputPort(void)" (__imp_?GetOutputPort at vtkAlgorithm @@QAEPAVvtkAlgorithmOutput@@XZ) referenced in function _main 1>D:\syncplicity\z003npra\Documents\Visual Studio 2013\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== My code is: (A code from internet) ******************************************************************************************************* #include "stdafx.h" #include #include #include #include #include #include #include #include #include int main(int, char *[]) { // Create a cube. vtkSmartPointer cubeSource = vtkSmartPointer::New(); // Create a mapper and actor. vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(cubeSource->GetOutputPort()); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); // Create a renderer, render window, and interactor vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); // Add the actors to the scene renderer->AddActor(actor); renderer->SetBackground(.3, .2, .1); // Render and interact renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } ****************************************************************************************************** Please let me know regarding this. Regards, Prajwal -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Jul 27 10:58:43 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 27 Jul 2016 10:58:43 -0400 Subject: [vtkusers] Unable to run a sample program In-Reply-To: References: Message-ID: The error is a linker error that indicates you are not linking against the VTK libraries. HTH, Cory On Wed, Jul 27, 2016 at 9:52 AM, Prajwal Sapare wrote: > > I just try to build a sample program, but I am getting an error stating > this... > > > 1>------ Build started: Project: ConsoleApplication1, Configuration: Debug > Win32 ------ > 1> stdafx.cpp > 1> ConsoleApplication1.cpp > 1>ConsoleApplication1.obj : error LNK2019: unresolved external symbol > "__declspec(dllimport) public: class vtkAlgorithmOutput * __thiscall > vtkAlgorithm::GetOutputPort(void)" > (__imp_?GetOutputPort at vtkAlgorithm@@QAEPAVvtkAlgorithmOutput@@XZ) referenced > in function _main > 1>D:\syncplicity\z003npra\Documents\Visual Studio > 2013\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe : fatal > error LNK1120: 1 unresolved externals > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== > > > > My code is: (A code from internet) > > ******************************************************************************************************* > > #include "stdafx.h" > #include > > > #include > > #include > #include > #include > #include > #include > #include > #include > > int main(int, char *[]) > { > // Create a cube. > vtkSmartPointer cubeSource = > vtkSmartPointer::New(); > > // Create a mapper and actor. > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(cubeSource->GetOutputPort()); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > > // Create a renderer, render window, and interactor > vtkSmartPointer renderer = > vtkSmartPointer::New(); > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer(renderer); > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > // Add the actors to the scene > renderer->AddActor(actor); > renderer->SetBackground(.3, .2, .1); > > // Render and interact > renderWindow->Render(); > renderWindowInteractor->Start(); > > return EXIT_SUCCESS; > } > > > ****************************************************************************************************** > > Please let me know regarding this. > > > Regards, > Prajwal > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. From prajwal.sapare at gmail.com Wed Jul 27 11:09:36 2016 From: prajwal.sapare at gmail.com (Prajwal Sapare) Date: Wed, 27 Jul 2016 17:09:36 +0200 Subject: [vtkusers] Unable to run a sample program In-Reply-To: References: Message-ID: Yes I know it's a linker error. I followed all the steps given. Step1: Linking of INCLUDE files in VS2013 of CMAKE_INSTALL Prefix path Step2: Linking of LIB files in VS2013 of CMAKE_INSTALL Prefix path Step3: Adding of of LIB files name used in program to additional dependencies in Linker C++. Step4: Adding Bin folder path to system variables. Anything apart from this? Do you know any link or tutorial that defines the procedure properly? Regards, Prajwal On Wed, Jul 27, 2016 at 4:58 PM, Cory Quammen wrote: > The error is a linker error that indicates you are not linking against > the VTK libraries. > > HTH, > Cory > > On Wed, Jul 27, 2016 at 9:52 AM, Prajwal Sapare > wrote: > > > > I just try to build a sample program, but I am getting an error stating > > this... > > > > > > 1>------ Build started: Project: ConsoleApplication1, Configuration: > Debug > > Win32 ------ > > 1> stdafx.cpp > > 1> ConsoleApplication1.cpp > > 1>ConsoleApplication1.obj : error LNK2019: unresolved external symbol > > "__declspec(dllimport) public: class vtkAlgorithmOutput * __thiscall > > vtkAlgorithm::GetOutputPort(void)" > > (__imp_?GetOutputPort at vtkAlgorithm@@QAEPAVvtkAlgorithmOutput@@XZ) > referenced > > in function _main > > 1>D:\syncplicity\z003npra\Documents\Visual Studio > > 2013\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe : fatal > > error LNK1120: 1 unresolved externals > > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped > ========== > > > > > > > > My code is: (A code from internet) > > > > > ******************************************************************************************************* > > > > #include "stdafx.h" > > #include > > > > > > #include > > > > #include > > #include > > #include > > #include > > #include > > #include > > #include > > > > int main(int, char *[]) > > { > > // Create a cube. > > vtkSmartPointer cubeSource = > > vtkSmartPointer::New(); > > > > // Create a mapper and actor. > > vtkSmartPointer mapper = > > vtkSmartPointer::New(); > > mapper->SetInputConnection(cubeSource->GetOutputPort()); > > > > vtkSmartPointer actor = > > vtkSmartPointer::New(); > > actor->SetMapper(mapper); > > > > // Create a renderer, render window, and interactor > > vtkSmartPointer renderer = > > vtkSmartPointer::New(); > > vtkSmartPointer renderWindow = > > vtkSmartPointer::New(); > > renderWindow->AddRenderer(renderer); > > vtkSmartPointer renderWindowInteractor = > > vtkSmartPointer::New(); > > renderWindowInteractor->SetRenderWindow(renderWindow); > > > > // Add the actors to the scene > > renderer->AddActor(actor); > > renderer->SetBackground(.3, .2, .1); > > > > // Render and interact > > renderWindow->Render(); > > renderWindowInteractor->Start(); > > > > return EXIT_SUCCESS; > > } > > > > > > > ****************************************************************************************************** > > > > Please let me know regarding this. > > > > > > Regards, > > Prajwal > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Jul 27 11:26:46 2016 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 27 Jul 2016 11:26:46 -0400 Subject: [vtkusers] Unable to run a sample program In-Reply-To: References: Message-ID: Prajwal, I don't know the details of setting up include and library dependencies in VS2013 so I can't help you there. Nor is there a tutorial for VS that I know of. Typically, developers who use VTK find it easiest to get things set up properly by using CMake to generate the VS2013 files. See any of the example CMakeLists.txt files in the VTK C++ wiki examples, e.g., http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader If you don't want to use CMake, perhaps someone else on the list can help you with VS2013. HTH, Cory On Wed, Jul 27, 2016 at 11:09 AM, Prajwal Sapare wrote: > Yes I know it's a linker error. > I followed all the steps given. > > Step1: Linking of INCLUDE files in VS2013 of CMAKE_INSTALL Prefix path > Step2: Linking of LIB files in VS2013 of CMAKE_INSTALL Prefix path > Step3: Adding of of LIB files name used in program to additional > dependencies in Linker C++. > Step4: Adding Bin folder path to system variables. > > Anything apart from this? Do you know any link or tutorial that defines the > procedure properly? > > Regards, > Prajwal > > On Wed, Jul 27, 2016 at 4:58 PM, Cory Quammen > wrote: >> >> The error is a linker error that indicates you are not linking against >> the VTK libraries. >> >> HTH, >> Cory >> >> On Wed, Jul 27, 2016 at 9:52 AM, Prajwal Sapare >> wrote: >> > >> > I just try to build a sample program, but I am getting an error stating >> > this... >> > >> > >> > 1>------ Build started: Project: ConsoleApplication1, Configuration: >> > Debug >> > Win32 ------ >> > 1> stdafx.cpp >> > 1> ConsoleApplication1.cpp >> > 1>ConsoleApplication1.obj : error LNK2019: unresolved external symbol >> > "__declspec(dllimport) public: class vtkAlgorithmOutput * __thiscall >> > vtkAlgorithm::GetOutputPort(void)" >> > (__imp_?GetOutputPort at vtkAlgorithm@@QAEPAVvtkAlgorithmOutput@@XZ) >> > referenced >> > in function _main >> > 1>D:\syncplicity\z003npra\Documents\Visual Studio >> > 2013\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe : fatal >> > error LNK1120: 1 unresolved externals >> > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped >> > ========== >> > >> > >> > >> > My code is: (A code from internet) >> > >> > >> > ******************************************************************************************************* >> > >> > #include "stdafx.h" >> > #include >> > >> > >> > #include >> > >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include >> > >> > int main(int, char *[]) >> > { >> > // Create a cube. >> > vtkSmartPointer cubeSource = >> > vtkSmartPointer::New(); >> > >> > // Create a mapper and actor. >> > vtkSmartPointer mapper = >> > vtkSmartPointer::New(); >> > mapper->SetInputConnection(cubeSource->GetOutputPort()); >> > >> > vtkSmartPointer actor = >> > vtkSmartPointer::New(); >> > actor->SetMapper(mapper); >> > >> > // Create a renderer, render window, and interactor >> > vtkSmartPointer renderer = >> > vtkSmartPointer::New(); >> > vtkSmartPointer renderWindow = >> > vtkSmartPointer::New(); >> > renderWindow->AddRenderer(renderer); >> > vtkSmartPointer renderWindowInteractor = >> > vtkSmartPointer::New(); >> > renderWindowInteractor->SetRenderWindow(renderWindow); >> > >> > // Add the actors to the scene >> > renderer->AddActor(actor); >> > renderer->SetBackground(.3, .2, .1); >> > >> > // Render and interact >> > renderWindow->Render(); >> > renderWindowInteractor->Start(); >> > >> > return EXIT_SUCCESS; >> > } >> > >> > >> > >> > ****************************************************************************************************** >> > >> > Please let me know regarding this. >> > >> > >> > Regards, >> > Prajwal >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. > > -- Cory Quammen R&D Engineer Kitware, Inc. From magnus_elden at hotmail.com Wed Jul 27 12:20:02 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Wed, 27 Jul 2016 18:20:02 +0200 Subject: [vtkusers] Unable to run a sample program In-Reply-To: References: Message-ID: All you have to do is add the include and library folder + the libraries you want to use. In preferences->c/c++->general you can add the include path under additional include directories. Then, In preferences->linker->general add the library dir to the additional library dependencies. Finally, in preference->linker->input under additional dependencies you add every library you want to link against. So you have to list all folders that contain all the libraries AND you have to name each library that you want to use. If either the name is not listed or the path is not listed it will give you this error. I would use Cmake instead though. Makes it much easier. Yours, Magnus Elden -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Cory Quammen Sent: Wednesday, 27 July, 2016 17:27 To: Prajwal Sapare Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Unable to run a sample program Prajwal, I don't know the details of setting up include and library dependencies in VS2013 so I can't help you there. Nor is there a tutorial for VS that I know of. Typically, developers who use VTK find it easiest to get things set up properly by using CMake to generate the VS2013 files. See any of the example CMakeLists.txt files in the VTK C++ wiki examples, e.g., http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader If you don't want to use CMake, perhaps someone else on the list can help you with VS2013. HTH, Cory On Wed, Jul 27, 2016 at 11:09 AM, Prajwal Sapare wrote: > Yes I know it's a linker error. > I followed all the steps given. > > Step1: Linking of INCLUDE files in VS2013 of CMAKE_INSTALL Prefix path > Step2: Linking of LIB files in VS2013 of CMAKE_INSTALL Prefix path > Step3: Adding of of LIB files name used in program to additional > dependencies in Linker C++. > Step4: Adding Bin folder path to system variables. > > Anything apart from this? Do you know any link or tutorial that > defines the procedure properly? > > Regards, > Prajwal > > On Wed, Jul 27, 2016 at 4:58 PM, Cory Quammen > > wrote: >> >> The error is a linker error that indicates you are not linking >> against the VTK libraries. >> >> HTH, >> Cory >> >> On Wed, Jul 27, 2016 at 9:52 AM, Prajwal Sapare >> wrote: >> > >> > I just try to build a sample program, but I am getting an error >> > stating this... >> > >> > >> > 1>------ Build started: Project: ConsoleApplication1, Configuration: >> > Debug >> > Win32 ------ >> > 1> stdafx.cpp >> > 1> ConsoleApplication1.cpp >> > 1>ConsoleApplication1.obj : error LNK2019: unresolved external >> > 1>symbol >> > "__declspec(dllimport) public: class vtkAlgorithmOutput * >> > __thiscall vtkAlgorithm::GetOutputPort(void)" >> > (__imp_?GetOutputPort at vtkAlgorithm@@QAEPAVvtkAlgorithmOutput@@XZ) >> > referenced >> > in function _main >> > 1>D:\syncplicity\z003npra\Documents\Visual Studio >> > 2013\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe : >> > fatal error LNK1120: 1 unresolved externals ========== Build: 0 >> > succeeded, 1 failed, 0 up-to-date, 0 skipped ========== >> > >> > >> > >> > My code is: (A code from internet) >> > >> > >> > ******************************************************************* >> > ************************************ >> > >> > #include "stdafx.h" >> > #include >> > >> > >> > #include >> > >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include #include >> > >> > int main(int, char *[]) >> > { >> > // Create a cube. >> > vtkSmartPointer cubeSource = >> > vtkSmartPointer::New(); >> > >> > // Create a mapper and actor. >> > vtkSmartPointer mapper = >> > vtkSmartPointer::New(); >> > mapper->SetInputConnection(cubeSource->GetOutputPort()); >> > >> > vtkSmartPointer actor = >> > vtkSmartPointer::New(); >> > actor->SetMapper(mapper); >> > >> > // Create a renderer, render window, and interactor >> > vtkSmartPointer renderer = >> > vtkSmartPointer::New(); >> > vtkSmartPointer renderWindow = >> > vtkSmartPointer::New(); >> > renderWindow->AddRenderer(renderer); >> > vtkSmartPointer renderWindowInteractor = >> > vtkSmartPointer::New(); >> > renderWindowInteractor->SetRenderWindow(renderWindow); >> > >> > // Add the actors to the scene >> > renderer->AddActor(actor); >> > renderer->SetBackground(.3, .2, .1); >> > >> > // Render and interact >> > renderWindow->Render(); >> > renderWindowInteractor->Start(); >> > >> > return EXIT_SUCCESS; >> > } >> > >> > >> > >> > ******************************************************************* >> > *********************************** >> > >> > Please let me know regarding this. >> > >> > >> > Regards, >> > Prajwal >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. > > -- Cory Quammen R&D Engineer Kitware, Inc. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From lasso at queensu.ca Wed Jul 27 12:12:34 2016 From: lasso at queensu.ca (Andras Lasso) Date: Wed, 27 Jul 2016 16:12:34 +0000 Subject: [vtkusers] Unable to run a sample program In-Reply-To: References: Message-ID: Prajwal, The steps you described should be enough. The linker error you get indicates that not all necessary .lib files are listed in Linker / Input / Additional dependencies. I agree with Cory that's the easiest is to use CMake but if that's not possible then generate at least one example solution using CMake and copy the settings manually to your non-CMake-generated solution. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Cory Quammen Sent: July 27, 2016 11:27 To: Prajwal Sapare Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Unable to run a sample program Prajwal, I don't know the details of setting up include and library dependencies in VS2013 so I can't help you there. Nor is there a tutorial for VS that I know of. Typically, developers who use VTK find it easiest to get things set up properly by using CMake to generate the VS2013 files. See any of the example CMakeLists.txt files in the VTK C++ wiki examples, e.g., http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader If you don't want to use CMake, perhaps someone else on the list can help you with VS2013. HTH, Cory On Wed, Jul 27, 2016 at 11:09 AM, Prajwal Sapare wrote: > Yes I know it's a linker error. > I followed all the steps given. > > Step1: Linking of INCLUDE files in VS2013 of CMAKE_INSTALL Prefix path > Step2: Linking of LIB files in VS2013 of CMAKE_INSTALL Prefix path > Step3: Adding of of LIB files name used in program to additional > dependencies in Linker C++. > Step4: Adding Bin folder path to system variables. > > Anything apart from this? Do you know any link or tutorial that > defines the procedure properly? > > Regards, > Prajwal > > On Wed, Jul 27, 2016 at 4:58 PM, Cory Quammen > > wrote: >> >> The error is a linker error that indicates you are not linking >> against the VTK libraries. >> >> HTH, >> Cory >> >> On Wed, Jul 27, 2016 at 9:52 AM, Prajwal Sapare >> wrote: >> > >> > I just try to build a sample program, but I am getting an error >> > stating this... >> > >> > >> > 1>------ Build started: Project: ConsoleApplication1, Configuration: >> > Debug >> > Win32 ------ >> > 1> stdafx.cpp >> > 1> ConsoleApplication1.cpp >> > 1>ConsoleApplication1.obj : error LNK2019: unresolved external >> > 1>symbol >> > "__declspec(dllimport) public: class vtkAlgorithmOutput * >> > __thiscall vtkAlgorithm::GetOutputPort(void)" >> > (__imp_?GetOutputPort at vtkAlgorithm@@QAEPAVvtkAlgorithmOutput@@XZ) >> > referenced >> > in function _main >> > 1>D:\syncplicity\z003npra\Documents\Visual Studio >> > 2013\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe : >> > fatal error LNK1120: 1 unresolved externals ========== Build: 0 >> > succeeded, 1 failed, 0 up-to-date, 0 skipped ========== >> > >> > >> > >> > My code is: (A code from internet) >> > >> > >> > ******************************************************************* >> > ************************************ >> > >> > #include "stdafx.h" >> > #include >> > >> > >> > #include >> > >> > #include >> > #include >> > #include >> > #include >> > #include >> > #include #include >> > >> > int main(int, char *[]) >> > { >> > // Create a cube. >> > vtkSmartPointer cubeSource = >> > vtkSmartPointer::New(); >> > >> > // Create a mapper and actor. >> > vtkSmartPointer mapper = >> > vtkSmartPointer::New(); >> > mapper->SetInputConnection(cubeSource->GetOutputPort()); >> > >> > vtkSmartPointer actor = >> > vtkSmartPointer::New(); >> > actor->SetMapper(mapper); >> > >> > // Create a renderer, render window, and interactor >> > vtkSmartPointer renderer = >> > vtkSmartPointer::New(); >> > vtkSmartPointer renderWindow = >> > vtkSmartPointer::New(); >> > renderWindow->AddRenderer(renderer); >> > vtkSmartPointer renderWindowInteractor = >> > vtkSmartPointer::New(); >> > renderWindowInteractor->SetRenderWindow(renderWindow); >> > >> > // Add the actors to the scene >> > renderer->AddActor(actor); >> > renderer->SetBackground(.3, .2, .1); >> > >> > // Render and interact >> > renderWindow->Render(); >> > renderWindowInteractor->Start(); >> > >> > return EXIT_SUCCESS; >> > } >> > >> > >> > >> > ******************************************************************* >> > *********************************** >> > >> > Please let me know regarding this. >> > >> > >> > Regards, >> > Prajwal >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. > > -- Cory Quammen R&D Engineer Kitware, Inc. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From bebe0705 at colorado.edu Wed Jul 27 15:30:09 2016 From: bebe0705 at colorado.edu (BBerco) Date: Wed, 27 Jul 2016 12:30:09 -0700 (MST) Subject: [vtkusers] Index of points stored in vtkPolyData? In-Reply-To: References: <1469472327986-5739338.post@n5.nabble.com> <1469568869657-5739367.post@n5.nabble.com> Message-ID: <1469647809982-5739383.post@n5.nabble.com> Cory, Thanks a lot, it worked like a charm. -- View this message in context: http://vtk.1045678.n5.nabble.com/Index-of-points-stored-in-vtkPolyData-tp5739338p5739383.html Sent from the VTK - Users mailing list archive at Nabble.com. From the.1.lily at hotmail.com Wed Jul 27 17:53:59 2016 From: the.1.lily at hotmail.com (the lily) Date: Wed, 27 Jul 2016 21:53:59 +0000 Subject: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 Message-ID: Hi I'm building VTK 6.3 on my machine, these are the steps I followed cmake. vi CMakeCache.txt and changed CMAKE_INSTALL_PREFIX:PATH=/home/VTK-6.3.0 make -j make install Everything went well until I tried to do make install, to write the header files into the include directory I keep getting this error CMake Error at Common/Core/cmake_install.cmake:47 (FILE): file INSTALL cannot find "/home/VTK-6.3.0/lib/libvtkCommonCore-6.3.so.1". Call Stack (most recent call first): cmake_install.cmake:100 (INCLUDE) I found this suggestion but it did not work: export LD_LIBRARY_PATH=/home/VTK-6.3.0/lib:$LD_LIBRARY_PATH -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.1.lily at hotmail.com Wed Jul 27 17:53:59 2016 From: the.1.lily at hotmail.com (the lily) Date: Wed, 27 Jul 2016 21:53:59 +0000 Subject: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 Message-ID: Hi I'm building VTK 6.3 on my machine, these are the steps I followed cmake. vi CMakeCache.txt and changed CMAKE_INSTALL_PREFIX:PATH=/home/VTK-6.3.0 make -j make install Everything went well until I tried to do make install, to write the header files into the include directory I keep getting this error CMake Error at Common/Core/cmake_install.cmake:47 (FILE): file INSTALL cannot find "/home/VTK-6.3.0/lib/libvtkCommonCore-6.3.so.1". Call Stack (most recent call first): cmake_install.cmake:100 (INCLUDE) I found this suggestion but it did not work: export LD_LIBRARY_PATH=/home/VTK-6.3.0/lib:$LD_LIBRARY_PATH -------------- next part -------------- An HTML attachment was scrubbed... URL: From tharun160190 at gmail.com Thu Jul 28 04:07:52 2016 From: tharun160190 at gmail.com (Tharun) Date: Thu, 28 Jul 2016 01:07:52 -0700 (MST) Subject: [vtkusers] How to set the boundary of vtkDelaunay2D ? In-Reply-To: References: <1443277532130-5734142.post@n5.nabble.com> <1443280281055-5734143.post@n5.nabble.com> <1443314989143-5734146.post@n5.nabble.com> <1443352584901-5734149.post@n5.nabble.com> <1443405024462-5734151.post@n5.nabble.com> Message-ID: <1469693272693-5739385.post@n5.nabble.com> Dear David, Thank you for your inputs. I myself struck with the situation of vtkDelaunay2D going into infinite recursion and crashing for some inputs. Except for these inputs, the algorithm serves my purpose very well. Do you recommend any solution for this problem? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-set-the-boundary-of-vtkDelaunay2D-tp5734142p5739385.html Sent from the VTK - Users mailing list archive at Nabble.com. From tharun160190 at gmail.com Thu Jul 28 05:02:37 2016 From: tharun160190 at gmail.com (Tharun) Date: Thu, 28 Jul 2016 02:02:37 -0700 (MST) Subject: [vtkusers] Problem in migrating from 32bit version of VTK to 64bit version of VTK.. In-Reply-To: References: <4EE8869F.6050504@gmail.com> <-8599357922739107867@unknownmsgid> Message-ID: <1469696557084-5739386.post@n5.nabble.com> Hi Rakesh Were you able to find solution for the crashing? Thank you -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-in-migrating-from-32bit-version-of-VTK-to-64bit-version-of-VTK-tp5074163p5739386.html Sent from the VTK - Users mailing list archive at Nabble.com. From alexandre.ancel at cemosis.fr Thu Jul 28 05:23:45 2016 From: alexandre.ancel at cemosis.fr (Alexandre Ancel) Date: Thu, 28 Jul 2016 11:23:45 +0200 Subject: [vtkusers] VTK with gcc 6 Message-ID: Hello everyone, It seems that building VTK with gcc version 6 and up seems to fail at the CMake configuration step (at least for VTK 5 and 7). I managed to build them by modifying the regular expression: string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}") by adding a 6 to the first match. in: CMake/vtkCompilerExtras.cmake for VTK 5 and 7 CMake/GenerateExportHeader.cmake for VTK 7 It might be a good idea to also add 7 to future proof the versions or modify the expression so that future iterations of gcc do not pose problems. Best regards, Alexandre Ancel -- Alexandre Ancel Docteur, Ing?nieur de recherche / Phd, Research Engineer Cemosis - alexandre.ancel at cemosis.fr Tel: +33 (0)3 68 8*5 02 06* IRMA - 7, rue Ren? Descartes 67 000 Strasbourg, France -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.ancel at cemosis.fr Thu Jul 28 05:43:32 2016 From: alexandre.ancel at cemosis.fr (Alexandre Ancel) Date: Thu, 28 Jul 2016 11:43:32 +0200 Subject: [vtkusers] VTK with gcc 6 In-Reply-To: References: Message-ID: As a follow-up to my previous mail, VTK 5 does not seem to build with gcc 6.1.0 despite the configuration tweak. I end up having the following errors in vtkMath.h: In static member function 'static int vtkMath::GetScalarTypeFittingRange(double, double, double, double)': error: narrowing conversion of '9223372036854775807l' from 'long int' to 'double' inside { } [-Wnarrowing] }; error: narrowing conversion of '18446744073709551615ul' from 'long unsigned int' to 'double' inside { } [-Wnarrowing] error: narrowing conversion of '9223372036854775807ll' from 'long long int' to 'double' inside { } [-Wnarrowing] error: narrowing conversion of '18446744073709551615ull' from 'long long unsigned int' to 'double' inside { } [-Wnarrowing] However VTK 7 build and install steps seem to be ok. Best regards, Alexandre Ancel On Thu, Jul 28, 2016 at 11:23 AM, Alexandre Ancel < alexandre.ancel at cemosis.fr> wrote: > Hello everyone, > > It seems that building VTK with gcc version 6 and up seems to fail at the > CMake configuration step (at least for VTK 5 and 7). > > I managed to build them by modifying the regular expression: > > string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" > _gcc_version "${_gcc_version_info}") > > by adding a 6 to the first match. > > in: > CMake/vtkCompilerExtras.cmake for VTK 5 and 7 > CMake/GenerateExportHeader.cmake for VTK 7 > > It might be a good idea to also add 7 to future proof the versions or > modify the expression so that future iterations of gcc do not pose problems. > > Best regards, > Alexandre Ancel > > -- > Alexandre Ancel > Docteur, Ing?nieur de recherche / Phd, Research Engineer > Cemosis - alexandre.ancel at cemosis.fr > Tel: +33 (0)3 68 8*5 02 06* > IRMA - 7, rue Ren? Descartes > 67 000 Strasbourg, France > -- Alexandre Ancel Docteur, Ing?nieur de recherche / Phd, Research Engineer Cemosis - alexandre.ancel at cemosis.fr Tel: +33 (0)3 68 8*5 02 06* IRMA - 7, rue Ren? Descartes 67 000 Strasbourg, France -------------- next part -------------- An HTML attachment was scrubbed... URL: From carmenmanzulli at gmail.com Thu Jul 28 06:01:43 2016 From: carmenmanzulli at gmail.com (Carmen Manzulli) Date: Thu, 28 Jul 2016 12:01:43 +0200 Subject: [vtkusers] Draggable Square Message-ID: Hi, I'm a Student and I'm working on a project based on VTK and ITK with DICOM images. I would like to know if exist a class or a widget to make a Draggable Square starting from a center point of the image and how to use it for that goal. Thanks in advance, Carmen. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carmenmanzulli at gmail.com Thu Jul 28 06:36:03 2016 From: carmenmanzulli at gmail.com (Carmen Manzulli) Date: Thu, 28 Jul 2016 12:36:03 +0200 Subject: [vtkusers] Draggable Square Message-ID: Hi, I'm a Student and I'm working on a project based on VTK and ITK with DICOM images. I would like to know if exist a class or a widget to make a Draggable Square starting from a center point of the image and how to use it for that goal. Thanks in advance, Carmen. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Jul 28 08:54:53 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 28 Jul 2016 08:54:53 -0400 Subject: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 In-Reply-To: References: Message-ID: Does that file exist? Maybe the build did not completed correctly. HTH, Dan On Wed, Jul 27, 2016 at 5:53 PM, the lily wrote: > Hi > > > I'm building VTK 6.3 on my machine, these are the steps I followed > > > cmake. > > > vi CMakeCache.txt > and changed CMAKE_INSTALL_PREFIX:PATH=/home/VTK-6.3.0 > > make -j > > make install > > Everything went well until I tried to do make install, to write the header > files into the include directory I keep getting this error > > > CMake Error at Common/Core/cmake_install.cmake:47 (FILE): > file INSTALL cannot find > "/home/VTK-6.3.0/lib/libvtkCommonCore-6.3.so.1". > Call Stack (most recent call first): > cmake_install.cmake:100 (INCLUDE) > > > I found this suggestion but it did not work: export > LD_LIBRARY_PATH=/home/VTK-6.3.0/lib:$LD_LIBRARY_PATH > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Jul 28 08:54:53 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 28 Jul 2016 08:54:53 -0400 Subject: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 In-Reply-To: References: Message-ID: Does that file exist? Maybe the build did not completed correctly. HTH, Dan On Wed, Jul 27, 2016 at 5:53 PM, the lily wrote: > Hi > > > I'm building VTK 6.3 on my machine, these are the steps I followed > > > cmake. > > > vi CMakeCache.txt > and changed CMAKE_INSTALL_PREFIX:PATH=/home/VTK-6.3.0 > > make -j > > make install > > Everything went well until I tried to do make install, to write the header > files into the include directory I keep getting this error > > > CMake Error at Common/Core/cmake_install.cmake:47 (FILE): > file INSTALL cannot find > "/home/VTK-6.3.0/lib/libvtkCommonCore-6.3.so.1". > Call Stack (most recent call first): > cmake_install.cmake:100 (INCLUDE) > > > I found this suggestion but it did not work: export > LD_LIBRARY_PATH=/home/VTK-6.3.0/lib:$LD_LIBRARY_PATH > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinander at gmail.com Thu Jul 28 09:13:41 2016 From: chinander at gmail.com (Mike Chinander) Date: Thu, 28 Jul 2016 08:13:41 -0500 Subject: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 In-Reply-To: References: Message-ID: Do you have write access to /home? Typically, for an individual user install, the CMAKE_INSTALL_PREFIX would be /home/username/VTK-6.3.0, where 'username' is your username. On Wed, Jul 27, 2016 at 4:53 PM, the lily wrote: > Hi > > > I'm building VTK 6.3 on my machine, these are the steps I followed > > > cmake. > > > vi CMakeCache.txt > and changed CMAKE_INSTALL_PREFIX:PATH=/home/VTK-6.3.0 > > make -j > > make install > > Everything went well until I tried to do make install, to write the header > files into the include directory I keep getting this error > > > CMake Error at Common/Core/cmake_install.cmake:47 (FILE): > file INSTALL cannot find > "/home/VTK-6.3.0/lib/libvtkCommonCore-6.3.so.1". > Call Stack (most recent call first): > cmake_install.cmake:100 (INCLUDE) > > > I found this suggestion but it did not work: export > LD_LIBRARY_PATH=/home/VTK-6.3.0/lib:$LD_LIBRARY_PATH > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jul 28 09:32:51 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 28 Jul 2016 07:32:51 -0600 Subject: [vtkusers] How to set the boundary of vtkDelaunay2D ? In-Reply-To: <1469693272693-5739385.post@n5.nabble.com> References: <1443277532130-5734142.post@n5.nabble.com> <1443280281055-5734143.post@n5.nabble.com> <1443314989143-5734146.post@n5.nabble.com> <1443352584901-5734149.post@n5.nabble.com> <1443405024462-5734151.post@n5.nabble.com> <1469693272693-5739385.post@n5.nabble.com> Message-ID: Hi Tharun, The only advice I can give is what I've suggested earlier in this thread: If vtkDelaunay2D crashes, then try vtkContourTriangulator. - David On Thu, Jul 28, 2016 at 2:07 AM, Tharun wrote: > Dear David, > > Thank you for your inputs. I myself struck with the situation of > vtkDelaunay2D going into infinite > recursion and crashing for some inputs. Except for these inputs, the > algorithm serves my purpose very well. > > Do you recommend any solution for this problem? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.1.lily at hotmail.com Thu Jul 28 09:58:24 2016 From: the.1.lily at hotmail.com (the lily) Date: Thu, 28 Jul 2016 13:58:24 +0000 Subject: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 In-Reply-To: References: , Message-ID: The build displayed that it has completed, but how can I check if the file is there? ________________________________ From: Dan Lipsa Sent: Thursday, July 28, 2016 3:54 PM To: the lily Cc: vtkusers at vtk.org; vtkusers at public.kitware.com Subject: Re: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 Does that file exist? Maybe the build did not completed correctly. HTH, Dan On Wed, Jul 27, 2016 at 5:53 PM, the lily > wrote: Hi I'm building VTK 6.3 on my machine, these are the steps I followed cmake. vi CMakeCache.txt and changed CMAKE_INSTALL_PREFIX:PATH=/home/VTK-6.3.0 make -j make install Everything went well until I tried to do make install, to write the header files into the include directory I keep getting this error CMake Error at Common/Core/cmake_install.cmake:47 (FILE): file INSTALL cannot find "/home/VTK-6.3.0/lib/libvtkCommonCore-6.3.so.1". Call Stack (most recent call first): cmake_install.cmake:100 (INCLUDE) I found this suggestion but it did not work: export LD_LIBRARY_PATH=/home/VTK-6.3.0/lib:$LD_LIBRARY_PATH _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Thu Jul 28 09:59:31 2016 From: luis.vieira at vektore.com (Luis Vieira) Date: Thu, 28 Jul 2016 09:59:31 -0400 Subject: [vtkusers] Integration of VTK into QT - VS2013 : CMake Error - Qt5WebKitWidgets Message-ID: <041f01d1e8d8$441630e0$cc4292a0$@vektore.com> Hi Prajwal, I did once by CMake 3.3.1 and worked smoothly. See attachment CMake331QT53VTK63VS2013. Luis Vieira luis.vieira at vektore.com www.vektore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cmake331QTVTKVS2013.png Type: image/png Size: 95058 bytes Desc: not available URL: From the.1.lily at hotmail.com Thu Jul 28 09:58:52 2016 From: the.1.lily at hotmail.com (the lily) Date: Thu, 28 Jul 2016 13:58:52 +0000 Subject: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 In-Reply-To: References: , Message-ID: Yes, I have write access. ________________________________ From: vtkusers on behalf of Mike Chinander Sent: Thursday, July 28, 2016 4:13 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 Do you have write access to /home? Typically, for an individual user install, the CMAKE_INSTALL_PREFIX would be /home/username/VTK-6.3.0, where 'username' is your username. On Wed, Jul 27, 2016 at 4:53 PM, the lily > wrote: Hi I'm building VTK 6.3 on my machine, these are the steps I followed cmake. vi CMakeCache.txt and changed CMAKE_INSTALL_PREFIX:PATH=/home/VTK-6.3.0 make -j make install Everything went well until I tried to do make install, to write the header files into the include directory I keep getting this error CMake Error at Common/Core/cmake_install.cmake:47 (FILE): file INSTALL cannot find "/home/VTK-6.3.0/lib/libvtkCommonCore-6.3.so.1". Call Stack (most recent call first): cmake_install.cmake:100 (INCLUDE) I found this suggestion but it did not work: export LD_LIBRARY_PATH=/home/VTK-6.3.0/lib:$LD_LIBRARY_PATH _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From the.1.lily at hotmail.com Thu Jul 28 10:17:50 2016 From: the.1.lily at hotmail.com (the lily) Date: Thu, 28 Jul 2016 14:17:50 +0000 Subject: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 In-Reply-To: References: , Message-ID: Hi Dan, You are right it does not exist, is there a way to fix that? ________________________________ From: Dan Lipsa Sent: Thursday, July 28, 2016 3:54 PM To: the lily Cc: vtkusers at vtk.org; vtkusers at public.kitware.com Subject: Re: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 Does that file exist? Maybe the build did not completed correctly. HTH, Dan On Wed, Jul 27, 2016 at 5:53 PM, the lily > wrote: Hi I'm building VTK 6.3 on my machine, these are the steps I followed cmake. vi CMakeCache.txt and changed CMAKE_INSTALL_PREFIX:PATH=/home/VTK-6.3.0 make -j make install Everything went well until I tried to do make install, to write the header files into the include directory I keep getting this error CMake Error at Common/Core/cmake_install.cmake:47 (FILE): file INSTALL cannot find "/home/VTK-6.3.0/lib/libvtkCommonCore-6.3.so.1". Call Stack (most recent call first): cmake_install.cmake:100 (INCLUDE) I found this suggestion but it did not work: export LD_LIBRARY_PATH=/home/VTK-6.3.0/lib:$LD_LIBRARY_PATH _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Jul 28 10:50:23 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 28 Jul 2016 10:50:23 -0400 Subject: [vtkusers] VTK make install cannot find libvtkCommonCore-6.3.so.1 In-Reply-To: References: Message-ID: Take a look at the build output, I suspect you have a build error somewhere - you'll have to fix that first. Dan On Thu, Jul 28, 2016 at 10:17 AM, the lily wrote: > Hi Dan, > > > You are right it does not exist, is there a way to fix that? > > > > > ------------------------------ > *From:* Dan Lipsa > *Sent:* Thursday, July 28, 2016 3:54 PM > *To:* the lily > *Cc:* vtkusers at vtk.org; vtkusers at public.kitware.com > *Subject:* Re: [vtkusers] VTK make install cannot find > libvtkCommonCore-6.3.so.1 > > Does that file exist? Maybe the build did not completed correctly. > > HTH, > Dan > > > On Wed, Jul 27, 2016 at 5:53 PM, the lily wrote: > >> Hi >> >> >> I'm building VTK 6.3 on my machine, these are the steps I followed >> >> >> cmake. >> >> >> vi CMakeCache.txt >> and changed CMAKE_INSTALL_PREFIX:PATH=/home/VTK-6.3.0 >> >> make -j >> >> make install >> >> Everything went well until I tried to do make install, to write the >> header files into the include directory I keep getting this error >> >> >> CMake Error at Common/Core/cmake_install.cmake:47 (FILE): >> file INSTALL cannot find >> "/home/VTK-6.3.0/lib/libvtkCommonCore-6.3.so.1". >> Call Stack (most recent call first): >> cmake_install.cmake:100 (INCLUDE) >> >> >> I found this suggestion but it did not work: export >> LD_LIBRARY_PATH=/home/VTK-6.3.0/lib:$LD_LIBRARY_PATH >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Thu Jul 28 11:04:11 2016 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 28 Jul 2016 11:04:11 -0400 Subject: [vtkusers] VTK with gcc 6 In-Reply-To: References: Message-ID: <20160728150411.GA16334@megas.kitware.com> On Thu, Jul 28, 2016 at 11:43:32 +0200, Alexandre Ancel wrote: > As a follow-up to my previous mail, > VTK 5 does not seem to build with gcc 6.1.0 despite the configuration tweak. > > I end up having the following errors in vtkMath.h: > In static member function 'static int > vtkMath::GetScalarTypeFittingRange(double, double, double, double)': > error: narrowing conversion of '9223372036854775807l' from 'long int' to > 'double' inside { } [-Wnarrowing] > }; > error: narrowing conversion of '18446744073709551615ul' from 'long unsigned > int' to 'double' inside { } [-Wnarrowing] > error: narrowing conversion of '9223372036854775807ll' from 'long long int' > to 'double' inside { } [-Wnarrowing] > error: narrowing conversion of '18446744073709551615ull' from 'long long > unsigned int' to 'double' inside { } [-Wnarrowing] Not surprising; what happens if you turn use -std=c++03 (gnu++14 is the default in GCC 6)? > > It might be a good idea to also add 7 to future proof the versions or > > modify the expression so that future iterations of gcc do not pose problems. VTK master already supports up to GCC 9 :) . --Ben From jose.de.paula at live.com Thu Jul 28 12:33:46 2016 From: jose.de.paula at live.com (Jose Barreto) Date: Thu, 28 Jul 2016 09:33:46 -0700 (MST) Subject: [vtkusers] [VTK - Users] VTK User's Guide Message-ID: <1469723626136-5739400.post@n5.nabble.com> Hello guys, This is the latest book for VTK? https://www.amazon.com/VTK-Users-Guide-Kitware/dp/1930934238/ref=as_sl_pc_tf_til?tag=kitinc-20&linkCode=w00&linkId=O634K4YN4IH7SJ6V&creativeASIN=1930934238 -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Users-VTK-User-s-Guide-tp5739400.html Sent from the VTK - Users mailing list archive at Nabble.com. From enzo.matsumiya at gmail.com Thu Jul 28 12:39:02 2016 From: enzo.matsumiya at gmail.com (Enzo Matsumiya) Date: Thu, 28 Jul 2016 13:39:02 -0300 Subject: [vtkusers] [VTK - Users] VTK User's Guide In-Reply-To: <1469723626136-5739400.post@n5.nabble.com> References: <1469723626136-5739400.post@n5.nabble.com> Message-ID: <3F260CE5-FAFA-43A5-B054-F99E47C21387@gmail.com> Yes, that's the one. I also recommend the "VTK Textbook". It will give you deeper insight of the concepts in "VTK User's Guide". I have them, and I really recommend getting both. They are great! https://www.amazon.com/Visualization-Toolkit-Object-Oriented-Approach-Graphics/dp/193093419X/ref=as_sl_pc_tf_til?tag=kitinc-20&linkCode=w00&linkId=CZW6DJTGVZD3YQJP&creativeASIN=193093419X > On Jul 28, 2016, at 13:33, Jose Barreto wrote: > > Hello guys, > This is the latest book for VTK? > > https://www.amazon.com/VTK-Users-Guide-Kitware/dp/1930934238/ref=as_sl_pc_tf_til?tag=kitinc-20&linkCode=w00&linkId=O634K4YN4IH7SJ6V&creativeASIN=1930934238 > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Users-VTK-User-s-Guide-tp5739400.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From jose.de.paula at live.com Thu Jul 28 12:45:49 2016 From: jose.de.paula at live.com (Jose Barreto) Date: Thu, 28 Jul 2016 09:45:49 -0700 (MST) Subject: [vtkusers] [VTK - Users] VTK User's Guide In-Reply-To: <3F260CE5-FAFA-43A5-B054-F99E47C21387@gmail.com> References: <1469723626136-5739400.post@n5.nabble.com> <3F260CE5-FAFA-43A5-B054-F99E47C21387@gmail.com> Message-ID: <1469724349346-5739402.post@n5.nabble.com> thank you! Is there any difference in the version of vtk? In the book is addressed to version 5.0, but we are already at 7.3 -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Users-VTK-User-s-Guide-tp5739400p5739402.html Sent from the VTK - Users mailing list archive at Nabble.com. From dan.lipsa at kitware.com Thu Jul 28 13:13:43 2016 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 28 Jul 2016 13:13:43 -0400 Subject: [vtkusers] [VTK - Users] VTK User's Guide In-Reply-To: <1469724349346-5739402.post@n5.nabble.com> References: <1469723626136-5739400.post@n5.nabble.com> <3F260CE5-FAFA-43A5-B054-F99E47C21387@gmail.com> <1469724349346-5739402.post@n5.nabble.com> Message-ID: There are slight differences in the API. However the concepts presented are did not change much. You can get current examples http://www.vtk.org/Wiki/VTK/Examples and APIs online. Note the examples are more comprehensive but different than the examples in the book. Dan On Thu, Jul 28, 2016 at 12:45 PM, Jose Barreto wrote: > thank you! > Is there any difference in the version of vtk? In the book is addressed to > version 5.0, but we are already at 7.3 > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/VTK-Users-VTK-User-s-Guide-tp5739400p5739402.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tharun160190 at gmail.com Thu Jul 28 21:38:55 2016 From: tharun160190 at gmail.com (Tharun Kumar) Date: Fri, 29 Jul 2016 10:38:55 +0900 Subject: [vtkusers] How to set the boundary of vtkDelaunay2D ? In-Reply-To: References: <1443277532130-5734142.post@n5.nabble.com> <1443280281055-5734143.post@n5.nabble.com> <1443314989143-5734146.post@n5.nabble.com> <1443352584901-5734149.post@n5.nabble.com> <1443405024462-5734151.post@n5.nabble.com> <1469693272693-5739385.post@n5.nabble.com> Message-ID: Thank you for the prompt response. I will check if vtkContourTriangulator can serve my purpose. Regards, P Tharun Kumar On Thu, Jul 28, 2016 at 10:32 PM, David Gobbi wrote: > Hi Tharun, > > The only advice I can give is what I've suggested earlier in this thread: > If vtkDelaunay2D crashes, then try vtkContourTriangulator. > > - David > > > On Thu, Jul 28, 2016 at 2:07 AM, Tharun wrote: > >> Dear David, >> >> Thank you for your inputs. I myself struck with the situation of >> vtkDelaunay2D going into infinite >> recursion and crashing for some inputs. Except for these inputs, the >> algorithm serves my purpose very well. >> >> Do you recommend any solution for this problem? >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.ancel at cemosis.fr Fri Jul 29 04:54:12 2016 From: alexandre.ancel at cemosis.fr (Alexandre Ancel) Date: Fri, 29 Jul 2016 10:54:12 +0200 Subject: [vtkusers] VTK with gcc 6 In-Reply-To: <20160728150411.GA16334@megas.kitware.com> References: <20160728150411.GA16334@megas.kitware.com> Message-ID: Hello Ben, First thanks for the answers On Thu, Jul 28, 2016 at 5:04 PM, Ben Boeckel wrote: > On Thu, Jul 28, 2016 at 11:43:32 +0200, Alexandre Ancel wrote: > > As a follow-up to my previous mail, > > VTK 5 does not seem to build with gcc 6.1.0 despite the configuration > tweak. > > > > I end up having the following errors in vtkMath.h: > > In static member function 'static int > > vtkMath::GetScalarTypeFittingRange(double, double, double, double)': > > error: narrowing conversion of '9223372036854775807l' from 'long int' to > > 'double' inside { } [-Wnarrowing] > > }; > > error: narrowing conversion of '18446744073709551615ul' from 'long > unsigned > > int' to 'double' inside { } [-Wnarrowing] > > error: narrowing conversion of '9223372036854775807ll' from 'long long > int' > > to 'double' inside { } [-Wnarrowing] > > error: narrowing conversion of '18446744073709551615ull' from 'long long > > unsigned int' to 'double' inside { } [-Wnarrowing] > > Not surprising; what happens if you turn use -std=c++03 (gnu++14 is the > default in GCC 6)? > Indeed, adding this option indeed allows the compilation to end and VTK to install. > > > > It might be a good idea to also add 7 to future proof the versions or > > > modify the expression so that future iterations of gcc do not pose > problems. > > VTK master already supports up to GCC 9 :) . > Do you suggest to use the git version rather that the source packages ? > > --Ben > Best regards, Alexandre -- Alexandre Ancel Docteur, Ing?nieur de recherche / Phd, Research Engineer Cemosis - alexandre.ancel at cemosis.fr Tel: +33 (0)3 68 8*5 02 06* IRMA - 7, rue Ren? Descartes 67 000 Strasbourg, France -------------- next part -------------- An HTML attachment was scrubbed... URL: From magnus_elden at hotmail.com Fri Jul 29 10:53:15 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Fri, 29 Jul 2016 16:53:15 +0200 Subject: [vtkusers] Access violation only when using VTK through Unreal Engine 4. Message-ID: Access violation - code c0000005 (first/second chance not available) UE4Editor_ViveTest_3713!vtkFixedPointVolumeRayCastMapper::vtkFixedPointVolum eRayCastMapper() UE4Editor_ViveTest_3713!vtkFixedPointVolumeRayCastMapper::New() UE4Editor_ViveTest_3713!vtkSmartVolumeMapper::vtkSmartVolumeMapper() UE4Editor_ViveTest_3713!vtkSmartVolumeMapper::New() UE4Editor_ViveTest_3713!vtkSmartPointer::New() [c:\users\noobsdesroobs\documents\unreal projects\vivetest\thirdparty\vtk\include\vtk-7.0\vtksmartpointer.h:117] UE4Editor_ViveTest_3713!AVTKVolumeActor::Render() [c:\users\noobsdesroobs\documents\unreal projects\vivetest\source\vivetest\vtkvolumeactor.cpp:118] This is the error I get when I execute this code: // Process each file on the command line vtkSmartPointer imageData = vtkSmartPointer::New(); vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(path.c_str()); reader->Update(); reader->GetOutput()->Register(reader); imageData->ShallowCopy(reader->GetOutput()); vtkSmartPointer volumeMapper = vtkSmartPointer::New(); It fails at the last line. What makes me wonder why I get the error above is that it works when I am using this code in a standalone project just fine and that the New() static function has been used and did not crash. I built the library from the VTK 7.0 source using VC14 and then included it as normal in my UE4 project. However, the UE4 project crashes with this error being printed to terminal: http://puu.sh/qiF7t/25c8fc6a4d.png I have no idea why it is talking about the source file and I have no idea why it works outside the UE4 environment and not inside. Naturally, that should mean that the problem lies with UE4, but I have used other libraries just fine and I managed to run the code above if I removed the last line. I also know why such an exception is thrown, but I don't see why it is thrown when the include path, lib path and lib files are all the same. Thank you for your help. Yours, Magnus Elden -------------- next part -------------- An HTML attachment was scrubbed... URL: From kit.chambers.kc at gmail.com Fri Jul 29 11:02:29 2016 From: kit.chambers.kc at gmail.com (Kit Chambers) Date: Fri, 29 Jul 2016 16:02:29 +0100 Subject: [vtkusers] Python wrapping a custom class Message-ID: Hi, I am trying to wrap a custom class derived from vtkImageData in python. And it works except for when i try to access my custom methods. For example: import vtkNewDataPython as idp mydata = idp.vtkNewData() print "\nvtkImageData functionality" mydata.SetDimensions(2,3,1) dims = mydata.GetDimensions() print "image dimensions =",dims print "Number of points: ",mydata.GetNumberOfPoints() print "Number of cells: ",mydata.GetNumberOfCells() print "\ncustom functionality" mydata.set_myvalue() print "Myvalue = ", mydata.get_myvalue() Produces: vtkImageData functionality image dimensions = (2, 3, 1) Number of points: 6 Number of cells: 2 custom functionality Traceback (most recent call last): File "./pytest.py", line 14, in mydata.set_myvalue() AttributeError: set_myvalue Basically it is doing just fine up until I try to call a custom method The class looks like this: #include "vtkImageData.h" class VTK_EXPORT vtkNewData: public vtkImageData { public: static vtkNewData *New(); void set_myvalue(){ this->myvalue=3; } int get_myvalue(){ return this->myvalue; } int myvalue; }; The CmakeLists.txt is adapted mostly from https://github.com/paulmelis/vtk-wrapping-example and looks like this ####################################### # Pre-requisites # C++11 flags set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11") # VTK find_package(VTK REQUIRED vtkCommonCore vtkCommonDataModel vtkWrappingPythonCore ) include(${VTK_USE_FILE}) # Python and vtk wrapping find_package(PythonLibs 2.7 EXACT REQUIRED) include(vtkWrapPython) include_directories("${PYTHON_INCLUDE_PATH}") ####################################### # Building vtkNewData add_library(vtkNewData SHARED vtkNewData.cxx) TARGET_LINK_LIBRARIES(vtkNewData ${VTK_LIBRARIES} ) if(APPLE) set_target_properties(vtkNewData PROPERTIES SUFFIX ".so") endif() ####################################### # Wrapping vtkNewData vtk_wrap_python3(vtkNewDataPython vtkNewDataPython_SRCS vtkNewData.cxx) add_library(vtkNewDataPythonD ${vtkNewDataPython_SRCS} vtkNewData.cxx) target_link_libraries(vtkNewDataPythonD ${VTK_LIBRARIES} vtkWrappingPythonCore ${VTK_PYTHON_LIBRARIES}) add_library(vtkNewDataPython MODULE vtkNewDataPythonInit.cxx) set(VTK_MODULES_USED vtkCommonDataModel vtkCommonCore) set(VTK_PYTHOND_LIBS) foreach(TMP_LIB ${VTK_MODULES_USED}) set(VTK_PYTHOND_LIBS ${VTK_PYTHOND_LIBS} ${TMP_LIB}PythonD) endforeach() target_link_libraries(vtkNewDataPython vtkNewDataPythonD ${VTK_PYTHOND_LIBS}) set_target_properties(vtkNewDataPython PROPERTIES PREFIX "") if(WIN32 AND NOT CYGWIN) set_target_properties(vtkNewDataPython PROPERTIES SUFFIX ".pyd") endif(WIN32 AND NOT CYGWIN) I suspect there is something very simple I am missing here but cannot for the life of me think what. Any help would be appreciated. Cheers Kit -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hirsch at st.ovgu.de Fri Jul 29 11:04:00 2016 From: jan.hirsch at st.ovgu.de (jhirsch) Date: Fri, 29 Jul 2016 08:04:00 -0700 (MST) Subject: [vtkusers] Mixture of Glyph3D and LabeledDataMapper? Message-ID: <1469804640102-5739411.post@n5.nabble.com> Hello everyone! I have a set of points and managed to give each point a glyph (a set of polydata points) in order to visualize some of the scalar values. Now, when I rotate the actor (that consists of the points), the glyphs also rotate which is very distracting. I would like to force the glyphs to show the same side to the camera, like the numbers in the labeledDataMapper example. Any ideas how I can achieve that? -- View this message in context: http://vtk.1045678.n5.nabble.com/Mixture-of-Glyph3D-and-LabeledDataMapper-tp5739411.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Jul 29 12:07:18 2016 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 29 Jul 2016 10:07:18 -0600 Subject: [vtkusers] Python wrapping a custom class In-Reply-To: References: Message-ID: Hi Kit, It's most likely because the class is missing vtkTypeMacro: vtkTypeMacro(vtkNewData, vtkImageData); - David On Fri, Jul 29, 2016 at 9:02 AM, Kit Chambers wrote: > Hi, > > I am trying to wrap a custom class derived from vtkImageData in python. > And it works except for when i try to access my custom methods. For example: > > import vtkNewDataPython as idp > > mydata = idp.vtkNewData() > > print "\nvtkImageData functionality" > mydata.SetDimensions(2,3,1) > dims = mydata.GetDimensions() > print "image dimensions =",dims > print "Number of points: ",mydata.GetNumberOfPoints() > print "Number of cells: ",mydata.GetNumberOfCells() > > print "\ncustom functionality" > mydata.set_myvalue() > print "Myvalue = ", mydata.get_myvalue() > > > Produces: > vtkImageData functionality > image dimensions = (2, 3, 1) > Number of points: 6 > Number of cells: 2 > > custom functionality > Traceback (most recent call last): > File "./pytest.py", line 14, in > mydata.set_myvalue() > AttributeError: set_myvalue > > > Basically it is doing just fine up until I try to call a custom method > > The class looks like this: > > #include "vtkImageData.h" > > class VTK_EXPORT vtkNewData: public vtkImageData > { > public: > static vtkNewData *New(); > void set_myvalue(){ > this->myvalue=3; > } > int get_myvalue(){ > return this->myvalue; > } > int myvalue; > }; > > > The CmakeLists.txt is adapted mostly from > https://github.com/paulmelis/vtk-wrapping-example and looks like this > > > ####################################### > # Pre-requisites > > # C++11 flags > set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11") > > # VTK > find_package(VTK REQUIRED > vtkCommonCore > vtkCommonDataModel > vtkWrappingPythonCore > ) > include(${VTK_USE_FILE}) > > # Python and vtk wrapping > find_package(PythonLibs 2.7 EXACT REQUIRED) > include(vtkWrapPython) > include_directories("${PYTHON_INCLUDE_PATH}") > > ####################################### > # Building vtkNewData > add_library(vtkNewData SHARED vtkNewData.cxx) > TARGET_LINK_LIBRARIES(vtkNewData ${VTK_LIBRARIES} ) > if(APPLE) > set_target_properties(vtkNewData PROPERTIES SUFFIX ".so") > endif() > > ####################################### > # Wrapping vtkNewData > vtk_wrap_python3(vtkNewDataPython vtkNewDataPython_SRCS vtkNewData.cxx) > > add_library(vtkNewDataPythonD ${vtkNewDataPython_SRCS} vtkNewData.cxx) > target_link_libraries(vtkNewDataPythonD > ${VTK_LIBRARIES} > vtkWrappingPythonCore > ${VTK_PYTHON_LIBRARIES}) > > add_library(vtkNewDataPython MODULE vtkNewDataPythonInit.cxx) > > set(VTK_MODULES_USED vtkCommonDataModel vtkCommonCore) > set(VTK_PYTHOND_LIBS) > foreach(TMP_LIB ${VTK_MODULES_USED}) > set(VTK_PYTHOND_LIBS ${VTK_PYTHOND_LIBS} ${TMP_LIB}PythonD) > endforeach() > > target_link_libraries(vtkNewDataPython vtkNewDataPythonD > ${VTK_PYTHOND_LIBS}) > > set_target_properties(vtkNewDataPython PROPERTIES PREFIX "") > if(WIN32 AND NOT CYGWIN) > set_target_properties(vtkNewDataPython PROPERTIES SUFFIX ".pyd") > endif(WIN32 AND NOT CYGWIN) > > > I suspect there is something very simple I am missing here but cannot for > the life of me think what. Any help would be appreciated. > > > Cheers > > Kit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kit.chambers.kc at gmail.com Fri Jul 29 12:24:46 2016 From: kit.chambers.kc at gmail.com (Kit Chambers) Date: Fri, 29 Jul 2016 17:24:46 +0100 Subject: [vtkusers] Python wrapping a custom class In-Reply-To: References: Message-ID: Yes that was it. thank you. > On 29 Jul 2016, at 17:07, David Gobbi wrote: > > Hi Kit, > > It's most likely because the class is missing vtkTypeMacro: > > vtkTypeMacro(vtkNewData, vtkImageData); > > - David > > > On Fri, Jul 29, 2016 at 9:02 AM, Kit Chambers > wrote: > Hi, > > I am trying to wrap a custom class derived from vtkImageData in python. And it works except for when i try to access my custom methods. For example: > > import vtkNewDataPython as idp > > mydata = idp.vtkNewData() > > print "\nvtkImageData functionality" > mydata.SetDimensions(2,3,1) > dims = mydata.GetDimensions() > print "image dimensions =",dims > print "Number of points: ",mydata.GetNumberOfPoints() > print "Number of cells: ",mydata.GetNumberOfCells() > > print "\ncustom functionality" > mydata.set_myvalue() > print "Myvalue = ", mydata.get_myvalue() > > > Produces: > vtkImageData functionality > image dimensions = (2, 3, 1) > Number of points: 6 > Number of cells: 2 > > custom functionality > Traceback (most recent call last): > File "./pytest.py", line 14, in > mydata.set_myvalue() > AttributeError: set_myvalue > > > Basically it is doing just fine up until I try to call a custom method > > The class looks like this: > > #include "vtkImageData.h" > > class VTK_EXPORT vtkNewData: public vtkImageData > { > public: > static vtkNewData *New(); > void set_myvalue(){ > this->myvalue=3; > } > int get_myvalue(){ > return this->myvalue; > } > int myvalue; > }; > > > The CmakeLists.txt is adapted mostly from https://github.com/paulmelis/vtk-wrapping-example and looks like this > > > ####################################### > # Pre-requisites > > # C++11 flags > set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11") > > # VTK > find_package(VTK REQUIRED > vtkCommonCore > vtkCommonDataModel > vtkWrappingPythonCore > ) > include(${VTK_USE_FILE}) > > # Python and vtk wrapping > find_package(PythonLibs 2.7 EXACT REQUIRED) > include(vtkWrapPython) > include_directories("${PYTHON_INCLUDE_PATH}") > > ####################################### > # Building vtkNewData > add_library(vtkNewData SHARED vtkNewData.cxx) > TARGET_LINK_LIBRARIES(vtkNewData ${VTK_LIBRARIES} ) > if(APPLE) > set_target_properties(vtkNewData PROPERTIES SUFFIX ".so") > endif() > > ####################################### > # Wrapping vtkNewData > vtk_wrap_python3(vtkNewDataPython vtkNewDataPython_SRCS vtkNewData.cxx) > > add_library(vtkNewDataPythonD ${vtkNewDataPython_SRCS} vtkNewData.cxx) > target_link_libraries(vtkNewDataPythonD > ${VTK_LIBRARIES} > vtkWrappingPythonCore > ${VTK_PYTHON_LIBRARIES}) > > add_library(vtkNewDataPython MODULE vtkNewDataPythonInit.cxx) > > set(VTK_MODULES_USED vtkCommonDataModel vtkCommonCore) > set(VTK_PYTHOND_LIBS) > foreach(TMP_LIB ${VTK_MODULES_USED}) > set(VTK_PYTHOND_LIBS ${VTK_PYTHOND_LIBS} ${TMP_LIB}PythonD) > endforeach() > > target_link_libraries(vtkNewDataPython vtkNewDataPythonD ${VTK_PYTHOND_LIBS}) > > set_target_properties(vtkNewDataPython PROPERTIES PREFIX "") > if(WIN32 AND NOT CYGWIN) > set_target_properties(vtkNewDataPython PROPERTIES SUFFIX ".pyd") > endif(WIN32 AND NOT CYGWIN) > > > I suspect there is something very simple I am missing here but cannot for the life of me think what. Any help would be appreciated. > > > Cheers > > Kit > -------------- next part -------------- An HTML attachment was scrubbed... URL: From golucasplus at gmail.com Fri Jul 29 14:21:03 2016 From: golucasplus at gmail.com (golucasplus) Date: Fri, 29 Jul 2016 11:21:03 -0700 (MST) Subject: [vtkusers] 3D coordinate plot surface reconstraction vtk 6.3.0 In-Reply-To: References: Message-ID: <1469816463213-5739414.post@n5.nabble.com> Hi. As I understand it, you simply want to visualize the vertices in your reconstructed surface. I am assuming your surface is of type vtkPolyData. I believe this Python example will help. The output of the example can be seen here. output.png In the example, vtkDelaunay2D produces a vtkPolyData called delny. Starting at line 49, the example takes the vertices from delny and creates ballActor. ballActor can be seen as the pink balls when rendered. Hope this helps. -- View this message in context: http://vtk.1045678.n5.nabble.com/3D-coordinate-plot-surface-reconstraction-vtk-6-3-0-tp5739324p5739414.html Sent from the VTK - Users mailing list archive at Nabble.com. From jothybasu at gmail.com Fri Jul 29 23:44:45 2016 From: jothybasu at gmail.com (Jothybasu Selvaraj) Date: Sat, 30 Jul 2016 13:44:45 +1000 Subject: [vtkusers] VTK app crashes with vtkCommonCore Message-ID: Hi Guys I recently built an application with Qt5 and vtk7. I am sioing QtCreator to build this. I initialized the vtk kits as shown below before adding any vtk headers. #define vtkRenderingCore_AUTOINIT 3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL2) #define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL2) But when I try to run the app it crashes with "Fault Module Name: libvtkCommonCore-7.0.dll" Any clues why this this happening? Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hirsch at st.ovgu.de Sat Jul 30 06:48:09 2016 From: jan.hirsch at st.ovgu.de (jhirsch) Date: Sat, 30 Jul 2016 03:48:09 -0700 (MST) Subject: [vtkusers] Mixture of Glyph3D and LabeledDataMapper? In-Reply-To: <1469804640102-5739411.post@n5.nabble.com> References: <1469804640102-5739411.post@n5.nabble.com> Message-ID: <1469875689103-5739448.post@n5.nabble.com> If needs must, the glyph could be 2-dimensional if this would open up a way to always look towards the camera. -- View this message in context: http://vtk.1045678.n5.nabble.com/Mixture-of-Glyph3D-and-LabeledDataMapper-tp5739411p5739448.html Sent from the VTK - Users mailing list archive at Nabble.com. From sankhesh.jhaveri at kitware.com Sun Jul 31 00:22:42 2016 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Sun, 31 Jul 2016 00:22:42 -0400 Subject: [vtkusers] Access violation only when using VTK through Unreal Engine 4. In-Reply-To: References: Message-ID: Magnus, The error "No override found" means that VTK's object factory mechanism could not instantiate the right OpenGL class (vtkOpenGLRayCastImageDisplayHelper, in this case) for the super class used (vtkRayCastImageDisplayHelper, in this case). Check to see that UE4 is creating the right OpenGL context and if there are any GLEW errors when instantiating the render window. *Sankhesh* On Fri, Jul 29, 2016 at 10:53 AM, Magnus Elden wrote: > Access violation - code c0000005 (first/second chance not available) > > > > > UE4Editor_ViveTest_3713!vtkFixedPointVolumeRayCastMapper::vtkFixedPointVolumeRayCastMapper() > > UE4Editor_ViveTest_3713!vtkFixedPointVolumeRayCastMapper::New() > > UE4Editor_ViveTest_3713!vtkSmartVolumeMapper::vtkSmartVolumeMapper() > > UE4Editor_ViveTest_3713!vtkSmartVolumeMapper::New() > > UE4Editor_ViveTest_3713!vtkSmartPointer::New() > [c:\users\noobsdesroobs\documents\unreal > projects\vivetest\thirdparty\vtk\include\vtk-7.0\vtksmartpointer.h:117] > > UE4Editor_ViveTest_3713!AVTKVolumeActor::Render() > [c:\users\noobsdesroobs\documents\unreal > projects\vivetest\source\vivetest\vtkvolumeactor.cpp:118] > > > > This is the error I get when I execute this code: > > // Process each file on the command line > > vtkSmartPointer imageData = > > vtkSmartPointer::New(); > > vtkSmartPointer reader = > > vtkSmartPointer::New(); > > reader->SetFileName(path.c_str()); > > reader->Update(); > > reader->GetOutput()->Register(reader); > > imageData->ShallowCopy(reader->GetOutput()); > > vtkSmartPointer volumeMapper = > vtkSmartPointer::New(); > > > > It fails at the last line. > > > > What makes me wonder why I get the error above is that it works when I am > using this code in a standalone project just fine and that the New() static > function has been used and did not crash. > > I built the library from the VTK 7.0 source using VC14 and then included > it as normal in my UE4 project. However, the UE4 project crashes with this > error being printed to terminal: > > > > http://puu.sh/qiF7t/25c8fc6a4d.png > > > > I have no idea why it is talking about the source file and I have no idea > why it works outside the UE4 environment and not inside. > > Naturally, that should mean that the problem lies with UE4, but I have > used other libraries just fine and I managed to run the code above if I > removed the last line. I also know why such an exception is thrown, but I > don?t see why it is thrown when the include path, lib path and lib files > are all the same. > > > > Thank you for your help. > > > > Yours, > > Magnus Elden > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From magnus_elden at hotmail.com Sun Jul 31 17:48:53 2016 From: magnus_elden at hotmail.com (Magnus Elden) Date: Sun, 31 Jul 2016 23:48:53 +0200 Subject: [vtkusers] Access violation only when using VTK through Unreal Engine 4. In-Reply-To: References: Message-ID: Thank you for this. That really makes the search space smaller. Elden From: Sankhesh Jhaveri [mailto:sankhesh.jhaveri at kitware.com] Sent: Sunday, 31 July, 2016 06:23 To: Magnus Elden Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Access violation only when using VTK through Unreal Engine 4. Magnus, The error "No override found" means that VTK's object factory mechanism could not instantiate the right OpenGL class (vtkOpenGLRayCastImageDisplayHelper, in this case) for the super class used (vtkRayCastImageDisplayHelper, in this case). Check to see that UE4 is creating the right OpenGL context and if there are any GLEW errors when instantiating the render window. Sankhesh On Fri, Jul 29, 2016 at 10:53 AM, Magnus Elden > wrote: Access violation - code c0000005 (first/second chance not available) UE4Editor_ViveTest_3713!vtkFixedPointVolumeRayCastMapper::vtkFixedPointVolumeRayCastMapper() UE4Editor_ViveTest_3713!vtkFixedPointVolumeRayCastMapper::New() UE4Editor_ViveTest_3713!vtkSmartVolumeMapper::vtkSmartVolumeMapper() UE4Editor_ViveTest_3713!vtkSmartVolumeMapper::New() UE4Editor_ViveTest_3713!vtkSmartPointer::New() [c:\users\noobsdesroobs\documents\unreal projects\vivetest\thirdparty\vtk\include\vtk-7.0\vtksmartpointer.h:117] UE4Editor_ViveTest_3713!AVTKVolumeActor::Render() [c:\users\noobsdesroobs\documents\unreal projects\vivetest\source\vivetest\vtkvolumeactor.cpp:118] This is the error I get when I execute this code: // Process each file on the command line vtkSmartPointer imageData = vtkSmartPointer::New(); vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(path.c_str()); reader->Update(); reader->GetOutput()->Register(reader); imageData->ShallowCopy(reader->GetOutput()); vtkSmartPointer volumeMapper = vtkSmartPointer::New(); It fails at the last line. What makes me wonder why I get the error above is that it works when I am using this code in a standalone project just fine and that the New() static function has been used and did not crash. I built the library from the VTK 7.0 source using VC14 and then included it as normal in my UE4 project. However, the UE4 project crashes with this error being printed to terminal: http://puu.sh/qiF7t/25c8fc6a4d.png I have no idea why it is talking about the source file and I have no idea why it works outside the UE4 environment and not inside. Naturally, that should mean that the problem lies with UE4, but I have used other libraries just fine and I managed to run the code above if I removed the last line. I also know why such an exception is thrown, but I don?t see why it is thrown when the include path, lib path and lib files are all the same. Thank you for your help. Yours, Magnus Elden _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: