From jvdura at gmail.com Thu Feb 1 02:56:07 2018 From: jvdura at gmail.com (=?utf-8?Q?Juan_Vicente_Dur=C3=A1_Gil?=) Date: Thu, 1 Feb 2018 08:56:07 +0100 Subject: [vtkusers] help In-Reply-To: References: Message-ID: <5a72c817.4fc11c0a.8d0ca.90cf@mx.google.com> Help -------------- next part -------------- An HTML attachment was scrubbed... URL: From litteriomartina at gmail.com Thu Feb 1 03:57:28 2018 From: litteriomartina at gmail.com (Martina Litterio) Date: Thu, 1 Feb 2018 09:57:28 +0100 Subject: [vtkusers] VTK 8.1.0 wheels on pypi In-Reply-To: References: <4b4635d8-b082-afed-0d31-68f05a551fbc@aero.iitb.ac.in> Message-ID: Thank you guys! *Martina* 2018-01-31 20:15 GMT+01:00 Aashish Chaudhary : > this is great news Prabhu. Thank you for the hard-work. > > On Wed, Jan 31, 2018 at 1:56 PM Prabhu Ramachandran < > prabhu at aero.iitb.ac.in> wrote: > >> Hi all, >> >> Just a small announcement that we now have VTK-8.1.0 wheels available on >> pypi (for OSX, Linux, and Windows). Installing VTK (on a 64 bit OS), is now >> as simple as: >> >> $ pip install vtk >> >> More details are available here: >> >> http://prabhuramachandran.blogspot.in/2018/01/vtk-810- >> wheels-for-all-platforms-on-pypi.html >> >> Many thanks to all the folks who made this happen! >> >> cheers, >> >> Prabhu >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/ >> opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From beatrix.schober at gmail.com Thu Feb 1 04:14:48 2018 From: beatrix.schober at gmail.com (Beatrix Schober) Date: Thu, 1 Feb 2018 10:14:48 +0100 Subject: [vtkusers] vtkExtractPolyDataGeometry question Message-ID: Hi! I want to get a subset of vtkPolyData with vtkExtractPolyDataGeometry: VTK_CREATE(vtkBox, box);box->SetBounds(values); VTK_CREATE(vtkExtractPolyDataGeometry, extract);extract->SetInputConnection(appendFilter->GetOutputPort());extract->SetImplicitFunction(box);extract->ExtractBoundaryCellsOn();extract->PassPointsOn();extract->Update(); vtkPolyData* tmp = extract->GetOutput(); The "new" vtkPolyData still has the same number of points as the original vtkPolyData, which confuses me, because the correct subset is displayed. I guess I understand the filter wrong? How can I get a subset as new vtkPolyData? Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From alican1812 at hotmail.com Thu Feb 1 05:02:10 2018 From: alican1812 at hotmail.com (alican) Date: Thu, 1 Feb 2018 03:02:10 -0700 (MST) Subject: [vtkusers] vtkCubeAxesActor2D - setting Range/NumberOfLabels In-Reply-To: References: Message-ID: <1517479330207-0.post@n5.nabble.com> I know it is a VERY old thread, but I have spent a hour trying to figure this problem out. So just in case somebody else is stumbled upon it: axes->SetUseRanges(1); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From benoit.callebaut at worldline.com Thu Feb 1 05:18:36 2018 From: benoit.callebaut at worldline.com (Callebaut Benoit) Date: Thu, 1 Feb 2018 11:18:36 +0100 Subject: [vtkusers] Android Integration crash with VTK 8.1 Message-ID: <72F9B8B156A4334F995929DE9E3C3A0701C861D43090@bebrx010.be01.awl.atosorigin.net> Hello, I am trying to integrate VTK 8.1 in a Java application. Base example is the JavaVTK example using gradle. The only change compared to the original one is that I am using gradle as build system with CMake. The VTK libraries are prebuilt static libraries. I compiled the libraries separately on my system and put them in the jniLibs directory. I am able to compile and run the APK on my device (Android 7.0) But VTK is crashing on the first native call : vtkRenderWindow *renWin = vtkRenderWindow::New(); I was able to track it to a call to vtkAtomic call Unfortunately I am unable to debug correctly in C++ on my installation. Hereunder is my CmakeLists for info Could somebody help me ? I am probably doing something wrong. Thanks, Benoit Callebaut # For more information about using CMake with Android Studio, read the # documentation: https://d.android.com/studio/projects/add-native-code.html # Sets the minimum version of CMake required to build the native library. cmake_minimum_required(VERSION 3.4.1) # Creates and names a library, sets it as either STATIC # or SHARED, and provides the relative paths to its source code. # You can define multiple libraries, and CMake builds them for you. # Gradle automatically packages shared libraries with your APK. set(JNIBASE ${CMAKE_CURRENT_SOURCE_DIR}/src/main/jniLibs/armeabi-v7a) add_library( # Sets the name of the library. native-lib # Sets the library as a shared library. SHARED # Provides a relative path to your source file(s). src/main/cpp/native-lib.cpp ) # Searches for a specified prebuilt library and stores the path as a # variable. Because CMake includes system libraries in the search path by # default, you only need to specify the name of the public NDK library # you want to add. CMake verifies that the library exists before # completing its build. find_library( # Sets the name of the path variable. log-lib # Specifies the name of the NDK library that # you want CMake to locate. log ) find_library( # Sets the name of the path variable. dl # Specifies the name of the NDK library that # you want CMake to locate. dl ) find_library( # Sets the name of the path variable. z # Specifies the name of the NDK library that # you want CMake to locate. z ) find_library( # Sets the name of the path variable. android # Specifies the name of the NDK library that # you want CMake to locate. android ) find_library( # Sets the name of the path variable. EGL # Specifies the name of the NDK library that # you want CMake to locate. EGL ) find_library( # Sets the name of the path variable. GLESv2 # Specifies the name of the NDK library that # you want CMake to locate. GLESv2 ) # Specifies libraries CMake should link to your target library. You # can link multiple libraries, such as libraries you define in this # build script, prebuilt third-party libraries, or system libraries. add_library( vtkalglib-8.1 STATIC IMPORTED ) set_target_properties(vtkalglib-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkalglib-8.1.a) add_library( vtkCommonColor-8.1 STATIC IMPORTED ) set_target_properties(vtkCommonColor-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkCommonColor-8.1.a) add_library( vtkComputationalGeometry-8.1 STATIC IMPORTED ) set_target_properties(vtkComputationalGeometry-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkCommonComputationalGeometry-8.1.a) add_library( vtkCommonCore-8.1 STATIC IMPORTED ) set_target_properties(vtkCommonCore-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkCommonCore-8.1.a) add_library( vtkCommonDataModel-8.1 STATIC IMPORTED ) set_target_properties(vtkCommonDataModel-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkCommonDataModel-8.1.a) add_library( vtkCommonExecutionModel-8.1 STATIC IMPORTED ) set_target_properties(vtkCommonExecutionModel-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkCommonExecutionModel-8.1.a) add_library( vtkCommonMath-8.1 STATIC IMPORTED ) set_target_properties(vtkCommonMath-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkCommonMath-8.1.a) add_library( vtkCommonMisc-8.1 STATIC IMPORTED ) set_target_properties(vtkCommonMisc-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkCommonMisc-8.1.a) add_library( vtkCommonSystem-8.1 STATIC IMPORTED ) set_target_properties(vtkCommonSystem-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkCommonsystem-8.1.a) add_library( vtkCommonTransforms-8.1 STATIC IMPORTED ) set_target_properties(vtkCommonTransforms-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkCommonTransforms-8.1.a) add_library( vtkDICOMParser-8.1 STATIC IMPORTED ) set_target_properties(vtkDICOMParser-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkDICOMParser-8.1.a) add_library( vtkexpat-8.1 STATIC IMPORTED ) set_target_properties(vtkexpat-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkexpat-8.1.a) add_library( vtkFiltersCore-8.1 STATIC IMPORTED ) set_target_properties(vtkFiltersCore-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkFiltersCore-8.1.a) add_library( vtkFiltersExtraction-8.1 STATIC IMPORTED ) set_target_properties(vtkFiltersExtraction-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkFiltersExtraction-8.1.a) add_library( vtkFiltersGeneral-8.1 STATIC IMPORTED ) set_target_properties(vtkFiltersGeneral-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkFiltersGeneral-8.1.a) add_library( vtkFiltersGeometry-8.1 STATIC IMPORTED ) set_target_properties(vtkFiltersGeometry-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkFiltersGeometry-8.1.a) add_library( vtkFiltersModeling-8.1 STATIC IMPORTED ) set_target_properties(vtkFiltersModeling-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkFiltersModeling-8.1.a) add_library( vtkFiltersSources-8.1 STATIC IMPORTED ) set_target_properties(vtkFiltersSources-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkFiltersSources-8.1.a) add_library( vtkFiltersStatistics-8.1 STATIC IMPORTED ) set_target_properties(vtkFiltersStatistics-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkFiltersStatistics-8.1.a) add_library( vtkfreetype-8.1 STATIC IMPORTED ) set_target_properties(vtkfreetype-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkfreetype-8.1.a) add_library( vtkImagingCore-8.1 STATIC IMPORTED ) set_target_properties(vtkImagingCore-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkImagingCore-8.1.a) add_library( vtkImagingFourier-8.1 STATIC IMPORTED ) set_target_properties(vtkImagingFourier-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkImagingFourier-8.1.a) add_library( vtkImagingMath-8.1 STATIC IMPORTED ) set_target_properties(vtkImagingMath-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkImagingMath-8.1.a) add_library( vtkInfovisCore-8.1 STATIC IMPORTED ) set_target_properties(vtkInfovisCore-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkInfovisCore-8.1.a) add_library( vtkInteractionStyle-8.1 STATIC IMPORTED ) set_target_properties(vtkInteractionStyle-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkInteractionStyle-8.1.a) add_library( vtkIOCore-8.1 STATIC IMPORTED ) set_target_properties(vtkIOCore-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkIOCore-8.1.a) add_library( vtkIOGeometry-8.1 STATIC IMPORTED ) set_target_properties(vtkIOGeometry-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkIOGeometry-8.1.a) add_library( vtkIOImage-8.1 STATIC IMPORTED ) set_target_properties(vtkIOImage-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkIOImage-8.1.a) add_library( vtkIOInfovis-8.1 STATIC IMPORTED ) set_target_properties(vtkIOInfovis-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkIOInfovis-8.1.a) add_library( vtkIOLegacy-8.1 STATIC IMPORTED ) set_target_properties(vtkIOLegacy-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkIOLegacy-8.1.a) add_library( vtkIOPLY-8.1 STATIC IMPORTED ) set_target_properties(vtkIOPLY-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkIOPLY-8.1.a) add_library( vtkRenderingPLY-8.1 STATIC IMPORTED ) add_library( vtkIOXML-8.1 STATIC IMPORTED ) set_target_properties(vtkIOXML-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkIOXML-8.1.a) add_library( vtkIOXMLParser-8.1 STATIC IMPORTED ) set_target_properties(vtkIOXMLParser-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkIOXMLParser-8.1.a) add_library( vtkjpeg-8.1 STATIC IMPORTED ) set_target_properties(vtkjpeg-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkjpeg-8.1.a) add_library( vtklibxml2-8.1 STATIC IMPORTED ) set_target_properties(vtklibxml2-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtklibxml2-8.1.a) add_library( vtklz4-8.1 STATIC IMPORTED ) set_target_properties(vtklz4-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtklz4-8.1.a) add_library( vtkmetaio-8.1 STATIC IMPORTED ) set_target_properties(vtkmetaio-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkmetaio-8.1.a) add_library( vtkParallelCore-8.1 STATIC IMPORTED ) set_target_properties(vtkParallelCore-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkParallelCore-8.1.a) add_library( vtkpng-8.1 STATIC IMPORTED ) set_target_properties(vtkpng-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkpng-8.1.a) add_library( vtkRenderingCore-8.1 STATIC IMPORTED ) set_target_properties(vtkRenderingCore-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkRenderingCore-8.1.a) add_library( vtkRenderingFreeType-8.1 STATIC IMPORTED ) set_target_properties(vtkRenderingFreeType-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkRenderingFreeType-8.1.a) add_library( vtkRenderingOpenGL2-8.1 STATIC IMPORTED ) set_target_properties(vtkRenderingOpenGL2-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkRenderingOpenGL2-8.1.a) add_library( vtkRenderingVolume-8.1 STATIC IMPORTED ) set_target_properties(vtkRenderingVolume-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkRenderingVolume-8.1.a) add_library( vtkRenderingVolumeOpenGL2-8.1 STATIC IMPORTED ) set_target_properties(vtkRenderingVolumeOpenGL2-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkRenderingVolumeOpenGL2-8.1.a) add_library( vtkglew-8.1 STATIC IMPORTED ) set_target_properties(vtkglew-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkglew-8.1.a) add_library( vtksys-8.1 STATIC IMPORTED ) set_target_properties(vtksys-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtksys-8.1.a) add_library( vtkTestingRendering-8.1 STATIC IMPORTED ) set_target_properties(vtkTestingRendering-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkTestingRendering-8.1.a) add_library( vtktiff-8.1 STATIC IMPORTED ) set_target_properties(vtktiff-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtktiff-8.1.a) add_library( vtkzlib-8.1 STATIC IMPORTED ) set_target_properties(vtkzlib-8.1 PROPERTIES IMPORTED_LOCATION ${JNIBASE}/libvtkzlib-8.1.a) target_link_libraries( native-lib vtkCommonMath-8.1 vtkRenderingCore-8.1 vtkCommonMath-8.1 vtkCommonTransforms-8.1 vtkImagingCore-8.1 vtkFiltersCore-8.1 vtkFiltersSources-8.1 vtkRenderingOpenGL2-8.1 vtkRenderingCore-8.1 vtkFiltersGeneral-8.1 vtkCommonExecutionModel-8.1 vtkCommonDataModel-8.1 vtkCommonMath-8.1 vtkCommonCore-8.1 vtkCommonMisc-8.1 vtksys-8.1 vtkCommonColor-8.1 vtkCommonSystem-8.1 # included in the NDK. ${dl} ${z} ${android} ${EGL} ${GLSESv2} ${log-lib} ) include_directories(native-lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp) include_directories(native-lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/vtk-8.1) include_directories(native-lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/vtk-8.1/vtklibxml2/libxml) include_directories(native-lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/vtk-8.1/vtkzlib) include_directories(native-lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/vtk-8.1/vtklz4) ********************************************************************************************* Worldline SA/NV - Chaussee de Haecht 1442 Haachtsesteenweg - 1130 Brussels - Belgium RPM-RPR Bruxelles-Brussel - TVA-BTW BE 0418.547.872 Bankrekening-Compte Bancaire-Bank Account 310-0269424-44 BIC BBRUBEBB - IBAN BE55 3100 2694 2444 "The information contained in this e-mail and any attachment there to be confidential and may contain information which is protected by intellectual property rights. This information is intended for the exclusive use of the recipient(s) named above. This e-mail does not constitute any binding relationship or offer toward any of the addressees. If you are not one of the addressees , one of their employees or a proxy holder entitled to hand over this message to the addressee(s), any use of the information contained herein (e.g. reproduction, divulgation, communication or distribution,...) is prohibited. If you have received this message in error, please notify the sender and destroy it immediately after. The integrity and security of this message cannot be guaranteed and it may be subject to data corruption, interception and unauthorized amendment, for which we accept no liability." -------------- next part -------------- An HTML attachment was scrubbed... URL: From kor1581 at gmail.com Thu Feb 1 05:40:36 2018 From: kor1581 at gmail.com (ran) Date: Thu, 1 Feb 2018 03:40:36 -0700 (MST) Subject: [vtkusers] Track lines draw using vtkLineWidget2 Message-ID: <1517481636365-0.post@n5.nabble.com> Hi, I'm using vtkLineWidget2 to draw a number lines in vtkResliceImageViewer render window. After drawing the line when it moves using mouse interactions, I need to collect its new coordinates. For this need to identify which line has moved. I'm using interaction callback to track the movement. But as the render window contains more than one drawn line, how can track which line has selected for moving? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From gabriellakl at hotmail.de Thu Feb 1 05:41:20 2018 From: gabriellakl at hotmail.de (Bachus92) Date: Thu, 1 Feb 2018 03:41:20 -0700 (MST) Subject: [vtkusers] Get Center of Cells from a VTKPlane Message-ID: <1517481680670-0.post@n5.nabble.com> Hi all, I can't find the right class/function to do the following thing, maybe/hopefully someone can help me. I create a vtkPlaneSource and set the X - & Y - Resolution. This means, that the vtkPlaneSource "is divided" into cells. I want to find the center of each Cell and write this into a std::vector (not VTK array). I am programming in C++. This is the start: vtkSmartPointer planeSource = vtkSmartPointer::New(); planeSource->SetResolution(2,2); Thank you very much for your help :) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From kor1581 at gmail.com Thu Feb 1 05:53:50 2018 From: kor1581 at gmail.com (K O ranjith) Date: Thu, 1 Feb 2018 16:23:50 +0530 Subject: [vtkusers] How to track a particular line from a group of lines in a render window drawn using vtkLineWidget2 Message-ID: Hi, I'm using vtkLineWidget2 to draw a number lines in vtkResliceImageViewer render window. After drawing the line when it moves using mouse interactions, I need to collect its new coordinates. For this need to identify which line ( vtkLineWidget2 object) has moved. I'm using interaction callback to track the movement. But as the render window contains more than one drawn line, how can track which line has selected for moving? In vtk, have any default mechanism for tracking actors/widgets in a render window? or do I have to inherit vtkLineWidget2 to include mechanism to track the object? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Feb 1 08:31:28 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 1 Feb 2018 05:31:28 -0800 Subject: [vtkusers] Get Center of Cells from a VTKPlane In-Reply-To: <1517481680670-0.post@n5.nabble.com> References: <1517481680670-0.post@n5.nabble.com> Message-ID: You may find this example helpful: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/CellCenters/ Bill On Thu, Feb 1, 2018 at 2:41 AM, Bachus92 wrote: > Hi all, > > I can't find the right class/function to do the following thing, > maybe/hopefully someone can help me. > > I create a vtkPlaneSource and set the X - & Y - Resolution. This means, that > the vtkPlaneSource > "is divided" into cells. I want to find the center of each Cell and write > this into a std::vector (not VTK array). > > I am programming in C++. This is the start: > > vtkSmartPointer planeSource = > vtkSmartPointer::New(); > planeSource->SetResolution(2,2); > > Thank you very much for your help :) > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -- Unpaid intern in BillsParadise at noware dot com From cory.quammen at kitware.com Thu Feb 1 09:02:39 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 1 Feb 2018 09:02:39 -0500 Subject: [vtkusers] vtkExtractPolyDataGeometry question In-Reply-To: References: Message-ID: Try calling extract->PassPointsOff() instead of extract->PassPointsOn() That should remove the points that are not part of the vtkPolyData output. HTH, Cory On Thu, Feb 1, 2018 at 4:14 AM, Beatrix Schober wrote: > Hi! > > I want to get a subset of vtkPolyData with vtkExtractPolyDataGeometry: > > VTK_CREATE(vtkBox, box); > box->SetBounds(values); > > VTK_CREATE(vtkExtractPolyDataGeometry, extract); > extract->SetInputConnection(appendFilter->GetOutputPort()); > extract->SetImplicitFunction(box); > extract->ExtractBoundaryCellsOn(); > extract->PassPointsOn(); > extract->Update(); > > vtkPolyData* tmp = extract->GetOutput(); > > The "new" vtkPolyData still has the same number of points as the original > vtkPolyData, which confuses me, because the correct subset is displayed. > > I guess I understand the filter wrong? How can I get a subset as new > vtkPolyData? > > Thank you very much! > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From robert.aungst at gmail.com Thu Feb 1 11:12:23 2018 From: robert.aungst at gmail.com (Robby Aungst) Date: Thu, 1 Feb 2018 10:12:23 -0600 Subject: [vtkusers] vtkCell Help Message-ID: I have a question as it relates to the 3D types of vtkCell such as the VTK_TETRA. I'm modeling a finite element mesh with these cells, and I've found that if I have a number of these 3D cells rendered next to each other, none of the interior edges get rendered. In fact, if I use clipping planes, the interior of my mesh is hollow. Is there any way to get around this? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jellby at yahoo.com Thu Feb 1 14:02:47 2018 From: jellby at yahoo.com (=?UTF-8?Q?Ignacio_Fern=c3=a1ndez_Galv=c3=a1n?=) Date: Thu, 1 Feb 2018 20:02:47 +0100 Subject: [vtkusers] Applying a transform to polydata affects lighting... weirdly Message-ID: <907c79e1-9857-9f46-cfc9-38bbc1152002@yahoo.com> If I apply a nontrivial transformation to polydata, the resulting lighting is completely different from the original. A python example is worth a thousand words: #================================================ import vtk renderer = vtk.vtkRenderer() render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) interactor = vtk.vtkRenderWindowInteractor() interactor.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) render_window.SetInteractor(interactor) interactor.Initialize() renderer.SetBackground(0.2,0.2,0.2) sphere = vtk.vtkSphereSource() sphere.SetThetaResolution(20) sphere.SetPhiResolution(20) transform = vtk.vtkTransform() # no-op transform.SetMatrix([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0]) # invert x axis transform.SetMatrix([-1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0]) # invert x and y axes transform.SetMatrix([-1,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,0]) # 90-degree z rotation transform.SetMatrix([0,1,0,0,-1,0,0,0,0,0,1,0,0,0,0,0]) t_sphere = vtk.vtkTransformFilter() t_sphere.SetTransform(transform) t_sphere.SetInputConnection(sphere.GetOutputPort()) sphere_mapper = vtk.vtkPolyDataMapper() #sphere_mapper.SetInputConnection(sphere.GetOutputPort()) sphere_mapper.SetInputConnection(t_sphere.GetOutputPort()) sphere_actor = vtk.vtkActor() sphere_actor.SetMapper(sphere_mapper) sphere_actor.GetProperty().SetColor(1,1,1) renderer.AddActor(sphere_actor) renderer.ResetCamera() render_window.Render() interactor.Start() #================================================ Using the first (no-op) transform is fine, of course. The second just inverts the x axis, and that results in a black sphere. Fair enough, I'm "inverting" the object, so maybe it's inside out. Then I try inverting the y axis too, that should put things back to normal. And indeed it does, apparently. Perhaps what's needed is a proper rotation/shearing, with no reflection component. I try the fourth, which is a pretty innocent 90-degree rotation around the z axis, no inversion, no deformation. But lo, now the light moves with the object! Am I missing something or doing something wrong? Any fix or workaround? This is with with both VTK 5.8.0 and 8.1.0 Thanks, Ignacio From david.gobbi at gmail.com Thu Feb 1 14:23:14 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 1 Feb 2018 12:23:14 -0700 Subject: [vtkusers] Applying a transform to polydata affects lighting... weirdly In-Reply-To: <907c79e1-9857-9f46-cfc9-38bbc1152002@yahoo.com> References: <907c79e1-9857-9f46-cfc9-38bbc1152002@yahoo.com> Message-ID: Hi Ignatio, The bottom row in a linear transform matrix should always be 0, 0, 0, 1. A matrix in which any row or column is all zeros is a singular matrix. When you apply a transformation that flips the data inside-out, the windings of the polygons and the directions of the normals are reversed. This is a mathematical fact, so to speak, and is not specific to VTK. The filter vtkReverseSense can be used to reverse the normals and the polygon windings in order to make lighting work properly again. You can check whether a matrix has a flip by computing the determinant. If the determinant is negative, there is a flip. If the determinant is zero, the matrix is singular and should not be used (the behavior of the VTK transform filters is pretty much undefined for singular matrices). The rotation around Z should work fine, so I'm not sure what the problem is there. Try again after setting the bottom row of the matrix to 0, 0, 0, 1. Cheers, - David On Thu, Feb 1, 2018 at 12:02 PM, Ignacio Fern?ndez Galv?n via vtkusers < vtkusers at vtk.org> wrote: > If I apply a nontrivial transformation to polydata, the resulting lighting > is completely different from the original. A python example is worth a > thousand words: > > #================================================ > import vtk > > renderer = vtk.vtkRenderer() > render_window = vtk.vtkRenderWindow() > render_window.AddRenderer(renderer) > interactor = vtk.vtkRenderWindowInteractor() > interactor.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) > render_window.SetInteractor(interactor) > interactor.Initialize() > renderer.SetBackground(0.2,0.2,0.2) > > sphere = vtk.vtkSphereSource() > sphere.SetThetaResolution(20) > sphere.SetPhiResolution(20) > > transform = vtk.vtkTransform() > # no-op > transform.SetMatrix([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0]) > # invert x axis > transform.SetMatrix([-1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0]) > # invert x and y axes > transform.SetMatrix([-1,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,0]) > # 90-degree z rotation > transform.SetMatrix([0,1,0,0,-1,0,0,0,0,0,1,0,0,0,0,0]) > > t_sphere = vtk.vtkTransformFilter() > t_sphere.SetTransform(transform) > t_sphere.SetInputConnection(sphere.GetOutputPort()) > > sphere_mapper = vtk.vtkPolyDataMapper() > #sphere_mapper.SetInputConnection(sphere.GetOutputPort()) > sphere_mapper.SetInputConnection(t_sphere.GetOutputPort()) > sphere_actor = vtk.vtkActor() > sphere_actor.SetMapper(sphere_mapper) > sphere_actor.GetProperty().SetColor(1,1,1) > renderer.AddActor(sphere_actor) > > renderer.ResetCamera() > render_window.Render() > interactor.Start() > #================================================ > > Using the first (no-op) transform is fine, of course. > > The second just inverts the x axis, and that results in a black sphere. > Fair enough, I'm "inverting" the object, so maybe it's inside out. > > Then I try inverting the y axis too, that should put things back to > normal. And indeed it does, apparently. > > Perhaps what's needed is a proper rotation/shearing, with no reflection > component. I try the fourth, which is a pretty innocent 90-degree rotation > around the z axis, no inversion, no deformation. But lo, now the light > moves with the object! > > Am I missing something or doing something wrong? Any fix or workaround? > This is with with both VTK 5.8.0 and 8.1.0 > > Thanks, > Ignacio > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Thu Feb 1 14:23:54 2018 From: lasso at queensu.ca (Andras Lasso) Date: Thu, 1 Feb 2018 19:23:54 +0000 Subject: [vtkusers] Applying a transform to polydata affects lighting... weirdly In-Reply-To: <907c79e1-9857-9f46-cfc9-38bbc1152002@yahoo.com> References: <907c79e1-9857-9f46-cfc9-38bbc1152002@yahoo.com> Message-ID: If you apply a linear transform that has a negative determinant to a polydata, then you essentially turn your mesh inside out, so you have to invert the direction of your surface normal vectors. Andras -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ignacio Fern?ndez Galv?n via vtkusers Sent: Thursday, February 1, 2018 2:03 PM To: vtkusers at vtk.org Subject: [vtkusers] Applying a transform to polydata affects lighting... weirdly If I apply a nontrivial transformation to polydata, the resulting lighting is completely different from the original. A python example is worth a thousand words: #================================================ import vtk renderer = vtk.vtkRenderer() render_window = vtk.vtkRenderWindow() render_window.AddRenderer(renderer) interactor = vtk.vtkRenderWindowInteractor() interactor.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) render_window.SetInteractor(interactor) interactor.Initialize() renderer.SetBackground(0.2,0.2,0.2) sphere = vtk.vtkSphereSource() sphere.SetThetaResolution(20) sphere.SetPhiResolution(20) transform = vtk.vtkTransform() # no-op transform.SetMatrix([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0]) # invert x axis transform.SetMatrix([-1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0]) # invert x and y axes transform.SetMatrix([-1,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,0]) # 90-degree z rotation transform.SetMatrix([0,1,0,0,-1,0,0,0,0,0,1,0,0,0,0,0]) t_sphere = vtk.vtkTransformFilter() t_sphere.SetTransform(transform) t_sphere.SetInputConnection(sphere.GetOutputPort()) sphere_mapper = vtk.vtkPolyDataMapper() #sphere_mapper.SetInputConnection(sphere.GetOutputPort()) sphere_mapper.SetInputConnection(t_sphere.GetOutputPort()) sphere_actor = vtk.vtkActor() sphere_actor.SetMapper(sphere_mapper) sphere_actor.GetProperty().SetColor(1,1,1) renderer.AddActor(sphere_actor) renderer.ResetCamera() render_window.Render() interactor.Start() #================================================ Using the first (no-op) transform is fine, of course. The second just inverts the x axis, and that results in a black sphere. Fair enough, I'm "inverting" the object, so maybe it's inside out. Then I try inverting the y axis too, that should put things back to normal. And indeed it does, apparently. Perhaps what's needed is a proper rotation/shearing, with no reflection component. I try the fourth, which is a pretty innocent 90-degree rotation around the z axis, no inversion, no deformation. But lo, now the light moves with the object! Am I missing something or doing something wrong? Any fix or workaround? This is with with both VTK 5.8.0 and 8.1.0 Thanks, Ignacio _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C3eac21bb1aa6419e895708d569a6730c%7C51b39b56515f4e0e9e3854a0cd5d4b39%7C1%7C0%7C636531085972703324&sdata=kpgc6%2BFBPbKt9ypsqRxrbzgZN9L0%2FF1RLF9VEdUNVBU%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C3eac21bb1aa6419e895708d569a6730c%7C51b39b56515f4e0e9e3854a0cd5d4b39%7C1%7C0%7C636531085972703324&sdata=nrucaSSzeJwFu491GC0cwv7T%2BE84JTYzn6vpc4VVuLQ%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C3eac21bb1aa6419e895708d569a6730c%7C51b39b56515f4e0e9e3854a0cd5d4b39%7C1%7C0%7C636531085972703324&sdata=ckqmaKl8sg1%2FWlNaklFPjtUnXfODoQX8Pc7xKNWJlc8%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C3eac21bb1aa6419e895708d569a6730c%7C51b39b56515f4e0e9e3854a0cd5d4b39%7C1%7C0%7C636531085972703324&sdata=J5XUVtbz0QKglvA2LT9deBMN2XWsVDr9MAqECbojOEg%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7C3eac21bb1aa6419e895708d569a6730c%7C51b39b56515f4e0e9e3854a0cd5d4b39%7C1%7C0%7C636531085972703324&sdata=bNiRpY8G2sE5S%2Fic3bZGL4gSuyo2Uo%2BIhREu9Hx9sVE%3D&reserved=0 From robert.aungst at gmail.com Thu Feb 1 14:26:39 2018 From: robert.aungst at gmail.com (Robby Aungst) Date: Thu, 1 Feb 2018 13:26:39 -0600 Subject: [vtkusers] vtkCell Help In-Reply-To: <829BA56E-6C1A-4B84-A574-1DACB07AA745@nist.gov> References: <829BA56E-6C1A-4B84-A574-1DACB07AA745@nist.gov> Message-ID: If I do wireframe, it only shows me the wireframe on the outside. [image: Inline image 1] If I slice it, it's hollow inside (lineview and solid): [image: Inline image 3] This is a cube that's meshed with VTK_TETRA type vtkCells. On Thu, Feb 1, 2018 at 12:28 PM, Langer, Stephen A. (Fed) < stephen.langer at nist.gov> wrote: > Have you tried actor->GetProperty()->SetRepresentationToWireframe() ? > > > > -- Steve > > > > On 2/1/18, 11:12 AM, "vtkusers on behalf of Robby Aungst" < > vtkusers-bounces at vtk.org on behalf of robert.aungst at gmail.com> wrote: > > > > I have a question as it relates to the 3D types of vtkCell such as the > VTK_TETRA. I'm modeling a finite element mesh with these cells, and I've > found that if I have a number of these 3D cells rendered next to each > other, none of the interior edges get rendered. In fact, if I use clipping > planes, the interior of my mesh is hollow. Is there any way to get around > this? > > Thanks! > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sliced.png Type: image/png Size: 7875 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: line_view.png Type: image/png Size: 98009 bytes Desc: not available URL: From stephen.langer at nist.gov Thu Feb 1 14:37:48 2018 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Thu, 1 Feb 2018 19:37:48 +0000 Subject: [vtkusers] vtkCell Help In-Reply-To: References: <829BA56E-6C1A-4B84-A574-1DACB07AA745@nist.gov> Message-ID: <19954334-28E1-4E2B-AAC8-78BF10BBCDF7@nist.gov> I think you need to use vtkExtractEdges on the grid. -- Steve On 2/1/18, 2:26 PM, "Robby Aungst" > wrote: If I do wireframe, it only shows me the wireframe on the outside. [Inline image 1] If I slice it, it's hollow inside (lineview and solid): [Inline image 3] This is a cube that's meshed with VTK_TETRA type vtkCells. On Thu, Feb 1, 2018 at 12:28 PM, Langer, Stephen A. (Fed) > wrote: Have you tried actor->GetProperty()->SetRepresentationToWireframe() ? -- Steve On 2/1/18, 11:12 AM, "vtkusers on behalf of Robby Aungst" on behalf of robert.aungst at gmail.com> wrote: I have a question as it relates to the 3D types of vtkCell such as the VTK_TETRA. I'm modeling a finite element mesh with these cells, and I've found that if I have a number of these 3D cells rendered next to each other, none of the interior edges get rendered. In fact, if I use clipping planes, the interior of my mesh is hollow. Is there any way to get around this? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 98010 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 7876 bytes Desc: image002.png URL: From bakkari.abdelkhalek at hotmail.fr Thu Feb 1 14:50:12 2018 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Thu, 1 Feb 2018 19:50:12 +0000 Subject: [vtkusers] 3D Splines slice by slice to 3D spline In-Reply-To: References: Message-ID: Dear All, I am trying to convert a 3D Splines slice by slices to one 3D spline and display it using vtk. Any advice and suggestions will be greatly appreciated. Best regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Thu Feb 1 15:16:26 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 1 Feb 2018 15:16:26 -0500 Subject: [vtkusers] announce: free VTK, ParaView and CMake training at Kitware New York next month Message-ID: Hi folks, Kitware is going to present three free, one day training courses next month at our Albany NY headquarters. The outline for each day follows. March 13'th "Introductory and applied VTK" morning: Dave DeMarle / Lisa Avila - "A hands on introduction to VTK" afternoon: Aashish Chaudhary - "VTK and Geosciences" Berk Geveci - "Flow Visualization" Ken Martin - "Realistic Rendering" Sankesh Jhaveri - ?A workflow for Medical Visualization? March 14'th "Introductory and applied ParaView" morning: Dan Lipsa / Utkarsh Ayachit - "A hands on introduction to ParaView" afternoon: Andy Bauer - "CFD analysis" T.J. Corona - "Simulation Debugging" Utkarsh Ayachit - "Quantitative Analysis" Bob O'Bara - "Point Cloud Processing" March 15'th "CMake and Friends" all day: w/ Bill Hoffman To reserve a seat for the course, please fill out this google form and we'll get back to you to confirm your reservation. https://goo.gl/forms/M3WmJcV9W6qKTK8x2 David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jellby at yahoo.com Thu Feb 1 15:27:06 2018 From: jellby at yahoo.com (=?UTF-8?Q?Ignacio_Fern=c3=a1ndez_Galv=c3=a1n?=) Date: Thu, 1 Feb 2018 21:27:06 +0100 Subject: [vtkusers] Applying a transform to polydata affects lighting... weirdly In-Reply-To: References: <907c79e1-9857-9f46-cfc9-38bbc1152002@yahoo.com> Message-ID: <2bc55986-b1c0-049a-4189-3476551994cf@yahoo.com> On 01/02/18, at 20:23, David Gobbi wrote: > The rotation around Z should work fine, so I'm not sure what the problem > is there.? Try again after setting the bottom row of the matrix to 0, 0, > 0, 1. Thanks, that 1 in the last element seems to mark the difference. From andrew.amaclean at gmail.com Thu Feb 1 15:49:40 2018 From: andrew.amaclean at gmail.com (Andrew Maclean) Date: Fri, 2 Feb 2018 07:49:40 +1100 Subject: [vtkusers] How to apply different colours to the extracted mean curvature in vtkcurvature Message-ID: These examples will help you. https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/CurvatureBandsWithGlyphs/ https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/ElevationBandsWithGlyphs/ The idea is to use a banded contour filter along with an indexed lookup table. Regards Andrew > ---------- Forwarded message ---------- > From: Polly Lina > To: vtkusers at vtk.org > Cc: > Bcc: > Date: Wed, 31 Jan 2018 10:29:13 -0700 (MST) > Subject: [vtkusers] How to apply different colours to the extracted mean > curvature in vtkcurvature > I am applying vtkCurvature "SetCurvatureToMean" to extract the 3D face > polydata. > My question is: > Can anyone please help me on how can I apply different colours to the > extracted dataset by giving a mean curvature threshold. Eg: The values > > 0.05 label the surface to black, the values <=0.05 label the surface to > red..etc > > This is my code: > vtkCurvatures> meanCurve = vtkCurvatures::New(); > meanCurve->SetInputConnection(reader->GetOutputPort()); > meanCurve->SetCurvatureTypeToMean(); > meanCurve->Update(); > > vtkLookupTable* lut = vtkLookupTable::New(); > lut->SetNumberOfColors(2); > > double H; > for (int i = 0; i < nOfPnts; i++) > { > H = > (double)meanCurve->GetOutput()->GetPointData()->GetScalars() > ->GetTuple1(i); > if (H >= 0.05) > { > lut->SetTableValue(0.0, 0.0, 0.0, 1); > } > else > { > lut->SetTableValue(1.0, 1.0, 1.0, 1); > } > } > lut->Build(); > > I could only get partially coloured and it is not what i expected. > Thanks and helps are so much appreciated! > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > > > > -- ___________________________________________ Andrew J. P. Maclean ___________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseph.bendahan at gmail.com Thu Feb 1 20:24:13 2018 From: joseph.bendahan at gmail.com (Joseph Bendahan) Date: Thu, 1 Feb 2018 17:24:13 -0800 Subject: [vtkusers] Unable to run vtk 7.1.1 with spyder Message-ID: I am working in Windows 7 64-bit machine. I am using Spyder 2.3.5.2 that uses Python 2.7.10 64bits I installed vtkpython-7.1.1-Windows-64bits I added this to the PATH C:\Program Files\VTK 7.1.1\bin (checked that it I in the path), and added PYTHONPATH = C:\Program Files\VTK 7.1.1\bin\Lib\site-packages When I typed ?import vtk?, I got this [image: Inline image 2] Then, I found out that vtkCommonCorePython is in C:\Program Files\VTK 7.1.1\bin\Lib\site-packages\vtk So I changed PYTHONPATH= C:\Program Files\VTK 7.1.1\bin\Lib\site-packages\vtk Then got this ImportError: No module named vtk So I tried ?Pip install vtk? Got this [image: Inline image 3] Tried ?conda install vtk? Got this Fetching package metadata .? Solving package specifications ?? And Python.exe crashed I ran out of ideas. Your help would be greatly appreciated. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 12605 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 40592 bytes Desc: not available URL: From bill.lorensen at gmail.com Thu Feb 1 22:28:19 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 1 Feb 2018 19:28:19 -0800 Subject: [vtkusers] vtkCell Help In-Reply-To: <19954334-28E1-4E2B-AAC8-78BF10BBCDF7@nist.gov> References: <829BA56E-6C1A-4B84-A574-1DACB07AA745@nist.gov> <19954334-28E1-4E2B-AAC8-78BF10BBCDF7@nist.gov> Message-ID: You can also add a vtkShrinkFilter before your mapper. See for example: https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/ExtractData/ On Thu, Feb 1, 2018 at 11:37 AM, Langer, Stephen A. (Fed) < stephen.langer at nist.gov> wrote: > I think you need to use vtkExtractEdges on the grid. > > > > -- Steve > > > > On 2/1/18, 2:26 PM, "Robby Aungst" wrote: > > > > If I do wireframe, it only shows me the wireframe on the outside. > > [image: Inline image 1] > > If I slice it, it's hollow inside (lineview and solid): > > [image: Inline image 3] > > > > This is a cube that's meshed with VTK_TETRA type vtkCells. > > > > > > On Thu, Feb 1, 2018 at 12:28 PM, Langer, Stephen A. (Fed) < > stephen.langer at nist.gov> wrote: > > Have you tried actor->GetProperty()->SetRepresentationToWireframe() ? > > > > -- Steve > > > > On 2/1/18, 11:12 AM, "vtkusers on behalf of Robby Aungst" < > vtkusers-bounces at vtk.org on behalf of robert.aungst at gmail.com> wrote: > > > > I have a question as it relates to the 3D types of vtkCell such as the > VTK_TETRA. I'm modeling a finite element mesh with these cells, and I've > found that if I have a number of these 3D cells rendered next to each > other, none of the interior edges get rendered. In fact, if I use clipping > planes, the interior of my mesh is hollow. Is there any way to get around > this? > > Thanks! > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Unpaid intern in BillsParadise at noware dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 7876 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 98010 bytes Desc: not available URL: From david.gobbi at gmail.com Fri Feb 2 00:29:49 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 1 Feb 2018 22:29:49 -0700 Subject: [vtkusers] Unable to run vtk 7.1.1 with spyder In-Reply-To: References: Message-ID: Hi Joseph, Your initial settings look correct: I added this to the PATH C:\Program Files\VTK 7.1.1\bin (checked that it I > in the path), and added > > PYTHONPATH = C:\Program Files\VTK 7.1.1\bin\Lib\site-packages > The error message given by Python is misleading: [image: Inline image 2] > > Python says "No module names vtkCommonCorePython" if any of the dlls needed by vtkCommonCorePython.pyd are missing. So, yeah, it's misleading. It's one of those kinds of error messages that gives almost no information about what went wrong or how to fix the problem. You've set the PATH correctly (as noted above) so I'm pretty sure that all the VTK DLLs are being found. But it is possible that the VTK dlls, in turn, need some other DLLs that aren't on your system. When I've seen problems like this in the past, the missing DLLs usually turn out to be the Microsoft C/C++ runtime DLLs (the MSVCR and MSVCP DLLs). Try installing the Visual Studio 2013 Redistributable package from Microsoft, it will add these DLLs to your system: https://support.microsoft.com/en-ca/help/2977003/the-latest-supported-visual-c-downloads If that doesn't work, you can use a tool like dependency walker (depends.exe) to find out what DLLs are missing. Cheers, - David -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 40592 bytes Desc: not available URL: From pkorir at ebi.ac.uk Fri Feb 2 11:23:46 2018 From: pkorir at ebi.ac.uk (Paul Korir) Date: Fri, 2 Feb 2018 16:23:46 +0000 Subject: [vtkusers] VTK 8.1.0 wheels on pypi In-Reply-To: <4b4635d8-b082-afed-0d31-68f05a551fbc@aero.iitb.ac.in> References: <4b4635d8-b082-afed-0d31-68f05a551fbc@aero.iitb.ac.in> Message-ID: Briliant! A bit overdue... ;-) Paul K. Korir, PhD Scientific Programmer EMBL-EBI 01223494422 On 31/01/2018 18:48, Prabhu Ramachandran wrote: > > Hi all, > > Just a small announcement that we now have VTK-8.1.0 wheels available > on pypi (for OSX, Linux, and Windows). Installing VTK (on a 64 bit > OS), is now as simple as: > > ?$ pip install vtk > > More details are available here: > > http://prabhuramachandran.blogspot.in/2018/01/vtk-810-wheels-for-all-platforms-on-pypi.html > > Many thanks to all the folks who made this happen! > > cheers, > > Prabhu > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From alican1812 at hotmail.com Fri Feb 2 14:17:04 2018 From: alican1812 at hotmail.com (alican) Date: Fri, 2 Feb 2018 12:17:04 -0700 (MST) Subject: [vtkusers] Can somebody please explain how to use vtkImplicitWindowFunction? Message-ID: <1517599024847-0.post@n5.nabble.com> Sorry, if I am missing something obvious, but I cannot make it work. I am trying to cut a hole in the 0,0,0 centered mesh using vtkPolyPlane as an implicit function. For simpliity sake let's say my mesh is a hollow cylinder, and I want to cut a hole on the front (z>0) surface only. I have thought that using vtkImplicitWindowFunction I can set a cutting range alongside Z-axis, let's say from zmax to zero, however any values I have tried don't work. I have tried setting values as 0, zmax vtkPolyPlane::EvaluateFunction(0), vtkPolyPlane::EvaluateFunction(zMax), vtkPolyPlane::FunctionValue(0), vtkPolyPlane::FunctionValue(zMax), What am I missing? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From stephen.langer at nist.gov Fri Feb 2 15:37:55 2018 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Fri, 2 Feb 2018 20:37:55 +0000 Subject: [vtkusers] clipping question Message-ID: Hi -- When using vtkTableBasedClipDataSet to apply two more more clipping planes to a grid, I'm seeing incorrect results along the line where the planes meet. I've attached a simple program that demonstrates the problem and a screenshot of the output. The program generates a vtkRectilinearGrid and pipes it through vtkTableBasedClipDataSet with its clip function set to two perpendicular planes. The result should have a concave right angle, but diagonal facets appear instead. I've tried using vtkClipDataSet instead, but it just gives different wrong answers, although it does work correctly when the clipping planes lie exactly along a row of nodes in the grid. vtkTableBasedClipDataSet draws diagonal facets across cells in that case. What am I doing wrong? Thanks. -- Steve -------------- next part -------------- A non-text attachment was scrubbed... Name: clipped.png Type: image/png Size: 25687 bytes Desc: clipped.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clipImage3.C Type: application/octet-stream Size: 6106 bytes Desc: clipImage3.C URL: From bill.lorensen at gmail.com Fri Feb 2 19:58:37 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 2 Feb 2018 16:58:37 -0800 Subject: [vtkusers] clipping question In-Reply-To: References: Message-ID: These clip filters depend on the resolution size, I modified your example to use a higher resolution image. I'd like to add this to the VTKExaamples repo if is OK with you. I will acknowledge your contribution. Bill On Fri, Feb 2, 2018 at 12:37 PM, Langer, Stephen A. (Fed) wrote: > Hi -- > > When using vtkTableBasedClipDataSet to apply two more more clipping planes to a grid, I'm seeing incorrect results along the line where the planes meet. I've attached a simple program that demonstrates the problem and a screenshot of the output. The program generates a vtkRectilinearGrid and pipes it through vtkTableBasedClipDataSet with its clip function set to two perpendicular planes. The result should have a concave right angle, but diagonal facets appear instead. > > I've tried using vtkClipDataSet instead, but it just gives different wrong answers, although it does work correctly when the clipping planes lie exactly along a row of nodes in the grid. vtkTableBasedClipDataSet draws diagonal facets across cells in that case. > > What am I doing wrong? > > Thanks. > > -- Steve > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Unpaid intern in BillsParadise at noware dot com -------------- next part -------------- A non-text attachment was scrubbed... Name: TableBasedClipDataSetWithPolyData2.cxx Type: application/octet-stream Size: 6170 bytes Desc: not available URL: From gregthom992 at gmail.com Sat Feb 3 01:37:58 2018 From: gregthom992 at gmail.com (gregthom992) Date: Fri, 2 Feb 2018 23:37:58 -0700 (MST) Subject: [vtkusers] probe volume with thick line ( intensity profile with line radius or thickness ) Message-ID: <1517639878557-0.post@n5.nabble.com> Hi all I can probe my volume with a line given two points of the line. That is good and fine. lineSource=vtk.vtkLineSource() lineSource.SetPoint1(prf_start) lineSource.SetPoint2(prf_stop) probeFilter=vtk.vtkProbeFilter() probeFilter.SetInputConnection(lineSource.GetOutputPort()) Suppose I want to probe my volume with a thick line , i.e so that I can have a line profile averaged over the thickness of the line. Is this possible with VTK ? I saw this post about visualizing a thick line but it creates and actor. How could I proble the image data with the actor after setting the line width ? https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LineWidth I thought about probing with TubeFilter but how to average that over the radius of the tube ? Thanks GT -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From vtk12af6bc42 at kant.sophonet.de Sat Feb 3 05:37:12 2018 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Sat, 03 Feb 2018 11:37:12 +0100 Subject: [vtkusers] Black renderwindow with vtkGPUVolumeRayCastMapper/MaximumIntensityProjection Message-ID: <2ade920a20a76c4f08d6082fe8792fa8@kant.sophonet.de> Hi list, in an earlier version of my software using VTK7.x and the OpenGL backend, MIP rendering was working using vtkGPUVolumeRayCastMapper and MaximumIntensityProjection. However, in VTK 8.x (e.g. VTK 8.1.0), using the OpenGL2 backend, the renderwindow stays black/empty - VTK does not show an error message, and the IsRenderSupported (see below) does not seem to fail. Any hints what is wrong with the code below? By the way: I have added the volumeProperty (and the piecewise function) after following a current VTK test program (https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastFourComponentsMIP.cxx). vtkimagedata is a scalar medical image (unsigned short), so nothing special. Thanks, Sophonet vtkNew mapper; mapper->SetInputData(vtkimagedata); mapper->SetBlendModeToMaximumIntensity(); vtkNew volume; volume->SetMapper(mapper); // ... connect to renderer etc. //NOTE: The following lines from VTK's TestGPURayCastFourComponentsMIP.cxx did not solve the problem //vtkNew volumeProperty; //volumeProperty->IndependentComponentsOn(); //volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); //volumeProperty->SetShade(1); //vtkNew f; //f->AddPoint(0, 0.0); //f->AddPoint(255, 1.0); //volumeProperty->SetScalarOpacity(f); //int valid = mapper->IsRenderSupported(vtkrenderer_->GetRenderWindow(), volumeProperty); // NOTE: No exception was thrown on my system //if (valid == 0) // throw std::runtime_error("MIP rendering is not supported"); //volume->SetProperty(volumeProperty); From jellby at yahoo.com Sat Feb 3 13:29:58 2018 From: jellby at yahoo.com (=?UTF-8?Q?Ignacio_Fern=c3=a1ndez_Galv=c3=a1n?=) Date: Sat, 3 Feb 2018 19:29:58 +0100 Subject: [vtkusers] Oriented vtkCubeAxesActor issues Message-ID: <5f0d6ba4-3b72-35dd-6e16-ba2410d6f004@yahoo.com> Hi, This was apparently mentioned some time ago (http://vtk.1045678.n5.nabble.com/oriented-vtkCubeAxesActor-issue-td5726648.html), but there was no solution, and I think I'm having the same problem. Basically, I set up a vtkCubeAxesActor with custom range: axes = vtk.vtkCubeAxesActor() axes.SetCamera(renderer.GetActiveCamera()) axes.SetAxisBaseForX(1,0,0) axes.SetAxisBaseForY(0,1,0) axes.SetAxisBaseForZ(0,0,1) axes.SetBounds(0,10,0,10,0,10) axes.SetOrientedBounds(0,10,0,10,0,10) axes.SetUseOrientedBounds(1) axes.SetXAxisRange(0,1) renderer.AddActor(axes) I set the "BaseFor" axes to the Cartesian ones, so the actor should look the same with "UseOrientedBounds" or without. But with oriented bounds I get an X axis labeled from 0 to 10, while without it it's 0 to 1, as I requested. Also, if I use the oriented bounds and do not set the bounds, there is some clipping, as if the renderer didn't notice the actor's real extent. In the thread linked above, it was mentioned that this is done correctly in Paraview. Is it really so? How can I test it? My ultimate goal is to show the outline of a transformed ImageData grid, with ticks marking the gridpoints on the outline. Is there some other way to achieve that? (I have the outline as a transformed box, I'm just missing the ticks. So in fact I would also like to disable the axis line in the vtkCubeAxesActor and leave the ticks...) Thanks, Ignacio From david.gobbi at gmail.com Sat Feb 3 14:51:18 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 3 Feb 2018 12:51:18 -0700 Subject: [vtkusers] probe volume with thick line ( intensity profile with line radius or thickness ) In-Reply-To: <1517639878557-0.post@n5.nabble.com> References: <1517639878557-0.post@n5.nabble.com> Message-ID: Hi Greg, VTK provides an easy way to replace each point on the line with many points: replicate = vtk.vtkGlyph3D() replicate.SetInputConnection(lineSource.GetOutputPort()) replicate.SetSourceConnection(otherSource.GetOutputPort()) The output of "replicate" will replace each single point in "lineSource" with all of the points in "otherSource". For example, "otherSource" could be a short line at a right angle to the original line. The result would be a ribbon. Or "otherSource" could be a So if "otherSource" has N points, then after probing with the replicate output, it would be necessary to average every "N" points in order to get the value of each point on the "thick" line. The problem with using a tube is that it is hollow. Several concentric tubes would be needed to get an average over various radii. Cheers, - David On Fri, Feb 2, 2018 at 11:37 PM, gregthom992 wrote: > Hi all > > I can probe my volume with a line given two points of the line. That is > good > and fine. > > lineSource=vtk.vtkLineSource() > lineSource.SetPoint1(prf_start) > lineSource.SetPoint2(prf_stop) > probeFilter=vtk.vtkProbeFilter() > probeFilter.SetInputConnection(lineSource.GetOutputPort()) > > Suppose I want to probe my volume with a thick line , i.e so that I can > have > a line profile averaged over the thickness of the line. Is this possible > with VTK ? I saw this post about visualizing a thick line but it creates > and > actor. How could I proble the image data with the actor after setting the > line width ? > https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LineWidth > > I thought about probing with TubeFilter but how to average that over the > radius of the tube ? > > Thanks > > GT > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bui at calcreek.com Sat Feb 3 15:26:14 2018 From: bui at calcreek.com (tb) Date: Sat, 3 Feb 2018 13:26:14 -0700 (MST) Subject: [vtkusers] OpenGL2 linking issues with VTK 7.1.1 and 8.1.0 for Windows 10 Message-ID: <1517689574390-0.post@n5.nabble.com> Dear VTK community, I have been trying to migrate from VTK 6.3.0 to 7.1.1 and even 8.1.0 in Windows 10 x64 platform. Both versions cause the linking issues with two functions that are no longer exist in either version distribution. I have also made sure my codes reference and link only to the OpenGL2 directories. These two functions, vtkRenderingOpenGL_AutoInit_Construct and vtkRenderingOpenGL_AutoInit_Destruct are not found any where in either header or source files in v7.1.1 distribution (although they are found in 6.3.0 containing in the source file OpenGL\vtkRenderingOpenGLObjectFactory.cxx). Do I need to include some other packages in CMake to resolve these linking issues? Currently, in CMake I have only the following module built, vtkGUISupportMFC. Are there some options in CMake that I neglect to enable? I have used the default settings except for enabling CMAKE_CXX_MP_FLAG and VTK_USE_CXX11_FEATURES. Many thanks, Thuc Bui -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Sat Feb 3 16:11:38 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 3 Feb 2018 14:11:38 -0700 Subject: [vtkusers] OpenGL2 linking issues with VTK 7.1.1 and 8.1.0 for Windows 10 In-Reply-To: <1517689574390-0.post@n5.nabble.com> References: <1517689574390-0.post@n5.nabble.com> Message-ID: Hi Thuc, The vtkRenderingOpenGL_AutoInit_Construct method is declared via the VTK_AUTOINIT() macro in vtkRenderingOpenGLModule.h. If I recall correctly, if a project includes any header from Rendering/OpenGL (either directly or indirectly) then your project will look for the vtkRenderingOpenGL_AutoInit methods. The strange thing is, if you have an OpenGL2 build of VTK, then the vtkRenderingOpenGLModule.h header should not even exist. But since you are getting this build error, it seems that this header does exist, and your project is indirectly including it somehow. Do a search of your VTK installation to make sure that vtkRenderingOpenGL2Module.h exists and that vtkRenderingOpenGLModule.h does not exists. - David On Sat, Feb 3, 2018 at 1:26 PM, tb wrote: > Dear VTK community, > > I have been trying to migrate from VTK 6.3.0 to 7.1.1 and even 8.1.0 in > Windows 10 x64 platform. Both versions cause the linking issues with two > functions that are no longer exist in either version distribution. I have > also made sure my codes reference and link only to the OpenGL2 directories. > These two functions, vtkRenderingOpenGL_AutoInit_Construct and > vtkRenderingOpenGL_AutoInit_Destruct are not found any where in either > header or source files in v7.1.1 distribution (although they are found in > 6.3.0 containing in the source file > OpenGL\vtkRenderingOpenGLObjectFactory.cxx). Do I need to include some > other > packages in CMake to resolve these linking issues? Currently, in CMake I > have only the following module built, vtkGUISupportMFC. Are there some > options in CMake that I neglect to enable? I have used the default settings > except for enabling CMAKE_CXX_MP_FLAG and VTK_USE_CXX11_FEATURES. > > Many thanks, > Thuc Bui > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bui at calcreek.com Sat Feb 3 17:36:40 2018 From: bui at calcreek.com (Thuc Bui) Date: Sat, 3 Feb 2018 14:36:40 -0800 Subject: [vtkusers] OpenGL2 linking issues with VTK 7.1.1 and 8.1.0 for Windows 10 In-Reply-To: References: <1517689574390-0.post@n5.nabble.com> Message-ID: <030b01d39d3f$76a87b90$63f972b0$@calcreek.com> Hi David, Thank you so much for getting back to me. I searched the VTK 7.1.1 distribution and did not find vtkRenderingOpenGLModule.h, but found vtkRenderingOpenGL2Module.h in the directory Rendering\OpenGL2. So I cheat by generating 2 dummy functions with OpenGL signatures, and in them simply calling their OpenGL2 counterpart in vtkRenderingOpenGL2ObjectFactory.cxx. This workaround gets my codes compiled and linked. Many thanks for your help, Thuc From: David Gobbi [mailto:david.gobbi at gmail.com] Sent: Saturday, February 03, 2018 1:12 PM To: tb Cc: VTK Users Subject: Re: [vtkusers] OpenGL2 linking issues with VTK 7.1.1 and 8.1.0 for Windows 10 Hi Thuc, The vtkRenderingOpenGL_AutoInit_Construct method is declared via the VTK_AUTOINIT() macro in vtkRenderingOpenGLModule.h. If I recall correctly, if a project includes any header from Rendering/OpenGL (either directly or indirectly) then your project will look for the vtkRenderingOpenGL_AutoInit methods. The strange thing is, if you have an OpenGL2 build of VTK, then the vtkRenderingOpenGLModule.h header should not even exist. But since you are getting this build error, it seems that this header does exist, and your project is indirectly including it somehow. Do a search of your VTK installation to make sure that vtkRenderingOpenGL2Module.h exists and that vtkRenderingOpenGLModule.h does not exists. - David On Sat, Feb 3, 2018 at 1:26 PM, tb wrote: Dear VTK community, I have been trying to migrate from VTK 6.3.0 to 7.1.1 and even 8.1.0 in Windows 10 x64 platform. Both versions cause the linking issues with two functions that are no longer exist in either version distribution. I have also made sure my codes reference and link only to the OpenGL2 directories. These two functions, vtkRenderingOpenGL_AutoInit_Construct and vtkRenderingOpenGL_AutoInit_Destruct are not found any where in either header or source files in v7.1.1 distribution (although they are found in 6.3.0 containing in the source file OpenGL\vtkRenderingOpenGLObjectFactory.cxx). Do I need to include some other packages in CMake to resolve these linking issues? Currently, in CMake I have only the following module built, vtkGUISupportMFC. Are there some options in CMake that I neglect to enable? I have used the default settings except for enabling CMAKE_CXX_MP_FLAG and VTK_USE_CXX11_FEATURES. Many thanks, Thuc Bui -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregthom992 at gmail.com Sat Feb 3 18:33:51 2018 From: gregthom992 at gmail.com (gregthom992) Date: Sat, 3 Feb 2018 16:33:51 -0700 (MST) Subject: [vtkusers] probe volume with thick line ( intensity profile with line radius or thickness ) In-Reply-To: References: <1517639878557-0.post@n5.nabble.com> Message-ID: <1517700831098-0.post@n5.nabble.com> Thanks David, I think your idea is certainly interesting and I want to work on it later after the current idea I just had. Right now the idea I had was to first orient (rotate ) image so that it is aligned with the line. After which I intend to simply get rows from the rotated image. I am not sure how this will work. I am still reading how to build this pipeline. Do you have any pointers to speed this up for me ? Thanks GT -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Sat Feb 3 19:23:44 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 3 Feb 2018 17:23:44 -0700 Subject: [vtkusers] probe volume with thick line ( intensity profile with line radius or thickness ) In-Reply-To: <1517700831098-0.post@n5.nabble.com> References: <1517639878557-0.post@n5.nabble.com> <1517700831098-0.post@n5.nabble.com> Message-ID: Hi Greg, Rotating the image will work, and you wouldn't have to rotate the entire image, since you're only interested in certain pixels. The filter vtkImageReslice will translate and rotate an image via interpolation, and you can set it up so that the output is just one single line (or several lines, to make a thick line). The tricky part is finding the correct rotation and translation for SetResliceAxes(). It could be done as follows: First, note that the direction of the ResliceAxes transformation is Output->Input (ditto for ResliceTransform, it does the same thing). The translation part of the transformation is easy: if the output of vtkImageReslice is a line of pixels (voxels) starting at (0,0,0), then we want a translation that moves point (0,0,0) to (px,py,pz) where the latter is the starting point of the profile line. And to keep the rotation simple, the output of vtkImageReslice can be one line of pixels along the x-axis, and then we want a rotation that will rotate a unit x-axis vector to the direction vector of the profile line. It's possible to compute the rotation between vectors by doing a cross product, but fortunately there is a method, vtkMath::Perpendiculars(), that can easily do what we need when one of the vectors happens to be the x-axis vector. So let's say the profile line starts at (px,py,pz) and has a unit direction vector of (vx,vy,vz). The needed ResliceAxes transformation will be as follows: double resliceAxesValues[16] = { vx, ux, wx, px, vy, uy, wy, py, vz, uz, wz, pz, 0, 0, 0, 1 }; We already have (px, py, pz) as the translation part of the 4x4 matrix, and (vx, vy, vz) as the first column of the 3x3 rotation matrix. The aforementioned vtkMath::Perpendiculars() method can be used to compute suitable "u" and "w" values: // compute vectors u, w that are perpendicular to an existing vector v: double u[3], w[3]; vtkMath::Perpendiculars(v, u, w, 0.0); If you wanted to do just a single line via a rotation of the image, you could do it like this: reslice = vtk.vtkImageReslice() reslice.SetInputConnection( ... ) reslice.SetOutputOrigin(0, 0, 0) reslice.SetOutputSpacing( ...) # use original image spacing reslice.SetOutputExtent(0, N, 0, 0, 0, 0) # this gives one line of output reslice.SetInterpolationModeToLinear() reslice.SetResliceAxes( ... ) The output of vtkImageReslice will be the values along the line. Fiddling with Origin and OutputExtent can do several lines at once. - David On Sat, Feb 3, 2018 at 4:33 PM, gregthom992 wrote: > Thanks David, > > I think your idea is certainly interesting and I want to work on it later > after the current idea I just had. > > Right now the idea I had was to first orient (rotate ) image so that it is > aligned with the line. After which I intend to simply get rows from the > rotated image. I am not sure how this will work. > I am still reading how to build this pipeline. Do you have any pointers to > speed this up for me ? > > Thanks > > GT > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregthom992 at gmail.com Sun Feb 4 00:16:53 2018 From: gregthom992 at gmail.com (gregthom992) Date: Sat, 3 Feb 2018 22:16:53 -0700 (MST) Subject: [vtkusers] probe volume with thick line ( intensity profile with line radius or thickness ) In-Reply-To: References: <1517639878557-0.post@n5.nabble.com> <1517700831098-0.post@n5.nabble.com> Message-ID: <1517721413162-0.post@n5.nabble.com> Hi David, So I am almost there but there is some magic you have to explain to me. Is there some graphics that explans how imagereslice works ? For instance: How do you know to do reslice.SetOutputExtent(0, N, 0, 0, 0, 0) # this gives one line of output and not reslice.SetOutputExtent(0, 0, 0, 0, 0, N) # this gives one line of output Both give one line of output but I am lost here. Also: Please I know I can get multiple lines for instance 2 lines by: reslice.SetOutputExtent(0, N, 0, 1, 0, 0) # this gives two lines of output What were you saying about fiddling with origin ? Below is my complete code which doesn't give me the expected results =================== vtkimage = SITKtoVTK(itkimage) vtkimage.SetOrigin(itkimage.GetOrigin()) print itkimage print vtkimage p0 = np.array(prf_start) p1 = np.array(prf_stop) vv = p1 - p0 nn = vv/np.linalg.norm(vv, 1) u, w = vtkMathPerpendiculars(nn, 3*[0], 3*[0], 0) #print vtkimage, itkimage print vv print nn print u, ' ', w # oM2 = vtk.vtkMatrix4x4() oM2.DeepCopy(( nn[0], u[0], w[0], p0[0], nn[1], u[1], w[1], p0[1], nn[2], u[2], w[2], p0[2], 0, 0, 0, 1 )) print oM2 # reslice = vtk.vtkImageReslice() reslice.SetInput(vtkimage) #reslice.SetOutputOrigin(itkimage.GetOrigin()[0], itkimage.GetOrigin()[1], itkimage.GetOrigin()[2]) reslice.SetOutputOrigin(0, 0, 0) reslice.SetOutputSpacing(itkimage.GetSpacing()[0], itkimage.GetSpacing()[1], itkimage.GetSpacing()[2]) if prf_params[0] in ['depth']: reslice.SetOutputExtent(0, itkimage.GetDepth()-1, 0, 0, 0, 0) # this gives one line of output if prf_params[0] in ['inline']: reslice.SetOutputExtent(0, 0, 0, itkimage.GetHeight()-1, 0, 0) # this gives one line of output if prf_params[0] in ['crossline']: reslice.SetOutputExtent(0, 0, 0, 0, 0, itkimage.GetWidth()-1) # this gives one line of output reslice.SetInterpolationModeToLinear() reslice.SetResliceAxes(oM2) reslice.Update() vtkimage2 = reslice.GetOutput() print vtkimage2 numpy_data = numpy_support.vtk_to_numpy(vtkimage2.GetPointData().GetScalars()) print numpy_data ===== SAMPLE OUTPUT ==== reading mhd complete ... bounds : [-148.5 148.5 -148.5 148.5 -99.5 99.5] center_pixel: (50, 50, 100) center_coord: [ 0. 0. 0.] imsage size : [100, 100, 200] profile type: depth | start=[0.0, 0.0, -99.5] stop=[0.0, 0.0, 99.5] profile type: depth | start_pixel=(50, 50, 0) stop_pixel=(50, 50, 199) Image (13AF3398) RTTI typeinfo: class itk::Image Reference Count: 1 Modified Time: 964 Debug: Off Object Name: Observers: none Source: (none) Source output name: (none) Release Data: Off Data Released: False Global Release Data: Off PipelineMTime: 939 UpdateMTime: 963 RealTimeStamp: 0 seconds LargestPossibleRegion: Dimension: 3 Index: [0, 0, 0] Size: [100, 100, 200] BufferedRegion: Dimension: 3 Index: [0, 0, 0] Size: [100, 100, 200] RequestedRegion: Dimension: 3 Index: [0, 0, 0] Size: [100, 100, 200] Spacing: [3, 3, 1] Origin: [-148.5, -148.5, -99.5] Direction: 1 0 0 0 1 0 0 0 1 IndexToPointMatrix: 3 0 0 0 3 0 0 0 1 PointToIndexMatrix: 0.333333 0 0 0 0.333333 0 0 0 1 Inverse Direction: 1 0 0 0 1 0 0 0 1 PixelContainer: ImportImageContainer (01E13E20) RTTI typeinfo: class itk::ImportImageContainer Reference Count: 1 Modified Time: 960 Debug: Off Object Name: Observers: none Pointer: 19020020 Container manages memory: true Size: 2000000 Capacity: 2000000 vtkImageData (13C95EF0) Debug: Off Modified Time: 309 Reference Count: 3 Registered Events: (none) Source: (none) Information: 139DB158 Data Released: False Global Release Data: Off UpdateTime: 0 Release Data: Off UpdateExtent: Not Initialized RequestExactExtent: Off Field Data: Debug: Off Modified Time: 291 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Number Of Points: 2000000 Number Of Cells: 1950399 Cell Data: Debug: Off Modified Time: 284 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 1 ) Pass Through Flags: ( 1 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) EdgeFlag: (none) Point Data: Debug: Off Modified Time: 290 Reference Count: 1 Registered Events: (none) Number Of Arrays: 1 Array 0 name = scalars Number Of Components: 1 Number Of Tuples: 2000000 Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 1 ) Pass Through Flags: ( 1 1 1 1 1 1 1 1 ) Scalars: Debug: Off Modified Time: 289 Reference Count: 1 Registered Events: (none) Name: scalars Data type: float Size: 2000000 MaxId: 1999999 NumberOfComponents: 1 Information: 00000000 Name: scalars Number Of Components: 1 Number Of Tuples: 2000000 Size: 2000000 MaxId: 1999999 LookupTable: (none) Array: 1D690020 Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) EdgeFlag: (none) Bounds: Xmin,Xmax: (-148.5, 148.5) Ymin,Ymax: (-148.5, 148.5) Zmin,Zmax: (-99.5, 99.5) Compute Time: 0 ScalarType: 10 NumberOfScalarComponents: 1 Spacing: (3, 3, 1) Origin: (-148.5, -148.5, -99.5) Dimensions: (100, 100, 200) Increments: (0, 0, 0) Extent: (0, 99, 0, 99, 0, 199) [ 0. 0. 199.] [ 0. 0. 1.] [0, -1.0, 0.0] [1.0, -0.0, -0.0] vtkMatrix4x4 (08E30D38) Debug: Off Modified Time: 312 Reference Count: 1 Registered Events: (none) Elements: 0 0 1 0 0 -1 -0 0 1 0 -0 -99.5 0 0 0 1 vtkImageData (13C95B78) Debug: Off Modified Time: 625 Reference Count: 2 Registered Events: (none) Source: (none) Information: 139DAF50 Data Released: False Global Release Data: Off UpdateTime: 626 Release Data: Off UpdateExtent: Not Initialized UpdateExtent: 0, 199, 0, 0, 0, 0 CombinedUpdateExtent: 0, -1, 0, -1, 0, -1 WholeExtent: 0, 199, 0, 0, 0, 0 ExtentTranslator: (08B2C528) RequestExactExtent: Off Field Data: Debug: Off Modified Time: 594 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Number Of Points: 200 Number Of Cells: 199 Cell Data: Debug: Off Modified Time: 602 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 1 ) Pass Through Flags: ( 1 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) EdgeFlag: (none) Point Data: Debug: Off Modified Time: 625 Reference Count: 1 Registered Events: (none) Number Of Arrays: 1 Array 0 name = ImageScalars Number Of Components: 1 Number Of Tuples: 200 Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 1 ) Pass Through Flags: ( 1 1 1 1 1 1 1 1 ) Scalars: Debug: Off Modified Time: 622 Reference Count: 1 Registered Events: (none) Name: ImageScalars Data type: float Size: 200 MaxId: 199 NumberOfComponents: 1 Information: 00000000 Name: ImageScalars Number Of Components: 1 Number Of Tuples: 200 Size: 200 MaxId: 199 LookupTable: (none) Array: 1BD7EEA8 Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) EdgeFlag: (none) Bounds: Xmin,Xmax: (0, 597) Ymin,Ymax: (0, 0) Zmin,Zmax: (0, 0) Compute Time: 0 ScalarType: 10 NumberOfScalarComponents: 1 Spacing: (3, 3, 1) Origin: (0, 0, 0) Dimensions: (200, 1, 1) Increments: (0, 0, 0) Extent: (0, 199, 0, 0, 0, 0) [ 2.69376324e-06 2.98764326e-06 3.12571501e-06 3.19816422e-06 3.08941594e-06 3.24563098e-06 3.36744961e-06 3.50718847e-06 3.41049872e-06 3.64814764e-06 3.61693901e-06 3.50275968e-06 3.54628014e-06 3.59668115e-06 3.76970297e-06 3.72300451e-06 3.86106831e-06 3.93086566e-06 4.09007953e-06 4.26286624e-06 4.21147206e-06 4.39374435e-06 4.24289055e-06 4.35135053e-06 4.50011703e-06 4.59888543e-06 4.58769182e-06 4.56170801e-06 4.86139834e-06 5.40174142e-06 6.13106795e-06 7.46469141e-06 9.48133766e-06 1.24298458e-05 1.71255706e-05 2.26814991e-05 2.83051340e-05 3.53847463e-05 4.19322168e-05 4.81512252e-05 5.48132775e-05 5.96905338e-05 6.66187989e-05 7.01088939e-05 7.38430535e-05 7.55145375e-05 7.73844367e-05 8.04474184e-05 8.26143078e-05 8.35268438e-05 8.50798824e-05 8.57990308e-05 8.60243017e-05 8.66826304e-05 8.76013291e-05 8.80208900e-05 8.73666650e-05 8.81852466e-05 8.91573800e-05 8.96064594e-05 8.93770411e-05 8.99249790e-05 8.91938034e-05 8.84891706e-05 8.82743698e-05 8.73582539e-05 8.30601784e-05 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Sun Feb 4 02:06:26 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 4 Feb 2018 00:06:26 -0700 Subject: [vtkusers] probe volume with thick line ( intensity profile with line radius or thickness ) In-Reply-To: <1517721413162-0.post@n5.nabble.com> References: <1517639878557-0.post@n5.nabble.com> <1517700831098-0.post@n5.nabble.com> <1517721413162-0.post@n5.nabble.com> Message-ID: Hi Greg, I don't know of any diagrams for vtkImageReslice but I think that I can answer your questions. First, though, I see a couple simple fixes for the code: The length of a vector is the 2-norm of the vector (sqrt of sum of squares): np.linalg.norm(vv, 1) should be np.linalg.norm(vv, 2) or simply np.linalg.norm(vv) The call to vtkMath::Perpendiculars() from Python is done as follows, by creating the output value arrays and letting the method fill in the values: u = np.zeros(3) w = np.zeros(3) vtk.vtkMath.Perpendiculars(nn, u, w, 0) With VTK's wrapping, if the C++ method returns values via the parameters, then the Python method always does the same. With regards to SetOutputExtent(), the "Extent" in VTK is a set of six values [Xmin, Xmax, Ymin, Ymax, Zmin, Zmax] that give the limits of a block of voxels. A line of N+1 voxels in the X direction that starts at zero is (0, N, 0, 0, 0, 0). The X, Y, Z for the extent are voxel indices, i.e. they are integers. So the Extent in VTK serves a similar purpose to the shape in numpy, with three fundamental differences: 1) The Extent is always 3D, whereas numpy arrays are ND 2) Extent has six values, since it gives the lower and upper value in each dimension rather than just giving the size in each dimension 3) The numpy shape is ordered from the slowest-varying to the fastest-varying index, whereas Extent is the opposite An Extent of (0, Xsize-1, 0, Ysize-1, 0, Zsize-1) is equivalent to numpy shape of (Zsize, Ysize, Xsize) if the numpy array is C-contiguous. Hopefully that didn't muddy up the issue too much. About the Origin, its purpose here is as follows. Let's say that you want to use three lines instead of one, to give the line some thickness in one direction: reslice.SetOutputExtent(0, N, 0, 2, 0, 0) # gives a (N+1)*3*1 block of voxels This block needs to be shifted so the middle line is the one at the desired position, and this shift is done by setting the Origin: reslice.SetOutputOrigin(0.0, -1.0*spacing[1], 0.0) Setting the OutputOrigin like this causes the block to be shifted down by one sample spacing in the y direction. More lines would require a larger shift. Remember that the idea is that you the ResliceAxes transformation is going to put one end of this block at the desired starting point for your line. And note that this block has to define a line (or lines) that go along the X-axis! That's the whole point, since the transformation matrix will rotate this X-axis to the desired line orientation for your input image. So get rid of the "if" statements that set up the extent in different directions, since the line orientation is already dealt with by the rotation in the transformation. - David On Sat, Feb 3, 2018 at 10:16 PM, gregthom992 wrote: > Hi David, > So I am almost there but there is some magic you have to explain to me. Is > there some graphics that explans how imagereslice works ? > > For instance: > How do you know to do > reslice.SetOutputExtent(0, N, 0, 0, 0, 0) # this gives one line of output > and not > reslice.SetOutputExtent(0, 0, 0, 0, 0, N) # this gives one line of output > > Both give one line of output but I am lost here. > > Also: > > Please I know I can get multiple lines for instance 2 lines by: > reslice.SetOutputExtent(0, N, 0, 1, 0, 0) # this gives two lines of output > > What were you saying about fiddling with origin ? Below is my complete code > which doesn't give me the expected results > > > > =================== > > vtkimage = SITKtoVTK(itkimage) > vtkimage.SetOrigin(itkimage.GetOrigin()) > print itkimage > print vtkimage > > p0 = np.array(prf_start) > p1 = np.array(prf_stop) > vv = p1 - p0 > nn = vv/np.linalg.norm(vv, 1) > > u, w = vtkMathPerpendiculars(nn, 3*[0], 3*[0], 0) > > #print vtkimage, itkimage > print vv > print nn > print u, ' ', w > # > oM2 = vtk.vtkMatrix4x4() > oM2.DeepCopy(( > nn[0], u[0], w[0], p0[0], > nn[1], u[1], w[1], p0[1], > nn[2], u[2], w[2], p0[2], > 0, 0, 0, 1 )) > print oM2 > # > reslice = vtk.vtkImageReslice() > reslice.SetInput(vtkimage) > #reslice.SetOutputOrigin(itkimage.GetOrigin()[0], > itkimage.GetOrigin()[1], itkimage.GetOrigin()[2]) > reslice.SetOutputOrigin(0, 0, 0) > reslice.SetOutputSpacing(itkimage.GetSpacing()[0], > itkimage.GetSpacing()[1], itkimage.GetSpacing()[2]) > if prf_params[0] in ['depth']: > reslice.SetOutputExtent(0, itkimage.GetDepth()-1, 0, 0, 0, > 0) # this gives one line of output > if prf_params[0] in ['inline']: > reslice.SetOutputExtent(0, 0, 0, itkimage.GetHeight()-1, 0, > 0) # this gives one line of output > if prf_params[0] in ['crossline']: > reslice.SetOutputExtent(0, 0, 0, 0, 0, > itkimage.GetWidth()-1) # this gives one line of output > reslice.SetInterpolationModeToLinear() > reslice.SetResliceAxes(oM2) > reslice.Update() > vtkimage2 = reslice.GetOutput() > > print vtkimage2 > > numpy_data = > numpy_support.vtk_to_numpy(vtkimage2.GetPointData().GetScalars()) > > print numpy_data > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jellby at yahoo.com Sun Feb 4 03:45:44 2018 From: jellby at yahoo.com (=?UTF-8?Q?Ignacio_Fern=c3=a1ndez_Galv=c3=a1n?=) Date: Sun, 4 Feb 2018 09:45:44 +0100 Subject: [vtkusers] Oriented vtkCubeAxesActor issues In-Reply-To: <5f0d6ba4-3b72-35dd-6e16-ba2410d6f004@yahoo.com> References: <5f0d6ba4-3b72-35dd-6e16-ba2410d6f004@yahoo.com> Message-ID: <96b0919f-555e-7644-9dcc-a499664409ca@yahoo.com> On 03/02/18, at 19:29, Ignacio Fern?ndez Galv?n via vtkusers wrote: > Hi, > > This was apparently mentioned some time ago > (http://vtk.1045678.n5.nabble.com/oriented-vtkCubeAxesActor-issue-td5726648.html), > but there was no solution, and I think I'm having the same problem. > > Basically, I set up a vtkCubeAxesActor with custom range: > > ??? axes = vtk.vtkCubeAxesActor() > ??? axes.SetCamera(renderer.GetActiveCamera()) > ??? axes.SetAxisBaseForX(1,0,0) > ??? axes.SetAxisBaseForY(0,1,0) > ??? axes.SetAxisBaseForZ(0,0,1) > ??? axes.SetBounds(0,10,0,10,0,10) > ??? axes.SetOrientedBounds(0,10,0,10,0,10) > ??? axes.SetUseOrientedBounds(1) > ??? axes.SetXAxisRange(0,1) > ??? renderer.AddActor(axes) > > I set the "BaseFor" axes to the Cartesian ones, so the actor should look > the same with "UseOrientedBounds" or without. But with oriented bounds I > get an X axis labeled from 0 to 10, while without it it's 0 to 1, as I > requested. > > Also, if I use the oriented bounds and do not set the bounds, there is > some clipping, as if the renderer didn't notice the actor's real extent. > > In the thread linked above, it was mentioned that this is done correctly > in Paraview. Is it really so? How can I test it? > > My ultimate goal is to show the outline of a transformed ImageData grid, > with ticks marking the gridpoints on the outline. Is there some other > way to achieve that? (I have the outline as a transformed box, I'm just > missing the ticks. So in fact I would also like to disable the axis line > in the vtkCubeAxesActor and leave the ticks...) Going one level down, I tried with vtkAxisActor: - Like vtkCubeAxesActor, it seems impervious to SetUserTransform. - Like vtkCubeAxesActor, not setting the bounds results in clipping issues, but I guess that's intended. - I can't set the lines to translucent. Get*Property().SetOpacity(x), for any x<1.0 makes the lines disappear, as if the x is interpreted as an integer (I'm using the python wrapper, if it matters). SetColor works fine. I also noticed that the automatic positioning of vtkCubeAxesActor get's confused if one used a too distorted frame, or exchanges some axes (with the "BaseFor" axes): in some orientations the axes end up in the wrong side. It looks like there are some hardcoded assumptions about where x, y and z are. These all look like bugs or limitations to me. Is it worth reporting them on gitlab? Ignacio From robertsawko at gmail.com Mon Feb 5 04:35:24 2018 From: robertsawko at gmail.com (Robert Sawko) Date: Mon, 5 Feb 2018 09:35:24 +0000 Subject: [vtkusers] Parallel pipeline based on vtkConnectivityFilter Message-ID: <20180205093524.GA10042@avignon> Hi, I am trying to write a parallel variant of a VTK serial pipeline I wrote couple of weeks back and I would appreciate a little steer from more experienced users, if that's all right. My data contains some disjoint surfaces and my serial pipeline iterates over them with vtkConnectivityFilter and if the surface is closed it computes volume and surface area. Now I have lots and lots of these surfaces. I am reading about vtk parallel pipelines, I went through a XMLPWriter example and it all seems to fit, but I am still not sure how to do it. Do I need to write to a partitioned format? Or can I just spawn parallel pipeline on top of a threshold filter? Ideally, I would like to avoid further I/O as I am already straining it needlessly. Please advise. My serial code with comments below. Robert vtkSmartPointer connectivity = vtkSmartPointer::New(); connectivity->SetInputConnection(reader->GetOutputPort()); connectivity->SetExtractionModeToSpecifiedRegions(); connectivity->Update(); // PARALLEL: I could add vtkThreshold here and divide it up based on // RegionID. vtkSmartPointer geometry = vtkSmartPointer::New(); geometry->SetInputConnection(connectivity->GetOutputPort()); geometry->Update(); vtkSmartPointer mass = vtkSmartPointer::New(); mass->SetInputConnection(geometry->GetOutputPort()); // PARALLEL: I could have MPI rank here and just do a process-specific // porition for (int i = 0; i < connectivity->GetNumberOfExtractedRegions(); i++) { connectivity->AddSpecifiedRegion(i); //check if closed mass->Update(); float V = mass->GetVolume(); float A = mass->GetSurfaceArea(); // write V and A to file connectivity->DeleteSpecifiedRegion(i); } -- Probability is confusing: http://en.wikipedia.org/wiki/Bertrand_paradox_(probability) This is why we need sigma-algebras! From berti_krueger at hotmail.com Mon Feb 5 05:00:16 2018 From: berti_krueger at hotmail.com (=?utf-8?B?QmVydGkgS3LDvGdlcg==?=) Date: Mon, 5 Feb 2018 10:00:16 +0000 Subject: [vtkusers] vtkBoxWidget handle size intented behaviour? Message-ID: Hello Everyone! I am currently using a vtkBoxWidget in my project (VTK 8.1). After i created the vtkBoxWidget, the size handles (= vtkSphereActors) have not been picked yet and are small and nice. But, when I resize the vtkBoxWidget (smaller or larger, it doesn't matter) or simply click on it, the handles get bigger (radius increases) and stay this way. They sometimes tend to get so large that they are piercing the mesh and visually adding themselves to it, which is annoying. And they never get smaller again, sometimes they get even larger. When i zoom out by large amount and then zoom in again, the handles get normal ( = small) again. Is this the intented behaviour, and if so, what is the purpose of it or is it a bug ? Thank you very much in advance. Berti Kr?ger From robertsawko at gmail.com Mon Feb 5 07:24:58 2018 From: robertsawko at gmail.com (Robert Sawko) Date: Mon, 5 Feb 2018 12:24:58 +0000 Subject: [vtkusers] Compiling VTK on X11-less system Message-ID: <20180205122458.GA23063@avignon> Hello, Is it possible to run VTK applications on a cluster with compute nodes but without X11? This is bound to be possible as Paraview can work in such a configuration using EGL as a backend for rendering. I am looking for a similar setup with pure VTK. I have an idea for several applications that could take advantage of running in parallel or with powerful GPUs, but I do not want to get involved with X11 installation on compute nodes. Please advise, Robert -- The largest of the large numbers https://www.youtube.com/watch?v=HX8bihEe3nA&feature=youtu.be https://www.youtube.com/watch?v=GuigptwlVHo From dan.lipsa at kitware.com Mon Feb 5 09:56:34 2018 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 5 Feb 2018 09:56:34 -0500 Subject: [vtkusers] Compiling VTK on X11-less system In-Reply-To: <20180205122458.GA23063@avignon> References: <20180205122458.GA23063@avignon> Message-ID: Robert, Yes it is possible. See https://blog.kitware.com/off-screen-rendering-through-the-native-platform-interface-egl/ Note the cmake variables may have changed slightly. There is a link at the end of the blog to an up to date list of variables. Dan On Mon, Feb 5, 2018 at 7:24 AM, Robert Sawko wrote: > Hello, > > Is it possible to run VTK applications on a cluster with compute nodes but > without X11? This is bound to be possible as Paraview can work in such a > configuration using EGL as a backend for rendering. I am looking for a > similar > setup with pure VTK. > > I have an idea for several applications that could take advantage of > running > in parallel or with powerful GPUs, but I do not want to get involved with > X11 > installation on compute nodes. > > Please advise, > Robert > -- > The largest of the large numbers > https://www.youtube.com/watch?v=HX8bihEe3nA&feature=youtu.be > https://www.youtube.com/watch?v=GuigptwlVHo > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Feb 5 11:54:07 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 5 Feb 2018 09:54:07 -0700 Subject: [vtkusers] Oriented vtkCubeAxesActor issues In-Reply-To: <96b0919f-555e-7644-9dcc-a499664409ca@yahoo.com> References: <5f0d6ba4-3b72-35dd-6e16-ba2410d6f004@yahoo.com> <96b0919f-555e-7644-9dcc-a499664409ca@yahoo.com> Message-ID: Hi Ignacio, I've never tried the any of the "BaseFor" or "OrientedBounds" methods for this class, but I did a quick look through the vtkAxisActor.cxx code and I can confirm that UserTransform is ignored. The vtkAxisActor is actually a collection of other actors (for the text, the ticks, the axis line, etc etc). Most attributes of these child actors are not set when you set attributes of the vtkAxisActor. That's why the UserTransform is ignored. It might be tricky to get the UserTransform working properly. The *BaseFor* methods might way to reorient the axes. This might also be related why setting Opacity < 1.0 causes the axes to vanish. The VTK renderer uses separate render passes for opaque object vs. translucent objects, and if the pass for the main vtkAxisActor is different from its children, maybe that messes up the rendering? It's just a guess, though. - David On Sun, Feb 4, 2018 at 1:45 AM, Ignacio Fern?ndez Galv?n via vtkusers < vtkusers at vtk.org> wrote: > On 03/02/18, at 19:29, Ignacio Fern?ndez Galv?n via vtkusers wrote: > >> Hi, >> >> This was apparently mentioned some time ago ( >> http://vtk.1045678.n5.nabble.com/oriented-vtkCubeAxesActor- >> issue-td5726648.html), but there was no solution, and I think I'm having >> the same problem. >> >> Basically, I set up a vtkCubeAxesActor with custom range: >> >> axes = vtk.vtkCubeAxesActor() >> axes.SetCamera(renderer.GetActiveCamera()) >> axes.SetAxisBaseForX(1,0,0) >> axes.SetAxisBaseForY(0,1,0) >> axes.SetAxisBaseForZ(0,0,1) >> axes.SetBounds(0,10,0,10,0,10) >> axes.SetOrientedBounds(0,10,0,10,0,10) >> axes.SetUseOrientedBounds(1) >> axes.SetXAxisRange(0,1) >> renderer.AddActor(axes) >> >> I set the "BaseFor" axes to the Cartesian ones, so the actor should look >> the same with "UseOrientedBounds" or without. But with oriented bounds I >> get an X axis labeled from 0 to 10, while without it it's 0 to 1, as I >> requested. >> >> Also, if I use the oriented bounds and do not set the bounds, there is >> some clipping, as if the renderer didn't notice the actor's real extent. >> >> In the thread linked above, it was mentioned that this is done correctly >> in Paraview. Is it really so? How can I test it? >> >> My ultimate goal is to show the outline of a transformed ImageData grid, >> with ticks marking the gridpoints on the outline. Is there some other way >> to achieve that? (I have the outline as a transformed box, I'm just missing >> the ticks. So in fact I would also like to disable the axis line in the >> vtkCubeAxesActor and leave the ticks...) >> > > > Going one level down, I tried with vtkAxisActor: > > - Like vtkCubeAxesActor, it seems impervious to SetUserTransform. > > - Like vtkCubeAxesActor, not setting the bounds results in clipping > issues, but I guess that's intended. > > - I can't set the lines to translucent. Get*Property().SetOpacity(x), for > any x<1.0 makes the lines disappear, as if the x is interpreted as an > integer (I'm using the python wrapper, if it matters). SetColor works fine. > > I also noticed that the automatic positioning of vtkCubeAxesActor get's > confused if one used a too distorted frame, or exchanges some axes (with > the "BaseFor" axes): in some orientations the axes end up in the wrong > side. It looks like there are some hardcoded assumptions about where x, y > and z are. > > These all look like bugs or limitations to me. Is it worth reporting them > on gitlab? > > > Ignacio > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Feb 5 12:03:07 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 5 Feb 2018 10:03:07 -0700 Subject: [vtkusers] Oriented vtkCubeAxesActor issues In-Reply-To: References: <5f0d6ba4-3b72-35dd-6e16-ba2410d6f004@yahoo.com> <96b0919f-555e-7644-9dcc-a499664409ca@yahoo.com> Message-ID: On Mon, Feb 5, 2018 at 9:54 AM, David Gobbi wrote: I've never tried the any of the "BaseFor" or "OrientedBounds" methods for > this class, but I did a quick look through the vtkAxisActor.cxx code and I > can confirm that UserTransform is ignored. The vtkAxisActor is actually a > collection of other actors (for the text, the ticks, the axis line, etc > etc). Most attributes of these child actors are not set when you set > attributes of the vtkAxisActor. That's why the UserTransform is ignored. > It might be tricky to get the UserTransform working properly. The *BaseFor* > methods might way to reorient the axes. > Apologies for the typo: I meant the *BaseFor* methods might be the only way to reorient the axes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.john.parker at googlemail.com Mon Feb 5 12:08:30 2018 From: andy.john.parker at googlemail.com (Andrew Parker) Date: Mon, 5 Feb 2018 17:08:30 +0000 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: Andy, Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of me get your modifications to work from your vtk_test.C. I've included the vtkmpiController stuff after I init mpi myself. I found the migration problem mentioned here: https://github.com/libMesh/libmesh/issues/1179 and here: https://gitlab.kitware.com/vtk/vtk/issues/16924 as well as this post. My parallel unstructured grid now only contains one source within the piece section of the pvtu, as opposed to n-processor sources (all processors have real data to write and this is not a case of empty meshes on these processors). I can re-link and recompile against 6.3 and the problem goes away and I get the correct number of sources written to the pvtu file as before. Can you help? I make extensive use of pvtu files from my mpi-based code and now all grid files (pvtu and pvtp) have stopped working just by moving to 7.1.1 (which has been built with mpi-enabled). Any thoughts? Thanks, Andy On 6 December 2016 at 16:12, Andy Bauer wrote: > Hi John, > > The issue is indeed due to changes that I mentioned before (i.e. only data > sets that have data get written out and the .pvtu file is adjusted > accordingly). With this change though interprocess communication is > required which is done the the vtkMultiProcessController::GetGlobalController() > object which essentially acts as MPI_COMM_WORLD within VTK. You need to > create a vtkMPIController which derives from vtkMultiProcessController. See > the attached files for how that is done. This should also be backwards > compatible but if it isn't, please let us know. > > Best, > Andy > > ps. Ignore the ADIOS stuff in there (it's commented out). I was trying to > do two things at once and that's why the ADIOS stuff is in the > CMakeLists.txt. > > On Mon, Dec 5, 2016 at 6:06 PM, John Peterson > wrote: > >> >> >> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer >> wrote: >> >>> Beyond this I can't think of any change off the top of my head that >>> would cause your issue. I looked at the repo but can't figure out the VTK >>> configurations from that. If you can share a simple test case which >>> demonstrates the issue I may be able to easily diagnose it. >>> >> >> Here's a standalone test code that reproduces the issue for me: >> >> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b14ee1d7 >> >> Run on two procs with: mpiexec -np 2 and I get the following test.pvtu >> file: >> >> >>> >> byte_order="LittleEndian" header_type="UInt32" >>> compressor="vtkZLibDataCompressor"> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> >> As you can see, only one "Piece Source" is listed, but the output of the >> program is actually all 3 files (test.pvtu, test_0.vtu, test_1.vtu) and >> both the _0 and _1 files have nodes in them. Furthermore, if I simply add >> a second "Piece Source" line corresponding to "test_1.vtu", the whole thing >> opens up just fine in Paraview. I am a novice VTK programmer so it's very >> possible I'm doing something wrong, but this code definitely worked in VTK >> 6.x, and 7.0. >> >> Thanks for your help, >> John >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 andy.bauer at kitware.com Mon Feb 5 13:07:26 2018 From: andy.bauer at kitware.com (Andy Bauer) Date: Mon, 5 Feb 2018 13:07:26 -0500 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: Are you using libMesh or another simulation code? You'll definitely need the following to tell each process what piece it has: pwriter->SetNumberOfPieces(nprocs); pwriter->SetStartPiece(rank); pwriter->SetEndPiece(rank); pwriter->Write(); Can you share the portion of your code that uses vtkXMLPUnstructuredGridWriter? Also, looking at the data files from 6.3 and 7.1.1 may help. Thanks, Andy On Mon, Feb 5, 2018 at 12:08 PM, Andrew Parker < andy.john.parker at googlemail.com> wrote: > Andy, > > Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of me get > your modifications to work from your vtk_test.C. I've included the > vtkmpiController stuff after I init mpi myself. I found the migration > problem mentioned here: > > https://github.com/libMesh/libmesh/issues/1179 > > and here: > > https://gitlab.kitware.com/vtk/vtk/issues/16924 > > as well as this post. My parallel unstructured grid now only contains one > source within the piece section of the pvtu, as opposed to n-processor > sources (all processors have real data to write and this is not a case of > empty meshes on these processors). I can re-link and recompile against 6.3 > and the problem goes away and I get the correct number of sources written > to the pvtu file as before. Can you help? I make extensive use of pvtu > files from my mpi-based code and now all grid files (pvtu and pvtp) have > stopped working just by moving to 7.1.1 (which has been built with > mpi-enabled). > > Any thoughts? > > Thanks, > Andy > > > On 6 December 2016 at 16:12, Andy Bauer wrote: > >> Hi John, >> >> The issue is indeed due to changes that I mentioned before (i.e. only >> data sets that have data get written out and the .pvtu file is adjusted >> accordingly). With this change though interprocess communication is >> required which is done the the vtkMultiProcessController::GetGlobalController() >> object which essentially acts as MPI_COMM_WORLD within VTK. You need to >> create a vtkMPIController which derives from vtkMultiProcessController. See >> the attached files for how that is done. This should also be backwards >> compatible but if it isn't, please let us know. >> >> Best, >> Andy >> >> ps. Ignore the ADIOS stuff in there (it's commented out). I was trying to >> do two things at once and that's why the ADIOS stuff is in the >> CMakeLists.txt. >> >> On Mon, Dec 5, 2016 at 6:06 PM, John Peterson >> wrote: >> >>> >>> >>> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer >>> wrote: >>> >>>> Beyond this I can't think of any change off the top of my head that >>>> would cause your issue. I looked at the repo but can't figure out the VTK >>>> configurations from that. If you can share a simple test case which >>>> demonstrates the issue I may be able to easily diagnose it. >>>> >>> >>> Here's a standalone test code that reproduces the issue for me: >>> >>> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b14ee1d7 >>> >>> Run on two procs with: mpiexec -np 2 and I get the following test.pvtu >>> file: >>> >>> >>>> >>> byte_order="LittleEndian" header_type="UInt32" >>>> compressor="vtkZLibDataCompressor"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >>> As you can see, only one "Piece Source" is listed, but the output of the >>> program is actually all 3 files (test.pvtu, test_0.vtu, test_1.vtu) and >>> both the _0 and _1 files have nodes in them. Furthermore, if I simply add >>> a second "Piece Source" line corresponding to "test_1.vtu", the whole thing >>> opens up just fine in Paraview. I am a novice VTK programmer so it's very >>> possible I'm doing something wrong, but this code definitely worked in VTK >>> 6.x, and 7.0. >>> >>> Thanks for your help, >>> John >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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 stephen.langer at nist.gov Mon Feb 5 13:36:23 2018 From: stephen.langer at nist.gov (Langer, Stephen A. (Fed)) Date: Mon, 5 Feb 2018 18:36:23 +0000 Subject: [vtkusers] clipping question In-Reply-To: References: Message-ID: <851C93BF-54F1-4A20-A633-51FEE0D059F8@nist.gov> Hi Bill -- Sure, please go ahead and put that example in the repository. You might want to change the initial comment which doesn?t need to refer to the program that motivated the example. There's also at least one unnecessary #include, vtkRenderStepsPass.h, left over from the program this was extracted from. I do still have a question about clipping, though. The solution you provided solves the problem for image based grids, but not if I'm also trying to visualize an unstructured grid. What should I do if I also have a grid of tetrahedra, as in the attached example? Are vtkClipDataSet or vtkTableBasedClipDataSet the wrong tools to use for that? Thanks, Steve ?On 2/2/18, 7:58 PM, "Bill Lorensen" wrote: These clip filters depend on the resolution size, I modified your example to use a higher resolution image. I'd like to add this to the VTKExaamples repo if is OK with you. I will acknowledge your contribution. Bill On Fri, Feb 2, 2018 at 12:37 PM, Langer, Stephen A. (Fed) wrote: > Hi -- > > When using vtkTableBasedClipDataSet to apply two more more clipping planes to a grid, I'm seeing incorrect results along the line where the planes meet. I've attached a simple program that demonstrates the problem and a screenshot of the output. The program generates a vtkRectilinearGrid and pipes it through vtkTableBasedClipDataSet with its clip function set to two perpendicular planes. The result should have a concave right angle, but diagonal facets appear instead. > > I've tried using vtkClipDataSet instead, but it just gives different wrong answers, although it does work correctly when the clipping planes lie exactly along a row of nodes in the grid. vtkTableBasedClipDataSet draws diagonal facets across cells in that case. > > What am I doing wrong? > > Thanks. > > -- Steve > > > _______________________________________________ > Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Cstephen.langer%40nist.gov%7Cfcc16ead7ad7481ca41f08d56aa1434f%7C2046e5e15ac543e384f33cedc35a5eb2%7C1%7C0%7C636532163230734712&sdata=tAz3a4Jk%2FyPrYc0xeMpXakUiRJGGag4i%2FdXbTo6L%2BiQ%3D&reserved=0 > > Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cstephen.langer%40nist.gov%7Cfcc16ead7ad7481ca41f08d56aa1434f%7C2046e5e15ac543e384f33cedc35a5eb2%7C1%7C0%7C636532163230734712&sdata=FB%2BONsXr37AV0KmNhnoX1b3R1Upv9%2Fiuzj3r3xfDGsM%3D&reserved=0 > > Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Cstephen.langer%40nist.gov%7Cfcc16ead7ad7481ca41f08d56aa1434f%7C2046e5e15ac543e384f33cedc35a5eb2%7C1%7C0%7C636532163230734712&sdata=5kAM5O8ESw53wjtEQrka%2FKVPCOOdAb6OR97yYl9KnbM%3D&reserved=0 > > Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7Cfcc16ead7ad7481ca41f08d56aa1434f%7C2046e5e15ac543e384f33cedc35a5eb2%7C1%7C0%7C636532163230734712&sdata=AjuJXq0JIwN9YpEi%2FBr8Ia7frjoZZdcoVIX8kx8%2Fr%2F0%3D&reserved=0 > > Follow this link to subscribe/unsubscribe: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7Cfcc16ead7ad7481ca41f08d56aa1434f%7C2046e5e15ac543e384f33cedc35a5eb2%7C1%7C0%7C636532163230734712&sdata=bVPXd1z26JSmjAHkKq0d1pc%2F8KDM3PSogLPJD0LtXqY%3D&reserved=0 > -- Unpaid intern in BillsParadise at noware dot com -------------- next part -------------- A non-text attachment was scrubbed... Name: clipMesh.cxx Type: application/octet-stream Size: 6180 bytes Desc: clipMesh.cxx URL: From andy.john.parker at googlemail.com Mon Feb 5 13:40:25 2018 From: andy.john.parker at googlemail.com (Andrew Parker) Date: Mon, 05 Feb 2018 18:40:25 +0000 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: Andy, My own code. I?ve always had those Piece lines in my src from day one, and always used it via mpi, so don?t need added. All procs call all lines in my file writer. There is no if-master-section. Literally just a vtk version number change that causes the problem. Can?t get the data files or the cut down source until tomorrow. I shared the other two links as those in addition to this post are the only places I can find that reference such a major change to the library that is undocumented and causes such a significant change to user code. Are there any further references on this change that I can read about to try to resolve this? I find it strange that this has not come up more. It would mean all users of 7.1 without the additional vtkmpicontroller lines would fail when calling a parallel writer from a parallel mpi-user-code.... Cheers, Andy On Mon, 5 Feb 2018 at 18:07, Andy Bauer wrote: > Are you using libMesh or another simulation code? You'll definitely need > the following to tell each process what piece it has: > pwriter->SetNumberOfPieces(nprocs); > > pwriter->SetStartPiece(rank); > > pwriter->SetEndPiece(rank); > > pwriter->Write(); > > Can you share the portion of your code that uses > vtkXMLPUnstructuredGridWriter? Also, looking at the data files from 6.3 and > 7.1.1 may help. > > Thanks, > Andy > > > On Mon, Feb 5, 2018 at 12:08 PM, Andrew Parker < > andy.john.parker at googlemail.com> wrote: > >> Andy, >> >> Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of me get >> your modifications to work from your vtk_test.C. I've included the >> vtkmpiController stuff after I init mpi myself. I found the migration >> problem mentioned here: >> >> https://github.com/libMesh/libmesh/issues/1179 >> >> and here: >> >> https://gitlab.kitware.com/vtk/vtk/issues/16924 >> >> as well as this post. My parallel unstructured grid now only contains >> one source within the piece section of the pvtu, as opposed to n-processor >> sources (all processors have real data to write and this is not a case of >> empty meshes on these processors). I can re-link and recompile against 6.3 >> and the problem goes away and I get the correct number of sources written >> to the pvtu file as before. Can you help? I make extensive use of pvtu >> files from my mpi-based code and now all grid files (pvtu and pvtp) have >> stopped working just by moving to 7.1.1 (which has been built with >> mpi-enabled). >> >> Any thoughts? >> >> Thanks, >> Andy >> >> >> On 6 December 2016 at 16:12, Andy Bauer wrote: >> >>> Hi John, >>> >>> The issue is indeed due to changes that I mentioned before (i.e. only >>> data sets that have data get written out and the .pvtu file is adjusted >>> accordingly). With this change though interprocess communication is >>> required which is done the the >>> vtkMultiProcessController::GetGlobalController() object which essentially >>> acts as MPI_COMM_WORLD within VTK. You need to create a vtkMPIController >>> which derives from vtkMultiProcessController. See the attached files for >>> how that is done. This should also be backwards compatible but if it isn't, >>> please let us know. >>> >>> Best, >>> Andy >>> >>> ps. Ignore the ADIOS stuff in there (it's commented out). I was trying >>> to do two things at once and that's why the ADIOS stuff is in the >>> CMakeLists.txt. >>> >>> On Mon, Dec 5, 2016 at 6:06 PM, John Peterson >>> wrote: >>> >>>> >>>> >>>> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer >>>> wrote: >>>> >>>>> Beyond this I can't think of any change off the top of my head that >>>>> would cause your issue. I looked at the repo but can't figure out the VTK >>>>> configurations from that. If you can share a simple test case which >>>>> demonstrates the issue I may be able to easily diagnose it. >>>>> >>>> >>>> Here's a standalone test code that reproduces the issue for me: >>>> >>>> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b14ee1d7 >>>> >>>> Run on two procs with: mpiexec -np 2 and I get the following test.pvtu >>>> file: >>>> >>>> >>>>> >>>> byte_order="LittleEndian" header_type="UInt32" >>>>> compressor="vtkZLibDataCompressor"> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> As you can see, only one "Piece Source" is listed, but the output of >>>> the program is actually all 3 files (test.pvtu, test_0.vtu, test_1.vtu) and >>>> both the _0 and _1 files have nodes in them. Furthermore, if I simply add >>>> a second "Piece Source" line corresponding to "test_1.vtu", the whole thing >>>> opens up just fine in Paraview. I am a novice VTK programmer so it's very >>>> possible I'm doing something wrong, but this code definitely worked in VTK >>>> 6.x, and 7.0. >>>> >>>> Thanks for your help, >>>> John >>>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> 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 gregthom992 at gmail.com Mon Feb 5 14:44:08 2018 From: gregthom992 at gmail.com (gregthom992) Date: Mon, 5 Feb 2018 12:44:08 -0700 (MST) Subject: [vtkusers] probe volume with thick line ( intensity profile with line radius or thickness ) In-Reply-To: References: <1517639878557-0.post@n5.nabble.com> <1517700831098-0.post@n5.nabble.com> <1517721413162-0.post@n5.nabble.com> Message-ID: <1517859848740-0.post@n5.nabble.com> Thanks for explaining all that magic. My application works as expected for now. GT -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Mon Feb 5 14:51:35 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 5 Feb 2018 12:51:35 -0700 Subject: [vtkusers] probe volume with thick line ( intensity profile with line radius or thickness ) In-Reply-To: <1517859848740-0.post@n5.nabble.com> References: <1517639878557-0.post@n5.nabble.com> <1517700831098-0.post@n5.nabble.com> <1517721413162-0.post@n5.nabble.com> <1517859848740-0.post@n5.nabble.com> Message-ID: Glad to hear things are working. Note that itkResampleImageFilter can be used in much the same way. Cheers, - David ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Tue Feb 6 02:39:03 2018 From: julien.jomier at kitware.com (Julien Jomier) Date: Tue, 6 Feb 2018 08:39:03 +0100 Subject: [vtkusers] [ANN] CMake Training Course in Singapore - March 27-28 In-Reply-To: <2d50072b-a62a-a58a-19a2-dd2747a38b39@kitware.com> References: <2d50072b-a62a-a58a-19a2-dd2747a38b39@kitware.com> Message-ID: <8f00f380-bba3-4436-c368-4d97dfb7cdb6@kitware.com> Kitware will be holding a CMake training course on March 27 and 28, 2018 in Singapore. This two-days course will cover the best practice for CMake, CTest, CPack and CDash as well as advanced features of the tool Please visit our website for more information and registration details: https://training.kitware.fr/browse/182 Note that the course will be taught in English. If you have any questions, please contact us at training at kitware.fr or email me directly. We are looking forward to seeing you in Singapore, Julien -- Kitware SAS 26 rue Louis Gu?rin 69100 Villeurbanne, France http://www.kitware.eu From robertsawko at gmail.com Tue Feb 6 04:11:10 2018 From: robertsawko at gmail.com (Robert Sawko) Date: Tue, 6 Feb 2018 09:11:10 +0000 Subject: [vtkusers] Compiling VTK on X11-less system In-Reply-To: References: <20180205122458.GA23063@avignon> Message-ID: <20180206091110.GA3053@avignon> Thanks Dan, I was actually aware of that article, but I misread it as ParaView only. For anyone looking for a similar build, this is what worked for me at VTK version 8.1.0 on RHEL with NVIDIA drivers installed. I also required MPI: #!/bin/bash rm -rf build/* cd build install_path=~/apps/vtk/8.1.0 cmake \ -DVTK_OPENGL_HAS_EGL=YES \ -DVTK_USE_X=NO \ -DVTK_Group_MPI=ON \ -DVTK_RENDERING_BACKEND=OpenGL2 \ -DEGL_LIBRARY=/usr/lib64/nvidia/libEGL.so \ -DEGL_opengl_LIBRARY=/usr/lib64/nvidia/libOpenGL.so \ -DCMAKE_INSTALL_PREFIX=$install_path \ ../ Best wishes, Robert -- Lucy in the sky http://www.cfa.harvard.edu/news/archive/pr0407.html http://news.bbc.co.uk/1/hi/sci/tech/3492919.stm From andy.john.parker at googlemail.com Tue Feb 6 04:49:09 2018 From: andy.john.parker at googlemail.com (Andrew Parker) Date: Tue, 6 Feb 2018 09:49:09 +0000 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: Andy, To follow up. So this is a direct copy of my source for writing vtu in parallel via mpi, no edits: vtkSmartPointer pwriter = vtkSmartPointer::New(); std::stringstream sss; sss << outputDirectory << "/"; sss << outputPrefix; sss << "Parts"; sss << ".pvtu"; pwriter->SetFileName(sss.str().c_str()); pwriter->SetNumberOfPieces(comms.Size()); if(comms.IsParallel()) pwriter->SetGhostLevel(1); pwriter->SetStartPiece(comms.Rank()); pwriter->SetEndPiece(comms.Rank()); pwriter->SetInputData(cellGrid); // pwriter->SetDataModeToAscii(); pwriter->SetDataModeToBinary(); pwriter->SetCompressorTypeToZLib(); pwriter->Write(); and for vtp files in parallel via mpi, no edits: vtkSmartPointer pwriter = vtkSmartPointer::New(); std::stringstream sss; sss << outputDirectory << "/"; sss << outputPrefix; sss << bcName << "_"; sss << prefix; sss << ".pvtp"; std::cout << "Output file name: " << sss.str().c_str() << std::endl; pwriter->SetFileName(sss.str().c_str()); pwriter->SetNumberOfPieces(comms->Size()); if(comms->IsParallel()) pwriter->SetGhostLevel(1); pwriter->SetStartPiece(comms->Rank()); pwriter->SetEndPiece(comms->Rank()); pwriter->SetInputData(boundingFaceGrids[i]); pwriter->SetDataModeToBinary(); //pwriter->SetDataModeToAscii(); pwriter->SetCompressorTypeToZLib(); pwriter->Write(); I initialise the vtk-comms object in an identical way to your demo code, after my own mpi-comms, and I finalize before I finalize mine. In between those calls the above source is called. All processors partake in all calls both to init the vtk-mpi and in the above writing. Do you have any further thoughts as to the problem? Problem goes away if I use 6.3.... Cheers, Andy On 5 February 2018 at 18:40, Andrew Parker wrote: > Andy, > > My own code. I?ve always had those Piece lines in my src from day one, and > always used it via mpi, so don?t need added. All procs call all lines in my > file writer. There is no if-master-section. Literally just a vtk version > number change that causes the problem. Can?t get the data files or the cut > down source until tomorrow. > > I shared the other two links as those in addition to this post are the > only places I can find that reference such a major change to the library > that is undocumented and causes such a significant change to user code. Are > there any further references on this change that I can read about to try to > resolve this? > > I find it strange that this has not come up more. It would mean all users > of 7.1 without the additional vtkmpicontroller lines would fail when > calling a parallel writer from a parallel mpi-user-code.... > > Cheers, > Andy > > On Mon, 5 Feb 2018 at 18:07, Andy Bauer wrote: > >> Are you using libMesh or another simulation code? You'll definitely need >> the following to tell each process what piece it has: >> pwriter->SetNumberOfPieces(nprocs); >> >> pwriter->SetStartPiece(rank); >> >> pwriter->SetEndPiece(rank); >> >> pwriter->Write(); >> >> Can you share the portion of your code that uses >> vtkXMLPUnstructuredGridWriter? Also, looking at the data files from 6.3 and >> 7.1.1 may help. >> >> Thanks, >> Andy >> >> >> On Mon, Feb 5, 2018 at 12:08 PM, Andrew Parker < >> andy.john.parker at googlemail.com> wrote: >> >>> Andy, >>> >>> Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of me get >>> your modifications to work from your vtk_test.C. I've included the >>> vtkmpiController stuff after I init mpi myself. I found the migration >>> problem mentioned here: >>> >>> https://github.com/libMesh/libmesh/issues/1179 >>> >>> and here: >>> >>> https://gitlab.kitware.com/vtk/vtk/issues/16924 >>> >>> as well as this post. My parallel unstructured grid now only contains >>> one source within the piece section of the pvtu, as opposed to n-processor >>> sources (all processors have real data to write and this is not a case of >>> empty meshes on these processors). I can re-link and recompile against 6.3 >>> and the problem goes away and I get the correct number of sources written >>> to the pvtu file as before. Can you help? I make extensive use of pvtu >>> files from my mpi-based code and now all grid files (pvtu and pvtp) have >>> stopped working just by moving to 7.1.1 (which has been built with >>> mpi-enabled). >>> >>> Any thoughts? >>> >>> Thanks, >>> Andy >>> >>> >>> On 6 December 2016 at 16:12, Andy Bauer wrote: >>> >>>> Hi John, >>>> >>>> The issue is indeed due to changes that I mentioned before (i.e. only >>>> data sets that have data get written out and the .pvtu file is adjusted >>>> accordingly). With this change though interprocess communication is >>>> required which is done the the vtkMultiProcessController::GetGlobalController() >>>> object which essentially acts as MPI_COMM_WORLD within VTK. You need to >>>> create a vtkMPIController which derives from vtkMultiProcessController. See >>>> the attached files for how that is done. This should also be backwards >>>> compatible but if it isn't, please let us know. >>>> >>>> Best, >>>> Andy >>>> >>>> ps. Ignore the ADIOS stuff in there (it's commented out). I was trying >>>> to do two things at once and that's why the ADIOS stuff is in the >>>> CMakeLists.txt. >>>> >>>> On Mon, Dec 5, 2016 at 6:06 PM, John Peterson >>>> wrote: >>>> >>>>> >>>>> >>>>> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer >>>>> wrote: >>>>> >>>>>> Beyond this I can't think of any change off the top of my head that >>>>>> would cause your issue. I looked at the repo but can't figure out the VTK >>>>>> configurations from that. If you can share a simple test case which >>>>>> demonstrates the issue I may be able to easily diagnose it. >>>>>> >>>>> >>>>> Here's a standalone test code that reproduces the issue for me: >>>>> >>>>> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b14ee1d7 >>>>> >>>>> Run on two procs with: mpiexec -np 2 and I get the following test.pvtu >>>>> file: >>>>> >>>>> >>>>>> >>>>> byte_order="LittleEndian" header_type="UInt32" compressor=" >>>>>> vtkZLibDataCompressor"> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> NumberOfComponents="3"/> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> As you can see, only one "Piece Source" is listed, but the output of >>>>> the program is actually all 3 files (test.pvtu, test_0.vtu, test_1.vtu) and >>>>> both the _0 and _1 files have nodes in them. Furthermore, if I simply add >>>>> a second "Piece Source" line corresponding to "test_1.vtu", the whole thing >>>>> opens up just fine in Paraview. I am a novice VTK programmer so it's very >>>>> possible I'm doing something wrong, but this code definitely worked in VTK >>>>> 6.x, and 7.0. >>>>> >>>>> Thanks for your help, >>>>> John >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at http://www.kitware.com/ >>>> opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> 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 rppatil3210 at gmail.com Tue Feb 6 06:13:24 2018 From: rppatil3210 at gmail.com (rohit) Date: Tue, 6 Feb 2018 04:13:24 -0700 (MST) Subject: [vtkusers] How to read Particular Series from DICOM Study Message-ID: <1517915604552-0.post@n5.nabble.com> Hello All, I am developing a volume rendering application using JAVA which is already done, but I am facing problem if DICOM study has multiple series in it how to read particular series from that if I got series instance uid. right now I am using vtkDICOMImageReader to read images from folder. Please help me out on this. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From andy.bauer at kitware.com Tue Feb 6 08:48:07 2018 From: andy.bauer at kitware.com (Andy Bauer) Date: Tue, 6 Feb 2018 08:48:07 -0500 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: My guess is that you've forgotten: controller->SetGlobalController(controller); Could you also verify that VTK was built with MPI enabled? If you try my example file does that work properly for you with both VTK versions? On Tue, Feb 6, 2018 at 4:49 AM, Andrew Parker < andy.john.parker at googlemail.com> wrote: > Andy, > > To follow up. So this is a direct copy of my source for writing vtu in > parallel via mpi, no edits: > > vtkSmartPointer pwriter = vtkSmartPointer< > vtkXMLPUnstructuredGridWriter>::New(); > std::stringstream sss; > sss << outputDirectory << "/"; > sss << outputPrefix; > sss << "Parts"; > sss << ".pvtu"; > > pwriter->SetFileName(sss.str().c_str()); > pwriter->SetNumberOfPieces(comms.Size()); > if(comms.IsParallel()) > pwriter->SetGhostLevel(1); > pwriter->SetStartPiece(comms.Rank()); > pwriter->SetEndPiece(comms.Rank()); > pwriter->SetInputData(cellGrid); > // pwriter->SetDataModeToAscii(); > pwriter->SetDataModeToBinary(); > pwriter->SetCompressorTypeToZLib(); > pwriter->Write(); > > and for vtp files in parallel via mpi, no edits: > > vtkSmartPointer pwriter = vtkSmartPointer< > vtkXMLPPolyDataWriter>::New(); > std::stringstream sss; > sss << outputDirectory << "/"; > sss << outputPrefix; > sss << bcName << "_"; > sss << prefix; > sss << ".pvtp"; > std::cout << "Output file name: " << sss.str().c_str() << std::endl; > > pwriter->SetFileName(sss.str().c_str()); > pwriter->SetNumberOfPieces(comms->Size()); > if(comms->IsParallel()) > pwriter->SetGhostLevel(1); > pwriter->SetStartPiece(comms->Rank()); > pwriter->SetEndPiece(comms->Rank()); > pwriter->SetInputData(boundingFaceGrids[i]); > pwriter->SetDataModeToBinary(); > //pwriter->SetDataModeToAscii(); > pwriter->SetCompressorTypeToZLib(); > pwriter->Write(); > > I initialise the vtk-comms object in an identical way to your demo code, > after my own mpi-comms, and I finalize before I finalize mine. In between > those calls the above source is called. All processors partake in all > calls both to init the vtk-mpi and in the above writing. > > Do you have any further thoughts as to the problem? Problem goes away if > I use 6.3.... > > Cheers, > Andy > > > On 5 February 2018 at 18:40, Andrew Parker com> wrote: > >> Andy, >> >> My own code. I?ve always had those Piece lines in my src from day one, >> and always used it via mpi, so don?t need added. All procs call all lines >> in my file writer. There is no if-master-section. Literally just a vtk >> version number change that causes the problem. Can?t get the data files or >> the cut down source until tomorrow. >> >> I shared the other two links as those in addition to this post are the >> only places I can find that reference such a major change to the library >> that is undocumented and causes such a significant change to user code. Are >> there any further references on this change that I can read about to try to >> resolve this? >> >> I find it strange that this has not come up more. It would mean all users >> of 7.1 without the additional vtkmpicontroller lines would fail when >> calling a parallel writer from a parallel mpi-user-code.... >> >> Cheers, >> Andy >> >> On Mon, 5 Feb 2018 at 18:07, Andy Bauer wrote: >> >>> Are you using libMesh or another simulation code? You'll definitely need >>> the following to tell each process what piece it has: >>> pwriter->SetNumberOfPieces(nprocs); >>> >>> pwriter->SetStartPiece(rank); >>> >>> pwriter->SetEndPiece(rank); >>> >>> pwriter->Write(); >>> >>> Can you share the portion of your code that uses >>> vtkXMLPUnstructuredGridWriter? Also, looking at the data files from 6.3 and >>> 7.1.1 may help. >>> >>> Thanks, >>> Andy >>> >>> >>> On Mon, Feb 5, 2018 at 12:08 PM, Andrew Parker < >>> andy.john.parker at googlemail.com> wrote: >>> >>>> Andy, >>>> >>>> Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of me get >>>> your modifications to work from your vtk_test.C. I've included the >>>> vtkmpiController stuff after I init mpi myself. I found the migration >>>> problem mentioned here: >>>> >>>> https://github.com/libMesh/libmesh/issues/1179 >>>> >>>> and here: >>>> >>>> https://gitlab.kitware.com/vtk/vtk/issues/16924 >>>> >>>> as well as this post. My parallel unstructured grid now only contains >>>> one source within the piece section of the pvtu, as opposed to n-processor >>>> sources (all processors have real data to write and this is not a case of >>>> empty meshes on these processors). I can re-link and recompile against 6.3 >>>> and the problem goes away and I get the correct number of sources written >>>> to the pvtu file as before. Can you help? I make extensive use of pvtu >>>> files from my mpi-based code and now all grid files (pvtu and pvtp) have >>>> stopped working just by moving to 7.1.1 (which has been built with >>>> mpi-enabled). >>>> >>>> Any thoughts? >>>> >>>> Thanks, >>>> Andy >>>> >>>> >>>> On 6 December 2016 at 16:12, Andy Bauer wrote: >>>> >>>>> Hi John, >>>>> >>>>> The issue is indeed due to changes that I mentioned before (i.e. only >>>>> data sets that have data get written out and the .pvtu file is adjusted >>>>> accordingly). With this change though interprocess communication is >>>>> required which is done the the vtkMultiProcessController::GetGlobalController() >>>>> object which essentially acts as MPI_COMM_WORLD within VTK. You need to >>>>> create a vtkMPIController which derives from vtkMultiProcessController. See >>>>> the attached files for how that is done. This should also be backwards >>>>> compatible but if it isn't, please let us know. >>>>> >>>>> Best, >>>>> Andy >>>>> >>>>> ps. Ignore the ADIOS stuff in there (it's commented out). I was trying >>>>> to do two things at once and that's why the ADIOS stuff is in the >>>>> CMakeLists.txt. >>>>> >>>>> On Mon, Dec 5, 2016 at 6:06 PM, John Peterson >>>>> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer >>>>>> wrote: >>>>>> >>>>>>> Beyond this I can't think of any change off the top of my head that >>>>>>> would cause your issue. I looked at the repo but can't figure out the VTK >>>>>>> configurations from that. If you can share a simple test case which >>>>>>> demonstrates the issue I may be able to easily diagnose it. >>>>>>> >>>>>> >>>>>> Here's a standalone test code that reproduces the issue for me: >>>>>> >>>>>> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b14ee1d7 >>>>>> >>>>>> Run on two procs with: mpiexec -np 2 and I get the following >>>>>> test.pvtu file: >>>>>> >>>>>> >>>>>>> >>>>>> byte_order="LittleEndian" header_type="UInt32" >>>>>>> compressor="vtkZLibDataCompressor"> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> NumberOfComponents="3"/> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> As you can see, only one "Piece Source" is listed, but the output of >>>>>> the program is actually all 3 files (test.pvtu, test_0.vtu, test_1.vtu) and >>>>>> both the _0 and _1 files have nodes in them. Furthermore, if I simply add >>>>>> a second "Piece Source" line corresponding to "test_1.vtu", the whole thing >>>>>> opens up just fine in Paraview. I am a novice VTK programmer so it's very >>>>>> possible I'm doing something wrong, but this code definitely worked in VTK >>>>>> 6.x, and 7.0. >>>>>> >>>>>> Thanks for your help, >>>>>> John >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Feb 6 09:33:32 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 6 Feb 2018 07:33:32 -0700 Subject: [vtkusers] How to read Particular Series from DICOM Study In-Reply-To: <1517915604552-0.post@n5.nabble.com> References: <1517915604552-0.post@n5.nabble.com> Message-ID: On Tue, Feb 6, 2018 at 4:13 AM, rohit wrote: > Hello All, I am developing a volume rendering application using JAVA which > is > already done, but I am facing problem if DICOM study has multiple series in > it how to read particular series from that if I got series instance uid. > > right now I am using vtkDICOMImageReader to read images from folder. Please > help me out on this. > This can't be done by vtkDICOMImageReader, but if you build vtk-dicom (https://github.com/dgobbi/vtk-dicom) with BUILD_JAVA_WRAPPERS=ON, then you can use vtkDICOMDirectory to identify a particular series: http://dgobbi.github.io/vtk-dicom/doc/api/directory.html Cheers, - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseph.bendahan at gmail.com Tue Feb 6 12:21:50 2018 From: joseph.bendahan at gmail.com (Joseph1001) Date: Tue, 6 Feb 2018 10:21:50 -0700 (MST) Subject: [vtkusers] Ray Casting - creating mesh from vtkImageData Message-ID: <1517937710757-0.post@n5.nabble.com> The application is to Raycast a line unto a 3D rectilinear voxelized volume to determine the intersected voxel IDs and the path length (distance) through each voxel. I was able to do this with ?obbTree.IntersectWithLine()". I used a mesh exported from Rhino to an stl file and read the stl file (circuitous process). Here it is the working code: import vtk mesh = loadSTL("Voxels.stl") obbTree = vtk.vtkOBBTree() obbTree.SetDataSet(mesh) obbTree.BuildLocator() points = vtk.vtkPoints() # List of intersected points cellIds = vtk.vtkIdList() # vtkList with cell IDs code = obbTree.IntersectWithLine((0.5, 3.0, -0.5), (10.5, 0.5, 5.0), points, cellIds) Do you know how to create the mesh from vtkImageData? I tried the following: imgID = vtk.vtkImageData() .... # Calls to configure Image Data flt = vtk.vtkImageDataGeometryFilter() flt.SetInputData(imgID) flt.Update() but obbTree.SetDataSet(flt) complains that method requires a vtkDataSet". Thank you very much. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From robertsawko at gmail.com Tue Feb 6 15:34:57 2018 From: robertsawko at gmail.com (Robert Sawko) Date: Tue, 6 Feb 2018 20:34:57 +0000 Subject: [vtkusers] Parallel pipeline based on vtkConnectivityFilter In-Reply-To: <20180205093524.GA10042@avignon> References: <20180205093524.GA10042@avignon> Message-ID: <20180206203457.GA7577@avignon> I have written some very basic attempt on the problem, but I am not at all happy with it. It does works in parallel but there's no real communication and every process, I think, loads the file which is a redundant operation. Can you please point me to some example when I could find more or less how to divide up the work. The software I am using puts out legacy VTK files. I think the only good approach is to make one process to read it. Count the number of surfaces with vtkConnectivityFilter and using vtkThreshold distribute the work to other processes. Is that even possible in VTK? Best wishes, Robert -- Hats and prisoners https://en.wikipedia.org/wiki/Prisoners_and_hats_puzzle#Countably_Infinite-Hat_Variant_without_Hearing -------------- next part -------------- A non-text attachment was scrubbed... Name: mini_size.tar.gz Type: application/gzip Size: 15728 bytes Desc: not available URL: From berti_krueger at hotmail.com Wed Feb 7 01:21:55 2018 From: berti_krueger at hotmail.com (=?utf-8?B?QmVydGkgS3LDvGdlcg==?=) Date: Wed, 7 Feb 2018 06:21:55 +0000 Subject: [vtkusers] vtkBoxWidget handle size bug? In-Reply-To: References: Message-ID: It seems i am not the only one who doesn't understand the logic behind the sizing of the vtkBoxWidget handles: http://massmail.spl.harvard.edu/public-archives/slicer-devel/2011/006000.html "Hello, I am using a vtkBoxWidget, and it seems the size of the handles depends on the ValidPick (to know if handle has been picked or not) (and on the renderer to. We have to set a current renderer before calling PlaceWidget.) So, when I am creating the box, ValidPick is 0 because handles have not been picked yet. The size of the handles is calculate with: return (this->HandleSize * factor * this->InitialLength); But, when we resize the box, ValidPick change to 1 (on OnLeftButtonDown() (same for middle and right button) ), and the size is now calculated like this: return (this->HandleSize * factor * sqrt(radius) ); InitialLength has been replaced by sqrt(radius) (defined on vtk3DWidget::SizeHandles) But sqrt(radius) is different from InitalLength. So, when we create a vtkBoxWidget, handles are small, and when we resize it, handles are bigger. Is this normal, or it's a bug ? Thank you. Laurent." Am Mon, 5 Feb 2018 10:00:16 +0000 schrieb Berti Kr?ger : > Hello Everyone! > > I am currently using a vtkBoxWidget in my project (VTK 8.1). After i > created the vtkBoxWidget, the size handles (= vtkSphereActors) have not been > picked yet and are small and nice. > > But, when I resize the vtkBoxWidget (smaller or larger, it doesn't matter) or > simply click on it, the handles get bigger (radius increases) and stay this > way. > > They sometimes tend to get so large that they are piercing the mesh and > visually adding themselves to it, which is annoying. And they never get > smaller again, sometimes they get even larger. > > When i zoom out by large amount and then zoom in again, the handles get normal > ( = small) again. > > Is this the intented behaviour, and if so, what is the purpose of it or is it > a bug ? > > > Thank you very much in advance. > > > Berti Kr?ger > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers From berti_krueger at hotmail.com Wed Feb 7 01:55:17 2018 From: berti_krueger at hotmail.com (=?utf-8?B?QmVydGkgS3LDvGdlcg==?=) Date: Wed, 7 Feb 2018 06:55:17 +0000 Subject: [vtkusers] vtkBoxWidget handle size bug or feature? In-Reply-To: References: Message-ID: As i have seen by walking through the source code of vtkBoxWidget.cxx the method for resizing the handles vtkBoxWidget::SizeHandles() is first called in the constructor vtkBoxWidget::vtkBoxWidget() { ... // Define the point coordinates double bounds[6]; bounds[0] = -0.5; bounds[1] = 0.5; bounds[2] = -0.5; bounds[3] = 0.5; bounds[4] = -0.5; bounds[5] = 0.5; // Points 8-14 are down by PositionHandles(); this->PlaceWidget(bounds); ... } by the method void vtkBoxWidget::PlaceWidget(double bds[6]) { ... this->SizeHandles(); ... } The method void vtkBoxWidget::SizeHandles() looks like this: void vtkBoxWidget::SizeHandles() { double radius = this->vtk3DWidget::SizeHandles(1.5); for(int i=0; i<7; i++) { this->HandleGeometry[i]->SetRadius(radius); } } And it is also called in void vtkBoxWidget::OnLeftButtonUp(), void vtkBoxWidget::OnMiddleButtonUp() and in void vtkBoxWidget::OnRightButtonUp(). So if you click on the widget the line double radius = this->vtk3DWidget::SizeHandles(1.5); is executed a second time after its execution in the constructor which results in resizing of the spheres (factor 1.5 again). Anyway. I have now subclassed vtkBoxWidget and have overwritten the SizeHandles() method and it works now how i need it in my project. Thanks again to the vtk developers for making vtk opensource. Berti Kr?ger PS: If anyone can help me with some enlightenment regarding the default behaviour of vtkBoxWidget i would still be glad (e.g. bug or feature?). Am Wed, 7 Feb 2018 06:21:55 +0000 schrieb Berti Kr?ger : > It seems i am not the only one who doesn't understand the logic behind the > sizing of the vtkBoxWidget handles: > > http://massmail.spl.harvard.edu/public-archives/slicer-devel/2011/006000.html > > "Hello, > > I am using a vtkBoxWidget, and it seems the size of the handles depends on > the ValidPick (to know if handle has been picked or not) (and on the > renderer to. We have to set a current renderer before calling PlaceWidget.) > > So, when I am creating the box, ValidPick is 0 because handles have not been > picked yet. > The size of the handles is calculate with: > > return (this->HandleSize * factor * this->InitialLength); > > > But, when we resize the box, ValidPick change to 1 (on > OnLeftButtonDown() (same for middle and right button) ), and the size > is now calculated like this: > > return (this->HandleSize * factor * sqrt(radius) ); > > > InitialLength has been replaced by sqrt(radius) (defined on > vtk3DWidget::SizeHandles) > > But sqrt(radius) is different from InitalLength. > > So, when we create a vtkBoxWidget, handles are small, and when we resize it, > handles are bigger. > > > Is this normal, or it's a bug ? > > Thank you. > Laurent." > > > > Am Mon, 5 Feb 2018 10:00:16 +0000 > schrieb Berti Kr?ger : > > > Hello Everyone! > > > > I am currently using a vtkBoxWidget in my project (VTK 8.1). After i > > created the vtkBoxWidget, the size handles (= vtkSphereActors) have not been > > picked yet and are small and nice. > > > > But, when I resize the vtkBoxWidget (smaller or larger, it doesn't matter) > > or simply click on it, the handles get bigger (radius increases) and stay > > this way. > > > > They sometimes tend to get so large that they are piercing the mesh and > > visually adding themselves to it, which is annoying. And they never get > > smaller again, sometimes they get even larger. > > > > When i zoom out by large amount and then zoom in again, the handles get > > normal ( = small) again. > > > > Is this the intented behaviour, and if so, what is the purpose of it or is > > it a bug ? > > > > > > Thank you very much in advance. > > > > > > Berti Kr?ger > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > https://vtk.org/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers From jayavardhanravi at outlook.com Wed Feb 7 11:15:50 2018 From: jayavardhanravi at outlook.com (Jay) Date: Wed, 7 Feb 2018 09:15:50 -0700 (MST) Subject: [vtkusers] Smoothing the surface of the actor Message-ID: <1518020150148-0.post@n5.nabble.com> I tried to render the actor using the TimerEvent callback function and disabled the interaction with mouse. When I render and look at the graphics there is flickering or shaking of the graphics. But when I enable interaction click on the graphic window the graphics become smooth. Any ideas of what happens when interaction is enabled. Any help or suggestions would be appreciated. Thanks, Jay -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jayavardhanravi at outlook.com Wed Feb 7 11:18:37 2018 From: jayavardhanravi at outlook.com (Jay) Date: Wed, 7 Feb 2018 09:18:37 -0700 (MST) Subject: [vtkusers] VTK Render Window Crashes after 6 hours of running In-Reply-To: <1504962333969-0.post@n5.nabble.com> References: <1504910281887-0.post@n5.nabble.com> <1504962333969-0.post@n5.nabble.com> Message-ID: <1518020317457-0.post@n5.nabble.com> The issue was found to be with the Nvidia driver, updating the drivers fixed the problem -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From fyhfir at 163.com Wed Feb 7 11:15:58 2018 From: fyhfir at 163.com (fyhfir) Date: Thu, 8 Feb 2018 00:15:58 +0800 (CST) Subject: [vtkusers] QVtkWidget crashed when I change the viewpoint use my mouse Message-ID: <58020d63.c549.161710d62f4.Coremail.fyhfir@163.com> I use QVtkWidget to display the point cloud frame by frame. The delay time between two frames is 100ms? the program is crashed when QVtkWidget which is displaying the point cloud is changing the viewpoint by mouse sliding. Is it a bug? How can I prevent the program crashing? -------------- next part -------------- An HTML attachment was scrubbed... URL: From rppatil3210 at gmail.com Thu Feb 8 00:51:08 2018 From: rppatil3210 at gmail.com (rohit) Date: Wed, 7 Feb 2018 22:51:08 -0700 (MST) Subject: [vtkusers] How to read Particular Series from DICOM Study In-Reply-To: References: <1517915604552-0.post@n5.nabble.com> Message-ID: <1518069068522-0.post@n5.nabble.com> Thanks David, I have tried to build vtk-dicom (https://github.com/dgobbi/vtk-dicom) using CMAKE but getting error like, ################################################## CMake Error at CMakeLists.txt:62 (find_package): By not providing "FindVTK.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "VTK", but CMake did not find one. Could not find a package configuration file provided by "VTK" with any of the following names: VTKConfig.cmake vtk-config.cmake Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR" to a directory containing one of the above files. If "VTK" provides a separate development package or SDK, be sure it has been installed. ################################################## I am using cmake version -cmake-3.9.6-win32-x86 and Visual Studio Version - Visual Studio 11 2012. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Thu Feb 8 01:17:55 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 7 Feb 2018 23:17:55 -0700 Subject: [vtkusers] How to read Particular Series from DICOM Study In-Reply-To: <1518069068522-0.post@n5.nabble.com> References: <1517915604552-0.post@n5.nabble.com> <1518069068522-0.post@n5.nabble.com> Message-ID: It requires VTK_DIR to be set to a VTK build directory. See full build instructions here: http://dgobbi.github.io/vtk-dicom/doc/api/installation.html - Daivd On Wed, Feb 7, 2018 at 10:51 PM, rohit wrote: > Thanks David, I have tried to build vtk-dicom > (https://github.com/dgobbi/vtk-dicom) using CMAKE but getting error like, > > ################################################## > CMake Error at CMakeLists.txt:62 (find_package): > By not providing "FindVTK.cmake" in CMAKE_MODULE_PATH this project has > asked CMake to find a package configuration file provided by "VTK", but > CMake did not find one. > > Could not find a package configuration file provided by "VTK" with any of > the following names: > > VTKConfig.cmake > vtk-config.cmake > > Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set > "VTK_DIR" > to a directory containing one of the above files. If "VTK" provides a > separate development package or SDK, be sure it has been installed. > ################################################## > > I am using cmake version -cmake-3.9.6-win32-x86 and Visual Studio Version - > Visual Studio 11 2012. > > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Zoltan.Kovacs at esi-group.com Thu Feb 8 04:13:40 2018 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Thu, 8 Feb 2018 09:13:40 +0000 Subject: [vtkusers] QVtkWidget crashed when I change the viewpoint use my mouse In-Reply-To: <58020d63.c549.161710d62f4.Coremail.fyhfir@163.com> References: <58020d63.c549.161710d62f4.Coremail.fyhfir@163.com> Message-ID: Since QvtkWidget is already deprecated I am not sure if there is a support in the VTK community for that widget. You can try to use QVtkOpenGLWidget instead. Cheers, Zoltan From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of fyhfir Sent: Mittwoch, 7. Februar 2018 17:16 To: vtkusers at vtk.org Subject: [vtkusers] QVtkWidget crashed when I change the viewpoint use my mouse I use QVtkWidget to display the point cloud frame by frame. The delay time between two frames is 100ms? the program is crashed when QVtkWidget which is displaying the point cloud is changing the viewpoint by mouse sliding. Is it a bug? How can I prevent the program crashing? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jojotranel at hotmail.com Thu Feb 8 04:35:52 2018 From: jojotranel at hotmail.com (Jojobus) Date: Thu, 8 Feb 2018 02:35:52 -0700 (MST) Subject: [vtkusers] How to extract a specific DICOM Tag using vtkDICOMReader Message-ID: <1518082552197-0.post@n5.nabble.com> Hello vtk(-dicom) users, I am attempting to extract the ImagePatientPosition tag (0020,0032) from a SPECT DICOM image using vtk-dicom library and python. However, I am encountering some trouble to find the right combinaison between the vtkDICOMTag and vtkDICOMReader. My written code so far is below: directory = vtkDICOMPython.vtkDICOMDirectory() directory.SetDirectoryName(PathDicomSPECT) directory.Update() readerSPECT = vtkDICOMPython.vtkDICOMReader() readerSPECT.SetFileNames(directory.GetFileNamesForSeries(0)) readerSPECT.Update() # No encountered troubles so far but for the next step... TagPatientPosition=vtkDICOMPython.vtkDICOMTag(20,32) MetaPatientPosition=vtkDICOMPython.vtkDICOMMetaData() MetaPatientPosition.GetAttributeValue(TagPatientPosition) #What is the right thing to code in order to be linked with readerSPECT? How can code the vtkDICOMImageReader equivalent of GetImagePositionPatient () ? Many thanks in advance ! Jonathan -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ywang286 at sheffield.ac.uk Thu Feb 8 07:48:49 2018 From: ywang286 at sheffield.ac.uk (Yunbai Wang) Date: Thu, 8 Feb 2018 12:48:49 +0000 Subject: [vtkusers] How to save gradients got form gradient filter as a vector vtk file? Message-ID: Hi I am just new to the VTK, and want to write the result of gradient filter as a polydata by polydatawriter. But I cannot passing the result of greadient filter to vtkDataArray correctly. And the examples of image gradient and gradient filter don't mention how save and write the gradient as vector to the vtk file. Here is this part of my code : // Compute the gradient of the data vtkSmartPointer gradientFilter = vtkSmartPointer::New(); gradientFilter->SetInputData(output_volume_distmap); gradientFilter->Update() //save gradient array vtkSmartPointer gradients = vtkSmartPointer::New(); gradients->SetNumberOfTuples(gradientFilter->GetOutput()-> GetNumberOfPoints()); gradients->SetName("gradients"); /******here is part that I don't konw how to pass the result of gradient filter to the vtkDataArray*****/ //write vector to vtk file vtkSmartPointer vectors_gradient = vtkSmartPointer::New(); vector->GetPointData()->SetVectors(gradients); vtkSmartPointer writer_dirmap_o = vtkSmartPointer::New(); writer_dirmap_o->SetFileName(outname_dirmap_o.c_str()); writer_dirmap_o->SetInputData(vectors_gradient); writer_dirmap_o->Write(); I may do it in wrong way or there is another way to got a gradient vector vtk file. Please feel free to give me some advices or helps. Thank you so much for your helps. Many thanks Yun -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Feb 8 08:52:10 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 8 Feb 2018 06:52:10 -0700 Subject: [vtkusers] How to extract a specific DICOM Tag using vtkDICOMReader In-Reply-To: <1518082552197-0.post@n5.nabble.com> References: <1518082552197-0.post@n5.nabble.com> Message-ID: Hi Jonathan, Here's a short example of getting values from meta data: # get the meta data from the reader metadata = readerSPECT.GetMetaData() # tags are in hexadecimal, so "0x" must be used positionTag = vtkDICOMPython.vtkDICOMTag(0x0020,0x0032) # GetAttributeValue has an optional index argument, to select one file in the series, # each file will have a different position positionValue = metadata.GetAttributeValue(0, positionTag) # you can get tags by name, instead, by using the DC namespace positionValue = metadata.GetAttributeValue(0, vtkDICOMPython.DC.ImagePositionPatient) # use GetDouble() to extract the x,y,z position values (use list comprehension) position = [positionValue.GetDouble(i) for i in range(positionValue.GetNumberOfValues())] More info is here (though all the examples are C++): http://dgobbi.github.io/vtk-dicom/doc/api/attributes.html Also, since you're interested in position, here is info on position, orientation: http://dgobbi.github.io/vtk-dicom/doc/api/image_orientation.html I recommend using "reader.GetPatientMatrix()" to get the position info. Make sure that you read the documentation for the vtkDICOMReader.SetMemoryRowOrderToFileNative() method. It controls whether the data is re-ordered when it is read. Cheers, - David On Thu, Feb 8, 2018 at 2:35 AM, Jojobus wrote: > Hello vtk(-dicom) users, > > I am attempting to extract the ImagePatientPosition tag (0020,0032) from a > SPECT DICOM image using vtk-dicom library and python. However, I am > encountering some trouble to find the right combinaison between the > vtkDICOMTag and vtkDICOMReader. My written code so far is below: > > directory = vtkDICOMPython.vtkDICOMDirectory() > directory.SetDirectoryName(PathDicomSPECT) > directory.Update() > readerSPECT = vtkDICOMPython.vtkDICOMReader() > readerSPECT.SetFileNames(directory.GetFileNamesForSeries(0)) > readerSPECT.Update() > > # No encountered troubles so far but for the next step... > > TagPatientPosition=vtkDICOMPython.vtkDICOMTag(20,32) > MetaPatientPosition=vtkDICOMPython.vtkDICOMMetaData() > MetaPatientPosition.GetAttributeValue(TagPatientPosition) > > #What is the right thing to code in order to be linked with readerSPECT? > > How can code the vtkDICOMImageReader equivalent of GetImagePositionPatient > () ? > > Many thanks in advance ! > > Jonathan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jojotranel at hotmail.com Thu Feb 8 11:51:49 2018 From: jojotranel at hotmail.com (Jojobus) Date: Thu, 8 Feb 2018 09:51:49 -0700 (MST) Subject: [vtkusers] How to extract a specific DICOM Tag using vtkDICOMReader In-Reply-To: References: <1518082552197-0.post@n5.nabble.com> Message-ID: <1518108709439-0.post@n5.nabble.com> Many thanks for your answer. I tried your solution but "position" is returning []. I think that the cause might be the (0x0020,0x0032) tag (ImagePositionPatient) nested in (0x0054,0x0022) with SPECT images (whereas it is not the case with CT images, thus directly callable). By reading your documentation, the solution might be included with vtkDICOMPath, however, I don't know how to manage with it? Thanks again for your help, Jonathan -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Thu Feb 8 12:10:56 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 8 Feb 2018 10:10:56 -0700 Subject: [vtkusers] How to extract a specific DICOM Tag using vtkDICOMReader In-Reply-To: <1518108709439-0.post@n5.nabble.com> References: <1518082552197-0.post@n5.nabble.com> <1518108709439-0.post@n5.nabble.com> Message-ID: Yes, you can try something like this: positionPath = vtkDICOMPython.vtkDICOMTagPath( vtkDICOMPython.DC.DetectorInformationSequence, 0, # this is the index vtkDICOMPython.DC.ImagePositionPatient) positionValue = metadata.GetAttributeValue(positionPath) # check positionValue.GetNumberOfValues() # use positionValue.GetDouble(i) to get values 0, 1, and 2 On Thu, Feb 8, 2018 at 9:51 AM, Jojobus wrote: > Many thanks for your answer. I tried your solution but "position" is > returning []. > > I think that the cause might be the (0x0020,0x0032) tag > (ImagePositionPatient) nested in (0x0054,0x0022) with SPECT images (whereas > it is not the case with CT images, thus directly callable). > > By reading your documentation, the solution might be included with > vtkDICOMPath, however, I don't know how to manage with it? > > Thanks again for your help, > > Jonathan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rppatil3210 at gmail.com Fri Feb 9 02:41:23 2018 From: rppatil3210 at gmail.com (rohit) Date: Fri, 9 Feb 2018 00:41:23 -0700 (MST) Subject: [vtkusers] How to read Particular Series from DICOM Study In-Reply-To: References: <1517915604552-0.post@n5.nabble.com> <1518069068522-0.post@n5.nabble.com> Message-ID: <1518162083769-0.post@n5.nabble.com> Thanks a lot, I successful created the vtk java wrapper with vtk-dicom and its dll also. But getting error while running the code or after making runnable jar file. vtkDICOMJava.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform vtkTestingRenderingJava.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform & Exception in thread "main" java.lang.UnsatisfiedLinkError: vtk.vtkVolume.GetClassName_0()Ljava/lang/String; I am using JAVA JDK 64 Bit version (jdk1.8.0_131) I also tried for 32 Bit version (jdk1.8.0_111). -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jojotranel at hotmail.com Fri Feb 9 03:48:05 2018 From: jojotranel at hotmail.com (Jojobus) Date: Fri, 9 Feb 2018 01:48:05 -0700 (MST) Subject: [vtkusers] How to extract a specific DICOM Tag using vtkDICOMReader In-Reply-To: References: <1518082552197-0.post@n5.nabble.com> <1518108709439-0.post@n5.nabble.com> Message-ID: <1518166085203-0.post@n5.nabble.com> Cheers David, it is working perfectly. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Fri Feb 9 07:28:25 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 9 Feb 2018 05:28:25 -0700 Subject: [vtkusers] How to read Particular Series from DICOM Study In-Reply-To: <1518162083769-0.post@n5.nabble.com> References: <1517915604552-0.post@n5.nabble.com> <1518069068522-0.post@n5.nabble.com> <1518162083769-0.post@n5.nabble.com> Message-ID: Do you know for certain whether your VTK and vtk-dicom are 64-bit builds? Here are the build notes, with cmake settings, for my nightly 64-bit build: https://my.cdash.org/viewNotes.php?buildid=1364893 The cmake generator I used for this is "Visual Studio 14 2015 Win64". -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Fri Feb 9 08:43:50 2018 From: ochampao at hotmail.com (ochampao) Date: Fri, 9 Feb 2018 06:43:50 -0700 (MST) Subject: [vtkusers] QVTKOpenGLWidget::setInputData() slow when executed after vtkDICOMImageReader::Update() Message-ID: <1518183830308-0.post@n5.nabble.com> Hello vtkusers! I am experimenting with a simple dicom viewer similar to the FourPaneViewer example (see [1] for link). But I am observing a behaviour which I can't explain. In particular, when I place the QVTKOpenGLWidget::setInputData() calls before calling the vtkDICOMImageReader::Update(), the dataset is loaded extremely fast (approximately 2 seconds). However when QVTKOpenGLWidget::setInputData() calls are placed after vtkDICOMImageReader::Update(), then loading the dataset requires significantly more time to load (approximately 22 seconds). See code minimal code example below. Why is the code slower when executed after the Update() call and how can this be avoided? For the slower case, when stepping through the code with the debugger, I can see that the call to Update() is still fast but the debugger spends most of its time at setInputData(). Eventually, what I'd like to do is group the code that reads the dicom into a separate function that returns a vtkImageData reference to the pipeline. But from this experiment it seems to work very slow. Thanks, Panos. ======= Here is a minimal example of my code to demonstrate the two situation (commented is the slow case): void addImage(const char* filename) { vtkSmartPointer< vtkDICOMImageReader > reader = vtkSmartPointer< vtkDICOMImageReader >::New(); reader->SetDirectoryName(filename); vtkSmartPointer data = vtkSmartPointer::New(); data = reader->GetOutput(); //--------------------------------------- // SetInputData() works very fast if here qVtkOpenGLWidget1->SetInputData(data); qVtkOpenGLWidget2->SetInputData(data); qVtkOpenGLWidget3->SetInputData(data); // --------------------------------------- reader->Update(); //--------------------------------------- // SetInputData() works very slow if here // //qVtkOpenGLWidget1->SetInputData(data); //qVtkOpenGLWidget2->SetInputData(data); //qVtkOpenGLWidget3->SetInputData(data); //--------------------------------------- /* code to setup widgets (orientation, slice#, window/level color) */ qVtkOpenGLWidget1->Render(); qVtkOpenGLWidget2->Render(); qVtkOpenGLWidget3->Render(); } ======== References: [1]: https://github.com/Kitware/VTK/tree/master/Examples/GUI/Qt/FourPaneViewer -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sankhesh.jhaveri at kitware.com Fri Feb 9 11:01:00 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Fri, 09 Feb 2018 16:01:00 +0000 Subject: [vtkusers] vtkBoxWidget handle size bug or feature? In-Reply-To: References: Message-ID: Hi Berti, That seems like a bug to me. Mind creating a merge request for your fix? Thanks, Sankhesh ? On Wed, Feb 7, 2018 at 1:55 AM Berti Kr?ger wrote: > As i have seen by walking through the source code of vtkBoxWidget.cxx the > method for resizing the handles vtkBoxWidget::SizeHandles() is first > called in > the constructor > > vtkBoxWidget::vtkBoxWidget() > { > ... > > // Define the point coordinates > double bounds[6]; > bounds[0] = -0.5; > bounds[1] = 0.5; > bounds[2] = -0.5; > bounds[3] = 0.5; > bounds[4] = -0.5; > bounds[5] = 0.5; > // Points 8-14 are down by PositionHandles(); > this->PlaceWidget(bounds); > > ... > } > > > by the method > > > void vtkBoxWidget::PlaceWidget(double bds[6]) > { > ... > this->SizeHandles(); > ... > } > > > > The method void vtkBoxWidget::SizeHandles() looks like this: > > void vtkBoxWidget::SizeHandles() > { > double radius = this->vtk3DWidget::SizeHandles(1.5); > for(int i=0; i<7; i++) > { > this->HandleGeometry[i]->SetRadius(radius); > } > } > > > And it is also called in void vtkBoxWidget::OnLeftButtonUp(), void > vtkBoxWidget::OnMiddleButtonUp() and in void > vtkBoxWidget::OnRightButtonUp(). > > > So if you click on the widget the line > > double radius = this->vtk3DWidget::SizeHandles(1.5); > > is executed a second time after its execution in the constructor which > results > in resizing of the spheres (factor 1.5 again). > > > Anyway. I have now subclassed vtkBoxWidget and have overwritten the > SizeHandles() method and it works now how i need it in my project. > > > Thanks again to the vtk developers for making vtk opensource. > > > Berti Kr?ger > > > PS: If anyone can help me with some enlightenment regarding the default > behaviour of vtkBoxWidget i would still be glad (e.g. bug or feature?). > > > > Am Wed, 7 Feb 2018 06:21:55 +0000 > schrieb Berti Kr?ger : > > > It seems i am not the only one who doesn't understand the logic behind > the > > sizing of the vtkBoxWidget handles: > > > > > http://massmail.spl.harvard.edu/public-archives/slicer-devel/2011/006000.html > > > > "Hello, > > > > I am using a vtkBoxWidget, and it seems the size of the handles depends > on > > the ValidPick (to know if handle has been picked or not) (and on the > > renderer to. We have to set a current renderer before calling > PlaceWidget.) > > > > So, when I am creating the box, ValidPick is 0 because handles have not > been > > picked yet. > > The size of the handles is calculate with: > > > > return (this->HandleSize * factor * this->InitialLength); > > > > > > But, when we resize the box, ValidPick change to 1 (on > > OnLeftButtonDown() (same for middle and right button) ), and the size > > is now calculated like this: > > > > return (this->HandleSize * factor * sqrt(radius) ); > > > > > > InitialLength has been replaced by sqrt(radius) (defined on > > vtk3DWidget::SizeHandles) > > > > But sqrt(radius) is different from InitalLength. > > > > So, when we create a vtkBoxWidget, handles are small, and when we resize > it, > > handles are bigger. > > > > > > Is this normal, or it's a bug ? > > > > Thank you. > > Laurent." > > > > > > > > Am Mon, 5 Feb 2018 10:00:16 +0000 > > schrieb Berti Kr?ger : > > > > > Hello Everyone! > > > > > > I am currently using a vtkBoxWidget in my project (VTK 8.1). After i > > > created the vtkBoxWidget, the size handles (= vtkSphereActors) have > not been > > > picked yet and are small and nice. > > > > > > But, when I resize the vtkBoxWidget (smaller or larger, it doesn't > matter) > > > or simply click on it, the handles get bigger (radius increases) and > stay > > > this way. > > > > > > They sometimes tend to get so large that they are piercing the mesh and > > > visually adding themselves to it, which is annoying. And they never get > > > smaller again, sometimes they get even larger. > > > > > > When i zoom out by large amount and then zoom in again, the handles get > > > normal ( = small) again. > > > > > > Is this the intented behaviour, and if so, what is the purpose of it > or is > > > it a bug ? > > > > > > > > > Thank you very much in advance. > > > > > > > > > Berti Kr?ger > > > > > > _______________________________________________ > > > Powered by www.kitware.com > > > > > > Visit other Kitware open-source projects at > > > http://www.kitware.com/opensource/opensource.html > > > > > > Please keep messages on-topic and check the VTK FAQ at: > > > http://www.vtk.org/Wiki/VTK_FAQ > > > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > > > Follow this link to subscribe/unsubscribe: > > > https://vtk.org/mailman/listinfo/vtkusers > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > https://vtk.org/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Fri Feb 9 11:22:34 2018 From: ochampao at hotmail.com (ochampao) Date: Fri, 9 Feb 2018 09:22:34 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() Message-ID: <1518193354631-0.post@n5.nabble.com> Hello vtkusers! I am experimenting with a simple dicom viewer similar to the FourPaneViewer example (see [1] for link). But I am observing a behaviour which I can't explain. In particular, when I place the vtkResliceImageViewer::SetInputData() calls before calling the vtkDICOMImageReader::Update(), the dataset is loaded extremely fast (approximately 2 seconds). However when vtkResliceImageViewer::SetInputData() calls are placed after vtkDICOMImageReader::Update(), then loading the dataset requires significantly more time to load (approximately 22 seconds). See minimal code example below. Why is the code slower when executed after the Update() call and how can this be avoided? Is it wrong to place the SetInputData() call after Update()? If yes, how can the vtkImageData object be passed to SetInputData() so that it is still fast? For the slower case, when stepping through the code with the debugger, I can see that the call to Update() is still fast but the debugger spends most of its time at SetInputData(). Eventually, what I'd like to do is group the code that reads the dicom into a separate function that returns a vtkImageData reference to the pipeline. But from this experiment it seems to work very slow. Thanks, Panos. ======= Here is a minimal example of my code to demonstrate the two situation (commented is the slow case): void addImage(const char* filename) { vtkSmartPointer< vtkDICOMImageReader > reader = vtkSmartPointer< vtkDICOMImageReader >::New(); reader->SetDirectoryName(filename); vtkSmartPointer data = vtkSmartPointer::New(); data = reader->GetOutput(); //--------------------------------------- // SetInputData() works very fast if here resliceImageViewer1->SetInputData(data); resliceImageViewer2->SetInputData(data); resliceImageViewer3->SetInputData(data); // --------------------------------------- reader->Update(); //--------------------------------------- // SetInputData() works very slow if here // //resliceImageViewer1->SetInputData(data); //resliceImageViewer2->SetInputData(data); //resliceImageViewer2->SetInputData(data); //--------------------------------------- /* code to setup widgets (orientation, slice#, window/level color) */ resliceImageViewer1->Render(); resliceImageViewer2->Render(); resliceImageViewer3->Render(); } ======== References: [1]: https://github.com/Kitware/VTK/tree/master/Examples/GUI/Qt/FourPaneViewer -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sankhesh.jhaveri at kitware.com Fri Feb 9 11:52:47 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Fri, 09 Feb 2018 16:52:47 +0000 Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: <1518193354631-0.post@n5.nabble.com> References: <1518193354631-0.post@n5.nabble.com> Message-ID: Hi, First of all, you should not be calling vtkSmartPointer::New() for data if you intend to use that variable for storing the output from reader. That way you don?t end up with a dangling pointer/memory leak. Secondly, note that the output from the reader is not available until reader->Update() is called. The faster portion of your code is fast because the reslice viewer has been just getting a default vtkImageData object. As for slowness you see, could you please provide details on the data type and size and how much time is spent in SetInputData? Hope that helps, Sankhesh ? On Fri, Feb 9, 2018 at 11:22 AM ochampao wrote: > Hello vtkusers! > > I am experimenting with a simple dicom viewer similar to the FourPaneViewer > example (see [1] for link). But I am observing a behaviour which I can't > explain. In particular, when I place the > vtkResliceImageViewer::SetInputData() > calls before calling the vtkDICOMImageReader::Update(), the dataset is > loaded extremely fast (approximately 2 seconds). However when > vtkResliceImageViewer::SetInputData() calls are placed after > vtkDICOMImageReader::Update(), then loading the dataset requires > significantly more time to load (approximately 22 seconds). See minimal > code example below. > > Why is the code slower when executed after the Update() call and how can > this be avoided? > > Is it wrong to place the SetInputData() call after Update()? If yes, how > can > the vtkImageData object be passed to SetInputData() so that it is still > fast? > > For the slower case, when stepping through the code with the debugger, I > can > see that the call to Update() is still fast but the debugger spends most of > its time at SetInputData(). > > Eventually, what I'd like to do is group the code that reads the dicom into > a separate function that returns a vtkImageData reference to the pipeline. > But from this experiment it seems to work very slow. > > Thanks, > Panos. > > ======= > > Here is a minimal example of my code to demonstrate the two situation > (commented is the slow case): > > void addImage(const char* filename) > { > vtkSmartPointer< vtkDICOMImageReader > reader = > vtkSmartPointer< vtkDICOMImageReader >::New(); > reader->SetDirectoryName(filename); > > vtkSmartPointer data = > vtkSmartPointer::New(); > > data = reader->GetOutput(); > > //--------------------------------------- > // SetInputData() works very fast if here > resliceImageViewer1->SetInputData(data); > resliceImageViewer2->SetInputData(data); > resliceImageViewer3->SetInputData(data); > // --------------------------------------- > > reader->Update(); > > //--------------------------------------- > // SetInputData() works very slow if here > // > //resliceImageViewer1->SetInputData(data); > //resliceImageViewer2->SetInputData(data); > //resliceImageViewer2->SetInputData(data); > //--------------------------------------- > > /* > code to setup widgets (orientation, slice#, window/level color) > */ > > resliceImageViewer1->Render(); > resliceImageViewer2->Render(); > resliceImageViewer3->Render(); > } > > ======== > References: > > [1]: > https://github.com/Kitware/VTK/tree/master/Examples/GUI/Qt/FourPaneViewer > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Fri Feb 9 11:57:30 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Fri, 09 Feb 2018 16:57:30 +0000 Subject: [vtkusers] Black renderwindow with vtkGPUVolumeRayCastMapper/MaximumIntensityProjection In-Reply-To: <2ade920a20a76c4f08d6082fe8792fa8@kant.sophonet.de> References: <2ade920a20a76c4f08d6082fe8792fa8@kant.sophonet.de> Message-ID: Hi Sophonet, Try setting the scalar opacity function over the whole range of scalar values. Something like: double * range = data->GetScalarRange(); vtkNew f; f->AddPoint(range[0], 0.1); f->AddPoint(range[1], 1.0); property->SetScalarOpacity(f); Hope that helps, Sankhesh ? On Sat, Feb 3, 2018 at 5:37 AM Sophonet wrote: > Hi list, > > in an earlier version of my software using VTK7.x and the OpenGL > backend, MIP rendering was working using vtkGPUVolumeRayCastMapper and > MaximumIntensityProjection. > > However, in VTK 8.x (e.g. VTK 8.1.0), using the OpenGL2 backend, the > renderwindow stays black/empty - VTK does not show an error message, and > the IsRenderSupported (see below) does not seem to fail. > > Any hints what is wrong with the code below? By the way: I have added > the volumeProperty (and the piecewise function) after following a > current VTK test program > ( > https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastFourComponentsMIP.cxx > ). > > vtkimagedata is a scalar medical image (unsigned short), so nothing > special. > > Thanks, > > Sophonet > > vtkNew mapper; > mapper->SetInputData(vtkimagedata); > mapper->SetBlendModeToMaximumIntensity(); > > vtkNew volume; > volume->SetMapper(mapper); > // ... connect to renderer etc. > > //NOTE: The following lines from VTK's > TestGPURayCastFourComponentsMIP.cxx did not solve the problem > //vtkNew volumeProperty; > //volumeProperty->IndependentComponentsOn(); > //volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); > //volumeProperty->SetShade(1); > > //vtkNew f; > //f->AddPoint(0, 0.0); > //f->AddPoint(255, 1.0); > //volumeProperty->SetScalarOpacity(f); > > //int valid = > mapper->IsRenderSupported(vtkrenderer_->GetRenderWindow(), > volumeProperty); > > // NOTE: No exception was thrown on my system > //if (valid == 0) > // throw std::runtime_error("MIP rendering is not supported"); > //volume->SetProperty(volumeProperty); > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Fri Feb 9 12:44:19 2018 From: ochampao at hotmail.com (ochampao) Date: Fri, 9 Feb 2018 10:44:19 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: References: <1518193354631-0.post@n5.nabble.com> Message-ID: <1518198259486-0.post@n5.nabble.com> Hi Sankhesh, thanks for the reply. Please note that I am not doing both in my function i.e. I tried either the code: // loads whole dicom series in 2 seconds data = reader->GetOutput(); resliceImageViewer1->SetInputData(data); resliceImageViewer2->SetInputData(data); resliceImageViewer3->SetInputData(data); reader->Update(); // --------------------------------------------- -OR- // Loads whole dicom series in ~22 seconds data = reader->GetOutput(); reader->Update(); resliceImageViewer1->SetInputData(data); resliceImageViewer2->SetInputData(data); resliceImageViewer3->SetInputData(data); // --------------------------------------------- >> As for slowness you see, could you please provide details on the data >> type and size and how much time is spent in SetInputData? << I am loading a CT image volume from a DICOM series (743 slices, ~400MB). If I place the SetInputData() calls before Update() the whole function addImage() completes in about 2seconds, whereas if I place SetInputData() after Update(), the whole function takes ~22seconds. When stepping through the code in the slow case, I have noticed that execution spends about 2seconds on Update(), ~18seconds on the first SetInputData() and then about 2 seconds on the rest of the code in the function. So it's the first call to SetInputData() that is slowing down the execution. I have also tried the following sequence that calls Update() before GetOutput(), but it is still equally slow (~22seconds) which I find counter-intuitive. // reader->GetOutput() has the data now... Still takes about 22 seconds reader->Update(); data = reader->GetOutput(); resliceImageViewer1->SetInputData(data); resliceImageViewer2->SetInputData(data); resliceImageViewer3->SetInputData(data); // --------------------------------------------- Any suggestions as to why this is happening? Thanks, Panos -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ywang286 at sheffield.ac.uk Fri Feb 9 12:51:17 2018 From: ywang286 at sheffield.ac.uk (Yunbai Wang) Date: Fri, 9 Feb 2018 17:51:17 +0000 Subject: [vtkusers] How to save gradients got form gradient filter as a vector vtk file? In-Reply-To: References: Message-ID: Hi Just update my problem. Now I change the way to get the gradient, but I could not write correct file of gradien. I pass the array to polydata, but there is no point in polydata. I have no idea why this happen. And how can I write a vector image by vtk that the ITK(Elastix) could use? Many thanks Yun here is my code: vtkSmartPointer gradients = vtkSmartPointer::New(); gradients->SetNumberOfComponents(3); gradients->SetNumberOfTuples(output_volume_distmap->GetNumberOfPoints()); gradients->SetName("gradients"); int counter = 0; for (unsigned int i = 0; i < phi_grid.ni; ++i) { for (unsigned int j = 0; j < phi_grid.nj; ++j) { for (unsigned int k = 0; k < phi_grid.nk; ++k) { double g[3]; output_volume_distmap->GetPointGradient(i, j, k, distance, g); gradients->InsertTuple3(counter, g[0], g[1], g[2]); counter++; } } } vtkSmartPointer vectorG = vtkSmartPointer::New(); vectorG->GetPointData()->SetVectors(gradients); vtkSmartPointer writer_dirmap_o = vtkSmartPointer::New(); writer_dirmap_o->SetFileName(outname_dirmap_o.c_str()); writer_dirmap_o->SetInputData(vectorG); writer_dirmap_o->Write(); On 8 February 2018 at 12:48, Yunbai Wang wrote: > Hi > > I am just new to the VTK, and want to write the result of gradient filter > as a polydata by polydatawriter. > > But I cannot passing the result of greadient filter to vtkDataArray > correctly. And the examples of image gradient and gradient filter don't > mention how save and write the gradient as vector to the vtk file. > > Here is this part of my code : > // Compute the gradient of the data > vtkSmartPointer gradientFilter = > vtkSmartPointer::New(); > > gradientFilter->SetInputData(output_volume_distmap); > gradientFilter->Update() > > //save gradient array > vtkSmartPointer gradients = > vtkSmartPointer::New(); > > gradients->SetNumberOfTuples(gradientFilter->GetOutput()->Ge > tNumberOfPoints()); > gradients->SetName("gradients"); > > /******here is part that I don't konw how to pass the result of gradient > filter > to the vtkDataArray*****/ > > > //write vector to vtk file > vtkSmartPointer vectors_gradient = > vtkSmartPointer::New(); > > vector->GetPointData()->SetVectors(gradients); > > > vtkSmartPointer writer_dirmap_o = > vtkSmartPointer::New(); > > writer_dirmap_o->SetFileName(outname_dirmap_o.c_str()); > writer_dirmap_o->SetInputData(vectors_gradient); > writer_dirmap_o->Write(); > > I may do it in wrong way or there is another way to got a gradient vector > vtk file. Please feel free to give me some advices or helps. > Thank you so much for your helps. > > Many thanks > Yun > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ywang286 at sheffield.ac.uk Fri Feb 9 12:59:30 2018 From: ywang286 at sheffield.ac.uk (Yunbai Wang) Date: Fri, 9 Feb 2018 17:59:30 +0000 Subject: [vtkusers] How to save gradients got form gradient filter as a vector vtk file? Message-ID: Hi I am just new to the VTK, and want to write the result of gradient filter as a polydata by polydatawriter. But I cannot passing the result of greadient filter to vtkDataArray correctly. And the examples of image gradient and gradient filter don't mention how save and write the gradient as vector to the vtk file. Here is this part of my code : // Compute the gradient of the data vtkSmartPointer gradientFilter = vtkSmartPointer::New(); gradientFilter->SetInputData(output_volume_distmap); gradientFilter->Update() //save gradient array vtkSmartPointer gradients = vtkSmartPointer::New(); gradients->SetNumberOfTuples(gradientFilter->GetOutput()->Ge tNumberOfPoints()); gradients->SetName("gradients"); /******here is part that I don't konw how to pass the result of gradient filter to the vtkDataArray*****/ //write vector to vtk file vtkSmartPointer vectors_gradient = vtkSmartPointer::New(); vector->GetPointData()->SetVectors(gradients); vtkSmartPointer writer_dirmap_o = vtkSmartPointer::New(); writer_dirmap_o->SetFileName(outname_dirmap_o.c_str()); writer_dirmap_o->SetInputData(vectors_gradient); writer_dirmap_o->Write(); I may do it in wrong way or there is another way to got a gradient vector vtk file. Please feel free to give me some advices or helps. Thank you so much for your helps. Many thanks Yun -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Sun Feb 11 23:52:12 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Mon, 12 Feb 2018 05:52:12 +0100 Subject: [vtkusers] ParaView and VTK course in march and april 2018 in France Message-ID: Hello VTK and ParaView community Kitware will be holding VTK/ParaView courses on march and april 2017 in Lyon, France. 1/ Initial Trainings, VTK on march 13 2018 and ParaView on march 14 2018 Registration and details : VTK and ParaView User 2/ Advanced Trainings, VTK on april 4 2018 and ParaView on april 5 2018. Registration and details: VTK Advanced and ParaView Advanced Note that the course will be taught in English unless all atendees speaks French. If you have any question, please contact us at formations at http://www.kitware.fr Other trainings sessions that you may find interesting (CMake, ITK, 3D Slicer and OpenCV) are announced here . Best Regards, Mathieu Westphal -------------- next part -------------- An HTML attachment was scrubbed... URL: From majid.msadeghi at yahoo.com Mon Feb 12 06:27:49 2018 From: majid.msadeghi at yahoo.com (Majid M. Sadeghi) Date: Mon, 12 Feb 2018 11:27:49 +0000 (UTC) Subject: [vtkusers] ITK Noise removal filter on VTK file References: <1297652463.3144475.1518434869006.ref@mail.yahoo.com> Message-ID: <1297652463.3144475.1518434869006@mail.yahoo.com> Dear All, I am using a vtkGDCMImageReader to import 3D DICOM images. Then I adjust the spacing and reslice. After that I can save it as both image data|(vtkXMLImageDataWriter) or polydata(vtkImageDataGeometryFilter). I want to apply edge preserving noise removal to the data either just after reading images, or after saving as .vtp files. I have setup ITK and scanned the ITK book, but I have no experience on it. Is there any link or example which can guide me on how to perform this? (what type of structure is common between ITK and VTK? Should I perform the filter after saving in VTK or before that? which filter do you suggest for the best speed and perfomance?) Thanks a lot. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Mon Feb 12 07:01:56 2018 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Mon, 12 Feb 2018 13:01:56 +0100 Subject: [vtkusers] ITK Noise removal filter on VTK file In-Reply-To: <1297652463.3144475.1518434869006@mail.yahoo.com> References: <1297652463.3144475.1518434869006.ref@mail.yahoo.com> <1297652463.3144475.1518434869006@mail.yahoo.com> Message-ID: Dear Majid, if you are processing a 2D/3D (medical image) volumetric dataset, I'd say that it'd be easier to just use ITK as a starting point. If you then need visualization capabilities, then you'd need to use VTK as well. For resampling, and reslicing purposes, you may want to have a look at https://itk.org/Doxygen/html/classitk_1_1ResampleImageFilter.html and the examples https://itk.org/ITKExamples/src/Filtering/ImageGrid/ResampleAnImage/Documentation.html For using VTK with medical datasets: https://lorensen.github.io/VTKExamples/site/Cxx/#medical For edge preserving noise removal, you can have a look at https://itk.org/Doxygen/html/classitk_1_1AnisotropicDiffusionImageFilter.html Edge preserving noise removal is described in Section 2.7.3. of the ITK Software Guide: https://itk.org/ItkSoftwareGuide.pdf For storing your image, ITK tends to use metaimage format: https://itk.org/Doxygen/html/classitk_1_1MetaImageIO.html VTK can also write/read it. HTH, JON HAITZ PS: ITK has transitioned to discourse.itk.org as a discussion forum. So if your question is only about ITK, it would be advisable to post it there. -- On 12 February 2018 at 12:27, Majid M. Sadeghi via vtkusers < vtkusers at vtk.org> wrote: > Dear All, > > I am using a vtkGDCMImageReader to import 3D DICOM images. Then I adjust > the spacing and reslice. After that I can save it as both image > data|(vtkXMLImageDataWriter) or polydata(vtkImageDataGeometryFilter). > > I want to apply edge preserving noise removal to the data either just > after reading images, or after saving as .vtp files. > > I have setup ITK and scanned the ITK book, but I have no experience on it. > > Is there any link or example which can guide me on how to perform this? > (what type of structure is common between ITK and VTK? Should I perform the > filter after saving in VTK or before that? which filter do you suggest for > the best speed and perfomance?) > > Thanks a lot. > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From majid.msadeghi at yahoo.com Mon Feb 12 07:58:05 2018 From: majid.msadeghi at yahoo.com (Majid M. Sadeghi) Date: Mon, 12 Feb 2018 12:58:05 +0000 (UTC) Subject: [vtkusers] ITK Noise removal filter on VTK file In-Reply-To: References: <1297652463.3144475.1518434869006.ref@mail.yahoo.com> <1297652463.3144475.1518434869006@mail.yahoo.com> Message-ID: <1739662613.3219458.1518440285948@mail.yahoo.com> Thakn you so much for the great help.? On Monday, February 12, 2018 2:02 PM, Jon Haitz Legarreta wrote: Dear Majid,if you are processing a 2D/3D (medical image) volumetric dataset, I'd say that it'd be easier to just use ITK as a starting point. If you then need visualization capabilities, then you'd need to use VTK as well. For resampling, and reslicing purposes, you may want to have a look athttps://itk.org/Doxygen/html/classitk_1_1ResampleImageFilter.html and the exampleshttps://itk.org/ITKExamples/src/Filtering/ImageGrid/ResampleAnImage/Documentation.html For using VTK with medical datasets:https://lorensen.github.io/VTKExamples/site/Cxx/#medical For edge preserving noise removal, you can have a look athttps://itk.org/Doxygen/html/classitk_1_1AnisotropicDiffusionImageFilter.html Edge preserving noise removal is described in Section 2.7.3. of the ITK Software Guide:https://itk.org/ItkSoftwareGuide.pdf For storing your image, ITK tends to use metaimage format:https://itk.org/Doxygen/html/classitk_1_1MetaImageIO.html VTK can also write/read it. HTH,JON HAITZ PS: ITK has transitioned to discourse.itk.org as a discussion forum. So if your question is only about ITK, it would be advisable to post it there. -- On 12 February 2018 at 12:27, Majid M. Sadeghi via vtkusers wrote: Dear All, I am using a vtkGDCMImageReader to import 3D DICOM images. Then I adjust the spacing and reslice. After that I can save it as both image data|(vtkXMLImageDataWriter) or polydata( vtkImageDataGeometryFilter). I want to apply edge preserving noise removal to the data either just after reading images, or after saving as .vtp files. I have setup ITK and scanned the ITK book, but I have no experience on it. Is there any link or example which can guide me on how to perform this? (what type of structure is common between ITK and VTK? Should I perform the filter after saving in VTK or before that? which filter do you suggest for the best speed and perfomance?) Thanks a lot. ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/ listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Mon Feb 12 08:50:15 2018 From: ochampao at hotmail.com (ochampao) Date: Mon, 12 Feb 2018 06:50:15 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: <1518198259486-0.post@n5.nabble.com> References: <1518193354631-0.post@n5.nabble.com> <1518198259486-0.post@n5.nabble.com> Message-ID: <1518443415648-0.post@n5.nabble.com> Just to give some more background... I have a class which on construction sets-up 3 "empty" (no image loaded) vtkResliceImageViewer objects and attaches them to their respective QVTKOpenGLWidget objects. Then, when the user selects a folder where the DICOM series is located, the addImage() function is called that executes the series of steps listed in my previous posts to load the volume. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sankhesh.jhaveri at kitware.com Mon Feb 12 09:14:29 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 12 Feb 2018 14:14:29 +0000 Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: <1518443415648-0.post@n5.nabble.com> References: <1518193354631-0.post@n5.nabble.com> <1518198259486-0.post@n5.nabble.com> <1518443415648-0.post@n5.nabble.com> Message-ID: Hi Panos, I am not sure why you?d see a slowdown just for the first viewer?s SetInputData. Perhaps make a small example with no Qt and just one viewer and try to reproduce the issue. ? On Mon, Feb 12, 2018 at 8:50 AM ochampao wrote: > Just to give some more background... > > I have a class which on construction sets-up 3 "empty" (no image loaded) > vtkResliceImageViewer objects and attaches them to their respective > QVTKOpenGLWidget objects. Then, when the user selects a folder where the > DICOM series is located, the addImage() function is called that executes > the series of steps listed in my previous posts to load the volume. > > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Mon Feb 12 11:45:45 2018 From: ochampao at hotmail.com (ochampao) Date: Mon, 12 Feb 2018 09:45:45 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: References: <1518193354631-0.post@n5.nabble.com> <1518198259486-0.post@n5.nabble.com> <1518443415648-0.post@n5.nabble.com> Message-ID: <1518453945900-0.post@n5.nabble.com> Hi Sankhesh, I have created a minimal example with a single instance of vtkResliceImageViewer and without Qt that reproduces the behaviour I observe. See the code below. You may also download the dataset I have used from . In my code below, I have put in the comments next to each potential position of calling Update(), how much time SetInputData() takes to complete. Ideally, I would like to have the call to Update() in position (1). This will allow me to separate the volume reading part into a separate function that returns a smart pointer to the loaded vtkImageData object. Thanks for your help, P. ======================= #include "vtkDICOMImageReader.h" #include "vtkImageData.h" #include "vtkInteractorStyleImage.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkResliceImageViewer.h" #include "vtkSmartPointer.h" int main(int argc, char** argv) { vtkNew reader; vtkNew resliceImageViewer; vtkNew renderWindowInteractor; vtkNew style; vtkNew renderWindow; vtkNew renderer; vtkSmartPointer data; renderWindow->AddRenderer(renderer); renderer->SetBackground(0.0, 0.0, 0.0); renderWindowInteractor->SetInteractorStyle(style); reader->SetDirectoryName("path/to/dicom/series"); //reader->Update(); // --> (1) SetInputData() takes ~18 seconds data = reader->GetOutput(); //reader->Update(); // --> (2) SetInputData() takes ~18 seconds resliceImageViewer->SetInputData(data); reader->Update(); // --> (3) SetInputData() takes less than 1 seconds resliceImageViewer->SetRenderWindow(renderWindow); resliceImageViewer->SetupInteractor(renderWindowInteractor); resliceImageViewer->SetResliceModeToAxisAligned(); resliceImageViewer->SetSlice(50); resliceImageViewer->SetColorLevel(-27); resliceImageViewer->SetColorWindow(1358); renderWindowInteractor->Start(); return 0; } ======================= -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From simon.esneault at gmail.com Tue Feb 13 03:54:50 2018 From: simon.esneault at gmail.com (Simon Esneault) Date: Tue, 13 Feb 2018 09:54:50 +0100 Subject: [vtkusers] [vtk-developers] QVTKOpenGLWidget + SSAA pass breaks depth peeling Message-ID: Hello VTK community Is seems adding an SSAA rendering pass breaks the depth peeling process. Attached is an example that highlight the problem. When commenting out the line 64 (l_renderer->SetPass( l_ssaa ); the translucent geometry is rendered correctly, but the result is not anti-aliased. With SSAA pass -> Depth Peeling broken : https://cdn.pbrd.co/images/H7qnZxC.png Without SSAA pass -> Depth Peeling ok : https://cdn.pbrd.co/images/H7qnvE9.png Shall I fill a bug for this ? Thanks -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- cmake_minimum_required( VERSION 3.5 ) PROJECT( QtVtkSsaa ) set( CMAKE_AUTOMOC ON ) find_package( Qt5Widgets REQUIRED QUIET ) find_package( OpenGL REQUIRED ) find_package( VTK REQUIRED ) include( ${VTK_USE_FILE} ) add_executable( QtVtkSsaa MACOSX_BUNDLE main.cpp ) qt5_use_modules( QtVtkSsaa Core Gui ) target_link_libraries( QtVtkSsaa ${VTK_LIBRARIES} ${OPENGL_LIBRARIES} ) -------------- next part -------------- A non-text attachment was scrubbed... Name: main.cpp Type: text/x-c++src Size: 3468 bytes Desc: not available URL: From ochampao at hotmail.com Tue Feb 13 03:57:21 2018 From: ochampao at hotmail.com (ochampao) Date: Tue, 13 Feb 2018 01:57:21 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: <1518453945900-0.post@n5.nabble.com> References: <1518193354631-0.post@n5.nabble.com> <1518198259486-0.post@n5.nabble.com> <1518443415648-0.post@n5.nabble.com> <1518453945900-0.post@n5.nabble.com> Message-ID: <1518512241977-0.post@n5.nabble.com> Not sure if this is helpful but I've realised the following: If I replace SetInputData() with SetInputConnection() and then try enabling the Update() call at the 3 positions indicated in my previous post the function performs overall faster in all 3 positions. At positions (1) and (2), it takes less than 1 second. At position (3) it takes ~2 seconds to complete exectution of SetInputConnection(). I guess this is the expected behaviour (?) although using SetInputConnection() is not recommended (we get a warning from VTK). P. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ashahrior.91994 at gmail.com Tue Feb 13 06:38:27 2018 From: ashahrior.91994 at gmail.com (Ashef Shahrior) Date: Tue, 13 Feb 2018 17:38:27 +0600 Subject: [vtkusers] Creating 3d model from 2d image slices Message-ID: I am a complete newbie to VTK & ITK. I'm trying to create a 3d model of the human brain/bone from 2d image slices using VTK, Visual Studio, C++, CMake; or at least I think that's what I'm supposed to do as per my project supervisor. Now, I'd like to know what things I am required to learn or what procedures should I follow to accomplish my task, what components should I search for to get it done. I don't seem to find any tutorial on youtube on this but some videos on the built model projects. I have done some searching on the internet but I guess I am not doing it the right way to get the information I require. Can anyone please assist me with some information in this matter? It'll be a great help. Otherwise, I'll be getting a straight F. Thanks in advance. :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Tue Feb 13 08:37:30 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 13 Feb 2018 13:37:30 +0000 Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: <1518512241977-0.post@n5.nabble.com> References: <1518193354631-0.post@n5.nabble.com> <1518198259486-0.post@n5.nabble.com> <1518443415648-0.post@n5.nabble.com> <1518453945900-0.post@n5.nabble.com> <1518512241977-0.post@n5.nabble.com> Message-ID: although using SetInputConnection() is not recommended (we get a warning from VTK). SetInputConnection is the recommended way to connect a VTK pipeline. What is the warning you see? ? On Tue, Feb 13, 2018 at 3:57 AM ochampao wrote: > Not sure if this is helpful but I've realised the following: > > If I replace SetInputData() with SetInputConnection() and then try enabling > the Update() call at the 3 positions indicated in my previous post the > function performs overall faster in all 3 positions. At positions (1) and > (2), it takes less than 1 second. At position (3) it takes ~2 seconds to > complete exectution of SetInputConnection(). I guess this is the expected > behaviour (?) although using SetInputConnection() is not recommended (we > get > a warning from VTK). > > P. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Feb 13 08:58:33 2018 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 13 Feb 2018 08:58:33 -0500 Subject: [vtkusers] Creating 3d model from 2d image slices In-Reply-To: References: Message-ID: Ashef, Welcome to VTK. Fortunately for you, there are plenty of resources online to learn how to do this. Website - www.vtk.org Books - VTK User's Guide - https://www.vtk.org/vtk-users-guide/ VTK Textbook - https://www.vtk.org/vtk-textbook/ Examples - https://lorensen.github.io/VTKExamples/site/Cxx/ Good luck on your project! Cory On Tue, Feb 13, 2018 at 6:38 AM, Ashef Shahrior wrote: > I am a complete newbie to VTK & ITK. I'm trying to create a 3d model of > the human brain/bone from 2d image slices using VTK, Visual Studio, C++, > CMake; or at least I think that's what I'm supposed to do as per my project > supervisor. Now, I'd like to know what things I am required to learn or > what procedures should I follow to accomplish my task, what components > should I search for to get it done. I don't seem to find any tutorial on > youtube on this but some videos on the built model projects. I have done > some searching on the internet but I guess I am not doing it the right way > to get the information I require. Can anyone please assist me with some > information in this matter? It'll be a great help. Otherwise, I'll be > getting a straight F. Thanks in advance. :) > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Tue Feb 13 09:12:03 2018 From: ochampao at hotmail.com (ochampao) Date: Tue, 13 Feb 2018 07:12:03 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: References: <1518193354631-0.post@n5.nabble.com> <1518198259486-0.post@n5.nabble.com> <1518443415648-0.post@n5.nabble.com> <1518453945900-0.post@n5.nabble.com> <1518512241977-0.post@n5.nabble.com> Message-ID: <1518531123196-0.post@n5.nabble.com> This is the warning: "ERROR: In <_home_>\VTK-8.1.0\Interaction\Image\vtkResliceImageViewer.cxx, line 469 vtkResliceImageViewer (000001906F8079A0): Use SetInputData instead." The message stems from from vtkResliceImageViewer.cxx (lines 466-472): //---------------------------------------------------------------------------- void vtkResliceImageViewer::SetInputConnection(vtkAlgorithmOutput* input) { vtkErrorMacro( << "Use SetInputData instead. " ); this->WindowLevel->SetInputConnection(input); this->UpdateDisplayExtent(); } //---------------------------------------------------------------------------- -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Tue Feb 13 09:31:30 2018 From: lasso at queensu.ca (Andras Lasso) Date: Tue, 13 Feb 2018 14:31:30 +0000 Subject: [vtkusers] Creating 3d model from 2d image slices In-Reply-To: References: Message-ID: If it is not a requirement to develop new software from scratch, but you just need to build high-quality models from images, then you?d better use a software that is already designed to do this. You can find here step-by-step instructions for creating 3D models using 3D Slicer: https://www.slicer.org/wiki/Documentation/Nightly/Training#Slicer4_Image_Segmentation. The application and its segment editor module is based on VTK, free, open-source, and fully customizable using Python scripting. Download & more information: www.slicer.org. For simpler segmentations, you can also try ITK-Snap or MITK. Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Cory Quammen Sent: Tuesday, February 13, 2018 8:59 AM To: Ashef Shahrior Cc: vtkusers Subject: Re: [vtkusers] Creating 3d model from 2d image slices Ashef, Welcome to VTK. Fortunately for you, there are plenty of resources online to learn how to do this. Website - www.vtk.org Books - VTK User's Guide - https://www.vtk.org/vtk-users-guide/ VTK Textbook - https://www.vtk.org/vtk-textbook/ Examples - https://lorensen.github.io/VTKExamples/site/Cxx/ Good luck on your project! Cory On Tue, Feb 13, 2018 at 6:38 AM, Ashef Shahrior > wrote: I am a complete newbie to VTK & ITK. I'm trying to create a 3d model of the human brain/bone from 2d image slices using VTK, Visual Studio, C++, CMake; or at least I think that's what I'm supposed to do as per my project supervisor. Now, I'd like to know what things I am required to learn or what procedures should I follow to accomplish my task, what components should I search for to get it done. I don't seem to find any tutorial on youtube on this but some videos on the built model projects. I have done some searching on the internet but I guess I am not doing it the right way to get the information I require. Can anyone please assist me with some information in this matter? It'll be a great help. Otherwise, I'll be getting a straight F. Thanks in advance. :) _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Tue Feb 13 09:37:36 2018 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Tue, 13 Feb 2018 07:37:36 -0700 (MST) Subject: [vtkusers] subtract two tubes via vtkLoopBooleanPolyDataFilter not possible Message-ID: <1518532656488-0.post@n5.nabble.com> Hi all, I've been trying to use vtkLoopBooleanPolyDataFilter to extract a vtkPolydata object from a tube (vtkTubeFilter) . But I do not get a successful result. I also used vtkTriangleFilter and vtkCleanPolyData to clean up the polydata's of the tubes. vtkLoopBooleanPolyDataFilter bFilter = new vtkLoopBooleanPolyDataFilter(); bFilter.SetOperationToIntersection(); bFilter.SetOperationToDifference(); bFilter.SetInputData(0, pd1); bFilter.SetInputData(1, pd2); bFilter.Update(); bFilter.GetStatus() is 0! -> so it did not work In the attached file you can understand it approximately. Two tubes are created and then subtract from each other. Before that, I tried to clean up the polydata objects. BoolATube.java Can anybody help me? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sankhesh.jhaveri at kitware.com Tue Feb 13 09:37:28 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 13 Feb 2018 14:37:28 +0000 Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: <1518531123196-0.post@n5.nabble.com> References: <1518193354631-0.post@n5.nabble.com> <1518198259486-0.post@n5.nabble.com> <1518443415648-0.post@n5.nabble.com> <1518453945900-0.post@n5.nabble.com> <1518512241977-0.post@n5.nabble.com> <1518531123196-0.post@n5.nabble.com> Message-ID: I see. That makes sense since its a viewport and not a filter. Have you seen the vtkImageResliceMapper class. Perhaps try slicing with that instead of the vtkImageResliceViewer, to see if you get better performance. ? On Tue, Feb 13, 2018 at 9:12 AM ochampao wrote: > This is the warning: > > "ERROR: In <_home_>\VTK-8.1.0\Interaction\Image\vtkResliceImageViewer.cxx, > line 469 vtkResliceImageViewer (000001906F8079A0): Use SetInputData > instead." > > The message stems from from vtkResliceImageViewer.cxx (lines 466-472): > > > //---------------------------------------------------------------------------- > void vtkResliceImageViewer::SetInputConnection(vtkAlgorithmOutput* input) > { > vtkErrorMacro( << "Use SetInputData instead. " ); > this->WindowLevel->SetInputConnection(input); > this->UpdateDisplayExtent(); > } > > //---------------------------------------------------------------------------- > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From hunor.login at gmail.com Tue Feb 13 11:00:48 2018 From: hunor.login at gmail.com (Hunor Login) Date: Tue, 13 Feb 2018 17:00:48 +0100 Subject: [vtkusers] Set number of ticks for labels in vtkCubeAxesActor Message-ID: Dear Developers, I was searching for a while, but couldn't find a way to set the number of ticks for the VTKCubeAxesActor. Basicaly, I would like to show more labels than the default on a 3d window. Based on the header files of vtkCubeAxesActor this should be possible: > * To use this object you must define a bounding box and the camera used > * to render the vtkCubeAxesActor. You can optionally turn on/off labels, > * ticks, gridlines, and set tick location, number of labels, and text to > * use for axis-titles. A 'corner offset' can also be set. This allows > * the axes to be set partially away from the actual bounding box to > perhaps > * prevent overlap of labels between the various axes. but based on the sourcecode I don't see how. Could you please help me out quick. I am pretty sure(hope) that there is nice command for that. Thanks for your time and patient, Your help is appretiated, Regards, Walter -------------- next part -------------- An HTML attachment was scrubbed... URL: From majid.msadeghi at yahoo.com Tue Feb 13 11:31:57 2018 From: majid.msadeghi at yahoo.com (Majid M. Sadeghi) Date: Tue, 13 Feb 2018 16:31:57 +0000 (UTC) Subject: [vtkusers] Convert vtkImageData to an itk::Image References: <271213644.174330.1518539517781.ref@mail.yahoo.com> Message-ID: <271213644.174330.1518539517781@mail.yahoo.com> Dear All, I read some DICOM data using vtkGDCMImageReader, then I change the sapacing and reslice them. Next I want to change that vtk image to itk image to be able to apply noise removal. But as soon as the code reaches the "filter_toitkimage->Update();" line the program just exits without saying anything (actually it says:The program '[14040] QtGuiApplication2.exe' has exited with code 3 (0x3).). Here is the code: vtkSmartPointer reader = vtkSmartPointer::New(); ??? reader->SetFileNames(vtkfiles); ??? reader->Update(); ??? ??? vtkSmartPointer changer = vtkSmartPointer::New(); ??? changer->SetOutputSpacing(pixlespacing, pixlespacing, ippzspacing);//@majidnow ??? changer->SetInputConnection(reader->GetOutputPort()); ??? vtkSmartPointer reslice = vtkSmartPointer::New(); ??? reslice->SetInputConnection(changer->GetOutputPort()); ??? ??? //to change VTK image to ITK image ??? const unsigned int Dimension = 3; ??? using PixelType = double; ??? using ImageType = itk::Image< PixelType, Dimension >; ??? using FilterType = itk::VTKImageToImageFilter< ImageType >; ??? FilterType::Pointer filter_toitkimage = FilterType::New(); ??? filter_toitkimage->SetInput(reslice->GetOutput()); ??? try ??? { ??? ??? filter_toitkimage->Update(); ??? } ??? catch (itk::ExceptionObject & error) ??? { ??? ??? std::cerr << "Error: " << error << std::endl; ??? ??? //return EXIT_FAILURE; ??? }? Any idea why this happens? -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Feb 13 11:59:58 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 13 Feb 2018 09:59:58 -0700 Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: References: <1518193354631-0.post@n5.nabble.com> <1518198259486-0.post@n5.nabble.com> <1518443415648-0.post@n5.nabble.com> <1518453945900-0.post@n5.nabble.com> <1518512241977-0.post@n5.nabble.com> <1518531123196-0.post@n5.nabble.com> Message-ID: Regarding speed and the VTK imaging pipeline, you have to be careful about "streaming" capabilities of VTK, especially for 3D images. "Streaming" means that for each filter (or reader or mapper) the VTK imaging pipeline has a settable UpdateExtent, which specifies a region of the image. I.e. a filter can be requested to only operate on part of the image. If you use obj2->SetInputConnection(obj1->GetOutputPort()), then "obj2" will control the UpdateExtent of "obj1". In other words, the consumer of a filter's output controls the UpdateExtent of that filter. Here's where this is important with respect to speed. When you display a slice of an image, the mapper will request an UpdateExtent for the voxels in that slice. The pipeline will forward this UpdateExtent all the way back along the pipeline, usually all the way to the reader. So if the user is trying to scroll through the slices, this can cause the reader to re-execute for every single new slice. Obviously this will be slow. One way to avoid this is to call Update() on the reader before connecting the reader to the rest of the pipeline. Calling Update() before the pipeline sets the UpdateExtent will cause the reader to read the entire volume into memory just once. If it isn't possible to call Update() before connecting the reader to the pipeline, you can instead call UpdateWholeExtent() at any point after the pipeline is created. In general, when you build an image pipeline in VTK, you can consider which parts of the pipeline are "static" (only need to be executed once) and which are "dynamic" (respond to user interaction). After setting up the "static" part of the pipeline, call UpdateWholeExtent() on it. You can go even further by connecting the "static" part of the pipeline to the "dynamic" part of the pipeline with SetInputData() instead of SetInputConnection(). This will ensure that pipeline requests are never forwarded from the "dynamic" part of the pipeline to the "static" part. So, in summary: the default behavior of the VTK image display pipeline is to stream regions of the image rather than to execute the filters over the whole image. In some situations this is good, but in other situations you'll want to override this behavior by either calling Update() yourself and/or by using SetInputData() instead of SetInputConnection(). - David On Tue, Feb 13, 2018 at 7:37 AM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > I see. That makes sense since its a viewport and not a filter. Have you > seen the vtkImageResliceMapper class. Perhaps try slicing with that > instead of the vtkImageResliceViewer, to see if you get better > performance. > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Tue Feb 13 15:16:43 2018 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 13 Feb 2018 15:16:43 -0500 Subject: [vtkusers] Convert vtkImageData to an itk::Image In-Reply-To: <271213644.174330.1518539517781@mail.yahoo.com> References: <271213644.174330.1518539517781.ref@mail.yahoo.com> <271213644.174330.1518539517781@mail.yahoo.com> Message-ID: Hi Majid, maybe you need to invoke reslice->Update(); before importing its output into ITK? Regards, D?enan On Tue, Feb 13, 2018 at 11:31 AM, Majid M. Sadeghi via vtkusers < vtkusers at vtk.org> wrote: > Dear All, > > I read some DICOM data using vtkGDCMImageReader, then I change the > sapacing and reslice them. Next I want to change that vtk image to itk > image to be able to apply noise removal. But as soon as the code reaches > the "filter_toitkimage->Update();" line the program just exits without > saying anything (actually it says:The program '[14040] > QtGuiApplication2.exe' has exited with code 3 (0x3).). > > Here is the code: > > vtkSmartPointer reader = vtkSmartPointer< > vtkGDCMImageReader>::New(); > reader->SetFileNames(vtkfiles); > reader->Update(); > > vtkSmartPointer changer = vtkSmartPointer< > vtkImageChangeInformation>::New(); > changer->SetOutputSpacing(pixlespacing, pixlespacing, > ippzspacing);//@majidnow > changer->SetInputConnection(reader->GetOutputPort()); > > vtkSmartPointer reslice = vtkSmartPointer< > vtkImageReslice>::New(); > reslice->SetInputConnection(changer->GetOutputPort()); > > //to change VTK image to ITK image > const unsigned int Dimension = 3; > > using PixelType = double; > using ImageType = itk::Image< PixelType, Dimension >; > > using FilterType = itk::VTKImageToImageFilter< ImageType >; > FilterType::Pointer filter_toitkimage = FilterType::New(); > filter_toitkimage->SetInput(reslice->GetOutput()); > > try > { > filter_toitkimage->Update(); > } > catch (itk::ExceptionObject & error) > { > std::cerr << "Error: " << error << std::endl; > //return EXIT_FAILURE; > } > > > Any idea why this happens? > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Wed Feb 14 02:32:57 2018 From: julien.jomier at kitware.com (Julien Jomier) Date: Wed, 14 Feb 2018 08:32:57 +0100 Subject: [vtkusers] [ANN] CMake Training Course in France - March 12 Message-ID: Kitware will be holding a CMake training course on March 12, 2018 in Lyon, France. This one-day course will cover the best practice for CMake, CTest, CPack and CDash. Please visit our website for more information and registration details: https://training.kitware.fr/browse/170 Note that the course will be taught in English. If you have any questions, please contact us at training at kitware.fr or email me directly. 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 majid.msadeghi at yahoo.com Wed Feb 14 04:05:20 2018 From: majid.msadeghi at yahoo.com (Majid M. Sadeghi) Date: Wed, 14 Feb 2018 09:05:20 +0000 (UTC) Subject: [vtkusers] Convert vtkImageData to an itk::Image In-Reply-To: References: <271213644.174330.1518539517781.ref@mail.yahoo.com> <271213644.174330.1518539517781@mail.yahoo.com> Message-ID: <424306771.685882.1518599120779@mail.yahoo.com> Thanks, that did the job, sometimes silly mistakes create a headache. ? On Tuesday, February 13, 2018 10:17 PM, D?enan Zuki? wrote: Hi Majid, maybe you need to invoke?reslice->Update(); before importing its output into ITK? Regards,D?enan On Tue, Feb 13, 2018 at 11:31 AM, Majid M. Sadeghi via vtkusers wrote: Dear All, I read some DICOM data using vtkGDCMImageReader, then I change the sapacing and reslice them. Next I want to change that vtk image to itk image to be able to apply noise removal. But as soon as the code reaches the "filter_toitkimage->Update();" line the program just exits without saying anything (actually it says:The program '[14040] QtGuiApplication2.exe' has exited with code 3 (0x3).). Here is the code: vtkSmartPointer< vtkGDCMImageReader> reader = vtkSmartPointer< vtkGDCMImageReader>::New(); ??? reader->SetFileNames(vtkfiles) ; ??? reader->Update(); ??? ??? vtkSmartPointer< vtkImageChangeInformation> changer = vtkSmartPointer< vtkImageChangeInformation>:: New(); ??? changer->SetOutputSpacing( pixlespacing, pixlespacing, ippzspacing);//@majidnow ??? changer->SetInputConnection( reader->GetOutputPort()); ??? vtkSmartPointer< vtkImageReslice> reslice = vtkSmartPointer< vtkImageReslice>::New(); ??? reslice->SetInputConnection( changer->GetOutputPort()); ??? ??? //to change VTK image to ITK image ??? const unsigned int Dimension = 3; ??? using PixelType = double; ??? using ImageType = itk::Image< PixelType, Dimension >; ??? using FilterType = itk::VTKImageToImageFilter< ImageType >; ??? FilterType::Pointer filter_toitkimage = FilterType::New(); ??? filter_toitkimage->SetInput( reslice->GetOutput()); ??? try ??? { ??? ??? filter_toitkimage->Update(); ??? } ??? catch (itk::ExceptionObject & error) ??? { ??? ??? std::cerr << "Error: " << error << std::endl; ??? ??? //return EXIT_FAILURE; ??? }? Any idea why this happens? ______________________________ _________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/ opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_ FAQ Search the list archives at: http://markmail.org/search/?q= vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/ listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Wed Feb 14 10:24:48 2018 From: ochampao at hotmail.com (ochampao) Date: Wed, 14 Feb 2018 08:24:48 -0700 (MST) Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: References: <1518198259486-0.post@n5.nabble.com> <1518443415648-0.post@n5.nabble.com> <1518453945900-0.post@n5.nabble.com> <1518512241977-0.post@n5.nabble.com> <1518531123196-0.post@n5.nabble.com> Message-ID: <1518621888168-0.post@n5.nabble.com> Hi David and thanks for the detailed reply. Your reply makes clear the difference between "streaming" data vs. loading the whole volume in memory. However, with these in mind, I still can't explain the behaviour I observe in the minimal example that I have posted above (see [1], same code repeated below as well). Namely, if we assume that reader->Update() loads the whole volume in memory, then why calling resliceImageViewer->SetInputData(data) takes longer to complete if Update() is called at positions (1) or (2)? When stepping through the code to see what causes this delay (when Update() is called at position (1) or (2) ) I have noticed that execution spends most of its time at the following line: in->GetScalarRange(range); of the function vtkResliceImageViewer::SetInputData(vtkImageData *in) (line 450 in vtkResliceImageViewer.cxx). I guess, since the image is not yet loaded (when Update() is called at (3) ) calculating the scalar range on an "empty" image takes no time. It is as if in case (3) we are "cheating" and skipping the GetScalarRange() calculation. Doesn't GetScalarRange() get executed at some point even for case (3), and if yes, why does it take less time? Thanks, P. ======================= [1] http://vtk.1045678.n5.nabble.com/vtkResliceImageViewer-SetInputData-slow-when-executed-after-vtkDICOMImageReader-Update-td5746409.html#a5746426 ======================= #include "vtkDICOMImageReader.h" #include "vtkImageData.h" #include "vtkInteractorStyleImage.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkResliceImageViewer.h" #include "vtkSmartPointer.h" int main(int argc, char** argv) { vtkNew reader; vtkNew resliceImageViewer; vtkNew renderWindowInteractor; vtkNew style; vtkNew renderWindow; vtkNew renderer; vtkSmartPointer data; renderWindow->AddRenderer(renderer); renderer->SetBackground(0.0, 0.0, 0.0); renderWindowInteractor->SetInteractorStyle(style); reader->SetDirectoryName("path/to/dicom/series"); //reader->Update(); // --> (1) SetInputData() takes ~18 seconds data = reader->GetOutput(); //reader->Update(); // --> (2) SetInputData() takes ~18 seconds resliceImageViewer->SetInputData(data); reader->Update(); // --> (3) SetInputData() takes less than 1 seconds resliceImageViewer->SetRenderWindow(renderWindow); resliceImageViewer->SetupInteractor(renderWindowInteractor); resliceImageViewer->SetResliceModeToAxisAligned(); resliceImageViewer->SetSlice(50); resliceImageViewer->SetColorLevel(-27); resliceImageViewer->SetColorWindow(1358); renderWindowInteractor->Start(); return 0; } ======================= -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mafuentes at uclv.cu Thu Feb 15 09:00:15 2018 From: mafuentes at uclv.cu (mafuentes at uclv.cu) Date: Thu, 15 Feb 2018 09:00:15 -0500 (CST) Subject: [vtkusers] vtkTransform Message-ID: <707929113.829837.1518703215643.JavaMail.zimbra@uclv.cu> I'm trying to apply a transformation pipeline to a cylinder source in the following way: - Translation -x, -y, -z - RotationZ alpha - RotationX beta - Translation x, y, z That is, to move it to the origin of coordinates, rotate it and then translate it back to it's original position. the only way I've managed to make it work so far is to define a vtkTransform and a vtkTransformFilter for each operation and build a pipeline like that. Is there another way to do it so I don't have to create both objects for each operation? -------------- next part -------------- An HTML attachment was scrubbed... URL: From josp.jorge at gmail.com Thu Feb 15 09:32:16 2018 From: josp.jorge at gmail.com (Jorge Perez) Date: Thu, 15 Feb 2018 15:32:16 +0100 Subject: [vtkusers] vtkTransform In-Reply-To: <707929113.829837.1518703215643.JavaMail.zimbra@uclv.cu> References: <707929113.829837.1518703215643.JavaMail.zimbra@uclv.cu> Message-ID: Hi, you can compose the linear transformation using the method vtkTransform::Concatenate https://www.vtk.org/doc/nightly/html/classvtkTransform.html#a74585e7404fd08bf08637a126e63799e HTH Jorge 2018-02-15 15:00 GMT+01:00 : > I'm trying to apply a transformation pipeline to a cylinder source in the > following way: > > - Translation -x, -y, -z > > - RotationZ alpha > > - RotationX beta > > - Translation x, y, z > > > > That is, to move it to the origin of coordinates, rotate it and then > translate it back to it's original position. the only way I've managed to > make it work so far is to define a vtkTransform and a vtkTransformFilter > for each operation and build a pipeline like that. > > > > Is there another way to do it so I don't have to create both objects for > each operation? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Feb 15 09:56:14 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 15 Feb 2018 07:56:14 -0700 Subject: [vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update() In-Reply-To: <1518621888168-0.post@n5.nabble.com> References: <1518198259486-0.post@n5.nabble.com> <1518443415648-0.post@n5.nabble.com> <1518453945900-0.post@n5.nabble.com> <1518512241977-0.post@n5.nabble.com> <1518531123196-0.post@n5.nabble.com> <1518621888168-0.post@n5.nabble.com> Message-ID: Hi Panos, I peeked at the vtkResliceImageViewer source code and I see that its SetInputData() is not a simple setter method, it does a lot of work internally. This is very unusual for a VTK SetInputData() method. Your hypothesis about GetScalarRange() seems to be mostly correct. If things are done as follows, the SetInputData() method is fast: reader->Update(); data->GetScalarRange(); viewer->SetInputData(data); When GetScalarRange() is called, the result is cached so that when it's called again from the viewer it's fast. For case (3), I suspect that the viewer updates one slice of its input (via streaming) before calling GetScalarRange(). So that's why it would be fast in that case: the range is computed for just one slice, instead of for the entire volume. - David On Wed, Feb 14, 2018 at 8:24 AM, ochampao wrote: > Hi David and thanks for the detailed reply. > > Your reply makes clear the difference between "streaming" data vs. loading > the whole volume in memory. However, with these in mind, I still can't > explain the behaviour I observe in the minimal example that I have posted > above (see [1], same code repeated below as well). Namely, if we assume > that > reader->Update() loads the whole volume in memory, then why calling > resliceImageViewer->SetInputData(data) takes longer to complete if > Update() > is called at positions (1) or (2)? > > When stepping through the code to see what causes this delay (when Update() > is called at position (1) or (2) ) I have noticed that execution spends > most > of its time at the following line: > > in->GetScalarRange(range); > > of the function vtkResliceImageViewer::SetInputData(vtkImageData *in) > (line > 450 in vtkResliceImageViewer.cxx). > > I guess, since the image is not yet loaded (when Update() is called at (3) > ) > calculating the scalar range on an "empty" image takes no time. It is as if > in case (3) we are "cheating" and skipping the GetScalarRange() > calculation. > Doesn't GetScalarRange() get executed at some point even for case (3), and > if yes, why does it take less time? > > Thanks, > P. > > ======================= > > [1] > http://vtk.1045678.n5.nabble.com/vtkResliceImageViewer- > SetInputData-slow-when-executed-after-vtkDICOMImageReader-Update- > td5746409.html#a5746426 > > ======================= > > #include "vtkDICOMImageReader.h" > #include "vtkImageData.h" > #include "vtkInteractorStyleImage.h" > #include "vtkRenderer.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkResliceImageViewer.h" > #include "vtkSmartPointer.h" > > int main(int argc, char** argv) > { > vtkNew reader; > vtkNew resliceImageViewer; > vtkNew renderWindowInteractor; > vtkNew style; > vtkNew renderWindow; > vtkNew renderer; > vtkSmartPointer data; > > renderWindow->AddRenderer(renderer); > renderer->SetBackground(0.0, 0.0, 0.0); > renderWindowInteractor->SetInteractorStyle(style); > > reader->SetDirectoryName("path/to/dicom/series"); > //reader->Update(); // --> (1) SetInputData() takes ~18 seconds > data = reader->GetOutput(); > //reader->Update(); // --> (2) SetInputData() takes ~18 seconds > > resliceImageViewer->SetInputData(data); > reader->Update(); // --> (3) SetInputData() takes less than 1 seconds > resliceImageViewer->SetRenderWindow(renderWindow); > resliceImageViewer->SetupInteractor(renderWindowInteractor); > resliceImageViewer->SetResliceModeToAxisAligned(); > resliceImageViewer->SetSlice(50); > resliceImageViewer->SetColorLevel(-27); > resliceImageViewer->SetColorWindow(1358); > > renderWindowInteractor->Start(); > > return 0; > } > > ======================= > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wumengda at gmail.com Thu Feb 15 11:56:20 2018 From: wumengda at gmail.com (Wei Xiong) Date: Thu, 15 Feb 2018 16:56:20 +0000 Subject: [vtkusers] (no subject) Message-ID: <9085951c9xxb$b7xam8t8$9txpz40e$@tercap.es> good evening Vtkusers http://bit.ly/2EpG9TP WarmestWei Xiong -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Fri Feb 16 11:57:52 2018 From: sean at rogue-research.com (Sean McBride) Date: Fri, 16 Feb 2018 11:57:52 -0500 Subject: [vtkusers] PCA statistics change In-Reply-To: References: Message-ID: <20180216165752.349846033@mail.rogue-research.com> On Wed, 31 Jan 2018 08:45:11 -0500, David Thompson said: >Recently, Ben switched VTK to use Eigen's singular value decomposition. >It reports some eigenvectors flipped. Notably, it seems to prefer a >right-handed coordinate system as its output basis in 3D. This is >great! ... but note that image tests that plot assessed values (i.e., >the inputs projected into the new basis) may now return different >results with the y axis assessed-value flipped. > >Does anyone know if the VTKExamples repo does image-based tests? If so, >I expect that may be causing a failure. However, it is unclear from the >test output[1] whether an OpenGL/machine configuration error is masking >an image test failure. David, Ben, We are seeing this too when running our company's own tests built against VTK master. Is this change considered a breakage of vtkPCAStatistics? Will you be changing things to make vtkPCAStatistics behave as it used to? Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From david.thompson at kitware.com Fri Feb 16 12:12:06 2018 From: david.thompson at kitware.com (David Thompson) Date: Fri, 16 Feb 2018 12:12:06 -0500 Subject: [vtkusers] PCA statistics change In-Reply-To: <20180216165752.349846033@mail.rogue-research.com> References: <20180216165752.349846033@mail.rogue-research.com> Message-ID: <221DC717-3DBC-43CC-9F08-FA42339955E7@kitware.com> Hi Sean, > We are seeing this too when running our company's own tests built against VTK master. > > Is this change considered a breakage of vtkPCAStatistics? Will you be changing things to make vtkPCAStatistics behave as it used to? No. Eigenvectors reported by singular value decomposition are not totally constrained: 1. Vectors may have their direction flipped. 2. In the case of eigenvalues with identical or nearly identical values (such that differences in floating point calculations may change their ordering) the reported order of vectors may vary. We have switched the implementation of SVD we use (from an old alglib to a new Eigen), so these differences are expected and in some cases preferable. You should adjust baselines appropriately. However, if you see a case where the SVD is failing (i.e., Nan/Inf values where there were none before), that is a bug we should fix. David From seun at rogue-research.com Fri Feb 16 14:36:03 2018 From: seun at rogue-research.com (Seun Odutola) Date: Fri, 16 Feb 2018 14:36:03 -0500 Subject: [vtkusers] Swapping Fragment shaders correctly. Message-ID: <16DE0D6C-B5AB-423D-BA86-803BE8D26B3A@rogue-research.com> Hi all, I was wondering if anyone could shed some light on how to replace shaders. I have a vtkActor with its fragment shader customized, basically I have a vtkPolyDataMapper connected as a Mapper to my vtkActor, this is casted down as a vtkOpenGLPolyDataMapper in order to access the customization via AddShaderReplacement et al. The problem I have is that although this works fine (as I do see the shader effect) the issue arises when I want to swap the current fragment shader to another custom shader i.e: I have both retina and non retina display and would like the mapper to use a custom shader designated for each display when I move between screens. I tried to ClearAllShaderReplacement(s) and still no noticeable change. Is there something am missing or how does one go about this? Regards, Seun From allison.vacanti at kitware.com Fri Feb 16 16:39:29 2018 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Fri, 16 Feb 2018 16:39:29 -0500 Subject: [vtkusers] [vtk-developers] QVTKOpenGLWidget + SSAA pass breaks depth peeling In-Reply-To: References: Message-ID: Hi Simon, This is intended behavior. Setting a pass on the renderer bypasses the renderer's internal settings, and only the specified pass will be rendered. This means that the call to l_renderer->SetUseDepthPeeling(true); has no effect; only the l_ssaa render pass will be executed. Your l_ssaa pass delegates to an instance of vtkRenderPassStepsPass, which by default uses vtkTranslucentPass for rendering the translucent geometry -- this only does basic alpha blending, not depth peeling. What you want to do is replace the translucent pass with one that performs depth peeling. Something like this should work: ... // setup SSAA pass vtkSmartPointer l_basic_passes = vtkSmartPointer::New(); vtkSmartPointer l_ssaa = vtkSmartPointer::New(); l_ssaa->SetDelegatePass( l_basic_passes ); l_renderer->SetPass( l_ssaa ); // Enable depth peeling. This pass is defined in the vtkRenderingOpenGL2 module. vtkSmartPointer l_peel = vtkSmartPointer::New(); l_basic_passes->SetTranslucentPass(l_peel); ... If you have issues with the dual depth peeling pass, try the older vtkDepthPeelingPass. It's a bit slower, but still works. HTH, Allie On Tue, Feb 13, 2018 at 3:54 AM, Simon Esneault wrote: > Hello VTK community > > Is seems adding an SSAA rendering pass breaks the depth peeling process. > Attached is an example that highlight the problem. When commenting out the > line 64 (l_renderer->SetPass( l_ssaa ); the translucent geometry is > rendered correctly, but the result is not anti-aliased. > > With SSAA pass -> Depth Peeling broken : https://cdn.pbrd.co/images/ > H7qnZxC.png > Without SSAA pass -> Depth Peeling ok : https://cdn.pbrd.co/images/ > H7qnvE9.png > > Shall I fill a bug for this ? > > Thanks > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cris.ardito at gmail.com Sat Feb 17 14:54:24 2018 From: cris.ardito at gmail.com (ING. CRISTIAN ARDITO) Date: Sat, 17 Feb 2018 20:54:24 +0100 Subject: [vtkusers] (no subject) In-Reply-To: References: Message-ID: Yes Yes Yes Yes you can you can y70700? L -------------- next part -------------- An HTML attachment was scrubbed... URL: From polly_sukting at hotmail.com Sun Feb 18 01:51:40 2018 From: polly_sukting at hotmail.com (Polly Lina) Date: Sat, 17 Feb 2018 23:51:40 -0700 (MST) Subject: [vtkusers] How to apply different colours to the extracted mean curvature in vtkcurvature In-Reply-To: References: <1517419753024-0.post@n5.nabble.com> Message-ID: <1518936700221-0.post@n5.nabble.com> Hi Andrew, Thanks for your advice. I have another question. How can I save the colour values which are extracted on the surfaces? For example, those surfaces that are allocated with red, yellow etc. Then I need them to proceed to localisation process. Thanks again. Regards, Polly -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From simon.esneault at gmail.com Sun Feb 18 04:31:18 2018 From: simon.esneault at gmail.com (Simon Esneault) Date: Sun, 18 Feb 2018 10:31:18 +0100 Subject: [vtkusers] [vtk-developers] QVTKOpenGLWidget + SSAA pass breaks depth peeling In-Reply-To: References: Message-ID: Hello Allie, Thanks for the explanation, that make complete sense, and it works ! Simon 2018-02-16 22:39 GMT+01:00 Allie Vacanti : > Hi Simon, > > This is intended behavior. Setting a pass on the renderer bypasses the > renderer's internal settings, and only the specified pass will be rendered. > This means that the call to l_renderer->SetUseDepthPeeling(true); has no > effect; only the l_ssaa render pass will be executed. > > Your l_ssaa pass delegates to an instance of vtkRenderPassStepsPass, which > by default uses vtkTranslucentPass for rendering the translucent geometry > -- this only does basic alpha blending, not depth peeling. > > What you want to do is replace the translucent pass with one that performs > depth peeling. Something like this should work: > > ... > > // setup SSAA pass > vtkSmartPointer l_basic_passes = vtkSmartPointer< > vtkRenderStepsPass>::New(); > vtkSmartPointer l_ssaa = vtkSmartPointer:: > New(); > l_ssaa->SetDelegatePass( l_basic_passes ); > l_renderer->SetPass( l_ssaa ); > > // Enable depth peeling. This pass is defined in the > vtkRenderingOpenGL2 module. > vtkSmartPointer l_peel = vtkSmartPointer< > vtkDualDepthPeelingPass>::New(); > l_basic_passes->SetTranslucentPass(l_peel); > > ... > > If you have issues with the dual depth peeling pass, try the older > vtkDepthPeelingPass. It's a bit slower, but still works. > > HTH, > Allie > > On Tue, Feb 13, 2018 at 3:54 AM, Simon Esneault > wrote: > >> Hello VTK community >> >> Is seems adding an SSAA rendering pass breaks the depth peeling process. >> Attached is an example that highlight the problem. When commenting out the >> line 64 (l_renderer->SetPass( l_ssaa ); the translucent geometry is >> rendered correctly, but the result is not anti-aliased. >> >> With SSAA pass -> Depth Peeling broken : https://cdn.pbrd.co/images/H >> 7qnZxC.png >> Without SSAA pass -> Depth Peeling ok : https://cdn.pbrd.co/images/H >> 7qnvE9.png >> >> Shall I fill a bug for this ? >> >> Thanks >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From yaneury.fermin at stonybrook.edu Sun Feb 18 11:36:47 2018 From: yaneury.fermin at stonybrook.edu (Yaneury Fermin) Date: Sun, 18 Feb 2018 11:36:47 -0500 Subject: [vtkusers] CT Scan Images Message-ID: Hello, I'm a student who was recently tasked with developing web-based CT images renderer. The goal of the project is to develop a web app that allows users to upload CT image scans and allows for basic image manipulation for analysis. The file types used for the CT scans are .mhd (header information, simple .INI structure), .zraw (not quite sure what that is) and .vtk (not sure what that is either). Our mentor had mentioned that the VTK library (the C++ version) supports the rendering of these files, but isn't sure if the vtk.js binding library does. Do you know if the javascript library supports rendering these files? If so, are there any examples that I might have missed that demonstrate how to do so? Forgive me if I'm misunderstanding what the VTK library does, as I'm new to both these file types, and the VTK library as whole. Our mentor uses the QT application Seg3D2 to render these types of file and we're basically porting that desktop application to a web version. I've attached a link to the sample data in case you're interested in what the dataset we need to render is. Any help is greatly appreciated, as myself and my partner are at our wits' end. Thank you, Yaneury Fermin ?? Sample Data -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Sun Feb 18 12:36:52 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Sun, 18 Feb 2018 09:36:52 -0800 Subject: [vtkusers] ANN: VTK File Formats is now part of VTKExamples Message-ID: Folks, Motivated by Berk and Will, Andrew Maclean and I have converted and enhanced the VTK File Formats document: https://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf The new document is here: https://lorensen.github.io/VTKExamples/site/VTKFileFormats/ The figures in the new document correspond to the data described. Also, the figures refer to the nightly regression tested images. The source code for the examples that generate the images is also available as part of the VTKExamples site. Figure 2: https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/LinearCellDemo/ Figure 3: https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/IsoparametricCellsDemo/ Figure 4: https://lorensen.github.io/VTKExamples/site/Cxx/IO/ReadLegacyUnstructuredGrid/ Figure 5: https://lorensen.github.io/VTKExamples/site/VTKFileFormats/ Enjoy VTK! Bill -- Unpaid intern in BillsParadise at noware dot com From will.schroeder at kitware.com Sun Feb 18 12:55:15 2018 From: will.schroeder at kitware.com (Will Schroeder) Date: Sun, 18 Feb 2018 12:55:15 -0500 Subject: [vtkusers] [vtk-developers] ANN: VTK File Formats is now part of VTKExamples In-Reply-To: References: Message-ID: Andrew and Bill rock! or as they would say: Old guys Rule! This is another huge resource for the community.... On Sun, Feb 18, 2018 at 12:36 PM, Bill Lorensen wrote: > Folks, > > Motivated by Berk and Will, Andrew Maclean and I have converted and > enhanced the VTK File Formats document: > https://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf > > The new document is here: > https://lorensen.github.io/VTKExamples/site/VTKFileFormats/ > > The figures in the new document correspond to the data described. > Also, the figures refer to the nightly regression tested images. The > source code for the examples that generate the images is also > available as part of the VTKExamples site. > > Figure 2: https://lorensen.github.io/VTKExamples/site/Cxx/ > GeometricObjects/LinearCellDemo/ > > Figure 3: https://lorensen.github.io/VTKExamples/site/Cxx/ > GeometricObjects/IsoparametricCellsDemo/ > > Figure 4: https://lorensen.github.io/VTKExamples/site/Cxx/IO/ > ReadLegacyUnstructuredGrid/ > > Figure 5: https://lorensen.github.io/VTKExamples/site/VTKFileFormats/ > > > Enjoy VTK! > > Bill > -- > Unpaid intern in BillsParadise at noware dot com > _______________________________________________ > 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: > https://vtk.org/mailman/listinfo/vtk-developers > > -- William J. Schroeder, PhD Kitware, Inc. - Building the World's Technical Computing Software 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Mon Feb 19 02:51:50 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Mon, 19 Feb 2018 08:51:50 +0100 Subject: [vtkusers] [vtk-developers] ANN: VTK File Formats is now part of VTKExamples In-Reply-To: References: Message-ID: Fantastic guys! Elvis Den 18 feb. 2018 6:36 em skrev "Bill Lorensen" : > Folks, > > Motivated by Berk and Will, Andrew Maclean and I have converted and > enhanced the VTK File Formats document: > https://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf > > The new document is here: > https://lorensen.github.io/VTKExamples/site/VTKFileFormats/ > > The figures in the new document correspond to the data described. > Also, the figures refer to the nightly regression tested images. The > source code for the examples that generate the images is also > available as part of the VTKExamples site. > > Figure 2: https://lorensen.github.io/VTKExamples/site/Cxx/ > GeometricObjects/LinearCellDemo/ > > Figure 3: https://lorensen.github.io/VTKExamples/site/Cxx/ > GeometricObjects/IsoparametricCellsDemo/ > > Figure 4: https://lorensen.github.io/VTKExamples/site/Cxx/IO/ > ReadLegacyUnstructuredGrid/ > > Figure 5: https://lorensen.github.io/VTKExamples/site/VTKFileFormats/ > > > Enjoy VTK! > > Bill > -- > Unpaid intern in BillsParadise at noware dot com > _______________________________________________ > 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: > https://vtk.org/mailman/listinfo/vtk-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhlegarreta at vicomtech.org Mon Feb 19 02:53:51 2018 From: jhlegarreta at vicomtech.org (Jon Haitz Legarreta) Date: Mon, 19 Feb 2018 08:53:51 +0100 Subject: [vtkusers] [vtk-developers] ANN: VTK File Formats is now part of VTKExamples In-Reply-To: References: Message-ID: Andrew, Bill, this is brilliant !! A huge thanks. JON HAITZ -- On 19 February 2018 at 08:51, Elvis Stansvik wrote: > Fantastic guys! > > Elvis > > > Den 18 feb. 2018 6:36 em skrev "Bill Lorensen" : > >> Folks, >> >> Motivated by Berk and Will, Andrew Maclean and I have converted and >> enhanced the VTK File Formats document: >> https://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf >> >> The new document is here: >> https://lorensen.github.io/VTKExamples/site/VTKFileFormats/ >> >> The figures in the new document correspond to the data described. >> Also, the figures refer to the nightly regression tested images. The >> source code for the examples that generate the images is also >> available as part of the VTKExamples site. >> >> Figure 2: https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObj >> ects/LinearCellDemo/ >> >> Figure 3: https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObj >> ects/IsoparametricCellsDemo/ >> >> Figure 4: https://lorensen.github.io/VTKExamples/site/Cxx/IO/ReadLegac >> yUnstructuredGrid/ >> >> Figure 5: https://lorensen.github.io/VTKExamples/site/VTKFileFormats/ >> >> >> Enjoy VTK! >> >> Bill >> -- >> Unpaid intern in BillsParadise at noware dot com >> _______________________________________________ >> 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: >> https://vtk.org/mailman/listinfo/vtk-developers >> >> > _______________________________________________ > 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: > https://vtk.org/mailman/listinfo/vtk-developers > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.john.parker at googlemail.com Mon Feb 19 04:59:01 2018 From: andy.john.parker at googlemail.com (Andrew Parker) Date: Mon, 19 Feb 2018 09:59:01 +0000 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: Andy, I can confirm this now works for my parallel code. However, I have a separate stand-alone serial code (has never had a communicator) which still calls the vtkXMLPUnstructuredGridWriter and produces several part/piece meshes and one global pvtu file. This now fails with 7.1.1, same error before, only one entry in the pvtu. I have tried to make the changes noted in your demo file (which have worked for my parallel code) but in this instance they do not work in my serial code. I have also tried the vtkDummyController as a well as vtkmpicontroller, and have also tried explicitly setting the number of (fake) processors: vtk_mpi_controller-> SetNumberOfProcesses(4); Could I ask what the recommended way to now use the vtkXMLPUnstructuredGridWriter is from a completely serial code where I still wish to write out piece meshes (and a corresponding pvtu) and do not have a communicator? I should add this is not threaded code either. The vtk 7.1.1 build is the same one that is now working correctly in my mpi parallel code. Cheers again, Andy On 6 February 2018 at 13:48, Andy Bauer wrote: > My guess is that you've forgotten: > > controller->SetGlobalController(controller); > > Could you also verify that VTK was built with MPI enabled? If you try my > example file does that work properly for you with both VTK versions? > > > On Tue, Feb 6, 2018 at 4:49 AM, Andrew Parker < > andy.john.parker at googlemail.com> wrote: > >> Andy, >> >> To follow up. So this is a direct copy of my source for writing vtu in >> parallel via mpi, no edits: >> >> vtkSmartPointer pwriter = >> vtkSmartPointer::New(); >> std::stringstream sss; >> sss << outputDirectory << "/"; >> sss << outputPrefix; >> sss << "Parts"; >> sss << ".pvtu"; >> >> pwriter->SetFileName(sss.str().c_str()); >> pwriter->SetNumberOfPieces(comms.Size()); >> if(comms.IsParallel()) >> pwriter->SetGhostLevel(1); >> pwriter->SetStartPiece(comms.Rank()); >> pwriter->SetEndPiece(comms.Rank()); >> pwriter->SetInputData(cellGrid); >> // pwriter->SetDataModeToAscii(); >> pwriter->SetDataModeToBinary(); >> pwriter->SetCompressorTypeToZLib(); >> pwriter->Write(); >> >> and for vtp files in parallel via mpi, no edits: >> >> vtkSmartPointer pwriter = >> vtkSmartPointer::New(); >> std::stringstream sss; >> sss << outputDirectory << "/"; >> sss << outputPrefix; >> sss << bcName << "_"; >> sss << prefix; >> sss << ".pvtp"; >> std::cout << "Output file name: " << sss.str().c_str() << std::endl; >> >> pwriter->SetFileName(sss.str().c_str()); >> pwriter->SetNumberOfPieces(comms->Size()); >> if(comms->IsParallel()) >> pwriter->SetGhostLevel(1); >> pwriter->SetStartPiece(comms->Rank()); >> pwriter->SetEndPiece(comms->Rank()); >> pwriter->SetInputData(boundingFaceGrids[i]); >> pwriter->SetDataModeToBinary(); >> //pwriter->SetDataModeToAscii(); >> pwriter->SetCompressorTypeToZLib(); >> pwriter->Write(); >> >> I initialise the vtk-comms object in an identical way to your demo code, >> after my own mpi-comms, and I finalize before I finalize mine. In between >> those calls the above source is called. All processors partake in all >> calls both to init the vtk-mpi and in the above writing. >> >> Do you have any further thoughts as to the problem? Problem goes away if >> I use 6.3.... >> >> Cheers, >> Andy >> >> >> On 5 February 2018 at 18:40, Andrew Parker > om> wrote: >> >>> Andy, >>> >>> My own code. I?ve always had those Piece lines in my src from day one, >>> and always used it via mpi, so don?t need added. All procs call all lines >>> in my file writer. There is no if-master-section. Literally just a vtk >>> version number change that causes the problem. Can?t get the data files or >>> the cut down source until tomorrow. >>> >>> I shared the other two links as those in addition to this post are the >>> only places I can find that reference such a major change to the library >>> that is undocumented and causes such a significant change to user code. Are >>> there any further references on this change that I can read about to try to >>> resolve this? >>> >>> I find it strange that this has not come up more. It would mean all >>> users of 7.1 without the additional vtkmpicontroller lines would fail when >>> calling a parallel writer from a parallel mpi-user-code.... >>> >>> Cheers, >>> Andy >>> >>> On Mon, 5 Feb 2018 at 18:07, Andy Bauer wrote: >>> >>>> Are you using libMesh or another simulation code? You'll definitely >>>> need the following to tell each process what piece it has: >>>> pwriter->SetNumberOfPieces(nprocs); >>>> >>>> pwriter->SetStartPiece(rank); >>>> >>>> pwriter->SetEndPiece(rank); >>>> >>>> pwriter->Write(); >>>> >>>> Can you share the portion of your code that uses >>>> vtkXMLPUnstructuredGridWriter? Also, looking at the data files from 6.3 and >>>> 7.1.1 may help. >>>> >>>> Thanks, >>>> Andy >>>> >>>> >>>> On Mon, Feb 5, 2018 at 12:08 PM, Andrew Parker < >>>> andy.john.parker at googlemail.com> wrote: >>>> >>>>> Andy, >>>>> >>>>> Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of me get >>>>> your modifications to work from your vtk_test.C. I've included the >>>>> vtkmpiController stuff after I init mpi myself. I found the migration >>>>> problem mentioned here: >>>>> >>>>> https://github.com/libMesh/libmesh/issues/1179 >>>>> >>>>> and here: >>>>> >>>>> https://gitlab.kitware.com/vtk/vtk/issues/16924 >>>>> >>>>> as well as this post. My parallel unstructured grid now only contains >>>>> one source within the piece section of the pvtu, as opposed to n-processor >>>>> sources (all processors have real data to write and this is not a case of >>>>> empty meshes on these processors). I can re-link and recompile against 6.3 >>>>> and the problem goes away and I get the correct number of sources written >>>>> to the pvtu file as before. Can you help? I make extensive use of pvtu >>>>> files from my mpi-based code and now all grid files (pvtu and pvtp) have >>>>> stopped working just by moving to 7.1.1 (which has been built with >>>>> mpi-enabled). >>>>> >>>>> Any thoughts? >>>>> >>>>> Thanks, >>>>> Andy >>>>> >>>>> >>>>> On 6 December 2016 at 16:12, Andy Bauer >>>>> wrote: >>>>> >>>>>> Hi John, >>>>>> >>>>>> The issue is indeed due to changes that I mentioned before (i.e. only >>>>>> data sets that have data get written out and the .pvtu file is adjusted >>>>>> accordingly). With this change though interprocess communication is >>>>>> required which is done the the vtkMultiProcessController::GetGlobalController() >>>>>> object which essentially acts as MPI_COMM_WORLD within VTK. You need to >>>>>> create a vtkMPIController which derives from vtkMultiProcessController. See >>>>>> the attached files for how that is done. This should also be backwards >>>>>> compatible but if it isn't, please let us know. >>>>>> >>>>>> Best, >>>>>> Andy >>>>>> >>>>>> ps. Ignore the ADIOS stuff in there (it's commented out). I was >>>>>> trying to do two things at once and that's why the ADIOS stuff is in the >>>>>> CMakeLists.txt. >>>>>> >>>>>> On Mon, Dec 5, 2016 at 6:06 PM, John Peterson >>>>>> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer >>>>>>> wrote: >>>>>>> >>>>>>>> Beyond this I can't think of any change off the top of my head that >>>>>>>> would cause your issue. I looked at the repo but can't figure out the VTK >>>>>>>> configurations from that. If you can share a simple test case which >>>>>>>> demonstrates the issue I may be able to easily diagnose it. >>>>>>>> >>>>>>> >>>>>>> Here's a standalone test code that reproduces the issue for me: >>>>>>> >>>>>>> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b14ee1d7 >>>>>>> >>>>>>> Run on two procs with: mpiexec -np 2 and I get the following >>>>>>> test.pvtu file: >>>>>>> >>>>>>> >>>>>>>> >>>>>>> byte_order="LittleEndian" header_type="UInt32" >>>>>>>> compressor="vtkZLibDataCompressor"> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> NumberOfComponents="3"/> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> As you can see, only one "Piece Source" is listed, but the output of >>>>>>> the program is actually all 3 files (test.pvtu, test_0.vtu, test_1.vtu) and >>>>>>> both the _0 and _1 files have nodes in them. Furthermore, if I simply add >>>>>>> a second "Piece Source" line corresponding to "test_1.vtu", the whole thing >>>>>>> opens up just fine in Paraview. I am a novice VTK programmer so it's very >>>>>>> possible I'm doing something wrong, but this code definitely worked in VTK >>>>>>> 6.x, and 7.0. >>>>>>> >>>>>>> Thanks for your help, >>>>>>> John >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> 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 ashtonpark7 at gmail.com Mon Feb 19 05:26:31 2018 From: ashtonpark7 at gmail.com (Minsuk Park) Date: Mon, 19 Feb 2018 19:26:31 +0900 Subject: [vtkusers] SetCallbackMethod, add new keyPressEvent Message-ID: Hi! I'm pretty much beginner of vtk and its application. I applied vtkContourWidget on renderWindow and hope to add a new keyPressEvent on it. So I am now trying to change the vtkContourWidget.cxx file directly and add *this->CallbackMapper->SetCallbackMethod(vtkCommand::KeyPressEvent,* * vtkEvent::NoModifier, 13, 1, "Return",* * vtkWidgetEvent::Reset,* * this, vtkContourWidget::ResetAction);* this for new Action when I pressed Return(I guess it is "Enter"), which acts ResetAction when Shift+Del is pressed like behind *this->CallbackMapper->SetCallbackMethod(vtkCommand::KeyPressEvent,* * vtkEvent::ShiftModifier, 127, 1, "Delete",* * vtkWidgetEvent::Reset,* * this, vtkContourWidget::ResetAction);* However, "Return" doesn't work and I couldn't figure it out. I am pretty much sure that I am not supposed to add the keyPressEvent in this way, but I don't know what to do. How can I add a new keyPressEvent for a new key on vtkWidget? -- ------------------------------------------------------------ -------------------------------------------------- *Minsuk Park* Mobile: +82-10-7329-9912 Email: ashtonpark7 at gmail.com ------------------------------------------------------------ -------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Mon Feb 19 07:38:58 2018 From: andy.bauer at kitware.com (Andy Bauer) Date: Mon, 19 Feb 2018 07:38:58 -0500 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: If you haven't used the SetStartPiece(), SetEndPiece() and SetNumberOfPieces() methods in serial that's what is probably missing. In serial you should be able to use vtkDummyController. On Mon, Feb 19, 2018 at 4:59 AM, Andrew Parker < andy.john.parker at googlemail.com> wrote: > Andy, > > I can confirm this now works for my parallel code. However, I have a > separate stand-alone serial code (has never had a communicator) which still > calls the vtkXMLPUnstructuredGridWriter and produces several part/piece > meshes and one global pvtu file. This now fails with 7.1.1, same error > before, only one entry in the pvtu. I have tried to make the changes noted > in your demo file (which have worked for my parallel code) but in this > instance they do not work in my serial code. I have also tried the > vtkDummyController as a well as vtkmpicontroller, and have also tried > explicitly setting the number of (fake) processors: vtk_mpi_controller-> > SetNumberOfProcesses(4); > > Could I ask what the recommended way to now use the vtkXMLPUnstructuredGridWriter > is from a completely serial code where I still wish to write out piece > meshes (and a corresponding pvtu) and do not have a communicator? I should > add this is not threaded code either. The vtk 7.1.1 build is the same one > that is now working correctly in my mpi parallel code. > > Cheers again, > Andy > > On 6 February 2018 at 13:48, Andy Bauer wrote: > >> My guess is that you've forgotten: >> >> controller->SetGlobalController(controller); >> >> Could you also verify that VTK was built with MPI enabled? If you try my >> example file does that work properly for you with both VTK versions? >> >> >> On Tue, Feb 6, 2018 at 4:49 AM, Andrew Parker < >> andy.john.parker at googlemail.com> wrote: >> >>> Andy, >>> >>> To follow up. So this is a direct copy of my source for writing vtu in >>> parallel via mpi, no edits: >>> >>> vtkSmartPointer pwriter = >>> vtkSmartPointer::New(); >>> std::stringstream sss; >>> sss << outputDirectory << "/"; >>> sss << outputPrefix; >>> sss << "Parts"; >>> sss << ".pvtu"; >>> >>> pwriter->SetFileName(sss.str().c_str()); >>> pwriter->SetNumberOfPieces(comms.Size()); >>> if(comms.IsParallel()) >>> pwriter->SetGhostLevel(1); >>> pwriter->SetStartPiece(comms.Rank()); >>> pwriter->SetEndPiece(comms.Rank()); >>> pwriter->SetInputData(cellGrid); >>> // pwriter->SetDataModeToAscii(); >>> pwriter->SetDataModeToBinary(); >>> pwriter->SetCompressorTypeToZLib(); >>> pwriter->Write(); >>> >>> and for vtp files in parallel via mpi, no edits: >>> >>> vtkSmartPointer pwriter = >>> vtkSmartPointer::New(); >>> std::stringstream sss; >>> sss << outputDirectory << "/"; >>> sss << outputPrefix; >>> sss << bcName << "_"; >>> sss << prefix; >>> sss << ".pvtp"; >>> std::cout << "Output file name: " << sss.str().c_str() << std::endl; >>> >>> pwriter->SetFileName(sss.str().c_str()); >>> pwriter->SetNumberOfPieces(comms->Size()); >>> if(comms->IsParallel()) >>> pwriter->SetGhostLevel(1); >>> pwriter->SetStartPiece(comms->Rank()); >>> pwriter->SetEndPiece(comms->Rank()); >>> pwriter->SetInputData(boundingFaceGrids[i]); >>> pwriter->SetDataModeToBinary(); >>> //pwriter->SetDataModeToAscii(); >>> pwriter->SetCompressorTypeToZLib(); >>> pwriter->Write(); >>> >>> I initialise the vtk-comms object in an identical way to your demo code, >>> after my own mpi-comms, and I finalize before I finalize mine. In between >>> those calls the above source is called. All processors partake in all >>> calls both to init the vtk-mpi and in the above writing. >>> >>> Do you have any further thoughts as to the problem? Problem goes away >>> if I use 6.3.... >>> >>> Cheers, >>> Andy >>> >>> >>> On 5 February 2018 at 18:40, Andrew Parker < >>> andy.john.parker at googlemail.com> wrote: >>> >>>> Andy, >>>> >>>> My own code. I?ve always had those Piece lines in my src from day one, >>>> and always used it via mpi, so don?t need added. All procs call all lines >>>> in my file writer. There is no if-master-section. Literally just a vtk >>>> version number change that causes the problem. Can?t get the data files or >>>> the cut down source until tomorrow. >>>> >>>> I shared the other two links as those in addition to this post are the >>>> only places I can find that reference such a major change to the library >>>> that is undocumented and causes such a significant change to user code. Are >>>> there any further references on this change that I can read about to try to >>>> resolve this? >>>> >>>> I find it strange that this has not come up more. It would mean all >>>> users of 7.1 without the additional vtkmpicontroller lines would fail when >>>> calling a parallel writer from a parallel mpi-user-code.... >>>> >>>> Cheers, >>>> Andy >>>> >>>> On Mon, 5 Feb 2018 at 18:07, Andy Bauer wrote: >>>> >>>>> Are you using libMesh or another simulation code? You'll definitely >>>>> need the following to tell each process what piece it has: >>>>> pwriter->SetNumberOfPieces(nprocs); >>>>> >>>>> pwriter->SetStartPiece(rank); >>>>> >>>>> pwriter->SetEndPiece(rank); >>>>> >>>>> pwriter->Write(); >>>>> >>>>> Can you share the portion of your code that uses >>>>> vtkXMLPUnstructuredGridWriter? Also, looking at the data files from 6.3 and >>>>> 7.1.1 may help. >>>>> >>>>> Thanks, >>>>> Andy >>>>> >>>>> >>>>> On Mon, Feb 5, 2018 at 12:08 PM, Andrew Parker < >>>>> andy.john.parker at googlemail.com> wrote: >>>>> >>>>>> Andy, >>>>>> >>>>>> Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of me >>>>>> get your modifications to work from your vtk_test.C. I've included the >>>>>> vtkmpiController stuff after I init mpi myself. I found the migration >>>>>> problem mentioned here: >>>>>> >>>>>> https://github.com/libMesh/libmesh/issues/1179 >>>>>> >>>>>> and here: >>>>>> >>>>>> https://gitlab.kitware.com/vtk/vtk/issues/16924 >>>>>> >>>>>> as well as this post. My parallel unstructured grid now only >>>>>> contains one source within the piece section of the pvtu, as opposed to >>>>>> n-processor sources (all processors have real data to write and this is not >>>>>> a case of empty meshes on these processors). I can re-link and recompile >>>>>> against 6.3 and the problem goes away and I get the correct number of >>>>>> sources written to the pvtu file as before. Can you help? I make >>>>>> extensive use of pvtu files from my mpi-based code and now all grid files >>>>>> (pvtu and pvtp) have stopped working just by moving to 7.1.1 (which has >>>>>> been built with mpi-enabled). >>>>>> >>>>>> Any thoughts? >>>>>> >>>>>> Thanks, >>>>>> Andy >>>>>> >>>>>> >>>>>> On 6 December 2016 at 16:12, Andy Bauer >>>>>> wrote: >>>>>> >>>>>>> Hi John, >>>>>>> >>>>>>> The issue is indeed due to changes that I mentioned before (i.e. >>>>>>> only data sets that have data get written out and the .pvtu file is >>>>>>> adjusted accordingly). With this change though interprocess communication >>>>>>> is required which is done the the vtkMultiProcessController::GetGlobalController() >>>>>>> object which essentially acts as MPI_COMM_WORLD within VTK. You need to >>>>>>> create a vtkMPIController which derives from vtkMultiProcessController. See >>>>>>> the attached files for how that is done. This should also be backwards >>>>>>> compatible but if it isn't, please let us know. >>>>>>> >>>>>>> Best, >>>>>>> Andy >>>>>>> >>>>>>> ps. Ignore the ADIOS stuff in there (it's commented out). I was >>>>>>> trying to do two things at once and that's why the ADIOS stuff is in the >>>>>>> CMakeLists.txt. >>>>>>> >>>>>>> On Mon, Dec 5, 2016 at 6:06 PM, John Peterson >>>>>>> wrote: >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer >>>>>>> > wrote: >>>>>>>> >>>>>>>>> Beyond this I can't think of any change off the top of my head >>>>>>>>> that would cause your issue. I looked at the repo but can't figure out the >>>>>>>>> VTK configurations from that. If you can share a simple test case which >>>>>>>>> demonstrates the issue I may be able to easily diagnose it. >>>>>>>>> >>>>>>>> >>>>>>>> Here's a standalone test code that reproduces the issue for me: >>>>>>>> >>>>>>>> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b14ee1d7 >>>>>>>> >>>>>>>> Run on two procs with: mpiexec -np 2 and I get the following >>>>>>>> test.pvtu file: >>>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>> byte_order="LittleEndian" header_type="UInt32" >>>>>>>>> compressor="vtkZLibDataCompressor"> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> NumberOfComponents="3"/> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> As you can see, only one "Piece Source" is listed, but the output >>>>>>>> of the program is actually all 3 files (test.pvtu, test_0.vtu, test_1.vtu) >>>>>>>> and both the _0 and _1 files have nodes in them. Furthermore, if I simply >>>>>>>> add a second "Piece Source" line corresponding to "test_1.vtu", the whole >>>>>>>> thing opens up just fine in Paraview. I am a novice VTK programmer so it's >>>>>>>> very possible I'm doing something wrong, but this code definitely worked in >>>>>>>> VTK 6.x, and 7.0. >>>>>>>> >>>>>>>> Thanks for your help, >>>>>>>> John >>>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>> >>>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.parker at cantab.net Mon Feb 19 07:51:29 2018 From: andrew.parker at cantab.net (Andrew Parker) Date: Mon, 19 Feb 2018 12:51:29 +0000 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: I'm using the following in the serial code: pwriter->SetNumberOfPieces((int)nparts); pwriter->SetGhostLevel(1); pwriter->SetStartPiece((int)part); pwriter->SetEndPiece((int)part); My writer function in which the above code is called is called "nparts" times, where part goes from 0->(nparts-1). For the dummy controller, and nparts=4, I have: vtkSmartPointer vtk_mpi_controller; vtk_mpi_controller = vtkSmartPointer::New(); vtk_mpi_controller->Initialize(&argc, &argv, 1); vtk_mpi_controller->SetGlobalController(vtk_mpi_controller); vtk_mpi_controller->SetNumberOfProcesses(4); .... vtk_mpi_controller->Finalize(1); resulting bottom half of the pvtu reads: Any thoughts? Cheers, Andy On 19 February 2018 at 12:38, Andy Bauer wrote: > If you haven't used the SetStartPiece(), SetEndPiece() and > SetNumberOfPieces() methods in serial that's what is probably missing. In > serial you should be able to use vtkDummyController. > > > > On Mon, Feb 19, 2018 at 4:59 AM, Andrew Parker < > andy.john.parker at googlemail.com> wrote: > >> Andy, >> >> I can confirm this now works for my parallel code. However, I have a >> separate stand-alone serial code (has never had a communicator) which still >> calls the vtkXMLPUnstructuredGridWriter and produces several part/piece >> meshes and one global pvtu file. This now fails with 7.1.1, same error >> before, only one entry in the pvtu. I have tried to make the changes noted >> in your demo file (which have worked for my parallel code) but in this >> instance they do not work in my serial code. I have also tried the >> vtkDummyController as a well as vtkmpicontroller, and have also tried >> explicitly setting the number of (fake) processors: vtk_mpi_controller-> >> SetNumberOfProcesses(4); >> >> Could I ask what the recommended way to now use the vtkXMLPUnstructuredGridWriter >> is from a completely serial code where I still wish to write out piece >> meshes (and a corresponding pvtu) and do not have a communicator? I should >> add this is not threaded code either. The vtk 7.1.1 build is the same one >> that is now working correctly in my mpi parallel code. >> >> Cheers again, >> Andy >> >> On 6 February 2018 at 13:48, Andy Bauer wrote: >> >>> My guess is that you've forgotten: >>> >>> controller->SetGlobalController(controller); >>> >>> Could you also verify that VTK was built with MPI enabled? If you try my >>> example file does that work properly for you with both VTK versions? >>> >>> >>> On Tue, Feb 6, 2018 at 4:49 AM, Andrew Parker < >>> andy.john.parker at googlemail.com> wrote: >>> >>>> Andy, >>>> >>>> To follow up. So this is a direct copy of my source for writing vtu in >>>> parallel via mpi, no edits: >>>> >>>> vtkSmartPointer pwriter = >>>> vtkSmartPointer::New(); >>>> std::stringstream sss; >>>> sss << outputDirectory << "/"; >>>> sss << outputPrefix; >>>> sss << "Parts"; >>>> sss << ".pvtu"; >>>> >>>> pwriter->SetFileName(sss.str().c_str()); >>>> pwriter->SetNumberOfPieces(comms.Size()); >>>> if(comms.IsParallel()) >>>> pwriter->SetGhostLevel(1); >>>> pwriter->SetStartPiece(comms.Rank()); >>>> pwriter->SetEndPiece(comms.Rank()); >>>> pwriter->SetInputData(cellGrid); >>>> // pwriter->SetDataModeToAscii(); >>>> pwriter->SetDataModeToBinary(); >>>> pwriter->SetCompressorTypeToZLib(); >>>> pwriter->Write(); >>>> >>>> and for vtp files in parallel via mpi, no edits: >>>> >>>> vtkSmartPointer pwriter = >>>> vtkSmartPointer::New(); >>>> std::stringstream sss; >>>> sss << outputDirectory << "/"; >>>> sss << outputPrefix; >>>> sss << bcName << "_"; >>>> sss << prefix; >>>> sss << ".pvtp"; >>>> std::cout << "Output file name: " << sss.str().c_str() << std::endl; >>>> >>>> pwriter->SetFileName(sss.str().c_str()); >>>> pwriter->SetNumberOfPieces(comms->Size()); >>>> if(comms->IsParallel()) >>>> pwriter->SetGhostLevel(1); >>>> pwriter->SetStartPiece(comms->Rank()); >>>> pwriter->SetEndPiece(comms->Rank()); >>>> pwriter->SetInputData(boundingFaceGrids[i]); >>>> pwriter->SetDataModeToBinary(); >>>> //pwriter->SetDataModeToAscii(); >>>> pwriter->SetCompressorTypeToZLib(); >>>> pwriter->Write(); >>>> >>>> I initialise the vtk-comms object in an identical way to your demo >>>> code, after my own mpi-comms, and I finalize before I finalize mine. In >>>> between those calls the above source is called. All processors partake in >>>> all calls both to init the vtk-mpi and in the above writing. >>>> >>>> Do you have any further thoughts as to the problem? Problem goes away >>>> if I use 6.3.... >>>> >>>> Cheers, >>>> Andy >>>> >>>> >>>> On 5 February 2018 at 18:40, Andrew Parker < >>>> andy.john.parker at googlemail.com> wrote: >>>> >>>>> Andy, >>>>> >>>>> My own code. I?ve always had those Piece lines in my src from day one, >>>>> and always used it via mpi, so don?t need added. All procs call all lines >>>>> in my file writer. There is no if-master-section. Literally just a vtk >>>>> version number change that causes the problem. Can?t get the data files or >>>>> the cut down source until tomorrow. >>>>> >>>>> I shared the other two links as those in addition to this post are the >>>>> only places I can find that reference such a major change to the library >>>>> that is undocumented and causes such a significant change to user code. Are >>>>> there any further references on this change that I can read about to try to >>>>> resolve this? >>>>> >>>>> I find it strange that this has not come up more. It would mean all >>>>> users of 7.1 without the additional vtkmpicontroller lines would fail when >>>>> calling a parallel writer from a parallel mpi-user-code.... >>>>> >>>>> Cheers, >>>>> Andy >>>>> >>>>> On Mon, 5 Feb 2018 at 18:07, Andy Bauer >>>>> wrote: >>>>> >>>>>> Are you using libMesh or another simulation code? You'll definitely >>>>>> need the following to tell each process what piece it has: >>>>>> pwriter->SetNumberOfPieces(nprocs); >>>>>> >>>>>> pwriter->SetStartPiece(rank); >>>>>> >>>>>> >>>>>> pwriter->SetEndPiece(rank); >>>>>> >>>>>> >>>>>> pwriter->Write(); >>>>>> >>>>>> Can you share the portion of your code that uses >>>>>> vtkXMLPUnstructuredGridWriter? Also, looking at the data files from 6.3 and >>>>>> 7.1.1 may help. >>>>>> >>>>>> Thanks, >>>>>> Andy >>>>>> >>>>>> >>>>>> On Mon, Feb 5, 2018 at 12:08 PM, Andrew Parker < >>>>>> andy.john.parker at googlemail.com> wrote: >>>>>> >>>>>>> Andy, >>>>>>> >>>>>>> Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of me >>>>>>> get your modifications to work from your vtk_test.C. I've included the >>>>>>> vtkmpiController stuff after I init mpi myself. I found the migration >>>>>>> problem mentioned here: >>>>>>> >>>>>>> https://github.com/libMesh/libmesh/issues/1179 >>>>>>> >>>>>>> and here: >>>>>>> >>>>>>> https://gitlab.kitware.com/vtk/vtk/issues/16924 >>>>>>> >>>>>>> as well as this post. My parallel unstructured grid now only >>>>>>> contains one source within the piece section of the pvtu, as opposed to >>>>>>> n-processor sources (all processors have real data to write and this is not >>>>>>> a case of empty meshes on these processors). I can re-link and recompile >>>>>>> against 6.3 and the problem goes away and I get the correct number of >>>>>>> sources written to the pvtu file as before. Can you help? I make >>>>>>> extensive use of pvtu files from my mpi-based code and now all grid files >>>>>>> (pvtu and pvtp) have stopped working just by moving to 7.1.1 (which has >>>>>>> been built with mpi-enabled). >>>>>>> >>>>>>> Any thoughts? >>>>>>> >>>>>>> Thanks, >>>>>>> Andy >>>>>>> >>>>>>> >>>>>>> On 6 December 2016 at 16:12, Andy Bauer >>>>>>> wrote: >>>>>>> >>>>>>>> Hi John, >>>>>>>> >>>>>>>> The issue is indeed due to changes that I mentioned before (i.e. >>>>>>>> only data sets that have data get written out and the .pvtu file is >>>>>>>> adjusted accordingly). With this change though interprocess communication >>>>>>>> is required which is done the the vtkMultiProcessController::GetGlobalController() >>>>>>>> object which essentially acts as MPI_COMM_WORLD within VTK. You need to >>>>>>>> create a vtkMPIController which derives from vtkMultiProcessController. See >>>>>>>> the attached files for how that is done. This should also be backwards >>>>>>>> compatible but if it isn't, please let us know. >>>>>>>> >>>>>>>> Best, >>>>>>>> Andy >>>>>>>> >>>>>>>> ps. Ignore the ADIOS stuff in there (it's commented out). I was >>>>>>>> trying to do two things at once and that's why the ADIOS stuff is in the >>>>>>>> CMakeLists.txt. >>>>>>>> >>>>>>>> On Mon, Dec 5, 2016 at 6:06 PM, John Peterson >>>>>>> > wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer < >>>>>>>>> andy.bauer at kitware.com> wrote: >>>>>>>>> >>>>>>>>>> Beyond this I can't think of any change off the top of my head >>>>>>>>>> that would cause your issue. I looked at the repo but can't figure out the >>>>>>>>>> VTK configurations from that. If you can share a simple test case which >>>>>>>>>> demonstrates the issue I may be able to easily diagnose it. >>>>>>>>>> >>>>>>>>> >>>>>>>>> Here's a standalone test code that reproduces the issue for me: >>>>>>>>> >>>>>>>>> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b >>>>>>>>> 14ee1d7 >>>>>>>>> >>>>>>>>> Run on two procs with: mpiexec -np 2 and I get the following >>>>>>>>> test.pvtu file: >>>>>>>>> >>>>>>>>> >>>>>>>>>> >>>>>>>>> byte_order="LittleEndian" header_type="UInt32" >>>>>>>>>> compressor="vtkZLibDataCompressor"> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> NumberOfComponents="3"/> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> As you can see, only one "Piece Source" is listed, but the output >>>>>>>>> of the program is actually all 3 files (test.pvtu, test_0.vtu, test_1.vtu) >>>>>>>>> and both the _0 and _1 files have nodes in them. Furthermore, if I simply >>>>>>>>> add a second "Piece Source" line corresponding to "test_1.vtu", the whole >>>>>>>>> thing opens up just fine in Paraview. I am a novice VTK programmer so it's >>>>>>>>> very possible I'm doing something wrong, but this code definitely worked in >>>>>>>>> VTK 6.x, and 7.0. >>>>>>>>> >>>>>>>>> Thanks for your help, >>>>>>>>> John >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> 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 mafuentes at uclv.cu Mon Feb 19 08:14:33 2018 From: mafuentes at uclv.cu (mafuentes at uclv.cu) Date: Mon, 19 Feb 2018 08:14:33 -0500 (CST) Subject: [vtkusers] vtkTransform In-Reply-To: References: <707929113.829837.1518703215643.JavaMail.zimbra@uclv.cu> Message-ID: <1269706918.18957.1519046073046.JavaMail.zimbra@uclv.cu> Thanks, that worked perfectly. De: "Jorge Perez" Para: mafuentes at uclv.cu CC: "vtkusers" Enviados: Jueves, 15 de Febrero 2018 12:32:16 Asunto: Re: [vtkusers] vtkTransform Hi, you can compose the linear transformation using the method vtkTransform::Concatenate [ https://www.vtk.org/doc/nightly/html/classvtkTransform.html#a74585e7404fd08bf08637a126e63799e | https://www.vtk.org/doc/nightly/html/classvtkTransform.html#a74585e7404fd08bf08637a126e63799e ] HTH Jorge 2018-02-15 15:00 GMT+01:00 < [ mailto:mafuentes at uclv.cu | mafuentes at uclv.cu ] > : I'm trying to apply a transformation pipeline to a cylinder source in the following way: - Translation -x, -y, -z - RotationZ alpha - RotationX beta - Translation x, y, z That is, to move it to the origin of coordinates, rotate it and then translate it back to it's original position. the only way I've managed to make it work so far is to define a vtkTransform and a vtkTransformFilter for each operation and build a pipeline like that. Is there another way to do it so I don't have to create both objects for each operation? _______________________________________________ Powered by [ http://www.kitware.com/ | www.kitware.com ] Visit other Kitware open-source projects at [ http://www.kitware.com/opensource/opensource.html | http://www.kitware.com/opensource/opensource.html ] Please keep messages on-topic and check the VTK FAQ at: [ http://www.vtk.org/Wiki/VTK_FAQ | http://www.vtk.org/Wiki/VTK_FAQ ] Search the list archives at: [ http://markmail.org/search/?q=vtkusers | http://markmail.org/search/?q=vtkusers ] Follow this link to subscribe/unsubscribe: [ https://vtk.org/mailman/listinfo/vtkusers | https://vtk.org/mailman/listinfo/vtkusers ] -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Mon Feb 19 08:47:42 2018 From: andy.bauer at kitware.com (Andy Bauer) Date: Mon, 19 Feb 2018 08:47:42 -0500 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: You need to have a single call to pwriter->Write() with all of the pieces set in a single pass, otherwise the .pvtu file will overwrite each time. This looks like: pwriter->SetNumberOfPieces((int)nparts); pwriter->SetGhostLevel(1); pwriter->SetStartPiece(0); pwriter->SetEndPiece((int)part-1); If you're not generating pieces in your pipeline then you'll probably need to merge your pieces into a single unstructured grid before calling the XMLPUnstructuredGridWriter. On Mon, Feb 19, 2018 at 7:51 AM, Andrew Parker wrote: > I'm using the following in the serial code: > > pwriter->SetNumberOfPieces((int)nparts); > pwriter->SetGhostLevel(1); > pwriter->SetStartPiece((int)part); > pwriter->SetEndPiece((int)part); > > My writer function in which the above code is called is called "nparts" > times, where part goes from 0->(nparts-1). > > For the dummy controller, and nparts=4, I have: > > vtkSmartPointer vtk_mpi_controller; > vtk_mpi_controller = vtkSmartPointer::New(); > vtk_mpi_controller->Initialize(&argc, &argv, 1); > vtk_mpi_controller->SetGlobalController(vtk_mpi_controller); > vtk_mpi_controller->SetNumberOfProcesses(4); > .... > vtk_mpi_controller->Finalize(1); > > resulting bottom half of the pvtu reads: > > > > > > > > > > Any thoughts? > Cheers, > Andy > > > On 19 February 2018 at 12:38, Andy Bauer wrote: > >> If you haven't used the SetStartPiece(), SetEndPiece() and >> SetNumberOfPieces() methods in serial that's what is probably missing. In >> serial you should be able to use vtkDummyController. >> >> >> >> On Mon, Feb 19, 2018 at 4:59 AM, Andrew Parker < >> andy.john.parker at googlemail.com> wrote: >> >>> Andy, >>> >>> I can confirm this now works for my parallel code. However, I have a >>> separate stand-alone serial code (has never had a communicator) which still >>> calls the vtkXMLPUnstructuredGridWriter and produces several part/piece >>> meshes and one global pvtu file. This now fails with 7.1.1, same error >>> before, only one entry in the pvtu. I have tried to make the changes noted >>> in your demo file (which have worked for my parallel code) but in this >>> instance they do not work in my serial code. I have also tried the >>> vtkDummyController as a well as vtkmpicontroller, and have also tried >>> explicitly setting the number of (fake) processors: vtk_mpi_controller-> >>> SetNumberOfProcesses(4); >>> >>> Could I ask what the recommended way to now use the vtkXMLPUnstructuredGridWriter >>> is from a completely serial code where I still wish to write out piece >>> meshes (and a corresponding pvtu) and do not have a communicator? I should >>> add this is not threaded code either. The vtk 7.1.1 build is the same one >>> that is now working correctly in my mpi parallel code. >>> >>> Cheers again, >>> Andy >>> >>> On 6 February 2018 at 13:48, Andy Bauer wrote: >>> >>>> My guess is that you've forgotten: >>>> >>>> controller->SetGlobalController(controller); >>>> >>>> Could you also verify that VTK was built with MPI enabled? If you try >>>> my example file does that work properly for you with both VTK versions? >>>> >>>> >>>> On Tue, Feb 6, 2018 at 4:49 AM, Andrew Parker < >>>> andy.john.parker at googlemail.com> wrote: >>>> >>>>> Andy, >>>>> >>>>> To follow up. So this is a direct copy of my source for writing vtu >>>>> in parallel via mpi, no edits: >>>>> >>>>> vtkSmartPointer pwriter = >>>>> vtkSmartPointer::New(); >>>>> std::stringstream sss; >>>>> sss << outputDirectory << "/"; >>>>> sss << outputPrefix; >>>>> sss << "Parts"; >>>>> sss << ".pvtu"; >>>>> >>>>> pwriter->SetFileName(sss.str().c_str()); >>>>> pwriter->SetNumberOfPieces(comms.Size()); >>>>> if(comms.IsParallel()) >>>>> pwriter->SetGhostLevel(1); >>>>> pwriter->SetStartPiece(comms.Rank()); >>>>> pwriter->SetEndPiece(comms.Rank()); >>>>> pwriter->SetInputData(cellGrid); >>>>> // pwriter->SetDataModeToAscii(); >>>>> pwriter->SetDataModeToBinary(); >>>>> pwriter->SetCompressorTypeToZLib(); >>>>> pwriter->Write(); >>>>> >>>>> and for vtp files in parallel via mpi, no edits: >>>>> >>>>> vtkSmartPointer pwriter = >>>>> vtkSmartPointer::New(); >>>>> std::stringstream sss; >>>>> sss << outputDirectory << "/"; >>>>> sss << outputPrefix; >>>>> sss << bcName << "_"; >>>>> sss << prefix; >>>>> sss << ".pvtp"; >>>>> std::cout << "Output file name: " << sss.str().c_str() << std::endl; >>>>> >>>>> pwriter->SetFileName(sss.str().c_str()); >>>>> pwriter->SetNumberOfPieces(comms->Size()); >>>>> if(comms->IsParallel()) >>>>> pwriter->SetGhostLevel(1); >>>>> pwriter->SetStartPiece(comms->Rank()); >>>>> pwriter->SetEndPiece(comms->Rank()); >>>>> pwriter->SetInputData(boundingFaceGrids[i]); >>>>> pwriter->SetDataModeToBinary(); >>>>> //pwriter->SetDataModeToAscii(); >>>>> pwriter->SetCompressorTypeToZLib(); >>>>> pwriter->Write(); >>>>> >>>>> I initialise the vtk-comms object in an identical way to your demo >>>>> code, after my own mpi-comms, and I finalize before I finalize mine. In >>>>> between those calls the above source is called. All processors partake in >>>>> all calls both to init the vtk-mpi and in the above writing. >>>>> >>>>> Do you have any further thoughts as to the problem? Problem goes away >>>>> if I use 6.3.... >>>>> >>>>> Cheers, >>>>> Andy >>>>> >>>>> >>>>> On 5 February 2018 at 18:40, Andrew Parker < >>>>> andy.john.parker at googlemail.com> wrote: >>>>> >>>>>> Andy, >>>>>> >>>>>> My own code. I?ve always had those Piece lines in my src from day >>>>>> one, and always used it via mpi, so don?t need added. All procs call all >>>>>> lines in my file writer. There is no if-master-section. Literally just a >>>>>> vtk version number change that causes the problem. Can?t get the data files >>>>>> or the cut down source until tomorrow. >>>>>> >>>>>> I shared the other two links as those in addition to this post are >>>>>> the only places I can find that reference such a major change to the >>>>>> library that is undocumented and causes such a significant change to user >>>>>> code. Are there any further references on this change that I can read about >>>>>> to try to resolve this? >>>>>> >>>>>> I find it strange that this has not come up more. It would mean all >>>>>> users of 7.1 without the additional vtkmpicontroller lines would fail when >>>>>> calling a parallel writer from a parallel mpi-user-code.... >>>>>> >>>>>> Cheers, >>>>>> Andy >>>>>> >>>>>> On Mon, 5 Feb 2018 at 18:07, Andy Bauer >>>>>> wrote: >>>>>> >>>>>>> Are you using libMesh or another simulation code? You'll definitely >>>>>>> need the following to tell each process what piece it has: >>>>>>> pwriter->SetNumberOfPieces(nprocs); >>>>>>> >>>>>>> pwriter->SetStartPiece(rank); >>>>>>> >>>>>>> >>>>>>> pwriter->SetEndPiece(rank); >>>>>>> >>>>>>> >>>>>>> pwriter->Write(); >>>>>>> >>>>>>> Can you share the portion of your code that uses >>>>>>> vtkXMLPUnstructuredGridWriter? Also, looking at the data files from 6.3 and >>>>>>> 7.1.1 may help. >>>>>>> >>>>>>> Thanks, >>>>>>> Andy >>>>>>> >>>>>>> >>>>>>> On Mon, Feb 5, 2018 at 12:08 PM, Andrew Parker < >>>>>>> andy.john.parker at googlemail.com> wrote: >>>>>>> >>>>>>>> Andy, >>>>>>>> >>>>>>>> Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of me >>>>>>>> get your modifications to work from your vtk_test.C. I've included the >>>>>>>> vtkmpiController stuff after I init mpi myself. I found the migration >>>>>>>> problem mentioned here: >>>>>>>> >>>>>>>> https://github.com/libMesh/libmesh/issues/1179 >>>>>>>> >>>>>>>> and here: >>>>>>>> >>>>>>>> https://gitlab.kitware.com/vtk/vtk/issues/16924 >>>>>>>> >>>>>>>> as well as this post. My parallel unstructured grid now only >>>>>>>> contains one source within the piece section of the pvtu, as opposed to >>>>>>>> n-processor sources (all processors have real data to write and this is not >>>>>>>> a case of empty meshes on these processors). I can re-link and recompile >>>>>>>> against 6.3 and the problem goes away and I get the correct number of >>>>>>>> sources written to the pvtu file as before. Can you help? I make >>>>>>>> extensive use of pvtu files from my mpi-based code and now all grid files >>>>>>>> (pvtu and pvtp) have stopped working just by moving to 7.1.1 (which has >>>>>>>> been built with mpi-enabled). >>>>>>>> >>>>>>>> Any thoughts? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Andy >>>>>>>> >>>>>>>> >>>>>>>> On 6 December 2016 at 16:12, Andy Bauer >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi John, >>>>>>>>> >>>>>>>>> The issue is indeed due to changes that I mentioned before (i.e. >>>>>>>>> only data sets that have data get written out and the .pvtu file is >>>>>>>>> adjusted accordingly). With this change though interprocess communication >>>>>>>>> is required which is done the the vtkMultiProcessController::GetGlobalController() >>>>>>>>> object which essentially acts as MPI_COMM_WORLD within VTK. You need to >>>>>>>>> create a vtkMPIController which derives from vtkMultiProcessController. See >>>>>>>>> the attached files for how that is done. This should also be backwards >>>>>>>>> compatible but if it isn't, please let us know. >>>>>>>>> >>>>>>>>> Best, >>>>>>>>> Andy >>>>>>>>> >>>>>>>>> ps. Ignore the ADIOS stuff in there (it's commented out). I was >>>>>>>>> trying to do two things at once and that's why the ADIOS stuff is in the >>>>>>>>> CMakeLists.txt. >>>>>>>>> >>>>>>>>> On Mon, Dec 5, 2016 at 6:06 PM, John Peterson < >>>>>>>>> jwpeterson at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer < >>>>>>>>>> andy.bauer at kitware.com> wrote: >>>>>>>>>> >>>>>>>>>>> Beyond this I can't think of any change off the top of my head >>>>>>>>>>> that would cause your issue. I looked at the repo but can't figure out the >>>>>>>>>>> VTK configurations from that. If you can share a simple test case which >>>>>>>>>>> demonstrates the issue I may be able to easily diagnose it. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Here's a standalone test code that reproduces the issue for me: >>>>>>>>>> >>>>>>>>>> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b >>>>>>>>>> 14ee1d7 >>>>>>>>>> >>>>>>>>>> Run on two procs with: mpiexec -np 2 and I get the following >>>>>>>>>> test.pvtu file: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> byte_order="LittleEndian" header_type="UInt32" >>>>>>>>>>> compressor="vtkZLibDataCompressor"> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> NumberOfComponents="3"/> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> As you can see, only one "Piece Source" is listed, but the output >>>>>>>>>> of the program is actually all 3 files (test.pvtu, test_0.vtu, test_1.vtu) >>>>>>>>>> and both the _0 and _1 files have nodes in them. Furthermore, if I simply >>>>>>>>>> add a second "Piece Source" line corresponding to "test_1.vtu", the whole >>>>>>>>>> thing opens up just fine in Paraview. I am a novice VTK programmer so it's >>>>>>>>>> very possible I'm doing something wrong, but this code definitely worked in >>>>>>>>>> VTK 6.x, and 7.0. >>>>>>>>>> >>>>>>>>>> Thanks for your help, >>>>>>>>>> John >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> 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 jimi_vtk at foxmail.com Mon Feb 19 09:02:52 2018 From: jimi_vtk at foxmail.com (=?ISO-8859-1?B?cHA=?=) Date: Mon, 19 Feb 2018 22:02:52 +0800 Subject: [vtkusers] Can vtkImageRectilinearWipe be set a layout with other vtkWidgets? Message-ID: Hi,Recently, I used vtkImageRectilinearWipe to compare two images in Quad mode. But vtkImageRectilinearWipe is an alone view. Can vtkImageRectilinearWipe be set a layout with other vtkWidgets together? Is there some examples to do this ? Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.john.parker at googlemail.com Mon Feb 19 10:25:07 2018 From: andy.john.parker at googlemail.com (Andrew Parker) Date: Mon, 19 Feb 2018 15:25:07 +0000 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: Andy, For an nparts-number of pieces, I call this function 4 times, based on your advice (each outGrid is different every time the call is made): void Write(const idx_t part) { vtkSmartPointer pwriter = vtkSmartPointer::New(); pwriter->SetFileName("file.pvtu"); pwriter->SetNumberOfPieces(nparts); pwriter->SetGhostLevel(1); //pwriter->SetStartPiece(part); //pwriter->SetEndPiece(part); pwriter->SetStartPiece(0); pwriter->SetEndPiece(nparts-1); pwriter->SetInputData(outGrid); pwriter->SetDataModeToBinary(); pwriter->SetCompressorTypeToZLib(); pwriter->Write(); } Is this what you mean? I'm not sure what you mean by a single call to Write.... I call write "nparts"-times.... Is the above correct? (assuming I'm also using the vtk-dummy-comms). Cheers, Andy On 19 February 2018 at 13:47, Andy Bauer wrote: > You need to have a single call to pwriter->Write() with all of the pieces > set in a single pass, otherwise the .pvtu file will overwrite each time. > This looks like: > pwriter->SetNumberOfPieces((int)nparts); > pwriter->SetGhostLevel(1); > pwriter->SetStartPiece(0); > pwriter->SetEndPiece((int)part-1); > > > If you're not generating pieces in your pipeline then you'll probably need > to merge your pieces into a single unstructured grid before calling the > XMLPUnstructuredGridWriter. > > > On Mon, Feb 19, 2018 at 7:51 AM, Andrew Parker > wrote: > >> I'm using the following in the serial code: >> >> pwriter->SetNumberOfPieces((int)nparts); >> pwriter->SetGhostLevel(1); >> pwriter->SetStartPiece((int)part); >> pwriter->SetEndPiece((int)part); >> >> My writer function in which the above code is called is called "nparts" >> times, where part goes from 0->(nparts-1). >> >> For the dummy controller, and nparts=4, I have: >> >> vtkSmartPointer vtk_mpi_controller; >> vtk_mpi_controller = vtkSmartPointer::New(); >> vtk_mpi_controller->Initialize(&argc, &argv, 1); >> vtk_mpi_controller->SetGlobalController(vtk_mpi_controller); >> vtk_mpi_controller->SetNumberOfProcesses(4); >> .... >> vtk_mpi_controller->Finalize(1); >> >> resulting bottom half of the pvtu reads: >> >> >> >> >> >> >> >> >> >> Any thoughts? >> Cheers, >> Andy >> >> >> On 19 February 2018 at 12:38, Andy Bauer wrote: >> >>> If you haven't used the SetStartPiece(), SetEndPiece() and >>> SetNumberOfPieces() methods in serial that's what is probably missing. In >>> serial you should be able to use vtkDummyController. >>> >>> >>> >>> On Mon, Feb 19, 2018 at 4:59 AM, Andrew Parker < >>> andy.john.parker at googlemail.com> wrote: >>> >>>> Andy, >>>> >>>> I can confirm this now works for my parallel code. However, I have a >>>> separate stand-alone serial code (has never had a communicator) which still >>>> calls the vtkXMLPUnstructuredGridWriter and produces several part/piece >>>> meshes and one global pvtu file. This now fails with 7.1.1, same error >>>> before, only one entry in the pvtu. I have tried to make the changes noted >>>> in your demo file (which have worked for my parallel code) but in this >>>> instance they do not work in my serial code. I have also tried the >>>> vtkDummyController as a well as vtkmpicontroller, and have also tried >>>> explicitly setting the number of (fake) processors: >>>> vtk_mpi_controller->SetNumberOfProcesses(4); >>>> >>>> Could I ask what the recommended way to now use the vtkXMLPUnstructuredGridWriter >>>> is from a completely serial code where I still wish to write out piece >>>> meshes (and a corresponding pvtu) and do not have a communicator? I should >>>> add this is not threaded code either. The vtk 7.1.1 build is the same one >>>> that is now working correctly in my mpi parallel code. >>>> >>>> Cheers again, >>>> Andy >>>> >>>> On 6 February 2018 at 13:48, Andy Bauer wrote: >>>> >>>>> My guess is that you've forgotten: >>>>> >>>>> controller->SetGlobalController(controller); >>>>> >>>>> Could you also verify that VTK was built with MPI enabled? If you try >>>>> my example file does that work properly for you with both VTK versions? >>>>> >>>>> >>>>> On Tue, Feb 6, 2018 at 4:49 AM, Andrew Parker < >>>>> andy.john.parker at googlemail.com> wrote: >>>>> >>>>>> Andy, >>>>>> >>>>>> To follow up. So this is a direct copy of my source for writing vtu >>>>>> in parallel via mpi, no edits: >>>>>> >>>>>> vtkSmartPointer pwriter = >>>>>> vtkSmartPointer::New(); >>>>>> std::stringstream sss; >>>>>> sss << outputDirectory << "/"; >>>>>> sss << outputPrefix; >>>>>> sss << "Parts"; >>>>>> sss << ".pvtu"; >>>>>> >>>>>> pwriter->SetFileName(sss.str().c_str()); >>>>>> pwriter->SetNumberOfPieces(comms.Size()); >>>>>> if(comms.IsParallel()) >>>>>> pwriter->SetGhostLevel(1); >>>>>> pwriter->SetStartPiece(comms.Rank()); >>>>>> pwriter->SetEndPiece(comms.Rank()); >>>>>> pwriter->SetInputData(cellGrid); >>>>>> // pwriter->SetDataModeToAscii(); >>>>>> pwriter->SetDataModeToBinary(); >>>>>> pwriter->SetCompressorTypeToZLib(); >>>>>> pwriter->Write(); >>>>>> >>>>>> and for vtp files in parallel via mpi, no edits: >>>>>> >>>>>> vtkSmartPointer pwriter = >>>>>> vtkSmartPointer::New(); >>>>>> std::stringstream sss; >>>>>> sss << outputDirectory << "/"; >>>>>> sss << outputPrefix; >>>>>> sss << bcName << "_"; >>>>>> sss << prefix; >>>>>> sss << ".pvtp"; >>>>>> std::cout << "Output file name: " << sss.str().c_str() << std::endl; >>>>>> >>>>>> pwriter->SetFileName(sss.str().c_str()); >>>>>> pwriter->SetNumberOfPieces(comms->Size()); >>>>>> if(comms->IsParallel()) >>>>>> pwriter->SetGhostLevel(1); >>>>>> pwriter->SetStartPiece(comms->Rank()); >>>>>> pwriter->SetEndPiece(comms->Rank()); >>>>>> pwriter->SetInputData(boundingFaceGrids[i]); >>>>>> pwriter->SetDataModeToBinary(); >>>>>> //pwriter->SetDataModeToAscii(); >>>>>> pwriter->SetCompressorTypeToZLib(); >>>>>> pwriter->Write(); >>>>>> >>>>>> I initialise the vtk-comms object in an identical way to your demo >>>>>> code, after my own mpi-comms, and I finalize before I finalize mine. In >>>>>> between those calls the above source is called. All processors partake in >>>>>> all calls both to init the vtk-mpi and in the above writing. >>>>>> >>>>>> Do you have any further thoughts as to the problem? Problem goes >>>>>> away if I use 6.3.... >>>>>> >>>>>> Cheers, >>>>>> Andy >>>>>> >>>>>> >>>>>> On 5 February 2018 at 18:40, Andrew Parker < >>>>>> andy.john.parker at googlemail.com> wrote: >>>>>> >>>>>>> Andy, >>>>>>> >>>>>>> My own code. I?ve always had those Piece lines in my src from day >>>>>>> one, and always used it via mpi, so don?t need added. All procs call all >>>>>>> lines in my file writer. There is no if-master-section. Literally just a >>>>>>> vtk version number change that causes the problem. Can?t get the data files >>>>>>> or the cut down source until tomorrow. >>>>>>> >>>>>>> I shared the other two links as those in addition to this post are >>>>>>> the only places I can find that reference such a major change to the >>>>>>> library that is undocumented and causes such a significant change to user >>>>>>> code. Are there any further references on this change that I can read about >>>>>>> to try to resolve this? >>>>>>> >>>>>>> I find it strange that this has not come up more. It would mean all >>>>>>> users of 7.1 without the additional vtkmpicontroller lines would fail when >>>>>>> calling a parallel writer from a parallel mpi-user-code.... >>>>>>> >>>>>>> Cheers, >>>>>>> Andy >>>>>>> >>>>>>> On Mon, 5 Feb 2018 at 18:07, Andy Bauer >>>>>>> wrote: >>>>>>> >>>>>>>> Are you using libMesh or another simulation code? You'll definitely >>>>>>>> need the following to tell each process what piece it has: >>>>>>>> pwriter->SetNumberOfPieces(nprocs); >>>>>>>> >>>>>>>> pwriter->SetStartPiece(rank); >>>>>>>> >>>>>>>> >>>>>>>> pwriter->SetEndPiece(rank); >>>>>>>> >>>>>>>> >>>>>>>> pwriter->Write(); >>>>>>>> >>>>>>>> Can you share the portion of your code that uses >>>>>>>> vtkXMLPUnstructuredGridWriter? Also, looking at the data files from 6.3 and >>>>>>>> 7.1.1 may help. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Andy >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Feb 5, 2018 at 12:08 PM, Andrew Parker < >>>>>>>> andy.john.parker at googlemail.com> wrote: >>>>>>>> >>>>>>>>> Andy, >>>>>>>>> >>>>>>>>> Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of me >>>>>>>>> get your modifications to work from your vtk_test.C. I've included the >>>>>>>>> vtkmpiController stuff after I init mpi myself. I found the migration >>>>>>>>> problem mentioned here: >>>>>>>>> >>>>>>>>> https://github.com/libMesh/libmesh/issues/1179 >>>>>>>>> >>>>>>>>> and here: >>>>>>>>> >>>>>>>>> https://gitlab.kitware.com/vtk/vtk/issues/16924 >>>>>>>>> >>>>>>>>> as well as this post. My parallel unstructured grid now only >>>>>>>>> contains one source within the piece section of the pvtu, as opposed to >>>>>>>>> n-processor sources (all processors have real data to write and this is not >>>>>>>>> a case of empty meshes on these processors). I can re-link and recompile >>>>>>>>> against 6.3 and the problem goes away and I get the correct number of >>>>>>>>> sources written to the pvtu file as before. Can you help? I make >>>>>>>>> extensive use of pvtu files from my mpi-based code and now all grid files >>>>>>>>> (pvtu and pvtp) have stopped working just by moving to 7.1.1 (which has >>>>>>>>> been built with mpi-enabled). >>>>>>>>> >>>>>>>>> Any thoughts? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Andy >>>>>>>>> >>>>>>>>> >>>>>>>>> On 6 December 2016 at 16:12, Andy Bauer >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> Hi John, >>>>>>>>>> >>>>>>>>>> The issue is indeed due to changes that I mentioned before (i.e. >>>>>>>>>> only data sets that have data get written out and the .pvtu file is >>>>>>>>>> adjusted accordingly). With this change though interprocess communication >>>>>>>>>> is required which is done the the vtkMultiProcessController::GetGlobalController() >>>>>>>>>> object which essentially acts as MPI_COMM_WORLD within VTK. You need to >>>>>>>>>> create a vtkMPIController which derives from vtkMultiProcessController. See >>>>>>>>>> the attached files for how that is done. This should also be backwards >>>>>>>>>> compatible but if it isn't, please let us know. >>>>>>>>>> >>>>>>>>>> Best, >>>>>>>>>> Andy >>>>>>>>>> >>>>>>>>>> ps. Ignore the ADIOS stuff in there (it's commented out). I was >>>>>>>>>> trying to do two things at once and that's why the ADIOS stuff is in the >>>>>>>>>> CMakeLists.txt. >>>>>>>>>> >>>>>>>>>> On Mon, Dec 5, 2016 at 6:06 PM, John Peterson < >>>>>>>>>> jwpeterson at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer < >>>>>>>>>>> andy.bauer at kitware.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Beyond this I can't think of any change off the top of my head >>>>>>>>>>>> that would cause your issue. I looked at the repo but can't figure out the >>>>>>>>>>>> VTK configurations from that. If you can share a simple test case which >>>>>>>>>>>> demonstrates the issue I may be able to easily diagnose it. >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Here's a standalone test code that reproduces the issue for me: >>>>>>>>>>> >>>>>>>>>>> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b >>>>>>>>>>> 14ee1d7 >>>>>>>>>>> >>>>>>>>>>> Run on two procs with: mpiexec -np 2 and I get the following >>>>>>>>>>> test.pvtu file: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> byte_order="LittleEndian" header_type="UInt32" >>>>>>>>>>>> compressor="vtkZLibDataCompressor"> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> NumberOfComponents="3"/> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> As you can see, only one "Piece Source" is listed, but the >>>>>>>>>>> output of the program is actually all 3 files (test.pvtu, test_0.vtu, >>>>>>>>>>> test_1.vtu) and both the _0 and _1 files have nodes in them. Furthermore, >>>>>>>>>>> if I simply add a second "Piece Source" line corresponding to "test_1.vtu", >>>>>>>>>>> the whole thing opens up just fine in Paraview. I am a novice VTK >>>>>>>>>>> programmer so it's very possible I'm doing something wrong, but this code >>>>>>>>>>> definitely worked in VTK 6.x, and 7.0. >>>>>>>>>>> >>>>>>>>>>> Thanks for your help, >>>>>>>>>>> John >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Powered by www.kitware.com >>>>>>>>>> >>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>> >>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>> >>>>>>>>>> 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: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Mon Feb 19 10:56:19 2018 From: andy.bauer at kitware.com (Andy Bauer) Date: Mon, 19 Feb 2018 10:56:19 -0500 Subject: [vtkusers] Different behavior of vtkXMLPUnstructuredGridWriter in VTK 7.1 In-Reply-To: References: Message-ID: I think the following will work but typically pieces are handled through the pipeline so using SetInputData() won't work: vtkSmartPointer pwriter = vtkSmartPointer::New(); pwriter->SetFileName("file.pvtu"); pwriter->SetNumberOfPieces(nparts); pwriter->SetGhostLevel(1); pwriter->SetStartPiece(0); pwriter->SetEndPiece(nparts-1); for (int i=0;iAddInputDataObject(outGrids[i]); } pwriter->SetDataModeToBinary(); pwriter->SetCompressorTypeToZLib(); pwriter->Write(); On Mon, Feb 19, 2018 at 10:25 AM, Andrew Parker < andy.john.parker at googlemail.com> wrote: > Andy, > > For an nparts-number of pieces, I call this function 4 times, based on > your advice (each outGrid is different every time the call is made): > > void Write(const idx_t part) > { > vtkSmartPointer pwriter = > vtkSmartPointer::New(); > pwriter->SetFileName("file.pvtu"); > pwriter->SetNumberOfPieces(nparts); > pwriter->SetGhostLevel(1); > //pwriter->SetStartPiece(part); > //pwriter->SetEndPiece(part); > pwriter->SetStartPiece(0); > pwriter->SetEndPiece(nparts-1); > pwriter->SetInputData(outGrid); > pwriter->SetDataModeToBinary(); > pwriter->SetCompressorTypeToZLib(); > pwriter->Write(); > } > > Is this what you mean? I'm not sure what you mean by a single call to > Write.... I call write "nparts"-times.... Is the above correct? (assuming > I'm also using the vtk-dummy-comms). > > Cheers, > Andy > > On 19 February 2018 at 13:47, Andy Bauer wrote: > >> You need to have a single call to pwriter->Write() with all of the >> pieces set in a single pass, otherwise the .pvtu file will overwrite each >> time. This looks like: >> pwriter->SetNumberOfPieces((int)nparts); >> pwriter->SetGhostLevel(1); >> pwriter->SetStartPiece(0); >> pwriter->SetEndPiece((int)part-1); >> >> >> If you're not generating pieces in your pipeline then you'll probably >> need to merge your pieces into a single unstructured grid before calling >> the XMLPUnstructuredGridWriter. >> >> >> On Mon, Feb 19, 2018 at 7:51 AM, Andrew Parker >> wrote: >> >>> I'm using the following in the serial code: >>> >>> pwriter->SetNumberOfPieces((int)nparts); >>> pwriter->SetGhostLevel(1); >>> pwriter->SetStartPiece((int)part); >>> pwriter->SetEndPiece((int)part); >>> >>> My writer function in which the above code is called is called "nparts" >>> times, where part goes from 0->(nparts-1). >>> >>> For the dummy controller, and nparts=4, I have: >>> >>> vtkSmartPointer vtk_mpi_controller; >>> vtk_mpi_controller = vtkSmartPointer::New(); >>> vtk_mpi_controller->Initialize(&argc, &argv, 1); >>> vtk_mpi_controller->SetGlobalController(vtk_mpi_controller); >>> vtk_mpi_controller->SetNumberOfProcesses(4); >>> .... >>> vtk_mpi_controller->Finalize(1); >>> >>> resulting bottom half of the pvtu reads: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> Any thoughts? >>> Cheers, >>> Andy >>> >>> >>> On 19 February 2018 at 12:38, Andy Bauer wrote: >>> >>>> If you haven't used the SetStartPiece(), SetEndPiece() and >>>> SetNumberOfPieces() methods in serial that's what is probably missing. In >>>> serial you should be able to use vtkDummyController. >>>> >>>> >>>> >>>> On Mon, Feb 19, 2018 at 4:59 AM, Andrew Parker < >>>> andy.john.parker at googlemail.com> wrote: >>>> >>>>> Andy, >>>>> >>>>> I can confirm this now works for my parallel code. However, I have a >>>>> separate stand-alone serial code (has never had a communicator) which still >>>>> calls the vtkXMLPUnstructuredGridWriter and produces several part/piece >>>>> meshes and one global pvtu file. This now fails with 7.1.1, same error >>>>> before, only one entry in the pvtu. I have tried to make the changes noted >>>>> in your demo file (which have worked for my parallel code) but in this >>>>> instance they do not work in my serial code. I have also tried the >>>>> vtkDummyController as a well as vtkmpicontroller, and have also tried >>>>> explicitly setting the number of (fake) processors: >>>>> vtk_mpi_controller->SetNumberOfProcesses(4); >>>>> >>>>> Could I ask what the recommended way to now use the vtkXMLPUnstructuredGridWriter >>>>> is from a completely serial code where I still wish to write out piece >>>>> meshes (and a corresponding pvtu) and do not have a communicator? I should >>>>> add this is not threaded code either. The vtk 7.1.1 build is the same one >>>>> that is now working correctly in my mpi parallel code. >>>>> >>>>> Cheers again, >>>>> Andy >>>>> >>>>> On 6 February 2018 at 13:48, Andy Bauer >>>>> wrote: >>>>> >>>>>> My guess is that you've forgotten: >>>>>> >>>>>> controller->SetGlobalController(controller); >>>>>> >>>>>> Could you also verify that VTK was built with MPI enabled? If you try >>>>>> my example file does that work properly for you with both VTK versions? >>>>>> >>>>>> >>>>>> On Tue, Feb 6, 2018 at 4:49 AM, Andrew Parker < >>>>>> andy.john.parker at googlemail.com> wrote: >>>>>> >>>>>>> Andy, >>>>>>> >>>>>>> To follow up. So this is a direct copy of my source for writing vtu >>>>>>> in parallel via mpi, no edits: >>>>>>> >>>>>>> vtkSmartPointer pwriter = >>>>>>> vtkSmartPointer::New(); >>>>>>> std::stringstream sss; >>>>>>> sss << outputDirectory << "/"; >>>>>>> sss << outputPrefix; >>>>>>> sss << "Parts"; >>>>>>> sss << ".pvtu"; >>>>>>> >>>>>>> pwriter->SetFileName(sss.str().c_str()); >>>>>>> pwriter->SetNumberOfPieces(comms.Size()); >>>>>>> if(comms.IsParallel()) >>>>>>> pwriter->SetGhostLevel(1); >>>>>>> pwriter->SetStartPiece(comms.Rank()); >>>>>>> pwriter->SetEndPiece(comms.Rank()); >>>>>>> pwriter->SetInputData(cellGrid); >>>>>>> // pwriter->SetDataModeToAscii(); >>>>>>> pwriter->SetDataModeToBinary(); >>>>>>> pwriter->SetCompressorTypeToZLib(); >>>>>>> pwriter->Write(); >>>>>>> >>>>>>> and for vtp files in parallel via mpi, no edits: >>>>>>> >>>>>>> vtkSmartPointer pwriter = >>>>>>> vtkSmartPointer::New(); >>>>>>> std::stringstream sss; >>>>>>> sss << outputDirectory << "/"; >>>>>>> sss << outputPrefix; >>>>>>> sss << bcName << "_"; >>>>>>> sss << prefix; >>>>>>> sss << ".pvtp"; >>>>>>> std::cout << "Output file name: " << sss.str().c_str() << std::endl; >>>>>>> >>>>>>> pwriter->SetFileName(sss.str().c_str()); >>>>>>> pwriter->SetNumberOfPieces(comms->Size()); >>>>>>> if(comms->IsParallel()) >>>>>>> pwriter->SetGhostLevel(1); >>>>>>> pwriter->SetStartPiece(comms->Rank()); >>>>>>> pwriter->SetEndPiece(comms->Rank()); >>>>>>> pwriter->SetInputData(boundingFaceGrids[i]); >>>>>>> pwriter->SetDataModeToBinary(); >>>>>>> //pwriter->SetDataModeToAscii(); >>>>>>> pwriter->SetCompressorTypeToZLib(); >>>>>>> pwriter->Write(); >>>>>>> >>>>>>> I initialise the vtk-comms object in an identical way to your demo >>>>>>> code, after my own mpi-comms, and I finalize before I finalize mine. In >>>>>>> between those calls the above source is called. All processors partake in >>>>>>> all calls both to init the vtk-mpi and in the above writing. >>>>>>> >>>>>>> Do you have any further thoughts as to the problem? Problem goes >>>>>>> away if I use 6.3.... >>>>>>> >>>>>>> Cheers, >>>>>>> Andy >>>>>>> >>>>>>> >>>>>>> On 5 February 2018 at 18:40, Andrew Parker < >>>>>>> andy.john.parker at googlemail.com> wrote: >>>>>>> >>>>>>>> Andy, >>>>>>>> >>>>>>>> My own code. I?ve always had those Piece lines in my src from day >>>>>>>> one, and always used it via mpi, so don?t need added. All procs call all >>>>>>>> lines in my file writer. There is no if-master-section. Literally just a >>>>>>>> vtk version number change that causes the problem. Can?t get the data files >>>>>>>> or the cut down source until tomorrow. >>>>>>>> >>>>>>>> I shared the other two links as those in addition to this post are >>>>>>>> the only places I can find that reference such a major change to the >>>>>>>> library that is undocumented and causes such a significant change to user >>>>>>>> code. Are there any further references on this change that I can read about >>>>>>>> to try to resolve this? >>>>>>>> >>>>>>>> I find it strange that this has not come up more. It would mean all >>>>>>>> users of 7.1 without the additional vtkmpicontroller lines would fail when >>>>>>>> calling a parallel writer from a parallel mpi-user-code.... >>>>>>>> >>>>>>>> Cheers, >>>>>>>> Andy >>>>>>>> >>>>>>>> On Mon, 5 Feb 2018 at 18:07, Andy Bauer >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Are you using libMesh or another simulation code? You'll >>>>>>>>> definitely need the following to tell each process what piece it has: >>>>>>>>> pwriter->SetNumberOfPieces(nprocs); >>>>>>>>> >>>>>>>>> pwriter->SetStartPiece(rank); >>>>>>>>> >>>>>>>>> >>>>>>>>> pwriter->SetEndPiece(rank); >>>>>>>>> >>>>>>>>> >>>>>>>>> pwriter->Write(); >>>>>>>>> >>>>>>>>> Can you share the portion of your code that uses >>>>>>>>> vtkXMLPUnstructuredGridWriter? Also, looking at the data files from 6.3 and >>>>>>>>> 7.1.1 may help. >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Andy >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Feb 5, 2018 at 12:08 PM, Andrew Parker < >>>>>>>>> andy.john.parker at googlemail.com> wrote: >>>>>>>>> >>>>>>>>>> Andy, >>>>>>>>>> >>>>>>>>>> Just moved from vtk 6.3.0 to vtk 7.1.1. Cannot for the life of >>>>>>>>>> me get your modifications to work from your vtk_test.C. I've included the >>>>>>>>>> vtkmpiController stuff after I init mpi myself. I found the migration >>>>>>>>>> problem mentioned here: >>>>>>>>>> >>>>>>>>>> https://github.com/libMesh/libmesh/issues/1179 >>>>>>>>>> >>>>>>>>>> and here: >>>>>>>>>> >>>>>>>>>> https://gitlab.kitware.com/vtk/vtk/issues/16924 >>>>>>>>>> >>>>>>>>>> as well as this post. My parallel unstructured grid now only >>>>>>>>>> contains one source within the piece section of the pvtu, as opposed to >>>>>>>>>> n-processor sources (all processors have real data to write and this is not >>>>>>>>>> a case of empty meshes on these processors). I can re-link and recompile >>>>>>>>>> against 6.3 and the problem goes away and I get the correct number of >>>>>>>>>> sources written to the pvtu file as before. Can you help? I make >>>>>>>>>> extensive use of pvtu files from my mpi-based code and now all grid files >>>>>>>>>> (pvtu and pvtp) have stopped working just by moving to 7.1.1 (which has >>>>>>>>>> been built with mpi-enabled). >>>>>>>>>> >>>>>>>>>> Any thoughts? >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> Andy >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On 6 December 2016 at 16:12, Andy Bauer >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi John, >>>>>>>>>>> >>>>>>>>>>> The issue is indeed due to changes that I mentioned before (i.e. >>>>>>>>>>> only data sets that have data get written out and the .pvtu file is >>>>>>>>>>> adjusted accordingly). With this change though interprocess communication >>>>>>>>>>> is required which is done the the vtkMultiProcessController::GetGlobalController() >>>>>>>>>>> object which essentially acts as MPI_COMM_WORLD within VTK. You need to >>>>>>>>>>> create a vtkMPIController which derives from vtkMultiProcessController. See >>>>>>>>>>> the attached files for how that is done. This should also be backwards >>>>>>>>>>> compatible but if it isn't, please let us know. >>>>>>>>>>> >>>>>>>>>>> Best, >>>>>>>>>>> Andy >>>>>>>>>>> >>>>>>>>>>> ps. Ignore the ADIOS stuff in there (it's commented out). I was >>>>>>>>>>> trying to do two things at once and that's why the ADIOS stuff is in the >>>>>>>>>>> CMakeLists.txt. >>>>>>>>>>> >>>>>>>>>>> On Mon, Dec 5, 2016 at 6:06 PM, John Peterson < >>>>>>>>>>> jwpeterson at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Mon, Dec 5, 2016 at 12:45 PM, Andy Bauer < >>>>>>>>>>>> andy.bauer at kitware.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Beyond this I can't think of any change off the top of my head >>>>>>>>>>>>> that would cause your issue. I looked at the repo but can't figure out the >>>>>>>>>>>>> VTK configurations from that. If you can share a simple test case which >>>>>>>>>>>>> demonstrates the issue I may be able to easily diagnose it. >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Here's a standalone test code that reproduces the issue for me: >>>>>>>>>>>> >>>>>>>>>>>> https://gist.github.com/jwpeterson/92f4b8422d6fbb1056e848c9b >>>>>>>>>>>> 14ee1d7 >>>>>>>>>>>> >>>>>>>>>>>> Run on two procs with: mpiexec -np 2 and I get the following >>>>>>>>>>>> test.pvtu file: >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> byte_order="LittleEndian" header_type="UInt32" >>>>>>>>>>>>> compressor="vtkZLibDataCompressor"> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> NumberOfComponents="3"/> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> As you can see, only one "Piece Source" is listed, but the >>>>>>>>>>>> output of the program is actually all 3 files (test.pvtu, test_0.vtu, >>>>>>>>>>>> test_1.vtu) and both the _0 and _1 files have nodes in them. Furthermore, >>>>>>>>>>>> if I simply add a second "Piece Source" line corresponding to "test_1.vtu", >>>>>>>>>>>> the whole thing opens up just fine in Paraview. I am a novice VTK >>>>>>>>>>>> programmer so it's very possible I'm doing something wrong, but this code >>>>>>>>>>>> definitely worked in VTK 6.x, and 7.0. >>>>>>>>>>>> >>>>>>>>>>>> Thanks for your help, >>>>>>>>>>>> John >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>> >>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>> >>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>> >>>>>>>>>>> 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: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tavares at fe.up.pt Mon Feb 19 12:33:46 2018 From: tavares at fe.up.pt (=?utf-8?Q?=22Jo=C3=A3o_Manuel_R=2E_S=2E_Tavares=22?=) Date: Mon, 19 Feb 2018 17:33:46 +0000 Subject: [vtkusers] CFP: IWCIA'18, Porto, Portugal, Nov.22-24, Springer LNCS References: Message-ID: <87151D1E-0F87-4450-AC37-8B4F28EC5FD7@fe.up.pt> IWCIA 2018, Porto, Portugal, November 22-24, 2018 WEB SITE: https://sites.google.com/view/iwcia18/ Dear Colleague, I am pleased to announce IWCIA'18 - https://sites.google.com/view/iwcia18, which is going to be held in Porto, Portugal, in November 22-24, 2018. IWCIA'18 is the nineteenth of a series of international meetings on combinatorial image analysis. Image analysis is a scientific discipline providing theoretical foundations and methods for solving problems appearing in a wide range of areas, as diverse as medicine, robotics, defense, and security. As a rule, the processed data are discrete; therefore, the "discrete approach" to image analysis appears to be a natural one and has an increasing importance. It is based on studying combinatorial properties of the considered digital data sets. Combinatorial image analysis often features various advantages (in terms of efficiency and accuracy) over the more traditional approaches based on continuous models requiring numeric computation. The scientific program of the workshop consists of keynote talks, contributed papers, and posters. TOPICS: The Workshop is a forum for current research on the following (or similar) research subjects which are directly or potentially applicable to image analysis: - Combinatorial problems in the discrete plane and space; Lattice polygons and polytopes - Digital/combinatorial geometry and topology - Digital manifolds; Geometry of digital curves and surfaces - Analysis and processing of digital surfaces with singularities (such as "pinched digital surfaces") - Homotopy of digital manifolds; Thinning algorithms and skeletons - Boundary tracking of digital solids; Geometric characteristics of object boundaries - Multigrid convergence analysis of metric-based descriptors - Tilings and patterns; Combinatorial pattern matching - Computational geometry and imaging sciences - Integer programming, linear programming, and graph theoretic models and approaches to problems of image analysis - Image representation, segmentation, grouping, and reconstruction - Processing "very large" digital pictures; Methods for image compression - Parallel architectures and algorithms - Fuzzy and stochastic image analysis - Discrete tomography - Grammars and models for image or scene analysis and recognition; Cellular automata - Mathematical morphology and image analysis - Applications in medical imaging, biometrics, computer vision, image understanding, robotics, metrology, and others DATES: Full paper submission due - June 1, 2018 Notification of acceptance - July 15, 2018 Final camera-ready papers - August 15, 2018 Workshop dates - November 22-24, 2018, Porto, Portugal PUBLICATION: The conference proceedings will be published in the Springer's "Lecture Notes in Computer Science" series (pending approval). REVIEW PROCESS: The submitted papers are expected to meet high standards satisfying serious evaluation criteria. Each paper will be reviewed thoroughly by at least two members of the Program Committee. Double-blind review process will be applied to ensure maximal objectiveness. JOURNAL SPECIAL ISSUE: After the Workshop, the authors can submit extended versions of their works for publication in special journal issues. A thematic special issue of Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization (Taylor & Francis) has already been arranged. Looking forward to meet you in Porto, next November, Jo?o Manuel R.S. Tavares - Universidade do Porto, Portugal (General Chair IWCIA'18) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gohlinchia at gmail.com Tue Feb 20 03:30:10 2018 From: gohlinchia at gmail.com (gohlinchia) Date: Tue, 20 Feb 2018 01:30:10 -0700 (MST) Subject: [vtkusers] Stereo problem for ray cast volumes Message-ID: <1519115410418-0.post@n5.nabble.com> Hi, Does anyone encounter any rendering problems using VTK GPU volume ray casting in stereo? The final rendered image of the volume is not in stereo (i.e., not in the correct left-right pair). The left and right images look exactly the same, except that they are displaced by a small amount, probably the eye separation value. However, any polygonal meshes displayed together with the volumes in stereo are rendered correctly. What could have caused this problem? Are there any solutions to this? Thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aashish.chaudhary at kitware.com Tue Feb 20 09:22:46 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 20 Feb 2018 14:22:46 +0000 Subject: [vtkusers] Stereo problem for ray cast volumes In-Reply-To: <1519115410418-0.post@n5.nabble.com> References: <1519115410418-0.post@n5.nabble.com> Message-ID: this is the first time I am hearing this, we have had volume rendering working fine in stereo. Can you tell us more about your stereo option, hard-ware etc? It is possible that something may have gone wrong with recent changes. On Tue, Feb 20, 2018 at 3:30 AM gohlinchia wrote: > Hi, > > Does anyone encounter any rendering problems using VTK GPU volume ray > casting in stereo? The final rendered image of the volume is not in stereo > (i.e., not in the correct left-right pair). The left and right images look > exactly the same, except that they are displaced by a small amount, > probably > the eye separation value. However, any polygonal meshes displayed together > with the volumes in stereo are rendered correctly. > > What could have caused this problem? Are there any solutions to this? > > Thanks! > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk12af6bc42 at kant.sophonet.de Tue Feb 20 10:33:14 2018 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Tue, 20 Feb 2018 16:33:14 +0100 Subject: [vtkusers] Black renderwindow with vtkGPUVolumeRayCastMapper/MaximumIntensityProjection In-Reply-To: References: <2ade920a20a76c4f08d6082fe8792fa8@kant.sophonet.de> <8391fc7c793401898f65a5abfa09dfe6@kant.sophonet.de> Message-ID: <88a31b1884f99f12eac7544f27013afa@kant.sophonet.de> Hi Sankhesh, thanks for pushing me towards the next step of testing. Indeed, the VTK test which I have mentioned below works. After having spent some time on trying to localize the problem, it seems that this is related to the fact that my application is using Qt (5.10 - with desktop OpenGL backend, which works for all my other VTK-based visualizations). I have followed all the suggestions for setting up a QVTKOpenGLWidget, but using the same code as in the test, the four viewers remain empty (which is what I am observing in my application as well). Code snippets are below... Any hints on how to use vtkGPUVolumeRayCastMapper in a Qt 5 application with the OpenGL2 backend? Thanks, Sophonet --- void TestGPURayCastBlendModes(vtkRenderWindow *renwin) { // The code from the corresponding function in // https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastFourComponentsMIP.cxx // with minor modifications to use the given renderwindow, and after removing // the few testing-statements } int main(int argc, char *argv[]) { QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); QApplication app(argc, argv); QMainWindow *mainWindow = new QMainWindow(); QVTKOpenGLWidget *widget = new QVTKOpenGLWidget(mainWindow); auto *renwin = vtkGenericOpenGLRenderWindow::New(); widget->SetRenderWindow(renwin); mainWindow->setCentralWidget(widget); mainWindow->show(); TestGPURayCastBlendModes(renwin); return app.exec(); } On 2018-02-19 13:38, Sankhesh Jhaveri wrote: > Hi, > > Well the difference between in my suggestion was that the minimum > scalar value was also getting an opacity weighing ensuring that you > should at least see a white cube if the volume has all the same > values. However, it that also doesn't show you anything, perhaps > there's something else going on. > > Could you try running the VTK tests to see if the volume rendering > ones run and pass? > > Thanks, > Sankhesh > > On Mon, Feb 19, 2018, 4:05 AM Sophonet > wrote: > >> Hi Sankhesh, >> >> thanks for your message - just tried your suggestion, which is >> basically >> what I have already tried in the commented part of the code below. >> As >> expected, it did not change the result, my renderwindow is still >> black. >> >> Any other hint? >> >> Best regards, >> >> Sophonet >> >> On 2018-02-09 17:57, Sankhesh Jhaveri wrote: >>> Hi Sophonet, >>> >>> Try setting the scalar opacity function over the whole range of >> scalar >>> values. >>> >>> Something like: >>> >>> double * range = data->GetScalarRange(); >>> vtkNew f; >>> f->AddPoint(range[0], 0.1); >>> f->AddPoint(range[1], 1.0); >>> property->SetScalarOpacity(f); >>> >>> Hope that helps, >>> Sankhesh >>> >>> ? >>> >>> On Sat, Feb 3, 2018 at 5:37 AM Sophonet >>> wrote: >>> >>>> Hi list, >>>> >>>> in an earlier version of my software using VTK7.x and the OpenGL >>>> backend, MIP rendering was working using >> vtkGPUVolumeRayCastMapper >>>> and >>>> MaximumIntensityProjection. >>>> >>>> However, in VTK 8.x (e.g. VTK 8.1.0), using the OpenGL2 backend, >> the >>>> renderwindow stays black/empty - VTK does not show an error >> message, >>>> and >>>> the IsRenderSupported (see below) does not seem to fail. >>>> >>>> Any hints what is wrong with the code below? By the way: I have >>>> added >>>> the volumeProperty (and the piecewise function) after following a >>>> current VTK test program >>>> >>> >> > (https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastFourComponentsMIP.cxx). >>>> >>>> vtkimagedata is a scalar medical image (unsigned short), so >> nothing >>>> special. >>>> >>>> Thanks, >>>> >>>> Sophonet >>>> >>>> vtkNew mapper; >>>> mapper->SetInputData(vtkimagedata); >>>> mapper->SetBlendModeToMaximumIntensity(); >>>> >>>> vtkNew volume; >>>> volume->SetMapper(mapper); >>>> // ... connect to renderer etc. >>>> >>>> //NOTE: The following lines from VTK's >>>> TestGPURayCastFourComponentsMIP.cxx did not solve the problem >>>> //vtkNew volumeProperty; >>>> //volumeProperty->IndependentComponentsOn(); >>>> >>>> //volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); >>>> //volumeProperty->SetShade(1); >>>> >>>> //vtkNew f; >>>> //f->AddPoint(0, 0.0); >>>> //f->AddPoint(255, 1.0); >>>> //volumeProperty->SetScalarOpacity(f); >>>> >>>> //int valid = >>>> mapper->IsRenderSupported(vtkrenderer_->GetRenderWindow(), >>>> volumeProperty); >>>> >>>> // NOTE: No exception was thrown on my system >>>> //if (valid == 0) >>>> // throw std::runtime_error("MIP rendering is not supported"); >>>> //volume->SetProperty(volumeProperty); >>>> _______________________________________________ >>>> Powered by www.kitware.com [1] [1] >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: >> http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> https://vtk.org/mailman/listinfo/vtkusers >>> -- >>> >>> SANKHESH JHAVERI >>> >>> _SR. RESEARCH & DEVELOPMENT ENGINEER_ | KITWARE [2] | (518) >> 881-4417 >>> >>> ? >>> >>> Links: >>> ------ >>> [1] http://www.kitware.com >>> [2] http://www.kitware.com/ > -- > > SANKHESH JHAVERI > > _SR. RESEARCH & DEVELOPMENT ENGINEER_ | KITWARE [2] | (518) 881-4417 > > ? > > Links: > ------ > [1] http://www.kitware.com > [2] http://www.kitware.com/ From gohlinchia at gmail.com Tue Feb 20 10:41:06 2018 From: gohlinchia at gmail.com (gohlinchia) Date: Tue, 20 Feb 2018 08:41:06 -0700 (MST) Subject: [vtkusers] Stereo problem for ray cast volumes In-Reply-To: References: <1519115410418-0.post@n5.nabble.com> Message-ID: <1519141266885-0.post@n5.nabble.com> Hi Aashish, We have tried Crystal Eyes, Anaglyph, Red-Blue and even horizontal split viewports mode. They all render incorrectly the same way. We have tried on NVIDIA and AMD graphics cards (GT640, GTX 1050 and FirePro W5170M); same issues too. We have downloaded ParaView 5.4.1 and activated the stereo rendering on volumes. Exactly the same problems on all the above hardware. We searched the forum and noticed that this problem was mentioned a few times before: [VTK 0011650]: The crystal eyes stereo image can not render well. (http://vtk.1045678.n5.nabble.com/VTK-0011650-The-crystal-eyes-stereo-image-can-not-render-well-tp3325497.html) Sounds similar but not exactly the same: Strange stereo effect with Volume Rendering (http://vtk.1045678.n5.nabble.com/Strange-stereo-effect-with-Volume-Rendering-tp1230876.html) We are currently using VTK 8.1.0 but we understand from other developers that they also encounter the same problems with VTK 7.1.1. The following image is a sample of what we see in anaglyph stereo. The final rendered stereo image may look like it is in stereo but upon close inspection, it is not. The rendered left and right image of the volumes are clearly exactly the same, except that they are slightly displaced. This is very evident in the horizontal split viewports mode. Note that polygonal meshes are all displayed correctly in stereo, even in conjunction with the volumes. Do you have any idea what is wrong here? Thanks. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aashish.chaudhary at kitware.com Tue Feb 20 10:53:25 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 20 Feb 2018 15:53:25 +0000 Subject: [vtkusers] Stereo problem for ray cast volumes In-Reply-To: <1519141266885-0.post@n5.nabble.com> References: <1519115410418-0.post@n5.nabble.com> <1519141266885-0.post@n5.nabble.com> Message-ID: This one (The crystal eyes stereo image can not render well) is from the old VTK. I am assuming that you are using OpenGL2 backend in VTK? - Aashish On Tue, Feb 20, 2018 at 10:41 AM gohlinchia wrote: > Hi Aashish, > > We have tried Crystal Eyes, Anaglyph, Red-Blue and even horizontal split > viewports mode. They all render incorrectly the same way. We have tried on > NVIDIA and AMD graphics cards (GT640, GTX 1050 and FirePro W5170M); same > issues too. > > We have downloaded ParaView 5.4.1 and activated the stereo rendering on > volumes. Exactly the same problems on all the above hardware. > > We searched the forum and noticed that this problem was mentioned a few > times before: > > [VTK 0011650]: The crystal eyes stereo image can not render well. > ( > http://vtk.1045678.n5.nabble.com/VTK-0011650-The-crystal-eyes-stereo-image-can-not-render-well-tp3325497.html > ) > > Sounds similar but not exactly the same: Strange stereo effect with Volume > Rendering > ( > http://vtk.1045678.n5.nabble.com/Strange-stereo-effect-with-Volume-Rendering-tp1230876.html > ) > > We are currently using VTK 8.1.0 but we understand from other developers > that they also encounter the same problems with VTK 7.1.1. The following > image is a sample of what we see in anaglyph stereo. > > > > The final rendered stereo image may look like it is in stereo but upon > close > inspection, it is not. The rendered left and right image of the volumes are > clearly exactly the same, except that they are slightly displaced. This is > very evident in the horizontal split viewports mode. > > > > Note that polygonal meshes are all displayed correctly in stereo, even in > conjunction with the volumes. Do you have any idea what is wrong here? > > Thanks. > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gohlinchia at gmail.com Tue Feb 20 10:58:13 2018 From: gohlinchia at gmail.com (gohlinchia) Date: Tue, 20 Feb 2018 08:58:13 -0700 (MST) Subject: [vtkusers] Stereo problem for ray cast volumes In-Reply-To: References: <1519115410418-0.post@n5.nabble.com> <1519141266885-0.post@n5.nabble.com> Message-ID: <1519142293349-0.post@n5.nabble.com> Hi Aashish, Yes, we are using the OpenGL2 backend. It is worthwhile to note that even ParaView 5.4.1 also exhibits the same problem in stereo volume rendering. -- Chris ----- -- Chris -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jimi_vtk at foxmail.com Tue Feb 20 11:19:24 2018 From: jimi_vtk at foxmail.com (=?ISO-8859-1?B?cHA=?=) Date: Wed, 21 Feb 2018 00:19:24 +0800 Subject: [vtkusers] Can vtkImageRectilinearWipe be set a layout with other vtkWidgets? Message-ID: Hi, Recently, I used vtkImageRectilinearWipe to compare two images in Quad mode. But it seems that vtkImageRectilinearWipe is an alone viewer. I failed to make it as a part of window. It is still an alone window or viewer. Can vtkImageRectilinearWipe be set a layout with other vtkWidgets together and as a part of window? For example, the left part of window is a normal view and the right part of window is vtkImageRectilinearWipe view. Is there some examples to do this ? Thank you very much! Best regards, jimi -------------- next part -------------- An HTML attachment was scrubbed... URL: From joan.baiges at upc.edu Tue Feb 20 13:07:20 2018 From: joan.baiges at upc.edu (Joan Baiges) Date: Tue, 20 Feb 2018 19:07:20 +0100 Subject: [vtkusers] unable to write multiple .pvtu files with split vtkMPIController Message-ID: Hello, I am trying to write several .vtu and .pvtu files by using several MPI_Communicators. For this, I Splitinitialize a vtkMPIController object, and then set this controller as the controller for a vtkXMLPUnstructuredGridWriter. However, when I ask the vtkXMLPUnstructuredGridWriter->Write(), only one .pvtu file is written, while I would expect that one .pvtu file is written for each of the communicators the MPI_COMM_WORLD has been subdivided into. On the other hand, the .vtu files are written properly for all the processors in all the split mpi controllers. The code I am writing looks approximately like this: vtkMPIController* controller; vtkMPICommunicator* communicator; vtkSmartPointer unstructuredGrid; vtkSmartPointer parallelwriter; //New communicator and spliting of the communicator communicator = vtkMPICommunicator::New(); communicator = vtkMPICommunicator::GetWorldCommunicator(); communicator->SplitInitialize(communicator,MulticommColor,MPIrank); //Setting the split communicator as the communicator for the controller controller = vtkMPIController::New(); controller->SetCommunicator(communicator); controller->Initialize(); controller->SetGlobalController(controller); //Initializing the parallelwriter with the controller parallelwriter = vtkSmartPointer::New(); parallelwriter->SetController(controller); parallelwriter->SetNumberOfPieces(MPIsize); parallelwriter->SetGhostLevel(1); parallelwriter->SetStartPiece(MPIrank); parallelwriter->SetEndPiece(MPIrank); //setting file name fname = std::string(filename); fname.append(".pvtu"); parallelwriter->SetFileName(fname.c_str()); //Setting the grid unstructuredGrid = vtkSmartPointer::New(); parallelwriter->SetInputData(unstructuredGrid); //After writing the grid info, we call the parallelwriter to write parallelwriter->Write(); This final line causes all the processors to write the .vtu files, however only one processor writes the .pvtu file, while I would expect/like one .pvtu file per split mpi communicator. Thank you in advance for your help, Joan -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jesse.Kinross-Smith at bentley.com Tue Feb 20 22:21:31 2018 From: Jesse.Kinross-Smith at bentley.com (Jesse Kinross-Smith) Date: Wed, 21 Feb 2018 03:21:31 +0000 Subject: [vtkusers] Example of setting up global ids and retrieving selection in globalid? Message-ID: Hi all, I'm pretty new to VTK, got some model rendering going on trying to get selection from the picker that gives us something meaningful. All of our objects have internal IDs and we want to store that somehow - and (correct me if I'm wrong here) - I understand the best way to do this is to use global ids and set our own id for each object we add to the renderer, then get that back from the picker. I've been struggling to get this to work though - so really wondering if anyone has an example they can point me to or code snippets of the key parts so I can get this working. I've read through a number of posts on here from the past where GlobalIds have been mentioned - but never seen any snippets or examples. Regards, Jesse -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Feb 20 22:35:55 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 20 Feb 2018 19:35:55 -0800 Subject: [vtkusers] Example of setting up global ids and retrieving selection in globalid? In-Reply-To: References: Message-ID: What do you mean by objects? You can store information as FieldData that you can retrieve. On Tue, Feb 20, 2018 at 7:21 PM, Jesse Kinross-Smith wrote: > Hi all, > > > > I?m pretty new to VTK, got some model rendering going on trying to get > selection from the picker that gives us something meaningful. > > All of our objects have internal IDs and we want to store that somehow ? and > (correct me if I?m wrong here) ? I understand the best way to do this is to > use global ids and set our own id for each object we add to the renderer, > then get that back from the picker. > > > > I?ve been struggling to get this to work though ? so really wondering if > anyone has an example they can point me to or code snippets of the key parts > so I can get this working. > > > > I?ve read through a number of posts on here from the past where GlobalIds > have been mentioned ? but never seen any snippets or examples. > > > > Regards, > > > > Jesse > > -- > > Jesse Kinross-Smith > > Senior Software Engineer - BSW > > Bentley Systems, Fremantle > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Unpaid intern in BillsParadise at noware dot com From Jesse.Kinross-Smith at bentley.com Wed Feb 21 01:19:07 2018 From: Jesse.Kinross-Smith at bentley.com (Jesse Kinross-Smith) Date: Wed, 21 Feb 2018 06:19:07 +0000 Subject: [vtkusers] Example of setting up global ids and retrieving selection in globalid? In-Reply-To: References: Message-ID: Ok.. I have a number of objects (lines, points, polygons, triangles and quads) I submit to a renderer. Because there's a large number of objects (20k+) I have had to use a single actor to get any kind of speed out of VTK. Each of these items has a unique ID internally, and I'm not sure where to store this as I submit each object. I can submit a FieldData array for each item I guess, but then in my picker - how do I get the appropriate value back for the item that was picked? In my selection code I'm using vtkCellPicker and using code very similar to: https://www.vtk.org/Wiki/VTK/Examples/Cxx/Picking/CellPicking But then I don't know how to go the picker to get the FieldData array for the item that was picked. GetFieldData() seems to return non null, but the value never changes dependent on what I've picked so that's not right either. I would have thought using CellData would be more appropriate, but I always get back nullptrs at the picker from that too. -- Jesse Kinross-Smith Senior Software Engineer - BSW Bentley Systems, Fremantle From ashahrior.91994 at gmail.com Wed Feb 21 01:31:58 2018 From: ashahrior.91994 at gmail.com (Ashef Shahrior) Date: Wed, 21 Feb 2018 12:31:58 +0600 Subject: [vtkusers] DICOM Image Files Sources Message-ID: I want to render volume to a stack of DICOM image files and reconstruct a 3D model from them. I wish to know the sources for downloading these DICOM files. For instance, an example is given here - https://lorensen.github.io/VTKExamples/site/Cxx/VolumeRendering/FixedPointVolumeRayCastMapperCT/ - renders a volume data. But the source used for this is not given here. Can you please tell me from where I will be able to collect the required data to practice these examples? This example also - https://lorensen.github.io/VTKExamples/site/Cxx/Medical/MedicalDemo2/ - does volume rendering but where will I get the data files to do the reconstruction? -------------- next part -------------- An HTML attachment was scrubbed... URL: From vtk12af6bc42 at kant.sophonet.de Wed Feb 21 07:31:03 2018 From: vtk12af6bc42 at kant.sophonet.de (Sophonet) Date: Wed, 21 Feb 2018 13:31:03 +0100 Subject: [vtkusers] Black renderwindow with vtkGPUVolumeRayCastMapper/MaximumIntensityProjection In-Reply-To: <88a31b1884f99f12eac7544f27013afa@kant.sophonet.de> References: <2ade920a20a76c4f08d6082fe8792fa8@kant.sophonet.de> <8391fc7c793401898f65a5abfa09dfe6@kant.sophonet.de> <88a31b1884f99f12eac7544f27013afa@kant.sophonet.de> Message-ID: <6ede0d154c9fa625c83a2bdda63f4799@kant.sophonet.de> Hi Sankhesh and all, just found a related problem in the developer-list: https://www.vtk.org/pipermail/vtk-developers/2017-May/035107.html Indeed, when doing both, setting defaultFormat.setSamples(0) when setting the surface format as well as vtkRenderWindow->SetMultiSamples(0), the volume appears as intended. I a bit puzzled there seems to be little documentation about it, and that no error message occurs pointing the developer to the right direction... Nevertheless, good that things work again here. Thanks, Sophonet On 2018-02-20 16:33, Sophonet wrote: > Hi Sankhesh, > > thanks for pushing me towards the next step of testing. Indeed, the > VTK test which I have mentioned below works. After having spent some > time on trying to localize the problem, it seems that this is related > to the fact that my application is using Qt (5.10 - with desktop > OpenGL backend, which works for all my other VTK-based > visualizations). > > I have followed all the suggestions for setting up a QVTKOpenGLWidget, > but using the same code as in the test, the four viewers remain empty > (which is what I am observing in my application as well). Code > snippets are below... > > Any hints on how to use vtkGPUVolumeRayCastMapper in a Qt 5 > application with the OpenGL2 backend? > > Thanks, > > Sophonet > > --- > void TestGPURayCastBlendModes(vtkRenderWindow *renwin) > { > // The code from the corresponding function in > // > https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastFourComponentsMIP.cxx > // with minor modifications to use the given renderwindow, and after > removing > // the few testing-statements > } > > int main(int argc, char *argv[]) > { > QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); > QApplication app(argc, argv); > > QMainWindow *mainWindow = new QMainWindow(); > > QVTKOpenGLWidget *widget = new QVTKOpenGLWidget(mainWindow); > > auto *renwin = vtkGenericOpenGLRenderWindow::New(); > widget->SetRenderWindow(renwin); > mainWindow->setCentralWidget(widget); > > mainWindow->show(); > TestGPURayCastBlendModes(renwin); > return app.exec(); > } > > > > On 2018-02-19 13:38, Sankhesh Jhaveri wrote: >> Hi, >> >> Well the difference between in my suggestion was that the minimum >> scalar value was also getting an opacity weighing ensuring that you >> should at least see a white cube if the volume has all the same >> values. However, it that also doesn't show you anything, perhaps >> there's something else going on. >> >> Could you try running the VTK tests to see if the volume rendering >> ones run and pass? >> >> Thanks, >> Sankhesh >> >> On Mon, Feb 19, 2018, 4:05 AM Sophonet >> wrote: >> >>> Hi Sankhesh, >>> >>> thanks for your message - just tried your suggestion, which is >>> basically >>> what I have already tried in the commented part of the code below. >>> As >>> expected, it did not change the result, my renderwindow is still >>> black. >>> >>> Any other hint? >>> >>> Best regards, >>> >>> Sophonet >>> >>> On 2018-02-09 17:57, Sankhesh Jhaveri wrote: >>>> Hi Sophonet, >>>> >>>> Try setting the scalar opacity function over the whole range of >>> scalar >>>> values. >>>> >>>> Something like: >>>> >>>> double * range = data->GetScalarRange(); >>>> vtkNew f; >>>> f->AddPoint(range[0], 0.1); >>>> f->AddPoint(range[1], 1.0); >>>> property->SetScalarOpacity(f); >>>> >>>> Hope that helps, >>>> Sankhesh >>>> >>>> ? >>>> >>>> On Sat, Feb 3, 2018 at 5:37 AM Sophonet >>>> wrote: >>>> >>>>> Hi list, >>>>> >>>>> in an earlier version of my software using VTK7.x and the OpenGL >>>>> backend, MIP rendering was working using >>> vtkGPUVolumeRayCastMapper >>>>> and >>>>> MaximumIntensityProjection. >>>>> >>>>> However, in VTK 8.x (e.g. VTK 8.1.0), using the OpenGL2 backend, >>> the >>>>> renderwindow stays black/empty - VTK does not show an error >>> message, >>>>> and >>>>> the IsRenderSupported (see below) does not seem to fail. >>>>> >>>>> Any hints what is wrong with the code below? By the way: I have >>>>> added >>>>> the volumeProperty (and the piecewise function) after following a >>>>> current VTK test program >>>>> >>>> >>> >> (https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastFourComponentsMIP.cxx). >>>>> >>>>> vtkimagedata is a scalar medical image (unsigned short), so >>> nothing >>>>> special. >>>>> >>>>> Thanks, >>>>> >>>>> Sophonet >>>>> >>>>> vtkNew mapper; >>>>> mapper->SetInputData(vtkimagedata); >>>>> mapper->SetBlendModeToMaximumIntensity(); >>>>> >>>>> vtkNew volume; >>>>> volume->SetMapper(mapper); >>>>> // ... connect to renderer etc. >>>>> >>>>> //NOTE: The following lines from VTK's >>>>> TestGPURayCastFourComponentsMIP.cxx did not solve the problem >>>>> //vtkNew volumeProperty; >>>>> //volumeProperty->IndependentComponentsOn(); >>>>> >>>>> //volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); >>>>> //volumeProperty->SetShade(1); >>>>> >>>>> //vtkNew f; >>>>> //f->AddPoint(0, 0.0); >>>>> //f->AddPoint(255, 1.0); >>>>> //volumeProperty->SetScalarOpacity(f); >>>>> >>>>> //int valid = >>>>> mapper->IsRenderSupported(vtkrenderer_->GetRenderWindow(), >>>>> volumeProperty); >>>>> >>>>> // NOTE: No exception was thrown on my system >>>>> //if (valid == 0) >>>>> // throw std::runtime_error("MIP rendering is not supported"); >>>>> //volume->SetProperty(volumeProperty); >>>>> _______________________________________________ >>>>> Powered by www.kitware.com [1] [1] >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: >>> http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> https://vtk.org/mailman/listinfo/vtkusers >>>> -- >>>> >>>> SANKHESH JHAVERI >>>> >>>> _SR. RESEARCH & DEVELOPMENT ENGINEER_ | KITWARE [2] | (518) >>> 881-4417 >>>> >>>> ? >>>> >>>> Links: >>>> ------ >>>> [1] http://www.kitware.com >>>> [2] http://www.kitware.com/ >> -- >> >> SANKHESH JHAVERI >> >> _SR. RESEARCH & DEVELOPMENT ENGINEER_ | KITWARE [2] | (518) 881-4417 >> >> ? >> >> Links: >> ------ >> [1] http://www.kitware.com >> [2] http://www.kitware.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: > https://vtk.org/mailman/listinfo/vtkusers From sankhesh.jhaveri at kitware.com Wed Feb 21 07:58:04 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 21 Feb 2018 12:58:04 +0000 Subject: [vtkusers] Black renderwindow with vtkGPUVolumeRayCastMapper/MaximumIntensityProjection In-Reply-To: <6ede0d154c9fa625c83a2bdda63f4799@kant.sophonet.de> References: <2ade920a20a76c4f08d6082fe8792fa8@kant.sophonet.de> <8391fc7c793401898f65a5abfa09dfe6@kant.sophonet.de> <88a31b1884f99f12eac7544f27013afa@kant.sophonet.de> <6ede0d154c9fa625c83a2bdda63f4799@kant.sophonet.de> Message-ID: Hi Sophonet, Glad that you could solve the problem. I agree that the documentation is missing to mention that the volume mapper does not support multisampling. There is also a bug report for this on the VTK issue tracker - https://gitlab.kitware.com/vtk/vtk/issues/17095 Best, Sankhesh On Wed, Feb 21, 2018, 7:31 AM Sophonet wrote: > Hi Sankhesh and all, that > > just found a related problem in the developer-list: > > https://www.vtk.org/pipermail/vtk-developers/2017-May/035107.html > > Indeed, when doing both, setting defaultFormat.setSamples(0) when > setting the surface format as well as > vtkRenderWindow->SetMultiSamples(0), the volume appears as intended. I a > bit puzzled there seems to be little documentation about it, and that no > error message occurs pointing the developer to the right direction... > Nevertheless, good that things work again here. > > Thanks, > > Sophonet > > > On 2018-02-20 16:33, Sophonet wrote: > > Hi Sankhesh, > > > > thanks for pushing me towards the next step of testing. Indeed, the > > VTK test which I have mentioned below works. After having spent some > > time on trying to localize the problem, it seems that this is related > > to the fact that my application is using Qt (5.10 - with desktop > > OpenGL backend, which works for all my other VTK-based > > visualizations). > > > > I have followed all the suggestions for setting up a QVTKOpenGLWidget, > > but using the same code as in the test, the four viewers remain empty > > (which is what I am observing in my application as well). Code > > snippets are below... > > > > Any hints on how to use vtkGPUVolumeRayCastMapper in a Qt 5 > > application with the OpenGL2 backend? > > > > Thanks, > > > > Sophonet > > > > --- > > void TestGPURayCastBlendModes(vtkRenderWindow *renwin) > > { > > // The code from the corresponding function in > > // > > > https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastFourComponentsMIP.cxx > > // with minor modifications to use the given renderwindow, and after > > removing > > // the few testing-statements > > } > > > > int main(int argc, char *argv[]) > > { > > > QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); > > QApplication app(argc, argv); > > > > QMainWindow *mainWindow = new QMainWindow(); > > > > QVTKOpenGLWidget *widget = new QVTKOpenGLWidget(mainWindow); > > > > auto *renwin = vtkGenericOpenGLRenderWindow::New(); > > widget->SetRenderWindow(renwin); > > mainWindow->setCentralWidget(widget); > > > > mainWindow->show(); > > TestGPURayCastBlendModes(renwin); > > return app.exec(); > > } > > > > > > > > On 2018-02-19 13:38, Sankhesh Jhaveri wrote: > >> Hi, > >> > >> Well the difference between in my suggestion was that the minimum > >> scalar value was also getting an opacity weighing ensuring that you > >> should at least see a white cube if the volume has all the same > >> values. However, it that also doesn't show you anything, perhaps > >> there's something else going on. > >> > >> Could you try running the VTK tests to see if the volume rendering > >> ones run and pass? > >> > >> Thanks, > >> Sankhesh > >> > >> On Mon, Feb 19, 2018, 4:05 AM Sophonet > >> wrote: > >> > >>> Hi Sankhesh, > >>> > >>> thanks for your message - just tried your suggestion, which is > >>> basically > >>> what I have already tried in the commented part of the code below. > >>> As > >>> expected, it did not change the result, my renderwindow is still > >>> black. > >>> > >>> Any other hint? > >>> > >>> Best regards, > >>> > >>> Sophonet > >>> > >>> On 2018-02-09 17:57, Sankhesh Jhaveri wrote: > >>>> Hi Sophonet, > >>>> > >>>> Try setting the scalar opacity function over the whole range of > >>> scalar > >>>> values. > >>>> > >>>> Something like: > >>>> > >>>> double * range = data->GetScalarRange(); > >>>> vtkNew f; > >>>> f->AddPoint(range[0], 0.1); > >>>> f->AddPoint(range[1], 1.0); > >>>> property->SetScalarOpacity(f); > >>>> > >>>> Hope that helps, > >>>> Sankhesh > >>>> > >>>> ? > >>>> > >>>> On Sat, Feb 3, 2018 at 5:37 AM Sophonet > >>>> wrote: > >>>> > >>>>> Hi list, > >>>>> > >>>>> in an earlier version of my software using VTK7.x and the OpenGL > >>>>> backend, MIP rendering was working using > >>> vtkGPUVolumeRayCastMapper > >>>>> and > >>>>> MaximumIntensityProjection. > >>>>> > >>>>> However, in VTK 8.x (e.g. VTK 8.1.0), using the OpenGL2 backend, > >>> the > >>>>> renderwindow stays black/empty - VTK does not show an error > >>> message, > >>>>> and > >>>>> the IsRenderSupported (see below) does not seem to fail. > >>>>> > >>>>> Any hints what is wrong with the code below? By the way: I have > >>>>> added > >>>>> the volumeProperty (and the piecewise function) after following a > >>>>> current VTK test program > >>>>> > >>>> > >>> > >> ( > https://github.com/Kitware/VTK/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastFourComponentsMIP.cxx > ). > >>>>> > >>>>> vtkimagedata is a scalar medical image (unsigned short), so > >>> nothing > >>>>> special. > >>>>> > >>>>> Thanks, > >>>>> > >>>>> Sophonet > >>>>> > >>>>> vtkNew mapper; > >>>>> mapper->SetInputData(vtkimagedata); > >>>>> mapper->SetBlendModeToMaximumIntensity(); > >>>>> > >>>>> vtkNew volume; > >>>>> volume->SetMapper(mapper); > >>>>> // ... connect to renderer etc. > >>>>> > >>>>> //NOTE: The following lines from VTK's > >>>>> TestGPURayCastFourComponentsMIP.cxx did not solve the problem > >>>>> //vtkNew volumeProperty; > >>>>> //volumeProperty->IndependentComponentsOn(); > >>>>> > >>>>> //volumeProperty->SetInterpolationType(VTK_LINEAR_INTERPOLATION); > >>>>> //volumeProperty->SetShade(1); > >>>>> > >>>>> //vtkNew f; > >>>>> //f->AddPoint(0, 0.0); > >>>>> //f->AddPoint(255, 1.0); > >>>>> //volumeProperty->SetScalarOpacity(f); > >>>>> > >>>>> //int valid = > >>>>> mapper->IsRenderSupported(vtkrenderer_->GetRenderWindow(), > >>>>> volumeProperty); > >>>>> > >>>>> // NOTE: No exception was thrown on my system > >>>>> //if (valid == 0) > >>>>> // throw std::runtime_error("MIP rendering is not supported"); > >>>>> //volume->SetProperty(volumeProperty); > >>>>> _______________________________________________ > >>>>> Powered by www.kitware.com [1] [1] > >>>>> > >>>>> Visit other Kitware open-source projects at > >>>>> http://www.kitware.com/opensource/opensource.html > >>>>> > >>>>> Please keep messages on-topic and check the VTK FAQ at: > >>>>> http://www.vtk.org/Wiki/VTK_FAQ > >>>>> > >>>>> Search the list archives at: > >>> http://markmail.org/search/?q=vtkusers > >>>>> > >>>>> Follow this link to subscribe/unsubscribe: > >>>>> https://vtk.org/mailman/listinfo/vtkusers > >>>> -- > >>>> > >>>> SANKHESH JHAVERI > >>>> > >>>> _SR. RESEARCH & DEVELOPMENT ENGINEER_ | KITWARE [2] | (518) > >>> 881-4417 > >>>> > >>>> ? > >>>> > >>>> Links: > >>>> ------ > >>>> [1] http://www.kitware.com > >>>> [2] http://www.kitware.com/ > >> -- > >> > >> SANKHESH JHAVERI > >> > >> _SR. RESEARCH & DEVELOPMENT ENGINEER_ | KITWARE [2] | (518) 881-4417 > >> > >> ? > >> > >> Links: > >> ------ > >> [1] http://www.kitware.com > >> [2] http://www.kitware.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: > > https://vtk.org/mailman/listinfo/vtkusers > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From yone.moreno101 at alu.ulpgc.es Wed Feb 21 08:56:26 2018 From: yone.moreno101 at alu.ulpgc.es (=?iso-8859-1?Q?YONE_MORENO_JIM=C9NEZ?=) Date: Wed, 21 Feb 2018 13:56:26 +0000 Subject: [vtkusers] Set up vtk.js Message-ID: Hello I would like some help or link to resources, because I have followed the introduction guide: https://kitware.github.io/vtk-js/docs/develop_requirement.html to install vtk, node and git. I have been trying to integrate into a React aplication, and it outputs: Failed to compile ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js 1126:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was not found in './ComputeGradients.worker' I just have used the code in: https://kitware.github.io/vtk-js/examples/PolyDataReader.html In addition if I go to the previous file and deep into ./ComputedGradients.worker, I navigate well to ComputeGradients.worker.js. Do I need other requirement to execute the aplication? I am using a node server. In addition I have written the code as React code: import React from 'react'; import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; import vtkFullScreenRenderWindow from 'vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index'; import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; import vtkPolyDataReader from 'vtk.js/Sources/IO/Legacy/PolyDataReader'; class LoadVTK extends React.Component() { render() { const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance(); const renderer = fullScreenRenderer.getRenderer(); const renderWindow = fullScreenRenderer.getRenderWindow(); const resetCamera = renderer.resetCamera; const render = renderWindow.render; const reader = vtkPolyDataReader.newInstance(); reader.setUrl(`C:\Users\YonePC\WebstormProjects\prototipo\src\components\animals\cabezasegmentado02.vtk`).then(() => { const polydata = reader.getOutputData(0); const mapper = vtkMapper.newInstance(); const actor = vtkActor.newInstance(); actor.setMapper(mapper); mapper.setInputData(polydata); renderer.addActor(actor); resetCamera(); render(); }); return (
); } } export default LoadVTK; And I have used it from the main page as: Could you help me please? Antes de imprimir este correo electr?nico, piense bien si es necesario hacerlo: el medio ambiente es una cuesti?n de todos. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Feb 21 09:16:01 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 21 Feb 2018 07:16:01 -0700 Subject: [vtkusers] Set up vtk.js In-Reply-To: References: Message-ID: Did you follow that guide? https://kitware.github.io/vtk-js/docs/intro_vtk_as_es6_dependency.html I think the file vtk.js/Utilities/config/dependency.js is missing the rule for the workers which was added yesterday night. You can see the missing rule here: https://github.com/Kitware/vtk-js/blob/master/Utilities/config/rules-vtk.js#L40-L45 I'll fix it later today. Thanks, Seb On Wed, Feb 21, 2018 at 6:56 AM, YONE MORENO JIM?NEZ < yone.moreno101 at alu.ulpgc.es> wrote: > *Hello I would like some help or link to resources, because I have > followed the introduction guide: *https://kitware.github.io/vtk- > js/docs/develop_requirement.html to install vtk, node and git. > > > I have been trying to integrate into a React aplication, and it outputs: > > > Failed to compile > > ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js > 1126:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was not found in './ComputeGradients.worker' > > > I just have used the code in: https://kitware.github.io/vtk- > js/examples/PolyDataReader.html > > > In addition if I go to the previous file and deep into > ./ComputedGradients.worker, I navigate well to ComputeGradients.worker.js. > > > > Do I need other requirement to execute the aplication? I am using a node > server. > > > In addition I have written the code as React code: > > > import React from 'react'; > > > import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; > import vtkFullScreenRenderWindow from 'vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index'; > import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; > import vtkPolyDataReader from 'vtk.js/Sources/IO/Legacy/PolyDataReader'; > > class LoadVTK extends React.Component() { > render() { > const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance(); > const renderer = fullScreenRenderer.getRenderer(); > const renderWindow = fullScreenRenderer.getRenderWindow(); > > const resetCamera = renderer.resetCamera; > const render = renderWindow.render; > > const reader = vtkPolyDataReader.newInstance(); > reader.setUrl(`C:\Users\YonePC\WebstormProjects\prototipo\src\components\animals\cabezasegmentado02.vtk`).then(() => { > const polydata = reader.getOutputData(0); > const mapper = vtkMapper.newInstance(); > const actor = vtkActor.newInstance(); > > actor.setMapper(mapper); > mapper.setInputData(polydata); > > renderer.addActor(actor); > > resetCamera(); > render(); > > }); > > return ( >
> ); > > } > } > > export default LoadVTK; > > > And I have used it from the main page as: > > > > > *Could you help me please?* > > Antes de imprimir este correo electr?nico, piense bien si es necesario > hacerlo: el medio ambiente es una cuesti?n de todos. > > Please consider the environment before printing this email. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yone.moreno101 at alu.ulpgc.es Wed Feb 21 10:01:36 2018 From: yone.moreno101 at alu.ulpgc.es (=?utf-8?B?WU9ORSBNT1JFTk8gSklNw4lORVo=?=) Date: Wed, 21 Feb 2018 15:01:36 +0000 Subject: [vtkusers] Set up vtk.js In-Reply-To: References: , Message-ID: Sebastien I have followed the guide and the previous console error has gone ;=) However after starting the webpack dev server I only see the directories structure, is not supposed to execute an application? [cid:38a19d40-c5fb-4b6d-bf36-a72594afcd1b] It should be like the example: https://kitware.github.io/vtk-js/examples/ConeSource.html The architecture: [cid:3c04c7b6-fb8e-4019-8a8f-fbe93fda626a] I saw that in index.html the script being included was called MyWebApp in index.html: [cid:82e830fe-3cf0-4cd5-8cbf-4ada738da43c] And I also tried to change it to index.js However it also displays the list: [cid:a2bde8b3-ddcd-478b-9145-ad97107713d8] Is it the correct output? I ask because I thought it was an unexpected behaviour. Thank you for your help and time! ? ________________________________ De: Sebastien Jourdain Enviado: mi?rcoles, 21 de febrero de 2018 14:16:01 Para: YONE MORENO JIM?NEZ Cc: vtkusers at vtk.org; Matt McCormick Asunto: Re: [vtkusers] Set up vtk.js Did you follow that guide? https://kitware.github.io/vtk-js/docs/intro_vtk_as_es6_dependency.html I think the file vtk.js/Utilities/config/dependency.js is missing the rule for the workers which was added yesterday night. You can see the missing rule here: https://github.com/Kitware/vtk-js/blob/master/Utilities/config/rules-vtk.js#L40-L45 I'll fix it later today. Thanks, Seb On Wed, Feb 21, 2018 at 6:56 AM, YONE MORENO JIM?NEZ > wrote: Hello I would like some help or link to resources, because I have followed the introduction guide: https://kitware.github.io/vtk-js/docs/develop_requirement.html to install vtk, node and git. I have been trying to integrate into a React aplication, and it outputs: Failed to compile ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js 1126:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was not found in './ComputeGradients.worker' I just have used the code in: https://kitware.github.io/vtk-js/examples/PolyDataReader.html In addition if I go to the previous file and deep into ./ComputedGradients.worker, I navigate well to ComputeGradients.worker.js. Do I need other requirement to execute the aplication? I am using a node server. In addition I have written the code as React code: import React from 'react'; import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; import vtkFullScreenRenderWindow from 'vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index'; import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; import vtkPolyDataReader from 'vtk.js/Sources/IO/Legacy/PolyDataReader'; class LoadVTK extends React.Component() { render() { const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance(); const renderer = fullScreenRenderer.getRenderer(); const renderWindow = fullScreenRenderer.getRenderWindow(); const resetCamera = renderer.resetCamera; const render = renderWindow.render; const reader = vtkPolyDataReader.newInstance(); reader.setUrl(`C:\Users\YonePC\WebstormProjects\prototipo\src\components\animals\cabezasegmentado02.vtk`).then(() => { const polydata = reader.getOutputData(0); const mapper = vtkMapper.newInstance(); const actor = vtkActor.newInstance(); actor.setMapper(mapper); mapper.setInputData(polydata); renderer.addActor(actor); resetCamera(); render(); }); return (
); } } export default LoadVTK; And I have used it from the main page as: Could you help me please? Antes de imprimir este correo electr?nico, piense bien si es necesario hacerlo: el medio ambiente es una cuesti?n de todos. Please consider the environment before printing this email. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers Antes de imprimir este correo electr?nico, piense bien si es necesario hacerlo: el medio ambiente es una cuesti?n de todos. Please consider the environment before printing this email. Antes de imprimir este correo electr?nico, piense bien si es necesario hacerlo: el medio ambiente es una cuesti?n de todos. Please consider the environment before printing this email. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 26319 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 9291 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 12075 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 26757 bytes Desc: pastedImage.png URL: From bill.lorensen at gmail.com Wed Feb 21 10:31:47 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 21 Feb 2018 07:31:47 -0800 Subject: [vtkusers] DICOM Image Files Sources In-Reply-To: References: Message-ID: I've updated the example pages to include pointers to the data. Please revisit those pages. Bill On Tue, Feb 20, 2018 at 10:31 PM, Ashef Shahrior wrote: > I want to render volume to a stack of DICOM image files and reconstruct a 3D > model from them. I wish to know the sources for downloading these DICOM > files. For instance, an example is given here - > https://lorensen.github.io/VTKExamples/site/Cxx/VolumeRendering/FixedPointVolumeRayCastMapperCT/ > - renders a volume data. But the source used for this is not given here. Can > you please tell me from where I will be able to collect the required data to > practice these examples? This example also - > https://lorensen.github.io/VTKExamples/site/Cxx/Medical/MedicalDemo2/ - does > volume rendering but where will I get the data files to do the > reconstruction? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Unpaid intern in BillsParadise at noware dot com From sebastien.jourdain at kitware.com Wed Feb 21 10:43:42 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 21 Feb 2018 08:43:42 -0700 Subject: [vtkusers] Set up vtk.js In-Reply-To: References: Message-ID: I think you have several configuration mistakes. Please go through the documentation and make sure you follow all the details. Here is all the issue I've noticed: 1) the directory that should be listed is the ./dist not the root. (look at your package.json on the line script > start > "webpack-dev-server --content-base ./dist", ) 2) MyWebApp.js should be in ./dist not in root (webpack config const outputPath = path.join(__dirname, './dist'); ) 3) The html should point to that MyWebApp.js file (like described in the doc) not to 'src/index.js' 4) The html should be in ./dist so there is no way from that directory it could reach MyWebApp.js as it is not in the same directory On Wed, Feb 21, 2018 at 8:01 AM, YONE MORENO JIM?NEZ < yone.moreno101 at alu.ulpgc.es> wrote: > *Sebastien I have followed the guide and the previous console error has > gone ;=)* > > > However after starting the webpack dev server I only see the directories > structure, is not supposed to execute an application? > > > > > > > > > It should be like the example: https://kitware.github.io/vtk- > js/examples/ConeSource.html > > > The architecture: > > > > I saw that in index.html the script being included was called MyWebApp in > index.html: > > > > And I also tried to change it to index.js > > > > > > > > > > > > > > > However it also displays the list: > > > > > Is it the correct output? I ask because I thought it was an unexpected > behaviour. > > > *Thank you for your help and time! * *?* > ------------------------------ > *De:* Sebastien Jourdain > *Enviado:* mi?rcoles, 21 de febrero de 2018 14:16:01 > *Para:* YONE MORENO JIM?NEZ > *Cc:* vtkusers at vtk.org; Matt McCormick > *Asunto:* Re: [vtkusers] Set up vtk.js > > Did you follow that guide? https://kitware.github. > io/vtk-js/docs/intro_vtk_as_es6_dependency.html > > I think the file vtk.js/Utilities/config/dependency.js is missing the > rule for the workers which was added yesterday night. > > You can see the missing rule here: https://github.com/ > Kitware/vtk-js/blob/master/Utilities/config/rules-vtk.js#L40-L45 > > I'll fix it later today. > > Thanks, > > Seb > > On Wed, Feb 21, 2018 at 6:56 AM, YONE MORENO JIM?NEZ < > yone.moreno101 at alu.ulpgc.es> wrote: > > *Hello I would like some help or link to resources, because I have > followed the introduction guide: *https://kitware.github.io/vtk- > js/docs/develop_requirement.html to install vtk, node and git. > > > I have been trying to integrate into a React aplication, and it outputs: > > > Failed to compile > > ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js > 1126:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was not found in './ComputeGradients.worker' > > > I just have used the code in: https://kitware.github.io/vtk- > js/examples/PolyDataReader.html > > > In addition if I go to the previous file and deep into > ./ComputedGradients.worker, I navigate well to ComputeGradients.worker.js. > > > > Do I need other requirement to execute the aplication? I am using a node > server. > > > In addition I have written the code as React code: > > > import React from 'react'; > > > import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; > import vtkFullScreenRenderWindow from 'vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index'; > import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; > import vtkPolyDataReader from 'vtk.js/Sources/IO/Legacy/PolyDataReader'; > > class LoadVTK extends React.Component() { > render() { > const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance(); > const renderer = fullScreenRenderer.getRenderer(); > const renderWindow = fullScreenRenderer.getRenderWindow(); > > const resetCamera = renderer.resetCamera; > const render = renderWindow.render; > > const reader = vtkPolyDataReader.newInstance(); > reader.setUrl(`C:\Users\YonePC\WebstormProjects\prototipo\src\components\animals\cabezasegmentado02.vtk`).then(() => { > const polydata = reader.getOutputData(0); > const mapper = vtkMapper.newInstance(); > const actor = vtkActor.newInstance(); > > actor.setMapper(mapper); > mapper.setInputData(polydata); > > renderer.addActor(actor); > > resetCamera(); > render(); > > }); > > return ( >
> ); > > } > } > > export default LoadVTK; > > > And I have used it from the main page as: > > > > > *Could you help me please?* > > Antes de imprimir este correo electr?nico, piense bien si es necesario > hacerlo: el medio ambiente es una cuesti?n de todos. > > Please consider the environment before printing this email. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > > > Antes de imprimir este correo electr?nico, piense bien si es necesario > hacerlo: el medio ambiente es una cuesti?n de todos. > > Please consider the environment before printing this email. > > Antes de imprimir este correo electr?nico, piense bien si es necesario > hacerlo: el medio ambiente es una cuesti?n de todos. > > Please consider the environment before printing this email. > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 26757 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 26319 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 12075 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 9291 bytes Desc: not available URL: From aron.helser at kitware.com Wed Feb 21 10:55:44 2018 From: aron.helser at kitware.com (Aron Helser) Date: Wed, 21 Feb 2018 10:55:44 -0500 Subject: [vtkusers] Set up vtk.js In-Reply-To: References: Message-ID: It looks like you have nested 'dist' directories? 'dist' contains another 'dist' directory? On Wed, Feb 21, 2018 at 10:43 AM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > I think you have several configuration mistakes. Please go through the > documentation and make sure you follow all the details. > > Here is all the issue I've noticed: > 1) the directory that should be listed is the ./dist not the root. (look > at your package.json on the line script > start > "webpack-dev-server > --content-base ./dist", ) > 2) MyWebApp.js should be in ./dist not in root (webpack config const > outputPath = path.join(__dirname, './dist'); ) > 3) The html should point to that MyWebApp.js file (like described in the > doc) not to 'src/index.js' > 4) The html should be in ./dist so there is no way from that directory it > could reach MyWebApp.js as it is not in the same directory > > > > > On Wed, Feb 21, 2018 at 8:01 AM, YONE MORENO JIM?NEZ < > yone.moreno101 at alu.ulpgc.es> wrote: > >> *Sebastien I have followed the guide and the previous console error has >> gone ;=)* >> >> >> However after starting the webpack dev server I only see the directories >> structure, is not supposed to execute an application? >> >> >> >> >> >> >> >> >> It should be like the example: https://kitware.github.io/vtk- >> js/examples/ConeSource.html >> >> >> The architecture: >> >> >> >> I saw that in index.html the script being included was called MyWebApp in >> index.html: >> >> >> >> And I also tried to change it to index.js >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> However it also displays the list: >> >> >> >> >> Is it the correct output? I ask because I thought it was an unexpected >> behaviour. >> >> >> *Thank you for your help and time! * *?* >> ------------------------------ >> *De:* Sebastien Jourdain >> *Enviado:* mi?rcoles, 21 de febrero de 2018 14:16:01 >> *Para:* YONE MORENO JIM?NEZ >> *Cc:* vtkusers at vtk.org; Matt McCormick >> *Asunto:* Re: [vtkusers] Set up vtk.js >> >> Did you follow that guide? https://kitware.github. >> io/vtk-js/docs/intro_vtk_as_es6_dependency.html >> >> I think the file vtk.js/Utilities/config/dependency.js is missing the >> rule for the workers which was added yesterday night. >> >> You can see the missing rule here: https://github.com/Kitwa >> re/vtk-js/blob/master/Utilities/config/rules-vtk.js#L40-L45 >> >> I'll fix it later today. >> >> Thanks, >> >> Seb >> >> On Wed, Feb 21, 2018 at 6:56 AM, YONE MORENO JIM?NEZ < >> yone.moreno101 at alu.ulpgc.es> wrote: >> >> *Hello I would like some help or link to resources, because I have >> followed the introduction guide: *https://kitware.github.io/vtk- >> js/docs/develop_requirement.html to install vtk, node and git. >> >> >> I have been trying to integrate into a React aplication, and it outputs: >> >> >> Failed to compile >> >> ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js >> 1126:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was not found in './ComputeGradients.worker' >> >> >> I just have used the code in: https://kitware.github.io/vtk- >> js/examples/PolyDataReader.html >> >> >> In addition if I go to the previous file and deep into >> ./ComputedGradients.worker, I navigate well to ComputeGradients.worker.js. >> >> >> >> Do I need other requirement to execute the aplication? I am using a node >> server. >> >> >> In addition I have written the code as React code: >> >> >> import React from 'react'; >> >> >> import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; >> import vtkFullScreenRenderWindow from 'vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index'; >> import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; >> import vtkPolyDataReader from 'vtk.js/Sources/IO/Legacy/PolyDataReader'; >> >> class LoadVTK extends React.Component() { >> render() { >> const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance(); >> const renderer = fullScreenRenderer.getRenderer(); >> const renderWindow = fullScreenRenderer.getRenderWindow(); >> >> const resetCamera = renderer.resetCamera; >> const render = renderWindow.render; >> >> const reader = vtkPolyDataReader.newInstance(); >> reader.setUrl(`C:\Users\YonePC\WebstormProjects\prototipo\src\components\animals\cabezasegmentado02.vtk`).then(() => { >> const polydata = reader.getOutputData(0); >> const mapper = vtkMapper.newInstance(); >> const actor = vtkActor.newInstance(); >> >> actor.setMapper(mapper); >> mapper.setInputData(polydata); >> >> renderer.addActor(actor); >> >> resetCamera(); >> render(); >> >> }); >> >> return ( >>
>> ); >> >> } >> } >> >> export default LoadVTK; >> >> >> And I have used it from the main page as: >> >> >> >> >> *Could you help me please?* >> >> Antes de imprimir este correo electr?nico, piense bien si es necesario >> hacerlo: el medio ambiente es una cuesti?n de todos. >> >> Please consider the environment before printing this email. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> >> >> Antes de imprimir este correo electr?nico, piense bien si es necesario >> hacerlo: el medio ambiente es una cuesti?n de todos. >> >> Please consider the environment before printing this email. >> >> Antes de imprimir este correo electr?nico, piense bien si es necesario >> hacerlo: el medio ambiente es una cuesti?n de todos. >> >> Please consider the environment before printing this email. >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 26319 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 9291 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 26757 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 12075 bytes Desc: not available URL: From andy.bauer at kitware.com Wed Feb 21 11:21:04 2018 From: andy.bauer at kitware.com (Andy Bauer) Date: Wed, 21 Feb 2018 11:21:04 -0500 Subject: [vtkusers] unable to write multiple .pvtu files with split vtkMPIController In-Reply-To: References: Message-ID: Hi Joan, Is fname different between the different MPI controllers? Other than that everything looks correct to me. If that's not the issue could you share some sample code that demonstrates the problem? I know I've done this sort of thing in the past and it worked properly but it's possible that this became broken somewhere along the way. Best, Andy On Tue, Feb 20, 2018 at 1:07 PM, Joan Baiges wrote: > Hello, > I am trying to write several .vtu and .pvtu files by using several > MPI_Communicators. For this, I Splitinitialize a vtkMPIController object, > and then set this controller as the controller for a > vtkXMLPUnstructuredGridWriter. > > However, when I ask the vtkXMLPUnstructuredGridWriter->Write(), only one > .pvtu file is written, while I would expect that one .pvtu file is written > for each of the communicators the MPI_COMM_WORLD has been subdivided into. > On the other hand, the .vtu files are written properly for all the > processors in all the split mpi controllers. > > The code I am writing looks approximately like this: > > vtkMPIController* controller; > vtkMPICommunicator* communicator; > vtkSmartPointer unstructuredGrid; > vtkSmartPointer parallelwriter; > > //New communicator and spliting of the communicator > communicator = vtkMPICommunicator::New(); > communicator = vtkMPICommunicator::GetWorldCommunicator(); > communicator->SplitInitialize(communicator,MulticommColor,MPIrank); > > //Setting the split communicator as the communicator for the controller > controller = vtkMPIController::New(); > controller->SetCommunicator(communicator); > controller->Initialize(); > controller->SetGlobalController(controller); > > //Initializing the parallelwriter with the controller > parallelwriter = vtkSmartPointer::New(); > parallelwriter->SetController(controller); > parallelwriter->SetNumberOfPieces(MPIsize); > parallelwriter->SetGhostLevel(1); > parallelwriter->SetStartPiece(MPIrank); > parallelwriter->SetEndPiece(MPIrank); > > //setting file name > fname = std::string(filename); > fname.append(".pvtu"); > parallelwriter->SetFileName(fname.c_str()); > > > //Setting the grid > unstructuredGrid = vtkSmartPointer::New(); > parallelwriter->SetInputData(unstructuredGrid); > > > //After writing the grid info, we call the parallelwriter to write > parallelwriter->Write(); > > This final line causes all the processors to write the .vtu files, however > only one processor writes the .pvtu file, while I would expect/like one > .pvtu file per split mpi communicator. > > Thank you in advance for your help, > > Joan > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.neher at Dkfz-Heidelberg.de Wed Feb 21 11:08:02 2018 From: p.neher at Dkfz-Heidelberg.de (Neher, Peter) Date: Wed, 21 Feb 2018 16:08:02 +0000 Subject: [vtkusers] vtkOpenGLPolyDataMapper, custom shaders and line width property Message-ID: <1519229334258.90782@Dkfz-Heidelberg.de> Hi everyone, I am trying to render a polydata in a QVTKOpenGLWidget with thick lines (actor property line width) in conjunction with my own shader code. Since we switched from QVTKWidget to QVTKOpenGLWidget this results in black lines (no color and/or lighting). Everything works fine if the line with is 1.0. For line width > 1.0, the shader seems to do nothing. Shader code is attached, as well as two images of depicting the issue. Any help is much appreciated! Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: shader.txt URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: normal_lines.png Type: image/png Size: 146371 bytes Desc: normal_lines.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: thick_lines.png Type: image/png Size: 7808 bytes Desc: thick_lines.png URL: From ochampao at hotmail.com Wed Feb 21 17:22:56 2018 From: ochampao at hotmail.com (ochampao) Date: Wed, 21 Feb 2018 15:22:56 -0700 (MST) Subject: [vtkusers] Overlay slice on vtkResliceImageViewer and change slice when scrolling Message-ID: <1519251776356-0.post@n5.nabble.com> Hi vtkUsers, How can I overlay a slice from a volume on another volume that is already being displayed using a vtkResliceImageViewer? I would also like the slice from the second volume to change when the slice of the first volume changes, for example, when using the mouse scroll wheel. Some more details: Currently I am able to read a volume from a dicom series and display it using vtkResliceImageViewer. I was also able to generate another "dummy" volume with equal dimensions and spacing as the dicom volume, extract a slice from it using vtkImageReslice (slice axes extracted from vtkResliceImageViewer) and overlay it on the current dicom slice. I used vtkLookupTable and vtkImageMapToColors for mapping the colours/opacity of the dummy slice and then added it to the renderer as a vtkImageActor. This works, however the slice overlaid does not change when scrolling through the slices of the dicom volume. How can I achieve this? Is it possible to achieve this by using a second vtkResliceImageViewer on the same render window? (I have tried this with no success). Thanks for you help, Panos. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From guyrhoden at yahoo.com Wed Feb 21 20:52:11 2018 From: guyrhoden at yahoo.com (Walter Rhoden) Date: Thu, 22 Feb 2018 01:52:11 +0000 (UTC) Subject: [vtkusers] how to subclass a vtk class In-Reply-To: <647516918.3392058.1519264047590@mail.yahoo.com> References: <588624620.3328376.1519258332979.ref@mail.yahoo.com> <588624620.3328376.1519258332979@mail.yahoo.com> <647516918.3392058.1519264047590@mail.yahoo.com> Message-ID: <892345172.3394644.1519264331458@mail.yahoo.com> I am looking for guidance on how to correctly subclass a vtk class.? I have seen a number of older examples (vtk 5 or earlier) that all seem to fail now for various reasons.? I attempted to debug a number of them but this was an endeavor in frustration and I gave up in disgust. Does anyone know of a good up to date guide document and/or simple example that illustrates the basics? I am working in C++ and with QT.? I have the basics down pretty good.? I am looking to subclass some of the basic geometry classes such as vtkcylindersource and similar with the idea of added some additional methods specific to the overall function of my QT program/project.? Obviously this is not as simple as calling out the vtk class as the inherited class.?? Any help/guidance would be greatly appreciated. Thanks, Guy -------------- next part -------------- An HTML attachment was scrubbed... URL: From gohlinchia at gmail.com Wed Feb 21 22:04:14 2018 From: gohlinchia at gmail.com (gohlinchia) Date: Wed, 21 Feb 2018 20:04:14 -0700 (MST) Subject: [vtkusers] Rendering error with clip planes on ray cast volumes and depth peeling Message-ID: <1519268654370-0.post@n5.nabble.com> Hi, I'm using VTK 8.1.0. I'm trying the new volume depth peeling with clip planes when I noticed a problem. When the clip planes are active (set via vtkBoxWidget) on a volume in a scene with polygonal meshes, the rendered volume is displayed incorrectly when the depth peeling is ACTIVE. When I interactively move the camera, the clipped volume is rendered wrongly. However, when I disable depth peeling the clipped volume is displayed correctly but the meshes are displayed wrongly. The volume is rendered using the GPU ray casting mapper and the meshes are rendered using the normal polydata mapper. The first image shows correct clipping without depth peeling: The next image shows the incorrect clipping with depth peeling: Anyone else encountered this problem? Is this a known bug? ----- Chris -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aashish.chaudhary at kitware.com Wed Feb 21 23:02:22 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 22 Feb 2018 04:02:22 +0000 Subject: [vtkusers] Rendering error with clip planes on ray cast volumes and depth peeling In-Reply-To: <1519268654370-0.post@n5.nabble.com> References: <1519268654370-0.post@n5.nabble.com> Message-ID: I think this seems to be a new bug. We will file a bug and look into it. Can you post a sample code? - aashish On Wed, Feb 21, 2018 at 10:04 PM gohlinchia wrote: > Hi, > > I'm using VTK 8.1.0. I'm trying the new volume depth peeling with clip > planes when I noticed a problem. > > When the clip planes are active (set via vtkBoxWidget) on a volume in a > scene with polygonal meshes, the rendered volume is displayed incorrectly > when the depth peeling is ACTIVE. When I interactively move the camera, the > clipped volume is rendered wrongly. However, when I disable depth peeling > the clipped volume is displayed correctly but the meshes are displayed > wrongly. The volume is rendered using the GPU ray casting mapper and the > meshes are rendered using the normal polydata mapper. > > The first image shows correct clipping without depth peeling: > < > http://vtk.1045678.n5.nabble.com/file/t342340/Clip_planes_without_depth_peeling.png > > > > The next image shows the incorrect clipping with depth peeling: > < > http://vtk.1045678.n5.nabble.com/file/t342340/Clip_planes_with_depth_peeling.png > > > > Anyone else encountered this problem? Is this a known bug? > > > > ----- > Chris > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gohlinchia at gmail.com Wed Feb 21 23:11:57 2018 From: gohlinchia at gmail.com (gohlinchia) Date: Wed, 21 Feb 2018 21:11:57 -0700 (MST) Subject: [vtkusers] Rendering error with clip planes on ray cast volumes and depth peeling In-Reply-To: References: <1519268654370-0.post@n5.nabble.com> Message-ID: <1519272717575-0.post@n5.nabble.com> Hi Aashish, I based my codes on the existing example, GPURenderDemo.cxx. I added the following to activate depth peeling: renWin->SetAlphaBitPlanes(1); renWin->SetMultiSamples(0); renderer->SetMaximumNumberOfPeels(20); renderer->SetOcclusionRatio(0.0); renderer->SetUseDepthPeeling(1); renderer->SetUseDepthPeelingForVolumes(true); Thanks for raising the bug issue. ----- Chris -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ruvva at yahoo.com Thu Feb 22 01:02:59 2018 From: ruvva at yahoo.com (Koteswara Rao Ruvva) Date: Thu, 22 Feb 2018 06:02:59 +0000 (UTC) Subject: [vtkusers] Picking actors from an assembly References: <868984401.3516208.1519279379681.ref@mail.yahoo.com> Message-ID: <868984401.3516208.1519279379681@mail.yahoo.com> Hello all, I have two vtkPropAssemblies in the Renderer, each with couple of vtkActors. How do I pick an actor using mouse? I need to find the actor and the location on the actor. I tried the following code, but I am getting an assembly instead of the actor. picker = vtk.vtkPropPicker()if picker.Pick(mouseX, mouseY, 0,??renderer):? ? ? ? prop = picker.GetPath().GetFirstNode().GetViewProp() ? ? ? ? print(prop)? ? ? Please advise. Thank youRao -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Thu Feb 22 02:24:48 2018 From: nztoddler at yahoo.com (Todd) Date: Thu, 22 Feb 2018 20:24:48 +1300 Subject: [vtkusers] Picking actors from an assembly In-Reply-To: <868984401.3516208.1519279379681@mail.yahoo.com> Message-ID: An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Thu Feb 22 03:50:12 2018 From: ochampao at hotmail.com (ochampao) Date: Thu, 22 Feb 2018 01:50:12 -0700 (MST) Subject: [vtkusers] Overlay slice on vtkResliceImageViewer and change slice when scrolling In-Reply-To: <1519251776356-0.post@n5.nabble.com> References: <1519251776356-0.post@n5.nabble.com> Message-ID: <1519289412827-0.post@n5.nabble.com> Hello, Below I have attached a minimal code example of what I describe in my initial post, i.e. overlay a slice but not being able to change it when scrolling through the dicom volume. =============================================== int main(int argc, char** argv) { vtkNew reader; vtkNew resliceImageViewer; vtkNew renderWindowInteractor; vtkNew style; vtkNew renderWindow; vtkNew renderer; vtkSmartPointer dcmImage; renderWindow->AddRenderer(renderer); renderer->SetBackground(0.0, 0.0, 0.0); renderWindowInteractor->SetInteractorStyle(style); //load dicom reader->SetDirectoryName(""); reader->Update(); dcmImage = reader->GetOutput(); resliceImageViewer->SetInputData(dcmImage); resliceImageViewer->SetRenderWindow(renderWindow); resliceImageViewer->SetupInteractor(renderWindowInteractor); resliceImageViewer->SetResliceModeToAxisAligned(); resliceImageViewer->SetSlice(50); resliceImageViewer->SetColorLevel(-27); resliceImageViewer->SetColorWindow(1358); // Create mask volume vtkSmartPointer maskImage = vtkSmartPointer::New(); int extent[6]; dcmImage->GetExtent(extent); int xDim = extent[1] - extent[0] + 1; int yDim = extent[3] - extent[2] + 1; int zDim = extent[5] - extent[4] + 1; maskImage->SetSpacing(dcmImage->GetSpacing()); maskImage->SetDimensions(xDim, yDim, zDim); maskImage->AllocateScalars(VTK_DOUBLE, 1); double scalarvalue = 0.0; // colour mask for (int y = extent[2]; y < extent[3]; y++) { for (int x = extent[0]; x < extent[1]; x++) { for (int z = extent[4]; z < extent[5]; z++) { double* pixel = static_cast(maskImage->GetScalarPointer(x, y, z)); pixel[0] = scalarvalue; scalarvalue += 1.0; } scalarvalue = 0.0; } scalarvalue = 0.0; } // create lookup table vtkSmartPointer lookupTable = vtkSmartPointer::New(); lookupTable->SetNumberOfTableValues(zDim); lookupTable->SetRange(0, zDim-1); lookupTable->Build(); // get slice axes and set pass-through point vtkSmartPointer resliceAxes = vtkSmartPointer::New(); resliceAxes->DeepCopy(resliceImageViewer->GetResliceCursorWidget()->GetResliceCursorRepresentation()->GetResliceAxes()->GetData()); resliceAxes->SetElement(0, 3, 0); resliceAxes->SetElement(1, 3, 0); resliceAxes->SetElement(2, 3, 100); // extract slice vtkSmartPointer reslice = vtkSmartPointer::New(); reslice->SetInputData(maskImage); reslice->SetOutputDimensionality(2); reslice->SetResliceAxes(resliceAxes); reslice->SetInterpolationModeToLinear(); reslice->SetOutputSpacing(maskImage->GetSpacing()); // map colours vtkSmartPointer mapTransparency2 = vtkSmartPointer::New(); mapTransparency2->SetLookupTable(lookupTable); mapTransparency2->PassAlphaToOutputOn(); mapTransparency2->SetInputConnection(reslice->GetOutputPort()); // setup image actor for slice vtkSmartPointer maskActor = vtkSmartPointer::New(); maskActor->GetMapper()->SetInputConnection(mapTransparency2->GetOutputPort()); double pos[3]; maskActor->GetPosition(pos); pos[2] = 55; maskActor->SetPosition(pos); maskActor->SetOpacity(0.5); resliceImageViewer->GetRenderer()->AddActor(maskActor); resliceImageViewer->GetRenderer()->ResetCamera(); renderWindowInteractor->Start(); return 0; } =============================================== -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dan.lipsa at kitware.com Thu Feb 22 09:09:10 2018 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 22 Feb 2018 09:09:10 -0500 Subject: [vtkusers] how to subclass a vtk class In-Reply-To: <892345172.3394644.1519264331458@mail.yahoo.com> References: <588624620.3328376.1519258332979.ref@mail.yahoo.com> <588624620.3328376.1519258332979@mail.yahoo.com> <647516918.3392058.1519264047590@mail.yahoo.com> <892345172.3394644.1519264331458@mail.yahoo.com> Message-ID: Guy, I would advise to use vtk fields inside your Qt classes instead of using subclassing. You would need to subclass a vtk class only if you do vtk development. If you want o see how it is done the best place to look at is the vtk source code. For instance vtkCylinderSource is derived from vtkPolyDataAlgorithm. There are Qt examples you can take a look at here https://lorensen.github.io/VTKExamples/site/Cxx/#qt Dan On Wed, Feb 21, 2018 at 8:52 PM, Walter Rhoden via vtkusers < vtkusers at vtk.org> wrote: > > I am looking for guidance on how to correctly subclass a vtk class. I > have seen a number of older examples (vtk 5 or earlier) that all seem to > fail now for various reasons. I attempted to debug a number of them but > this was an endeavor in frustration and I gave up in disgust. > > Does anyone know of a good up to date guide document and/or simple example > that illustrates the basics? > > I am working in C++ and with QT. I have the basics down pretty good. I > am looking to subclass some of the basic geometry classes such as > vtkcylindersource and similar with the idea of added some additional > methods specific to the overall function of my QT program/project. > Obviously this is not as simple as calling out the vtk class as the > inherited class. > > Any help/guidance would be greatly appreciated. > > Thanks, > > Guy > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joan.baiges at upc.edu Thu Feb 22 10:11:21 2018 From: joan.baiges at upc.edu (Joan Baiges) Date: Thu, 22 Feb 2018 16:11:21 +0100 Subject: [vtkusers] unable to write multiple .pvtu files with split vtkMPIController In-Reply-To: References: Message-ID: Hello Andy, thank you for your answer, I have checked that the fname is different in each controller (it differs only in the folder where the files are written, the name of the file is the same), Joan *Joan Baiges*Ph.D. Civil Engineer T.(+34) 93 401 1048 C/ Gran Capit?, s/n, Campus Nord UPC, Ed. C1, Despatx 109 08034 ? Barcelona ? Spain 2018-02-21 17:21 GMT+01:00 Andy Bauer : > Hi Joan, > > Is fname different between the different MPI controllers? Other than that > everything looks correct to me. If that's not the issue could you share > some sample code that demonstrates the problem? I know I've done this sort > of thing in the past and it worked properly but it's possible that this > became broken somewhere along the way. > > Best, > Andy > > On Tue, Feb 20, 2018 at 1:07 PM, Joan Baiges wrote: > >> Hello, >> I am trying to write several .vtu and .pvtu files by using several >> MPI_Communicators. For this, I Splitinitialize a vtkMPIController object, >> and then set this controller as the controller for a >> vtkXMLPUnstructuredGridWriter. >> >> However, when I ask the vtkXMLPUnstructuredGridWriter->Write(), only one >> .pvtu file is written, while I would expect that one .pvtu file is written >> for each of the communicators the MPI_COMM_WORLD has been subdivided into. >> On the other hand, the .vtu files are written properly for all the >> processors in all the split mpi controllers. >> >> The code I am writing looks approximately like this: >> >> vtkMPIController* controller; >> vtkMPICommunicator* communicator; >> vtkSmartPointer unstructuredGrid; >> vtkSmartPointer parallelwriter; >> >> //New communicator and spliting of the communicator >> communicator = vtkMPICommunicator::New(); >> communicator = vtkMPICommunicator::GetWorldCommunicator(); >> communicator->SplitInitialize(communicator,MulticommColor,MPIrank); >> >> //Setting the split communicator as the communicator for the controller >> controller = vtkMPIController::New(); >> controller->SetCommunicator(communicator); >> controller->Initialize(); >> controller->SetGlobalController(controller); >> >> //Initializing the parallelwriter with the controller >> parallelwriter = vtkSmartPointer::New(); >> parallelwriter->SetController(controller); >> parallelwriter->SetNumberOfPieces(MPIsize); >> parallelwriter->SetGhostLevel(1); >> parallelwriter->SetStartPiece(MPIrank); >> parallelwriter->SetEndPiece(MPIrank); >> >> //setting file name >> fname = std::string(filename); >> fname.append(".pvtu"); >> parallelwriter->SetFileName(fname.c_str()); >> >> >> //Setting the grid >> unstructuredGrid = vtkSmartPointer::New(); >> parallelwriter->SetInputData(unstructuredGrid); >> >> >> //After writing the grid info, we call the parallelwriter to write >> parallelwriter->Write(); >> >> This final line causes all the processors to write the .vtu files, >> however only one processor writes the .pvtu file, while I would expect/like >> one .pvtu file per split mpi communicator. >> >> Thank you in advance for your help, >> >> Joan >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Thu Feb 22 12:12:29 2018 From: ochampao at hotmail.com (ochampao) Date: Thu, 22 Feb 2018 10:12:29 -0700 (MST) Subject: [vtkusers] Overlay slice on vtkResliceImageViewer and change slice when scrolling In-Reply-To: <1519289412827-0.post@n5.nabble.com> References: <1519251776356-0.post@n5.nabble.com> <1519289412827-0.post@n5.nabble.com> Message-ID: <1519319549805-0.post@n5.nabble.com> I have also tried using vtkImageResliceMapper and vtkImageSlice, but unfortunately I was not able to make it work. Is this only possible by writing my own vtkImageInteractionCallback that wheel handle, for example, vtkCommand::MouseWheelBackwardEvent in order to change both slices at the same time? Thanks, P. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Thu Feb 22 13:28:38 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 22 Feb 2018 11:28:38 -0700 Subject: [vtkusers] Overlay slice on vtkResliceImageViewer and change slice when scrolling In-Reply-To: <1519319549805-0.post@n5.nabble.com> References: <1519251776356-0.post@n5.nabble.com> <1519289412827-0.post@n5.nabble.com> <1519319549805-0.post@n5.nabble.com> Message-ID: On Thu, Feb 22, 2018 at 10:12 AM, ochampao wrote: > I have also tried using vtkImageResliceMapper and vtkImageSlice, but > unfortunately I was not able to make it work. > The best example to work from is the following VTK test code: https://github.com/Kitware/VTK/blob/master/Rendering/Image/Testing/Cxx/TestImageResliceMapperAlpha.cxx It shows a grid on top of an image, but you could modify it to load two images. Also, the interactor style can be changed as follows, which will allow you to slice though the volumes simultaneously by holding "Ctrl" while dragging the mouse: vtkInteractorStyleImage *style = vtkInteractorStyleImage::New(); style->SetInteractionModeToImageSlicing(); For overlay, there is also a class called vtkImageStack that makes image overlay more robust (it takes care of Z-buffer issues): https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageStack/ Also see the overview of vtkImageSlice and vtkImageResliceMapper: https://www.vtk.org/Wiki/VTK/Image_Rendering_Classes There is also some test code that shows vtkImageStack in a different configuration, where it shows a set of orthoplanes in a 3D view: https://github.com/Kitware/VTK/blob/master/Rendering/Image/Testing/Cxx/TestImageStack.cxx Is this only possible by writing my own vtkImageInteractionCallback that > wheel handle, for example, vtkCommand::MouseWheelBackwardEvent in order to > change both slices at the same time? > If you use vtkImageResliceMapper, then probably the best option is to customize vtkInteractorStyleImage e.g. via subclassing and then modify its code to achieve exactly the kind of interaction you want. Cheers, - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy.bauer at kitware.com Thu Feb 22 14:46:54 2018 From: andy.bauer at kitware.com (Andy Bauer) Date: Thu, 22 Feb 2018 14:46:54 -0500 Subject: [vtkusers] unable to write multiple .pvtu files with split vtkMPIController In-Reply-To: References: Message-ID: Hi Joan, If you could write a self-contained piece of code that verifies the error I'd be happy to take a look at fixing it. Best, Andy On Thu, Feb 22, 2018 at 10:11 AM, Joan Baiges wrote: > Hello Andy, thank you for your answer, > > I have checked that the fname is different in each controller (it differs > only in the folder where the files are written, the name of the file is the > same), > > Joan > > > > *Joan Baiges*Ph.D. Civil Engineer > T.(+34) 93 401 1048 <+34%20934%2001%2010%2048> > C/ Gran Capit?, s/n, Campus Nord UPC, Ed. C1, Despatx 109 > 08034 ? Barcelona ? Spain > > > > > > > 2018-02-21 17:21 GMT+01:00 Andy Bauer : > >> Hi Joan, >> >> Is fname different between the different MPI controllers? Other than that >> everything looks correct to me. If that's not the issue could you share >> some sample code that demonstrates the problem? I know I've done this sort >> of thing in the past and it worked properly but it's possible that this >> became broken somewhere along the way. >> >> Best, >> Andy >> >> On Tue, Feb 20, 2018 at 1:07 PM, Joan Baiges wrote: >> >>> Hello, >>> I am trying to write several .vtu and .pvtu files by using several >>> MPI_Communicators. For this, I Splitinitialize a vtkMPIController object, >>> and then set this controller as the controller for a >>> vtkXMLPUnstructuredGridWriter. >>> >>> However, when I ask the vtkXMLPUnstructuredGridWriter->Write(), only >>> one .pvtu file is written, while I would expect that one .pvtu file is >>> written for each of the communicators the MPI_COMM_WORLD has been >>> subdivided into. On the other hand, the .vtu files are written properly for >>> all the processors in all the split mpi controllers. >>> >>> The code I am writing looks approximately like this: >>> >>> vtkMPIController* controller; >>> vtkMPICommunicator* communicator; >>> vtkSmartPointer unstructuredGrid; >>> vtkSmartPointer parallelwriter; >>> >>> //New communicator and spliting of the communicator >>> communicator = vtkMPICommunicator::New(); >>> communicator = vtkMPICommunicator::GetWorldCommunicator(); >>> communicator->SplitInitialize(communicator,MulticommColor,MPIrank); >>> >>> //Setting the split communicator as the communicator for the controller >>> controller = vtkMPIController::New(); >>> controller->SetCommunicator(communicator); >>> controller->Initialize(); >>> controller->SetGlobalController(controller); >>> >>> //Initializing the parallelwriter with the controller >>> parallelwriter = vtkSmartPointer::New(); >>> parallelwriter->SetController(controller); >>> parallelwriter->SetNumberOfPieces(MPIsize); >>> parallelwriter->SetGhostLevel(1); >>> parallelwriter->SetStartPiece(MPIrank); >>> parallelwriter->SetEndPiece(MPIrank); >>> >>> //setting file name >>> fname = std::string(filename); >>> fname.append(".pvtu"); >>> parallelwriter->SetFileName(fname.c_str()); >>> >>> >>> //Setting the grid >>> unstructuredGrid = vtkSmartPointer::New(); >>> parallelwriter->SetInputData(unstructuredGrid); >>> >>> >>> //After writing the grid info, we call the parallelwriter to write >>> parallelwriter->Write(); >>> >>> This final line causes all the processors to write the .vtu files, >>> however only one processor writes the .pvtu file, while I would expect/like >>> one .pvtu file per split mpi communicator. >>> >>> Thank you in advance for your help, >>> >>> Joan >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From spetruzza at sci.utah.edu Thu Feb 22 15:10:05 2018 From: spetruzza at sci.utah.edu (Steve Petruzza) Date: Thu, 22 Feb 2018 13:10:05 -0700 Subject: [vtkusers] Get a VTKRender to draw inside an external QWidget (ver5) (or QOpenGLWidget) Message-ID: <20F37270-017D-4AB1-832D-A1EE64F27115@sci.utah.edu> Hi, I have a QOpenGLWidget that draws using gl calls. I would like to use a VTK render to draw inside the same canvas. I tried to use a QVTKRenderWindowInteractor passing the canvas as parent, but the canvas starts flickering and I cannot see any rendering. The same VTK render (using the same QVTKRenderWindowInteractor) works correctly in a separate vtkrenderwindow. Is there any simple way to just get the VTKRender to draw directly into the glRender loop of the canvas using the existing rendering window? Or any other suggestions. I am using VTK 8.1.0 and Qt 5.10 and this QVTKRenderWindowInteractor: https://gitlab.kitware.com/alextsui05/vtk/blob/e9e9ffcfbbad68343a0782a1d9024735b7649a46/Wrapping/Python/vtk/qt5/QVTKRenderWindowInteractor.py Thank you, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From koopman.mk at gmail.com Thu Feb 22 15:42:25 2018 From: koopman.mk at gmail.com (Martijn Koopman) Date: Thu, 22 Feb 2018 21:42:25 +0100 Subject: [vtkusers] Get a VTKRender to draw inside an external QWidget (ver5) (or QOpenGLWidget) In-Reply-To: <20F37270-017D-4AB1-832D-A1EE64F27115@sci.utah.edu> References: <20F37270-017D-4AB1-832D-A1EE64F27115@sci.utah.edu> Message-ID: Hi Steve, I believe what you're looking for is QVTKOpenGLWidget. It is a subclass of QOpenGLWidget. See https://www.vtk.org/doc/nightly/html/classQVTKOpenGLWidget.html Regards, Martijn Op 22 feb. 2018 21:10 schreef "Steve Petruzza" : > Hi, > > I have a QOpenGLWidget that draws using gl calls. I would like to use a > VTK render to draw inside the same canvas. > > I tried to use a QVTKRenderWindowInteractor passing the canvas as parent, > but the canvas starts flickering and I cannot see any rendering. > The same VTK render (using the same QVTKRenderWindowInteractor) works > correctly in a separate vtkrenderwindow. > > Is there any simple way to just get the VTKRender to draw directly into > the glRender loop of the canvas using the existing rendering window? > Or any other suggestions. > > I am using VTK 8.1.0 and Qt 5.10 and this QVTKRenderWindowInteractor: ht > tps://gitlab.kitware.com/alextsui05/vtk/blob/ > e9e9ffcfbbad68343a0782a1d9024735b7649a46/Wrapping/Python/vtk/qt5/ > QVTKRenderWindowInteractor.py > > Thank you, > Steve > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patriciop at gmail.com Thu Feb 22 18:07:53 2018 From: patriciop at gmail.com (Patricio Palma C.) Date: Thu, 22 Feb 2018 23:07:53 +0000 Subject: [vtkusers] Llvmpipe threads collapses the system when capturing a screenshot In-Reply-To: <00C6A2AE0E26C345B1E5A5492CD79F205DB16F89@US01wembx3.internal.synopsys.com> References: <00C6A2AE0E26C345B1E5A5492CD79F205DB16F89@US01wembx3.internal.synopsys.com> Message-ID: Hi All I?m using vtkWindowToImageFilter to export screenshots of a vtkXOpenGLRenderWindow. It works, but every time a screenshot is created, 15 new llvmpipe threads are spawned and they are not finalized by the app. I noticed this because after a while the number of threads reached the limit (about 5500) and no more threads can be spawned. This application is running linux RH 6.6 / VTK 7.1 / mesa 17.0.6 Source code extract: vtkSmartPointer osRenderer = vtkSmartPointer::New(); vtkSmartPointer renWin = vtkSmartPointer::New(); renWin->SetOffScreenRendering(true); renWin->AddRenderer(osRenderer); renWin->SetSize(pictureSize.width(), pictureSize.height()); // copyActors from QVTKWidget2 vtkSmartPointer filter = vtkSmartPointer::New(); filter->SetInput(renWin); filter->SetInputBufferTypeToRGB(); filter->SetMagnification(1); filter->Update(); vtkSmartPointer image = filter->GetOutput(); ? (continue using image) At this moment I?m using an empty RenderWindow, I thought actors could have a problem so I commented that out but the problem persists. After some testing I?ve noticed that the problem arise after calling filter->Update(). If this line is commented, no picture is generated but the threads are finalized. Any ideas on how can I track this issue or where should I continue looking for an issue in my code? Regards Patricio -- Patricio Palma C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Feb 22 19:02:40 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 22 Feb 2018 17:02:40 -0700 Subject: [vtkusers] Llvmpipe threads collapses the system when capturing a screenshot In-Reply-To: References: <00C6A2AE0E26C345B1E5A5492CD79F205DB16F89@US01wembx3.internal.synopsys.com> Message-ID: Hi Patricio, The primary thing that vtkWindowToImageFilter does is call glReadPixels() via vtkOpenGLRenderWindow::GetPixelData(). So you can try debugging/profiling the vtkOpenGLRenderWindow.cxx code at the point where it calls glReadPixels() to see if that is where the llvmpipe threads are being created. - David On Thu, Feb 22, 2018 at 4:07 PM, Patricio Palma C. wrote: > Hi All > > I?m using vtkWindowToImageFilter to export screenshots of a > vtkXOpenGLRenderWindow. It works, but every time a screenshot is created, > 15 new llvmpipe threads are spawned and they are not finalized by the app. > I noticed this because after a while the number of threads reached the > limit (about 5500) and no more threads can be spawned. > > This application is running linux RH 6.6 / VTK 7.1 / mesa 17.0.6 > > > > Source code extract: > > > > vtkSmartPointer osRenderer = vtkSmartPointer:: > New(); > > vtkSmartPointer renWin = vtkSmartPointer< > vtkXOpenGLRenderWindow>::New(); > > > > renWin->SetOffScreenRendering(true); > > renWin->AddRenderer(osRenderer); > > renWin->SetSize(pictureSize.width(), pictureSize.height()); > > > > // copyActors from QVTKWidget2 > > > > vtkSmartPointer filter = vtkSmartPointer< > vtkWindowToImageFilter>::New(); > > filter->SetInput(renWin); > > filter->SetInputBufferTypeToRGB(); > > filter->SetMagnification(1); > > filter->Update(); > > > > vtkSmartPointer image = filter->GetOutput(); > > ? > > (continue using image) > > At this moment I?m using an empty RenderWindow, I thought actors could > have a problem so I commented that out but the problem persists. > > After some testing I?ve noticed that the problem arise after calling > filter->Update(). If this line is commented, no picture is generated but > the threads are finalized. > > Any ideas on how can I track this issue or where should I continue looking > for an issue in my code? > > > Regards > > Patricio > -- > Patricio Palma C. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashtonpark7 at gmail.com Thu Feb 22 20:33:48 2018 From: ashtonpark7 at gmail.com (Minsuk Park) Date: Fri, 23 Feb 2018 10:33:48 +0900 Subject: [vtkusers] vtkPolyData(contour : line) to vtkImageData Message-ID: Hi all! I have a problem projecting vtkPolyData got from vtkContourWidget, which is line values (contour,) to a vtkImageData(2D) that is on the same RenderWindow. I've read both https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataContourToImageData and https://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData but I couldn't figure out how to do so. Is there anyone know how to getting start with or any ideas? Thank you in advance. Best Minsuk -- -------------------------------------------------------------------------------------------------------------- *Minsuk Park* Mobile: +82-10-7329-9912 Email: ashtonpark7 at gmail.com -------------------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruvva at yahoo.com Fri Feb 23 02:49:26 2018 From: ruvva at yahoo.com (Koteswara Rao Ruvva) Date: Fri, 23 Feb 2018 07:49:26 +0000 (UTC) Subject: [vtkusers] Picking actors from an assembly In-Reply-To: References: <868984401.3516208.1519279379681@mail.yahoo.com> Message-ID: <1190613625.4223346.1519372166970@mail.yahoo.com> Thank you for responding, Todd. First of all, I cannot instantiate vtkAbstractPropPicker, as it is abstract type. I appreciate if you can send me some sudo code. BTW, I moved from vtk7.1.1 to 8.1.0. Thank youRao On Wednesday, February 21, 2018, 11:25:07 PM PST, Todd via vtkusers wrote: vtkAbstractPropPicker.GetActor() in vtk 8 On 22 Feb 2018 7:02 p.m., Koteswara Rao Ruvva via vtkusers wrote: Hello all, I have two vtkPropAssemblies in the Renderer, each with couple of vtkActors. How do I pick an actor using mouse? I need to find the actor and the location on the actor. I tried the following code, but I am getting an assembly instead of the actor. picker = vtk.vtkPropPicker()if picker.Pick(mouseX, mouseY, 0,??renderer):? ? ? ? prop = picker.GetPath().GetFirstNode().GetViewProp() ? ? ? ? print(prop)? ? ? Please advise. Thank youRao _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Fri Feb 23 03:55:19 2018 From: nztoddler at yahoo.com (Todd) Date: Fri, 23 Feb 2018 21:55:19 +1300 Subject: [vtkusers] Picking actors from an assembly In-Reply-To: <1190613625.4223346.1519372166970@mail.yahoo.com> Message-ID: An HTML attachment was scrubbed... URL: From rppatil3210 at gmail.com Fri Feb 23 05:06:20 2018 From: rppatil3210 at gmail.com (rohit) Date: Fri, 23 Feb 2018 03:06:20 -0700 (MST) Subject: [vtkusers] How to read Particular Series from DICOM Study In-Reply-To: References: <1517915604552-0.post@n5.nabble.com> <1518069068522-0.post@n5.nabble.com> <1518162083769-0.post@n5.nabble.com> Message-ID: <1519380380607-0.post@n5.nabble.com> Thanks for the link I have build this the build according to that. but getting error like this java.lang.UnsatisfiedLinkError: no vtkChartsCoreJava in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at vtk.vtkNativeLibrary.LoadLibrary(vtkNativeLibrary.java:236) at vtk.vtkNativeLibrary.LoadAllNativeLibraries(vtkNativeLibrary.java:171) at dll_check.(dll_check.java:9) java.lang.UnsatisfiedLinkError: no vtkCommonColorJava in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at vtk.vtkNativeLibrary.LoadLibrary(vtkNativeLibrary.java:236) at vtk.vtkNativeLibrary.LoadAllNativeLibraries(vtkNativeLibrary.java:171) at dll_check.(dll_check.java:9) I have followed also http://shashikahk.blogspot.in/ this link for the build with vtk-dicom On in it. Build correctly without any error. Basically I am doing like this. I have used VTK - VTK-8.0.0.rc1 from VTK link cmake - cmake-3.9.6-win32-x86 VS - Visual Studio 12 2013 Win64, in debug mode running as administrator. After building all as per link above, I got dll's and vtk.jar in bin folder. Is this correct method to do that ? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jan.at.home at t-online.de Fri Feb 23 07:27:18 2018 From: jan.at.home at t-online.de (=?UTF-8?Q?Jan_M=C3=BCller?=) Date: Fri, 23 Feb 2018 13:27:18 +0100 (CET) Subject: [vtkusers] vtkScalarbarActor on a Virtual Machine Message-ID: <1519388838517.383562.a94758467199379172b3ccde11a9498155f852bf@spica.telekom.de> Hi all, I am experiencing troubles using a vtkScalarbarActor. When i run the following example code on a CentOS 7 Virtual Machine, the Scalarbar does not appear. Its not throwing any errors, the ScalarBar is just not displayed. However when I run the code on my Windows host it works perfectly fine. Any Ideas what the problem here might be and if so, any suggestions how to fix this? Example: https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/ScalarBarActor/ Thank you in advance, Jan ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ochampao at hotmail.com Fri Feb 23 11:24:15 2018 From: ochampao at hotmail.com (ochampao) Date: Fri, 23 Feb 2018 09:24:15 -0700 (MST) Subject: [vtkusers] Overlay slice on vtkResliceImageViewer and change slice when scrolling In-Reply-To: References: <1519251776356-0.post@n5.nabble.com> <1519289412827-0.post@n5.nabble.com> <1519319549805-0.post@n5.nabble.com> Message-ID: <1519403055490-0.post@n5.nabble.com> Hi David, Thanks a lot for your detailed reply. You have given me enough information to try. Regards, P. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chihebz at hotmail.com Fri Feb 23 12:34:58 2018 From: chihebz at hotmail.com (ZACK) Date: Fri, 23 Feb 2018 10:34:58 -0700 (MST) Subject: [vtkusers] vtkstreamtracer on a surface Message-ID: <1519407298212-0.post@n5.nabble.com> Hi Guys, I have a problem displaying streamlines on outside surfaces of a volume. My streamlines are visible only on the inside volume. Any help will be much appreciated. below is an image to help explain the problem. Here are my unstructured girds stream tracer code: vtkUnstructuredGrid * pGlobalUGrid = (vtkUnstructuredGrid*)m_pUnstructuredGridModel->GetOutput(); vtkSmartPointer pPolydata = vtkSmartPointer::New(); if (pGlobalUGrid != NULL) pPolydata->SetPoints(pGlobalUGrid->GetPoints()); // Source of the streamlines vtkSmartPointer seeds = vtkSmartPointer::New(); seeds->SetRadius(0.2); seeds->SetInput(pPolydata); seeds->SetCenter(pPolydata->GetCenter()); seeds->SetNumberOfPoints(m_iNbrOsTreamPoints); vtkSmartPointer sph_rk4 = vtkSmartPointer::New(); vtkSmartPointer streamer = vtkSmartPointer::New(); streamer->SetInputConnection(m_pUnstructuredGridModel->GetOutputPort()); streamer->SetStartPosition(0.0, 0.0, 0.0); streamer->SetSourceConnection(seeds->GetOutputPort()); streamer->SetMaximumPropagation(100); streamer->SetIntegrator(sph_rk4); streamer->SetIntegratorTypeToRungeKutta4(); streamer->SetMinimumIntegrationStep(m_CurrentMinValue); streamer->SetMaximumIntegrationStep(m_CurrentMaxValue); streamer->SetIntegrationDirectionToBoth(); streamer->SetComputeVorticity(false); streamer->Modified(); What you think, I am missing in my code?? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From juch at zhaw.ch Fri Feb 23 14:22:50 2018 From: juch at zhaw.ch (normanius) Date: Fri, 23 Feb 2018 12:22:50 -0700 (MST) Subject: [vtkusers] How to triangulate two non-intersecting polylines (in 2D) Message-ID: <1519413770112-0.post@n5.nabble.com> Let's be given two polylines in a plane as shown in the figure below. I assume that these two lines are not intersecting, but can have a generic shape (so they may be non-convex). Note that the number of points varies between the two lines. (In my example, the objects have been created using vtkRegularPolygonSource) Do you have an idea how I can triangulate the ring that is defined by the inner and outer polyline in vtk? (See second image, for an idea) Combining the polylines with vtkAppendPolyData does not work, because vtkTriangleFilter then would triangulate the two polylines separately. I guess the right way would be to create a polygon object that is composed of the two lines in a "clever way" and then to call vtkTriangleFilter on this data, but I could not manage. Many thanks for your inputs! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Fri Feb 23 14:31:31 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 23 Feb 2018 12:31:31 -0700 Subject: [vtkusers] How to triangulate two non-intersecting polylines (in 2D) In-Reply-To: <1519413770112-0.post@n5.nabble.com> References: <1519413770112-0.post@n5.nabble.com> Message-ID: Hi Normanius, Put them through vtkAppendPolyData and then through vtkContourTriangulator: https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/ContourTriangulator It is also possible to do this with vtkDelaunay2D, but it is more complicated. The vtkTriangleFilter does something quite different from this. - David On Fri, Feb 23, 2018 at 12:22 PM, normanius wrote: > Let's be given two polylines in a plane as shown in the figure below. I > assume that these two lines are not intersecting, but can have a generic > shape (so they may be non-convex). Note that the number of points varies > between the two lines. (In my example, the objects have been created using > vtkRegularPolygonSource) > > Do you have an idea how I can triangulate the ring that is defined by the > inner and outer polyline in vtk? (See second image, for an idea) > > Combining the polylines with vtkAppendPolyData does not work, because > vtkTriangleFilter then would triangulate the two polylines separately. I > guess the right way would be to create a polygon object that is composed of > the two lines in a "clever way" and then to call vtkTriangleFilter on this > data, but I could not manage. > > Many thanks for your inputs! > > 2018-02-23_at_19.png> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Feb 23 14:33:16 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 23 Feb 2018 11:33:16 -0800 Subject: [vtkusers] How to triangulate two non-intersecting polylines (in 2D) In-Reply-To: <1519413770112-0.post@n5.nabble.com> References: <1519413770112-0.post@n5.nabble.com> Message-ID: Look at this example. https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/RuledSurfaceFilter/ On Feb 23, 2018 11:22 AM, "normanius" wrote: > Let's be given two polylines in a plane as shown in the figure below. I > assume that these two lines are not intersecting, but can have a generic > shape (so they may be non-convex). Note that the number of points varies > between the two lines. (In my example, the objects have been created using > vtkRegularPolygonSource) > > Do you have an idea how I can triangulate the ring that is defined by the > inner and outer polyline in vtk? (See second image, for an idea) > > Combining the polylines with vtkAppendPolyData does not work, because > vtkTriangleFilter then would triangulate the two polylines separately. I > guess the right way would be to create a polygon object that is composed of > the two lines in a "clever way" and then to call vtkTriangleFilter on this > data, but I could not manage. > > Many thanks for your inputs! > > 2018-02-23_at_19.png> > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Fri Feb 23 14:44:53 2018 From: juch at zhaw.ch (normanius) Date: Fri, 23 Feb 2018 12:44:53 -0700 (MST) Subject: [vtkusers] How to triangulate two non-intersecting polylines (in 2D) In-Reply-To: References: <1519413770112-0.post@n5.nabble.com> Message-ID: <1519415093064-0.post@n5.nabble.com> David and Bill Many thanks. Works like a charm! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mike.jackson at bluequartz.net Fri Feb 23 16:06:46 2018 From: mike.jackson at bluequartz.net (Michael Jackson) Date: Fri, 23 Feb 2018 16:06:46 -0500 Subject: [vtkusers] Memory Size Question Message-ID: <1EE068DF-5A95-4671-AA82-EB7B7049A46A@bluequartz.net> We have a Tiled data set consisting of a 9x5 grid of images. Each image is ?1292x968 grayscale. We are reading all of the images into a VTK based application to render. After the data finally rendered (Took about 5 minutes on an iMac Pro with Vega64 GPU) we took a look at the memory usage of the app. Before loading the data it was sitting at about 390MB. After loading and rendering it was taking somewhere from 16GB~17GB. I have tried to "do the math" to account for all the memory but I am coming up _really_ short in trying to account for what could be taking up all the memory. As a check we loaded the same dataset into ParaView and ParaView took around 20GB so we are not that far off. Just seems like that is a lot of memory to use. But maybe I'm just not familiar enough with the VTK and the OpenGL backend to understand why that much memory is required. Math Part: 1292 * 968 * 54 = 67,535,424 bytes of uint8 data. If there are triangles being rendered then I would assume that roughly there is 1293*969*54 = 1,252,917 verts @ 12 bytes each = 15,035,004 Bytes. Then we need to generate Triangles so that is 2 Triangles per voxel = 1292*968*54*2=135,070,848 cells. Maybe 4 size_t (64bit ints) for the description of the cell to get us to 4,322,267,136 bytes to hold the triangle information. We need to generate RGBA color for the actual rendering: 1292 * 968 * 54*4 = 270,141,696 bytes. 67,535,424 15,035,004 4,322,267,136 270,141,696 --------------------- 4,674,979,260 Total Bytes. Where is the other 12GB of memory being taken up? A gentle explanation would be wonderful. We are trying to figure out if we are doing something wrong in the codes. -- Michael Jackson | Owner, President BlueQuartz Software [e] mike.jackson at bluequartz.net [w] www.bluequartz.net From patriciop at gmail.com Fri Feb 23 19:06:23 2018 From: patriciop at gmail.com (Patricio Palma C.) Date: Sat, 24 Feb 2018 00:06:23 +0000 Subject: [vtkusers] Llvmpipe threads collapses the system when capturing a screenshot In-Reply-To: References: <00C6A2AE0E26C345B1E5A5492CD79F205DB16F89@US01wembx3.internal.synopsys.com> Message-ID: Thanks David.! I?ve continued debugging and I?ve noticed my VTK code works fine with Mesa 10.6.5 gallium 0.4 on llvmpipe (llvm 3.6) Could it be a bug in Mesa 17.0.6 gallium 0.4 on llvmpipe (llvm 4.0) the cause of this issue? At this moment downgrade is not an option as I also need AVX support which is available only from Mesa 11.1. Should I try the latest Mesa version or is there a favorited Mesa version to use with VTK ? Regards Patricio El El jue, 22 de feb. de 2018 a las 21:03, David Gobbi < david.gobbi at gmail.com> escribi?: > Hi Patricio, > > The primary thing that vtkWindowToImageFilter does is call glReadPixels() > via vtkOpenGLRenderWindow::GetPixelData(). So you can try > debugging/profiling the vtkOpenGLRenderWindow.cxx code at the point where > it calls glReadPixels() to see if that is where the llvmpipe threads are > being created. > > - David > > > On Thu, Feb 22, 2018 at 4:07 PM, Patricio Palma C. > wrote: > >> Hi All >> >> I?m using vtkWindowToImageFilter to export screenshots of a >> vtkXOpenGLRenderWindow. It works, but every time a screenshot is created, >> 15 new llvmpipe threads are spawned and they are not finalized by the app. >> I noticed this because after a while the number of threads reached the >> limit (about 5500) and no more threads can be spawned. >> >> This application is running linux RH 6.6 / VTK 7.1 / mesa 17.0.6 >> >> >> >> Source code extract: >> >> >> >> vtkSmartPointer osRenderer = >> vtkSmartPointer::New(); >> >> vtkSmartPointer renWin = >> vtkSmartPointer::New(); >> >> >> >> renWin->SetOffScreenRendering(true); >> >> renWin->AddRenderer(osRenderer); >> >> renWin->SetSize(pictureSize.width(), pictureSize.height()); >> >> >> >> // copyActors from QVTKWidget2 >> >> >> >> vtkSmartPointer filter = >> vtkSmartPointer::New(); >> >> filter->SetInput(renWin); >> >> filter->SetInputBufferTypeToRGB(); >> >> filter->SetMagnification(1); >> >> filter->Update(); >> >> >> >> vtkSmartPointer image = filter->GetOutput(); >> >> ? >> >> (continue using image) >> >> At this moment I?m using an empty RenderWindow, I thought actors could >> have a problem so I commented that out but the problem persists. >> >> After some testing I?ve noticed that the problem arise after calling >> filter->Update(). If this line is commented, no picture is generated but >> the threads are finalized. >> >> Any ideas on how can I track this issue or where should I continue >> looking for an issue in my code? >> >> >> Regards >> >> Patricio >> -- >> Patricio Palma C. >> > > -- Patricio Palma C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Fri Feb 23 19:36:49 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Fri, 23 Feb 2018 19:36:49 -0500 Subject: [vtkusers] Llvmpipe threads collapses the system when capturing a screenshot In-Reply-To: References: <00C6A2AE0E26C345B1E5A5492CD79F205DB16F89@US01wembx3.internal.synopsys.com> Message-ID: Strange coincidence! We just encountered similar issue on ParaView and it's being tracked down here: https://gitlab.kitware.com/paraview/paraview/issues/17999 Utkarsh On Fri, Feb 23, 2018 at 7:06 PM, Patricio Palma C. wrote: > Thanks David.! > > I?ve continued debugging and I?ve noticed my VTK code works fine with Mesa > 10.6.5 gallium 0.4 on llvmpipe (llvm 3.6) > > Could it be a bug in Mesa 17.0.6 gallium 0.4 on llvmpipe (llvm 4.0) the > cause of this issue? > > At this moment downgrade is not an option as I also need AVX support which > is available only from Mesa 11.1. > > Should I try the latest Mesa version or is there a favorited Mesa version to > use with VTK ? > > Regards > Patricio > > > El El jue, 22 de feb. de 2018 a las 21:03, David Gobbi > escribi?: >> >> Hi Patricio, >> >> The primary thing that vtkWindowToImageFilter does is call glReadPixels() >> via vtkOpenGLRenderWindow::GetPixelData(). So you can try >> debugging/profiling the vtkOpenGLRenderWindow.cxx code at the point where it >> calls glReadPixels() to see if that is where the llvmpipe threads are being >> created. >> >> - David >> >> >> On Thu, Feb 22, 2018 at 4:07 PM, Patricio Palma C. >> wrote: >>> >>> Hi All >>> >>> I?m using vtkWindowToImageFilter to export screenshots of a >>> vtkXOpenGLRenderWindow. It works, but every time a screenshot is created, 15 >>> new llvmpipe threads are spawned and they are not finalized by the app. I >>> noticed this because after a while the number of threads reached the limit >>> (about 5500) and no more threads can be spawned. >>> >>> This application is running linux RH 6.6 / VTK 7.1 / mesa 17.0.6 >>> >>> >>> >>> Source code extract: >>> >>> >>> >>> vtkSmartPointer osRenderer = >>> vtkSmartPointer::New(); >>> >>> vtkSmartPointer renWin = >>> vtkSmartPointer::New(); >>> >>> >>> >>> renWin->SetOffScreenRendering(true); >>> >>> renWin->AddRenderer(osRenderer); >>> >>> renWin->SetSize(pictureSize.width(), pictureSize.height()); >>> >>> >>> >>> // copyActors from QVTKWidget2 >>> >>> >>> >>> vtkSmartPointer filter = >>> vtkSmartPointer::New(); >>> >>> filter->SetInput(renWin); >>> >>> filter->SetInputBufferTypeToRGB(); >>> >>> filter->SetMagnification(1); >>> >>> filter->Update(); >>> >>> >>> >>> vtkSmartPointer image = filter->GetOutput(); >>> >>> ? >>> >>> (continue using image) >>> >>> At this moment I?m using an empty RenderWindow, I thought actors could >>> have a problem so I commented that out but the problem persists. >>> >>> After some testing I?ve noticed that the problem arise after calling >>> filter->Update(). If this line is commented, no picture is generated but the >>> threads are finalized. >>> >>> Any ideas on how can I track this issue or where should I continue >>> looking for an issue in my code? >>> >>> >>> Regards >>> >>> Patricio >>> >>> -- >>> Patricio Palma C. >> >> > -- > Patricio Palma C. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > From david.gobbi at gmail.com Fri Feb 23 22:36:33 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 23 Feb 2018 20:36:33 -0700 Subject: [vtkusers] How to read Particular Series from DICOM Study In-Reply-To: <1519380380607-0.post@n5.nabble.com> References: <1517915604552-0.post@n5.nabble.com> <1518069068522-0.post@n5.nabble.com> <1518162083769-0.post@n5.nabble.com> <1519380380607-0.post@n5.nabble.com> Message-ID: On Fri, Feb 23, 2018 at 3:06 AM, rohit wrote: > > I have used > VTK - VTK-8.0.0.rc1 from VTK link > cmake - cmake-3.9.6-win32-x86 > VS - Visual Studio 12 2013 Win64, in debug mode running as administrator. > > After building all as per link above, I got dll's and vtk.jar in bin > folder. > > Is this correct method to do that ? I'm not a Java programmer, but this looks like a path issue. What happens if you try to load those libraries with their full path, with Runtime.getRuntime().load()? It is possible to build vtk-dicom into vtk.jar, instead of into vtkdicom.jar, by using the "Building as part of the VTK build" instructions on this page: http://dgobbi.github.io/vtk-dicom/doc/api/installation.html - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruvva at yahoo.com Sat Feb 24 00:16:21 2018 From: ruvva at yahoo.com (Koteswara Rao Ruvva) Date: Sat, 24 Feb 2018 05:16:21 +0000 (UTC) Subject: [vtkusers] Picking actors from an assembly In-Reply-To: References: <1190613625.4223346.1519372166970@mail.yahoo.com> Message-ID: <1914609013.4672238.1519449381680@mail.yahoo.com> Todd, GetActor() returns None, but GetAssembly() returns the picked assembly. Looks like I am missing something. Thank you. On Friday, February 23, 2018, 12:55:44 AM PST, Todd via vtkusers wrote: Hi Rao vtkPropPicker inherits from vtkAbstractPropPicker, so, following your own code example, you can just use picker.GetActor() It's documented herehttps://www.vtk.org/doc/nightly/html/classvtkPropPicker.html On 23 Feb 2018 8:49 p.m., Koteswara Rao Ruvva via vtkusers wrote: Thank you for responding, Todd. First of all, I cannot instantiate vtkAbstractPropPicker, as it is abstract type. I appreciate if you can send me some sudo code. BTW, I moved from vtk7.1.1 to 8.1.0. Thank youRao On Wednesday, February 21, 2018, 11:25:07 PM PST, Todd via vtkusers wrote: vtkAbstractPropPicker.GetActor() in vtk 8 On 22 Feb 2018 7:02 p.m., Koteswara Rao Ruvva via vtkusers wrote: Hello all, I have two vtkPropAssemblies in the Renderer, each with couple of vtkActors. How do I pick an actor using mouse? I need to find the actor and the location on the actor. I tried the following code, but I am getting an assembly instead of the actor. picker = vtk.vtkPropPicker()if picker.Pick(mouseX, mouseY, 0,??renderer):? ? ? ? prop = picker.GetPath().GetFirstNode().GetViewProp() ? ? ? ? print(prop)? ? ? Please advise. Thank youRao _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Sat Feb 24 05:30:21 2018 From: nztoddler at yahoo.com (Todd) Date: Sat, 24 Feb 2018 23:30:21 +1300 Subject: [vtkusers] Picking actors from an assembly In-Reply-To: <1914609013.4672238.1519449381680@mail.yahoo.com> Message-ID: <8b2e60b2-786b-477c-bfd3-3c7109f11d2f@email.android.com> An HTML attachment was scrubbed... URL: From nztoddler at yahoo.com Sat Feb 24 05:46:01 2018 From: nztoddler at yahoo.com (Todd) Date: Sat, 24 Feb 2018 23:46:01 +1300 Subject: [vtkusers] Picking actors from an assembly In-Reply-To: <1914609013.4672238.1519449381680@mail.yahoo.com> Message-ID: <7245b383-eecc-4ec5-be87-c86b05b19902@email.android.com> An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sat Feb 24 11:24:11 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 24 Feb 2018 09:24:11 -0700 Subject: [vtkusers] Memory Size Question In-Reply-To: <1EE068DF-5A95-4671-AA82-EB7B7049A46A@bluequartz.net> References: <1EE068DF-5A95-4671-AA82-EB7B7049A46A@bluequartz.net> Message-ID: Hi Michael, I looked through the code for vtkDataSetSurfaceFilter (used internally by vtkDataSetMapper), and it uses 'double' for the vtkPoints if the input is vtkImageData. It probably does this because the Origin and Spacing of vtkImageData are stored as 'double'. This isn't going to account for 12GB, however. If you run vtkDataSetSurfaceFilter yourself, then you can use vtkDataSetSurfaceFilter::UseStripsOn() to reduce the size of the cell array. This should be safe as long as your input uses point scalars (typical for images). Also, depending on the precise amount of memory it saves, you might get some clues as to where the memory is being lost. Since I work primarily with images, my preferred method of displaying large images is to use vtkImageResliceMapper with ResampleToScreenPixelsOn() and SeparateWindowLevelOperationOff(). The first option ensures that the generated texture is only as large as the render window. The second option ensures that the generation of the RGBA texture from the image is performed in one step, without requiring any intermediate data storage. Only a few (usually just two) triangles are used. It's a totally different pipeline from the usual VTK geometry rendering pipeline, however, so it would add complexity to your app if your usual focus is on geometry. - David On Fri, Feb 23, 2018 at 2:06 PM, Michael Jackson < mike.jackson at bluequartz.net> wrote: > We have a Tiled data set consisting of a 9x5 grid of images. Each image is > ?1292x968 grayscale. We are reading all of the images into a VTK based > application to render. After the data finally rendered (Took about 5 > minutes on an iMac Pro with Vega64 GPU) we took a look at the memory usage > of the app. Before loading the data it was sitting at about 390MB. After > loading and rendering it was taking somewhere from 16GB~17GB. I have tried > to "do the math" to account for all the memory but I am coming up _really_ > short in trying to account for what could be taking up all the memory. As a > check we loaded the same dataset into ParaView and ParaView took around > 20GB so we are not that far off. Just seems like that is a lot of memory to > use. But maybe I'm just not familiar enough with the VTK and the OpenGL > backend to understand why that much memory is required. > > Math Part: > 1292 * 968 * 54 = 67,535,424 bytes of uint8 data. > If there are triangles being rendered then I would assume that roughly > there is 1293*969*54 = 1,252,917 verts @ 12 bytes each = 15,035,004 Bytes. > Then we need to generate Triangles so that is 2 Triangles per voxel = > 1292*968*54*2=135,070,848 cells. Maybe 4 size_t (64bit ints) for the > description of the cell to get us to 4,322,267,136 bytes to hold the > triangle information. We need to generate RGBA color for the actual > rendering: 1292 * 968 * 54*4 = 270,141,696 bytes. > > 67,535,424 > 15,035,004 > 4,322,267,136 > 270,141,696 > --------------------- > 4,674,979,260 Total Bytes. > > Where is the other 12GB of memory being taken up? A gentle explanation > would be wonderful. We are trying to figure out if we are doing something > wrong in the codes. > > -- > Michael Jackson | Owner, President > BlueQuartz Software > [e] mike.jackson at bluequartz.net > [w] www.bluequartz.net > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Sun Feb 25 05:26:37 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Sun, 25 Feb 2018 19:26:37 +0900 Subject: [vtkusers] vtkstreamtracer on a surface In-Reply-To: <1519407298212-0.post@n5.nabble.com> References: <1519407298212-0.post@n5.nabble.com> Message-ID: Hi ZACK, How about you try switching SurfaceStreamlines to on? streamer->SurfaceStreamlinesOn(); Regards 2018-02-24 2:34 GMT+09:00 ZACK : > Hi Guys, > > I have a problem displaying streamlines on outside surfaces of a volume. My > streamlines are visible only on the inside volume. Any help will be much > appreciated. below is an image to help explain the problem. > > Here are my unstructured girds stream tracer code: > > vtkUnstructuredGrid * pGlobalUGrid = > (vtkUnstructuredGrid*)m_pUnstructuredGridModel->GetOutput(); > vtkSmartPointer pPolydata = > vtkSmartPointer::New(); > > if (pGlobalUGrid != NULL) > pPolydata->SetPoints(pGlobalUGrid->GetPoints()); > > // Source of the streamlines > vtkSmartPointer seeds = > vtkSmartPointer::New(); > > seeds->SetRadius(0.2); > seeds->SetInput(pPolydata); > seeds->SetCenter(pPolydata->GetCenter()); > seeds->SetNumberOfPoints(m_iNbrOsTreamPoints); > > > vtkSmartPointer sph_rk4 = > vtkSmartPointer::New(); > > vtkSmartPointer streamer = > vtkSmartPointer::New(); > > streamer->SetInputConnection(m_pUnstructuredGridModel->GetOutputPort()); > streamer->SetStartPosition(0.0, 0.0, 0.0); > streamer->SetSourceConnection(seeds->GetOutputPort()); > streamer->SetMaximumPropagation(100); > streamer->SetIntegrator(sph_rk4); > streamer->SetIntegratorTypeToRungeKutta4(); > streamer->SetMinimumIntegrationStep(m_CurrentMinValue); > streamer->SetMaximumIntegrationStep(m_CurrentMaxValue); > streamer->SetIntegrationDirectionToBoth(); > streamer->SetComputeVorticity(false); > streamer->Modified(); > > > What you think, I am missing in my code?? > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers From gdeee at web.de Sun Feb 25 08:02:13 2018 From: gdeee at web.de (gde23) Date: Sun, 25 Feb 2018 06:02:13 -0700 (MST) Subject: [vtkusers] vtkPointInterpolator2D not interpolating Message-ID: <1519563733787-0.post@n5.nabble.com> Hello, i am trying to interpolate the z-value of points which are stored as P(x, y, z) values in the format of vtkPolyData using VTK8.1.0 in c++. Therefore i translated following example from pyhton to c++ (i haven't tested it using python) vtkNew demReader; demReader->SetFileName("/home/path/to/data/Data/SainteHelens.dem"); demReader->Update(); double bds[6]; demReader->GetOutput()->GetBounds(bds); // Create a plane of onto which to map the elevation data vtkNew plane; plane->SetResolution(200, 200); plane->SetOrigin(bds[0],bds[2],bds[4]); plane->SetPoint1(bds[1],bds[2],bds[4]); plane->SetPoint2(bds[0],bds[3],bds[4]); plane->Update(); // # Gaussian kernel------------------------------------------------------- vtkNew gaussianKernel; gaussianKernel->SetSharpness(2); gaussianKernel->SetRadius(200); vtkNew interp; interp->SetInputConnection(plane->GetOutputPort()); interp->SetSourceConnection(demReader->GetOutputPort()); interp->SetKernel(gaussianKernel); interp->SetNullPointsStrategyToClosestPoint(); interp->InterpolateZOff(); interp->Update(); vtkSmartPointer interpolated_poly_data = interp->GetPolyDataOutput(); after that i visualize the interpolated_poly_data with the same pipeline i use to plot other stuff. However the output of the vtkPointInterpolator2D is always the same as what was set in SetInputConnection() or SetInputData() (in this example just a plane) The SetSourceConnection() / SetSourceData() that should be interpolated doesn't have any effect on the output at all. I also have played around with different types of kernels as well as different settings for NullPointsStrategy and InterpolateZ off/on. What am i missing or where is the error? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From gohlinchia at gmail.com Sun Feb 25 22:16:13 2018 From: gohlinchia at gmail.com (gohlinchia) Date: Sun, 25 Feb 2018 20:16:13 -0700 (MST) Subject: [vtkusers] Incorrect rendering of polygonal data intermixed with volumes with depth peeling. Message-ID: <1519614973206-0.post@n5.nabble.com> Hi, Has anyone encountered the problem of incorrect rendering of completely transparent polygonal surface meshes intermixed with ray cast volumes, when depth peeling is activated? The final rendered scene shows an outline of the polygonal meshes even though they are supposedly totally transparent (opacity value of 0.0). This happens when depth peeling for volumes is activated. Please take a look at the following attached images: We are using the OpenGL2 backend in VTK 8.1.0. Thanks. ----- Chris -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From tamim.boubou at gmail.com Mon Feb 26 04:04:36 2018 From: tamim.boubou at gmail.com (Tamim) Date: Mon, 26 Feb 2018 02:04:36 -0700 (MST) Subject: [vtkusers] Selecting one out of multiple boxwidgets Message-ID: <1519635876435-0.post@n5.nabble.com> Hello all, In my project I have multiple boxwidgets and I want to move them with keyboard arrows.....the problem I'm facing is whenever I press a key(for example the "up" arrow)all the boxes are moved together.... is there any solution to move only one box? Here are the main parts of the code (Some variables are not declared here but they are declared elsewhere ): *The observers :* m_boxWidget->AddObserver(vtkCallbackCommand::StartInteractionEvent, boxCallback); m_boxWidget->AddObserver(vtkCallbackCommand::InteractionEvent, boxCallback); RenderWindow()->GetInteractor()->AddObserver(vtkCallbackCommand::KeyPressEvent, boxCallback); *The execute function :* virtual void Execute(vtkObject* caller, unsigned long event, void* data) { m_orientation = new double[3]; vtkSmartPointer boxRep = reinterpret_cast(m_boxWidget->GetRepresentation()); vtkSmartPointer boxMatrix = m_boxTransform->GetMatrix(); vtkSmartPointer tempMatrix = vtkSmartPointer::New(); switch (event) { case vtkCallbackCommand::StartInteractionEvent: case vtkCallbackCommand::InteractionEvent: { boxRep->GetTransform(m_boxTransform); // get the transformation of the box boxMatrix = m_boxTransform->GetMatrix(); // convert the transform into a transformation matrix this->m_actor->SetUserTransform(m_boxTransform); break; } case vtkCallbackCommand::KeyPressEvent: { keypressed = RenderWindow()->GetInteractor()->GetKeySym(); //get the pressed key from the user std:cout << "Pressed : " << keypressed << std::endl; if (keypressed == "Up") { m_tempTransform->Translate(m_xDistance, m_yDistance, 0); } else if (keypressed == "Down") { m_tempTransform->Translate(-m_xDistance, -m_yDistance, 0); } else if (keypressed == "Left") { m_tempTransform->Translate(-m_yDistance, m_xDistance, 0); } else if (keypressed == "Right") { m_tempTransform->Translate(m_yDistance, -m_xDistance, 0); } boxRep->SetTransform(m_tempTransform); this->m_actor->SetUserTransform(m_tempTransform); ..... Thanks a lot. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chihebz at hotmail.com Mon Feb 26 09:53:34 2018 From: chihebz at hotmail.com (ZACK) Date: Mon, 26 Feb 2018 07:53:34 -0700 (MST) Subject: [vtkusers] vtkstreamtracer on a surface In-Reply-To: References: <1519407298212-0.post@n5.nabble.com> Message-ID: <1519656814432-0.post@n5.nabble.com> Hi Kenichiro Yoshimi, Thanks for the tip. It turns out that my working VTK version is an earlier version. No SurfaceStreamlines I will try to override that new class and see if it works. Do you think it will work?. Getting new version it will take a long time sorting out issues in my local project. Thanks again -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dhoppes at mbfbioscience.com Mon Feb 26 10:55:13 2018 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Mon, 26 Feb 2018 15:55:13 +0000 Subject: [vtkusers] Remote Desktop and the VTK window Message-ID: <403FB8A2E4E75A4CA51E33B6E9FC06C209CD9A@exchange3.microbrightfield.com> Hi all, Got a question. A number of our developers work from home. The way that they run our vtk application is by using VPN into our work network and then use a remote connection into their machines. The VTK application is using OpenGL2 and everybody is running Windows 10. The issue is that the VTK window crashes immediately on startup of the window. Is there some documentation about how we should be able to run a VTK application via remote desktop? Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.waldon at kitware.com Mon Feb 26 11:13:48 2018 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Mon, 26 Feb 2018 11:13:48 -0500 Subject: [vtkusers] Remote Desktop and the VTK window In-Reply-To: <403FB8A2E4E75A4CA51E33B6E9FC06C209CD9A@exchange3.microbrightfield.com> References: <403FB8A2E4E75A4CA51E33B6E9FC06C209CD9A@exchange3.microbrightfield.com> Message-ID: Hi Doug, Windows 10 supports OpenGL 3.2 (which VTK's OpenGL2 backend uses) over remote desktop... but it depends how the user initially logs into the machine. If the initial login is over remote desktop, Windows decides "you don't need any graphics resources" and doesn't initialize the graphics card. In this case, you get the behavior you describe where VTK crashes upon initialization. However, if you initially log in locally and leave the session up, logging in over remote desktop gets the initialized graphics resources and VTK applications work fine. Unfortunately I don't have a good solution for you if the developers who work from home are always working remotely. Hopefully this helps though, Shawn On Mon, Feb 26, 2018 at 10:55 AM, Doug Hoppes wrote: > Hi all, > > > > Got a question. A number of our developers work from > home. The way that they run our vtk application is by using VPN into our > work network and then use a remote connection into their machines. > > > > The VTK application is using OpenGL2 and everybody is > running Windows 10. > > > > The issue is that the VTK window crashes immediately on > startup of the window. Is there some documentation about how we should be > able to run a VTK application via remote desktop? > > > > Doug > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Feb 26 11:33:22 2018 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 26 Feb 2018 11:33:22 -0500 Subject: [vtkusers] Remote Desktop and the VTK window In-Reply-To: References: <403FB8A2E4E75A4CA51E33B6E9FC06C209CD9A@exchange3.microbrightfield.com> Message-ID: A few options I have heard of 1) On windows 10 nvidia supports OpenGL 3.2 with remote desktop IF you have quadro cards. I do not believe they support it on regular consumer cards :-( 2) (I apologize for this one in advance) Some people have created small batch files that launch the application one minute later. So you remote desktop into the system. Fire off the batch file. Close the RD connection. The batch file starts the application with local OpenGL which is accelerated. Then a minute later you RD back in and your app is running well. 3) (what I do) Use nomachine https://www.nomachine.com It works across Windows/linux/OSX and since it is video based it seems to always work. On Mon, Feb 26, 2018 at 11:13 AM, Shawn Waldon wrote: > Hi Doug, > > Windows 10 supports OpenGL 3.2 (which VTK's OpenGL2 backend uses) over > remote desktop... but it depends how the user initially logs into the > machine. If the initial login is over remote desktop, Windows decides "you > don't need any graphics resources" and doesn't initialize the graphics > card. In this case, you get the behavior you describe where VTK crashes > upon initialization. However, if you initially log in locally and leave > the session up, logging in over remote desktop gets the initialized > graphics resources and VTK applications work fine. > > Unfortunately I don't have a good solution for you if the developers who > work from home are always working remotely. Hopefully this helps though, > > Shawn > > On Mon, Feb 26, 2018 at 10:55 AM, Doug Hoppes > wrote: > >> Hi all, >> >> >> >> Got a question. A number of our developers work from >> home. The way that they run our vtk application is by using VPN into our >> work network and then use a remote connection into their machines. >> >> >> >> The VTK application is using OpenGL2 and everybody is >> running Windows 10. >> >> >> >> The issue is that the VTK window crashes immediately on >> startup of the window. Is there some documentation about how we should be >> able to run a VTK application via remote desktop? >> >> >> >> Doug >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Feb 26 11:38:23 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 26 Feb 2018 11:38:23 -0500 Subject: [vtkusers] Remote Desktop and the VTK window In-Reply-To: References: <403FB8A2E4E75A4CA51E33B6E9FC06C209CD9A@exchange3.microbrightfield.com> Message-ID: Besides the above options, software mesa gl can work. You can build or more simply grab dlls from https://github.com/pal1000/mesa-dist-win, put the dll's into place, set an environment variable or two, and then the VTK app will bypass the system opengl and the gpu. Rendering is unlikely to be fast though. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Feb 26, 2018 at 11:33 AM, Ken Martin wrote: > A few options I have heard of > > 1) On windows 10 nvidia supports OpenGL 3.2 with remote desktop IF you > have quadro cards. I do not believe they support it on regular consumer > cards :-( > > 2) (I apologize for this one in advance) Some people have created small > batch files that launch the application one minute later. So you remote > desktop into the system. Fire off the batch file. Close the RD connection. > The batch file starts the application with local OpenGL which is > accelerated. Then a minute later you RD back in and your app is running > well. > > 3) (what I do) Use nomachine https://www.nomachine.com It works across > Windows/linux/OSX and since it is video based it seems to always work. > > > > > > > > On Mon, Feb 26, 2018 at 11:13 AM, Shawn Waldon > wrote: > >> Hi Doug, >> >> Windows 10 supports OpenGL 3.2 (which VTK's OpenGL2 backend uses) over >> remote desktop... but it depends how the user initially logs into the >> machine. If the initial login is over remote desktop, Windows decides "you >> don't need any graphics resources" and doesn't initialize the graphics >> card. In this case, you get the behavior you describe where VTK crashes >> upon initialization. However, if you initially log in locally and leave >> the session up, logging in over remote desktop gets the initialized >> graphics resources and VTK applications work fine. >> >> Unfortunately I don't have a good solution for you if the developers who >> work from home are always working remotely. Hopefully this helps though, >> >> Shawn >> >> On Mon, Feb 26, 2018 at 10:55 AM, Doug Hoppes >> wrote: >> >>> Hi all, >>> >>> >>> >>> Got a question. A number of our developers work from >>> home. The way that they run our vtk application is by using VPN into our >>> work network and then use a remote connection into their machines. >>> >>> >>> >>> The VTK application is using OpenGL2 and everybody is >>> running Windows 10. >>> >>> >>> >>> The issue is that the VTK window crashes immediately on >>> startup of the window. Is there some documentation about how we should be >>> able to run a VTK application via remote desktop? >>> >>> >>> >>> Doug >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Mon Feb 26 11:46:49 2018 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 26 Feb 2018 16:46:49 +0000 Subject: [vtkusers] Remote Desktop and the VTK window In-Reply-To: References: <403FB8A2E4E75A4CA51E33B6E9FC06C209CD9A@exchange3.microbrightfield.com> Message-ID: See a batch file (start.bat) that closes the remote desktop connection and immediately starts the application (and some more discussion about the issue): https://issues.slicer.org/view.php?id=4252 This works, you don?t need to wait 1 minute but you can reconnect immediately. However, this approach is unusable for debugging (when you may need to restart the application in every few minutes and reconnect the debugger) and Windows remote desktop does not handle multiple monitors very well either, so I just ended up using a third-party remote desktop application. Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Ken Martin Sent: Monday, February 26, 2018 11:33 AM To: Shawn Waldon Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Remote Desktop and the VTK window A few options I have heard of 1) On windows 10 nvidia supports OpenGL 3.2 with remote desktop IF you have quadro cards. I do not believe they support it on regular consumer cards :-( 2) (I apologize for this one in advance) Some people have created small batch files that launch the application one minute later. So you remote desktop into the system. Fire off the batch file. Close the RD connection. The batch file starts the application with local OpenGL which is accelerated. Then a minute later you RD back in and your app is running well. 3) (what I do) Use nomachine https://www.nomachine.com It works across Windows/linux/OSX and since it is video based it seems to always work. On Mon, Feb 26, 2018 at 11:13 AM, Shawn Waldon > wrote: Hi Doug, Windows 10 supports OpenGL 3.2 (which VTK's OpenGL2 backend uses) over remote desktop... but it depends how the user initially logs into the machine. If the initial login is over remote desktop, Windows decides "you don't need any graphics resources" and doesn't initialize the graphics card. In this case, you get the behavior you describe where VTK crashes upon initialization. However, if you initially log in locally and leave the session up, logging in over remote desktop gets the initialized graphics resources and VTK applications work fine. Unfortunately I don't have a good solution for you if the developers who work from home are always working remotely. Hopefully this helps though, Shawn On Mon, Feb 26, 2018 at 10:55 AM, Doug Hoppes > wrote: Hi all, Got a question. A number of our developers work from home. The way that they run our vtk application is by using VPN into our work network and then use a remote connection into their machines. The VTK application is using OpenGL2 and everybody is running Windows 10. The issue is that the VTK window crashes immediately on startup of the window. Is there some documentation about how we should be able to run a VTK application via remote desktop? Doug _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Feb 26 11:53:19 2018 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 26 Feb 2018 11:53:19 -0500 Subject: [vtkusers] Remote Desktop and the VTK window In-Reply-To: References: <403FB8A2E4E75A4CA51E33B6E9FC06C209CD9A@exchange3.microbrightfield.com> Message-ID: Nice compact batch file. Looks like just a one line change for a different app. Its a shame MS doesn't somehow address this issue by default. On Mon, Feb 26, 2018 at 11:46 AM, Andras Lasso wrote: > See a batch file (start.bat) that closes the remote desktop connection and > immediately starts the application (and some more discussion about the > issue): https://issues.slicer.org/view.php?id=4252 > > > > This works, you don?t need to wait 1 minute but you can reconnect > immediately. However, this approach is unusable for debugging (when you may > need to restart the application in every few minutes and reconnect the > debugger) and Windows remote desktop does not handle multiple monitors very > well either, so I just ended up using a third-party remote desktop > application. > > > > Andras > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Ken > Martin > *Sent:* Monday, February 26, 2018 11:33 AM > *To:* Shawn Waldon > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] Remote Desktop and the VTK window > > > > A few options I have heard of > > > > 1) On windows 10 nvidia supports OpenGL 3.2 with remote desktop IF you > have quadro cards. I do not believe they support it on regular consumer > cards :-( > > > > 2) (I apologize for this one in advance) Some people have created small > batch files that launch the application one minute later. So you remote > desktop into the system. Fire off the batch file. Close the RD connection. > The batch file starts the application with local OpenGL which is > accelerated. Then a minute later you RD back in and your app is running > well. > > > > 3) (what I do) Use nomachine https://www.nomachine.com > > It works across Windows/linux/OSX and since it is video based it seems to > always work. > > > > > > > > > > > > > > > > On Mon, Feb 26, 2018 at 11:13 AM, Shawn Waldon > wrote: > > Hi Doug, > > Windows 10 supports OpenGL 3.2 (which VTK's OpenGL2 backend uses) over > remote desktop... but it depends how the user initially logs into the > machine. If the initial login is over remote desktop, Windows decides "you > don't need any graphics resources" and doesn't initialize the graphics > card. In this case, you get the behavior you describe where VTK crashes > upon initialization. However, if you initially log in locally and leave > the session up, logging in over remote desktop gets the initialized > graphics resources and VTK applications work fine. > > Unfortunately I don't have a good solution for you if the developers who > work from home are always working remotely. Hopefully this helps though, > > > > Shawn > > > > On Mon, Feb 26, 2018 at 10:55 AM, Doug Hoppes > wrote: > > Hi all, > > > > Got a question. A number of our developers work from > home. The way that they run our vtk application is by using VPN into our > work network and then use a remote connection into their machines. > > > > The VTK application is using OpenGL2 and everybody is > running Windows 10. > > > > The issue is that the VTK window crashes immediately on > startup of the window. Is there some documentation about how we should be > able to run a VTK application via remote desktop? > > > > Doug > > > _______________________________________________ > Powered by www.kitware.com > > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > > > > > _______________________________________________ > Powered by www.kitware.com > > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > > > > > > -- > > Ken Martin PhD > > Distinguished Engineer > Kitware Inc. > > 28 Corporate Drive > Clifton Park NY 12065 > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juch at zhaw.ch Mon Feb 26 11:57:53 2018 From: juch at zhaw.ch (normanius) Date: Mon, 26 Feb 2018 09:57:53 -0700 (MST) Subject: [vtkusers] How to save multiple (polydata) objects together with their props into one single file? Message-ID: <1519664273284-0.post@n5.nabble.com> Let's assume I have multiple vtkPolyDataObjects that together form a meaningful object. For instance let's picture a snowman that is formed of three spheres: the trunk, the torso and the head. Is it possible to save the "assembly" into one single file such that I will still be able to distinguish between trunk, torso and head when reading in this object again? Also, I require that appearance properties (color, transparency, etc.) are stored along with these objects. I found that multiple poly data objects can be appended into an unstructured grid, which can be saved into a .vtu file. However, I lose the information about which part is which. The unstructured grid will be just one object with three different "pieces", but it does not seem to me that these pieces can be identified, also no properties can be saved along with the surface data. Do I have to define my own "file format", or does something like this already exist in vtk? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Mon Feb 26 12:06:46 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 26 Feb 2018 10:06:46 -0700 Subject: [vtkusers] How to save multiple (polydata) objects together with their props into one single file? In-Reply-To: <1519664273284-0.post@n5.nabble.com> References: <1519664273284-0.post@n5.nabble.com> Message-ID: On Mon, Feb 26, 2018 at 9:57 AM, normanius wrote: > > Do I have to define my own "file format", or does something like this > already exist in vtk? VTK can use a few different file formats for scenes. I doubt that all features of each file format are supported, but if your basic requirement is just to save multiple polydata in a file, these should work for you: https://www.vtk.org/doc/nightly/html/classvtkImporter.html https://www.vtk.org/doc/nightly/html/classvtkExporter.html I don't think VTK has a native file format for this, but I could be wrong. Cheers, - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Mon Feb 26 12:16:50 2018 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 26 Feb 2018 17:16:50 +0000 Subject: [vtkusers] How to save multiple (polydata) objects together with their props into one single file? In-Reply-To: References: <1519664273284-0.post@n5.nabble.com> Message-ID: You can also insert your meshes into a vtkMultiBlockDataSet and use vtkXMLMultiBlockDataWriter/vtkXMLMultiBlockDataReader. The advantage compared to 3DS/OBJ/VRML exporters that all polydata point/cell arrays are preserved and you can optionally also store metadata for the whole dataset or for each block. Actor properties (such as color, opacity) are not written to the file, unless you store them in the polydata object. See example of how this is used in 3D Slicer for storing segmentation consisting of potentially overlapping segments. - Reading: https://github.com/Slicer/Slicer/blob/f5128eae6aebfbce9bc4fb1a3a5804e545452d57/Libs/MRML/Core/vtkMRMLSegmentationStorageNode.cxx#L756-L930 - Writing: https://github.com/Slicer/Slicer/blob/f5128eae6aebfbce9bc4fb1a3a5804e545452d57/Libs/MRML/Core/vtkMRMLSegmentationStorageNode.cxx#L1140-L1282 Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of David Gobbi Sent: Monday, February 26, 2018 12:07 PM To: normanius Cc: VTK Users Subject: Re: [vtkusers] How to save multiple (polydata) objects together with their props into one single file? On Mon, Feb 26, 2018 at 9:57 AM, normanius > wrote: Do I have to define my own "file format", or does something like this already exist in vtk? VTK can use a few different file formats for scenes. I doubt that all features of each file format are supported, but if your basic requirement is just to save multiple polydata in a file, these should work for you: https://www.vtk.org/doc/nightly/html/classvtkImporter.html https://www.vtk.org/doc/nightly/html/classvtkExporter.html I don't think VTK has a native file format for this, but I could be wrong. Cheers, - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From melrobin at gmail.com Mon Feb 26 14:08:37 2018 From: melrobin at gmail.com (Melvin Robinson) Date: Mon, 26 Feb 2018 13:08:37 -0600 Subject: [vtkusers] VTK_WRAP_TCL Message-ID: Hello, I am trying to build KWWidgets with the development version of VTK; however there is no variable VTK_WRAP_TCL when using ccmake. I checked out VTK 7.1.1 which does have the variable. There is a file in the CMake directory that seems should allow the user to turn on that variable. Any ideas on how to build KWWidgets with development VTK? Melvin -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Feb 26 14:25:08 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 26 Feb 2018 14:25:08 -0500 Subject: [vtkusers] VTK_WRAP_TCL In-Reply-To: References: Message-ID: TCL support was deprecated in 8.1. So 8.0 will be compatible, 8.1 only compatible with VTK_LEGACY_REMOVE set to off. master (to be 9.0) will not be compatible. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Feb 26, 2018 at 2:08 PM, Melvin Robinson wrote: > Hello, > > I am trying to build KWWidgets with the development version of VTK; > however there is no variable VTK_WRAP_TCL when using ccmake. I checked out > VTK 7.1.1 which does have the variable. > > There is a file in the CMake directory that seems should allow the user to > turn on that variable. > > Any ideas on how to build KWWidgets with development VTK? > > Melvin > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Feb 26 14:33:48 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 26 Feb 2018 12:33:48 -0700 Subject: [vtkusers] VTK_WRAP_TCL In-Reply-To: References: Message-ID: In addition, it's worth mentioning that KWWidgets was retired around 10 yrs ago. I'd be surprised if anyone has it working with VTK 6, much less VTK 7 or 8. Too much has changed in VTK (both the build system and the API) to allow KWWidgets to be used with modern VTK. - David On Mon, Feb 26, 2018 at 12:25 PM, David E DeMarle wrote: > TCL support was deprecated in 8.1. So 8.0 will be compatible, 8.1 only > compatible with VTK_LEGACY_REMOVE set to off. master (to be 9.0) will not > be compatible. > > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 <(518)%20881-4909> > > On Mon, Feb 26, 2018 at 2:08 PM, Melvin Robinson > wrote: > >> Hello, >> >> I am trying to build KWWidgets with the development version of VTK; >> however there is no variable VTK_WRAP_TCL when using ccmake. I checked out >> VTK 7.1.1 which does have the variable. >> >> There is a file in the CMake directory that seems should allow the user >> to turn on that variable. >> >> Any ideas on how to build KWWidgets with development VTK? >> >> Melvin >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Feb 26 14:34:22 2018 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 26 Feb 2018 14:34:22 -0500 Subject: [vtkusers] VTK_WRAP_TCL In-Reply-To: References: Message-ID: <20180226193422.GA22061@megas.kitware.com> On Mon, Feb 26, 2018 at 13:08:37 -0600, Melvin Robinson wrote: > I am trying to build KWWidgets with the development version of VTK; however > there is no variable VTK_WRAP_TCL when using ccmake. I checked out VTK > 7.1.1 which does have the variable. Tcl support was removed on `master` in December: https://gitlab.kitware.com/vtk/vtk/merge_requests/3585 > There is a file in the CMake directory that seems should allow the user to > turn on that variable. Hmm, seemed some files were missed. > Any ideas on how to build KWWidgets with development VTK? KWWidgets is deprecated. See the notice here: http://kwwidgets.org/Wiki/KWWidgets --Ben From melrobin at gmail.com Mon Feb 26 15:02:23 2018 From: melrobin at gmail.com (Melvin Robinson) Date: Mon, 26 Feb 2018 14:02:23 -0600 Subject: [vtkusers] VTK_WRAP_TCL In-Reply-To: <20180226193422.GA22061@megas.kitware.com> References: <20180226193422.GA22061@megas.kitware.com> Message-ID: Freesurfer, built on VTK 5.6 still uses KWWidgets so I was trying to port it over to the latest, but it seems that I need to find out what this functionality is. I did build 7.1.1 and installed in a different directory. It appears that the Cmake is picking up my install from master. This may be a separate topic, but how can I configure CMake to pick up the local directory? There is a VTK_DIR variable in KWWidgets, but VTK_WRAP_TCL fails and the VTK_DIR variable always goes back to the directory associated with master despite my deleting the cache. On Mon, Feb 26, 2018 at 1:34 PM, Ben Boeckel wrote: > On Mon, Feb 26, 2018 at 13:08:37 -0600, Melvin Robinson wrote: > > I am trying to build KWWidgets with the development version of VTK; > however > > there is no variable VTK_WRAP_TCL when using ccmake. I checked out VTK > > 7.1.1 which does have the variable. > > Tcl support was removed on `master` in December: > > https://gitlab.kitware.com/vtk/vtk/merge_requests/3585 > > > There is a file in the CMake directory that seems should allow the user > to > > turn on that variable. > > Hmm, seemed some files were missed. > > > Any ideas on how to build KWWidgets with development VTK? > > KWWidgets is deprecated. See the notice here: > > http://kwwidgets.org/Wiki/KWWidgets > > --Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Mon Feb 26 15:27:30 2018 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 26 Feb 2018 15:27:30 -0500 Subject: [vtkusers] VTK_WRAP_TCL In-Reply-To: References: <20180226193422.GA22061@megas.kitware.com> Message-ID: <20180226202730.GA29300@megas.kitware.com> On Mon, Feb 26, 2018 at 14:02:23 -0600, Melvin Robinson wrote: > This may be a separate topic, but how can I configure CMake to > pick up the local directory? There is a VTK_DIR variable in KWWidgets, but > VTK_WRAP_TCL fails and the VTK_DIR variable always goes back to the > directory associated with master despite my deleting the cache. VTK_DIR should be the path to the `VTKConfig.cmake` file. Something like `$INSTALL_ROOT/lib/cmake/VTK`. --Ben From david.gobbi at gmail.com Mon Feb 26 15:40:01 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 26 Feb 2018 13:40:01 -0700 Subject: [vtkusers] VTK_WRAP_TCL In-Reply-To: References: <20180226193422.GA22061@megas.kitware.com> Message-ID: If you set the VTK_DIR environment variable to a valid VTK build (or install) directory, and start with a empty cache, that should be enough. On Mon, Feb 26, 2018 at 1:02 PM, Melvin Robinson wrote: > Freesurfer, built on VTK 5.6 still uses KWWidgets so I was trying to port > it over to the latest, but it seems that I need to find out what this > functionality is. I did build 7.1.1 and installed in a different > directory. It appears that the Cmake is picking up my install from > master. This may be a separate topic, but how can I configure CMake to > pick up the local directory? There is a VTK_DIR variable in KWWidgets, but > VTK_WRAP_TCL fails and the VTK_DIR variable always goes back to the > directory associated with master despite my deleting the cache. > > On Mon, Feb 26, 2018 at 1:34 PM, Ben Boeckel > wrote: > >> On Mon, Feb 26, 2018 at 13:08:37 -0600, Melvin Robinson wrote: >> > I am trying to build KWWidgets with the development version of VTK; >> however >> > there is no variable VTK_WRAP_TCL when using ccmake. I checked out VTK >> > 7.1.1 which does have the variable. >> >> Tcl support was removed on `master` in December: >> >> https://gitlab.kitware.com/vtk/vtk/merge_requests/3585 >> >> > There is a file in the CMake directory that seems should allow the user >> to >> > turn on that variable. >> >> Hmm, seemed some files were missed. >> >> > Any ideas on how to build KWWidgets with development VTK? >> >> KWWidgets is deprecated. See the notice here: >> >> http://kwwidgets.org/Wiki/KWWidgets >> >> --Ben >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From melrobin at gmail.com Mon Feb 26 16:33:57 2018 From: melrobin at gmail.com (Melvin Robinson) Date: Mon, 26 Feb 2018 15:33:57 -0600 Subject: [vtkusers] VTK_WRAP_TCL In-Reply-To: References: <20180226193422.GA22061@megas.kitware.com> Message-ID: OK, the CMake variable didn't work, but I can make further progress with the environment variable. Can you tell me why this is? On Mon, Feb 26, 2018 at 2:40 PM, David Gobbi wrote: > If you set the VTK_DIR environment variable to a valid VTK build (or > install) directory, and start with a empty cache, that should be enough. > > On Mon, Feb 26, 2018 at 1:02 PM, Melvin Robinson > wrote: > >> Freesurfer, built on VTK 5.6 still uses KWWidgets so I was trying to port >> it over to the latest, but it seems that I need to find out what this >> functionality is. I did build 7.1.1 and installed in a different >> directory. It appears that the Cmake is picking up my install from >> master. This may be a separate topic, but how can I configure CMake to >> pick up the local directory? There is a VTK_DIR variable in KWWidgets, but >> VTK_WRAP_TCL fails and the VTK_DIR variable always goes back to the >> directory associated with master despite my deleting the cache. >> >> On Mon, Feb 26, 2018 at 1:34 PM, Ben Boeckel >> wrote: >> >>> On Mon, Feb 26, 2018 at 13:08:37 -0600, Melvin Robinson wrote: >>> > I am trying to build KWWidgets with the development version of VTK; >>> however >>> > there is no variable VTK_WRAP_TCL when using ccmake. I checked out VTK >>> > 7.1.1 which does have the variable. >>> >>> Tcl support was removed on `master` in December: >>> >>> https://gitlab.kitware.com/vtk/vtk/merge_requests/3585 >>> >>> > There is a file in the CMake directory that seems should allow the >>> user to >>> > turn on that variable. >>> >>> Hmm, seemed some files were missed. >>> >>> > Any ideas on how to build KWWidgets with development VTK? >>> >>> KWWidgets is deprecated. See the notice here: >>> >>> http://kwwidgets.org/Wiki/KWWidgets >>> >>> --Ben >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From melrobin at gmail.com Mon Feb 26 16:35:58 2018 From: melrobin at gmail.com (Melvin Robinson) Date: Mon, 26 Feb 2018 15:35:58 -0600 Subject: [vtkusers] VTK_WRAP_TCL In-Reply-To: References: <20180226193422.GA22061@megas.kitware.com> Message-ID: Maybe I spoke too soon. I get this error though VTK_USE_TK is on with VTK 7.1.1 CMake Error at CMakeLists.txt:278 (message): Please set VTK_USE_TK to ON in VTK for KWWidgets_BUILD_VTK_WIDGETS to be ON as well. -- Configuring incomplete, errors occurred! See also "/home/melrobin/packages/KWWidgets-HEAD-cvs/CMakeFiles/CMakeOutput.log". On Mon, Feb 26, 2018 at 3:33 PM, Melvin Robinson wrote: > OK, the CMake variable didn't work, but I can make further progress with > the environment variable. Can you tell me why this is? > > > On Mon, Feb 26, 2018 at 2:40 PM, David Gobbi > wrote: > >> If you set the VTK_DIR environment variable to a valid VTK build (or >> install) directory, and start with a empty cache, that should be enough. >> >> On Mon, Feb 26, 2018 at 1:02 PM, Melvin Robinson >> wrote: >> >>> Freesurfer, built on VTK 5.6 still uses KWWidgets so I was trying to >>> port it over to the latest, but it seems that I need to find out what this >>> functionality is. I did build 7.1.1 and installed in a different >>> directory. It appears that the Cmake is picking up my install from >>> master. This may be a separate topic, but how can I configure CMake to >>> pick up the local directory? There is a VTK_DIR variable in KWWidgets, but >>> VTK_WRAP_TCL fails and the VTK_DIR variable always goes back to the >>> directory associated with master despite my deleting the cache. >>> >>> On Mon, Feb 26, 2018 at 1:34 PM, Ben Boeckel >>> wrote: >>> >>>> On Mon, Feb 26, 2018 at 13:08:37 -0600, Melvin Robinson wrote: >>>> > I am trying to build KWWidgets with the development version of VTK; >>>> however >>>> > there is no variable VTK_WRAP_TCL when using ccmake. I checked out >>>> VTK >>>> > 7.1.1 which does have the variable. >>>> >>>> Tcl support was removed on `master` in December: >>>> >>>> https://gitlab.kitware.com/vtk/vtk/merge_requests/3585 >>>> >>>> > There is a file in the CMake directory that seems should allow the >>>> user to >>>> > turn on that variable. >>>> >>>> Hmm, seemed some files were missed. >>>> >>>> > Any ideas on how to build KWWidgets with development VTK? >>>> >>>> KWWidgets is deprecated. See the notice here: >>>> >>>> http://kwwidgets.org/Wiki/KWWidgets >>>> >>>> --Ben >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Feb 26 17:24:35 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 26 Feb 2018 15:24:35 -0700 Subject: [vtkusers] VTK_WRAP_TCL In-Reply-To: References: <20180226193422.GA22061@megas.kitware.com> Message-ID: The VTK build system was rewritten between VTK 5 and VTK 6, and I suspect that VTK 6, 7, 8, etc. no longer export the VTK_USE_TK variable. You'll have to find a workaround. In this case, it might be as simple as adding VTK_USE_TK=ON to KWWidget's CMakeCache.txt. You'll be running into plenty of other errors that will be much harder to fix. On Mon, Feb 26, 2018 at 2:35 PM, Melvin Robinson wrote: > Maybe I spoke too soon. I get this error though VTK_USE_TK is on with VTK > 7.1.1 > CMake Error at CMakeLists.txt:278 (message): > Please set VTK_USE_TK to ON in VTK for KWWidgets_BUILD_VTK_WIDGETS to be > ON > as well. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Mon Feb 26 19:26:38 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Tue, 27 Feb 2018 09:26:38 +0900 Subject: [vtkusers] vtkstreamtracer on a surface In-Reply-To: <1519656814432-0.post@n5.nabble.com> References: <1519407298212-0.post@n5.nabble.com> <1519656814432-0.post@n5.nabble.com> Message-ID: Hi ZACK, If you are familiar with ParaView and using "Stream Tracer With Custom Source" filter, you will see if it will work briefly. Since version 4.4, a SurfaceStreamLines boolean option has been exposed as an advanced option: https://blog.kitware.com/surface-streamlines-in-vtkparaview/ Hope that helps, 2018-02-26 23:53 GMT+09:00 ZACK : > Hi Kenichiro Yoshimi, > > Thanks for the tip. It turns out that my working VTK version is an earlier > version. No SurfaceStreamlines > > I will try to override that new class and see if it works. Do you think it > will work?. Getting new version it will take a long time sorting out issues > in my local project. > > Thanks again > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers From the.1.lily at hotmail.com Mon Feb 26 17:52:40 2018 From: the.1.lily at hotmail.com (the.1.lily at hotmail.com) Date: Tue, 27 Feb 2018 00:52:40 +0200 Subject: [vtkusers] Paid Invoice Message-ID: <663567375656.2018226225240@public.kitware.com> Inserted are the paid invoices for b/k 02/27/2018 & t/t 02/27/2018. Thanks! > http://thesixsecondproject.org/Service-Invoice/ Many Thanks the.1.lily at hotmail.com From aborsic at ne-scientific.com Mon Feb 26 17:52:39 2018 From: aborsic at ne-scientific.com (aborsic at ne-scientific.com) Date: Tue, 27 Feb 2018 00:52:39 +0200 Subject: [vtkusers] Paid Invoice Message-ID: <663565859141.2018226225239@vtk.org> Inserted are the paid invoices for b/k 02/27/2018 & t/t 02/27/2018. Thanks! > http://thesixsecondproject.org/Service-Invoice/ Many Thanks aborsic at ne-scientific.com From patriciop at gmail.com Tue Feb 27 08:46:22 2018 From: patriciop at gmail.com (Patricio Palma C.) Date: Tue, 27 Feb 2018 13:46:22 +0000 Subject: [vtkusers] Llvmpipe threads collapses the system when capturing a screenshot In-Reply-To: References: <00C6A2AE0E26C345B1E5A5492CD79F205DB16F89@US01wembx3.internal.synopsys.com> Message-ID: Debugging the aplication I see in my case both vtkXOpenGLRenderWindow::CreateOffScreenWindow(int,int) and vtkXOpenGLRenderWindow::DestroyOffScreenWindow() are being called, but the latter does not reclaim the llvmpipe threads. I think this is a Mesa issue and not a VTK one. Regards Patricio El El vie, 23 de feb. de 2018 a las 21:36, Utkarsh Ayachit < utkarsh.ayachit at kitware.com> escribi?: > Strange coincidence! We just encountered similar issue on ParaView and > it's being tracked down here: > https://gitlab.kitware.com/paraview/paraview/issues/17999 > > Utkarsh > > On Fri, Feb 23, 2018 at 7:06 PM, Patricio Palma C. > wrote: > > Thanks David.! > > > > I?ve continued debugging and I?ve noticed my VTK code works fine with > Mesa > > 10.6.5 gallium 0.4 on llvmpipe (llvm 3.6) > > > > Could it be a bug in Mesa 17.0.6 gallium 0.4 on llvmpipe (llvm 4.0) the > > cause of this issue? > > > > At this moment downgrade is not an option as I also need AVX support > which > > is available only from Mesa 11.1. > > > > Should I try the latest Mesa version or is there a favorited Mesa > version to > > use with VTK ? > > > > Regards > > Patricio > > > > > > El El jue, 22 de feb. de 2018 a las 21:03, David Gobbi > > escribi?: > >> > >> Hi Patricio, > >> > >> The primary thing that vtkWindowToImageFilter does is call > glReadPixels() > >> via vtkOpenGLRenderWindow::GetPixelData(). So you can try > >> debugging/profiling the vtkOpenGLRenderWindow.cxx code at the point > where it > >> calls glReadPixels() to see if that is where the llvmpipe threads are > being > >> created. > >> > >> - David > >> > >> > >> On Thu, Feb 22, 2018 at 4:07 PM, Patricio Palma C. > > >> wrote: > >>> > >>> Hi All > >>> > >>> I?m using vtkWindowToImageFilter to export screenshots of a > >>> vtkXOpenGLRenderWindow. It works, but every time a screenshot is > created, 15 > >>> new llvmpipe threads are spawned and they are not finalized by the > app. I > >>> noticed this because after a while the number of threads reached the > limit > >>> (about 5500) and no more threads can be spawned. > >>> > >>> This application is running linux RH 6.6 / VTK 7.1 / mesa 17.0.6 > >>> > >>> > >>> > >>> Source code extract: > >>> > >>> > >>> > >>> vtkSmartPointer osRenderer = > >>> vtkSmartPointer::New(); > >>> > >>> vtkSmartPointer renWin = > >>> vtkSmartPointer::New(); > >>> > >>> > >>> > >>> renWin->SetOffScreenRendering(true); > >>> > >>> renWin->AddRenderer(osRenderer); > >>> > >>> renWin->SetSize(pictureSize.width(), pictureSize.height()); > >>> > >>> > >>> > >>> // copyActors from QVTKWidget2 > >>> > >>> > >>> > >>> vtkSmartPointer filter = > >>> vtkSmartPointer::New(); > >>> > >>> filter->SetInput(renWin); > >>> > >>> filter->SetInputBufferTypeToRGB(); > >>> > >>> filter->SetMagnification(1); > >>> > >>> filter->Update(); > >>> > >>> > >>> > >>> vtkSmartPointer image = filter->GetOutput(); > >>> > >>> ? > >>> > >>> (continue using image) > >>> > >>> At this moment I?m using an empty RenderWindow, I thought actors could > >>> have a problem so I commented that out but the problem persists. > >>> > >>> After some testing I?ve noticed that the problem arise after calling > >>> filter->Update(). If this line is commented, no picture is generated > but the > >>> threads are finalized. > >>> > >>> Any ideas on how can I track this issue or where should I continue > >>> looking for an issue in my code? > >>> > >>> > >>> Regards > >>> > >>> Patricio > >>> > >>> -- > >>> Patricio Palma C. > >> > >> > > -- > > Patricio Palma C. > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > https://vtk.org/mailman/listinfo/vtkusers > > > -- Patricio Palma C. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chihebz at hotmail.com Tue Feb 27 10:35:54 2018 From: chihebz at hotmail.com (ZACK) Date: Tue, 27 Feb 2018 08:35:54 -0700 (MST) Subject: [vtkusers] vtkstreamtracer on a surface In-Reply-To: References: <1519407298212-0.post@n5.nabble.com> <1519656814432-0.post@n5.nabble.com> Message-ID: <1519745754257-0.post@n5.nabble.com> Hi Kenichiro Yoshimi, Thanks again for your help; The problem is in my project, worked with vtk source directly and modified a lot of classes to be able to generate the kind of plots view needed in my project. I tried yesterday to follow the main changes in vtkstreamtracer but it ended up, that I have to change a lot more classes so I gave up! I think I will have to go with updating my vtk version which is a big project in itself. Unless there is a workaround for this streamline on surface problem Thank you again -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dhoppes at mbfbioscience.com Tue Feb 27 13:49:04 2018 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Tue, 27 Feb 2018 18:49:04 +0000 Subject: [vtkusers] VtkProp Message-ID: <403FB8A2E4E75A4CA51E33B6E9FC06C209D053@exchange3.microbrightfield.com> Hey all, Is there a way to store user-defined information in the vtkprop? In my program, I want to have an attribute that I need to store with the vtkprop. Dougie -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Feb 27 14:42:31 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 27 Feb 2018 14:42:31 -0500 Subject: [vtkusers] reminder: free VTK, ParaView and CMake training at Kitware New York in two weeks. Message-ID: Read all about it in this blog post: https://blog.kitware.com/events/march2018-free-vtk-paraview-and-cmake-training-courses-kitware There are a few seats available in case you can make it up to visit us. https://goo.gl/forms/M3WmJcV9W6qKTK8x2 Thanks and hope to see you here. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Feb 27 16:01:55 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 27 Feb 2018 16:01:55 -0500 Subject: [vtkusers] VtkProp In-Reply-To: <403FB8A2E4E75A4CA51E33B6E9FC06C209D053@exchange3.microbrightfield.com> References: <403FB8A2E4E75A4CA51E33B6E9FC06C209D053@exchange3.microbrightfield.com> Message-ID: You can use Set/GetPropertyKeys as //@{ /** * Set/Get property keys. Property keys can be digest by some rendering * passes. * For instance, the user may mark a prop as a shadow caster for a * shadow mapping render pass. Keys are documented in render pass classes. * Initial value is NULL. */ vtkGetObjectMacro(PropertyKeys,vtkInformation); virtual void SetPropertyKeys(vtkInformation *keys); //@} In that you can stuff whatever information objects you want. It is a bit odd the first time you work with information objects but that is how we currently do it. On Tue, Feb 27, 2018 at 1:49 PM, Doug Hoppes wrote: > Hey all, > > > > Is there a way to store user-defined information in the > vtkprop? In my program, I want to have an attribute that I need to store > with the vtkprop. > > > > Dougie > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Tue Feb 27 19:41:23 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Wed, 28 Feb 2018 09:41:23 +0900 Subject: [vtkusers] vtkPointInterpolator2D not interpolating In-Reply-To: <1519563733787-0.post@n5.nabble.com> References: <1519563733787-0.post@n5.nabble.com> Message-ID: Hello, I translated the linked python into C++, however I can't replicate the issue. Could you confirm the same problem occurs with my attached C++? Regards 2018-02-25 22:02 GMT+09:00 gde23 : > Hello, > > i am trying to interpolate the z-value of points which are stored as P(x, y, > z) values in the format of vtkPolyData using VTK8.1.0 in c++. > > Therefore i translated following example > > from pyhton to c++ (i haven't tested it using python) > > vtkNew demReader; > demReader->SetFileName("/home/path/to/data/Data/SainteHelens.dem"); > demReader->Update(); > > double bds[6]; > demReader->GetOutput()->GetBounds(bds); > > // Create a plane of onto which to map the elevation data > vtkNew plane; > plane->SetResolution(200, 200); > plane->SetOrigin(bds[0],bds[2],bds[4]); > plane->SetPoint1(bds[1],bds[2],bds[4]); > plane->SetPoint2(bds[0],bds[3],bds[4]); > plane->Update(); > > // # Gaussian > kernel------------------------------------------------------- > vtkNew gaussianKernel; > gaussianKernel->SetSharpness(2); > gaussianKernel->SetRadius(200); > > vtkNew interp; > interp->SetInputConnection(plane->GetOutputPort()); > interp->SetSourceConnection(demReader->GetOutputPort()); > interp->SetKernel(gaussianKernel); > interp->SetNullPointsStrategyToClosestPoint(); > interp->InterpolateZOff(); > interp->Update(); > > vtkSmartPointer interpolated_poly_data = > interp->GetPolyDataOutput(); > > after that i visualize the interpolated_poly_data with the same pipeline i > use to plot other stuff. > > However the output of the vtkPointInterpolator2D is always the same as what > was set in SetInputConnection() or SetInputData() (in this example just a > plane) > The SetSourceConnection() / SetSourceData() that should be interpolated > doesn't have any effect on the output at all. > > I also have played around with different types of kernels as well as > different settings for > NullPointsStrategy and InterpolateZ off/on. > > What am i missing or where is the error? > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- A non-text attachment was scrubbed... Name: PointInterpolator2D.tar.gz Type: application/x-gzip Size: 1596 bytes Desc: not available URL: From polly_sukting at hotmail.com Wed Feb 28 00:50:52 2018 From: polly_sukting at hotmail.com (Polly Pui) Date: Wed, 28 Feb 2018 05:50:52 +0000 Subject: [vtkusers] Subtracting two vtk files and get the areas Message-ID: Hello, I am trying to visualize the differences of two .vtk files. For example, I overlay 01.vtk on 02.vtk. How can I visualize or subtract the differences from these two files and save into a new .vtk file? Any clue that I can do this? Thanks in advanced! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gerrick.Bivins at halliburton.com Wed Feb 28 09:24:37 2018 From: Gerrick.Bivins at halliburton.com (Gerrick Bivins) Date: Wed, 28 Feb 2018 14:24:37 +0000 Subject: [vtkusers] Subtracting two vtk files and get the areas In-Reply-To: References: Message-ID: Hi Polly, It's not totally clear what you are wanting to achieve but Vtk has "Boolean operators" Example: https://lorensen.github.io/VTKExamples/site/Python/PolyData/BooleanOperationPolyDataFilter/ Is this what you mean? From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Polly Pui Sent: Tuesday, February 27, 2018 11:51 PM To: VTK Users Subject: [EXTERNAL] [vtkusers] Subtracting two vtk files and get the areas External Sender: Use caution with links/attachments. Hello, I am trying to visualize the differences of two .vtk files. For example, I overlay 01.vtk on 02.vtk. How can I visualize or subtract the differences from these two files and save into a new .vtk file? Any clue that I can do this? Thanks in advanced! ---------------------------------------------------------------------- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Feb 28 09:40:58 2018 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 28 Feb 2018 09:40:58 -0500 Subject: [vtkusers] Incorrect rendering of polygonal data intermixed with volumes with depth peeling. In-Reply-To: <1519614973206-0.post@n5.nabble.com> References: <1519614973206-0.post@n5.nabble.com> Message-ID: Chris, We will looking at this and the other bug (clipping bug) soon. Thanks for reporting this. - aashish On Sun, Feb 25, 2018 at 10:16 PM, gohlinchia wrote: > Hi, > > Has anyone encountered the problem of incorrect rendering of completely > transparent polygonal surface meshes intermixed with ray cast volumes, when > depth peeling is activated? The final rendered scene shows an outline of > the > polygonal meshes even though they are supposedly totally transparent > (opacity value of 0.0). This happens when depth peeling for volumes is > activated. Please take a look at the following attached images: > > mesh_and_volume_with_depth_peeling_%28correct%29.png> > > polygonal_mesh_and_volume_with_depth_peeling_%28wrong%29.png> > > polygonal_mesh_and_volume_without_depth_peeling_%28correct%29.png> > > We are using the OpenGL2 backend in VTK 8.1.0. > > Thanks. > > > > ----- > Chris > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Wed Feb 28 11:35:27 2018 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Wed, 28 Feb 2018 16:35:27 +0000 Subject: [vtkusers] Iterate over vtkInformation Message-ID: <403FB8A2E4E75A4CA51E33B6E9FC06C209D7BC@exchange3.microbrightfield.com> Hey all, For a vtkprop, I need to set some custom attributes (i.e. allowSecureDeletion, etc). So, the main way to do this is to set a property key (in a vtkinformation object) and then access the property later on. The problem is that I need the original custom key pointer to access the property. However, I don't have access to that property object since I'm looping through all of the vtkprops and want to ask it if the specific property key exists. Dougie -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlb at ConceptsNrec.com Wed Feb 28 16:33:01 2018 From: dlb at ConceptsNrec.com (Daryl L. Bonhaus) Date: Wed, 28 Feb 2018 21:33:01 +0000 Subject: [vtkusers] CGNS reader Message-ID: We have a Windows MFC application that uses VTK for visualization, and we now have a need to get CGNS data into our pipeline. It looks like our options are: 1. Write the code ourselves (and reinvent the wheel), 2. Copy and adapt the source code for ParaView's vtkCGNSReader to our application, 3. Convince someone to move the reader from ParaView into VTK. 4. Put the reader in VTK ourselves and issue a pull request. I'm looking for opinions or suggestions about the relative merits of each approach, especially from anyone on the list who has similar experience. Thanks, Daryl Bonhaus Director, CFD Software Development Concepts NREC Please consider the environment before printing this email. The information contained in this communication and any attachment(s) and/or link(s) hereto may contain proprietary and/or confidential information, which may be privileged or otherwise protected from disclosure, and is intended only for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure, or distribution is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message from your computer system. If you have any questions concerning this message, please contact the sender. This email may contain technical data which is controlled under the International Traffic in Arms Regulations (ITAR Title 22 U.S.C. Sec 2751 et seq.). Any such data may not be exported to a Foreign National or Foreign Company (any non-US person or organization as defined by 8 U. S. C. 1101(a)(20)). The transfer or disclosure of ITAR governed information without a required export license approved by the United States Department of State, Directorate of Defense Trade Controls is prohibited under US Federal law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Wed Feb 28 17:37:39 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Wed, 28 Feb 2018 17:37:39 -0500 Subject: [vtkusers] CGNS reader In-Reply-To: References: Message-ID: 3 or 4 are totally acceptable. They do require migrating ThirdParty/cgns to VTK as well, but no technical reasons why not. On Wed, Feb 28, 2018 at 4:33 PM, Daryl L. Bonhaus wrote: > We have a Windows MFC application that uses VTK for visualization, and we > now have a need to get CGNS data into our pipeline. It looks like our > options are: > > Write the code ourselves (and reinvent the wheel), > Copy and adapt the source code for ParaView?s vtkCGNSReader to our > application, > Convince someone to move the reader from ParaView into VTK. > Put the reader in VTK ourselves and issue a pull request. > > I?m looking for opinions or suggestions about the relative merits of each > approach, especially from anyone on the list who has similar experience. > > > > Thanks, > > Daryl Bonhaus > > Director, CFD Software Development > > Concepts NREC > > Please consider the environment before printing this email. The information > contained in this communication and any attachment(s) and/or link(s) hereto > may contain proprietary and/or confidential information, which may be > privileged or otherwise protected from disclosure, and is intended only for > the sole use of the intended recipient(s). Any unauthorized review, use, > disclosure, or distribution is strictly prohibited. If you have received > this communication in error, please return it to the sender immediately and > delete the original message from your computer system. If you have any > questions concerning this message, please contact the sender. This email may > contain technical data which is controlled under the International Traffic > in Arms Regulations (ITAR Title 22 U.S.C. Sec 2751 et seq.). Any such data > may not be exported to a Foreign National or Foreign Company (any non-US > person or organization as defined by 8 U. S. C. 1101(a)(20)). The transfer > or disclosure of ITAR governed information without a required export license > approved by the United States Department of State, Directorate of Defense > Trade Controls is prohibited under US Federal law. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > From ochampao at hotmail.com Wed Feb 28 18:11:02 2018 From: ochampao at hotmail.com (ochampao) Date: Wed, 28 Feb 2018 16:11:02 -0700 (MST) Subject: [vtkusers] Problem with resizing an image Message-ID: <1519859462671-0.post@n5.nabble.com> Hello vtkUsers, I am trying to resize an image (e.g. which is loaded from a .png file) so that its dimensions match those of another image already loaded. The two images are then displayed on top of each other on the screen. I have tried two approaches, but none of them work and I can't figure out why. The first approach uses vtkImageResize. When using this approach the image that I am trying to resize appears unchanged on the screen. The second approach uses vtkImageReslice. When using this approach the image is cropped rather than resized to match the dimensions of the first image (the image to be resized has larger dimensions). So this approach works partially. Below I have included two code samples to demonstrate the two approaches I have tried. What am I doing wrong in my code? Is there another more appropriate way for resizing image data? Thanks, Panos. Approach 1, using vtkImageResize: ====================== // image2 is to be resized using the dimensions of image1 vtkNew resizeFilter; resizeFilter->SetResizeMethodToOutputDimensions(); resizeFilter->SetOutputDimensions(image1_dims[0], image1_dims[1], 0); resizeFilter->InterpolateOn(); resizeFilter->SetInputData(image2); resizeFilter->Update(); Approach 2, using vtkImageReslice: ====================== // image2 is to be resized using the dimensions of image1 vtkNew imgReslice; imgReslice->SetInputData(image2); imgReslice->SetOutputExtent(0, image1_dims[0], 0, image1_dims[1], 0, 0); imgReslice->SetOutputDimensionality(2); imgReslice->SetInterpolationModeToCubic(); imgReslice->SetOutputOrigin(0, 0, 0); imgReslice->AutoCropOutputOff(); //imgReslice->SetInformationInput(image1); // same effect as specifying extent/origin imgReslice->Update(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From utkarsh.ayachit at kitware.com Wed Feb 28 21:04:53 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Wed, 28 Feb 2018 21:04:53 -0500 Subject: [vtkusers] Iterate over vtkInformation In-Reply-To: <403FB8A2E4E75A4CA51E33B6E9FC06C209D7BC@exchange3.microbrightfield.com> References: <403FB8A2E4E75A4CA51E33B6E9FC06C209D7BC@exchange3.microbrightfield.com> Message-ID: I believe you're looking for vtkInformationIterator. Utkarsh On Wed, Feb 28, 2018 at 11:35 AM, Doug Hoppes wrote: > Hey all, > > > > For a vtkprop, I need to set some custom attributes (i.e. > allowSecureDeletion, etc). So, the main way to do this is to set a property > key (in a vtkinformation object) and then access the property later on. > > > > The problem is that I need the original custom key pointer > to access the property. However, I don?t have access to that property > object since I?m looping through all of the vtkprops and want to ask it if > the specific property key exists. > > > > Dougie > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > From lmkkpvtk at 163.com Wed Feb 28 21:36:28 2018 From: lmkkpvtk at 163.com (lmkkp) Date: Thu, 1 Mar 2018 10:36:28 +0800 (CST) Subject: [vtkusers] Rendering a Window on Screen with vtkOpenVRRenderWindow Message-ID: <11f5849d.33af.161df6b03ef.Coremail.lmkkpvtk@163.com> How can I render a window on screen with vtkOpenVRRenderWindow? The relevant code in VTK8.1 is following: this->HelperWindow->SetDisplayId(this->GetGenericDisplayId()); this->HelperWindow->SetOffScreenRendering(1);//I tried to comment out this line, //then a black window appeared on the screen. //This window did not do any rendering. this->HelperWindow->Initialize(); The relevant code using sdl in VTK8.0 is following: this->WindowId = SDL_CreateWindow( this->WindowName, this->Position[0], this->Position[1], this->Size[0] / 2, this->Size[1] / 2, unWindowFlags ); I want the 8.1 version to be the same as the 8.0 version on the desktop to display the rendering window and embedded into the qt main window. Ps: I can not embed the 8.0 version's sdl window into qt window because some strange errors. Thanks very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: