From mrezababaee at gmail.com Mon Jan 2 10:19:06 2017 From: mrezababaee at gmail.com (Mohammadreza Babaee) Date: Mon, 2 Jan 2017 16:19:06 +0100 Subject: [vtkusers] Connected Component Message-ID: Dear All, I have a polydata that contains several connected components. I need only the largest component in my polydata. What should I do and how I can use Connectivityfilter to solve this problem Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Jan 2 10:23:59 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 2 Jan 2017 10:23:59 -0500 Subject: [vtkusers] Connected Component In-Reply-To: References: Message-ID: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataConnectivityFilter_LargestRegion On Jan 2, 2017 10:19 AM, "Mohammadreza Babaee" wrote: > Dear All, > > I have a polydata that contains several connected components. I need only > the largest component in my polydata. What should I do and how I can use > Connectivityfilter to solve this problem > > > > Thanks > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Mon Jan 2 11:43:11 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Mon, 2 Jan 2017 11:43:11 -0500 Subject: [vtkusers] Connected Component In-Reply-To: References: Message-ID: It is a set of polygons that are connected. Perhaps your data has some issues. On Mon, Jan 2, 2017 at 10:47 AM, Mohammadreza Babaee wrote: > Hi > > But it gives me the largest cell. I think by region it means cell or > polygon and not a set of polygons which are connected. > > > Thanks > > On Mon, Jan 2, 2017 at 4:23 PM, Bill Lorensen > wrote: >> >> >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataConnectivityFilter_LargestRegion >> >> On Jan 2, 2017 10:19 AM, "Mohammadreza Babaee" >> wrote: >>> >>> Dear All, >>> >>> I have a polydata that contains several connected components. I need only >>> the largest component in my polydata. What should I do and how I can use >>> Connectivityfilter to solve this problem >>> >>> >>> >>> Thanks >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> > -- Unpaid intern in BillsBasement at noware dot com From jose.de.paula at live.com Mon Jan 2 13:58:36 2017 From: jose.de.paula at live.com (Jose Barreto) Date: Mon, 2 Jan 2017 11:58:36 -0700 (MST) Subject: [vtkusers] Many vtkTexturedButtonRepresentation2D does not accept user interaction. Message-ID: <1483383516106-5741673.post@n5.nabble.com> Hi, I have two renderes added in the same renderwindow. Use viewerport to separate them. I have two vtkButtonWidget using vtkTexturedButtonRepresentation2D as impersonation. When I add the 2 vtkButtonWidget, one on each renderer, the object that goes into the second renderer does not accept user interaction. Note that the mouse on the second renderer does not even change. Below the code for compilation. #include #include #include #include #include #include #include #include #include #include #include #include #include static void CreateImage(vtkSmartPointer image, unsigned char *color1, unsigned char *color2); int main(int, char *[]) { // Create two images for texture auto image1 = vtkSmartPointer::New(); auto image2 = vtkSmartPointer::New(); unsigned char banana[3] = { 227, 207, 87 }; unsigned char tomato[3] = { 255, 99, 71 }; CreateImage(image1, banana, tomato); CreateImage(image2, tomato, banana); // Renderes and Window auto renderer1 = vtkSmartPointer::New(); renderer1->SetViewport(0, 0, 1, .5); auto renderer2 = vtkSmartPointer::New(); renderer2->SetViewport(0, .5, 1, 1); auto renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer1); renderWindow->AddRenderer(renderer2); // An interactor auto renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderer1->SetBackground(.1, .2, .5); renderer2->SetBackground(0, 0, 0); renderWindow->SetSize(640, 480); renderWindow->Render(); vtkButtonWidget* buttonWidget[2]; buttonWidget[0] = vtkButtonWidget::New(); buttonWidget[1] = vtkButtonWidget::New(); for (int i = 0; i < 2; i++) { auto buttonRepresentation = vtkTexturedButtonRepresentation2D::New(); buttonRepresentation->SetNumberOfStates(2); buttonRepresentation->SetButtonTexture(0, image1); buttonRepresentation->SetButtonTexture(1, image2); buttonWidget[i]->SetInteractor(renderWindowInteractor); buttonWidget[i]->SetRepresentation(buttonRepresentation); if (i == 0) { buttonWidget[i]->SetDefaultRenderer(renderer2); } else { buttonWidget[i]->SetDefaultRenderer(renderer1); } buttonWidget[i]->On(); } renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } void CreateImage(vtkSmartPointer image, unsigned char* color1, unsigned char* color2) { // Specify the size of the image data image->SetDimensions(10, 10, 1); #if VTK_MAJOR_VERSION <= 5 image->SetNumberOfScalarComponents(3); image->SetScalarTypeToUnsignedChar(); #else image->AllocateScalars(VTK_UNSIGNED_CHAR, 3); #endif int* dims = image->GetDimensions(); // Fill the image with for (int y = 0; y < dims[1]; y++) { for (int x = 0; x < dims[0]; x++) { unsigned char* pixel = static_cast(image->GetScalarPointer(x, y, 0)); if (x < 5) { pixel[0] = color1[0]; pixel[1] = color1[1]; pixel[2] = color1[2]; } else { pixel[0] = color2[0]; pixel[1] = color2[1]; pixel[2] = color2[2]; } } } } -- View this message in context: http://vtk.1045678.n5.nabble.com/Many-vtkTexturedButtonRepresentation2D-does-not-accept-user-interaction-tp5741673.html Sent from the VTK - Users mailing list archive at Nabble.com. From patriciop at gmail.com Mon Jan 2 20:54:51 2017 From: patriciop at gmail.com (Patricio Palma C.) Date: Tue, 03 Jan 2017 01:54:51 +0000 Subject: [vtkusers] Problems building support for Xdmf2 on VTK 7.1 In-Reply-To: References: Message-ID: Hi experts Does anybody has information about the issue mentioned below building Xdmf2 driver using gzip ? Thanks Patricio El vie., 23 de dic. de 2016 a la(s) 22:00, Patricio Palma C. < patriciop at gmail.com> escribi?: > Dear all > > I am using VTK 7.1 for saving visualization data using XDMF2 format. > Current files produced are big, so I enabled XDMF_USE GZIP option hoping > that it activates the compression on the .h5 file. However, during > compilation I get error messages due to undefined references (it seems that > XDMF2 is not depending on ZLIB). The compiler output is: > > CMakeFiles/vtkxdmf2.dir/gzstream.cxx.o: In function > `gzstreambuf::open(char const*, > int)': > > > vtk/VTK-7.1.0/ThirdParty/xdmf2/vtkxdmf2/libsrc/gzstream.cxx:61: undefined > reference to > `gzopen' > > CMakeFiles/vtkxdmf2.dir/gzstream.cxx.o: In function > `gzstreambuf::close()': > > vtk/VTK-7.1.0/ThirdParty/xdmf2/vtkxdmf2/libsrc/gzstream.cxx:72: undefined > reference to > `gzclose' > > CMakeFiles/vtkxdmf2.dir/gzstream.cxx.o: In function > `gzstreambuf::underflow()': > > vtk/VTK-7.1.0/ThirdParty/xdmf2/vtkxdmf2/libsrc/gzstream.cxx:90: undefined > reference to > `gzread' > > CMakeFiles/vtkxdmf2.dir/gzstream.cxx.o: In function > `gzstreambuf::flush_buffer()': > > vtk/VTK-7.1.0/ThirdParty/xdmf2/vtkxdmf2/libsrc/gzstream.cxx:107: undefined > reference to > `gzwrite' > > collect2: error: ld returned 1 exit > status > > > > gmake[2]: *** [lib/libvtkxdmf2-7.1.so.1] Error > 1 > > > gmake[1]: *** > [ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeFiles/vtkxdmf2.dir/all] Error 2 > > > > How can I solve that issue? > > What do I have to do so vtkXdmfWriter creates a compressed .h5 file ? > > > > Thank you! > > > -- -- Patricio Palma Contreras -------------- next part -------------- An HTML attachment was scrubbed... URL: From mrezababaee at gmail.com Tue Jan 3 10:22:00 2017 From: mrezababaee at gmail.com (Mohammadreza Babaee) Date: Tue, 3 Jan 2017 16:22:00 +0100 Subject: [vtkusers] Issue; Number of Regions are equal to the number of Polys Message-ID: Hi I have a vtp file that contains a polydata. I want to extract its connected component. However, when I use* vtkPolyDataConnectivityFilter**, *and read the number of regions, it shows that the it is equal to the number of polys. But when I visualize the file I see that there are actually 4 regions. I use SetExtractionModeToAllRegions to read the number of regions. I have attached the file. Can you please help me to understand what the problem is So here is my code vtkSmartPointer connectivityFilter = vtkSmartPointer::New(); connectivityFilter->SetInputData(poly_in); connectivityFilter->ScalarConnectivityOn(); connectivityFilter->SetExtractionModeToAllRegions(); connectivityFilter->Update(); int nbregions = connectivityFilter->GetNumberOfExtractedRegions(); cout << "Number of Extracted Regions are=" << nbregions << endl; Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FinalModel.vtp Type: application/octet-stream Size: 608924 bytes Desc: not available URL: From dave.demarle at kitware.com Tue Jan 3 10:30:37 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 3 Jan 2017 10:30:37 -0500 Subject: [vtkusers] Issue; Number of Regions are equal to the number of Polys In-Reply-To: References: Message-ID: Apply vtkCleanPolyData first. The triangles in that data have points that are coincindent, but none are actually shared across neighboring edges. Clean will merge the coicident points for you. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jan 3, 2017 at 10:22 AM, Mohammadreza Babaee wrote: > Hi > > > I have a vtp file that contains a polydata. I want to extract its > connected component. However, when I use* vtkPolyDataConnectivityFilter**, > *and read the number of regions, it shows that the it is equal to the > number of polys. But when I visualize the file I see that there are > actually 4 regions. > > I use SetExtractionModeToAllRegions to read the number of regions. > I have attached the file. Can you please help me to understand what the > problem is > > So here is my code > > vtkSmartPointer connectivityFilter = > vtkSmartPointer::New(); > connectivityFilter->SetInputData(poly_in); > connectivityFilter->ScalarConnectivityOn(); > > connectivityFilter->SetExtractionModeToAllRegions(); > > connectivityFilter->Update(); > int nbregions = connectivityFilter->GetNumberOfExtractedRegions(); > > cout << "Number of Extracted Regions are=" << nbregions << endl; > > Thanks > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bakkari.abdelkhalek at hotmail.fr Tue Jan 3 10:40:20 2017 From: bakkari.abdelkhalek at hotmail.fr (Abdelkhalek Bakkari) Date: Tue, 3 Jan 2017 15:40:20 +0000 Subject: [vtkusers] VTK Widget Contour example applied to a binary image In-Reply-To: References: Message-ID: Hi !, I'm working on vtkContourWidget example with a .mha 2D binary image and I have one question : How can I apply that example (attached file ) to my contour-1.mha image (attached file) ? Thank you in advance. Kind regards, Abdelkhalek Bakkari -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ContourWidget.cxx URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: contour-1.mha Type: application/octet-stream Size: 262317 bytes Desc: contour-1.mha URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From leonid.gluhovsky at gmail.com Tue Jan 3 12:46:01 2017 From: leonid.gluhovsky at gmail.com (leonid) Date: Tue, 3 Jan 2017 10:46:01 -0700 (MST) Subject: [vtkusers] vtkLight inside an opaque polydata object Message-ID: <1483465561650-5741679.post@n5.nabble.com> Hello, I have a polydata object which is watertight, i.e. it fully encloses a 3D region. I make it opaque since I don't want its back wall to be seen on the screen. I would like to place a positional vtkLight inside the region enclosed by the polydata, and control its direction and position programmatically to highlight the region of interest for the user. (The cone angle I have in mind is about 5 degrees, and the shape of polydata is complicated - it's definitely not convex). It appears that since the polydata object is opaque, this highlighting cannot be seen when viewing the polydata object from outside. How can I get the highlighted region to be visible when viewing from outside? Many thanks, leonid -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkLight-inside-an-opaque-polydata-object-tp5741679.html Sent from the VTK - Users mailing list archive at Nabble.com. From kit.chambers.kc at gmail.com Wed Jan 4 07:56:06 2017 From: kit.chambers.kc at gmail.com (Kit Chambers) Date: Wed, 4 Jan 2017 12:56:06 +0000 Subject: [vtkusers] SetInputData and extents Message-ID: Hi All, I have a custom datatype (myType) derived from vtkImageData and a custom filter derived from vtkImageAlgorithm. The filter takes input on two ports which are both myType objects with different sizes. So in principle I should be able to set these inputs using either SetInputData() or SetInputConnection() right? However, when I run the filter I get errors like: ERROR: In ?. /vtk/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx, line 857 vtkStreamingDemandDrivenPipeline (0x7fc6fa444a00): The update extent specified in the information for output port 0 on algorithm vtkTrivialProducer(0x7fc6fa4444a0) is 0 31 0 0 0 0, which is outside the whole extent 0 5 0 0 0 0. ERROR: In ?. /vtk/src/vtk/Common/ExecutionModel/vtkTrivialProducer.cxx, line 264 vtkTrivialProducer (0x7fc6fa4444a0): This data object does not contain the requested extent. Any suggestions? Is there something I am missing here? Kit From mrezababaee at gmail.com Wed Jan 4 10:41:35 2017 From: mrezababaee at gmail.com (Mohammadreza Babaee) Date: Wed, 4 Jan 2017 16:41:35 +0100 Subject: [vtkusers] Mesh Texture Message-ID: Dear All, I have a Polydata and after cleaning I get a new mesh but the texture of the me sh is corrupted. I guess the problem comes the fact that the points are merged. Do you have any Idea how to apply vtkCleanpolydata to the VtkPoly data without corrupting the texture. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Wed Jan 4 12:25:41 2017 From: luis.vieira at vektore.com (Luis Vieira) Date: Wed, 4 Jan 2017 12:25:41 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR Message-ID: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> Hello vtkusers, I am trying to compile my VTK 7.1 against OpenVR following the documentation: https://blog.kitware.com/using-virtual-reality-devices-with-vtk/ I got all modules SDL2/ Oculus Windows SDK/ OpenVR SDK and master branch of VTK from the VTK respository . I had used CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as well my VTK 7.0, VTK 6.3. The point is, every time I am trying do build the libraries by compiling my VTK.sln within Visual Studio I got the following errors: Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx 709 1 vtkRenderingOpenVR Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 1 vtkRenderingOpenVR Somebody knows what it means? I mean somebody have been struggling with the same situation? Thank you for any help. Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed Jan 4 12:41:52 2017 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 4 Jan 2017 12:41:52 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> Message-ID: They changed the signature on a couple functions in a recent SDK update. I have the changes at home and I'll push a topic soon to update it. If you look at the OpenVR SDK header files you can see the new signature change, it is a pretty easy fix. I'll try to remember to email the diffs tonight when I get home. On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira wrote: > Hello vtkusers, > > > > I am trying to compile my VTK 7.1 against OpenVR following the > documentation: https://blog.kitware.com/using-virtual-reality-devices- > with-vtk/ > > I got all modules SDL2 / Oculus > Windows SDK / OpenVR > SDK and master branch of VTK > from the VTK respository . I had used > CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as > well my VTK 7.0, VTK 6.3. > > > > The point is, every time I am trying do build the libraries by compiling > my VTK.sln within Visual Studio I got the following errors: > > > > Error 871 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx > 108 1 vtkRenderingOpenVR > > Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : > function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindow.cxx 709 1 > vtkRenderingOpenVR > > > > Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : > function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 > 1 vtkRenderingOpenVR > > > > Somebody knows what it means? I mean somebody have been struggling with > the same situation? > > > > Thank you for any help. > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Wed Jan 4 12:59:04 2017 From: luis.vieira at vektore.com (Luis Vieira) Date: Wed, 4 Jan 2017 12:59:04 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> Message-ID: <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> Hi Ken, I got some things regarding 'API_OpenGL' to TextureType_OpenGL within OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor I am looking forward to hearing from you soon. Tks, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com] Sent: January 4, 2017 12:42 PM To: Luis Vieira Cc: VTK Users Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR They changed the signature on a couple functions in a recent SDK update. I have the changes at home and I'll push a topic soon to update it. If you look at the OpenVR SDK header files you can see the new signature change, it is a pretty easy fix. I'll try to remember to email the diffs tonight when I get home. On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira > wrote: Hello vtkusers, I am trying to compile my VTK 7.1 against OpenVR following the documentation: https://blog.kitware.com/using-virtual-reality-devices-with-vtk/ I got all modules SDL2/ Oculus Windows SDK/ OpenVR SDK and master branch of VTK from the VTK respository . I had used CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as well my VTK 7.0, VTK 6.3. The point is, every time I am trying do build the libraries by compiling my VTK.sln within Visual Studio I got the following errors: Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx 709 1 vtkRenderingOpenVR Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 1 vtkRenderingOpenVR Somebody knows what it means? I mean somebody have been struggling with the same situation? Thank you for any help. Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/ joaoluisvieira luis.vieira at vektore.com www.vektore.com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Wed Jan 4 14:06:07 2017 From: david.lonie at kitware.com (David Lonie) Date: Wed, 4 Jan 2017 14:06:07 -0500 Subject: [vtkusers] update,interact and render in different threads In-Reply-To: References: Message-ID: It can be done, but you'll need to keep all of the input data / pipeline logic in a background thread, and all of the renderable polydata / mapper / actor stuff in a rendering thread, and then synchronize the threads to copy the data from the background -> rendering thread after an update completes. This will let you interact with the scene while data is being recomputed. On Wed, Dec 28, 2016 at 11:59 AM, Antonio Fortino wrote: > Hello to everyone, > > I'm trying to develop a simple example that update the celldata of a > polydata in a thread while rendering in the main thread. > My final goal is to interact with the scene, and pause the updates. > > To archive this i'm using a simple mutex and a boolean. > However it seams that i'm trying to access the render for two different > threads, and the mutex isn't enough, because when interacting with the > scene errors like the one below appears, and at random the program stops > with a segmentation. > > vtkOpenGLPolyDataMapper (0x1b62980): failed after UpdateShader 1 OpenGL > errors detected > > 0 : (1282) Invalid operation > > > I attach the code, any help is very appreciated. > > Best regards > Antonio Fortino > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 cory.quammen at kitware.com Wed Jan 4 15:01:01 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 4 Jan 2017 15:01:01 -0500 Subject: [vtkusers] Create a correct mesh from set of triangles and wrong vertices index numbers In-Reply-To: <1482487360199-5741637.post@n5.nabble.com> References: <1482487360199-5741637.post@n5.nabble.com> Message-ID: On Fri, Dec 23, 2016 at 5:02 AM, gocarlos wrote: > Dear VTK Users > > I have some data sets which have several triangles (set of 3 points with x, > y, z) and vertices. (like the OBJ file). > The problem is that the vertices are just in increasing order and not > ordered. I'm not sure what you mean by "are just in increasing order". Do you mean that each triangle has a unique set of three vertices and the vertices are listed in the order the cells are listed? > Using PCL I've seen that when I save my PCL mesh (with unordered vertices) > into STL, the PCL library converts the PCL mesh in VTK polydata and then a > STL file is written to the file system (using VTK). > > I tried to look in the source code after the method which vtk used to clean > the mesh to reorder the vertices, but I haven't found anything. vtkCleanPolyData would be useful: http://www.vtk.org/doc/nightly/html/classvtkCleanPolyData.html > I'm only interested on how VTK orders the vertices in such a way, that they > are in the right order and the points of the mesh are not duplicate. > Is there a method to clean the mesh/connect the duplicate points/reorder the > vertices index? See this example that does what you want: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/CleanPolyData - Cory > Thanks in advance. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Create-a-correct-mesh-from-set-of-triangles-and-wrong-vertices-index-numbers-tp5741637.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen Staff R&D Engineer Kitware, Inc. From thoniorf at gmail.com Wed Jan 4 16:16:05 2017 From: thoniorf at gmail.com (Antonio Fortino) Date: Wed, 4 Jan 2017 22:16:05 +0100 Subject: [vtkusers] update,interact and render in different threads In-Reply-To: References: Message-ID: Thank you David for your help. So i have to store two copy of my data one for the rendering thread and one for background(worker) thread, right? what if I have a polydata with something like 300 000 cells ? could be a big problem ? Thanks Again Antonio Fortino On Jan 4, 2017 8:06 PM, "David Lonie" wrote: It can be done, but you'll need to keep all of the input data / pipeline logic in a background thread, and all of the renderable polydata / mapper / actor stuff in a rendering thread, and then synchronize the threads to copy the data from the background -> rendering thread after an update completes. This will let you interact with the scene while data is being recomputed. On Wed, Dec 28, 2016 at 11:59 AM, Antonio Fortino wrote: > Hello to everyone, > > I'm trying to develop a simple example that update the celldata of a > polydata in a thread while rendering in the main thread. > My final goal is to interact with the scene, and pause the updates. > > To archive this i'm using a simple mutex and a boolean. > However it seams that i'm trying to access the render for two different > threads, and the mutex isn't enough, because when interacting with the > scene errors like the one below appears, and at random the program stops > with a segmentation. > > vtkOpenGLPolyDataMapper (0x1b62980): failed after UpdateShader 1 OpenGL > errors detected > > 0 : (1282) Invalid operation > > > I attach the code, any help is very appreciated. > > Best regards > Antonio Fortino > > > > > _______________________________________________ > 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: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Wed Jan 4 16:19:32 2017 From: david.lonie at kitware.com (David Lonie) Date: Wed, 4 Jan 2017 16:19:32 -0500 Subject: [vtkusers] update,interact and render in different threads In-Reply-To: References: Message-ID: On Wed, Jan 4, 2017 at 4:16 PM, Antonio Fortino wrote: > Thank you David for your help. > So i have to store two copy of my data one for the rendering thread and > one for background(worker) thread, right? > > what if I have a polydata with something like 300 000 cells ? could be a > big problem ? > You should be able to get away with using a ShallowCopy, which will share the underlying data arrays between the source and target datasets -- that will help keep memory usage feasible. But yes, while it's computing the results you'll need to store the final polydata twice in memory, once for the rendering thread and once for the background thread. Once the background update completes, you can shallowcopy the background dataset into the rendering dataset and then you'll only have a single copy in memory. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed Jan 4 17:11:12 2017 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 4 Jan 2017 17:11:12 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> Message-ID: Here are the diffs https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs Thanks Ken On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira wrote: > Hi Ken, > > > > I got some things regarding 'API_OpenGL' to TextureType_OpenGL within > OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, > vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor > > > > I am looking forward to hearing from you soon. > > > > Tks, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 4, 2017 12:42 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > They changed the signature on a couple functions in a recent SDK update. I > have the changes at home and I'll push a topic soon to update it. If you > look at the OpenVR SDK header files you can see the new signature change, > it is a pretty easy fix. I'll try to remember to email the diffs tonight > when I get home. > > > > On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira > wrote: > > Hello vtkusers, > > > > I am trying to compile my VTK 7.1 against OpenVR following the > documentation: https://blog.kitware.com/using-virtual-reality-devices- > with-vtk/ > > I got all modules SDL2 / Oculus > Windows SDK / OpenVR > SDK and master branch of VTK > from the VTK respository . I had used > CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as > well my VTK 7.0, VTK 6.3. > > > > The point is, every time I am trying do build the libraries by compiling > my VTK.sln within Visual Studio I got the following errors: > > > > Error 871 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx > 108 1 vtkRenderingOpenVR > > Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : > function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindow.cxx 709 1 > vtkRenderingOpenVR > > > > Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : > function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 > 1 vtkRenderingOpenVR > > > > Somebody knows what it means? I mean somebody have been struggling with > the same situation? > > > > Thank you for any help. > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangtao_ at sjtu.edu.cn Thu Jan 5 04:55:03 2017 From: wangtao_ at sjtu.edu.cn (wangtaoiz) Date: Thu, 5 Jan 2017 02:55:03 -0700 (MST) Subject: [vtkusers] How to use vtkImageReslice to get oblique slice with arbitrarily position and direction Message-ID: <1483610103003-5741711.post@n5.nabble.com> Dear all Dose any body know how to use vtkImageReslice to get oblique slice with arbitrarily position and direction? I need to set the position and direction for reslice, and get the slice data, any good idea? Tao Wang Thanks all -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkImageReslice-to-get-oblique-slice-with-arbitrarily-position-and-direction-tp5741711.html Sent from the VTK - Users mailing list archive at Nabble.com. From alessandro.volz at gmail.com Thu Jan 5 05:18:54 2017 From: alessandro.volz at gmail.com (Alessandro Volz) Date: Thu, 5 Jan 2017 11:18:54 +0100 Subject: [vtkusers] How to use vtkImageReslice to get oblique slice with arbitrarily position and direction In-Reply-To: <1483610103003-5741711.post@n5.nabble.com> References: <1483610103003-5741711.post@n5.nabble.com> Message-ID: <279C71BA-0972-4E24-BAB0-2CF01965BE8C@gmail.com> Hi, I just spent a few days figuring out how to do just that :) In my case, the input is a three-dimensional floats blob (a 3D volume) and the output is a two-dimensional floats blob (a 2D slice that I later draw). 1- map your input data to VTK: I'm using an instance of vtkImageImport, but there are many alternatives depending on your input data 2- set up a vtkImageReslice 3- Update() the vtkImageReslice and get the output vtkImageData through GetOutput() The tricky part is setting up the vtkImageReslice: 2a- connect the vtkImageImport output to the vtkImageReslice input 2b- set up the output (scalar type, dimensionality, extent, origin, interpolation mode) 2c- define the reslice axes and origin Your question was mainly on how to define the position and direction of the reslice, so more details on 2c: I ended up setting these on my reslices is by using the vtkImageReslice SetResliceAxes method, basically through an array of 16 values: { xdir.x, ydir.x, zdir.x, origin.x, xdir.y, ydir.y, zdir.y, origin.y, xdir.z, ydir.z, zdir.z, origin.z, 0, 0, 0, 1 } My Obj-C++ code could be useful: https://github.com/spalte/Natural-Image-Building-Blocks/blob/master/NIBuildingBlocks/NIVTKObliqueSliceOperation.mm Best, Alessandro Volz > On Jan 5, 2017, at 10:55 AM, wangtaoiz wrote: > > Dear all > Dose any body know how to use vtkImageReslice to get oblique slice with > arbitrarily position and direction? I need to set the position and direction > for reslice, and get the slice data, any good idea? > > Tao Wang > Thanks all > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkImageReslice-to-get-oblique-slice-with-arbitrarily-position-and-direction-tp5741711.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From cory.quammen at kitware.com Thu Jan 5 09:35:01 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 5 Jan 2017 09:35:01 -0500 Subject: [vtkusers] Mesh Texture In-Reply-To: References: Message-ID: Hi, Please reply-all to keep the conversation on the mailing list so that others may benefit and contribute. I'm not sure what is happening with the texture in the output of the vtkCleanPolyData. Perhaps there are some points in your data that need to remain duplicated so that different texture coordinates can be assigned to each point to avoid undesired texture interpolation. If that's the case, merging coincident points will necessarily pick just one of those texture coordinates and throw away the others, making the texturing look funny. Unfortunately, there is no way to tell vtkCleanPolyData to not merge where a scalar value is different, but that appears to be what you need. If you are going to do this operation only once for the data in the images you sent me (not attached), I would recommend skipping the connectivity filter approach to discard the small bits near the person's shoulders and instead use vtkClipPolyData with, say, a vtkSphere to define the clip function around the head. This can be done without writing code using ParaView if you prefer. HTH, Cory On Thu, Jan 5, 2017 at 5:43 AM, Mohammadreza Babaee wrote: > Hi, > > > So the problem is that I have a mesh with tecture that contains several > small regiosn and I would like to remove them (Please see image1 attached to > this email.). So my appraoch was at the beginning using > vtkconnectivityfileter and use the largest region. However, I needed to > first clean sthe mesh data. The problem is that after using vtkCleanpolydata > in order to clean the mesh and then applying filtering, I get a mesh that > looks strange when I visualize it. (Please see image2) > > So do you have any idea to solve this problem. > > Here is the code > > vtkSmartPointer > meshRemoveSmallMeshes(vtkSmartPointer &poly_in) > { > > vtkSmartPointer connectivityFilter = > vtkSmartPointer::New(); > > vtkSmartPointer Cleaner = > vtkSmartPointer::New(); > > vtkSmartPointer poly_out = > vtkSmartPointer::New(); > > > Cleaner->AddInputData(poly_in); > > Cleaner->Update(); > > > connectivityFilter->SetInputData(Cleaner->GetOutput()); > connectivityFilter->SetExtractionModeToLargestRegion(); > connectivityFilter->Update(); > > poly_out = connectivityFilter->GetOutput(); > > return poly_out; > > } > > > > On Wed, Jan 4, 2017 at 8:09 PM, Cory Quammen > wrote: >> >> Do you expect the merged points to have the same texture coordinates? >> If so, you might be able to use the Resample To Dataset filter to add >> the texture coordinates back to the cleaned polydata. Set the Input of >> the filter to your original polydata and the Source to your cleaned >> polydata. Does that work? >> >> If not, could you post a self-contained code example and small data >> file that shows the problem you are having? >> >> Thanks, >> Cory >> >> On Wed, Jan 4, 2017 at 10:41 AM, Mohammadreza Babaee >> wrote: >> > Dear All, >> > >> > >> > I have a Polydata and after cleaning I get a new mesh but the texture of >> > the >> > me sh is corrupted. I guess the problem comes the fact that the points >> > are >> > merged. Do you have any Idea how to apply vtkCleanpolydata to the >> > VtkPoly >> > data without corrupting the texture. >> > >> > >> > Thanks >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. > > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From luis.vieira at vektore.com Thu Jan 5 21:00:08 2017 From: luis.vieira at vektore.com (Luis Vieira) Date: Thu, 5 Jan 2017 21:00:08 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> Message-ID: <03D2D558-97B8-4685-8DAB-B0420D27433D@vektore.com> Thanks Ken, I will let you know about the results. Luis. Sent from my iPhone > On Jan 4, 2017, at 5:11 PM, Ken Martin wrote: > > Here are the diffs > > https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs > > Thanks > Ken > >> On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira wrote: >> Hi Ken, >> >> >> >> I got some things regarding 'API_OpenGL' to TextureType_OpenGL within OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor >> >> >> >> I am looking forward to hearing from you soon. >> >> >> >> Tks, >> >> >> >> Luis Vieira, >> >> Consultant, Software Engineer >> >> Vektore Exploration Consulting Corporation >> >> ca.linkedin.com/in/joaoluisvieira >> >> luis.vieira at vektore.com >> >> www.vektore.com >> >> >> >> From: Ken Martin [mailto:ken.martin at kitware.com] >> Sent: January 4, 2017 12:42 PM >> To: Luis Vieira >> Cc: VTK Users >> Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR >> >> >> >> They changed the signature on a couple functions in a recent SDK update. I have the changes at home and I'll push a topic soon to update it. If you look at the OpenVR SDK header files you can see the new signature change, it is a pretty easy fix. I'll try to remember to email the diffs tonight when I get home. >> >> >> >> On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira wrote: >> >> Hello vtkusers, >> >> >> >> I am trying to compile my VTK 7.1 against OpenVR following the documentation: https://blog.kitware.com/using-virtual-reality-devices-with-vtk/ >> >> I got all modules SDL2/ Oculus Windows SDK/ OpenVR SDK and master branch of VTK from the VTK respository . I had used CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as well my VTK 7.0, VTK 6.3. >> >> >> >> The point is, every time I am trying do build the libraries by compiling my VTK.sln within Visual Studio I got the following errors: >> >> >> >> Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR >> >> Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx 709 1 vtkRenderingOpenVR >> >> >> >> Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 1 vtkRenderingOpenVR >> >> >> >> Somebody knows what it means? I mean somebody have been struggling with the same situation? >> >> >> >> Thank you for any help. >> >> >> >> Luis Vieira, >> >> Consultant, Software Engineer >> >> Vektore Exploration Consulting Corporation >> >> ca.linkedin.com/in/joaoluisvieira >> >> luis.vieira at vektore.com >> >> www.vektore.com >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> >> >> -- >> >> Ken Martin PhD >> >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 >> >> >> >> This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. >> > > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wangtao_ at sjtu.edu.cn Fri Jan 6 01:57:52 2017 From: wangtao_ at sjtu.edu.cn (wangtaoiz) Date: Thu, 5 Jan 2017 23:57:52 -0700 (MST) Subject: [vtkusers] How to use vtkImageReslice to get oblique slice with arbitrarily position and direction In-Reply-To: <279C71BA-0972-4E24-BAB0-2CF01965BE8C@gmail.com> References: <1483610103003-5741711.post@n5.nabble.com> <279C71BA-0972-4E24-BAB0-2CF01965BE8C@gmail.com> Message-ID: <1483685872051-5741718.post@n5.nabble.com> Thinks for your good advice! Now I can set the correct transform for my desired plane. But there comes another problem, the resliced image is not well centered and aligned, is there some good ways to deal with these? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkImageReslice-to-get-oblique-slice-with-arbitrarily-position-and-direction-tp5741711p5741718.html Sent from the VTK - Users mailing list archive at Nabble.com. From alessandro.volz at gmail.com Fri Jan 6 02:31:36 2017 From: alessandro.volz at gmail.com (Alessandro Volz) Date: Fri, 6 Jan 2017 08:31:36 +0100 Subject: [vtkusers] How to use vtkImageReslice to get oblique slice with arbitrarily position and direction In-Reply-To: <1483685872051-5741718.post@n5.nabble.com> References: <1483610103003-5741711.post@n5.nabble.com> <279C71BA-0972-4E24-BAB0-2CF01965BE8C@gmail.com> <1483685872051-5741718.post@n5.nabble.com> Message-ID: <8813E62B-8483-4DF1-8210-ACEE4C57822C@gmail.com> When that happened to me, I fixed it with reslice->SetOutputOrigin(0, 0, 0). Without that, VTK somehow cropped the output. If you've already set the output origin to 0,0,0, then you have to compute a better origin to pass in the ResliceAxes. In my code, to determine the origin I apply my outputSliceToInputVoxelTransform to a 0,0,0 vector, and it just works. > On Jan 6, 2017, at 7:57 AM, wangtaoiz wrote: > > Thinks for your good advice! Now I can set the correct transform for my > desired plane. But there comes another problem, the resliced image is not > well centered and aligned, is there some good ways to deal with these? > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkImageReslice-to-get-oblique-slice-with-arbitrarily-position-and-direction-tp5741711p5741718.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From luis.vieira at vektore.com Fri Jan 6 12:00:34 2017 From: luis.vieira at vektore.com (Luis Vieira) Date: Fri, 6 Jan 2017 12:00:34 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> Message-ID: <001101d2683e$6712c4b0$35384e10$@vektore.com> Hi Ken, Have you figured out some update regarding the following error? Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com] Sent: January 4, 2017 5:11 PM To: Luis Vieira Cc: VTK Users Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR Here are the diffs https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs Thanks Ken On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira > wrote: Hi Ken, I got some things regarding 'API_OpenGL' to TextureType_OpenGL within OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor I am looking forward to hearing from you soon. Tks, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/ joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com ] Sent: January 4, 2017 12:42 PM To: Luis Vieira > Cc: VTK Users > Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR They changed the signature on a couple functions in a recent SDK update. I have the changes at home and I'll push a topic soon to update it. If you look at the OpenVR SDK header files you can see the new signature change, it is a pretty easy fix. I'll try to remember to email the diffs tonight when I get home. On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira > wrote: Hello vtkusers, I am trying to compile my VTK 7.1 against OpenVR following the documentation: https://blog.kitware.com/using-virtual-reality-devices-with-vtk/ I got all modules SDL2/ Oculus Windows SDK/ OpenVR SDK and master branch of VTK from the VTK respository . I had used CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as well my VTK 7.0, VTK 6.3. The point is, every time I am trying do build the libraries by compiling my VTK.sln within Visual Studio I got the following errors: Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx 709 1 vtkRenderingOpenVR Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 1 vtkRenderingOpenVR Somebody knows what it means? I mean somebody have been struggling with the same situation? Thank you for any help. Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/ joaoluisvieira luis.vieira at vektore.com www.vektore.com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Jan 6 12:03:16 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 Jan 2017 12:03:16 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: <001101d2683e$6712c4b0$35384e10$@vektore.com> References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> <001101d2683e$6712c4b0$35384e10$@vektore.com> Message-ID: I'm not getting that error. With the diffs I posted it is compiling OK. What SDK version are you using? On Fri, Jan 6, 2017 at 12:00 PM, Luis Vieira wrote: > Hi Ken, > > > > Have you figured out some update regarding the following error? > > > > Error 871 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx > 108 1 vtkRenderingOpenVR > > Thank you, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 4, 2017 5:11 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > Here are the diffs > > > > https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs > > > > Thanks > > Ken > > > > On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira > wrote: > > Hi Ken, > > > > I got some things regarding 'API_OpenGL' to TextureType_OpenGL within > OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, > vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor > > > > I am looking forward to hearing from you soon. > > > > Tks, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 4, 2017 12:42 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > They changed the signature on a couple functions in a recent SDK update. I > have the changes at home and I'll push a topic soon to update it. If you > look at the OpenVR SDK header files you can see the new signature change, > it is a pretty easy fix. I'll try to remember to email the diffs tonight > when I get home. > > > > On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira > wrote: > > Hello vtkusers, > > > > I am trying to compile my VTK 7.1 against OpenVR following the > documentation: https://blog.kitware.com/using-virtual-reality-devices- > with-vtk/ > > I got all modules SDL2 / Oculus > Windows SDK / OpenVR > SDK and master branch of VTK > from the VTK respository . I had used > CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as > well my VTK 7.0, VTK 6.3. > > > > The point is, every time I am trying do build the libraries by compiling > my VTK.sln within Visual Studio I got the following errors: > > > > Error 871 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx > 108 1 vtkRenderingOpenVR > > Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : > function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindow.cxx 709 1 > vtkRenderingOpenVR > > > > Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : > function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 > 1 vtkRenderingOpenVR > > > > Somebody knows what it means? I mean somebody have been struggling with > the same situation? > > > > Thank you for any help. > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Fri Jan 6 13:06:14 2017 From: luis.vieira at vektore.com (Luis Vieira) Date: Fri, 6 Jan 2017 13:06:14 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> <001101d2683e$6712c4b0$35384e10$@vektore.com> Message-ID: <22f001d26847$922b3e80$b681bb80$@vektore.com> Hi Ken, Error 175 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx 670 1 vtkRenderingOpenVR Lines 670 and 672 I had downloaded the packages following (https://blog.kitware.com/using-virtual-reality-devices-with-vtk/) https://github.com/ValveSoftware/openvr ( OpenVR SDK 1.0.5) https://github.com/Kitware/VTK (master branch of VTK from the VTK respository on GitHub) Please, see attached vtkOpenVRRenderWindow. Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com] Sent: January 6, 2017 12:03 PM To: Luis Vieira Cc: VTK Users Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR I'm not getting that error. With the diffs I posted it is compiling OK. What SDK version are you using? On Fri, Jan 6, 2017 at 12:00 PM, Luis Vieira > wrote: Hi Ken, Have you figured out some update regarding the following error? Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/ joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com ] Sent: January 4, 2017 5:11 PM To: Luis Vieira > Cc: VTK Users > Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR Here are the diffs https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs Thanks Ken On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira > wrote: Hi Ken, I got some things regarding 'API_OpenGL' to TextureType_OpenGL within OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor I am looking forward to hearing from you soon. Tks, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/ joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com ] Sent: January 4, 2017 12:42 PM To: Luis Vieira > Cc: VTK Users > Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR They changed the signature on a couple functions in a recent SDK update. I have the changes at home and I'll push a topic soon to update it. If you look at the OpenVR SDK header files you can see the new signature change, it is a pretty easy fix. I'll try to remember to email the diffs tonight when I get home. On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira wrote: Hello vtkusers, I am trying to compile my VTK 7.1 against OpenVR following the documentation: https://blog.kitware.com/using-virtual-reality-devices-with-vtk/ I got all modules SDL2/ Oculus Windows SDK/ OpenVR SDK and master branch of VTK from the VTK respository . I had used CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as well my VTK 7.0, VTK 6.3. The point is, every time I am trying do build the libraries by compiling my VTK.sln within Visual Studio I got the following errors: Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx 709 1 vtkRenderingOpenVR Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 1 vtkRenderingOpenVR Somebody knows what it means? I mean somebody have been struggling with the same situation? Thank you for any help. Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/ joaoluisvieira luis.vieira at vektore.com www.vektore.com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vtkOpenVRRenderWindow.cxx URL: From ken.martin at kitware.com Fri Jan 6 13:14:46 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 Jan 2017 13:14:46 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: <22f001d26847$922b3e80$b681bb80$@vektore.com> References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> <001101d2683e$6712c4b0$35384e10$@vektore.com> <22f001d26847$922b3e80$b681bb80$@vektore.com> Message-ID: I just googled it, try what that guy did, I am probably on 1.0.4. I'll try 1.0.5 this weekend. https://github.com/ValveSoftware/openvr/issues/335 On Fri, Jan 6, 2017 at 1:06 PM, Luis Vieira wrote: > Hi Ken, > > > > Error 175 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindow.cxx 670 1 > vtkRenderingOpenVR > > > > Lines 670 and 672 > > > > I had downloaded the packages following (https://blog.kitware.com/ > using-virtual-reality-devices-with-vtk/) > > https://github.com/ValveSoftware/openvr (*OpenVR SDK 1.0.5 > )* > > https://github.com/Kitware/VTK (*master branch of VTK from the VTK > respository * *on GitHub*) > > > > Please, see attached vtkOpenVRRenderWindow. > > > > Thank you, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 6, 2017 12:03 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > I'm not getting that error. With the diffs I posted it is compiling OK. > What SDK version are you using? > > > > On Fri, Jan 6, 2017 at 12:00 PM, Luis Vieira > wrote: > > Hi Ken, > > > > Have you figured out some update regarding the following error? > > > > Error 871 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx > 108 1 vtkRenderingOpenVR > > Thank you, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 4, 2017 5:11 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > Here are the diffs > > > > https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs > > > > Thanks > > Ken > > > > On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira > wrote: > > Hi Ken, > > > > I got some things regarding 'API_OpenGL' to TextureType_OpenGL within > OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, > vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor > > > > I am looking forward to hearing from you soon. > > > > Tks, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 4, 2017 12:42 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > They changed the signature on a couple functions in a recent SDK update. I > have the changes at home and I'll push a topic soon to update it. If you > look at the OpenVR SDK header files you can see the new signature change, > it is a pretty easy fix. I'll try to remember to email the diffs tonight > when I get home. > > > > On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira > wrote: > > Hello vtkusers, > > > > I am trying to compile my VTK 7.1 against OpenVR following the > documentation: https://blog.kitware.com/using-virtual-reality-devices- > with-vtk/ > > I got all modules SDL2 / Oculus > Windows SDK / OpenVR > SDK and master branch of VTK > from the VTK respository . I had used > CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as > well my VTK 7.0, VTK 6.3. > > > > The point is, every time I am trying do build the libraries by compiling > my VTK.sln within Visual Studio I got the following errors: > > > > Error 871 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx > 108 1 vtkRenderingOpenVR > > Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : > function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindow.cxx 709 1 > vtkRenderingOpenVR > > > > Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : > function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 > 1 vtkRenderingOpenVR > > > > Somebody knows what it means? I mean somebody have been struggling with > the same situation? > > > > Thank you for any help. > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Jan 6 16:16:31 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 Jan 2017 16:16:31 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> <001101d2683e$6712c4b0$35384e10$@vektore.com> <22f001d26847$922b3e80$b681bb80$@vektore.com> Message-ID: OK I downloaded openvr 1.0.5 and made a couple more fixes. Just tested it and it all builds and runs. I merged it into master so you should be able to download an updated master and compile. Thanks Ken On Fri, Jan 6, 2017 at 1:14 PM, Ken Martin wrote: > I just googled it, try what that guy did, I am probably on 1.0.4. I'll try > 1.0.5 this weekend. > > https://github.com/ValveSoftware/openvr/issues/335 > > > > On Fri, Jan 6, 2017 at 1:06 PM, Luis Vieira > wrote: > >> Hi Ken, >> >> >> >> Error 175 error C2039: 'API_OpenGL' : is not a member of >> 'vr' C:\VTK\VTK-7.1.0VR\Rendering\O >> penVR\vtkOpenVRRenderWindow.cxx 670 1 >> vtkRenderingOpenVR >> >> >> >> Lines 670 and 672 >> >> >> >> I had downloaded the packages following (https://blog.kitware.com/usi >> ng-virtual-reality-devices-with-vtk/) >> >> https://github.com/ValveSoftware/openvr (*OpenVR SDK 1.0.5 >> )* >> >> https://github.com/Kitware/VTK (*master branch of VTK from the VTK >> respository * *on GitHub*) >> >> >> >> Please, see attached vtkOpenVRRenderWindow. >> >> >> >> Thank you, >> >> >> >> *Luis Vieira*, >> >> Consultant, Software Engineer >> >> Vektore Exploration Consulting Corporation >> >> ca.linkedin.com/in/joaoluisvieira >> >> luis.vieira at vektore.com >> >> www.vektore.com >> >> >> >> *From:* Ken Martin [mailto:ken.martin at kitware.com] >> *Sent:* January 6, 2017 12:03 PM >> *To:* Luis Vieira >> *Cc:* VTK Users >> *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR >> >> >> >> I'm not getting that error. With the diffs I posted it is compiling OK. >> What SDK version are you using? >> >> >> >> On Fri, Jan 6, 2017 at 12:00 PM, Luis Vieira >> wrote: >> >> Hi Ken, >> >> >> >> Have you figured out some update regarding the following error? >> >> >> >> Error 871 error C2039: 'API_OpenGL' : is not a member of >> 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx >> 108 1 vtkRenderingOpenVR >> >> Thank you, >> >> >> >> *Luis Vieira*, >> >> Consultant, Software Engineer >> >> Vektore Exploration Consulting Corporation >> >> ca.linkedin.com/in/joaoluisvieira >> >> luis.vieira at vektore.com >> >> www.vektore.com >> >> >> >> *From:* Ken Martin [mailto:ken.martin at kitware.com] >> *Sent:* January 4, 2017 5:11 PM >> *To:* Luis Vieira >> *Cc:* VTK Users >> *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR >> >> >> >> Here are the diffs >> >> >> >> https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs >> >> >> >> Thanks >> >> Ken >> >> >> >> On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira >> wrote: >> >> Hi Ken, >> >> >> >> I got some things regarding 'API_OpenGL' to TextureType_OpenGL within >> OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, >> vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor >> >> >> >> I am looking forward to hearing from you soon. >> >> >> >> Tks, >> >> >> >> *Luis Vieira*, >> >> Consultant, Software Engineer >> >> Vektore Exploration Consulting Corporation >> >> ca.linkedin.com/in/joaoluisvieira >> >> luis.vieira at vektore.com >> >> www.vektore.com >> >> >> >> *From:* Ken Martin [mailto:ken.martin at kitware.com] >> *Sent:* January 4, 2017 12:42 PM >> *To:* Luis Vieira >> *Cc:* VTK Users >> *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR >> >> >> >> They changed the signature on a couple functions in a recent SDK update. >> I have the changes at home and I'll push a topic soon to update it. If you >> look at the OpenVR SDK header files you can see the new signature change, >> it is a pretty easy fix. I'll try to remember to email the diffs tonight >> when I get home. >> >> >> >> On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira >> wrote: >> >> Hello vtkusers, >> >> >> >> I am trying to compile my VTK 7.1 against OpenVR following the >> documentation: https://blog.kitware.com/using >> -virtual-reality-devices-with-vtk/ >> >> I got all modules SDL2 / Oculus >> Windows SDK / OpenVR >> SDK and master branch of VTK >> from the VTK respository . I had used >> CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as >> well my VTK 7.0, VTK 6.3. >> >> >> >> The point is, every time I am trying do build the libraries by compiling >> my VTK.sln within Visual Studio I got the following errors: >> >> >> >> Error 871 error C2039: 'API_OpenGL' : is not a member of >> 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx >> 108 1 vtkRenderingOpenVR >> >> Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : >> function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\O >> penVR\vtkOpenVRRenderWindow.cxx 709 1 >> vtkRenderingOpenVR >> >> >> >> Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : >> function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\O >> penVR\vtkOpenVRRenderWindowInteractor.cxx 126 >> 1 vtkRenderingOpenVR >> >> >> >> Somebody knows what it means? I mean somebody have been struggling with >> the same situation? >> >> >> >> Thank you for any help. >> >> >> >> *Luis Vieira*, >> >> Consultant, Software Engineer >> >> Vektore Exploration Consulting Corporation >> >> ca.linkedin.com/in/joaoluisvieira >> >> luis.vieira at vektore.com >> >> www.vektore.com >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> >> >> -- >> >> Ken Martin PhD >> >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 <(518)%20371-3971> >> >> >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> >> >> >> >> >> -- >> >> Ken Martin PhD >> >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 <(518)%20371-3971> >> >> >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> >> >> >> >> >> -- >> >> Ken Martin PhD >> >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 <(518)%20371-3971> >> >> >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Fri Jan 6 17:24:18 2017 From: luis.vieira at vektore.com (Luis Vieira) Date: Fri, 6 Jan 2017 17:24:18 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> <001101d2683e$6712c4b0$35384e10$@vektore.com> <22f001d26847$922b3e80$b681bb80$@vektore.com> Message-ID: <71a001d2686b$9fbb5750$df3205f0$@vektore.com> Hi Ken, Do you meant https://github.com/Kitware/VTK ? Thanks, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com] Sent: January 6, 2017 4:17 PM To: Luis Vieira Cc: VTK Users Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR OK I downloaded openvr 1.0.5 and made a couple more fixes. Just tested it and it all builds and runs. I merged it into master so you should be able to download an updated master and compile. Thanks Ken On Fri, Jan 6, 2017 at 1:14 PM, Ken Martin > wrote: I just googled it, try what that guy did, I am probably on 1.0.4. I'll try 1.0.5 this weekend. https://github.com/ValveSoftware/openvr/issues/335 On Fri, Jan 6, 2017 at 1:06 PM, Luis Vieira > wrote: Hi Ken, Error 175 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx 670 1 vtkRenderingOpenVR Lines 670 and 672 I had downloaded the packages following (https://blog.kitware.com/using-virtual-reality-devices-with-vtk/) https://github.com/ValveSoftware/openvr ( OpenVR SDK 1.0.5) https://github.com/Kitware/VTK (master branch of VTK from the VTK respository on GitHub) Please, see attached vtkOpenVRRenderWindow. Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/ joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com ] Sent: January 6, 2017 12:03 PM To: Luis Vieira > Cc: VTK Users > Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR I'm not getting that error. With the diffs I posted it is compiling OK. What SDK version are you using? On Fri, Jan 6, 2017 at 12:00 PM, Luis Vieira > wrote: Hi Ken, Have you figured out some update regarding the following error? Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/ joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com ] Sent: January 4, 2017 5:11 PM To: Luis Vieira > Cc: VTK Users > Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR Here are the diffs https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs Thanks Ken On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira > wrote: Hi Ken, I got some things regarding 'API_OpenGL' to TextureType_OpenGL within OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor I am looking forward to hearing from you soon. Tks, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com ] Sent: January 4, 2017 12:42 PM To: Luis Vieira > Cc: VTK Users > Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR They changed the signature on a couple functions in a recent SDK update. I have the changes at home and I'll push a topic soon to update it. If you look at the OpenVR SDK header files you can see the new signature change, it is a pretty easy fix. I'll try to remember to email the diffs tonight when I get home. On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira > wrote: Hello vtkusers, I am trying to compile my VTK 7.1 against OpenVR following the documentation: https://blog.kitware.com/using-virtual-reality-devices-with-vtk/ I got all modules SDL2/ Oculus Windows SDK/ OpenVR SDK and master branch of VTK from the VTK respository . I had used CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as well my VTK 7.0, VTK 6.3. The point is, every time I am trying do build the libraries by compiling my VTK.sln within Visual Studio I got the following errors: Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx 709 1 vtkRenderingOpenVR Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 1 vtkRenderingOpenVR Somebody knows what it means? I mean somebody have been struggling with the same situation? Thank you for any help. Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/ joaoluisvieira luis.vieira at vektore.com www.vektore.com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jan 6 17:29:28 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 6 Jan 2017 15:29:28 -0700 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: <71a001d2686b$9fbb5750$df3205f0$@vektore.com> References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> <001101d2683e$6712c4b0$35384e10$@vektore.com> <22f001d26847$922b3e80$b681bb80$@vektore.com> <71a001d2686b$9fbb5750$df3205f0$@vektore.com> Message-ID: On Fri, Jan 6, 2017 at 3:24 PM, Luis Vieira wrote: > > > > Do you meant https://github.com/Kitware/VTK ? > Official repository is hosted by Kitware itself, Github is just a mirror. Use this: https://gitlab.kitware.com/vtk/vtk - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Jan 6 17:40:18 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 Jan 2017 17:40:18 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: <71a001d2686b$9fbb5750$df3205f0$@vektore.com> References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> <001101d2683e$6712c4b0$35384e10$@vektore.com> <22f001d26847$922b3e80$b681bb80$@vektore.com> <71a001d2686b$9fbb5750$df3205f0$@vektore.com> Message-ID: Yup - Ken On Fri, Jan 6, 2017 at 5:24 PM, Luis Vieira wrote: > Hi Ken, > > > > Do you meant https://github.com/Kitware/VTK ? > > > > Thanks, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 6, 2017 4:17 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > OK I downloaded openvr 1.0.5 and made a couple more fixes. Just tested it > and it all builds and runs. I merged it into master so you should be able > to download an updated master and compile. > > > > Thanks > > Ken > > > > > > On Fri, Jan 6, 2017 at 1:14 PM, Ken Martin wrote: > > I just googled it, try what that guy did, I am probably on 1.0.4. I'll try > 1.0.5 this weekend. > > > > https://github.com/ValveSoftware/openvr/issues/335 > > > > > > > > On Fri, Jan 6, 2017 at 1:06 PM, Luis Vieira > wrote: > > Hi Ken, > > > > Error 175 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindow.cxx 670 1 > vtkRenderingOpenVR > > > > Lines 670 and 672 > > > > I had downloaded the packages following (https://blog.kitware.com/ > using-virtual-reality-devices-with-vtk/) > > https://github.com/ValveSoftware/openvr (*OpenVR SDK 1.0.5 > )* > > https://github.com/Kitware/VTK (*master branch of VTK from the VTK > respository * *on GitHub*) > > > > Please, see attached vtkOpenVRRenderWindow. > > > > Thank you, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 6, 2017 12:03 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > I'm not getting that error. With the diffs I posted it is compiling OK. > What SDK version are you using? > > > > On Fri, Jan 6, 2017 at 12:00 PM, Luis Vieira > wrote: > > Hi Ken, > > > > Have you figured out some update regarding the following error? > > > > Error 871 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx > 108 1 vtkRenderingOpenVR > > Thank you, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 4, 2017 5:11 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > Here are the diffs > > > > https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs > > > > Thanks > > Ken > > > > On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira > wrote: > > Hi Ken, > > > > I got some things regarding 'API_OpenGL' to TextureType_OpenGL within > OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, > vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor > > > > I am looking forward to hearing from you soon. > > > > Tks, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 4, 2017 12:42 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > They changed the signature on a couple functions in a recent SDK update. I > have the changes at home and I'll push a topic soon to update it. If you > look at the OpenVR SDK header files you can see the new signature change, > it is a pretty easy fix. I'll try to remember to email the diffs tonight > when I get home. > > > > On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira > wrote: > > Hello vtkusers, > > > > I am trying to compile my VTK 7.1 against OpenVR following the > documentation: https://blog.kitware.com/using-virtual-reality-devices- > with-vtk/ > > I got all modules SDL2 / Oculus > Windows SDK / OpenVR > SDK and master branch of VTK > from the VTK respository . I had used > CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as > well my VTK 7.0, VTK 6.3. > > > > The point is, every time I am trying do build the libraries by compiling > my VTK.sln within Visual Studio I got the following errors: > > > > Error 871 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx > 108 1 vtkRenderingOpenVR > > Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : > function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindow.cxx 709 1 > vtkRenderingOpenVR > > > > Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : > function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 > 1 vtkRenderingOpenVR > > > > Somebody knows what it means? I mean somebody have been struggling with > the same situation? > > > > Thank you for any help. > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Jan 6 17:40:49 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 Jan 2017 17:40:49 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> <001101d2683e$6712c4b0$35384e10$@vektore.com> <22f001d26847$922b3e80$b681bb80$@vektore.com> <71a001d2686b$9fbb5750$df3205f0$@vektore.com> Message-ID: Oops , yeh that - :-) On Fri, Jan 6, 2017 at 5:29 PM, David Gobbi wrote: > On Fri, Jan 6, 2017 at 3:24 PM, Luis Vieira > wrote: >> >> >> >> Do you meant https://github.com/Kitware/VTK ? >> > > Official repository is hosted by Kitware itself, Github is just a mirror. > Use this: > > https://gitlab.kitware.com/vtk/vtk > > - David > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From luis.vieira at vektore.com Fri Jan 6 17:52:00 2017 From: luis.vieira at vektore.com (Luis Vieira) Date: Fri, 6 Jan 2017 17:52:00 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> <001101d2683e$6712c4b0$35384e10$@vektore.com> <22f001d26847$922b3e80$b681bb80$@vektore.com> Message-ID: <834f01d2686f$7e6718b0$7b354a10$@vektore.com> Hi Ken, David Thanks, once again. Do you guys have any suggestions regarding Oculus SDK version. Because, I am compiling vtkRenderingOculus against Oculus SDK for Windows V1.10.1 and I have similar issues as well as vtkOpenVR?. vtkRenderingOculus vs Oculus Error 915 error LNK2019: unresolved external symbol ovr_CalcEyePoses referenced in function "public: void __cdecl vtkOculusRenderWindow::UpdateHMDMatrixPose(void)" (?UpdateHMDMatrixPose at vtkOculusRenderWindow@@QEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 910 error LNK2019: unresolved external symbol ovr_CommitTextureSwapChain referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Frame(void)" (?Frame at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 915 error LNK2019: unresolved external symbol ovr_CalcEyePoses referenced in function "public: void __cdecl vtkOculusRenderWindow::UpdateHMDMatrixPose(void)" (?UpdateHMDMatrixPose at vtkOculusRenderWindow@@QEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 910 error LNK2019: unresolved external symbol ovr_CommitTextureSwapChain referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Frame(void)" (?Frame at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 905 error LNK2019: unresolved external symbol ovr_Create referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 916 error LNK2019: unresolved external symbol ovr_CreateTextureSwapChainGL referenced in function "protected: bool __cdecl vtkOculusRenderWindow::CreateFrameBuffer(struct vtkOculusRenderWindow::FramebufferDesc &)" (?CreateFrameBuffer at vtkOculusRenderWindow@@IEAA_NAEAUFramebufferDesc at 1@@Z) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 906 error LNK2019: unresolved external symbol ovr_Destroy referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Finalize(void)" (?Finalize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 911 error LNK2019: unresolved external symbol ovr_GetFovTextureSize referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 904 error LNK2019: unresolved external symbol ovr_GetHmdDesc referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 912 error LNK2019: unresolved external symbol ovr_GetRenderDesc referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 932 error LNK2019: unresolved external symbol ovr_GetSessionStatus referenced in function "protected: virtual void __cdecl vtkOculusRenderWindowInteractor::StartEventLoop(void)" (?StartEventLoop at vtkOculusRenderWindowInteractor@@MEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindowInteractor.obj vtkRenderingOculus Error 917 error LNK2019: unresolved external symbol ovr_GetTextureSwapChainBufferGL referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::StereoUpdate(void)" (?StereoUpdate at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 909 error LNK2019: unresolved external symbol ovr_GetTextureSwapChainCurrentIndex referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::StereoUpdate(void)" (?StereoUpdate at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 914 error LNK2019: unresolved external symbol ovr_GetTimeInSeconds referenced in function "public: void __cdecl vtkOculusRenderWindow::UpdateHMDMatrixPose(void)" (?UpdateHMDMatrixPose at vtkOculusRenderWindow@@QEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 908 error LNK2019: unresolved external symbol ovr_GetTrackingState referenced in function "public: void __cdecl vtkOculusRenderWindow::UpdateHMDMatrixPose(void)" (?UpdateHMDMatrixPose at vtkOculusRenderWindow@@QEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 902 error LNK2019: unresolved external symbol ovr_Initialize referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 933 error LNK2019: unresolved external symbol ovr_RecenterTrackingOrigin referenced in function "protected: virtual void __cdecl vtkOculusRenderWindowInteractor::StartEventLoop(void)" (?StartEventLoop at vtkOculusRenderWindowInteractor@@MEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindowInteractor.obj vtkRenderingOculus Error 907 error LNK2019: unresolved external symbol ovr_SetTrackingOriginType referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 903 error LNK2019: unresolved external symbol ovr_Shutdown referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Finalize(void)" (?Finalize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 913 error LNK2019: unresolved external symbol ovr_SubmitFrame referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Frame(void)" (?Frame at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 901 error LNK2019: unresolved external symbol ovrMatrix4f_Projection referenced in function "protected: void __cdecl vtkOculusCamera::GetHMDEyeProjections(class vtkRenderer *)" (?GetHMDEyeProjections at vtkOculusCamera@@IEAAXPEAVvtkRenderer@@@Z) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusCamera.obj vtkRenderingOculus Error 919 error LNK2019: unresolved external symbol SDL_CreateWindow referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus vtkRenderingOpenVR vs Oculus Error 946 error LNK2019: unresolved external symbol SDL_CreateWindow referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Initialize(void)" (?Initialize at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 923 error LNK2019: unresolved external symbol SDL_DestroyWindow referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Finalize(void)" (?Finalize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 950 error LNK2019: unresolved external symbol SDL_DestroyWindow referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Finalize(void)" (?Finalize at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 918 error LNK2019: unresolved external symbol SDL_GetError referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 945 error LNK2019: unresolved external symbol SDL_GetError referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Initialize(void)" (?Initialize at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 925 error LNK2019: unresolved external symbol SDL_GL_CreateContext referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 952 error LNK2019: unresolved external symbol SDL_GL_CreateContext referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Initialize(void)" (?Initialize at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 927 error LNK2019: unresolved external symbol SDL_GL_GetCurrentContext referenced in function "public: virtual bool __cdecl vtkOculusRenderWindow::IsCurrent(void)" (?IsCurrent at vtkOculusRenderWindow@@UEAA_NXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 954 error LNK2019: unresolved external symbol SDL_GL_GetCurrentContext referenced in function "public: virtual bool __cdecl vtkOpenVRRenderWindow::IsCurrent(void)" (?IsCurrent at vtkOpenVRRenderWindow@@UEAA_NXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 926 error LNK2019: unresolved external symbol SDL_GL_MakeCurrent referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::MakeCurrent(void)" (?MakeCurrent at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 953 error LNK2019: unresolved external symbol SDL_GL_MakeCurrent referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::MakeCurrent(void)" (?MakeCurrent at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 924 error LNK2019: unresolved external symbol SDL_GL_SetAttribute referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 951 error LNK2019: unresolved external symbol SDL_GL_SetAttribute referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Initialize(void)" (?Initialize at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 928 error LNK2019: unresolved external symbol SDL_GL_SetSwapInterval referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 955 error LNK2019: unresolved external symbol SDL_GL_SetSwapInterval referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Initialize(void)" (?Initialize at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 929 error LNK2019: unresolved external symbol SDL_GL_SwapWindow referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Frame(void)" (?Frame at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 956 error LNK2019: unresolved external symbol SDL_GL_SwapWindow referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Frame(void)" (?Frame at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 930 error LNK2019: unresolved external symbol SDL_Init referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 958 error LNK2019: unresolved external symbol SDL_Init referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Initialize(void)" (?Initialize at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 934 error LNK2019: unresolved external symbol SDL_PollEvent referenced in function "protected: virtual void __cdecl vtkOculusRenderWindowInteractor::StartEventLoop(void)" (?StartEventLoop at vtkOculusRenderWindowInteractor@@MEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindowInteractor.obj vtkRenderingOculus Error 931 error LNK2019: unresolved external symbol SDL_Quit referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Finalize(void)" (?Finalize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 959 error LNK2019: unresolved external symbol SDL_Quit referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Finalize(void)" (?Finalize at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 921 error LNK2019: unresolved external symbol SDL_SetWindowPosition referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::SetPosition(int,int)" (?SetPosition at vtkOculusRenderWindow@@UEAAXHH at Z) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 948 error LNK2019: unresolved external symbol SDL_SetWindowPosition referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::SetPosition(int,int)" (?SetPosition at vtkOpenVRRenderWindow@@UEAAXHH at Z) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 922 error LNK2019: unresolved external symbol SDL_SetWindowSize referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::SetSize(int,int)" (?SetSize at vtkOculusRenderWindow@@UEAAXHH at Z) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 949 error LNK2019: unresolved external symbol SDL_SetWindowSize referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::SetSize(int,int)" (?SetSize at vtkOpenVRRenderWindow@@UEAAXHH at Z) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 920 error LNK2019: unresolved external symbol SDL_SetWindowTitle referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus Error 947 error LNK2019: unresolved external symbol SDL_SetWindowTitle referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Initialize(void)" (?Initialize at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Error 957 error LNK2019: unresolved external symbol SDL_ShowSimpleMessageBox referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Initialize(void)" (?Initialize at vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto:ken.martin at kitware.com] Sent: January 6, 2017 4:17 PM To: Luis Vieira Cc: VTK Users Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR OK I downloaded openvr 1.0.5 and made a couple more fixes. Just tested it and it all builds and runs. I merged it into master so you should be able to download an updated master and compile. Thanks Ken On Fri, Jan 6, 2017 at 1:14 PM, Ken Martin > wrote: I just googled it, try what that guy did, I am probably on 1.0.4. I'll try 1.0.5 this weekend. https://github.com/ValveSoftware/openvr/issues/335 On Fri, Jan 6, 2017 at 1:06 PM, Luis Vieira > wrote: Hi Ken, Error 175 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx 670 1 vtkRenderingOpenVR Lines 670 and 672 I had downloaded the packages following ( https://blog.kitware.com/using-virtual-reality-devices-with-vtk/) https://github.com/ValveSoftware/openvr ( OpenVR SDK 1.0.5) https://github.com/Kitware/VTK (master branch of VTK from the VTK respository on GitHub) Please, see attached vtkOpenVRRenderWindow. Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto: ken.martin at kitware.com] Sent: January 6, 2017 12:03 PM To: Luis Vieira < luis.vieira at vektore.com> Cc: VTK Users < vtkusers at vtk.org> Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR I'm not getting that error. With the diffs I posted it is compiling OK. What SDK version are you using? On Fri, Jan 6, 2017 at 12:00 PM, Luis Vieira > wrote: Hi Ken, Have you figured out some update regarding the following error? Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR Thank you, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto: ken.martin at kitware.com] Sent: January 4, 2017 5:11 PM To: Luis Vieira < luis.vieira at vektore.com> Cc: VTK Users < vtkusers at vtk.org> Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR Here are the diffs https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs Thanks Ken On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira > wrote: Hi Ken, I got some things regarding 'API_OpenGL' to TextureType_OpenGL within OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor I am looking forward to hearing from you soon. Tks, Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com From: Ken Martin [mailto: ken.martin at kitware.com] Sent: January 4, 2017 12:42 PM To: Luis Vieira < luis.vieira at vektore.com> Cc: VTK Users < vtkusers at vtk.org> Subject: Re: [vtkusers] Compiling VTK 7.1 against OpenVR They changed the signature on a couple functions in a recent SDK update. I have the changes at home and I'll push a topic soon to update it. If you look at the OpenVR SDK header files you can see the new signature change, it is a pretty easy fix. I'll try to remember to email the diffs tonight when I get home. On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira > wrote: Hello vtkusers, I am trying to compile my VTK 7.1 against OpenVR following the documentation: https://blog.kitware.com/using-virtual-reality-devices-with-vtk/ I got all modules SDL2/ Oculus Windows SDK/ OpenVR SDK and master branch of VTK from the VTK respository . I had used CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as well my VTK 7.0, VTK 6.3. The point is, every time I am trying do build the libraries by compiling my VTK.sln within Visual Studio I got the following errors: Error 871 error C2039: 'API_OpenGL' : is not a member of 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx 108 1 vtkRenderingOpenVR Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindow.cxx 709 1 vtkRenderingOpenVR Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 1 vtkRenderingOpenVR Somebody knows what it means? I mean somebody have been struggling with the same situation? Thank you for any help. Luis Vieira, Consultant, Software Engineer Vektore Exploration Consulting Corporation ca.linkedin.com/in/joaoluisvieira luis.vieira at vektore.com www.vektore.com _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vtkOculusRenderWindow.cxx URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: vtkOculusRenderer.cxx URL: From ken.martin at kitware.com Fri Jan 6 18:05:59 2017 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 Jan 2017 18:05:59 -0500 Subject: [vtkusers] Compiling VTK 7.1 against OpenVR In-Reply-To: <834f01d2686f$7e6718b0$7b354a10$@vektore.com> References: <2b92a01d266af$939ff790$badfe6b0$@vektore.com> <2ca5001d266b4$3d299f10$b77cdd30$@vektore.com> <001101d2683e$6712c4b0$35384e10$@vektore.com> <22f001d26847$922b3e80$b681bb80$@vektore.com> <834f01d2686f$7e6718b0$7b354a10$@vektore.com> Message-ID: Sorry I haven't looked at Oculus in a bit. I heard rumors Oculus works with OpenVR now but I have not tested it. On Fri, Jan 6, 2017 at 5:52 PM, Luis Vieira wrote: > Hi Ken, David > > > > Thanks, once again. > > > > Do you guys have any suggestions regarding Oculus SDK version. Because, I > am compiling vtkRenderingOculus against *Oculus SDK for Windows **V1.10.1 > *and I have similar issues as well as vtkOpenVR?. > > > > > > *vtkRenderingOculus vs* *Oculus* > > Error 915 error LNK2019: unresolved external symbol > ovr_CalcEyePoses referenced in function "public: void __cdecl > vtkOculusRenderWindow::UpdateHMDMatrixPose(void)" (?UpdateHMDMatrixPose@ > vtkOculusRenderWindow@@QEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > > > Error 910 error LNK2019: unresolved external symbol > ovr_CommitTextureSwapChain referenced in function "public: virtual void > __cdecl vtkOculusRenderWindow::Frame(void)" (?Frame at vtkOculusRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > > > > > Error 915 error LNK2019: unresolved external symbol > ovr_CalcEyePoses referenced in function "public: void __cdecl > vtkOculusRenderWindow::UpdateHMDMatrixPose(void)" (?UpdateHMDMatrixPose@ > vtkOculusRenderWindow@@QEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 910 error LNK2019: unresolved external symbol > ovr_CommitTextureSwapChain referenced in function "public: virtual void > __cdecl vtkOculusRenderWindow::Frame(void)" (?Frame at vtkOculusRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > Error 905 error LNK2019: unresolved external symbol ovr_Create > referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" > (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > Error 916 error LNK2019: unresolved external symbol > ovr_CreateTextureSwapChainGL referenced in function "protected: bool > __cdecl vtkOculusRenderWindow::CreateFrameBuffer(struct > vtkOculusRenderWindow::FramebufferDesc &)" (?CreateFrameBuffer@ > vtkOculusRenderWindow@@IEAA_NAEAUFramebufferDesc at 1@@Z) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > Error 906 error LNK2019: unresolved external symbol ovr_Destroy > referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Finalize(void)" > (?Finalize at vtkOculusRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > Error 911 error LNK2019: unresolved external symbol > ovr_GetFovTextureSize referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 904 error LNK2019: unresolved external symbol > ovr_GetHmdDesc referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 912 error LNK2019: unresolved external symbol > ovr_GetRenderDesc referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 932 error LNK2019: unresolved external symbol > ovr_GetSessionStatus referenced in function "protected: virtual void > __cdecl vtkOculusRenderWindowInteractor::StartEventLoop(void)" > (?StartEventLoop at vtkOculusRenderWindowInteractor@@MEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindowInteractor.obj > vtkRenderingOculus > > Error 917 error LNK2019: unresolved external symbol ovr_GetTextureSwapChainBufferGL > referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::StereoUpdate(void)" > (?StereoUpdate at vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 909 error LNK2019: unresolved external symbol ovr_ > GetTextureSwapChainCurrentIndex referenced in function "public: virtual > void __cdecl vtkOculusRenderWindow::StereoUpdate(void)" (?StereoUpdate@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\ > vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 914 error LNK2019: unresolved external symbol > ovr_GetTimeInSeconds referenced in function "public: void __cdecl > vtkOculusRenderWindow::UpdateHMDMatrixPose(void)" (?UpdateHMDMatrixPose@ > vtkOculusRenderWindow@@QEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 908 error LNK2019: unresolved external symbol > ovr_GetTrackingState referenced in function "public: void __cdecl > vtkOculusRenderWindow::UpdateHMDMatrixPose(void)" (?UpdateHMDMatrixPose@ > vtkOculusRenderWindow@@QEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 902 error LNK2019: unresolved external symbol > ovr_Initialize referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 933 error LNK2019: unresolved external symbol > ovr_RecenterTrackingOrigin referenced in function "protected: virtual void > __cdecl vtkOculusRenderWindowInteractor::StartEventLoop(void)" > (?StartEventLoop at vtkOculusRenderWindowInteractor@@MEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindowInteractor.obj > vtkRenderingOculus > > Error 907 error LNK2019: unresolved external symbol > ovr_SetTrackingOriginType referenced in function "public: virtual void > __cdecl vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 903 error LNK2019: unresolved external symbol > ovr_Shutdown referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Finalize(void)" (?Finalize at vtkOculusRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > Error 913 error LNK2019: unresolved external symbol > ovr_SubmitFrame referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Frame(void)" (?Frame at vtkOculusRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > Error 901 error LNK2019: unresolved external symbol > ovrMatrix4f_Projection referenced in function "protected: void __cdecl > vtkOculusCamera::GetHMDEyeProjections(class vtkRenderer *)" > (?GetHMDEyeProjections at vtkOculusCamera@@IEAAXPEAVvtkRenderer@@@Z) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusCamera.obj > vtkRenderingOculus > > Error 919 error LNK2019: unresolved external symbol > SDL_CreateWindow referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > > > *vtkRenderingOpenVR vs* *Oculus* > > > > > > Error 946 error LNK2019: unresolved external symbol > SDL_CreateWindow referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::Initialize(void)" (?Initialize@ > vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > Error 923 error LNK2019: unresolved external symbol > SDL_DestroyWindow referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Finalize(void)" (?Finalize at vtkOculusRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > Error 950 error LNK2019: unresolved external symbol > SDL_DestroyWindow referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::Finalize(void)" (?Finalize at vtkOpenVRRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj > vtkRenderingOpenVR > > Error 918 error LNK2019: unresolved external symbol > SDL_GetError referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 945 error LNK2019: unresolved external symbol > SDL_GetError referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::Initialize(void)" (?Initialize@ > vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > Error 925 error LNK2019: unresolved external symbol > SDL_GL_CreateContext referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 952 error LNK2019: unresolved external symbol > SDL_GL_CreateContext referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::Initialize(void)" (?Initialize@ > vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > Error 927 error LNK2019: unresolved external symbol > SDL_GL_GetCurrentContext referenced in function "public: virtual bool > __cdecl vtkOculusRenderWindow::IsCurrent(void)" (?IsCurrent@ > vtkOculusRenderWindow@@UEAA_NXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 954 error LNK2019: unresolved external symbol > SDL_GL_GetCurrentContext referenced in function "public: virtual bool > __cdecl vtkOpenVRRenderWindow::IsCurrent(void)" (?IsCurrent@ > vtkOpenVRRenderWindow@@UEAA_NXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > Error 926 error LNK2019: unresolved external symbol > SDL_GL_MakeCurrent referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::MakeCurrent(void)" (?MakeCurrent@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\ > vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 953 error LNK2019: unresolved external symbol > SDL_GL_MakeCurrent referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::MakeCurrent(void)" (?MakeCurrent@ > vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > Error 924 error LNK2019: unresolved external symbol > SDL_GL_SetAttribute referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 951 error LNK2019: unresolved external symbol > SDL_GL_SetAttribute referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::Initialize(void)" (?Initialize@ > vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > Error 928 error LNK2019: unresolved external symbol > SDL_GL_SetSwapInterval referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 955 error LNK2019: unresolved external symbol > SDL_GL_SetSwapInterval referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::Initialize(void)" (?Initialize@ > vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > Error 929 error LNK2019: unresolved external symbol > SDL_GL_SwapWindow referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Frame(void)" (?Frame at vtkOculusRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > Error 956 error LNK2019: unresolved external symbol > SDL_GL_SwapWindow referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::Frame(void)" (?Frame at vtkOpenVRRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj > vtkRenderingOpenVR > > Error 930 error LNK2019: unresolved external symbol SDL_Init > referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Initialize(void)" > (?Initialize at vtkOculusRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > Error 958 error LNK2019: unresolved external symbol SDL_Init > referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Initialize(void)" > (?Initialize at vtkOpenVRRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj > vtkRenderingOpenVR > > Error 934 error LNK2019: unresolved external symbol > SDL_PollEvent referenced in function "protected: virtual void __cdecl > vtkOculusRenderWindowInteractor::StartEventLoop(void)" (?StartEventLoop@ > vtkOculusRenderWindowInteractor@@MEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindowInteractor.obj > vtkRenderingOculus > > Error 931 error LNK2019: unresolved external symbol SDL_Quit > referenced in function "public: virtual void __cdecl vtkOculusRenderWindow::Finalize(void)" > (?Finalize at vtkOculusRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\vtkOculusRenderWindow.obj > vtkRenderingOculus > > Error 959 error LNK2019: unresolved external symbol SDL_Quit > referenced in function "public: virtual void __cdecl vtkOpenVRRenderWindow::Finalize(void)" > (?Finalize at vtkOpenVRRenderWindow@@UEAAXXZ) > C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\vtkOpenVRRenderWindow.obj > vtkRenderingOpenVR > > Error 921 error LNK2019: unresolved external symbol > SDL_SetWindowPosition referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::SetPosition(int,int)" (?SetPosition@ > vtkOculusRenderWindow@@UEAAXHH at Z) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 948 error LNK2019: unresolved external symbol > SDL_SetWindowPosition referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::SetPosition(int,int)" (?SetPosition@ > vtkOpenVRRenderWindow@@UEAAXHH at Z) C:\VTK\VTK-7.1.0VR\build\ > Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > Error 922 error LNK2019: unresolved external symbol > SDL_SetWindowSize referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::SetSize(int,int)" (?SetSize at vtkOculusRenderWindow@@ > UEAAXHH at Z) C:\VTK\VTK-7.1.0VR\build\Rendering\Oculus\ > vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 949 error LNK2019: unresolved external symbol > SDL_SetWindowSize referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::SetSize(int,int)" (?SetSize at vtkOpenVRRenderWindow@@ > UEAAXHH at Z) C:\VTK\VTK-7.1.0VR\build\Rendering\OpenVR\ > vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > Error 920 error LNK2019: unresolved external symbol > SDL_SetWindowTitle referenced in function "public: virtual void __cdecl > vtkOculusRenderWindow::Initialize(void)" (?Initialize@ > vtkOculusRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\Oculus\vtkOculusRenderWindow.obj vtkRenderingOculus > > Error 947 error LNK2019: unresolved external symbol > SDL_SetWindowTitle referenced in function "public: virtual void __cdecl > vtkOpenVRRenderWindow::Initialize(void)" (?Initialize@ > vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > Error 957 error LNK2019: unresolved external symbol > SDL_ShowSimpleMessageBox referenced in function "public: virtual void > __cdecl vtkOpenVRRenderWindow::Initialize(void)" (?Initialize@ > vtkOpenVRRenderWindow@@UEAAXXZ) C:\VTK\VTK-7.1.0VR\build\ > Rendering\OpenVR\vtkOpenVRRenderWindow.obj vtkRenderingOpenVR > > > > Thank you, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 6, 2017 4:17 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > OK I downloaded openvr 1.0.5 and made a couple more fixes. Just tested it > and it all builds and runs. I merged it into master so you should be able > to download an updated master and compile. > > > > Thanks > > Ken > > > > > > On Fri, Jan 6, 2017 at 1:14 PM, Ken Martin wrote: > > I just googled it, try what that guy did, I am probably on 1.0.4. I'll try > 1.0.5 this weekend. > > > > https://github.com/ValveSoftware/openvr/issues/335 > > > > > > > > On Fri, Jan 6, 2017 at 1:06 PM, Luis Vieira > wrote: > > Hi Ken, > > > > Error 175 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindow.cxx 670 1 > vtkRenderingOpenVR > > > > Lines 670 and 672 > > > > I had downloaded the packages following (https://blog.kitware.com/ > using-virtual-reality-devices-with-vtk/) > > https://github.com/ValveSoftware/openvr (*OpenVR SDK 1.0.5* > > *)* > > https://github.com/Kitware/VTK (*master branch of VTK from the **VTK > respository* *on GitHub*) > > > > Please, see attached vtkOpenVRRenderWindow. > > > > Thank you, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 6, 2017 12:03 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > I'm not getting that error. With the diffs I posted it is compiling OK. > What SDK version are you using? > > > > On Fri, Jan 6, 2017 at 12:00 PM, Luis Vieira > wrote: > > Hi Ken, > > > > Have you figured out some update regarding the following error? > > > > Error 871 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx > 108 1 vtkRenderingOpenVR > > Thank you, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 4, 2017 5:11 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > Here are the diffs > > > > https://gitlab.kitware.com/vtk/vtk/merge_requests/2315/diffs > > > > Thanks > > Ken > > > > On Wed, Jan 4, 2017 at 12:59 PM, Luis Vieira > wrote: > > Hi Ken, > > > > I got some things regarding 'API_OpenGL' to TextureType_OpenGL within > OpenVR SDK. However, there are other issues related to vtkOpenVRCamera, > vtkOpenVRRenderWindow, vtkOpenVRRenderWindowInteractor > > > > I am looking forward to hearing from you soon. > > > > Tks, > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > *From:* Ken Martin [mailto:ken.martin at kitware.com] > *Sent:* January 4, 2017 12:42 PM > *To:* Luis Vieira > *Cc:* VTK Users > *Subject:* Re: [vtkusers] Compiling VTK 7.1 against OpenVR > > > > They changed the signature on a couple functions in a recent SDK update. I > have the changes at home and I'll push a topic soon to update it. If you > look at the OpenVR SDK header files you can see the new signature change, > it is a pretty easy fix. I'll try to remember to email the diffs tonight > when I get home. > > > > On Wed, Jan 4, 2017 at 12:25 PM, Luis Vieira > wrote: > > Hello vtkusers, > > > > I am trying to compile my VTK 7.1 against OpenVR following the > documentation: https://blog.kitware.com/using-virtual-reality-devices- > with-vtk/ > > I got all modules SDL2 / Oculus > Windows SDK / OpenVR > SDK and master branch of VTK > from the VTK respository . I had used > CMAKE 3.0 as usual to compile everything against Visual Studio 2013, as > well my VTK 7.0, VTK 6.3. > > > > The point is, every time I am trying do build the libraries by compiling > my VTK.sln within Visual Studio I got the following errors: > > > > Error 871 error C2039: 'API_OpenGL' : is not a member of > 'vr' C:\VTK\VTK-7.1.0VR\Rendering\OpenVR\vtkOpenVRCamera.cxx > 108 1 vtkRenderingOpenVR > > Error 883 error C2660: 'vr::IVRSystem::ComputeDistortion' : > function does not take 3 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindow.cxx 709 1 > vtkRenderingOpenVR > > > > Error 886 error C2660: 'vr::IVRSystem::GetControllerState' : > function does not take 2 arguments C:\VTK\VTK-7.1.0VR\Rendering\ > OpenVR\vtkOpenVRRenderWindowInteractor.cxx 126 > 1 vtkRenderingOpenVR > > > > Somebody knows what it means? I mean somebody have been struggling with > the same situation? > > > > Thank you for any help. > > > > *Luis Vieira*, > > Consultant, Software Engineer > > Vektore Exploration Consulting Corporation > > ca.linkedin.com/in/joaoluisvieira > > luis.vieira at vektore.com > > www.vektore.com > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > > Ken Martin PhD > > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andre.zimmer at rwth-aachen.de Sun Jan 8 05:52:17 2017 From: andre.zimmer at rwth-aachen.de (Andre Zimmer) Date: Sun, 8 Jan 2017 11:52:17 +0100 Subject: [vtkusers] Issue when loading stl Message-ID: Hi, I am currently experiencing issues with loading and displaying stl geometries in a software I created using VTK and Python. Searches have shown that sporadically other people have seen the same issue and it reappears again every year or so. When loading an stl file I get this message: ERROR: In ~/SOFTWARE/ParaView-v5.2.0/VTK/IO/Geometry/vtkSTLReader.cxx, line 461 vtkSTLReader (0x990c440): STLReader: error while reading file blablablainput_files/geometry/rotating_geometries/laufrad_mrf.stl at line 3: unable to read point. So far so fine. But I wondered how it comes. My software worked well on Fedora using Python and VTK 6.3. Now I went back to OpenSuse Leap 42.2 and I get the message from above. So I tried fixing it by installing VTK 6.3 (in OS 42.2 7.0 is standard). This did not help. I manually downloaded VTK 6.3 and later the newest version with git and compiled it. Again I get the same message. So I thought Paraview 5.2 works well and probably contains VTK. I downloaded and complied it manually. This Paraview version opens the stl files without complaining. So I used that VTK and modified my system paths to work with that Python wrapper. I get the same error message and nothing gets displayed. I changed the error message in the source code of the vtkSTLreader in the VTK files that came with Paraview and recompiled everything. When now using my software with the Python VTK version I get my new modified error message which shows my that I am indeed using that vtkSTLReader. In Paraview it still opens the stl file without any problems. Does anyone have an idea what I could do now? Thanks, Andr? From moritz.kroeger at tu-dortmund.de Mon Jan 9 05:55:19 2017 From: moritz.kroeger at tu-dortmund.de (Moritz Kroeger) Date: Mon, 9 Jan 2017 11:55:19 +0100 Subject: [vtkusers] vtkUnstructuredGridVolumeRayCastMapper Message-ID: <2baa5445730a6ec7d088fdb1a437cfca.squirrel@webmail.tu-dortmund.de> Hello, I am trying to use the vtkUnstructuredGridVolumeRayCastMapper in a C++ program to visualize some scalar pointdata. Everytime i call RenderWindow->Render(); I get an NullException Error. I think it has something to do with a missing VTK_MODULE_INIT(XXX) since I am not using Cmake, but i cant find the right macro. Thanks for the help Greets From mjordan at live.at Mon Jan 9 06:49:22 2017 From: mjordan at live.at (M. Jordan) Date: Mon, 9 Jan 2017 11:49:22 +0000 Subject: [vtkusers] vtkUnstructuredGridVolumeRayCastMapper In-Reply-To: <2baa5445730a6ec7d088fdb1a437cfca.squirrel@webmail.tu-dortmund.de> References: <2baa5445730a6ec7d088fdb1a437cfca.squirrel@webmail.tu-dortmund.de> Message-ID: Hello, i always add this to my projects. #include VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkRenderingFreeType); Greets ________________________________ Von: vtkusers im Auftrag von Moritz Kroeger Gesendet: Montag, 09. J?nner 2017 11:55 An: vtkusers at vtk.org Betreff: [vtkusers] vtkUnstructuredGridVolumeRayCastMapper Hello, I am trying to use the vtkUnstructuredGridVolumeRayCastMapper in a C++ program to visualize some scalar pointdata. Everytime i call RenderWindow->Render(); I get an NullException Error. I think it has something to do with a missing VTK_MODULE_INIT(XXX) since I am not using Cmake, but i cant find the right macro. Thanks for the help Greets _______________________________________________ Powered by www.kitware.com [http://www.kitware.com/img/Areas_Index_Home.jpg] Kitware Inc. - leading edge, high-quality software www.kitware.com Kitware's mission is to create state-of-the-art software products and services in visualization and data processing using advanced quality software methods and ... Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html OPEN SOURCE - Kitware www.kitware.com Kitware develops, maintains and supports a wide array of toolkits and applications that are used by tens of thousands of software developers, researchers and ... Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ VTK/FAQ - KitwarePublic www.vtk.org General information and availability What is the Visualization Toolkit? The Visualization ToolKit (vtk) is a software system for 3D Computer Graphics and Visualization. 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 ali.hadimogullari at netcad.com.tr Mon Jan 9 10:08:01 2017 From: ali.hadimogullari at netcad.com.tr (alihadim) Date: Mon, 9 Jan 2017 08:08:01 -0700 (MST) Subject: [vtkusers] After VTK 5.6 64 bir compiling using .Net wraper file Message-ID: <1483974481816-5741740.post@n5.nabble.com> hi, I compiled vtk 5.6 using cmake and I created solution with 32 bit. Now, I compiled 64 bit but I didn't use .Net wrapper files. I took error "The specified module could not be found. (Exception from HRESULT: 0x8007007E)" I could not find an dependency. If you need test solution I can send. -- View this message in context: http://vtk.1045678.n5.nabble.com/After-VTK-5-6-64-bir-compiling-using-Net-wraper-file-tp5741740.html Sent from the VTK - Users mailing list archive at Nabble.com. From tatarowiczj at battelle.org Mon Jan 9 16:23:09 2017 From: tatarowiczj at battelle.org (Tatarowicz, John) Date: Mon, 9 Jan 2017 21:23:09 +0000 Subject: [vtkusers] Coloring subvolumes Message-ID: <82BBD66598FEF44092F7EF6854A733F621903E38@WP-MBX1B.milky-way.battelle.org> Hello All- I'm a relatively new user to the VTK toolkit. I am currently rendering medical CT data which has a color transfer function applied for the whole scan. Suspect masses in the scan have bounding boxes (vtkBoxWidget) defined around them. I would like to be able to toggle a change in their colorization (to and from red) in order to highlight possible cancerous masses. Is it possible to change the color transfer function only in a subvolume such that a predefined CT number range has its color changed to red? I would just change the color transfer function for the defined CT number range over the whole scan, but I want to only highlight objects in the predefined suspect areas. Cheers, John Tatarowicz -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Mon Jan 9 18:58:40 2017 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Mon, 9 Jan 2017 18:58:40 -0500 Subject: [vtkusers] vcpkg Message-ID: ? ? Hi guys, vcpkg looks like a good effort for easing library installation for usage in Visual Studio. Should we join the effort by adding ITK and VTK? Has anyone tried/started doing this? Regards, D?enan? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Tue Jan 10 10:15:30 2017 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 10 Jan 2017 10:15:30 -0500 Subject: [vtkusers] vcpkg In-Reply-To: References: Message-ID: <20170110151530.GA29840@megas.kitware.com> On Mon, Jan 09, 2017 at 18:58:40 -0500, D?enan Zuki? wrote: > vcpkg > > looks > like a good effort for easing library installation for usage in Visual > Studio. Should we join the effort by adding ITK and VTK? Has anyone > tried/started doing this? CPack would likely need to support it first. Moving VTK over to the new superbuild would also help there. --Ben From sankhesh.jhaveri at kitware.com Tue Jan 10 10:18:20 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 10 Jan 2017 15:18:20 +0000 Subject: [vtkusers] Coloring subvolumes In-Reply-To: <82BBD66598FEF44092F7EF6854A733F621903E38@WP-MBX1B.milky-way.battelle.org> References: <82BBD66598FEF44092F7EF6854A733F621903E38@WP-MBX1B.milky-way.battelle.org> Message-ID: Hi John, I don?t think its possible to directly apply the color transfer function to a sub-volume. You can use the label map mask to achieve the desired results. An example is provided as a test for composite mask blend . You would have to create the mask volume based on the sub-volume of interest and set the mask color function and mask blend factor accordingly. Alternatively, you could use multi-component support of the volume mapper. You can create a new vtkImageData from your slices with two components. The first component would be your whole volume with voxels in the sub-volume set to a value that would be transparent in the opacity transfer function. The second component would consist of non-transparent values on voxels in the sub-volume region. Finally, setting two different color transfer functions (one for each component) would do the trick. Make sure to set the components as independent in the volume property. Hope that helps. Sankhesh ? On Mon, Jan 9, 2017 at 4:43 PM Tatarowicz, John wrote: > Hello All- > > > > I?m a relatively new user to the VTK toolkit. I am currently rendering > medical CT data which has a color transfer function applied for the whole > scan. Suspect masses in the scan have bounding boxes (vtkBoxWidget) > defined around them. I would like to be able to toggle a change in their > colorization (to and from red) in order to highlight possible cancerous > masses. Is it possible to change the color transfer function only in a > subvolume such that a predefined CT number range has its color changed to > red? I would just change the color transfer function for the defined CT > number range over the whole scan, but I want to only highlight objects in > the predefined suspect areas. > > > > Cheers, > > John Tatarowicz > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Tue Jan 10 10:42:00 2017 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 10 Jan 2017 10:42:00 -0500 Subject: [vtkusers] vcpkg In-Reply-To: <20170110151530.GA29840@megas.kitware.com> References: <20170110151530.GA29840@megas.kitware.com> Message-ID: If there is no undergoing effort to "port" VTK to vcpkg, we could go ahead and add ITK with VTKGlue disabled. Once VTK is added, we could turn on VTKGlue and make VTK a dependency. P.S. I originally cross-posted this to ITK and VTK developers lists, but since I am only subscribed to VTK-users my message was bounced from VTK-developers. Hence this "merge" message including Francois' response. Francois Budin 9:45 AM (52 minutes ago) to me, vtk-developers, ITK Never heard of it before. It does look interesting. We could try to estimate how much work it would be to port ITK (and VTK?) to that platform. Since it supports CMake [1], it may not be much work. Francois [1] https://github.com/Microsoft/vcpkg/blob/master/docs/ EXAMPLES.md#example-1-2-b On Tue, Jan 10, 2017 at 10:15 AM, Ben Boeckel wrote: > On Mon, Jan 09, 2017 at 18:58:40 -0500, D?enan Zuki? wrote: > > vcpkg > > tool-to-acquire-and-build-c-open-source-libraries-on-windows/> > > looks > > like a good effort for easing library installation for usage in Visual > > Studio. Should we join the effort by adding ITK and VTK? Has anyone > > tried/started doing this? > > CPack would likely need to support it first. Moving VTK over to the new > superbuild would also help there. > > --Ben > -------------- next part -------------- An HTML attachment was scrubbed... URL: From moritz.kroeger at tu-dortmund.de Tue Jan 10 11:03:42 2017 From: moritz.kroeger at tu-dortmund.de (Moritz Kroeger) Date: Tue, 10 Jan 2017 17:03:42 +0100 Subject: [vtkusers] PointCloud to ImageData Message-ID: <1e88f682b49894789df34503cc0f8bba.squirrel@webmail.tu-dortmund.de> Hello, I am trying to volumerender a scalar 3D point dataset. Since the dataset is really big I would like to downsample the Dataset into Voxels. Is it possible to define an ImageDatastructure, where the scalar of each voxel is an average of the scalars of the points inside the voxel? Is there a filter for this? Greets Moritz From thehappydog84 at gmail.com Tue Jan 10 13:01:56 2017 From: thehappydog84 at gmail.com (Jon Garner) Date: Tue, 10 Jan 2017 13:01:56 -0500 Subject: [vtkusers] VTK-Code_Submission_InteractorStyleDrawPolygonType2 Message-ID: I am submitting a new class for vtkInteractionStyle, it's a modified version of "InteractorStyleDrawPolygon" essentially it draws a straightline polygon from node to node, each placed by left clicks. My goal is to eventually add the ability to extract/select points(from a point cloud) by polygonal selection, and then get that to work with point cloud library. Since I'm new to vtk and really this is the first time I've submitted anything to an open source project I thought this would be a good starting point for me to submit something and make sure I'm doing things the right way. There is a Test project in the zip file where this has been implemented, should I run other tests or is this typically what you guys are looking for? [image: Inline image 1] Let me know if I can provide any more information. Thanks, Jon Garner -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 82643 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VTK-Code_Submission_InteractorStyleDrawPolygonType2.zip Type: application/zip Size: 6498 bytes Desc: not available URL: From ken.martin at kitware.com Tue Jan 10 13:31:58 2017 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 10 Jan 2017 13:31:58 -0500 Subject: [vtkusers] Distortions in Volumerendering in VR-Mode (HTC Vive) In-Reply-To: References: <1481128708774-5741457.post@n5.nabble.com> Message-ID: I'm working on a Volume Rendering VR example right now so I'll see if I bump into the same issue. On Thu, Dec 8, 2016 at 8:40 AM, Sebastian Heerwald wrote: > Hey, > > > Thank you for your reply. > > I have build a little program which only loads a volume dataset and > displays it within the RenderWindow. > > Since the OpenVR interface is a little bit hackish within VTK the only > thing that decides whether it renders for OpenVR or for normal 2D-Display > is whether we link against vtkOpenVR and vtkRenderingOpenVR modules or not. > > Everything code related is the same. > > > So to reply to your Question: > > > Could you try rendering a volume with an identity matrix set as its > transformation? > > > I've build this simple program and it only places a volume dataset within > the world without any transformation. The volume is directly given to the GPUVolumeRCMapper > without any transformation. In "2D"-Renderwindow everything is fine. Also > in anaglyph rendering I get a nice 3D View. > > But when I link against OpenVR module the view dependend distortions > appear within VR. I've tried some things. > > All I can say is, that the errors appear if I look at any edge or corner > of the surrounding (invisible) boundingbox around the rendered volume. If I > look directly on one side of the boundingbox everything seems fine. > > > The only thing I can imagine from this perspective is, that the GPUVolumeRCMapper > gets wrong view directions for the eyes. But the vtkOpenVRCamera objects > seems to do everything right. > > > I don't know how to adjust the clipping box / bounding box you mentioned. > Can you explain how I can do this, maybe this helps me to debug further? > > > Sincerely, > > Sebastian > > ------------------------------ > *Von:* vtkusers im Auftrag von Alvaro Sanchez < > alvaro.sanchez at kitware.com> > *Gesendet:* Mittwoch, 7. Dezember 2016 18:14 > *An:* polybos > *Cc:* VTK Users > *Betreff:* Re: [vtkusers] Distortions in Volumerendering in VR-Mode (HTC > Vive) > > Hi, > > I have never tested the GPUVolumeRCMapper with OpenVR but as far as I > remember Ken mentioned some time ago that he encountered a clipping/bbox > related issue when adjusting the volume's orientation and position. Could > you try rendering a volume with an identity matrix set as its > transformation?, this might give you a hint of what the mapper is doing > wrong. > > Cheers, > Alvaro > > On Wed, Dec 7, 2016 at 11:38 AM, polybos wrote: > >> Sebastian Heerwald wrote >> > If I look onto the volume rendering and move around it, there appear >> > "refraction" lines. >> >> Unfortunately I cannot help with this issue but I would also be very >> pleased >> if someone could help here. Or did you, Sebastian, already achieve some >> more >> insights into this problem? >> I also get such distortions on the HTC Vive when using >> vtkVolumeRayCastMapper, while everything seems perfectly well in a >> mesh-only >> rendering. >> >> Does anyone have similar issues? Maybe with Occulus Rift? As far as I >> understand Sebastian just test with a HTC Vive. At least I can only test >> with a HTC Vive. >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.c >> om/Distortions-in-Volumerendering-in-VR-Mode-HTC-Vive- >> tp5741338p5741457.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Alvaro Sanchez > Kitware, Inc. > Senior R&D Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4901 <(518)%20881-4901> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Tue Jan 10 15:30:46 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Tue, 10 Jan 2017 15:30:46 -0500 Subject: [vtkusers] VTK-Code_Submission_InteractorStyleDrawPolygonType2 In-Reply-To: References: Message-ID: Thanks Jon, The best way to contribute code to VTK is via gitlab. Git can be a little annoying the first time through but gitlab and buildbot simplify the review and test efforts that all new code goes through before merging substantially. The steps are outlined here: https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md Overall you signup on gitlab.kitware.com, clone VTK to your local machine, run the SetupForDevelopment script, do your work locally and when satisfied push the branch to your gitlab.kitware.com account. Finally issue a merge request and let one of the trusted developers know about it via @username in a comment. Trusted developers can then trivially run regression tests on all platforms and suggest changes to make. Looking forward to the eventual better integration with PCL! David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Tue, Jan 10, 2017 at 1:01 PM, Jon Garner wrote: > I am submitting a new class for vtkInteractionStyle, it's a modified > version of "InteractorStyleDrawPolygon" essentially it draws a > straightline polygon from node to node, each placed by left clicks. > > My goal is to eventually add the ability to extract/select points(from a > point cloud) by polygonal selection, and then get that to work with point > cloud library. Since I'm new to vtk and really this is the first time I've > submitted anything to an open source project I thought this would be a good > starting point for me to submit something and make sure I'm doing things > the right way. > > There is a Test project in the zip file where this has been implemented, > should I run other tests or is this typically what you guys are looking > for? > > > [image: Inline image 1] > > Let me know if I can provide any more information. > > Thanks, > > Jon Garner > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 82643 bytes Desc: not available URL: From spir.robert at gmail.com Tue Jan 10 17:49:49 2017 From: spir.robert at gmail.com (=?UTF-8?B?UsOzYmVydCDFoHBpcg==?=) Date: Tue, 10 Jan 2017 23:49:49 +0100 Subject: [vtkusers] vcpkg In-Reply-To: References: <20170110151530.GA29840@megas.kitware.com> Message-ID: <004801d26b93$d9bbe520$8d33af60$@gmail.com> I made a simple portfile [1] for VTK to vcpkg and it seems that it works. At least I was able to build and run the sphere VTK example. Only problem that I see is that VTK has large number of build configuration options and I don?t know how this could be handled with vcpkg (for example optional QT support). [1] https://github.com/RobertSpir/vcpkg/blob/add-vtk/ports/vtk/portfile.cmake Robert From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of D?enan Zuki? Sent: Tuesday, January 10, 2017 4:42 PM To: Ben Boeckel Cc: vtkusers ; ITK developer mailing list Subject: Re: [vtkusers] vcpkg If there is no undergoing effort to "port" VTK to vcpkg, we could go ahead and add ITK with VTKGlue disabled. Once VTK is added, we could turn on VTKGlue and make VTK a dependency. P.S. I originally cross-posted this to ITK and VTK developers lists, but since I am only subscribed to VTK-users my message was bounced from VTK-developers. Hence this "merge" message including Francois' response. Francois Budin 9:45 AM (52 minutes ago) to me, vtk-developers, ITK Never heard of it before. It does look interesting. We could try to estimate how much work it would be to port ITK (and VTK?) to that platform. Since it supports CMake [1], it may not be much work. Francois [1] https://github.com/Microsoft/vcpkg/blob/master/docs/EXAMPLES.md#example-1-2-b On Tue, Jan 10, 2017 at 10:15 AM, Ben Boeckel > wrote: On Mon, Jan 09, 2017 at 18:58:40 -0500, D?enan Zuki? wrote: > vcpkg > > looks > like a good effort for easing library installation for usage in Visual > Studio. Should we join the effort by adding ITK and VTK? Has anyone > tried/started doing this? CPack would likely need to support it first. Moving VTK over to the new superbuild would also help there. --Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Tue Jan 10 18:10:43 2017 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 10 Jan 2017 18:10:43 -0500 Subject: [vtkusers] vcpkg In-Reply-To: <004801d26b93$d9bbe520$8d33af60$@gmail.com> References: <20170110151530.GA29840@megas.kitware.com> <004801d26b93$d9bbe520$8d33af60$@gmail.com> Message-ID: I have always built VTK with Qt support, and ITK with VTK-glue. Perhaps we could make those libraries dependencies: ITK depends on VTK, and VTK depends on Qt? R?bert, do you intend to make a PR for your additions to vcpkg? Regards, D?enan On Tue, Jan 10, 2017 at 5:49 PM, R?bert ?pir wrote: > I made a simple portfile [1] for VTK to vcpkg and it seems that it works. > At least I was able to build and run the sphere VTK example. > > Only problem that I see is that VTK has large number of build > configuration options and I don?t know how this could be handled with vcpkg > (for example optional QT support). > > > > [1] https://github.com/RobertSpir/vcpkg/blob/add-vtk/ports/vtk/ > portfile.cmake > > > > Robert > > > > > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *D?enan > Zuki? > *Sent:* Tuesday, January 10, 2017 4:42 PM > *To:* Ben Boeckel > *Cc:* vtkusers ; ITK developer mailing list < > insight-developers at itk.org> > *Subject:* Re: [vtkusers] vcpkg > > > > If there is no undergoing effort to "port" VTK to vcpkg, we could go ahead > and add ITK with VTKGlue disabled. Once VTK is added, we could turn on > VTKGlue and make VTK a dependency. > > > > P.S. I originally cross-posted this to ITK and VTK developers lists, but > since I am only subscribed to VTK-users my message was bounced from > VTK-developers. Hence this "merge" message including Francois' response. > > > > > Francois Budin > > 9:45 AM (52 minutes ago) > > to me, vtk-developers, ITK > > Never heard of it before. It does look interesting. We could try to > estimate how much work it would be to port ITK (and VTK?) to that > platform. Since it supports CMake [1], it may not be much work. > > Francois > > [1] https://github.com/Microsoft/vcpkg/blob/master/ > docs/EXAMPLES.md#example-1-2-b > > > > > > On Tue, Jan 10, 2017 at 10:15 AM, Ben Boeckel > wrote: > > On Mon, Jan 09, 2017 at 18:58:40 -0500, D?enan Zuki? wrote: > > vcpkg > > tool-to-acquire-and-build-c-open-source-libraries-on-windows/> > > looks > > like a good effort for easing library installation for usage in Visual > > Studio. Should we join the effort by adding ITK and VTK? Has anyone > > tried/started doing this? > > CPack would likely need to support it first. Moving VTK over to the new > superbuild would also help there. > > --Ben > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.budin at kitware.com Tue Jan 10 18:15:07 2017 From: francois.budin at kitware.com (Francois Budin) Date: Tue, 10 Jan 2017 18:15:07 -0500 Subject: [vtkusers] vcpkg In-Reply-To: References: <20170110151530.GA29840@megas.kitware.com> <004801d26b93$d9bbe520$8d33af60$@gmail.com> Message-ID: Since Qt is available through this system, I agree with Dzenan: It makes sense to make these depend on each other. On Tue, Jan 10, 2017 at 6:10 PM, D?enan Zuki? wrote: > I have always built VTK with Qt support, and ITK with VTK-glue. Perhaps we > could make those libraries dependencies: ITK depends on VTK, and VTK > depends on Qt? > > R?bert, do you intend to make a PR for your additions to vcpkg? > > Regards, > D?enan > > On Tue, Jan 10, 2017 at 5:49 PM, R?bert ?pir > wrote: > >> I made a simple portfile [1] for VTK to vcpkg and it seems that it works. >> At least I was able to build and run the sphere VTK example. >> >> Only problem that I see is that VTK has large number of build >> configuration options and I don?t know how this could be handled with vcpkg >> (for example optional QT support). >> >> >> >> [1] https://github.com/RobertSpir/vcpkg/blob/add-vtk/ports/vtk/p >> ortfile.cmake >> >> >> >> Robert >> >> >> >> >> >> *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *D?enan >> Zuki? >> *Sent:* Tuesday, January 10, 2017 4:42 PM >> *To:* Ben Boeckel >> *Cc:* vtkusers ; ITK developer mailing list < >> insight-developers at itk.org> >> *Subject:* Re: [vtkusers] vcpkg >> >> >> >> If there is no undergoing effort to "port" VTK to vcpkg, we could go >> ahead and add ITK with VTKGlue disabled. Once VTK is added, we could turn >> on VTKGlue and make VTK a dependency. >> >> >> >> P.S. I originally cross-posted this to ITK and VTK developers lists, but >> since I am only subscribed to VTK-users my message was bounced from >> VTK-developers. Hence this "merge" message including Francois' response. >> >> >> >> >> Francois Budin >> >> 9:45 AM (52 minutes ago) >> >> to me, vtk-developers, ITK >> >> Never heard of it before. It does look interesting. We could try to >> estimate how much work it would be to port ITK (and VTK?) to that >> platform. Since it supports CMake [1], it may not be much work. >> >> Francois >> >> [1] https://github.com/Microsoft/vcpkg/blob/master/docs/ >> EXAMPLES.md#example-1-2-b >> >> >> >> >> >> On Tue, Jan 10, 2017 at 10:15 AM, Ben Boeckel >> wrote: >> >> On Mon, Jan 09, 2017 at 18:58:40 -0500, D?enan Zuki? wrote: >> > vcpkg >> > > tool-to-acquire-and-build-c-open-source-libraries-on-windows/> >> > looks >> > like a good effort for easing library installation for usage in Visual >> > Studio. Should we join the effort by adding ITK and VTK? Has anyone >> > tried/started doing this? >> >> CPack would likely need to support it first. Moving VTK over to the new >> superbuild would also help there. >> >> --Ben >> >> >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tehsunnliu at yahoo.com Tue Jan 10 22:55:34 2017 From: tehsunnliu at yahoo.com (Alex Liu) Date: Tue, 10 Jan 2017 20:55:34 -0700 (MST) Subject: [vtkusers] Get WindowLevel and WindowWidth from DICOM Message-ID: <1484106934626-5741754.post@n5.nabble.com> Hi all. I was trying to get WindowLevel(WL) and WindowWidth(WW) from DICOM file but I couldn't find any way. I opened this file in Sante DICOM Viewer and it shows WW: 40 and WL: 200 I tried using vtkImageMapToWindowLevelColors to get windowLevel and windowWidth but the width and the level are different from the image shown above for the same file. the result I get is WW = 255 and WL = 127.5 Is there anyway I can get the windowlevel(WL) and windowwidth(WW)? Please help. Thank you. ----- Alex Liu +15574855474 -- View this message in context: http://vtk.1045678.n5.nabble.com/Get-WindowLevel-and-WindowWidth-from-DICOM-tp5741754.html Sent from the VTK - Users mailing list archive at Nabble.com. From spir.robert at gmail.com Wed Jan 11 02:18:55 2017 From: spir.robert at gmail.com (=?UTF-8?B?UsOzYmVydCDFoHBpcg==?=) Date: Wed, 11 Jan 2017 08:18:55 +0100 Subject: [vtkusers] vcpkg In-Reply-To: References: <20170110151530.GA29840@megas.kitware.com> <004801d26b93$d9bbe520$8d33af60$@gmail.com> Message-ID: <000601d26bda$f87ba120$e972e360$@gmail.com> Today I will try to modify the portfile to add qt5 dependency and build vtk with qt support and then after testing I will make a pull request. Best, Robert From: Francois Budin [mailto:francois.budin at kitware.com] Sent: Wednesday, January 11, 2017 12:15 AM To: D?enan Zuki? Cc: R?bert ?pir ; vtkusers Subject: Re: [vtkusers] vcpkg Since Qt is available through this system, I agree with Dzenan: It makes sense to make these depend on each other. On Tue, Jan 10, 2017 at 6:10 PM, D?enan Zuki? > wrote: I have always built VTK with Qt support, and ITK with VTK-glue. Perhaps we could make those libraries dependencies: ITK depends on VTK, and VTK depends on Qt? R?bert, do you intend to make a PR for your additions to vcpkg? Regards, D?enan On Tue, Jan 10, 2017 at 5:49 PM, R?bert ?pir > wrote: I made a simple portfile [1] for VTK to vcpkg and it seems that it works. At least I was able to build and run the sphere VTK example. Only problem that I see is that VTK has large number of build configuration options and I don?t know how this could be handled with vcpkg (for example optional QT support). [1] https://github.com/RobertSpir/vcpkg/blob/add-vtk/ports/vtk/portfile.cmake Robert From: vtkusers [mailto:vtkusers-bounces at vtk.org ] On Behalf Of D?enan Zuki? Sent: Tuesday, January 10, 2017 4:42 PM To: Ben Boeckel > Cc: vtkusers >; ITK developer mailing list > Subject: Re: [vtkusers] vcpkg If there is no undergoing effort to "port" VTK to vcpkg, we could go ahead and add ITK with VTKGlue disabled. Once VTK is added, we could turn on VTKGlue and make VTK a dependency. P.S. I originally cross-posted this to ITK and VTK developers lists, but since I am only subscribed to VTK-users my message was bounced from VTK-developers. Hence this "merge" message including Francois' response. Francois Budin 9:45 AM (52 minutes ago) to me, vtk-developers, ITK Never heard of it before. It does look interesting. We could try to estimate how much work it would be to port ITK (and VTK?) to that platform. Since it supports CMake [1], it may not be much work. Francois [1] https://github.com/Microsoft/vcpkg/blob/master/docs/EXAMPLES.md#example-1-2-b On Tue, Jan 10, 2017 at 10:15 AM, Ben Boeckel > wrote: On Mon, Jan 09, 2017 at 18:58:40 -0500, D?enan Zuki? wrote: > vcpkg > > looks > like a good effort for easing library installation for usage in Visual > Studio. Should we join the effort by adding ITK and VTK? Has anyone > tried/started doing this? CPack would likely need to support it first. Moving VTK over to the new superbuild would also help there. --Ben _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ~WRD000.jpg Type: image/jpeg Size: 823 bytes Desc: not available URL: From mjordan at live.at Wed Jan 11 06:02:47 2017 From: mjordan at live.at (M. Jordan) Date: Wed, 11 Jan 2017 11:02:47 +0000 Subject: [vtkusers] Get normal vector of the closest polydata cell to a given test point Message-ID: Hello, i have a test point p[x,y,z] and a polydata. I use vtkCellLocator to get the closest cell of the polydata to this point. I get: - the closest point - the squared distance to the closest point - cell ID Now I want to get the normal vector of the cell. I know the cell ID but I don't know how to get the normal vector from it. Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjordan at live.at Wed Jan 11 07:50:16 2017 From: mjordan at live.at (M. Jordan) Date: Wed, 11 Jan 2017 12:50:16 +0000 Subject: [vtkusers] Get normal vector of the closest polydata cell to a given test point In-Reply-To: References: , Message-ID: Thank you very much! The problem is that most of the points are on the surface. Therefore test point = closest point. I only use the cellLocator to get the corresponding cell. Now I try to get the normale vector of the whole cell (orientation of the cell). Is there a way to get that vector? ________________________________ Von: Girish Lande Gesendet: Mittwoch, 11. J?nner 2017 12:43 An: M. Jordan Betreff: Re: [vtkusers] Get normal vector of the closest polydata cell to a given test point Hi Jordan, You can use vector between your test point and closest point as NORMAL vector. Please see code snippet below. normalizedX is output double* pos = picker->GetPickPosition(); double testPoint[3] = {pos[0],pos[1],pos[2]}; //Find the closest points to TestPoint double closestPoint[3];//the coordinates of the closest point will be returned here double closestPointDist2; //the squared distance to the closest point will be returned here vtkIdType cellId; //the cell id of the cell containing the closest point will be returned here int subId; //this is rarely used (in triangle strips only, I believe) cellLocator->FindClosestPoint(testPoint, closestPoint, cellId, subId, closestPointDist2); std::cout << "Coordinates of closest point: " << closestPoint[0] << " " << closestPoint[1] << " " << closestPoint[2] << std::endl; std::cout << "Squared distance to closest point: " << closestPointDist2 << std::endl; std::cout << "CellId: " << cellId << std::endl; endPoint[0]=pos[0]; endPoint[1]=pos[1]; endPoint[2]=pos[2]; startPoint[0]=closestPoint[0]; startPoint[1]=closestPoint[1]; startPoint[2]=closestPoint[2]; // Compute a basis double normalizedX[3]; double normalizedY[3]; double normalizedZ[3]; // The X axis is a vector from start to end vtkMath::Subtract(endPoint, startPoint, normalizedX); double length = vtkMath::Norm(normalizedX); length=1; vtkMath::Normalize(normalizedX); On 11 January 2017 at 16:32, M. Jordan > wrote: Hello, i have a test point p[x,y,z] and a polydata. I use vtkCellLocator to get the closest cell of the polydata to this point. I get: - the closest point - the squared distance to the closest point - cell ID Now I want to get the normal vector of the cell. I know the cell ID but I don't know how to get the normal vector from it. Thank you! _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- thanks & regards, Girish -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Wed Jan 11 12:25:38 2017 From: daviddoria at gmail.com (David Doria) Date: Wed, 11 Jan 2017 11:25:38 -0600 Subject: [vtkusers] Get normal vector of the closest polydata cell to a given test point In-Reply-To: References: Message-ID: > > Hello, > > i have a test point p[x,y,z] and a polydata. > I use vtkCellLocator to get the closest cell of the polydata to this > point. > > I get: > - the closest point > - the squared distance to the closest point > - cell ID > > Now I want to get the normal vector of the cell. I know the cell ID but I > don't know how to get the > normal vector from it. > > Thank you! > This example shows how to retrieve cell normals: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataCellNormals David -------------- next part -------------- An HTML attachment was scrubbed... URL: From tehsunnliu at yahoo.com Thu Jan 12 01:04:27 2017 From: tehsunnliu at yahoo.com (Alex Liu) Date: Wed, 11 Jan 2017 23:04:27 -0700 (MST) Subject: [vtkusers] How to get patient's information using vtkMedicalImageReader2 ? In-Reply-To: <1305774855145-4408627.post@n5.nabble.com> References: <1305770719877-4408514.post@n5.nabble.com> <1305774855145-4408627.post@n5.nabble.com> Message-ID: <1484201067093-5741764.post@n5.nabble.com> For those who are struggling with this I found a solution. first vtkDICOMImageReader doesn't support getting DICOM image properties for now(tested in vtk v7). To read DICOM image properties you need to download GDCM can be downloaded from here after download and extracting GDCM you need to open CMake in CMake Check those attributes 1-GDCM_USE_VTK and select VTK_DIR and vtk directory 2-GDCM_BUILD_SHARED_LIBS 3-GDCM_BUILD_APPLICATIONS now click configure and generate. Use your compiler to build it. In my case I got error while building GDCM that it could not find vtk lib files. which I already had in the folder. So I had to edit gdcm-2.6.6/build/cmake_install.cmake file under INSTALL DESTINATION I had to add lib in front of vtkCommonCore-7.0.dll and the rest of the files, since in my vtk bin folder all my files had lib prefix. once GDCM is ready now you need to configure vtk open vtk in CMake and set and check those attributes 1-GDCM_DIR select the build directory of GDCM 2-USE_GDCM now configure and generate. now you are ready to build vtk. next thing you need to do is set environment variable for gdcm and import lib to your project. now you are ready to use GDCM To get DICOM image properties you need to do the following vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(filename.c_str()); reader->Update(); reader->GetMedicalImageProperties()->GetPatientName(); // to get Patient Name as an example double w,l; reader->GetMedicalImageProperties()->GetNthWindowLevelPreset(0, &w, &l); // get window width and window level. Hope this helps. for any question you can send me an email at tehsunnliu at yahoo.com ----- Alex Liu +15574855474 -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-get-patient-s-information-using-vtkMedicalImageReader2-tp3350060p5741764.html Sent from the VTK - Users mailing list archive at Nabble.com. From tehsunnliu at yahoo.com Thu Jan 12 08:52:26 2017 From: tehsunnliu at yahoo.com (Teh Sunn Liu) Date: Thu, 12 Jan 2017 13:52:26 +0000 (UTC) Subject: [vtkusers] How to get patient's information using vtkMedicalImageReader2 ? In-Reply-To: References: <1305770719877-4408514.post@n5.nabble.com> <1305774855145-4408627.post@n5.nabble.com> <1484201067093-5741764.post@n5.nabble.com> Message-ID: <2024116897.2359462.1484229146912@mail.yahoo.com> Hello David.I'm like wow. I didn't know that there was vtkDICOMReader too. I spent so many days figuring out lol. And I installed vtkDICOM before then I removed it while installing GDCM. Thank you so much for informing me about vtkDICOMReader. I'll update my post so other people will know. Alex On Thursday, 12 January 2017 9:24 PM, David Gobbi wrote: Hi Alex, You can also try the vtkDICOMReader that comes with vtk-dicom. It provides easy access to all of the meta-data, rather than just the limited amount of information in the MedicalImageProperties object. http://dgobbi.github.io/vtk-dicom/doc/api/pages.html Cheers,? - David On Wed, Jan 11, 2017 at 11:04 PM, Alex Liu via vtkusers wrote: For those who are struggling with this I found a solution. first vtkDICOMImageReader doesn't support getting DICOM image properties for now(tested in vtk v7). To read DICOM image properties you need to download GDCM? can be downloaded from here after download and extracting GDCM you need to open CMake in CMake Check those attributes 1-GDCM_USE_VTK and select VTK_DIR and vtk directory 2-GDCM_BUILD_SHARED_LIBS 3-GDCM_BUILD_APPLICATIONS now click configure and generate. Use your compiler to build it. In my case I got error while building GDCM that it could not find vtk lib files. which I already had in the folder. So I had to edit gdcm-2.6.6/build/cmake_ install.cmake file under INSTALL DESTINATION I had to add lib in front of vtkCommonCore-7.0.dll and the rest of the files, since in my vtk bin folder all my files had lib prefix. once GDCM is ready now you need to configure vtk open vtk in CMake and set and check those attributes 1-GDCM_DIR select the build directory of GDCM 2-USE_GDCM now configure and generate. now you are ready to build vtk. next thing you need to do is set environment variable for gdcm and import lib to your project. now you are ready to use GDCM To get DICOM image properties you need to do the following vtkSmartPointer< vtkGDCMImageReader> reader = vtkSmartPointer< vtkGDCMImageReader>::New(); reader->SetFileName(filename. c_str()); reader->Update(); reader-> GetMedicalImageProperties()-> GetPatientName(); // to get Patient Name as an example double w,l; reader-> GetMedicalImageProperties()-> GetNthWindowLevelPreset(0, &w, &l); // get window width and window level. Hope this helps. for any question you can send me an email at tehsunnliu at yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 12 08:23:52 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 12 Jan 2017 06:23:52 -0700 Subject: [vtkusers] How to get patient's information using vtkMedicalImageReader2 ? In-Reply-To: <1484201067093-5741764.post@n5.nabble.com> References: <1305770719877-4408514.post@n5.nabble.com> <1305774855145-4408627.post@n5.nabble.com> <1484201067093-5741764.post@n5.nabble.com> Message-ID: Hi Alex, You can also try the vtkDICOMReader that comes with vtk-dicom. It provides easy access to all of the meta-data, rather than just the limited amount of information in the MedicalImageProperties object. http://dgobbi.github.io/vtk-dicom/doc/api/pages.html Cheers, - David On Wed, Jan 11, 2017 at 11:04 PM, Alex Liu via vtkusers wrote: > For those who are struggling with this I found a solution. > first vtkDICOMImageReader doesn't support getting DICOM image properties > for > now(tested in vtk v7). > To read DICOM image properties you need to download GDCM can be downloaded > from here > > after download and extracting GDCM you need to open CMake > in CMake Check those attributes > 1-GDCM_USE_VTK and select VTK_DIR and vtk directory > 2-GDCM_BUILD_SHARED_LIBS > 3-GDCM_BUILD_APPLICATIONS > now click configure and generate. Use your compiler to build it. > > In my case I got error while building GDCM that it could not find vtk lib > files. which I already had in the folder. So I had to edit > gdcm-2.6.6/build/cmake_install.cmake file under INSTALL DESTINATION I had > to > add lib in front of vtkCommonCore-7.0.dll and the rest of the files, since > in my vtk bin folder all my files had lib prefix. > > once GDCM is ready now you need to configure vtk > open vtk in CMake and set and check those attributes > 1-GDCM_DIR select the build directory of GDCM > 2-USE_GDCM > now configure and generate. > now you are ready to build vtk. > > next thing you need to do is set environment variable for gdcm and import > lib to your project. > now you are ready to use GDCM > > To get DICOM image properties you need to do the following > > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName(filename.c_str()); > reader->Update(); > reader->GetMedicalImageProperties()->GetPatientName(); // to get Patient > Name as an example > > double w,l; > reader->GetMedicalImageProperties()->GetNthWindowLevelPreset(0, &w, &l); > // > get window width and window level. > > Hope this helps. > > for any question you can send me an email at tehsunnliu at yahoo.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjordan at live.at Thu Jan 12 11:24:32 2017 From: mjordan at live.at (M. Jordan) Date: Thu, 12 Jan 2017 16:24:32 +0000 Subject: [vtkusers] vtkDelaunay3D's ouput too coarse Message-ID: Hi guys, I use vtkDelaunay3D to get the alpha hull of a .vtk polydata file. The polydata itself looks great (rich in detail) but the ouput of vtkDelaunay3D (alpha hull) looks too course (too big triangles). vtkSmartPointer delaunay3DAlpha = vtkSmartPointer::New(); delaunay3DAlpha->SetInputConnection(reader->GetOutputPort()); delaunay3DAlpha->SetAlpha(10); delaunay3DAlpha->Update(); How can I improve the output? -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Thu Jan 12 15:12:51 2017 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Thu, 12 Jan 2017 13:12:51 -0700 Subject: [vtkusers] How to re-load time information in ExodusIIReader In-Reply-To: References: Message-ID: Is there anyone who can help me with this issue? On Tue, Dec 20, 2016 at 11:32 AM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I am reading a file that contains 2 timesteps, but is then updated and has > an additional timestep. How can a reload the vtkExodusIIReader to get the > new time information. > > I attached a python script demonstrating what I am doing, but I will > summarize here. My test script has two files (diffusion_1.e and > diffusion_2.e that have 2 and 3 timestep respectively). If I create a > vtkExodusIIReader and change the filename then I get the correct number. > > But, if I copy the files to a common filename I always get 2, even when > the file has changed to have 3 timesteps. > > Any help would be appreciated, > > Andrew > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tehsunnliu at yahoo.com Fri Jan 13 02:07:23 2017 From: tehsunnliu at yahoo.com (Alex Liu) Date: Fri, 13 Jan 2017 00:07:23 -0700 (MST) Subject: [vtkusers] Program crashes at return EXIT_SUCCESS in QT Creator In-Reply-To: References: <1482226199285-5741607.post@n5.nabble.com> Message-ID: <1484291243032-5741766.post@n5.nabble.com> I actually fixed the problem. I just moved those lines inside main function. VTK_MODULE_INIT(vtkInteractionStyle) VTK_MODULE_INIT(vtkRenderingOpenGL2) No more error. ----- Alex Liu +15574855474 -- View this message in context: http://vtk.1045678.n5.nabble.com/Program-crashes-at-return-EXIT-SUCCESS-in-QT-Creator-tp5741607p5741766.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Fri Jan 13 09:57:12 2017 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 13 Jan 2017 09:57:12 -0500 Subject: [vtkusers] testing mailing list, please ignore Message-ID: David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.thompson at kitware.com Fri Jan 13 10:19:39 2017 From: david.thompson at kitware.com (David Thompson) Date: Fri, 13 Jan 2017 10:19:39 -0500 Subject: [vtkusers] How to re-load time information in ExodusIIReader In-Reply-To: References: Message-ID: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> Hi Andrew, Does calling Modified() on the reader cause an update? If not, how about calling SetFileName(NULL) and then SetFileName(previousFileName)? Note that the latter will (should, anyway) invalidate the reader's cache, so it is not without a cost. ParaView has had this feature requested (for information to get updated when the file gets changed) before and I don't recall whether something was done to address it or not. David > On Jan 12, 2017, at 3:12 PM, Slaughter, Andrew E wrote: > > Is there anyone who can help me with this issue? > > On Tue, Dec 20, 2016 at 11:32 AM, Slaughter, Andrew E wrote: > I am reading a file that contains 2 timesteps, but is then updated and has an additional timestep. How can a reload the vtkExodusIIReader to get the new time information. > > I attached a python script demonstrating what I am doing, but I will summarize here. My test script has two files (diffusion_1.e and diffusion_2.e that have 2 and 3 timestep respectively). If I create a vtkExodusIIReader and change the filename then I get the correct number. > > But, if I copy the files to a common filename I always get 2, even when the file has changed to have 3 timesteps. > > Any help would be appreciated, > > Andrew > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From andy.bauer at kitware.com Fri Jan 13 10:35:24 2017 From: andy.bauer at kitware.com (Andy Bauer) Date: Fri, 13 Jan 2017 10:35:24 -0500 Subject: [vtkusers] How to re-load time information in ExodusIIReader In-Reply-To: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> References: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> Message-ID: You should be able to reload a file through Edit->Reload Files option. Note that on Linux F5 is the shortcut for that. The menu should show you the proper shortcut on your machine. On Fri, Jan 13, 2017 at 10:19 AM, David Thompson wrote: > Hi Andrew, > > Does calling Modified() on the reader cause an update? If not, how about > calling SetFileName(NULL) and then SetFileName(previousFileName)? Note that > the latter will (should, anyway) invalidate the reader's cache, so it is > not without a cost. > > ParaView has had this feature requested (for information to get updated > when the file gets changed) before and I don't recall whether something was > done to address it or not. > > David > > > On Jan 12, 2017, at 3:12 PM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > > > > Is there anyone who can help me with this issue? > > > > On Tue, Dec 20, 2016 at 11:32 AM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > > I am reading a file that contains 2 timesteps, but is then updated and > has an additional timestep. How can a reload the vtkExodusIIReader to get > the new time information. > > > > I attached a python script demonstrating what I am doing, but I will > summarize here. My test script has two files (diffusion_1.e and > diffusion_2.e that have 2 and 3 timestep respectively). If I create a > vtkExodusIIReader and change the filename then I get the correct number. > > > > But, if I copy the files to a common filename I always get 2, even when > the file has changed to have 3 timesteps. > > > > Any help would be appreciated, > > > > Andrew > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 Fri Jan 13 10:36:24 2017 From: andy.bauer at kitware.com (Andy Bauer) Date: Fri, 13 Jan 2017 10:36:24 -0500 Subject: [vtkusers] How to re-load time information in ExodusIIReader In-Reply-To: References: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> Message-ID: Oops, just realized that this was on the VTK mailing list and not the ParaView mailing list. You should probably go with David's response for VTK. On Fri, Jan 13, 2017 at 10:35 AM, Andy Bauer wrote: > You should be able to reload a file through Edit->Reload Files option. > Note that on Linux F5 is the shortcut for that. The menu should show you > the proper shortcut on your machine. > > On Fri, Jan 13, 2017 at 10:19 AM, David Thompson < > david.thompson at kitware.com> wrote: > >> Hi Andrew, >> >> Does calling Modified() on the reader cause an update? If not, how about >> calling SetFileName(NULL) and then SetFileName(previousFileName)? Note that >> the latter will (should, anyway) invalidate the reader's cache, so it is >> not without a cost. >> >> ParaView has had this feature requested (for information to get updated >> when the file gets changed) before and I don't recall whether something was >> done to address it or not. >> >> David >> >> > On Jan 12, 2017, at 3:12 PM, Slaughter, Andrew E < >> andrew.slaughter at inl.gov> wrote: >> > >> > Is there anyone who can help me with this issue? >> > >> > On Tue, Dec 20, 2016 at 11:32 AM, Slaughter, Andrew E < >> andrew.slaughter at inl.gov> wrote: >> > I am reading a file that contains 2 timesteps, but is then updated and >> has an additional timestep. How can a reload the vtkExodusIIReader to get >> the new time information. >> > >> > I attached a python script demonstrating what I am doing, but I will >> summarize here. My test script has two files (diffusion_1.e and >> diffusion_2.e that have 2 and 3 timestep respectively). If I create a >> vtkExodusIIReader and change the filename then I get the correct number. >> > >> > But, if I copy the files to a common filename I always get 2, even when >> the file has changed to have 3 timesteps. >> > >> > Any help would be appreciated, >> > >> > Andrew >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> 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.slaughter at inl.gov Fri Jan 13 10:42:19 2017 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Fri, 13 Jan 2017 08:42:19 -0700 Subject: [vtkusers] How to re-load time information in ExodusIIReader In-Reply-To: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> References: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> Message-ID: On Fri, Jan 13, 2017 at 8:19 AM, David Thompson wrote: > Hi Andrew, > > Does calling Modified() on the reader cause an update? If not, how about > calling SetFileName(NULL) and then SetFileName(previousFileName)? Note that > the latter will (should, anyway) invalidate the reader's cache, so it is > not without a cost. > I am doing the following and nothing changes the behavior: reader.SetFileName(None) reader.GetExecutive().GetOutputInformation(0).Remove(vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS()) reader.ResetSettings() reader.ResetCache() reader.Modified() > ParaView has had this feature requested (for information to get updated > when the file gets changed) before and I don't recall whether something was > done to address it or not. > > David > > > On Jan 12, 2017, at 3:12 PM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > > > > Is there anyone who can help me with this issue? > > > > On Tue, Dec 20, 2016 at 11:32 AM, Slaughter, Andrew E < > andrew.slaughter at inl.gov> wrote: > > I am reading a file that contains 2 timesteps, but is then updated and > has an additional timestep. How can a reload the vtkExodusIIReader to get > the new time information. > > > > I attached a python script demonstrating what I am doing, but I will > summarize here. My test script has two files (diffusion_1.e and > diffusion_2.e that have 2 and 3 timestep respectively). If I create a > vtkExodusIIReader and change the filename then I get the correct number. > > > > But, if I copy the files to a common filename I always get 2, even when > the file has changed to have 3 timesteps. > > > > Any help would be appreciated, > > > > Andrew > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > https://urldefense.proofpoint.com/v2/url?u=http-3A__www. > kitware.com_opensource_opensource.html&d=DQIFAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=W1vKstuEGq- > lNynopbSrIwOQtVR21SJhJxwg3144Opw&s=I7tOUUvI2lc5- > Eug4ZanDkvXqd8Rvsh6y8RPRwskGXw&e= > > > > Please keep messages on-topic and check the VTK FAQ at: > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk. > org_Wiki_VTK-5FFAQ&d=DQIFAg&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB_ > _aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=W1vKstuEGq- > lNynopbSrIwOQtVR21SJhJxwg3144Opw&s=PapWYmdBGkq3LB9WjMmMlZ7L_ > kGw3Vt7OaN_h_K4scs&e= > > > > Search the list archives at: https://urldefense.proofpoint. > com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DQIFAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=W1vKstuEGq- > lNynopbSrIwOQtVR21SJhJxwg3144Opw&s=YXE_cbXDb_lkTgxTDXRFyPaxxS7x4_zBiKN8_ > BDyVBU&e= > > > > Follow this link to subscribe/unsubscribe: > > https://urldefense.proofpoint.com/v2/url?u=http-3A__public. > kitware.com_mailman_listinfo_vtkusers&d=DQIFAg&c= > 54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_ > HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=W1vKstuEGq- > lNynopbSrIwOQtVR21SJhJxwg3144Opw&s=Ye48KJ2KUQJ0PFq7X8pMHtXNg0JOs_ > 8BvXi88lpQWgc&e= > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Fri Jan 13 10:45:58 2017 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Fri, 13 Jan 2017 08:45:58 -0700 Subject: [vtkusers] How to re-load time information in ExodusIIReader In-Reply-To: References: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> Message-ID: On Fri, Jan 13, 2017 at 8:35 AM, Andy Bauer wrote: > You should be able to reload a file through Edit->Reload Files option. > Note that on Linux F5 is the shortcut for that. The menu should show you > the proper shortcut on your machine. > > How does Paraview handle this? I have tried finding the code in the paraview ExodusIIReaer but have not been successful tracking this down. I have not looked for the code for the reload button, can you point me to where that might be? > On Fri, Jan 13, 2017 at 10:19 AM, David Thompson < > david.thompson at kitware.com> wrote: > >> Hi Andrew, >> >> Does calling Modified() on the reader cause an update? If not, how about >> calling SetFileName(NULL) and then SetFileName(previousFileName)? Note that >> the latter will (should, anyway) invalidate the reader's cache, so it is >> not without a cost. >> >> ParaView has had this feature requested (for information to get updated >> when the file gets changed) before and I don't recall whether something was >> done to address it or not. >> >> David >> >> > On Jan 12, 2017, at 3:12 PM, Slaughter, Andrew E < >> andrew.slaughter at inl.gov> wrote: >> > >> > Is there anyone who can help me with this issue? >> > >> > On Tue, Dec 20, 2016 at 11:32 AM, Slaughter, Andrew E < >> andrew.slaughter at inl.gov> wrote: >> > I am reading a file that contains 2 timesteps, but is then updated and >> has an additional timestep. How can a reload the vtkExodusIIReader to get >> the new time information. >> > >> > I attached a python script demonstrating what I am doing, but I will >> summarize here. My test script has two files (diffusion_1.e and >> diffusion_2.e that have 2 and 3 timestep respectively). If I create a >> vtkExodusIIReader and change the filename then I get the correct number. >> > >> > But, if I copy the files to a common filename I always get 2, even when >> the file has changed to have 3 timesteps. >> > >> > Any help would be appreciated, >> > >> > Andrew >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> >> > >> > Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> >> 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.slaughter at inl.gov Fri Jan 13 11:08:03 2017 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Fri, 13 Jan 2017 09:08:03 -0700 Subject: [vtkusers] How to re-load time information in ExodusIIReader In-Reply-To: References: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> Message-ID: Forget my last responses, Modified() seems to be working! On Fri, Jan 13, 2017 at 8:45 AM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > > On Fri, Jan 13, 2017 at 8:35 AM, Andy Bauer > wrote: > >> You should be able to reload a file through Edit->Reload Files option. >> Note that on Linux F5 is the shortcut for that. The menu should show you >> the proper shortcut on your machine. >> >> How does Paraview handle this? I have tried finding the code in the > paraview ExodusIIReaer but have not been successful tracking this down. I > have not looked for the code for the reload button, can you point me to > where that might be? > > >> On Fri, Jan 13, 2017 at 10:19 AM, David Thompson < >> david.thompson at kitware.com> wrote: >> >>> Hi Andrew, >>> >>> Does calling Modified() on the reader cause an update? If not, how about >>> calling SetFileName(NULL) and then SetFileName(previousFileName)? Note that >>> the latter will (should, anyway) invalidate the reader's cache, so it is >>> not without a cost. >>> >>> ParaView has had this feature requested (for information to get updated >>> when the file gets changed) before and I don't recall whether something was >>> done to address it or not. >>> >>> David >>> >>> > On Jan 12, 2017, at 3:12 PM, Slaughter, Andrew E < >>> andrew.slaughter at inl.gov> wrote: >>> > >>> > Is there anyone who can help me with this issue? >>> > >>> > On Tue, Dec 20, 2016 at 11:32 AM, Slaughter, Andrew E < >>> andrew.slaughter at inl.gov> wrote: >>> > I am reading a file that contains 2 timesteps, but is then updated and >>> has an additional timestep. How can a reload the vtkExodusIIReader to get >>> the new time information. >>> > >>> > I attached a python script demonstrating what I am doing, but I will >>> summarize here. My test script has two files (diffusion_1.e and >>> diffusion_2.e that have 2 and 3 timestep respectively). If I create a >>> vtkExodusIIReader and change the filename then I get the correct number. >>> > >>> > But, if I copy the files to a common filename I always get 2, even >>> when the file has changed to have 3 timesteps. >>> > >>> > Any help would be appreciated, >>> > >>> > Andrew >>> > >>> > _______________________________________________ >>> > Powered by www.kitware.com >>> >>> > >>> > Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> > >>> > Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> > >>> > Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> > >>> > Follow this link to subscribe/unsubscribe: >>> > http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> >>> 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.thompson at kitware.com Fri Jan 13 11:57:45 2017 From: david.thompson at kitware.com (David Thompson) Date: Fri, 13 Jan 2017 11:57:45 -0500 Subject: [vtkusers] How to re-load time information in ExodusIIReader In-Reply-To: References: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> Message-ID: Hi Andrew, The code in ParaView that does this is in Qt/ApplicationComponents/pqReloadFilesReaction.cxx and ParaViewCore/ServerManager/Default/vtkSMReaderReloadHelper.cxx . David On Jan 13, 2017, at 10:45 AM, Slaughter, Andrew E wrote: > > > On Fri, Jan 13, 2017 at 8:35 AM, Andy Bauer wrote: > You should be able to reload a file through Edit->Reload Files option. Note that on Linux F5 is the shortcut for that. The menu should show you the proper shortcut on your machine. > > How does Paraview handle this? I have tried finding the code in the paraview ExodusIIReaer but have not been successful tracking this down. I have not looked for the code for the reload button, can you point me to where that might be? > > On Fri, Jan 13, 2017 at 10:19 AM, David Thompson wrote: > Hi Andrew, > > Does calling Modified() on the reader cause an update? If not, how about calling SetFileName(NULL) and then SetFileName(previousFileName)? Note that the latter will (should, anyway) invalidate the reader's cache, so it is not without a cost. > > ParaView has had this feature requested (for information to get updated when the file gets changed) before and I don't recall whether something was done to address it or not. > > David > > > On Jan 12, 2017, at 3:12 PM, Slaughter, Andrew E wrote: > > > > Is there anyone who can help me with this issue? > > > > On Tue, Dec 20, 2016 at 11:32 AM, Slaughter, Andrew E wrote: > > I am reading a file that contains 2 timesteps, but is then updated and has an additional timestep. How can a reload the vtkExodusIIReader to get the new time information. > > > > I attached a python script demonstrating what I am doing, but I will summarize here. My test script has two files (diffusion_1.e and diffusion_2.e that have 2 and 3 timestep respectively). If I create a vtkExodusIIReader and change the filename then I get the correct number. > > > > But, if I copy the files to a common filename I always get 2, even when the file has changed to have 3 timesteps. > > > > Any help would be appreciated, > > > > Andrew > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > From david.thompson at kitware.com Fri Jan 13 11:59:09 2017 From: david.thompson at kitware.com (David Thompson) Date: Fri, 13 Jan 2017 11:59:09 -0500 Subject: [vtkusers] How to re-load time information in ExodusIIReader In-Reply-To: References: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> Message-ID: > Forget my last responses, Modified() seems to be working! Great! David From sur.chiranjib at gmail.com Fri Jan 13 12:55:06 2017 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Fri, 13 Jan 2017 23:25:06 +0530 Subject: [vtkusers] vtkDelaunay3D's ouput too coarse In-Reply-To: References: Message-ID: Hi Jordan, Play with the value of Alpha delaunay3DAlpha->SetAlpha(10); ----> replace 10 with any other numbers (smaller and larger) and you will see differences. Thanks, Chiranjib On Thu, Jan 12, 2017 at 9:54 PM, M. Jordan wrote: > Hi guys, > > I use vtkDelaunay3D to get the alpha hull of a .vtk polydata file. > The polydata itself looks great (rich in detail) but the ouput of > vtkDelaunay3D (alpha hull) looks too course (too big triangles). > > vtkSmartPointer delaunay3DAlpha = > vtkSmartPointer::New(); > delaunay3DAlpha->SetInputConnection(reader->GetOutputPort()); > delaunay3DAlpha->SetAlpha(10); > delaunay3DAlpha->Update(); > > How can I improve the output? > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Fri Jan 13 13:43:11 2017 From: bebe0705 at colorado.edu (BBerco) Date: Fri, 13 Jan 2017 11:43:11 -0700 (MST) Subject: [vtkusers] Arbitrary connectivity table to triangle-only connectivity table? Message-ID: <1484332991633-5741786.post@n5.nabble.com> Dear all, I am dealing with the connectivity table of a polygon that is a mix of triangular/quadrangular/else facets. That is, the connectivity looks like this: 0 : 0 1 2 3 4 1 : 0 1 2 3 4 5 6 2 : 0 2 3 4 5 6 7 3 : 4 5 6 7 8 4 : 2 3 4 6 7 8 5 : 1 2 3 4 5 6 7 8 My point is that there should be only three indices after the ":" symbol. Is there a filter in VTK I could provide this connectivity table with, and that would return a triangular-facet only connectivity table (obviously with more rows/facets, but with those facets comprised of exactly three vertices instead)? Best, Ben -- View this message in context: http://vtk.1045678.n5.nabble.com/Arbitrary-connectivity-table-to-triangle-only-connectivity-table-tp5741786.html Sent from the VTK - Users mailing list archive at Nabble.com. From andrew.slaughter at inl.gov Fri Jan 13 15:22:59 2017 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Fri, 13 Jan 2017 13:22:59 -0700 Subject: [vtkusers] How to re-load time information in ExodusIIReader In-Reply-To: References: <81FCE6C5-8212-48B8-8ADB-EA72DF2F36CB@kitware.com> Message-ID: I am still experiencing problems, the Modified() call works only if I don't change any settings. For example, inserting a call to SetSqueezePoints causes the wrong number of steps to be reported. Thanks for the help on this. On Fri, Jan 13, 2017 at 9:59 AM, David Thompson wrote: > > Forget my last responses, Modified() seems to be working! > > Great! > > David > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: diffusion_1.e Type: application/octet-stream Size: 30092 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: diffusion_2.e Type: application/octet-stream Size: 31068 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Reload.py Type: text/x-python-script Size: 913 bytes Desc: not available URL: From seun at rogue-research.com Fri Jan 13 16:40:15 2017 From: seun at rogue-research.com (Seun Odutola) Date: Fri, 13 Jan 2017 16:40:15 -0500 Subject: [vtkusers] Reproducible : vtkBooleanOperationPolyDataFilter for clipping (issue) in VTK 7.1 In-Reply-To: References: Message-ID: <523B8402-BC1D-4FDE-99B0-F14F01F4C33A@rogue-research.com> Hello everyone, I posted few weeks back about a niggling issue I have been facing for a while involving clipping two meshes together using vtkBooleanOperationPolyDataFilter, please see below my previous post. I have been able to write a little application that reproduces this crash easily so that others can review the code and see what needs to be fixed. See issue #16954 https://gitlab.kitware.com/vtk/vtk/issues/16954 > On Dec 23, 2016, at 12:49 PM, Seun Odutola wrote: > > Hello everyone, > > I have a reproducible case where I am trying to clip two meshes, when the function vtkBooleanOperationPolyDataFilter::RequestData is executed its call to SortPolyData fails triggering a crash trying to access the first index of polydata?s cell (see vtkBooleanOperationPolyDataFilter::SortPolyData line 62). On tracing the cause of the crash, I noticed that the polydata?s cell data array is null and there seems to be no guard against trying to probe its value, secondly prior to calling SortPolyData, two vtkPolyData?s pd0 & pd1 of which the latter possess no poly and both have their cells and links generated but the latter still lacks poly. I decided to introduce a condition just before building the cells and links for both pd0 and pd1 to check if either have no poly and if so exit the function (return 0), doing so completely prevents my program from crashing. I am not sure if this is the right approach nor if adding the check is necessary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexgoins301 at gmail.com Fri Jan 13 17:46:44 2017 From: alexgoins301 at gmail.com (Alex Goins) Date: Fri, 13 Jan 2017 16:46:44 -0600 Subject: [vtkusers] Multiple issues with IntersectionPolyDataFilter Message-ID: I am trying to create multiple lines on a surface mesh by calculating the intersection between the target mesh and a second surface/plane. I am having lots of issues with the IntersectionPolyDataFilter either not finding the intersection or causing the program to crash. If I move the intersecting surface ever so slightly to one side, it seems to work fine. Does anyone know what is causing it to crash or not return the intersection? In other cases, I am getting a lot of other warnings for "no cell with correct orientation" and "edge not recovered, polygon fill suspect" but I don't know if these are related to my previously mentioned issues. Here is some code to reproduce the issues. Btw, I am running version 7.1 from source (downloaded it about a month ago). I have not been able to create a minimum reproducible set of code to recreate the issue of not finding intersections yet. Any help is appreciated. Thanks! Alex #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vtkSmartPointer createSurfaceFromSpline(vtkSmartPointer line, double dist) { vtkSmartPointer new_surface; vtkSmartPointer normals = line->GetPointData()->GetNormals(); if(!normals) { cout << "no normals, cannot create surface\n"; return new_surface; } new_surface = vtkSmartPointer::New(); vtkSmartPointer cells = vtkSmartPointer::New(); vtkSmartPointer points = vtkSmartPointer::New(); // for each point, insert 2 points, one above and one below, to create a new surface for(int i = 0; i < normals->GetNumberOfTuples(); ++i) { double* norm = normals->GetTuple(i); double* pt = line->GetPoints()->GetPoint(i); // insert the cell ids to create triangles if(i < normals->GetNumberOfTuples()-1) { vtkIdType start = i*2; cells->InsertNextCell(3); cells->InsertCellPoint(start); cells->InsertCellPoint(start+1); cells->InsertCellPoint(start+3); cells->InsertNextCell(3); cells->InsertCellPoint(start); cells->InsertCellPoint(start+3); cells->InsertCellPoint(start+2); } double new_pt[3]; new_pt[0] = pt[0] + norm[0] * dist; new_pt[1] = pt[1] + norm[1] * dist; new_pt[2] = pt[2] + norm[2] * dist; points->InsertNextPoint( new_pt); new_pt[0] = pt[0] - norm[0] * dist; new_pt[1] = pt[1] - norm[1] * dist; new_pt[2] = pt[2] - norm[2] * dist; points->InsertNextPoint( new_pt); } new_surface->SetPolys(cells); new_surface->SetPoints(points); return new_surface; } int main(int, char *[]) { // Custom surface vtkSmartPointer points = vtkSmartPointer::New(); unsigned int gridSize = 10; for(unsigned int x = 0; x < gridSize; x++) { for(unsigned int y = 0; y < gridSize; y++) { points->InsertNextPoint(x , y , 1.0 * cos(double(x)/2.0) - 1.0 * sin(double(y)/2.0) + vtkMath::Random(0.0, 0.001)); } } // Mesh custom surface vtkSmartPointer mesh = vtkSmartPointer::New(); mesh->SetPoints(points); // surface reconstruction vtkSmartPointer cf; vtkSmartPointer surf = vtkSmartPointer::New(); surf->SetInputData(mesh); surf->SetSampleSpacing(0.5); surf->SetNeighborhoodSize(5); surf->Update(); cf = vtkSmartPointer::New(); cf->SetInputConnection(surf->GetOutputPort()); cf->SetValue(0, 0.0); cf->Update(); vtkSmartPointer reverse = vtkSmartPointer::New(); reverse->SetInputConnection(cf->GetOutputPort()); reverse->ReverseCellsOn(); reverse->ReverseNormalsOn(); reverse->Update(); // create intersecting plane vtkSmartPointer line = vtkSmartPointer::New(); vtkSmartPointer norms = vtkSmartPointer::New(); vtkSmartPointer line_points = vtkSmartPointer::New(); norms->SetNumberOfComponents(3); ////////////////////////////// // NOTE: Change the first point (x,y) values to test various issues: // (0, -1, 0) -> code crash: "free(): invalid pointer" error // (1, -1, 0) -> No cell with correct orientation // (-2, -1, 0) -> code crash segmentation fault // remove the -1.0 in the below 'for' loop (see below NOTE); (-1, -1, 0) -> lots of vtkDelaunay2D "Edge not recovered, polygon fill suspect" errors before it finally crashes line_points->InsertNextPoint(0, -1, 0); ///////////////////////////// line_points->InsertNextPoint(10, 10, 0); double n[3] = {0, 0, 1}; norms->InsertNextTuple(n); norms->InsertNextTuple(n); line->SetPoints(line_points); line->GetPointData()->SetNormals(norms); vtkSmartPointer mesh2 = vtkSmartPointer::New(); mesh2 = createSurfaceFromSpline(line, 5.0); vtkSmartPointer intersectionPolyDataFilter = vtkSmartPointer::New(); intersectionPolyDataFilter->SetInputData( 0, reverse->GetOutput() ); for(int i = 0; i < 100; ++i) { cout << i << "\n"; //////////////////////////// // NOTE: remove the -1.0 from the X component to replicate the vtkDelaunay2D error (see NOTE above) double pt[3] = {float(i)/10.0 - 1.0, float(i)/10.0, 0}; //////////////////////////// line->GetPoints()->SetPoint(1, pt); mesh2 = createSurfaceFromSpline(line, 5.0); intersectionPolyDataFilter->SetInputData( 1, mesh2 ); intersectionPolyDataFilter->Update(); } // Add displays vtkSmartPointer mapper1 = vtkSmartPointer::New(); vtkSmartPointer mapper2 = vtkSmartPointer::New(); // display 1 mapper1->SetInputConnection( reverse->GetOutputPort() ); mapper1->ScalarVisibilityOff(); vtkSmartPointer actor1 = vtkSmartPointer::New(); actor1->SetMapper( mapper1 ); actor1->GetProperty()->SetOpacity(0.9); actor1->GetProperty()->SetColor(1,0,0); // display 2 mapper2->SetInputData( mesh2); mapper2->ScalarVisibilityOff(); vtkSmartPointer actor2 = vtkSmartPointer::New(); actor2->SetMapper( mapper2 ); actor2->GetProperty()->SetOpacity(0.9); actor2->GetProperty()->SetColor(0,1,0); vtkSmartPointer intersectionMapper = vtkSmartPointer::New(); intersectionMapper->SetInputConnection( intersectionPolyDataFilter->GetOutputPort() ); intersectionMapper->ScalarVisibilityOff(); vtkSmartPointer intersectionActor = vtkSmartPointer::New(); intersectionActor->SetMapper( intersectionMapper ); vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->AddViewProp(actor1); renderer->AddViewProp(actor2); renderer->AddViewProp(intersectionActor); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer( renderer ); vtkSmartPointer renWinInteractor = vtkSmartPointer::New(); renWinInteractor->SetRenderWindow( renderWindow ); renderWindow->Render(); renWinInteractor->Start(); return EXIT_SUCCESS; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Jan 13 17:58:43 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 13 Jan 2017 17:58:43 -0500 Subject: [vtkusers] Arbitrary connectivity table to triangle-only connectivity table? In-Reply-To: <1484332991633-5741786.post@n5.nabble.com> References: <1484332991633-5741786.post@n5.nabble.com> Message-ID: vtkTriangleFilter On Fri, Jan 13, 2017 at 1:43 PM, BBerco wrote: > Dear all, > > I am dealing with the connectivity table of a polygon that is a mix of > triangular/quadrangular/else facets. > That is, the connectivity looks like this: > > 0 : 0 1 2 3 4 > 1 : 0 1 2 3 4 5 6 > 2 : 0 2 3 4 5 6 7 > 3 : 4 5 6 7 8 > 4 : 2 3 4 6 7 8 > 5 : 1 2 3 4 5 6 7 8 > > My point is that there should be only three indices after the ":" symbol. > > Is there a filter in VTK I could provide this connectivity table with, and > that would return a triangular-facet only connectivity table (obviously with > more rows/facets, but with those facets comprised of exactly three vertices > instead)? > > Best, > Ben > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Arbitrary-connectivity-table-to-triangle-only-connectivity-table-tp5741786.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From bebe0705 at colorado.edu Sat Jan 14 06:21:33 2017 From: bebe0705 at colorado.edu (BBerco) Date: Sat, 14 Jan 2017 04:21:33 -0700 (MST) Subject: [vtkusers] Arbitrary connectivity table to triangle-only connectivity table? In-Reply-To: References: <1484332991633-5741786.post@n5.nabble.com> Message-ID: <1484392893482-5741792.post@n5.nabble.com> Bill, thanks for pointing out vtkTriangleFilter. However the filter appears to fail (i.e returns a polydata with 0 polys) when the input polydata has self-intersecting cell borders like those shown on the attached pictures. This is due to the inconsistency of the original connectivity table. I have more topological information about the vertices (which edges they belong to) so I should be able to sort it out. -- View this message in context: http://vtk.1045678.n5.nabble.com/Arbitrary-connectivity-table-to-triangle-only-connectivity-table-tp5741786p5741792.html Sent from the VTK - Users mailing list archive at Nabble.com. From rcourant at gmail.com Sat Jan 14 13:35:30 2017 From: rcourant at gmail.com (Carlos Lopez) Date: Sat, 14 Jan 2017 13:35:30 -0500 Subject: [vtkusers] VTK crashes when adding multiple lights Message-ID: Hello Everyone, I'm working on illuminating a scene and noticed that adding more than 6 lights cause issues; if they are not positional, then spurious colors start appearing after adding 6 and vtk crashes after adding 19 lights. It the lamps are positional, then it crashes when adding more than 6. I'm not sure this is a bug, but the vtk light class does not indicate such a limitation. best, carlos -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.jacquenot at gmail.com Sat Jan 14 18:13:08 2017 From: guillaume.jacquenot at gmail.com (Guillaume Jacquenot) Date: Sun, 15 Jan 2017 00:13:08 +0100 Subject: [vtkusers] VTK Compilation without its rendering possibilities in Python 3 Message-ID: Hello everyone I want to use VTK without its rendering possibilities in Python 3 on Linux or Mac OSX. When I compile VTK, I have a include file error. This error occurs for VTK7 and VTK7.1 on Linux and Mac OSX. The error occurs on file Wrapping/Python/vtkAngularPeriodicDataArrayPython.cxx with error Common/Core/vtkAngularPeriodicDataArray.txx:17:10: fatal error: 'vtkMatrix3x3.h' file not found I disable the rendering with these specific options -DVTK_Group_Rendering:BOOL=OFF -DVTK_Group_StandAlone:BOOL=OFF The second option is required as discussed http://public.kitware.com/pipermail/vtkusers/2015-May/090915.html Below are the commands are that reproduced the bug, and the error Do I miss something with VTK configuration? wget http://www.vtk.org/files/release/7.1/VTK-7.1.0.tar.gz mkdir -p VTK_SRC tar -xf VTK-7.1.0.tar.gz --strip 1 -C VTK_SRC mkdir -p VTK_build cd VTK_build cmake -G Ninja \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_INSTALL_PREFIX:PATH=/opt/VTK \ -DVTK_Group_Imaging:BOOL=OFF \ -DVTK_Group_MPI:BOOL=OFF \ -DVTK_Group_Qt:BOOL=OFF \ -DVTK_Group_Rendering:BOOL=OFF \ -DVTK_Group_StandAlone:BOOL=OFF \ -DVTK_Group_Tk:BOOL=OFF \ -DVTK_Group_Views:BOOL=OFF \ -DVTK_Group_Web:BOOL=OFF \ -DBUILD_TESTING:BOOL=OFF \ -DBUILD_EXAMPLES:BOOL=OFF \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DVTK_WRAP_PYTHON:BOOL=ON \ -DVTK_PYTHON_VERSION:STRING=3 \ ../VTK_SRC $ ninja [2/45] Building CXX object Wrapping/Python/CMakeFiles/vtkCommonCorePythonD.dir/vtkAngularPeriodicDataArrayPython.cxx.o FAILED: Wrapping/Python/CMakeFiles/vtkCommonCorePythonD.dir/vtkAngularPeriodicDataArrayPython.cxx.o /Library/Developer/CommandLineTools/usr/bin/c++ -DVTK_IN_VTK -DvtkCommonCorePythonD_EXPORTS -ICommon/Core -I/Users/Guillaume/VTK_SRC/Common/Core -IUtilities/KWIML -I/Users/Guillaume/VTK_SRC/Utilities/KWIML -IUtilities/KWSys -I/Users/Guillaume/VTK_SRC/Utilities/KWSys -I/Users/Guillaume//VTK_SRC/Wrapping/Python -IWrapping/Python -I/Users/Guillaume/VTK_SRC/Utilities/Python -IUtilities/Python -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I/Users/Guillaume/VTK_SRC/Utilities -IWrapping/PythonCore -I/Users/Guillaume/VTK_SRC/Wrapping/PythonCore -O3 -DNDEBUG -fPIC -MD -MT Wrapping/Python/CMakeFiles/vtkCommonCorePythonD.dir/vtkAngularPeriodicDataArrayPython.cxx.o -MF Wrapping/Python/CMakeFiles/vtkCommonCorePythonD.dir/vtkAngularPeriodicDataArrayPython.cxx.o.d -o Wrapping/Python/CMakeFiles/vtkCommonCorePythonD.dir/vtkAngularPeriodicDataArrayPython.cxx.o -c /Users/Guillaume//VTK_build/Wrapping/Python/vtkAngularPeriodicDataArrayPython.cxx In file included from /Users/Guillaume//VTK_build/Wrapping/Python/vtkAngularPeriodicDataArrayPython.cxx:12: In file included from /Users/Guillaume/VTK_SRC/Common/Core/vtkAngularPeriodicDataArray.h:108: /Users/Guillaume/VTK_SRC/Common/Core/vtkAngularPeriodicDataArray.txx:17:10: fatal error: 'vtkMatrix3x3.h' file not found #include "vtkMatrix3x3.h" ^ 1 error generated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rsanthanam85 at gmail.com Sat Jan 14 20:54:30 2017 From: rsanthanam85 at gmail.com (rsanthanam) Date: Sat, 14 Jan 2017 18:54:30 -0700 (MST) Subject: [vtkusers] Quad Trees Message-ID: <1484445270235-5741796.post@n5.nabble.com> Hi I have been looking vtkHyperOctree to implement a quad tree for a wavelet decomposition of a 2d function. One of the things I would like to do is assign attributes to all the nodes in the tree. I noticed one can assign attributes only at the leaf level nodes which does not quite meet my needs. Was wondering if am missing something? Any suggestions would be appreciated. Regards ramesh -- View this message in context: http://vtk.1045678.n5.nabble.com/Quad-Trees-tp5741796.html Sent from the VTK - Users mailing list archive at Nabble.com. From anuj6491 at gmail.com Mon Jan 16 01:23:59 2017 From: anuj6491 at gmail.com (shaleen jain) Date: Mon, 16 Jan 2017 11:53:59 +0530 Subject: [vtkusers] VTK Query regarding volume rendering Message-ID: Why the output of the following code is just a box? import vtkimport picklefrom numpy import * data_matrix = Ilog dataImporter = vtk.vtkImageImport()# The preaviusly created array is converted to a string of chars and imported. data_string = data_matrix.tostring() dataImporter.CopyImportVoidPointer(data_string, len(data_string))# The type of the newly imported data is set to unsigned char (uint8) dataImporter.SetDataScalarTypeToUnsignedChar() # must be told this is the case. dataImporter.SetNumberOfScalarComponents(1)# The following two functions describe how the data is stored and the dimensions of the array it is stored in. For this# simple case, all axes are of length 75 and begins with the first element. For other data, this is probably not the case.# I have to admit however, that I honestly don't know the difference between SetDataExtent() and SetWholeExtent() although# VTK complains if not both are used. dataImporter.SetDataExtent(0, 727, 0, 727, 0, 24) dataImporter.SetWholeExtent(0, 727, 0, 727, 0, 24) # The following class is used to store transparency-values for later retrieval. In our case, we want the value 0 to be# completely opaque whereas the three different cubes are given different transparency-values to show how it works. alphaChannelFunc = vtk.vtkPiecewiseFunction() alphaChannelFunc.AddPoint(0, 1) alphaChannelFunc.AddPoint(0.5, 0.9) alphaChannelFunc.AddPoint(0.7, 0.9) alphaChannelFunc.AddPoint(1, 0) colorFunc = vtk.vtkColorTransferFunction() colorFunc.AddRGBPoint(0, 1,1,1) colorFunc.AddRGBPoint(0.2, 0.9, 0.9, 0.9) colorFunc.AddRGBPoint(0.7, 0.2, 0.2, 0.2) colorFunc.AddRGBPoint(1, 0, 0, 0) # The preavius two classes stored properties. Because we want to apply these properties to the volume we want to render,# we have to store them in a class that stores volume properties. volumeProperty = vtk.vtkVolumeProperty() volumeProperty.SetColor(colorFunc) volumeProperty.SetScalarOpacity(alphaChannelFunc) # This class describes how the volume is rendered (through ray tracing). compositeFunction = vtk.vtkVolumeRayCastCompositeFunction()# We can finally create our volume. We also have to specify the data for it, as well as how the data will be rendered. volumeMapper = vtk.vtkVolumeRayCastMapper() volumeMapper.SetVolumeRayCastFunction(compositeFunction) volumeMapper.SetInputConnection(dataImporter.GetOutputPort()) # The class vtkVolume is used to pair the previously declared volume as well as the properties to be used when rendering that volume. volume = vtk.vtkVolume() volume.SetMapper(volumeMapper) volume.SetProperty(volumeProperty) # With almost everything else ready, its time to initialize the renderer and window, as well as creating a method for exiting the application renderer = vtk.vtkRenderer() renderWin = vtk.vtkRenderWindow() renderWin.AddRenderer(renderer) renderInteractor = vtk.vtkRenderWindowInteractor() renderInteractor.SetRenderWindow(renderWin) # We add the volume to the renderer ... renderer.AddVolume(volume) # ... set background color to white ... renderer.SetBackground(0.5,0.5,0.7) # ... and set window size. renderWin.SetSize(800,800) # A simple function to be called when the user decides to quit the application.def exitCheck(obj, event): if obj.GetEventPending() != 0: obj.SetAbortRender(1) # Tell the application to use the function as an exit check. renderWin.AddObserver("AbortCheckEvent", exitCheck) renderInteractor.Initialize()# Because nothing will be rendered without any input, we order the first render manually before control is handed over to the main-loop. renderWin.Render() renderInteractor.Start() Ilog is logical matrix of size 728x728x25 whose cross-section looks like [image: enter image description here] In this image the red color signifies the value 1 and the blue color signifies the value 0. but when the above code is compiled the output is always a box like [image: enter image description here] . The matrix contains values just zeros and ones. Using that logic the value with zeros have given full transparency and the values with zero have full opacity. The question can also be found on: http://stackoverflow.com/ questions/41582754/why-the-output-of-the-following-code-is-just-a-box. Thanking you Best Regards, Shaleen Jain -------------- next part -------------- An HTML attachment was scrubbed... URL: From julien.jomier at kitware.com Mon Jan 16 03:33:02 2017 From: julien.jomier at kitware.com (Julien Jomier) Date: Mon, 16 Jan 2017 09:33:02 +0100 Subject: [vtkusers] ANN: CMake Course - March 13 in Lyon, France Message-ID: Kitware will be holding a CMake training course on March 13, 2017 at Kitware's office in Lyon, France. This one-day course will cover CMake, CTest, CPack and CDash. Visit our website for more information and registration details (early registration and student discounts available): http://training.kitware.fr/browse/129 Note that the course will be taught in English. If you have any questions, please contact me directly or training at kitware.fr. We are looking forward to seeing you in Lyon, Julien From jan-niklas.hasse at stw.de Mon Jan 16 04:48:22 2017 From: jan-niklas.hasse at stw.de (Jan Niklas Hasse) Date: Mon, 16 Jan 2017 10:48:22 +0100 Subject: [vtkusers] How to "undo" GetRenderWindow()->Render()? In-Reply-To: <601681.67359b01a17dda0e7446be438e1c87b7e5c74911@popretr.messagingengine.com> References: <1479466264.3597979.791981937.6FF3D20A@webmail.messagingengine.com> <601681.67359b01a17dda0e7446be438e1c87b7e5c74911@popretr.messagingengine.com> Message-ID: <1484560102.2312349.848955576.6A4D5FFD@webmail.messagingengine.com> Hi Dan, yes, kind of. The problem is, that with a lot of tabs I'm getting: Maximum number of clients reached ERROR: In [...]/VTK/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 530 vtkXOpenGLRenderWindow (0x32b207d0): bad X server connection. DISPLAY=:0. Aborting. calling chart->SetVisible(false) doesn't help unfortunately. I need to completely destroy the view somehow in hideEvent. Thanks Jan On Fri, 18 Nov 2016, at 14:57, Dan Lipsa wrote: > Jan, > To hide items in a scene you have to ?call SetVisible(false) on them. Is this what you are trying to do? > > Dan > > > > On Fri, Nov 18, 2016 at 5:51 AM, Jan Niklas Hasse wrote: >> Hi, >> >> I'm using VTK 6.2 with Qt. I've created a class Plot2D which inherits from QVTKWidget. I now have a lot of these plots widgets in a tabbed view and want to only render the ones that are currently visible (otherwise I get an OpenGL crash). >> >> void Plot2D::showEvent(QShowEvent*) { >> ? ? view = vtkSmartPointer::New(); >> ? ? view->GetRenderer()->SetBackground(1,1,1); >> ? ? view->SetRenderWindow(GetRenderWindow()); >> ? ? view->GetRenderWindow()->SetSize(width(),height()); >> ? ? view->GetScene()->AddItem(chart); >> ? ? view->GetRenderWindow()->SetMultiSamples(0); >> ? ? view->GetRenderWindow()->Render(); >> } >> >> void Plot2D::hideEvent(QHideEvent*) { >> ? ? view = nullptr; >> } >> >> Unfortunately, deleting the vtkContextView isn't enough: The next time showEvent is called, I get a crash inside VTK because it seems that view->GetRenderWindow()->Render(); has set up some kind of timer in the background. How would I solve this? >> >> Thanks in advance :) >> Jan >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers From ken.martin at kitware.com Mon Jan 16 08:15:44 2017 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 16 Jan 2017 08:15:44 -0500 Subject: [vtkusers] VTK crashes when adding multiple lights In-Reply-To: References: Message-ID: It is currently coded for a maximum of 6. In vtkOpenGLPolyDataMapper.cxx there are a bunch of [6] associated with the lighting code that could be made more general and specified at run time. On Sat, Jan 14, 2017 at 1:35 PM, Carlos Lopez wrote: > Hello Everyone, > > I'm working on illuminating a scene and noticed that adding more than 6 > lights cause issues; if they are not positional, then spurious colors start > appearing after adding 6 and vtk crashes after adding 19 lights. > It the lamps are positional, then it crashes when adding more than 6. > > I'm not sure this is a bug, but the vtk light class does not indicate such > a limitation. > > best, > carlos > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikhail.pukhlikov at outlook.com Mon Jan 16 08:53:12 2017 From: mikhail.pukhlikov at outlook.com (Mikhail Pukhlikov) Date: Mon, 16 Jan 2017 13:53:12 +0000 Subject: [vtkusers] 3D Rendering rotation issue with Opacity Message-ID: Hello there! We're using VTK for medical imaging but there is long standing issue we can't understand so far When 3D opacity is around 0.8 rotation gives some very strange mirror effect when near part is becoming invisible (very transparent) There is issue demonstration: https://drive.google.com/file/d/0B-Ae8luypUS0UTdTNjd6a1hoS2M/view I had opened an issue there: https://gitlab.kitware.com/vtk/vtk/issues/16950 Thank you, Mikhail -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 529 bytes Desc: This is a digitally signed message part URL: From ken.martin at kitware.com Mon Jan 16 09:05:51 2017 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 16 Jan 2017 09:05:51 -0500 Subject: [vtkusers] 3D Rendering rotation issue with Opacity In-Reply-To: References: Message-ID: If you want to correctly render transparent objects you need to use DepthPeeling For background on why see https://en.wikipedia.org/wiki/Depth_peeling renderer->UseDepthPeelingOn() By default VTK uses alpha blending which is faster but suffers from view dependent artifacts. In the new OpenGL2 backend depth peeling is supported everywhere so it might be worthwhile for us to turn it on by default with some low number of default peels for that backend. On Mon, Jan 16, 2017 at 8:53 AM, Mikhail Pukhlikov < mikhail.pukhlikov at outlook.com> wrote: > Hello there! > > We're using VTK for medical imaging but there is long standing issue we > can't understand so far > When 3D opacity is around 0.8 rotation gives some very strange mirror > effect when near part is becoming invisible (very transparent) > There is issue demonstration: https://drive.google.com/file/d/0B- > Ae8luypUS0UTdTNjd6a1hoS2M/view > > I had opened an issue there: https://gitlab.kitware.com/ > vtk/vtk/issues/16950 > > Thank you, > Mikhail > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Mon Jan 16 09:54:57 2017 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 16 Jan 2017 09:54:57 -0500 Subject: [vtkusers] Multiple issues with IntersectionPolyDataFilter In-Reply-To: References: Message-ID: Hi Alex, Yeah, that filter, and the boolean operations filter, fails on some configurations of input geometry, and it can be difficult to track down what is going on. That's why they are not more robust. I apologize for that, but it is a tricky operation to get right. At the moment, there are not resources to put into making the filter more robust, but we welcome community contributions to that end. Thanks, Cory On Fri, Jan 13, 2017 at 5:46 PM, Alex Goins wrote: > I am trying to create multiple lines on a surface mesh by calculating the > intersection between the target mesh and a second surface/plane. I am > having lots of issues with the IntersectionPolyDataFilter either not finding > the intersection or causing the program to crash. If I move the > intersecting surface ever so slightly to one side, it seems to work fine. > Does anyone know what is causing it to crash or not return the intersection? > In other cases, I am getting a lot of other warnings for "no cell with > correct orientation" and "edge not recovered, polygon fill suspect" but I > don't know if these are related to my previously mentioned issues. Here is > some code to reproduce the issues. Btw, I am running version 7.1 from > source (downloaded it about a month ago). I have not been able to create a > minimum reproducible set of code to recreate the issue of not finding > intersections yet. Any help is appreciated. > > Thanks! > Alex > > #include > #include > #include > #include > #include > #include > #include > #include > > #include > #include > #include > #include > #include > #include > #include > #include > #include > > > vtkSmartPointer > createSurfaceFromSpline(vtkSmartPointer line, double dist) > { > vtkSmartPointer new_surface; > vtkSmartPointer normals = > line->GetPointData()->GetNormals(); > > if(!normals) > { > cout << "no normals, cannot create surface\n"; > return new_surface; > } > > new_surface = vtkSmartPointer::New(); > vtkSmartPointer cells = > vtkSmartPointer::New(); > vtkSmartPointer points = vtkSmartPointer::New(); > > // for each point, insert 2 points, one above and one below, to create a > new surface > for(int i = 0; i < normals->GetNumberOfTuples(); ++i) > { > double* norm = normals->GetTuple(i); > double* pt = line->GetPoints()->GetPoint(i); > > // insert the cell ids to create triangles > if(i < normals->GetNumberOfTuples()-1) > { > vtkIdType start = i*2; > > cells->InsertNextCell(3); > cells->InsertCellPoint(start); > cells->InsertCellPoint(start+1); > cells->InsertCellPoint(start+3); > > cells->InsertNextCell(3); > cells->InsertCellPoint(start); > cells->InsertCellPoint(start+3); > cells->InsertCellPoint(start+2); > } > > double new_pt[3]; > new_pt[0] = pt[0] + norm[0] * dist; > new_pt[1] = pt[1] + norm[1] * dist; > new_pt[2] = pt[2] + norm[2] * dist; > > points->InsertNextPoint( new_pt); > > new_pt[0] = pt[0] - norm[0] * dist; > new_pt[1] = pt[1] - norm[1] * dist; > new_pt[2] = pt[2] - norm[2] * dist; > > points->InsertNextPoint( new_pt); > } > > new_surface->SetPolys(cells); > new_surface->SetPoints(points); > return new_surface; > } > > int main(int, char *[]) > { > // Custom surface > vtkSmartPointer points = vtkSmartPointer::New(); > > unsigned int gridSize = 10; > for(unsigned int x = 0; x < gridSize; x++) > { > for(unsigned int y = 0; y < gridSize; y++) > { > points->InsertNextPoint(x , y , 1.0 * cos(double(x)/2.0) - 1.0 * > sin(double(y)/2.0) + vtkMath::Random(0.0, 0.001)); > } > } > > // Mesh custom surface > vtkSmartPointer mesh = vtkSmartPointer::New(); > mesh->SetPoints(points); > > // surface reconstruction > vtkSmartPointer cf; > vtkSmartPointer surf = > vtkSmartPointer::New(); > > surf->SetInputData(mesh); > surf->SetSampleSpacing(0.5); > surf->SetNeighborhoodSize(5); > surf->Update(); > > cf = vtkSmartPointer::New(); > cf->SetInputConnection(surf->GetOutputPort()); > cf->SetValue(0, 0.0); > cf->Update(); > > vtkSmartPointer reverse = > vtkSmartPointer::New(); > reverse->SetInputConnection(cf->GetOutputPort()); > reverse->ReverseCellsOn(); > reverse->ReverseNormalsOn(); > reverse->Update(); > > // create intersecting plane > vtkSmartPointer line = vtkSmartPointer::New(); > vtkSmartPointer norms = > vtkSmartPointer::New(); > vtkSmartPointer line_points = > vtkSmartPointer::New(); > > norms->SetNumberOfComponents(3); > > ////////////////////////////// > // NOTE: Change the first point (x,y) values to test various issues: > // (0, -1, 0) -> code crash: "free(): invalid pointer" error > // (1, -1, 0) -> No cell with correct orientation > // (-2, -1, 0) -> code crash segmentation fault > // remove the -1.0 in the below 'for' loop (see below NOTE); (-1, -1, 0) > -> lots of vtkDelaunay2D "Edge not recovered, polygon fill suspect" errors > before it finally crashes > > line_points->InsertNextPoint(0, -1, 0); > ///////////////////////////// > > line_points->InsertNextPoint(10, 10, 0); > double n[3] = {0, 0, 1}; > > norms->InsertNextTuple(n); > norms->InsertNextTuple(n); > line->SetPoints(line_points); > line->GetPointData()->SetNormals(norms); > > vtkSmartPointer mesh2 = vtkSmartPointer::New(); > mesh2 = createSurfaceFromSpline(line, 5.0); > > > vtkSmartPointer intersectionPolyDataFilter > = > vtkSmartPointer::New(); > intersectionPolyDataFilter->SetInputData( 0, reverse->GetOutput() ); > > for(int i = 0; i < 100; ++i) > { > cout << i << "\n"; > > //////////////////////////// > // NOTE: remove the -1.0 from the X component to replicate the > vtkDelaunay2D error (see NOTE above) > double pt[3] = {float(i)/10.0 - 1.0, float(i)/10.0, 0}; > //////////////////////////// > > line->GetPoints()->SetPoint(1, pt); > mesh2 = createSurfaceFromSpline(line, 5.0); > > intersectionPolyDataFilter->SetInputData( 1, mesh2 ); > intersectionPolyDataFilter->Update(); > } > > > // Add displays > vtkSmartPointer mapper1 = > vtkSmartPointer::New(); > vtkSmartPointer mapper2 = > vtkSmartPointer::New(); > > // display 1 > mapper1->SetInputConnection( reverse->GetOutputPort() ); > mapper1->ScalarVisibilityOff(); > vtkSmartPointer actor1 = vtkSmartPointer::New(); > actor1->SetMapper( mapper1 ); > actor1->GetProperty()->SetOpacity(0.9); > actor1->GetProperty()->SetColor(1,0,0); > > // display 2 > mapper2->SetInputData( mesh2); > mapper2->ScalarVisibilityOff(); > vtkSmartPointer actor2 = vtkSmartPointer::New(); > actor2->SetMapper( mapper2 ); > actor2->GetProperty()->SetOpacity(0.9); > actor2->GetProperty()->SetColor(0,1,0); > > vtkSmartPointer intersectionMapper = > vtkSmartPointer::New(); > intersectionMapper->SetInputConnection( > intersectionPolyDataFilter->GetOutputPort() ); > intersectionMapper->ScalarVisibilityOff(); > > vtkSmartPointer intersectionActor = > vtkSmartPointer::New(); > intersectionActor->SetMapper( intersectionMapper ); > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > renderer->AddViewProp(actor1); > renderer->AddViewProp(actor2); > renderer->AddViewProp(intersectionActor); > > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > renderWindow->AddRenderer( renderer ); > > vtkSmartPointer renWinInteractor = > vtkSmartPointer::New(); > renWinInteractor->SetRenderWindow( renderWindow ); > > renderWindow->Render(); > renWinInteractor->Start(); > > return EXIT_SUCCESS; > } > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. From ya-lex at mail.ru Mon Jan 16 10:02:21 2017 From: ya-lex at mail.ru (AlexeyM) Date: Mon, 16 Jan 2017 08:02:21 -0700 (MST) Subject: [vtkusers] Wrong volume calculation (vtkMassProperties) Message-ID: <1484578941308-5741807.post@n5.nabble.com> Hello, I want to compute volume of arbitary polyhedron. I made test code, where polyhedron is created, converted to PolyData, triangulated and, finally, volume is computed. So, the volume of created polyhedron should be equal to 1.5, but vtkMassProperties output 0.4375. Points are entered right and Paraview visualise figure right. Please, help me to understand what's wrong with code? Thanks. #include #include #include #include #include #include #include #include #include #include #include #include "vtkDataArray.h" #include #include "vtkUnstructuredGrid.h" #include "vtkVersion.h" #include "vtkIdList.h" #include "vtkPoints.h" #include "vtkPolyhedron.h" #include "vtkPolyData.h" #include "vtkCellArray.h" #include "vtkPointData.h" #include "vtkXMLUnstructuredGridWriter.h" using namespace std; int main() { vtkSmartPointer aDodecahedron = vtkSmartPointer::New(); for (int i = 0; i < 10; ++i) { aDodecahedron->GetPointIds()->InsertNextId(i); } vtkIdType dodechedronPointsIds[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; aDodecahedron->GetPoints()->InsertNextPoint(0, 0, 0); aDodecahedron->GetPoints()->InsertNextPoint(1, 0, 0); aDodecahedron->GetPoints()->InsertNextPoint(0, 1, 0); aDodecahedron->GetPoints()->InsertNextPoint(1, 1, 0); aDodecahedron->GetPoints()->InsertNextPoint(0, 0, 1); //4 aDodecahedron->GetPoints()->InsertNextPoint(1, 0, 1); //5 aDodecahedron->GetPoints()->InsertNextPoint(0, 1, 1); //6 aDodecahedron->GetPoints()->InsertNextPoint(1, 1, 1); //7 aDodecahedron->GetPoints()->InsertNextPoint(2, 0.5, 1); //8 aDodecahedron->GetPoints()->InsertNextPoint(2, 0.5, 0); //9 vtkIdType face[7][5] = { { 0, 1, 9, 3, 2 }, { 4, 5, 8, 7, 6 }, { 0, 1, 5, 4 }, { 3, 9, 8, 7 }, { 2, 3, 7, 6 }, { 0, 2, 6, 4 }, { 1, 9, 8, 5 } }; vtkSmartPointer dodechedronFaces = vtkSmartPointer::New(); dodechedronFaces->InsertNextCell(5, face[0]); dodechedronFaces->InsertNextCell(5, face[1]); dodechedronFaces->InsertNextCell(4, face[2]); dodechedronFaces->InsertNextCell(4, face[3]); dodechedronFaces->InsertNextCell(4, face[4]); dodechedronFaces->InsertNextCell(4, face[5]); dodechedronFaces->InsertNextCell(4, face[6]); vtkSmartPointer ugrid1 = vtkSmartPointer::New(); ugrid1->SetPoints(aDodecahedron->GetPoints()); ugrid1->InsertNextCell(VTK_POLYHEDRON, 10, dodechedronPointsIds, 7, dodechedronFaces->GetPointer()); vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetInputData(ugrid1); writer->SetFileName("polyhedron1.vtu"); writer->SetDataModeToBinary(); writer->Update(); aDodecahedron->SetFaces(ugrid1->GetCell(0)->GetFaces()); aDodecahedron->Initialize(); //vtkSmartPointer polyData = aDodecahedron->GetPolyData(); vtkSmartPointer polyData = vtkSmartPointer::New(); vtkSmartPointer points = vtkSmartPointer::New(); vtkSmartPointer cellArray = vtkSmartPointer::New(); vtkSmartPointer polygon = vtkSmartPointer::New(); polygon->GetPointIds()->SetNumberOfIds(ugrid1->GetCell(0)->GetNumberOfPoints()); points = ugrid1->GetCell(0)->GetPoints(); for (int i = 0; i < ugrid1->GetCell(0)->GetNumberOfFaces(); i++) cellArray->InsertNextCell(ugrid1->GetCell(0)->GetFace(i)); polyData->SetPoints(points); polyData->SetPolys(cellArray); vtkSmartPointer triangles = vtkSmartPointer::New(); triangles->SetInputData(polyData); //triangles->SetInputConnection(polyData->GetOutput()); triangles->Update(); std::ostream& os = std::cout; triangles->Print(os); vtkSmartPointer mass = vtkSmartPointer::New(); //mass->SetInputConnection(triangles->GetOutputPort()); mass->SetInputData(triangles->GetOutput()); mass->Update(); mass->Print(os); return 1; } -- View this message in context: http://vtk.1045678.n5.nabble.com/Wrong-volume-calculation-vtkMassProperties-tp5741807.html Sent from the VTK - Users mailing list archive at Nabble.com. From kit.chambers.kc at gmail.com Mon Jan 16 12:17:43 2017 From: kit.chambers.kc at gmail.com (Kit Chambers) Date: Mon, 16 Jan 2017 17:17:43 +0000 Subject: [vtkusers] SetInputData and extents In-Reply-To: References: Message-ID: <07CA75F3-0934-47FB-8B84-4CCA94CD6CD1@googlemail.com> Hi All, I did some more digging on the and found a solution that works (at least so far). My custom VTK filter class (derived from vtkImageAlgorithm) contained a method RequestUpdateExtent, which contained the following code: for (int i=0; iGetNumberOfInputConnections(i); for (int j=0; jGetInformationObject(j); inputInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1); } } I changed: inputInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1); to: inputInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),WholeExtent,6); where the array WholeExtent is the maximum extent computed over all input and output ports. This seems to work, but I am not sure why. If anyone could point me in the direction of some explanation of the purpose behind extents in the VTK pipeline and how they are best used I would be very grateful. Thanks Kit > On 4 Jan 2017, at 12:56, Kit Chambers wrote: > > Hi All, > > I have a custom datatype (myType) derived from vtkImageData and a custom filter derived from vtkImageAlgorithm. The filter takes input on two ports which are both myType objects with different sizes. > > So in principle I should be able to set these inputs using either SetInputData() or SetInputConnection() right? However, when I run the filter I get errors like: > > ERROR: In ?. /vtk/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx, line 857 > vtkStreamingDemandDrivenPipeline (0x7fc6fa444a00): The update extent specified in the information for output port 0 on algorithm vtkTrivialProducer(0x7fc6fa4444a0) is 0 31 0 0 0 0, which is outside the whole extent 0 5 0 0 0 0. > > ERROR: In ?. /vtk/src/vtk/Common/ExecutionModel/vtkTrivialProducer.cxx, line 264 > vtkTrivialProducer (0x7fc6fa4444a0): This data object does not contain the requested extent. > > Any suggestions? Is there something I am missing here? > > Kit > > From david.gobbi at gmail.com Mon Jan 16 14:04:35 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 16 Jan 2017 12:04:35 -0700 Subject: [vtkusers] SetInputData and extents In-Reply-To: <07CA75F3-0934-47FB-8B84-4CCA94CD6CD1@googlemail.com> References: <07CA75F3-0934-47FB-8B84-4CCA94CD6CD1@googlemail.com> Message-ID: Hi Kit, The VTK image pipeline updates occur in three passes (RequestInformation(), RequestUpdateExtent(), RequestData()), which are discussed in the VTK Users's Guide and also on the following web page: http://www.vtk.org/Wiki/ VTK/Tutorials/New_Pipeline A filter should never directly set the WHOLE_EXTENT of its input. It is only allowed to set the WHOLE_EXTENT of its output. With respect to the extent, the three passes of the pipeline work like this: In RequestInformation(), a filter sets the WHOLE_EXTENT of its output. This is how a filter tells the pipeline "this is how data I can produce". A filter can be asked to produce less that this (as described in RequestUpdateExtent, below). In most cases, what a filter does in RequestInformation() is check the WHOLE_EXTENT of its input, and then use that same WHOLE_EXTENT for its output. In RequestUpdateExtent(), a filter can request that an produce less than the WHOLE_EXTENT of that input. It does this by setting the UPDATE_EXTENT of the input, while tells the pipeline "I need at least this much data from this input". Usually, it will set the UPDATE_EXTENT of the input to the WHOLE_EXTENT of the input. If a filter also sets EXACT_EXTENT for the input, that tells the pipeline "I need exactly this much data from this input". If you do not set EXACT_EXTENT, then the pipeline will produce at least as much data as requested by UPDATE_EXTENT, but possibly more. Finally, in RequestData() a filter should call GetExtent() on each input data object to see how data is actually there. - David On Mon, Jan 16, 2017 at 10:17 AM, Kit Chambers wrote: > Hi All, > > I did some more digging on the and found a solution that works (at least > so far). My custom VTK filter class (derived from vtkImageAlgorithm) > contained a method RequestUpdateExtent, which contained the following code: > > for (int i=0; i { > int numInputConnections = this->GetNumberOfInputConnections(i); > for (int j=0; j { > vtkInformation* inputInfo = inputVector[i]->GetInformationObject(j); > inputInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1); > } > } > > I changed: > inputInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), > 1); > > to: > inputInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), > WholeExtent,6); > > where the array WholeExtent is the maximum extent computed over all input > and output ports. > > This seems to work, but I am not sure why. If anyone could point me in the > direction of some explanation of the purpose behind extents in the VTK > pipeline and how they are best used I would be very grateful. > > Thanks > > Kit > > > > On 4 Jan 2017, at 12:56, Kit Chambers > wrote: > > > > Hi All, > > > > I have a custom datatype (myType) derived from vtkImageData and a custom > filter derived from vtkImageAlgorithm. The filter takes input on two ports > which are both myType objects with different sizes. > > > > So in principle I should be able to set these inputs using either > SetInputData() or SetInputConnection() right? However, when I run the > filter I get errors like: > > > > ERROR: In ?. /vtk/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx, > line 857 > > vtkStreamingDemandDrivenPipeline (0x7fc6fa444a00): The update extent > specified in the information for output port 0 on algorithm > vtkTrivialProducer(0x7fc6fa4444a0) is 0 31 0 0 0 0, which is outside the > whole extent 0 5 0 0 0 0. > > > > ERROR: In ?. /vtk/src/vtk/Common/ExecutionModel/vtkTrivialProducer.cxx, > line 264 > > vtkTrivialProducer (0x7fc6fa4444a0): This data object does not contain > the requested extent. > > > > Any suggestions? Is there something I am missing here? > > > > Kit > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Jan 16 14:11:38 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 16 Jan 2017 12:11:38 -0700 Subject: [vtkusers] SetInputData and extents In-Reply-To: References: <07CA75F3-0934-47FB-8B84-4CCA94CD6CD1@googlemail.com> Message-ID: I'm going to try again, with fewer typos: The VTK image pipeline updates occur in three passes (RequestInformation(), RequestUpdateExtent(), RequestData()), which are discussed in the VTK Users's Guide and also on the following web page: http://www.vtk.org/Wiki/VTK/Tutorials/New_Pipeline A filter should never directly set the WHOLE_EXTENT of its input. It is only allowed to set the WHOLE_EXTENT of its output. With respect to the extent, the three passes of the pipeline work like this: In RequestInformation(), a filter sets the WHOLE_EXTENT of its output. This is how a filter tells the pipeline "this is how much data I can produce". A filter can be asked to produce less than this (as described in RequestUpdateExtent, below). The default behavior of RequestInformation() is to check the WHOLE_EXTENT of the input, and then use that same WHOLE_EXTENT for the output. In RequestUpdateExtent(), a filter can request for the pipeline produce less than the WHOLE_EXTENT of that input. It does this by setting the UPDATE_EXTENT of the input, while tells the pipeline "I need at least this much data from this input". Usually, it will set the UPDATE_EXTENT of the input to the WHOLE_EXTENT of the input. If a filter also sets EXACT_EXTENT for the input, that tells the pipeline "I need exactly this much data from this input". If you do not set EXACT_EXTENT, then the pipeline will produce at least as much data as requested by UPDATE_EXTENT, but possibly more. Finally, in RequestData() a filter should call GetExtent() on each input data object to see how data is actually there. - David On Mon, Jan 16, 2017 at 12:04 PM, David Gobbi wrote: > Hi Kit, > > The VTK image pipeline updates occur in three passes > (RequestInformation(), RequestUpdateExtent(), RequestData()), which are > discussed in the VTK Users's Guide and also on the following web page: > http://www.vtk.org/Wiki/VTK/Tutorials/New_Pipeline > > A filter should never directly set the WHOLE_EXTENT of its input. It is > only allowed to set the WHOLE_EXTENT of its output. > > With respect to the extent, the three passes of the pipeline work like > this: > > In RequestInformation(), a filter sets the WHOLE_EXTENT of its output. > This is how a filter tells the pipeline "this is how data I can produce". > A filter can be asked to produce less that this (as described in > RequestUpdateExtent, below). In most cases, what a filter does in > RequestInformation() is check the WHOLE_EXTENT of its input, and then use > that same WHOLE_EXTENT for its output. > > In RequestUpdateExtent(), a filter can request that an produce less than > the WHOLE_EXTENT of that input. It does this by setting the UPDATE_EXTENT > of the input, while tells the pipeline "I need at least this much data from > this input". Usually, it will set the UPDATE_EXTENT of the input to the > WHOLE_EXTENT of the input. If a filter also sets EXACT_EXTENT for the > input, that tells the pipeline "I need exactly this much data from this > input". If you do not set EXACT_EXTENT, then the pipeline will produce at > least as much data as requested by UPDATE_EXTENT, but possibly more. > > Finally, in RequestData() a filter should call GetExtent() on each input > data object to see how data is actually there. > > - David > > > > > On Mon, Jan 16, 2017 at 10:17 AM, Kit Chambers > wrote: > >> Hi All, >> >> I did some more digging on the and found a solution that works (at least >> so far). My custom VTK filter class (derived from vtkImageAlgorithm) >> contained a method RequestUpdateExtent, which contained the following code: >> >> for (int i=0; i> { >> int numInputConnections = this->GetNumberOfInputConnections(i); >> for (int j=0; j> { >> vtkInformation* inputInfo = inputVector[i]->GetInformation >> Object(j); >> inputInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), >> 1); >> } >> } >> >> I changed: >> inputInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), >> 1); >> >> to: >> inputInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_ >> EXTENT(),WholeExtent,6); >> >> where the array WholeExtent is the maximum extent computed over all input >> and output ports. >> >> This seems to work, but I am not sure why. If anyone could point me in >> the direction of some explanation of the purpose behind extents in the VTK >> pipeline and how they are best used I would be very grateful. >> >> Thanks >> >> Kit >> >> >> > On 4 Jan 2017, at 12:56, Kit Chambers >> wrote: >> > >> > Hi All, >> > >> > I have a custom datatype (myType) derived from vtkImageData and a >> custom filter derived from vtkImageAlgorithm. The filter takes input on two >> ports which are both myType objects with different sizes. >> > >> > So in principle I should be able to set these inputs using either >> SetInputData() or SetInputConnection() right? However, when I run the >> filter I get errors like: >> > >> > ERROR: In ?. /vtk/Common/ExecutionModel/vtk >> StreamingDemandDrivenPipeline.cxx, line 857 >> > vtkStreamingDemandDrivenPipeline (0x7fc6fa444a00): The update extent >> specified in the information for output port 0 on algorithm >> vtkTrivialProducer(0x7fc6fa4444a0) is 0 31 0 0 0 0, which is outside the >> whole extent 0 5 0 0 0 0. >> > >> > ERROR: In ?. /vtk/src/vtk/Common/ExecutionModel/vtkTrivialProducer.cxx, >> line 264 >> > vtkTrivialProducer (0x7fc6fa4444a0): This data object does not contain >> the requested extent. >> > >> > Any suggestions? Is there something I am missing here? >> > >> > Kit >> > >> > >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon Jan 16 15:08:23 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 16 Jan 2017 15:08:23 -0500 Subject: [vtkusers] How to "undo" GetRenderWindow()->Render()? In-Reply-To: <1484560102.2312349.848955576.6A4D5FFD@webmail.messagingengine.com> References: <1479466264.3597979.791981937.6FF3D20A@webmail.messagingengine.com> <601681.67359b01a17dda0e7446be438e1c87b7e5c74911@popretr.messagingengine.com> <1484560102.2312349.848955576.6A4D5FFD@webmail.messagingengine.com> Message-ID: Can you load your app in the debugger to see where the crash happens? the 'maximum number of clients' error might be because you don't close the X window when you close a tab. Instead of just setting the view to nullptr try to delete the view as well. Dan On Mon, Jan 16, 2017 at 4:48 AM, Jan Niklas Hasse wrote: > Hi Dan, > > yes, kind of. The problem is, that with a lot of tabs I'm getting: > > Maximum number of clients reached > ERROR: In [...]/VTK/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 530 > vtkXOpenGLRenderWindow (0x32b207d0): bad X server connection. DISPLAY=:0. > Aborting. > > calling chart->SetVisible(false) doesn't help unfortunately. I need to > completely destroy the view somehow in hideEvent. > > Thanks > Jan > > On Fri, 18 Nov 2016, at 14:57, Dan Lipsa wrote: > > Jan, > > To hide items in a scene you have to call SetVisible(false) on them. Is > this what you are trying to do? > > > > Dan > > > > > > > > On Fri, Nov 18, 2016 at 5:51 AM, Jan Niklas Hasse < > jan-niklas.hasse at stw.de> wrote: > >> Hi, > >> > >> I'm using VTK 6.2 with Qt. I've created a class Plot2D which inherits > from QVTKWidget. I now have a lot of these plots widgets in a tabbed view > and want to only render the ones that are currently visible (otherwise I > get an OpenGL crash). > >> > >> void Plot2D::showEvent(QShowEvent*) { > >> view = vtkSmartPointer::New(); > >> view->GetRenderer()->SetBackground(1,1,1); > >> view->SetRenderWindow(GetRenderWindow()); > >> view->GetRenderWindow()->SetSize(width(),height()); > >> view->GetScene()->AddItem(chart); > >> view->GetRenderWindow()->SetMultiSamples(0); > >> view->GetRenderWindow()->Render(); > >> } > >> > >> void Plot2D::hideEvent(QHideEvent*) { > >> view = nullptr; > >> } > >> > >> Unfortunately, deleting the vtkContextView isn't enough: The next time > showEvent is called, I get a crash inside VTK because it seems that > view->GetRenderWindow()->Render(); has set up some kind of timer in the > background. How would I solve this? > >> > >> Thanks in advance :) > >> Jan > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Mon Jan 16 15:11:13 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Mon, 16 Jan 2017 15:11:13 -0500 Subject: [vtkusers] How to "undo" GetRenderWindow()->Render()? In-Reply-To: References: <1479466264.3597979.791981937.6FF3D20A@webmail.messagingengine.com> <601681.67359b01a17dda0e7446be438e1c87b7e5c74911@popretr.messagingengine.com> <1484560102.2312349.848955576.6A4D5FFD@webmail.messagingengine.com> Message-ID: Do you use OpenGL1 or OpenGL2 for VTK? On Mon, Jan 16, 2017 at 3:08 PM, Dan Lipsa wrote: > Can you load your app in the debugger to see where the crash happens? > > the 'maximum number of clients' error might be because you don't close the > X window when you close a tab. > Instead of just setting the view to nullptr try to delete the view as well. > > Dan > > > On Mon, Jan 16, 2017 at 4:48 AM, Jan Niklas Hasse > wrote: > >> Hi Dan, >> >> yes, kind of. The problem is, that with a lot of tabs I'm getting: >> >> Maximum number of clients reached >> ERROR: In [...]/VTK/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 530 >> vtkXOpenGLRenderWindow (0x32b207d0): bad X server connection. DISPLAY=:0. >> Aborting. >> >> calling chart->SetVisible(false) doesn't help unfortunately. I need to >> completely destroy the view somehow in hideEvent. >> >> Thanks >> Jan >> >> On Fri, 18 Nov 2016, at 14:57, Dan Lipsa wrote: >> > Jan, >> > To hide items in a scene you have to call SetVisible(false) on them. >> Is this what you are trying to do? >> > >> > Dan >> > >> > >> > >> > On Fri, Nov 18, 2016 at 5:51 AM, Jan Niklas Hasse < >> jan-niklas.hasse at stw.de> wrote: >> >> Hi, >> >> >> >> I'm using VTK 6.2 with Qt. I've created a class Plot2D which inherits >> from QVTKWidget. I now have a lot of these plots widgets in a tabbed view >> and want to only render the ones that are currently visible (otherwise I >> get an OpenGL crash). >> >> >> >> void Plot2D::showEvent(QShowEvent*) { >> >> view = vtkSmartPointer::New(); >> >> view->GetRenderer()->SetBackground(1,1,1); >> >> view->SetRenderWindow(GetRenderWindow()); >> >> view->GetRenderWindow()->SetSize(width(),height()); >> >> view->GetScene()->AddItem(chart); >> >> view->GetRenderWindow()->SetMultiSamples(0); >> >> view->GetRenderWindow()->Render(); >> >> } >> >> >> >> void Plot2D::hideEvent(QHideEvent*) { >> >> view = nullptr; >> >> } >> >> >> >> Unfortunately, deleting the vtkContextView isn't enough: The next >> time showEvent is called, I get a crash inside VTK because it seems that >> view->GetRenderWindow()->Render(); has set up some kind of timer in the >> background. How would I solve this? >> >> >> >> Thanks in advance :) >> >> Jan >> >> _______________________________________________ >> >> Powered by www.kitware.com >> >> >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> >> >> 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 kailushan at 163.com Mon Jan 16 22:38:16 2017 From: kailushan at 163.com (Kailu Shan) Date: Tue, 17 Jan 2017 11:38:16 +0800 (CST) Subject: [vtkusers] compile vtk5.10 release version Message-ID: <91698ef.4354.159aa80fa64.Coremail.kailushan@163.com> I am compiling the vtk5.10 release version, because I want to use the vtkMFC.dll. But I encounter this error: error C2040: 'vtkCritSecType' : 'CRITICAL_SECTION' differs in levels of indirection from 'pthread_mutex_t' . Could anyone help me to solve this problem? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From kailushan at 163.com Tue Jan 17 04:05:08 2017 From: kailushan at 163.com (Kailu Shan) Date: Tue, 17 Jan 2017 17:05:08 +0800 (CST) Subject: [vtkusers] How to write vtkDelaunay3D into .vtk file Message-ID: <4080a34f.912f.159abac3a1b.Coremail.kailushan@163.com> How to write the vtkDelaunay3D data into .vtk file? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjordan at live.at Tue Jan 17 04:32:38 2017 From: mjordan at live.at (M. Jordan) Date: Tue, 17 Jan 2017 09:32:38 +0000 Subject: [vtkusers] How to write vtkDelaunay3D into .vtk file In-Reply-To: <4080a34f.912f.159abac3a1b.Coremail.kailushan@163.com> References: <4080a34f.912f.159abac3a1b.Coremail.kailushan@163.com> Message-ID: Hi, I use this code for it. (the extract surface/smooth part is optional) // clean the polydata vtkSmartPointer cleanPolyData = vtkSmartPointer::New(); cleanPolyData->SetInputConnection(INPUT->GetOutputPort()); cleanPolyData->Update(); // use delaunay3D vtkSmartPointer delaunay3DAlpha = vtkSmartPointer::New(); delaunay3DAlpha->SetInputData(cleanPolyData->GetOutput()); //delaunay3DAlpha->SetTolerance(0.0001); //delaunay3DAlpha->SetAlpha(20); //delaunay3DAlpha->SetAlphaLines(0); //delaunay3DAlpha->SetAlphaTris(0); // delaunay3DAlpha->SetAlphaTets(1); //delaunay3DAlpha->SetAlphaVerts(0); //delaunay3DAlpha->SetBoundingTriangulation(0); delaunay3DAlpha->Update(); // extract surface vtkGeometryFilter* geom = vtkGeometryFilter::New(); geom->SetInputData(delaunay3DAlpha->GetOutput()); geom->Update(); // smooth vtkSmoothPolyDataFilter* smooth22 = vtkSmoothPolyDataFilter::New(); smooth22->SetInputConnection(geom->GetOutputPort()); smooth22->SetNumberOfIterations(15); smooth22->SetRelaxationFactor(0.3); smooth22->Update(); // write output file vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetInputData(smooth22->GetOutput()); writer->SetFileName(PATH + FILENAME.vtk); writer->Write(); ________________________________ Von: vtkusers im Auftrag von Kailu Shan Gesendet: Dienstag, 17. J?nner 2017 10:05 An: VTK Users Betreff: [vtkusers] How to write vtkDelaunay3D into .vtk file How to write the vtkDelaunay3D data into .vtk file? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From kailushan at 163.com Tue Jan 17 06:08:05 2017 From: kailushan at 163.com (Kailu Shan) Date: Tue, 17 Jan 2017 19:08:05 +0800 (CST) Subject: [vtkusers] How to write vtkDelaunay3D into .vtk file In-Reply-To: References: <4080a34f.912f.159abac3a1b.Coremail.kailushan@163.com> Message-ID: hi, Thanks for your reply! which version are you using? I am using vtk 5.10 and also test with vtk 6.1. Below is my revised code: vtkSmartPointer writer= vtkSmartPointer::New(); writer->SetFileName("delaunay3.vtk"); writer->SetInputData(delaunay->GetOutput()); writer->Write(); error C2664: 'void vtkWriter::SetInputData(vtkDataObject *)' : cannot convert parameter 1 from 'vtkUnstructuredGrid *' to 'vtkDataObject *' ? 2017-01-17 17:32:38?"M. Jordan" ??? Hi, I use this code for it. (the extract surface/smooth part is optional) // clean the polydata vtkSmartPointer cleanPolyData = vtkSmartPointer::New(); cleanPolyData->SetInputConnection(INPUT->GetOutputPort()); cleanPolyData->Update(); // use delaunay3D vtkSmartPointer delaunay3DAlpha = vtkSmartPointer::New(); delaunay3DAlpha->SetInputData(cleanPolyData->GetOutput()); //delaunay3DAlpha->SetTolerance(0.0001); //delaunay3DAlpha->SetAlpha(20); //delaunay3DAlpha->SetAlphaLines(0); //delaunay3DAlpha->SetAlphaTris(0); // delaunay3DAlpha->SetAlphaTets(1); //delaunay3DAlpha->SetAlphaVerts(0); //delaunay3DAlpha->SetBoundingTriangulation(0); delaunay3DAlpha->Update(); // extract surface vtkGeometryFilter* geom = vtkGeometryFilter::New(); geom->SetInputData(delaunay3DAlpha->GetOutput()); geom->Update(); // smooth vtkSmoothPolyDataFilter* smooth22 = vtkSmoothPolyDataFilter::New(); smooth22->SetInputConnection(geom->GetOutputPort()); smooth22->SetNumberOfIterations(15); smooth22->SetRelaxationFactor(0.3); smooth22->Update(); // write output file vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetInputData(smooth22->GetOutput()); writer->SetFileName(PATH + FILENAME.vtk); writer->Write(); Von: vtkusers im Auftrag von Kailu Shan Gesendet: Dienstag, 17. J?nner 2017 10:05 An: VTK Users Betreff: [vtkusers] How to write vtkDelaunay3D into .vtk file How to write the vtkDelaunay3D data into .vtk file? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikhail.pukhlikov at outlook.com Tue Jan 17 06:12:34 2017 From: mikhail.pukhlikov at outlook.com (Mikhail Pukhlikov) Date: Tue, 17 Jan 2017 11:12:34 +0000 Subject: [vtkusers] Is it possible to get running Rendering Backend Message-ID: I want to print out working rendering backend / possibly engine How can I get those using VTK? Thank you! Mikhail -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 529 bytes Desc: This is a digitally signed message part URL: From mjordan at live.at Tue Jan 17 06:17:50 2017 From: mjordan at live.at (M. Jordan) Date: Tue, 17 Jan 2017 11:17:50 +0000 Subject: [vtkusers] How to write vtkDelaunay3D into .vtk file In-Reply-To: References: <4080a34f.912f.159abac3a1b.Coremail.kailushan@163.com> , Message-ID: Try to add this after Delaunay3D: vtkGeometryFilter* geom = vtkGeometryFilter::New(); geom->SetInputData(delaunay3DAlpha->GetOutput()); geom->Update(); writer->SetInputData(geom->GetOutput()); Moreover: #include ________________________________ Von: Kailu Shan Gesendet: Dienstag, 17. J?nner 2017 12:08 An: M. Jordan Cc: vtkusers at vtk.org Betreff: Re:AW: [vtkusers] How to write vtkDelaunay3D into .vtk file hi, Thanks for your reply! which version are you using? I am using vtk 5.10 and also test with vtk 6.1. Below is my revised code: vtkSmartPointer writer= vtkSmartPointer::New(); writer->SetFileName("delaunay3.vtk"); writer->SetInputData(delaunay->GetOutput()); writer->Write(); error C2664: 'void vtkWriter::SetInputData(vtkDataObject *)' : cannot convert parameter 1 from 'vtkUnstructuredGrid *' to 'vtkDataObject *' ? 2017-01-17 17:32:38,"M. Jordan" ??: Hi, I use this code for it. (the extract surface/smooth part is optional) // clean the polydata vtkSmartPointer cleanPolyData = vtkSmartPointer::New(); cleanPolyData->SetInputConnection(INPUT->GetOutputPort()); cleanPolyData->Update(); // use delaunay3D vtkSmartPointer delaunay3DAlpha = vtkSmartPointer::New(); delaunay3DAlpha->SetInputData(cleanPolyData->GetOutput()); //delaunay3DAlpha->SetTolerance(0.0001); //delaunay3DAlpha->SetAlpha(20); //delaunay3DAlpha->SetAlphaLines(0); //delaunay3DAlpha->SetAlphaTris(0); // delaunay3DAlpha->SetAlphaTets(1); //delaunay3DAlpha->SetAlphaVerts(0); //delaunay3DAlpha->SetBoundingTriangulation(0); delaunay3DAlpha->Update(); // extract surface vtkGeometryFilter* geom = vtkGeometryFilter::New(); geom->SetInputData(delaunay3DAlpha->GetOutput()); geom->Update(); // smooth vtkSmoothPolyDataFilter* smooth22 = vtkSmoothPolyDataFilter::New(); smooth22->SetInputConnection(geom->GetOutputPort()); smooth22->SetNumberOfIterations(15); smooth22->SetRelaxationFactor(0.3); smooth22->Update(); // write output file vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetInputData(smooth22->GetOutput()); writer->SetFileName(PATH + FILENAME.vtk); writer->Write(); ________________________________ Von: vtkusers > im Auftrag von Kailu Shan > Gesendet: Dienstag, 17. J?nner 2017 10:05 An: VTK Users Betreff: [vtkusers] How to write vtkDelaunay3D into .vtk file How to write the vtkDelaunay3D data into .vtk file? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From psandana at gmail.com Tue Jan 17 08:52:45 2017 From: psandana at gmail.com (=?UTF-8?Q?Patricio_Sanda=C3=B1a?=) Date: Tue, 17 Jan 2017 10:52:45 -0300 Subject: [vtkusers] VTK Light Model In-Reply-To: References: Message-ID: Hello everyone, Can anybody tell me how the lighting model is implemented on VTK? I'm looking for any concrete implementation. I've tracked vtkLights usage, but I got nothing so far. I want to play with the lighting models, but first I wanted to know how they works. Cheers, Pato -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Jan 17 09:08:08 2017 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 17 Jan 2017 09:08:08 -0500 Subject: [vtkusers] VTK Light Model In-Reply-To: References: Message-ID: It is all pretty much in Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx except for shadows which are in vtkShadowMapBakerPass and vtkShadowMapPass On Tue, Jan 17, 2017 at 8:52 AM, Patricio Sanda?a wrote: > Hello everyone, > > Can anybody tell me how the lighting model is implemented on VTK? I'm > looking for any concrete implementation. I've tracked vtkLights usage, but > I got nothing so far. > > I want to play with the lighting models, but first I wanted to know how > they works. > > Cheers, > > Pato > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From psandana at gmail.com Tue Jan 17 09:18:30 2017 From: psandana at gmail.com (=?UTF-8?Q?Patricio_Sanda=C3=B1a?=) Date: Tue, 17 Jan 2017 11:18:30 -0300 Subject: [vtkusers] VTK Light Model In-Reply-To: References: Message-ID: Hi Ken, Many thanks for the hints. I will take a look. Cheers, Pato El 17 ene. 2017 11:08, "Ken Martin" escribi?: It is all pretty much in Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx except for shadows which are in vtkShadowMapBakerPass and vtkShadowMapPass On Tue, Jan 17, 2017 at 8:52 AM, Patricio Sanda?a wrote: > Hello everyone, > > Can anybody tell me how the lighting model is implemented on VTK? I'm > looking for any concrete implementation. I've tracked vtkLights usage, but > I got nothing so far. > > I want to play with the lighting models, but first I wanted to know how > they works. > > Cheers, > > Pato > > _______________________________________________ > 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: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 <(518)%20371-3971> This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From timo.oster at ovgu.de Tue Jan 17 09:31:18 2017 From: timo.oster at ovgu.de (Timo Oster) Date: Tue, 17 Jan 2017 15:31:18 +0100 Subject: [vtkusers] Reading Parallel XML Files Piece by Piece Message-ID: Hi VTK users, I am converting my (parallel) program to output (PolyData) files in parallel VTK XML format. I do this to improve efficiency and because the data can become too large to be contained in a single process' memory all at once. I have been successful in writing the parallel files, but now I also need to be able to read them back in. Because of the size of the data, just reading it into one giant data set all at once is not feasible. What I would need to do is read the data piece by piece, and distribute it to the parallel processes. The given class vtkXMLPPolyDataReader does not seem to offer a way of doing that, or I don't understand it from just reading the documentation and browsing the source code a little. It offers a GetNumberOfPieces() function, but no public function that explicitly reads only a single piece. The GetOutput() function has an overload that takes an index, but the non-overloaded version just calls GetOutput(0), so it seems implausible that this is the piece index. What would be the best way to read a parallel VTK XML file piece by piece? Is there something I'm missing in the reader class? Is there a simple way of getting the piece file names from the summary file to read them separately? Please advise. Best Regards, Timo -- Timo Oster Visual Computing Group / Lab. of Fluid Dynamics and Technical Flows University of Magdeburg Universit?tsplatz 2 D-39106 Magdeburg Phone: (+49-391) 67-12647 / (+49-391) 67-51349 Offices: Building 29 - Room 234 / Building 14 - Room 108 PGP Fingerprint: 4F25 89EE A9FD C5FE FEE5 D086 C625 B58C 2411 932F From andy.bauer at kitware.com Tue Jan 17 11:07:07 2017 From: andy.bauer at kitware.com (Andy Bauer) Date: Tue, 17 Jan 2017 11:07:07 -0500 Subject: [vtkusers] Reading Parallel XML Files Piece by Piece In-Reply-To: References: Message-ID: Hi Timo, The pieces that are read on each process are typically specified through the pipeline from subsequent filters. Something like a writer that can deal with pieces will request the number of pieces that can be provided to the writer and based on that the writer would then specify which pieces it wants. The reader then produces those pieces. See the example at http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/IO/XMLPUnstructuredGridWriter for an example. Cheers, Andy On Tue, Jan 17, 2017 at 9:31 AM, Timo Oster wrote: > Hi VTK users, > > I am converting my (parallel) program to output (PolyData) files in > parallel VTK XML format. I do this to improve efficiency and because the > data can become too large to be contained in a single process' memory > all at once. > > I have been successful in writing the parallel files, but now I also > need to be able to read them back in. Because of the size of the data, > just reading it into one giant data set all at once is not feasible. > What I would need to do is read the data piece by piece, and distribute > it to the parallel processes. The given class vtkXMLPPolyDataReader does > not seem to offer a way of doing that, or I don't understand it from > just reading the documentation and browsing the source code a little. It > offers a GetNumberOfPieces() function, but no public function that > explicitly reads only a single piece. The GetOutput() function has an > overload that takes an index, but the non-overloaded version just calls > GetOutput(0), so it seems implausible that this is the piece index. > > What would be the best way to read a parallel VTK XML file piece by > piece? Is there something I'm missing in the reader class? Is there a > simple way of getting the piece file names from the summary file to read > them separately? Please advise. > > Best Regards, > > Timo > -- > Timo Oster > > Visual Computing Group / Lab. of Fluid Dynamics and Technical Flows > University of Magdeburg > Universit?tsplatz 2 > D-39106 Magdeburg > > Phone: (+49-391) 67-12647 / (+49-391) 67-51349 > Offices: Building 29 - Room 234 / Building 14 - Room 108 > > PGP Fingerprint: 4F25 89EE A9FD C5FE FEE5 D086 C625 B58C 2411 932F > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 chenjianyyzz at 163.com Wed Jan 18 01:46:41 2017 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Tue, 17 Jan 2017 23:46:41 -0700 (MST) Subject: [vtkusers] Problem to read the Siemens DICOM series using VTK Message-ID: <1484722001957-5741841.post@n5.nabble.com> Hi, I try to read the attached DICOM image series which comes from Siemens CT but failed, below is my code: ---------------------------------------------------- vtkSmartPointer DICOMReader = vtkSmartPointer::New(); DICOMReader->SetDirectoryName( "****"); // fill with the image folder DICOMReader->Update(); // Visualize vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(DICOMReader->GetOutputPort()); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->SetSlice(4); imageViewer->Render(); imageViewer->GetRenderer()->ResetCamera(); renderWindowInteractor->Initialize(); imageViewer->Render(); renderWindowInteractor->Start(); ---------------------------------------------------- the error message I got is: ERROR: In ..\..\..\VTK7.1\IO\Image\vtkDICOMImageReader.cxx, line 333 vtkDICOMImageReader (000001ABE55D5CC0): There was a problem retrieving data from: C:\CJ\data\Caili_A/00156a00.dcm ERROR: In ..\..\..\VTK7.1\Common\ExecutionModel\vtkExecutive.cxx, line 784 vtkCompositeDataPipeline (000001ABE55D7110): Algorithm vtkDICOMImageReader(000001ABE55D5CC0) returned failure for request: vtkInformation (000001ABE55DA160) Debug: Off Modified Time: 138 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 FROM_OUTPUT_PORT: 0 does any body know how to read the attached DICOM series from Siemens CT? Thanks James Caili_A.7z -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-to-read-the-Siemens-DICOM-series-using-VTK-tp5741841.html Sent from the VTK - Users mailing list archive at Nabble.com. From chenjianyyzz at 163.com Wed Jan 18 01:35:55 2017 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Wed, 18 Jan 2017 14:35:55 +0800 (CST) Subject: [vtkusers] Problem to read the DICOM series using VTK Message-ID: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> Hi, I try to read the attached DICOM image series which comes from Siemens CT but failed, below is my code: ---------------------------------------------------- vtkSmartPointer DICOMReader = vtkSmartPointer::New(); DICOMReader->SetDirectoryName( "****"); // fill with the image folder DICOMReader->Update(); // Visualize vtkSmartPointer imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(DICOMReader->GetOutputPort()); vtkSmartPointer renderWindowInteractor =vtkSmartPointer::New(); imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->SetSlice(4); imageViewer->Render(); imageViewer->GetRenderer()->ResetCamera(); renderWindowInteractor->Initialize(); imageViewer->Render(); renderWindowInteractor->Start(); ---------------------------------------------------- the error message I got is: ERROR: In ..\..\..\VTK7.1\IO\Image\vtkDICOMImageReader.cxx, line 333 vtkDICOMImageReader (000001ABE55D5CC0): There was a problem retrieving data from: C:\CJ\data\Caili_A/00156a00.dcm ERROR: In ..\..\..\VTK7.1\Common\ExecutionModel\vtkExecutive.cxx, line 784 vtkCompositeDataPipeline (000001ABE55D7110): Algorithm vtkDICOMImageReader(000001ABE55D5CC0) returned failure for request: vtkInformation (000001ABE55DA160) Debug: Off Modified Time: 138 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 FROM_OUTPUT_PORT: 0 does any body know how to read the attached DICOM series from Siemens CT? Thanks James -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Caili_A.7z Type: application/x-7z-compressed Size: 1858217 bytes Desc: not available URL: From tehsunnliu at yahoo.com Wed Jan 18 02:36:07 2017 From: tehsunnliu at yahoo.com (Alex Liu) Date: Wed, 18 Jan 2017 00:36:07 -0700 (MST) Subject: [vtkusers] Problem to read the DICOM series using VTK In-Reply-To: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> References: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> Message-ID: <1484724967827-5741843.post@n5.nabble.com> You can try using vtkDICOMReader instead. In CMake you will have to add Module_vtkDICOM ----- Alex Liu +15574855474 -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-to-read-the-DICOM-series-using-VTK-tp5741842p5741843.html Sent from the VTK - Users mailing list archive at Nabble.com. From alexandrov88 at gmail.com Wed Jan 18 05:46:46 2017 From: alexandrov88 at gmail.com (Sergey Alexandrov) Date: Wed, 18 Jan 2017 11:46:46 +0100 Subject: [vtkusers] vtkPointCloudFilter changes type of data arrays to float Message-ID: Hey, I was writing a custom point cloud filtering algorithm and came across the vtkPointCloudFilter class, which looks like a convenient base for this kind of filter. However, in my opinion it behaves strangely when it comes to the handling of data arrays bundled with the points. The documentation says that "The filter copies point attributes from input to output consistent with the filtering operation", and indeed it does, but while copying it changes the type of the attribute arrays, everything becomes a float! Here is a small example that uses vtkRadiusOutlierRemoval (derived from vtkPointCloudFilter). I create several points with an unsigned char attribute, and pass it through the filter. #include #include #include #include #include #include #include int main(int argc, const char** argv) { const double pt1[3] = { 0, 0, 0}; const double pt2[3] = { 1, 0, 0}; const double pt3[3] = { 2, 0, 0}; auto points = vtkSmartPointer::New(); points->SetDataTypeToDouble(); points->InsertNextPoint(pt1); points->InsertNextPoint(pt2); points->InsertNextPoint(pt3); auto labels = vtkSmartPointer::New(); labels->SetName("label"); labels->SetNumberOfComponents(1); labels->InsertNextValue(1); labels->InsertNextValue(2); labels->InsertNextValue(3); auto poly_data = vtkSmartPointer::New(); poly_data->SetPoints(points); poly_data->GetPointData()->AddArray(labels); auto outlier_removal = vtkSmartPointer::New(); outlier_removal->SetInputData(poly_data); outlier_removal->SetRadius(1.5); outlier_removal->SetNumberOfNeighbors(2); outlier_removal->Update(); auto output = outlier_removal->GetOutputDataObject(0); auto attributes = output->GetAttributes(0); std::cout << "Output attributes: " << attributes->GetArrayName(0) << ", type: " << attributes->GetArray(0)->GetDataTypeAsString() << std::endl; return 0; } This example prints Output attributes: label, type: float So what happens is that the "label" attribute, that was originally of type unsigned char, becomes a float attribute in the output of the filter. It this behavior a bug or a feature? Or maybe I am missing a flag somewhere which controls this behavior? Cheers, Sergey -------------- next part -------------- An HTML attachment was scrubbed... URL: From kit.chambers.kc at gmail.com Wed Jan 18 08:07:15 2017 From: kit.chambers.kc at gmail.com (Kit Chambers) Date: Wed, 18 Jan 2017 13:07:15 +0000 Subject: [vtkusers] SetInputData and extents In-Reply-To: References: <07CA75F3-0934-47FB-8B84-4CCA94CD6CD1@googlemail.com> Message-ID: Thanks David, That clarifies things for me. Just to make sure I have got it, I will flesh out what I am trying to do and the way I understand it should be handled based on your response. Here goes: My data type, let?s call it myGrid, is inherited from a vtkImageData. And similarly there is a myGridAlgorithm which acts as a base for constructing filters and sources to work on myGrid data. So an example pipeline might be something like this. src1 > data1 [M by N myGrid object] src2 > data2 [P by Q myGrid object] filter1 < data1, data2 > data3 [M by N myGrid object] So in src1 and src2 I should implement a RequestInformation(), which sets the WHOLE_EXTENT on the output ports to M by N and P by Q respectively and the RequestInformation() in filter1 should set the WHOLE_EXTENT of its output port to be the same as input 0. Is this correct? Note that in the above example we may have P>M or Q>N, would this mess things up? Thanks for you help on this Kit > On 16 Jan 2017, at 19:11, David Gobbi wrote: > > I'm going to try again, with fewer typos: > > The VTK image pipeline updates occur in three passes (RequestInformation(), RequestUpdateExtent(), RequestData()), which are discussed in the VTK Users's Guide and also on the following web page: http://www.vtk.org/Wiki/VTK/Tutorials/New_Pipeline > > A filter should never directly set the WHOLE_EXTENT of its input. It is only allowed to set the WHOLE_EXTENT of its output. > > With respect to the extent, the three passes of the pipeline work like this: > > In RequestInformation(), a filter sets the WHOLE_EXTENT of its output. This is how a filter tells the pipeline "this is how much data I can produce". A filter can be asked to produce less than this (as described in RequestUpdateExtent, below). The default behavior of RequestInformation() is to check the WHOLE_EXTENT of the input, and then use that same WHOLE_EXTENT for the output. > > In RequestUpdateExtent(), a filter can request for the pipeline produce less than the WHOLE_EXTENT of that input. It does this by setting the UPDATE_EXTENT of the input, while tells the pipeline "I need at least this much data from this input". Usually, it will set the UPDATE_EXTENT of the input to the WHOLE_EXTENT of the input. If a filter also sets EXACT_EXTENT for the input, that tells the pipeline "I need exactly this much data from this input". If you do not set EXACT_EXTENT, then the pipeline will produce at least as much data as requested by UPDATE_EXTENT, but possibly more. > > Finally, in RequestData() a filter should call GetExtent() on each input data object to see how data is actually there. > > - David > > On Mon, Jan 16, 2017 at 12:04 PM, David Gobbi > wrote: > Hi Kit, > > The VTK image pipeline updates occur in three passes (RequestInformation(), RequestUpdateExtent(), RequestData()), which are discussed in the VTK Users's Guide and also on the following web page: http://www.vtk.org/Wiki/VTK/Tutorials/New_Pipeline > > A filter should never directly set the WHOLE_EXTENT of its input. It is only allowed to set the WHOLE_EXTENT of its output. > > With respect to the extent, the three passes of the pipeline work like this: > > In RequestInformation(), a filter sets the WHOLE_EXTENT of its output. This is how a filter tells the pipeline "this is how data I can produce". A filter can be asked to produce less that this (as described in RequestUpdateExtent, below). In most cases, what a filter does in RequestInformation() is check the WHOLE_EXTENT of its input, and then use that same WHOLE_EXTENT for its output. > > In RequestUpdateExtent(), a filter can request that an produce less than the WHOLE_EXTENT of that input. It does this by setting the UPDATE_EXTENT of the input, while tells the pipeline "I need at least this much data from this input". Usually, it will set the UPDATE_EXTENT of the input to the WHOLE_EXTENT of the input. If a filter also sets EXACT_EXTENT for the input, that tells the pipeline "I need exactly this much data from this input". If you do not set EXACT_EXTENT, then the pipeline will produce at least as much data as requested by UPDATE_EXTENT, but possibly more. > > Finally, in RequestData() a filter should call GetExtent() on each input data object to see how data is actually there. > > - David > > > > > On Mon, Jan 16, 2017 at 10:17 AM, Kit Chambers > wrote: > Hi All, > > I did some more digging on the and found a solution that works (at least so far). My custom VTK filter class (derived from vtkImageAlgorithm) contained a method RequestUpdateExtent, which contained the following code: > > for (int i=0; i { > int numInputConnections = this->GetNumberOfInputConnections(i); > for (int j=0; j { > vtkInformation* inputInfo = inputVector[i]->GetInformationObject(j); > inputInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1); > } > } > > I changed: > inputInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1); > > to: > inputInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),WholeExtent,6); > > where the array WholeExtent is the maximum extent computed over all input and output ports. > > This seems to work, but I am not sure why. If anyone could point me in the direction of some explanation of the purpose behind extents in the VTK pipeline and how they are best used I would be very grateful. > > Thanks > > Kit > > > > On 4 Jan 2017, at 12:56, Kit Chambers > wrote: > > > > Hi All, > > > > I have a custom datatype (myType) derived from vtkImageData and a custom filter derived from vtkImageAlgorithm. The filter takes input on two ports which are both myType objects with different sizes. > > > > So in principle I should be able to set these inputs using either SetInputData() or SetInputConnection() right? However, when I run the filter I get errors like: > > > > ERROR: In ?. /vtk/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx, line 857 > > vtkStreamingDemandDrivenPipeline (0x7fc6fa444a00): The update extent specified in the information for output port 0 on algorithm vtkTrivialProducer(0x7fc6fa4444a0) is 0 31 0 0 0 0, which is outside the whole extent 0 5 0 0 0 0. > > > > ERROR: In ?. /vtk/src/vtk/Common/ExecutionModel/vtkTrivialProducer.cxx, line 264 > > vtkTrivialProducer (0x7fc6fa4444a0): This data object does not contain the requested extent. > > > > Any suggestions? Is there something I am missing here? > > > > Kit > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > 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 Wed Jan 18 08:49:33 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 18 Jan 2017 06:49:33 -0700 Subject: [vtkusers] SetInputData and extents In-Reply-To: References: <07CA75F3-0934-47FB-8B84-4CCA94CD6CD1@googlemail.com> Message-ID: On Wed, Jan 18, 2017 at 6:07 AM, Kit Chambers wrote: > > > src1 > data1 [M by N myGrid object] > src2 > data2 [P by Q myGrid object] > filter1 < data1, data2 > data3 [M by N myGrid object] > > So in src1 and src2 I should implement a RequestInformation(), which sets > the WHOLE_EXTENT on the output ports to M by N and P by Q respectively and > the RequestInformation() in filter1 should set the WHOLE_EXTENT of its > output port to be the same as input 0. Is this correct? Note that in the > above example we may have P>M or Q>N, would this mess things up? > If the size of the output is the same as the size of input 0, then yes it should copy WHOLE_EXTENT from input0 to the output. And if you want to keep things simple (i.e. if you don't require your filter to be able to stream just part of data set), then set the UPDATE_EXTENT for each input to the WHOLE_EXTENT of that same input. Then the filter will update the whole data set every time it executes. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Wed Jan 18 09:00:32 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 18 Jan 2017 07:00:32 -0700 Subject: [vtkusers] Problem to read the DICOM series using VTK In-Reply-To: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> References: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> Message-ID: On Tue, Jan 17, 2017 at 11:35 PM, chenjianyyzz wrote: > > I try to read the attached DICOM image series which comes from Siemens CT > but failed. > I checked the meta-data of your images and found this: (0002,0010) UI "TransferSyntaxUID" : [1.2.840.10008.1.2.4.70] {JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])} Your image is compressed, and the vtkDICOMImageReader cannot read compressed images. If you install GDCM, you can use gdcmconv to decompress the image. Then vtkDICOMImageReader will be able to read it. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Jan 18 09:50:37 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 18 Jan 2017 09:50:37 -0500 Subject: [vtkusers] vtkPointCloudFilter changes type of data arrays to float In-Reply-To: References: Message-ID: Looks like a bug. I'll take a look today. On Wed, Jan 18, 2017 at 5:46 AM, Sergey Alexandrov wrote: > Hey, > > I was writing a custom point cloud filtering algorithm and came across the > vtkPointCloudFilter class, > which looks like a convenient base for this kind of filter. However, in my > opinion it behaves strangely > when it comes to the handling of data arrays bundled with the points. The > documentation says that > "The filter copies point attributes from input to output consistent with the > filtering operation", and > indeed it does, but while copying it changes the type of the attribute > arrays, everything becomes a > float! Here is a small example that uses vtkRadiusOutlierRemoval (derived > from vtkPointCloudFilter). > I create several points with an unsigned char attribute, and pass it through > the filter. > > > #include > > #include > #include > #include > #include > #include > #include > > int main(int argc, const char** argv) > { > const double pt1[3] = { 0, 0, 0}; > const double pt2[3] = { 1, 0, 0}; > const double pt3[3] = { 2, 0, 0}; > > auto points = vtkSmartPointer::New(); > points->SetDataTypeToDouble(); > points->InsertNextPoint(pt1); > points->InsertNextPoint(pt2); > points->InsertNextPoint(pt3); > > auto labels = vtkSmartPointer::New(); > labels->SetName("label"); > labels->SetNumberOfComponents(1); > labels->InsertNextValue(1); > labels->InsertNextValue(2); > labels->InsertNextValue(3); > > auto poly_data = vtkSmartPointer::New(); > poly_data->SetPoints(points); > poly_data->GetPointData()->AddArray(labels); > > auto outlier_removal = vtkSmartPointer::New(); > outlier_removal->SetInputData(poly_data); > outlier_removal->SetRadius(1.5); > outlier_removal->SetNumberOfNeighbors(2); > outlier_removal->Update(); > > auto output = outlier_removal->GetOutputDataObject(0); > auto attributes = output->GetAttributes(0); > > std::cout << "Output attributes: " << attributes->GetArrayName(0) << ", > type: " << attributes->GetArray(0)->GetDataTypeAsString() << std::endl; > > return 0; > } > > > This example prints > >> Output attributes: label, type: float > > > So what happens is that the "label" attribute, that was originally of type > unsigned char, becomes a > float attribute in the output of the filter. > > It this behavior a bug or a feature? Or maybe I am missing a flag somewhere > which controls this > behavior? > > Cheers, > Sergey > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Wed Jan 18 11:47:00 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 18 Jan 2017 11:47:00 -0500 Subject: [vtkusers] vtkPointCloudFilter changes type of data arrays to float In-Reply-To: References: Message-ID: PointCloudFilter was promoting all integral arrays to float. I am working on a patch and test. In the meantime you could apply the following changes: diff --git a/Filters/Points/vtkPointCloudFilter.cxx b/Filters/Points/vtkPointCloudFilter.cxx index d9b3b6f..63fa046 100644 --- a/Filters/Points/vtkPointCloudFilter.cxx +++ b/Filters/Points/vtkPointCloudFilter.cxx @@ -48,7 +48,7 @@ struct MapPoints vtkIdType *map, vtkPointData *inPD, vtkPointData *outPD) : InPoints(inPts), OutPoints(outPts), PointMap(map) { - this->Arrays.AddArrays(numOutPts, inPD, outPD); + this->Arrays.AddArrays(numOutPts, inPD, outPD, 0.0, false); } void operator() (vtkIdType ptId, vtkIdType endPtId) @@ -97,7 +97,7 @@ struct MapOutliers vtkIdType *map, vtkPointData *inPD, vtkPointData *outPD2) : InPoints(inPts), OutPoints(outPts), PointMap(map) { - this->Arrays.AddArrays(numOutPts, inPD, outPD2); + this->Arrays.AddArrays(numOutPts, inPD, outPD2, 0.0, false); } On Wed, Jan 18, 2017 at 9:50 AM, Bill Lorensen wrote: > Looks like a bug. I'll take a look today. > > > On Wed, Jan 18, 2017 at 5:46 AM, Sergey Alexandrov > wrote: >> Hey, >> >> I was writing a custom point cloud filtering algorithm and came across the >> vtkPointCloudFilter class, >> which looks like a convenient base for this kind of filter. However, in my >> opinion it behaves strangely >> when it comes to the handling of data arrays bundled with the points. The >> documentation says that >> "The filter copies point attributes from input to output consistent with the >> filtering operation", and >> indeed it does, but while copying it changes the type of the attribute >> arrays, everything becomes a >> float! Here is a small example that uses vtkRadiusOutlierRemoval (derived >> from vtkPointCloudFilter). >> I create several points with an unsigned char attribute, and pass it through >> the filter. >> >> >> #include >> >> #include >> #include >> #include >> #include >> #include >> #include >> >> int main(int argc, const char** argv) >> { >> const double pt1[3] = { 0, 0, 0}; >> const double pt2[3] = { 1, 0, 0}; >> const double pt3[3] = { 2, 0, 0}; >> >> auto points = vtkSmartPointer::New(); >> points->SetDataTypeToDouble(); >> points->InsertNextPoint(pt1); >> points->InsertNextPoint(pt2); >> points->InsertNextPoint(pt3); >> >> auto labels = vtkSmartPointer::New(); >> labels->SetName("label"); >> labels->SetNumberOfComponents(1); >> labels->InsertNextValue(1); >> labels->InsertNextValue(2); >> labels->InsertNextValue(3); >> >> auto poly_data = vtkSmartPointer::New(); >> poly_data->SetPoints(points); >> poly_data->GetPointData()->AddArray(labels); >> >> auto outlier_removal = vtkSmartPointer::New(); >> outlier_removal->SetInputData(poly_data); >> outlier_removal->SetRadius(1.5); >> outlier_removal->SetNumberOfNeighbors(2); >> outlier_removal->Update(); >> >> auto output = outlier_removal->GetOutputDataObject(0); >> auto attributes = output->GetAttributes(0); >> >> std::cout << "Output attributes: " << attributes->GetArrayName(0) << ", >> type: " << attributes->GetArray(0)->GetDataTypeAsString() << std::endl; >> >> return 0; >> } >> >> >> This example prints >> >>> Output attributes: label, type: float >> >> >> So what happens is that the "label" attribute, that was originally of type >> unsigned char, becomes a >> float attribute in the output of the filter. >> >> It this behavior a bug or a feature? Or maybe I am missing a flag somewhere >> which controls this >> behavior? >> >> Cheers, >> Sergey >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From robert.maynard at kitware.com Wed Jan 18 12:11:21 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 18 Jan 2017 12:11:21 -0500 Subject: [vtkusers] VTK updated to CMake 3.3 and C++11 Message-ID: I am happy to announce that over the last two weeks we have rolled out a series of updates to VTK that mean the minimum required CMake version is now 3.3 (see below), and now builds with C+11 enabled. Yes VTK now requires a C++11 capable compiler. Initial we are only asking for a minimal set of C++11 features (nullptr), but as continue forward through the year we are going require a larger set of C++11 features. The final exact versions for each compiler have not been set in stone, but a rough estimation would be: - GCC 4.8+ - Clang 3.3+ - XCode 5.0+ - MSVC 2013+ I wanted to send this announcement out to bring up a couple of points: 1. Thanks to everyone that has helped get VTK ready for C++11! The final CMake switch over to C++11 was very easy, only because of all the hard work that other developers did in anticipation of this. So thank you very much. 2. The major reason for this slow roll out of C++11 is so that we minimize the impact on current VTK merge requests, while also minimizing dashboard instability. Contributors please be aware of these changes if you have long running branches. 3. We currently have dashboard machines running GCC 4.6 & 4.7. We are currently working up a plan on how best to transition these machines to at least GCC 4.8 as the roll out continues. 4. The current MinGW dashboard machine doesn't support C++11 and will be removed, with no plan of a replacement at Kitware. If the community is interested in maintaining a newer MinGW machine I can provide assistance on how to setup a machine. ============ Why CMake 3.3: We have chosen CMake 3.3 as the minimum required version for numerous reasons, the most important of those reasons being: - It is the first CMake release that offers C++11 support for all four major compilers ( GCC / MSVC / Clang / XCode ). - The CMake version is sufficiently new enough that it allows for a cleaning of the existing CMake infrastructure. The current CMake minimum version requires VTK to maintain forks of numerous FindPackages and Modules that are part of newer CMake versions. - Supports HTTPS downloads, with all the official binaries come with support. Allowing for migration of external data to a HTTPS only server. Something we are going to require in the near future. From bill.lorensen at gmail.com Wed Jan 18 13:21:18 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 18 Jan 2017 13:21:18 -0500 Subject: [vtkusers] [vtk-developers] VTK updated to CMake 3.3 and C++11 In-Reply-To: References: Message-ID: I have a computer with a non-c++11 compiler. I would expect a better error message. Something like: VTK requires a c++11 compiler. After update vtk I get these cmake errors "Clang" version 3.0.0. Call Stack (most recent call first): CMake/vtkModuleMacros.cmake:646 (vtk_add_library) Common/Core/CMakeLists.txt:724 (vtk_module_library) CMake Error at CMake/vtkModuleAPI.cmake:53 (message): No such module: "vtkCommonCore" Call Stack (most recent call first): CMake/vtkModuleAPI.cmake:15 (vtk_module_load) CMake/vtkModuleAPI.cmake:132 (_vtk_module_config_recurse) CMake/vtkModuleMacros.cmake:180 (vtk_module_config) CMake/vtkModuleMacros.cmake:582 (vtk_module_impl) Common/Math/CMakeLists.txt:40 (vtk_module_library) On Wed, Jan 18, 2017 at 12:11 PM, Robert Maynard wrote: > I am happy to announce that over the last two weeks we have rolled out a > series of updates to VTK that mean the minimum required CMake version > is now 3.3 (see below), and now builds with C+11 enabled. > > Yes VTK now requires a C++11 capable compiler. Initial we are only asking for a > minimal set of C++11 features (nullptr), but as continue forward through the > year we are going require a larger set of C++11 features. The final exact > versions for each compiler have not been set in stone, but a rough estimation > would be: > - GCC 4.8+ > - Clang 3.3+ > - XCode 5.0+ > - MSVC 2013+ > > I wanted to send this announcement out to bring up a couple of points: > > 1. Thanks to everyone that has helped get VTK ready for C++11! The final CMake > switch over to C++11 was very easy, only because of all the hard work that other > developers did in anticipation of this. So thank you very much. > > 2. The major reason for this slow roll out of C++11 is so that we minimize the > impact on current VTK merge requests, while also minimizing dashboard > instability. Contributors please be aware of these changes if you have long > running branches. > > 3. We currently have dashboard machines running GCC 4.6 & 4.7. We are currently > working up a plan on how best to transition these machines to at least GCC 4.8 > as the roll out continues. > > 4. The current MinGW dashboard machine doesn't support C++11 and will be > removed, with no plan of a replacement at Kitware. If the community is > interested in maintaining a newer MinGW machine I can provide assistance > on how to setup a machine. > > > ============ > > Why CMake 3.3: > > We have chosen CMake 3.3 as the minimum required version for numerous reasons, > the most important of those reasons being: > > - It is the first CMake release that offers C++11 support for all four major > compilers ( GCC / MSVC / Clang / XCode ). > > - The CMake version is sufficiently new enough that it allows for a cleaning > of the existing CMake infrastructure. The current CMake minimum version > requires VTK to maintain forks of numerous FindPackages and Modules that are > part of newer CMake versions. > > - Supports HTTPS downloads, with all the official binaries come with support. > Allowing for migration of external data to a HTTPS only server. Something we > are going to require in the near future. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > -- Unpaid intern in BillsBasement at noware dot com From robert.maynard at kitware.com Wed Jan 18 14:31:36 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Wed, 18 Jan 2017 14:31:36 -0500 Subject: [vtkusers] [vtk-developers] VTK updated to CMake 3.3 and C++11 In-Reply-To: References: Message-ID: I agree that the current error messages are not sufficient. I will work on a MR that provides better error reporting. On Wed, Jan 18, 2017 at 1:21 PM, Bill Lorensen wrote: > I have a computer with a non-c++11 compiler. I would expect a better > error message. > > Something like: VTK requires a c++11 compiler. > > After update vtk I get these cmake errors > "Clang" > > version 3.0.0. > Call Stack (most recent call first): > CMake/vtkModuleMacros.cmake:646 (vtk_add_library) > Common/Core/CMakeLists.txt:724 (vtk_module_library) > > > CMake Error at CMake/vtkModuleAPI.cmake:53 (message): > No such module: "vtkCommonCore" > Call Stack (most recent call first): > CMake/vtkModuleAPI.cmake:15 (vtk_module_load) > CMake/vtkModuleAPI.cmake:132 (_vtk_module_config_recurse) > CMake/vtkModuleMacros.cmake:180 (vtk_module_config) > CMake/vtkModuleMacros.cmake:582 (vtk_module_impl) > Common/Math/CMakeLists.txt:40 (vtk_module_library) > > > On Wed, Jan 18, 2017 at 12:11 PM, Robert Maynard > wrote: >> I am happy to announce that over the last two weeks we have rolled out a >> series of updates to VTK that mean the minimum required CMake version >> is now 3.3 (see below), and now builds with C+11 enabled. >> >> Yes VTK now requires a C++11 capable compiler. Initial we are only asking for a >> minimal set of C++11 features (nullptr), but as continue forward through the >> year we are going require a larger set of C++11 features. The final exact >> versions for each compiler have not been set in stone, but a rough estimation >> would be: >> - GCC 4.8+ >> - Clang 3.3+ >> - XCode 5.0+ >> - MSVC 2013+ >> >> I wanted to send this announcement out to bring up a couple of points: >> >> 1. Thanks to everyone that has helped get VTK ready for C++11! The final CMake >> switch over to C++11 was very easy, only because of all the hard work that other >> developers did in anticipation of this. So thank you very much. >> >> 2. The major reason for this slow roll out of C++11 is so that we minimize the >> impact on current VTK merge requests, while also minimizing dashboard >> instability. Contributors please be aware of these changes if you have long >> running branches. >> >> 3. We currently have dashboard machines running GCC 4.6 & 4.7. We are currently >> working up a plan on how best to transition these machines to at least GCC 4.8 >> as the roll out continues. >> >> 4. The current MinGW dashboard machine doesn't support C++11 and will be >> removed, with no plan of a replacement at Kitware. If the community is >> interested in maintaining a newer MinGW machine I can provide assistance >> on how to setup a machine. >> >> >> ============ >> >> Why CMake 3.3: >> >> We have chosen CMake 3.3 as the minimum required version for numerous reasons, >> the most important of those reasons being: >> >> - It is the first CMake release that offers C++11 support for all four major >> compilers ( GCC / MSVC / Clang / XCode ). >> >> - The CMake version is sufficiently new enough that it allows for a cleaning >> of the existing CMake infrastructure. The current CMake minimum version >> requires VTK to maintain forks of numerous FindPackages and Modules that are >> part of newer CMake versions. >> >> - Supports HTTPS downloads, with all the official binaries come with support. >> Allowing for migration of external data to a HTTPS only server. Something we >> are going to require in the near future. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> > > > > -- > Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Wed Jan 18 14:37:17 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 18 Jan 2017 14:37:17 -0500 Subject: [vtkusers] [vtk-developers] VTK updated to CMake 3.3 and C++11 In-Reply-To: References: Message-ID: Thanks, I can test it for you. On Jan 18, 2017 2:32 PM, "Robert Maynard" wrote: > I agree that the current error messages are not sufficient. I will > work on a MR that provides better error reporting. > > On Wed, Jan 18, 2017 at 1:21 PM, Bill Lorensen > wrote: > > I have a computer with a non-c++11 compiler. I would expect a better > > error message. > > > > Something like: VTK requires a c++11 compiler. > > > > After update vtk I get these cmake errors > > "Clang" > > > > version 3.0.0. > > Call Stack (most recent call first): > > CMake/vtkModuleMacros.cmake:646 (vtk_add_library) > > Common/Core/CMakeLists.txt:724 (vtk_module_library) > > > > > > CMake Error at CMake/vtkModuleAPI.cmake:53 (message): > > No such module: "vtkCommonCore" > > Call Stack (most recent call first): > > CMake/vtkModuleAPI.cmake:15 (vtk_module_load) > > CMake/vtkModuleAPI.cmake:132 (_vtk_module_config_recurse) > > CMake/vtkModuleMacros.cmake:180 (vtk_module_config) > > CMake/vtkModuleMacros.cmake:582 (vtk_module_impl) > > Common/Math/CMakeLists.txt:40 (vtk_module_library) > > > > > > On Wed, Jan 18, 2017 at 12:11 PM, Robert Maynard > > wrote: > >> I am happy to announce that over the last two weeks we have rolled out a > >> series of updates to VTK that mean the minimum required CMake version > >> is now 3.3 (see below), and now builds with C+11 enabled. > >> > >> Yes VTK now requires a C++11 capable compiler. Initial we are only > asking for a > >> minimal set of C++11 features (nullptr), but as continue forward > through the > >> year we are going require a larger set of C++11 features. The final > exact > >> versions for each compiler have not been set in stone, but a rough > estimation > >> would be: > >> - GCC 4.8+ > >> - Clang 3.3+ > >> - XCode 5.0+ > >> - MSVC 2013+ > >> > >> I wanted to send this announcement out to bring up a couple of points: > >> > >> 1. Thanks to everyone that has helped get VTK ready for C++11! The > final CMake > >> switch over to C++11 was very easy, only because of all the hard work > that other > >> developers did in anticipation of this. So thank you very much. > >> > >> 2. The major reason for this slow roll out of C++11 is so that we > minimize the > >> impact on current VTK merge requests, while also minimizing dashboard > >> instability. Contributors please be aware of these changes if you have > long > >> running branches. > >> > >> 3. We currently have dashboard machines running GCC 4.6 & 4.7. We are > currently > >> working up a plan on how best to transition these machines to at least > GCC 4.8 > >> as the roll out continues. > >> > >> 4. The current MinGW dashboard machine doesn't support C++11 and will be > >> removed, with no plan of a replacement at Kitware. If the community is > >> interested in maintaining a newer MinGW machine I can provide assistance > >> on how to setup a machine. > >> > >> > >> ============ > >> > >> Why CMake 3.3: > >> > >> We have chosen CMake 3.3 as the minimum required version for numerous > reasons, > >> the most important of those reasons being: > >> > >> - It is the first CMake release that offers C++11 support for all four > major > >> compilers ( GCC / MSVC / Clang / XCode ). > >> > >> - The CMake version is sufficiently new enough that it allows for a > cleaning > >> of the existing CMake infrastructure. The current CMake minimum > version > >> requires VTK to maintain forks of numerous FindPackages and Modules > that are > >> part of newer CMake versions. > >> > >> - Supports HTTPS downloads, with all the official binaries come with > support. > >> Allowing for migration of external data to a HTTPS only server. > Something we > >> are going to require in the near future. > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > >> > >> Search the list archives at: http://markmail.org/search/?q= > vtk-developers > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/vtk-developers > >> > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.croucher at auckland.ac.nz Wed Jan 18 21:02:39 2017 From: a.croucher at auckland.ac.nz (Adrian Croucher) Date: Thu, 19 Jan 2017 15:02:39 +1300 Subject: [vtkusers] write 2D mesh to ExodusII Message-ID: hi, I am writing a 2D mesh to an ExodusII file using vtkExodusIIWriter (in Python). I'm using VTK 5.8. The ExodusII file has a 'dimension' property which appears to be set to 3 by default. I would like to be able to set this to 2 for 2D meshes. Otherwise it doesn't read in properly in other applications (e.g. PETSc). From reading the C++ documentation for vtkExodusIIWriter it looks like there is a SetModelMetadata() method which takes a vtkModelMetadata object as argument. This object in turn has a SetCoordinateNames() method which takes an integer dimension parameter and an array of coordinate names. However in Python this method doesn't seem to be exposed- I get an AttributeError when I try to use it. I also get a segfault when I try to use the SetModelMetadata() method (maybe because the vtkModelMetadata object isn't set up right). Not sure if I'm on the right track here, or if there is some other way to achieve what I want? Regards, Adrian -- Dr Adrian Croucher Senior Research Fellow Department of Engineering Science University of Auckland, New Zealand email: a.croucher at auckland.ac.nz tel: +64 (0)9 923 4611 From alexandrov88 at gmail.com Thu Jan 19 04:10:16 2017 From: alexandrov88 at gmail.com (Sergey Alexandrov) Date: Thu, 19 Jan 2017 09:10:16 +0000 Subject: [vtkusers] vtkPointCloudFilter changes type of data arrays to float In-Reply-To: References: Message-ID: Hi Bill, Thanks for the prompt reply and the patch. I see that you have submitted a merge request already, so looking forward to have this fixed in the next release. In the meanwhile I'll just copy the patched vtkPointCloudFilter into my project. Cheers, Sergey On Wed, Jan 18, 2017 at 5:47 PM Bill Lorensen wrote: > PointCloudFilter was promoting all integral arrays to float. > I am working on a patch and test. > > In the meantime you could apply the following changes: > diff --git a/Filters/Points/vtkPointCloudFilter.cxx > b/Filters/Points/vtkPointCloudFilter.cxx > index d9b3b6f..63fa046 100644 > --- a/Filters/Points/vtkPointCloudFilter.cxx > +++ b/Filters/Points/vtkPointCloudFilter.cxx > @@ -48,7 +48,7 @@ struct MapPoints > vtkIdType *map, vtkPointData *inPD, vtkPointData *outPD) : > InPoints(inPts), OutPoints(outPts), PointMap(map) > { > - this->Arrays.AddArrays(numOutPts, inPD, outPD); > + this->Arrays.AddArrays(numOutPts, inPD, outPD, 0.0, false); > } > > void operator() (vtkIdType ptId, vtkIdType endPtId) > @@ -97,7 +97,7 @@ struct MapOutliers > vtkIdType *map, vtkPointData *inPD, vtkPointData *outPD2) : > InPoints(inPts), OutPoints(outPts), PointMap(map) > { > - this->Arrays.AddArrays(numOutPts, inPD, outPD2); > + this->Arrays.AddArrays(numOutPts, inPD, outPD2, 0.0, false); > } > > > On Wed, Jan 18, 2017 at 9:50 AM, Bill Lorensen > wrote: > > Looks like a bug. I'll take a look today. > > > > > > On Wed, Jan 18, 2017 at 5:46 AM, Sergey Alexandrov > > wrote: > >> Hey, > >> > >> I was writing a custom point cloud filtering algorithm and came across > the > >> vtkPointCloudFilter class, > >> which looks like a convenient base for this kind of filter. However, in > my > >> opinion it behaves strangely > >> when it comes to the handling of data arrays bundled with the points. > The > >> documentation says that > >> "The filter copies point attributes from input to output consistent > with the > >> filtering operation", and > >> indeed it does, but while copying it changes the type of the attribute > >> arrays, everything becomes a > >> float! Here is a small example that uses vtkRadiusOutlierRemoval > (derived > >> from vtkPointCloudFilter). > >> I create several points with an unsigned char attribute, and pass it > through > >> the filter. > >> > >> > >> #include > >> > >> #include > >> #include > >> #include > >> #include > >> #include > >> #include > >> > >> int main(int argc, const char** argv) > >> { > >> const double pt1[3] = { 0, 0, 0}; > >> const double pt2[3] = { 1, 0, 0}; > >> const double pt3[3] = { 2, 0, 0}; > >> > >> auto points = vtkSmartPointer::New(); > >> points->SetDataTypeToDouble(); > >> points->InsertNextPoint(pt1); > >> points->InsertNextPoint(pt2); > >> points->InsertNextPoint(pt3); > >> > >> auto labels = vtkSmartPointer::New(); > >> labels->SetName("label"); > >> labels->SetNumberOfComponents(1); > >> labels->InsertNextValue(1); > >> labels->InsertNextValue(2); > >> labels->InsertNextValue(3); > >> > >> auto poly_data = vtkSmartPointer::New(); > >> poly_data->SetPoints(points); > >> poly_data->GetPointData()->AddArray(labels); > >> > >> auto outlier_removal = > vtkSmartPointer::New(); > >> outlier_removal->SetInputData(poly_data); > >> outlier_removal->SetRadius(1.5); > >> outlier_removal->SetNumberOfNeighbors(2); > >> outlier_removal->Update(); > >> > >> auto output = outlier_removal->GetOutputDataObject(0); > >> auto attributes = output->GetAttributes(0); > >> > >> std::cout << "Output attributes: " << attributes->GetArrayName(0) << > ", > >> type: " << attributes->GetArray(0)->GetDataTypeAsString() << std::endl; > >> > >> return 0; > >> } > >> > >> > >> This example prints > >> > >>> Output attributes: label, type: float > >> > >> > >> So what happens is that the "label" attribute, that was originally of > type > >> unsigned char, becomes a > >> float attribute in the output of the filter. > >> > >> It this behavior a bug or a feature? Or maybe I am missing a flag > somewhere > >> which controls this > >> behavior? > >> > >> Cheers, > >> Sergey > >> > >> > >> > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/vtkusers > >> > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Jan 19 10:22:28 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 19 Jan 2017 10:22:28 -0500 Subject: [vtkusers] vtkPointCloudFilter changes type of data arrays to float In-Reply-To: References: Message-ID: Sergey, Just merged into master. Thanks for providing the example that illustrated the problem. Bill On Thu, Jan 19, 2017 at 4:10 AM, Sergey Alexandrov wrote: > Hi Bill, > > Thanks for the prompt reply and the patch. I see that you have submitted a > merge request already, so looking > forward to have this fixed in the next release. In the meanwhile I'll just > copy the patched vtkPointCloudFilter into > my project. > > Cheers, > Sergey > > > On Wed, Jan 18, 2017 at 5:47 PM Bill Lorensen > wrote: >> >> PointCloudFilter was promoting all integral arrays to float. >> I am working on a patch and test. >> >> In the meantime you could apply the following changes: >> diff --git a/Filters/Points/vtkPointCloudFilter.cxx >> b/Filters/Points/vtkPointCloudFilter.cxx >> index d9b3b6f..63fa046 100644 >> --- a/Filters/Points/vtkPointCloudFilter.cxx >> +++ b/Filters/Points/vtkPointCloudFilter.cxx >> @@ -48,7 +48,7 @@ struct MapPoints >> vtkIdType *map, vtkPointData *inPD, vtkPointData *outPD) : >> InPoints(inPts), OutPoints(outPts), PointMap(map) >> { >> - this->Arrays.AddArrays(numOutPts, inPD, outPD); >> + this->Arrays.AddArrays(numOutPts, inPD, outPD, 0.0, false); >> } >> >> void operator() (vtkIdType ptId, vtkIdType endPtId) >> @@ -97,7 +97,7 @@ struct MapOutliers >> vtkIdType *map, vtkPointData *inPD, vtkPointData *outPD2) : >> InPoints(inPts), OutPoints(outPts), PointMap(map) >> { >> - this->Arrays.AddArrays(numOutPts, inPD, outPD2); >> + this->Arrays.AddArrays(numOutPts, inPD, outPD2, 0.0, false); >> } >> >> >> On Wed, Jan 18, 2017 at 9:50 AM, Bill Lorensen >> wrote: >> > Looks like a bug. I'll take a look today. >> > >> > >> > On Wed, Jan 18, 2017 at 5:46 AM, Sergey Alexandrov >> > wrote: >> >> Hey, >> >> >> >> I was writing a custom point cloud filtering algorithm and came across >> >> the >> >> vtkPointCloudFilter class, >> >> which looks like a convenient base for this kind of filter. However, in >> >> my >> >> opinion it behaves strangely >> >> when it comes to the handling of data arrays bundled with the points. >> >> The >> >> documentation says that >> >> "The filter copies point attributes from input to output consistent >> >> with the >> >> filtering operation", and >> >> indeed it does, but while copying it changes the type of the attribute >> >> arrays, everything becomes a >> >> float! Here is a small example that uses vtkRadiusOutlierRemoval >> >> (derived >> >> from vtkPointCloudFilter). >> >> I create several points with an unsigned char attribute, and pass it >> >> through >> >> the filter. >> >> >> >> >> >> #include >> >> >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> #include >> >> >> >> int main(int argc, const char** argv) >> >> { >> >> const double pt1[3] = { 0, 0, 0}; >> >> const double pt2[3] = { 1, 0, 0}; >> >> const double pt3[3] = { 2, 0, 0}; >> >> >> >> auto points = vtkSmartPointer::New(); >> >> points->SetDataTypeToDouble(); >> >> points->InsertNextPoint(pt1); >> >> points->InsertNextPoint(pt2); >> >> points->InsertNextPoint(pt3); >> >> >> >> auto labels = vtkSmartPointer::New(); >> >> labels->SetName("label"); >> >> labels->SetNumberOfComponents(1); >> >> labels->InsertNextValue(1); >> >> labels->InsertNextValue(2); >> >> labels->InsertNextValue(3); >> >> >> >> auto poly_data = vtkSmartPointer::New(); >> >> poly_data->SetPoints(points); >> >> poly_data->GetPointData()->AddArray(labels); >> >> >> >> auto outlier_removal = >> >> vtkSmartPointer::New(); >> >> outlier_removal->SetInputData(poly_data); >> >> outlier_removal->SetRadius(1.5); >> >> outlier_removal->SetNumberOfNeighbors(2); >> >> outlier_removal->Update(); >> >> >> >> auto output = outlier_removal->GetOutputDataObject(0); >> >> auto attributes = output->GetAttributes(0); >> >> >> >> std::cout << "Output attributes: " << attributes->GetArrayName(0) << >> >> ", >> >> type: " << attributes->GetArray(0)->GetDataTypeAsString() << std::endl; >> >> >> >> return 0; >> >> } >> >> >> >> >> >> This example prints >> >> >> >>> Output attributes: label, type: float >> >> >> >> >> >> So what happens is that the "label" attribute, that was originally of >> >> type >> >> unsigned char, becomes a >> >> float attribute in the output of the filter. >> >> >> >> It this behavior a bug or a feature? Or maybe I am missing a flag >> >> somewhere >> >> which controls this >> >> behavior? >> >> >> >> Cheers, >> >> Sergey >> >> >> >> >> >> >> >> _______________________________________________ >> >> Powered by www.kitware.com >> >> >> >> Visit other Kitware open-source projects at >> >> http://www.kitware.com/opensource/opensource.html >> >> >> >> Please keep messages on-topic and check the VTK FAQ at: >> >> http://www.vtk.org/Wiki/VTK_FAQ >> >> >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> >> >> Follow this link to subscribe/unsubscribe: >> >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> > >> > >> > >> > -- >> > Unpaid intern in BillsBasement at noware dot com >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From sean at rogue-research.com Thu Jan 19 10:30:06 2017 From: sean at rogue-research.com (Sean McBride) Date: Thu, 19 Jan 2017 10:30:06 -0500 Subject: [vtkusers] RFC: removing Mac OS X 10.6 support in VTK In-Reply-To: References: <20160810183407.812025755@mail.rogue-research.com> <20160822143453.1008991438@mail.rogue-research.com> <20161116165949.1640947384@mail.rogue-research.com> Message-ID: <20170119153006.1332802203@mail.rogue-research.com> On Wed, 16 Nov 2016 14:02:06 -0500, Jean-Christophe Fillion-Robin said: >There was some glitch in the ordering process related to the new dasbboard >machines. Without the new hardware, we were not able to setup a new MacOSx >build. J-C, With all the talk of VTK requiring newer CMake, newer Qt, newer C++, I thought I'd ping you on this. Is your buildbot updated from OS X 10.6 yet? 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 rcourant at gmail.com Thu Jan 19 14:07:53 2017 From: rcourant at gmail.com (Carlos Lopez) Date: Thu, 19 Jan 2017 14:07:53 -0500 Subject: [vtkusers] VTK updated to CMake 3.3 and C++11 In-Reply-To: References: Message-ID: Hi, The C++11 check is failing for me. I'm using CMAKE 3.6.2 on windows with Visual studio Community 15. Removing the check within cmake allows me to build without issues. I'm building from gitlab's main repo, updated today. best, carlos On Wed, Jan 18, 2017 at 12:11 PM, Robert Maynard wrote: > I am happy to announce that over the last two weeks we have rolled out a > series of updates to VTK that mean the minimum required CMake version > is now 3.3 (see below), and now builds with C+11 enabled. > > Yes VTK now requires a C++11 capable compiler. Initial we are only asking > for a > minimal set of C++11 features (nullptr), but as continue forward through > the > year we are going require a larger set of C++11 features. The final exact > versions for each compiler have not been set in stone, but a rough > estimation > would be: > - GCC 4.8+ > - Clang 3.3+ > - XCode 5.0+ > - MSVC 2013+ > > I wanted to send this announcement out to bring up a couple of points: > > 1. Thanks to everyone that has helped get VTK ready for C++11! The final > CMake > switch over to C++11 was very easy, only because of all the hard work that > other > developers did in anticipation of this. So thank you very much. > > 2. The major reason for this slow roll out of C++11 is so that we minimize > the > impact on current VTK merge requests, while also minimizing dashboard > instability. Contributors please be aware of these changes if you have long > running branches. > > 3. We currently have dashboard machines running GCC 4.6 & 4.7. We are > currently > working up a plan on how best to transition these machines to at least GCC > 4.8 > as the roll out continues. > > 4. The current MinGW dashboard machine doesn't support C++11 and will be > removed, with no plan of a replacement at Kitware. If the community is > interested in maintaining a newer MinGW machine I can provide assistance > on how to setup a machine. > > > ============ > > Why CMake 3.3: > > We have chosen CMake 3.3 as the minimum required version for numerous > reasons, > the most important of those reasons being: > > - It is the first CMake release that offers C++11 support for all four > major > compilers ( GCC / MSVC / Clang / XCode ). > > - The CMake version is sufficiently new enough that it allows for a > cleaning > of the existing CMake infrastructure. The current CMake minimum version > requires VTK to maintain forks of numerous FindPackages and Modules that > are > part of newer CMake versions. > > - Supports HTTPS downloads, with all the official binaries come with > support. > Allowing for migration of external data to a HTTPS only server. > Something we > are going to require in the near future. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 robert.maynard at kitware.com Thu Jan 19 14:15:22 2017 From: robert.maynard at kitware.com (Robert Maynard) Date: Thu, 19 Jan 2017 14:15:22 -0500 Subject: [vtkusers] VTK updated to CMake 3.3 and C++11 In-Reply-To: References: Message-ID: Hi Carlos, A regression to the build system was merged in last night that broke building with Visual Studio. A correction was just ( 15 minutes ago ) merged into VTK master that restores building with Visual Studio. Sorry for the inconvenience. On Thu, Jan 19, 2017 at 2:07 PM, Carlos Lopez wrote: > Hi, > > The C++11 check is failing for me. I'm using CMAKE 3.6.2 on windows with > Visual studio Community 15. > > Removing the check within cmake allows me to build without issues. > > I'm building from gitlab's main repo, updated today. > > best, > carlos > > > > On Wed, Jan 18, 2017 at 12:11 PM, Robert Maynard > wrote: >> >> I am happy to announce that over the last two weeks we have rolled out a >> series of updates to VTK that mean the minimum required CMake version >> is now 3.3 (see below), and now builds with C+11 enabled. >> >> Yes VTK now requires a C++11 capable compiler. Initial we are only asking >> for a >> minimal set of C++11 features (nullptr), but as continue forward through >> the >> year we are going require a larger set of C++11 features. The final exact >> versions for each compiler have not been set in stone, but a rough >> estimation >> would be: >> - GCC 4.8+ >> - Clang 3.3+ >> - XCode 5.0+ >> - MSVC 2013+ >> >> I wanted to send this announcement out to bring up a couple of points: >> >> 1. Thanks to everyone that has helped get VTK ready for C++11! The final >> CMake >> switch over to C++11 was very easy, only because of all the hard work that >> other >> developers did in anticipation of this. So thank you very much. >> >> 2. The major reason for this slow roll out of C++11 is so that we minimize >> the >> impact on current VTK merge requests, while also minimizing dashboard >> instability. Contributors please be aware of these changes if you have >> long >> running branches. >> >> 3. We currently have dashboard machines running GCC 4.6 & 4.7. We are >> currently >> working up a plan on how best to transition these machines to at least GCC >> 4.8 >> as the roll out continues. >> >> 4. The current MinGW dashboard machine doesn't support C++11 and will be >> removed, with no plan of a replacement at Kitware. If the community is >> interested in maintaining a newer MinGW machine I can provide assistance >> on how to setup a machine. >> >> >> ============ >> >> Why CMake 3.3: >> >> We have chosen CMake 3.3 as the minimum required version for numerous >> reasons, >> the most important of those reasons being: >> >> - It is the first CMake release that offers C++11 support for all four >> major >> compilers ( GCC / MSVC / Clang / XCode ). >> >> - The CMake version is sufficiently new enough that it allows for a >> cleaning >> of the existing CMake infrastructure. The current CMake minimum version >> requires VTK to maintain forks of numerous FindPackages and Modules that >> are >> part of newer CMake versions. >> >> - Supports HTTPS downloads, with all the official binaries come with >> support. >> Allowing for migration of external data to a HTTPS only server. >> Something we >> are going to require in the near future. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > From rcourant at gmail.com Thu Jan 19 14:19:00 2017 From: rcourant at gmail.com (Carlos Lopez) Date: Thu, 19 Jan 2017 14:19:00 -0500 Subject: [vtkusers] VTK updated to CMake 3.3 and C++11 In-Reply-To: References: Message-ID: No problem. Thanks for your reply. carlos On Thu, Jan 19, 2017 at 2:15 PM, Robert Maynard wrote: > Hi Carlos, > > A regression to the build system was merged in last night that broke > building with Visual Studio. A correction was just ( 15 minutes ago ) > merged into VTK master that restores building with Visual Studio. > > Sorry for the inconvenience. > > On Thu, Jan 19, 2017 at 2:07 PM, Carlos Lopez wrote: > > Hi, > > > > The C++11 check is failing for me. I'm using CMAKE 3.6.2 on windows with > > Visual studio Community 15. > > > > Removing the check within cmake allows me to build without issues. > > > > I'm building from gitlab's main repo, updated today. > > > > best, > > carlos > > > > > > > > On Wed, Jan 18, 2017 at 12:11 PM, Robert Maynard > > wrote: > >> > >> I am happy to announce that over the last two weeks we have rolled out a > >> series of updates to VTK that mean the minimum required CMake version > >> is now 3.3 (see below), and now builds with C+11 enabled. > >> > >> Yes VTK now requires a C++11 capable compiler. Initial we are only > asking > >> for a > >> minimal set of C++11 features (nullptr), but as continue forward through > >> the > >> year we are going require a larger set of C++11 features. The final > exact > >> versions for each compiler have not been set in stone, but a rough > >> estimation > >> would be: > >> - GCC 4.8+ > >> - Clang 3.3+ > >> - XCode 5.0+ > >> - MSVC 2013+ > >> > >> I wanted to send this announcement out to bring up a couple of points: > >> > >> 1. Thanks to everyone that has helped get VTK ready for C++11! The final > >> CMake > >> switch over to C++11 was very easy, only because of all the hard work > that > >> other > >> developers did in anticipation of this. So thank you very much. > >> > >> 2. The major reason for this slow roll out of C++11 is so that we > minimize > >> the > >> impact on current VTK merge requests, while also minimizing dashboard > >> instability. Contributors please be aware of these changes if you have > >> long > >> running branches. > >> > >> 3. We currently have dashboard machines running GCC 4.6 & 4.7. We are > >> currently > >> working up a plan on how best to transition these machines to at least > GCC > >> 4.8 > >> as the roll out continues. > >> > >> 4. The current MinGW dashboard machine doesn't support C++11 and will be > >> removed, with no plan of a replacement at Kitware. If the community is > >> interested in maintaining a newer MinGW machine I can provide assistance > >> on how to setup a machine. > >> > >> > >> ============ > >> > >> Why CMake 3.3: > >> > >> We have chosen CMake 3.3 as the minimum required version for numerous > >> reasons, > >> the most important of those reasons being: > >> > >> - It is the first CMake release that offers C++11 support for all four > >> major > >> compilers ( GCC / MSVC / Clang / XCode ). > >> > >> - The CMake version is sufficiently new enough that it allows for a > >> cleaning > >> of the existing CMake infrastructure. The current CMake minimum > version > >> requires VTK to maintain forks of numerous FindPackages and Modules > that > >> are > >> part of newer CMake versions. > >> > >> - Supports HTTPS downloads, with all the official binaries come with > >> support. > >> Allowing for migration of external data to a HTTPS only server. > >> Something we > >> are going to require in the near future. > >> _______________________________________________ > >> Powered by www.kitware.com > >> > >> Visit other Kitware open-source projects at > >> http://www.kitware.com/opensource/opensource.html > >> > >> Please keep messages on-topic and check the VTK FAQ at: > >> http://www.vtk.org/Wiki/VTK_FAQ > >> > >> Search the list archives at: http://markmail.org/search/?q=vtkusers > >> > >> Follow this link to subscribe/unsubscribe: > >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Thu Jan 19 16:54:31 2017 From: sean at rogue-research.com (Sean McBride) Date: Thu, 19 Jan 2017 16:54:31 -0500 Subject: [vtkusers] RemoveViewProp then AddViewProp of same actor changes results? Message-ID: <20170119215431.968849036@mail.rogue-research.com> Hi all, I have a scene with various actors and everything draws and behaves correctly. If I then simply remove and re-add an actor like so: renderer->RemoveViewProp(actor); renderer->AddViewProp(actor); then should I expect things to redraw exactly as they were? I thought yes, but I have a case where the answer is no. Here's a screenshot: The left is correct and before the remove+add. The right is after and incorrect. Is this expected? buggy? Thanks, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From ken.martin at kitware.com Thu Jan 19 16:59:09 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 19 Jan 2017 16:59:09 -0500 Subject: [vtkusers] RemoveViewProp then AddViewProp of same actor changes results? In-Reply-To: <20170119215431.968849036@mail.rogue-research.com> References: <20170119215431.968849036@mail.rogue-research.com> Message-ID: It should be the same unless any of the actors are coincident or translucent. In that case the order of the actors can make a difference. alpha blending for transparency is order dependent and with coincident geometry either first or last wins (I forget which in VTK). Not sure if that applies in your example. On Thu, Jan 19, 2017 at 4:54 PM, Sean McBride wrote: > Hi all, > > I have a scene with various actors and everything draws and behaves > correctly. If I then simply remove and re-add an actor like so: > > renderer->RemoveViewProp(actor); > renderer->AddViewProp(actor); > > then should I expect things to redraw exactly as they were? I thought > yes, but I have a case where the answer is no. Here's a screenshot: > > > > The left is correct and before the remove+add. The right is after and > incorrect. > > Is this expected? buggy? > > Thanks, > > -- > ____________________________________________________________ > Sean McBride, B. Eng sean at rogue-research.com > Rogue Research www.rogue-research.com > Mac Software Developer Montr?al, Qu?bec, Canada > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Thu Jan 19 17:05:01 2017 From: sean at rogue-research.com (Sean McBride) Date: Thu, 19 Jan 2017 17:05:01 -0500 Subject: [vtkusers] RemoveViewProp then AddViewProp of same actor changes results? In-Reply-To: References: <20170119215431.968849036@mail.rogue-research.com> Message-ID: <20170119220501.1604153636@mail.rogue-research.com> On Thu, 19 Jan 2017 16:59:09 -0500, Ken Martin said: >It should be the same unless any of the actors are coincident or >translucent. In that case the order of the actors can make a difference. >alpha blending for transparency is order dependent and with coincident >geometry either first or last wins (I forget which in VTK). Not sure if >that applies in your example. The green thing in my screenshot is indeed translucent. Making it fully opaque indeed "fixes" the problem. I don't think I have anything coincident, though things overlap. So how do I control the order? vtkViewport.h has AddViewProp() but I don't see any API to, for example, add it first or last. And vtkPropCollection's docs say that it's 'unsorted'. Thanks Ken! Sean From ken.martin at kitware.com Thu Jan 19 17:19:08 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 19 Jan 2017 17:19:08 -0500 Subject: [vtkusers] RemoveViewProp then AddViewProp of same actor changes results? In-Reply-To: <20170119220501.1604153636@mail.rogue-research.com> References: <20170119215431.968849036@mail.rogue-research.com> <20170119220501.1604153636@mail.rogue-research.com> Message-ID: I believe it is unsorted in that it is rendered in the order the props are added (not sorted by some other metric). Opaque actors get rendered before translucent, but if you have multiple translucent actors they are rendered in the order added. I suppose you could renderer->GetViewProps()->InsertItem(loc, yourActor); if you know what location you want. On Thu, Jan 19, 2017 at 5:05 PM, Sean McBride wrote: > On Thu, 19 Jan 2017 16:59:09 -0500, Ken Martin said: > > >It should be the same unless any of the actors are coincident or > >translucent. In that case the order of the actors can make a difference. > >alpha blending for transparency is order dependent and with coincident > >geometry either first or last wins (I forget which in VTK). Not sure if > >that applies in your example. > > The green thing in my screenshot is indeed translucent. Making it fully > opaque indeed "fixes" the problem. > > I don't think I have anything coincident, though things overlap. > > So how do I control the order? vtkViewport.h has AddViewProp() but I > don't see any API to, for example, add it first or last. And > vtkPropCollection's docs say that it's 'unsorted'. > > Thanks Ken! > > Sean > > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Thu Jan 19 22:06:16 2017 From: bebe0705 at colorado.edu (BBerco) Date: Thu, 19 Jan 2017 20:06:16 -0700 (MST) Subject: [vtkusers] Messed up pdf output from vtkGL2PSExporter Message-ID: <1484881576492-5741884.post@n5.nabble.com> Dear all, I am trying to export a view of a vtkChart to pdf, but the plots I am getting are messed up (the xticks are overlapping with the xaxis and the legend box transparency is off, among other things). I've set up a minimum example based off of the LinePlot tutorial, with a few lines added for the exporter. Running the program and comparing the pdf output to the vtk window clearly shows the issue, at least on my laptop. Any clues? Thanks, Ben ps1: the test file: LinePlot.cxx ps2: my locale settings are LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL="en_US.UTF-8" -- View this message in context: http://vtk.1045678.n5.nabble.com/Messed-up-pdf-output-from-vtkGL2PSExporter-tp5741884.html Sent from the VTK - Users mailing list archive at Nabble.com. From sur.chiranjib at gmail.com Fri Jan 20 02:27:16 2017 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Fri, 20 Jan 2017 12:57:16 +0530 Subject: [vtkusers] vtk - PointInsideObject - is the problem is due to precision? Message-ID: Hi All, I am trying to extend the example to find points inside an object ( http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject). The idea is to fill a 3D volume with points inside it. While doing so, I am finding that for some points which are actually outside the object are getting detected as inside. To picture on the left is my original object and on the right is the object filled with points [image: Inline image 1] [image: Inline image 2] You will find that few points which are actually outside are getting detected as inside. Any idea what is happening? The object file and the source codes are attached. Thanks, Chiranjib -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 20931 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 314490 bytes Desc: not available URL: -------------- next part -------------- cmake_minimum_required(VERSION 2.8) PROJECT(FillObject) set( CMAKE_CXX_FLAGS "-g") find_package(VTK REQUIRED) find_package(Qt5Widgets) find_package(Qt5Core) find_package(Qt5Designer) include(${VTK_USE_FILE}) add_executable(FillObject MACOSX_BUNDLE FillObject) if(VTK_LIBRARIES) target_link_libraries(FillObject ${VTK_LIBRARIES} Qt5::Widgets Qt5::Core) else() target_link_libraries(FillObject vtkHybrid vtkWidgets Qt5::Widgets Qt5::Core) endif() -------------- next part -------------- A non-text attachment was scrubbed... Name: FillObject.cpp Type: text/x-c++src Size: 3478 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Groove_cylinder.stl Type: application/octet-stream Size: 52384 bytes Desc: not available URL: From chenjianyyzz at 163.com Fri Jan 20 03:04:58 2017 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Fri, 20 Jan 2017 16:04:58 +0800 (CST) Subject: [vtkusers] different result from vtkDICOMImageReader VS vtkDICOMReader Message-ID: <4c0bd2df.602d.159bae838ec.Coremail.chenjianyyzz@163.com> Hi, I wonder why result from below code are different: -----------------Code 1: using vtkDICOMImageReader -------------------------- vtkDICOMImageReader *reader = vtkDICOMImageReader::New(); reader->SetDirectoryName("***"); <----- DICOM folder // After get reader, all below are same vtkSmartPointer boneExtraractor = vtkSmartPointer::New(); boneExtraractor->SetInputConnection(reader->GetOutputPort()); boneExtraractor->GenerateValues(1, 200, 3097); vtkSmartPointer boneNormals = vtkSmartPointer::New(); boneNormals->SetInputConnection(boneExtraractor->GetOutputPort()); boneNormals->SetFeatureAngle(60.0); vtkSmartPointer boneStripper = vtkSmartPointer::New(); boneStripper->SetInputConnection(boneNormals->GetOutputPort()); vtkSmartPointer boneMapper = vtkSmartPointer::New(); boneMapper->SetInputConnection(boneNormals->GetOutputPort()); boneMapper->ScalarVisibilityOff(); vtkSmartPointer bone = vtkSmartPointer::New(); bone->SetMapper(boneMapper); vtkRenderer *aRenderer = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(aRenderer); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); aRenderer->AddActor(bone); renWin->Render(); iren->Initialize(); iren->Start(); Result: please see attache screenshot: vtkDICOMImageReader.png -----------------Code 2: using vtkDICOMReader-------------------------- vtkSmartPointer filenames = ****; //<----- Fill DICOM files vtkSmartPointer sorter = vtkSmartPointer ::New(); sorter->SetInputFileNames(filenames); sorter->Update(); int ns= sorter->GetNumberOfSeries(); int si= 0; for (int i = 0; iGetFileNamesForSeries(i)->GetNumberOfValues() > sorter->GetFileNamesForSeries(si)->GetNumberOfValues()) { si= i; } } vtkStringArray *sf= sorter->GetFileNamesForSeries(si); vtkDICOMReader *reader = vtkDICOMReader::New(); reader->RemoveAllInputs(); reader->SetFileNames(sf); reader->AutoRescaleOff(); reader->Update(); // After get reader, all below are same vtkSmartPointer boneExtraractor = vtkSmartPointer::New(); boneExtraractor->SetInputConnection(reader->GetOutputPort()); boneExtraractor->GenerateValues(1, 200, 3097); vtkSmartPointer boneNormals = vtkSmartPointer::New(); boneNormals->SetInputConnection(boneExtraractor->GetOutputPort()); boneNormals->SetFeatureAngle(60.0); vtkSmartPointer boneStripper = vtkSmartPointer::New(); boneStripper->SetInputConnection(boneNormals->GetOutputPort()); vtkSmartPointer boneMapper = vtkSmartPointer::New(); boneMapper->SetInputConnection(boneNormals->GetOutputPort()); boneMapper->ScalarVisibilityOff(); vtkSmartPointer bone = vtkSmartPointer::New(); bone->SetMapper(boneMapper); vtkRenderer *aRenderer = vtkRenderer::New(); vtkRenderWindow *renWin = vtkRenderWindow::New(); renWin->AddRenderer(aRenderer); vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); iren->SetRenderWindow(renWin); aRenderer->AddActor(bone); renWin->Render(); iren->Initialize(); iren->Start(); Result: please see attache screenshot: vtkDICOMReader.png =============================== the result from vtkDICOMImageReader is what I expected. and the result from vtkDICOMImageReader seems only skin is visuable, and bone is invisable. any body can tell me why? how should I update the code of vtkDICOMReader to visualize the bone structure? Thanks James -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkDICOMImageReader.png Type: image/png Size: 30177 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkDICOMReader.png Type: image/png Size: 55148 bytes Desc: not available URL: From aborsic at ne-scientific.com Fri Jan 20 03:49:22 2017 From: aborsic at ne-scientific.com (Andrea Borsic) Date: Fri, 20 Jan 2017 09:49:22 +0100 Subject: [vtkusers] vtk - PointInsideObject - is the problem is due to precision? In-Reply-To: References: Message-ID: <5839ecf3-cfb6-bfc8-81b8-c900f713e0d7@ne-scientific.com> Hi Chiranjib, Have you tried reducing the spatial tolerance with the method SetTolerance() of vtkSelectEnclosedPoints() ? I have experienced a similar situation, and setting an appropriate tolerance (e.g. a small fraction of the size of the object) solved the problem. Cheers, Andrea On 1/20/2017 8:27 AM, Chiranjib Sur wrote: > Hi All, > I am trying to extend the example to find points inside an object > (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject > ). > The idea is to fill a 3D volume with points inside it. > > While doing so, I am finding that for some points which are actually > outside the object are getting detected as inside. > To picture on the left is my original object and on the right is the > object filled with points > > Inline image 1 Inline image 2 > > You will find that few points which are actually outside are getting > detected as inside. > > Any idea what is happening? The object file and the source codes are > attached. > > Thanks, > Chiranjib > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 20931 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 314490 bytes Desc: not available URL: From marceloduartetrevisani at gmail.com Fri Jan 20 04:45:00 2017 From: marceloduartetrevisani at gmail.com (Marcelo Duarte Trevisani) Date: Fri, 20 Jan 2017 07:45:00 -0200 Subject: [vtkusers] Large dataset to plot with VTK Message-ID: Hello folks! I'm trying to plot some 3D and 2D graphics with vtk, but I have to use a large dataset with few million points. What is the best way to plot this amount of data which will spent less time and memory? Thanks in advance! Best regards, -- Marcelo Duarte Trevisani Control and Automation Engineering by Universidade Federal de Minas Gerais (Federal University of Minas Gerais) Certificate Professional Scrum Master by Scrum.org "Success is walking from failure to failure with no loss of enthusiasm." Winston Churchill -------------- next part -------------- An HTML attachment was scrubbed... URL: From benoit.combes at inria.fr Fri Jan 20 04:57:02 2017 From: benoit.combes at inria.fr (bcombes) Date: Fri, 20 Jan 2017 10:57:02 +0100 Subject: [vtkusers] [vtkUsers] Mapping the real x, y, z points to the volume indices i, j, k using vtkImageData Message-ID: Hi vtkUsers, I have a hard time with ComputeStructuredCoordinates. * Goal: I have a vtk file and a nii file. I want to recover some scalar values from the volume to assign it to the surface scalar. So, essentially, I want to find the mapping from the real x,y,z points to the volume indices i,j,k. * Observations: 1) When displaying the surface and the volume in the real frame they fit perferctly, so data looks not to be the problem. 2) When making the (x,y,z)_Real to (i,j,k)_Volume correspondances using ComputeStructuredCoordinates or FindPoint, I do not have the expected results. In particular, the coordinates given by ComputeStructuredCoordinates indicates that the points are outside the volume or have wrong scalar values. In other words, it does not seem to do the job I expect. * Code: ``` // img is a vtkSmartPointer loaded from vtkSmartPointer // surf is a vtkSmartPointer loaded from vtkSmartPointer for(int i=0;iGetNumberOfPoints();++i) { std::cout<GetPoint(i); int ijk[] = { -1,-1,-1}; double *foopcoords; int isOk=img->ComputeStructuredCoordinates(v,ijk,foopcoords) ; if(isOk && (ijk[0]>0 && ijk[1]>0 && ijk[2]>0)) {float v=img->GetScalarComponentAsFloat(ijk[0],ijk[1],ijk[2],0); scal->InsertValue(i,v); } else {scal->InsertValue(i,-1);} } ``` I also try to use FindPoint instead: ``` int id = img->FindPoint(v); if(id>-1) { scal->InsertValue(i,img->GetPointData()->GetScalars()->GetTuple(id)[0]); } else {scal->InsertValue(i,-1);} ``` but have the same issue. * Question I don't understand how to fix this. Am I wrongly understand the purpose of ComputeStructuredCoordinates ? Are there any voxels to real frames that are not accounted for when using this function (or extra used ones) ? From sur.chiranjib at gmail.com Fri Jan 20 06:14:13 2017 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Fri, 20 Jan 2017 16:44:13 +0530 Subject: [vtkusers] vtk - PointInsideObject - is the problem is due to precision? In-Reply-To: <5839ecf3-cfb6-bfc8-81b8-c900f713e0d7@ne-scientific.com> References: <5839ecf3-cfb6-bfc8-81b8-c900f713e0d7@ne-scientific.com> Message-ID: HI Andrea, Thanks for the quick and effective reply. By default the tolerance is set to =.001 and I tried with different values and by using the tolerance value = 0.0001, I get a much cleaner data that I am looking for. IT looks like this now [image: Inline image 1] Thanks much for your help :) Thanks and regards, Chiranjib On Fri, Jan 20, 2017 at 2:19 PM, Andrea Borsic wrote: > Hi Chiranjib, > > Have you tried reducing the spatial tolerance with the method > SetTolerance() of vtkSelectEnclosedPoints() ? > > I have experienced a similar situation, and setting an appropriate > tolerance (e.g. a small fraction of the size of the object) solved the > problem. > > Cheers, > > Andrea > > > > > On 1/20/2017 8:27 AM, Chiranjib Sur wrote: > > Hi All, > I am trying to extend the example to find points inside an object ( > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject). The > idea is to fill a 3D volume with points inside it. > > While doing so, I am finding that for some points which are actually > outside the object are getting detected as inside. > To picture on the left is my original object and on the right is the > object filled with points > > [image: Inline image 1] [image: Inline image 2] > > You will find that few points which are actually outside are getting > detected as inside. > > Any idea what is happening? The object file and the source codes are > attached. > > Thanks, > Chiranjib > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe:http://public.kitware.com/mailman/listinfo/vtkusers > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 20931 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 314490 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 317143 bytes Desc: not available URL: From david.gobbi at gmail.com Fri Jan 20 08:24:02 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 20 Jan 2017 06:24:02 -0700 Subject: [vtkusers] different result from vtkDICOMImageReader VS vtkDICOMReader In-Reply-To: <4c0bd2df.602d.159bae838ec.Coremail.chenjianyyzz@163.com> References: <4c0bd2df.602d.159bae838ec.Coremail.chenjianyyzz@163.com> Message-ID: Hi James, When applying thresholds to CT data, use the RescaleIntercept and RescaleSlope so that the thresholding is based on the real data values (in Hounsfield units). Also see the "CT and PET rescaled values" section of the following page: http://dgobbi.github.io/vtk-dicom/doc/api/image_reader.html Cheers, - David On Fri, Jan 20, 2017 at 1:04 AM, chenjianyyzz wrote: > Hi, > I wonder why result from below code are different: > -----------------Code 1: using vtkDICOMImageReader > -------------------------- > * vtkDICOMImageReader *reader = vtkDICOMImageReader::New();* > * reader->SetDirectoryName("***"); <----- DICOM folder* > > // After get reader, all below are same > vtkSmartPointer boneExtraractor = > vtkSmartPointer::New(); > boneExtraractor->SetInputConnection(reader->GetOutputPort()); > boneExtraractor->GenerateValues(1, 200, 3097); > vtkSmartPointer boneNormals = > vtkSmartPointer::New(); > boneNormals->SetInputConnection(boneExtraractor->GetOutputPort()); > boneNormals->SetFeatureAngle(60.0); > vtkSmartPointer boneStripper = vtkSmartPointer:: > New(); > boneStripper->SetInputConnection(boneNormals->GetOutputPort()); > vtkSmartPointer boneMapper = > vtkSmartPointer::New(); > boneMapper->SetInputConnection(boneNormals->GetOutputPort()); > boneMapper->ScalarVisibilityOff(); > vtkSmartPointer bone = vtkSmartPointer::New(); > bone->SetMapper(boneMapper); > vtkRenderer *aRenderer = vtkRenderer::New(); > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(aRenderer); > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > aRenderer->AddActor(bone); > renWin->Render(); > iren->Initialize(); > iren->Start(); > > Result: please see attache screenshot: vtkDICOMImageReader.png > > -----------------Code 2: using vtkDICOMReader-------------------------- > * vtkSmartPointer filenames = ****; > //<----- Fill DICOM files* > * vtkSmartPointer sorter = vtkSmartPointer > ::New();* > * sorter->SetInputFileNames(filenames);* > * sorter->Update();* > * int ns= sorter->GetNumberOfSeries();* > * int si= 0;* > * for (int i = 0; i * if (sorter->GetFileNamesForSeries(i)->GetNumberOfValues() > > sorter->GetFileNamesForSeries(si)->GetNumberOfValues()) {* > * si= i;* > * }* > * }* > * vtkStringArray *sf= sorter->GetFileNamesForSeries(si);* > * vtkDICOMReader *reader = vtkDICOMReader::New();* > * reader->RemoveAllInputs();* > * reader->SetFileNames(sf);* > * reader->AutoRescaleOff();* > * reader->Update();* > > // After get reader, all below are same > vtkSmartPointer boneExtraractor = > vtkSmartPointer::New(); > boneExtraractor->SetInputConnection(reader->GetOutputPort()); > boneExtraractor->GenerateValues(1, 200, 3097); > vtkSmartPointer boneNormals = > vtkSmartPointer::New(); > boneNormals->SetInputConnection(boneExtraractor->GetOutputPort()); > boneNormals->SetFeatureAngle(60.0); > vtkSmartPointer boneStripper = vtkSmartPointer:: > New(); > boneStripper->SetInputConnection(boneNormals->GetOutputPort()); > vtkSmartPointer boneMapper = > vtkSmartPointer::New(); > boneMapper->SetInputConnection(boneNormals->GetOutputPort()); > boneMapper->ScalarVisibilityOff(); > vtkSmartPointer bone = vtkSmartPointer::New(); > bone->SetMapper(boneMapper); > vtkRenderer *aRenderer = vtkRenderer::New(); > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(aRenderer); > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > aRenderer->AddActor(bone); > renWin->Render(); > iren->Initialize(); > iren->Start(); > > Result: please see attache screenshot: vtkDICOMReader.png > =============================== > the result from vtkDICOMImageReader is what I expected. and the result > from vtkDICOMImageReader seems only skin is visuable, and bone is > invisable. > any body can tell me why? how should I update the code of vtkDICOMReader > to visualize the bone structure? > > Thanks > James > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Fri Jan 20 09:10:11 2017 From: david.lonie at kitware.com (David Lonie) Date: Fri, 20 Jan 2017 09:10:11 -0500 Subject: [vtkusers] Messed up pdf output from vtkGL2PSExporter In-Reply-To: <1484881576492-5741884.post@n5.nabble.com> References: <1484881576492-5741884.post@n5.nabble.com> Message-ID: Can you provide an example of the rendering and pdf? Also, which VTK backend are you using, OpenGL or OpenGL2? On Thu, Jan 19, 2017 at 10:06 PM, BBerco wrote: > Dear all, > I am trying to export a view of a vtkChart to pdf, but the plots I am > getting are messed up (the xticks are overlapping with the xaxis and the > legend box transparency is off, among other things). > > I've set up a minimum example based off of the LinePlot tutorial, with a few > lines added for the exporter. Running the program and comparing the pdf > output to the vtk window clearly shows the issue, at least on my laptop. > > Any clues? > > Thanks, > Ben > > ps1: the test file: LinePlot.cxx > > ps2: my locale settings are > LANG="en_US.UTF-8" > LC_COLLATE="en_US.UTF-8" > LC_CTYPE="en_US.UTF-8" > LC_MESSAGES="en_US.UTF-8" > LC_MONETARY="en_US.UTF-8" > LC_NUMERIC="en_US.UTF-8" > LC_TIME="en_US.UTF-8" > LC_ALL="en_US.UTF-8" > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Messed-up-pdf-output-from-vtkGL2PSExporter-tp5741884.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From david.lonie at kitware.com Fri Jan 20 09:46:36 2017 From: david.lonie at kitware.com (David Lonie) Date: Fri, 20 Jan 2017 09:46:36 -0500 Subject: [vtkusers] Messed up pdf output from vtkGL2PSExporter In-Reply-To: References: <1484881576492-5741884.post@n5.nabble.com> Message-ID: I ran the test on the OpenGL2 backend and noticed the artifacts. The PDF backend for GL2PS is somewhat lackluster -- things like text alignment tend to come out badly. The postscript backend, however, is much more robust, and changing the output from PDF to PS produces a much better rendering. You may have better luck exporting to postscript and converting afterwards. HTH, Dave On Fri, Jan 20, 2017 at 9:10 AM, David Lonie wrote: > Can you provide an example of the rendering and pdf? Also, which VTK > backend are you using, OpenGL or OpenGL2? > > On Thu, Jan 19, 2017 at 10:06 PM, BBerco wrote: >> Dear all, >> I am trying to export a view of a vtkChart to pdf, but the plots I am >> getting are messed up (the xticks are overlapping with the xaxis and the >> legend box transparency is off, among other things). >> >> I've set up a minimum example based off of the LinePlot tutorial, with a few >> lines added for the exporter. Running the program and comparing the pdf >> output to the vtk window clearly shows the issue, at least on my laptop. >> >> Any clues? >> >> Thanks, >> Ben >> >> ps1: the test file: LinePlot.cxx >> >> ps2: my locale settings are >> LANG="en_US.UTF-8" >> LC_COLLATE="en_US.UTF-8" >> LC_CTYPE="en_US.UTF-8" >> LC_MESSAGES="en_US.UTF-8" >> LC_MONETARY="en_US.UTF-8" >> LC_NUMERIC="en_US.UTF-8" >> LC_TIME="en_US.UTF-8" >> LC_ALL="en_US.UTF-8" >> >> >> >> >> >> -- >> View this message in context: http://vtk.1045678.n5.nabble.com/Messed-up-pdf-output-from-vtkGL2PSExporter-tp5741884.html >> Sent from the VTK - Users mailing list archive at Nabble.com. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers From bebe0705 at colorado.edu Fri Jan 20 11:13:28 2017 From: bebe0705 at colorado.edu (BBerco) Date: Fri, 20 Jan 2017 09:13:28 -0700 (MST) Subject: [vtkusers] Messed up pdf output from vtkGL2PSExporter In-Reply-To: References: <1484881576492-5741884.post@n5.nabble.com> Message-ID: <1484928808440-5741898.post@n5.nabble.com> David, thanks. The PS output looks much better from the alignment standpoint, but it is unfortunately cropped in a portrait-like format. Are you getting something similar? All I did was to replace exporter -> SetFileFormatToPDF(); by exporter -> SetFileFormatToPS(); Attached is a screenshot of the PS output -- View this message in context: http://vtk.1045678.n5.nabble.com/Messed-up-pdf-output-from-vtkGL2PSExporter-tp5741884p5741898.html Sent from the VTK - Users mailing list archive at Nabble.com. From joachim.pouderoux at kitware.com Fri Jan 20 13:41:24 2017 From: joachim.pouderoux at kitware.com (Joachim Pouderoux) Date: Fri, 20 Jan 2017 14:41:24 -0400 Subject: [vtkusers] ANN: VTK & ParaView Training Course in Lyon, France, March 14-15, 2017 Message-ID: Kitware will be holding 2 days of courses on VTK and ParaView on March 14-15, 2017 in Lyon, France. Please visit our web site for more information and registration details at either: VTK: http://training.kitware.fr/browse/144 ParaView: http://training.kitware.fr/browse/145 Note that the courses will be taught in English. If you have any question, please contact us at formations at http://www.kitware.eu Thank you, *Joachim Pouderoux*, PhD *Technical Expert - Scientific Computing Team* *Kitware SAS * -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Fri Jan 20 13:56:39 2017 From: david.lonie at kitware.com (David Lonie) Date: Fri, 20 Jan 2017 13:56:39 -0500 Subject: [vtkusers] Messed up pdf output from vtkGL2PSExporter In-Reply-To: <1484928808440-5741898.post@n5.nabble.com> References: <1484881576492-5741884.post@n5.nabble.com> <1484928808440-5741898.post@n5.nabble.com> Message-ID: On Fri, Jan 20, 2017 at 11:13 AM, BBerco wrote: > David, > thanks. The PS output looks much better from the alignment standpoint, but > it is unfortunately cropped in a portrait-like format. That sounds like an issue with the postscript viewer application. If I open the .ps file with ghostscript, I see the portrait cropping. But if I open it with okular (the KDE PDF viewer) or convert it to PDF using imagemagick, it looks correct. See the attached PDF file produced by imagemagick from the postscript. Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: test.ps.pdf Type: application/pdf Size: 171746 bytes Desc: not available URL: From milefn at rpi.edu Fri Jan 20 14:07:20 2017 From: milefn at rpi.edu (Milef, Nicholas Boris) Date: Fri, 20 Jan 2017 19:07:20 +0000 Subject: [vtkusers] Importing OBJ with shared vertices Message-ID: Is it possible to import an OBJ file with shared vertices? If so, how would I go about doing that most efficiently? I need to obtain a resulting mesh with indexed vertices for the triangles. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Fri Jan 20 14:31:37 2017 From: bebe0705 at colorado.edu (BBerco) Date: Fri, 20 Jan 2017 12:31:37 -0700 (MST) Subject: [vtkusers] Messed up pdf output from vtkGL2PSExporter In-Reply-To: References: <1484881576492-5741884.post@n5.nabble.com> <1484928808440-5741898.post@n5.nabble.com> Message-ID: <1484940697272-5741904.post@n5.nabble.com> That will do, thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Messed-up-pdf-output-from-vtkGL2PSExporter-tp5741884p5741904.html Sent from the VTK - Users mailing list archive at Nabble.com. From tejas.rox at gmail.com Fri Jan 20 16:05:27 2017 From: tejas.rox at gmail.com (Tejas Sudharshan Mathai) Date: Fri, 20 Jan 2017 16:05:27 -0500 Subject: [vtkusers] 3D vessel surface reconstruction Message-ID: Hi, I have a 3D vascular free-hand ultrasound volume containing one vessel, and I am trying to reconstruct the surface of the vessel. The 3D volume is constructed from a stack of 2D images/B-scans, and the contour of the vessel in each B-scan has been segmented; that is, I have an ellipse representing the contour of the vessel in each B-scan in the volume. I have tried to reconstruct the contour of the vessel by following the VTK example of 'GenerateModelsFromLabels.cxx' ( http://www.vtk.org/Wiki/VTK/Examples/Cxx/Medical/GenerateModelsFromLabels). However, the result is not a smooth surface from one frame to another as I would have hoped for it to be. It is discontinuous and irregular, and the surface doesn't connect the vessel contours between two adjacent frames in the volume if the displacement between the ellipses is large. In my approach, I basically used DiscreteMarchingCubes -> WindowedSincPolyDataFilter -> GeometryFilter. I played around with the passband, smoothingIterations and featureAngle parameters, and I was able to obtain the best following result: https://snag.gy/yqK3Fd.jpg https://snag.gy/txu6Ur.jpg https://snag.gy/ksJfUa.jpg As you can see, it is not a smooth continuous surface with a lot of uninterpolated "holes" between adjacent frames, but it is all right. Can it be made better? I also tried using a 3D Delaunay triangulation, but it only gave me the convex hull, which is not the output I expected. I would like to know if there is a better approach towards reconstructing a surface that closely follows the contour of the vessel from one B-scan to the next in a volume? A minimal working example is shown below: vtkSmartPointer vesselVolume = vtkSmartPointer::New(); int totalImages = 210; for (int z = 0; z < totalImages; z++) { std::string strFile = "E:/datasets/vasc/rendering/contour/" + std::to_string(z + 1) + ".png"; cv::Mat im = cv::imread(strFile, CV_LOAD_IMAGE_GRAYSCALE); if (z == 0) { vesselVolume->SetExtent(0, im.cols, 0, im.rows, 0, totalImages - 1); vesselVolume->SetSpacing(1, 1, 1); vesselVolume->SetOrigin(0, 0, 0); vesselVolume->AllocateScalars(VTK_UNSIGNED_CHAR, 0); } std::vector locations; // output, locations of non-zero pixels cv::findNonZero(im, locations); for (int nzi = 0; nzi < locations.size(); nzi++) { unsigned char* pixel = static_cast(vesselVolume->GetScalarPointer(locations[nzi].x, locations[nzi].y, z)); pixel[0] = 255; } } vtkSmartPointer discreteCubes = vtkSmartPointer::New(); discreteCubes->SetInputData(vesselVolume); discreteCubes->GenerateValues(1, 255, 255); discreteCubes->ComputeNormalsOn(); vtkSmartPointer smoother = vtkSmartPointer::New(); unsigned int smoothingIterations = 10; double passBand = 2; double featureAngle = 360.0; smoother->SetInputConnection(discreteCubes->GetOutputPort()); smoother->SetNumberOfIterations(smoothingIterations); smoother->BoundarySmoothingOff(); //smoother->FeatureEdgeSmoothingOff(); smoother->FeatureEdgeSmoothingOn(); smoother->SetFeatureAngle(featureAngle); smoother->SetPassBand(passBand); smoother->NonManifoldSmoothingOn(); smoother->BoundarySmoothingOn(); smoother->NormalizeCoordinatesOn(); smoother->Update(); vtkSmartPointer selector = vtkSmartPointer::New(); selector->SetInputConnection(smoother->GetOutputPort()); selector->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_CELLS, vtkDataSetAttributes::SCALARS); vtkSmartPointer scalarsOff = vtkSmartPointer::New(); // Strip the scalars from the output scalarsOff->SetInputConnection(selector->GetOutputPort()); scalarsOff->CopyAttributeOff(vtkMaskFields::POINT_DATA, vtkDataSetAttributes::SCALARS); scalarsOff->CopyAttributeOff(vtkMaskFields::CELL_DATA, vtkDataSetAttributes::SCALARS); vtkSmartPointer geometry = vtkSmartPointer::New(); geometry->SetInputConnection(scalarsOff->GetOutputPort()); geometry->Update(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(geometry->GetOutputPort()); mapper->ScalarVisibilityOff(); mapper->Update(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); vtkSmartPointer renderer = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); renderer->SetBackground(.2, .3, .4); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); renderer->AddActor(actor); renderer->ResetCamera(); renderWindow->Render(); renderWindowInteractor->Start(); Thanks, Tejas -------------- next part -------------- An HTML attachment was scrubbed... URL: From alessandro.volz at gmail.com Sat Jan 21 06:34:51 2017 From: alessandro.volz at gmail.com (Alessandro Volz) Date: Sat, 21 Jan 2017 12:34:51 +0100 Subject: [vtkusers] vtkImageAlgorithm output to preallocated buffer Message-ID: <7A829733-91F6-4B75-9E48-75B61A3AF008@gmail.com> I'm using vtkImageReslice to obtain a vtkImageData object that I read the output scalars from. All works fine. I'm now in a situation where it would make sense that I preallocate thee output buffer for the reslice to write into. Is there a way to do this? I thought I'd create a vtkImageData and SetScalarPointer on it, then SetOutput on the reslice. But I haven't been able to. Is there a way I could do this? Maybe I should create a vtkImageData subclass? Thanks, Alessandro From david.gobbi at gmail.com Sat Jan 21 08:56:11 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 21 Jan 2017 06:56:11 -0700 Subject: [vtkusers] vtkImageAlgorithm output to preallocated buffer In-Reply-To: <7A829733-91F6-4B75-9E48-75B61A3AF008@gmail.com> References: <7A829733-91F6-4B75-9E48-75B61A3AF008@gmail.com> Message-ID: On Sat, Jan 21, 2017 at 4:34 AM, Alessandro Volz wrote: > I'm using vtkImageReslice to obtain a vtkImageData object that I read the > output scalars from. All works fine. > I'm now in a situation where it would make sense that I preallocate thee > output buffer for the reslice to write into. > Is there a way to do this? > I thought I'd create a vtkImageData and SetScalarPointer on it, then > SetOutput on the reslice. But I haven't been able to. > Is there a way I could do this? Maybe I should create a vtkImageData > subclass? Instead of subclassing vtkImageData, it might be better to subclass vtkImageReslice and override the AllocateOutputData() methods. See the current implementation of AllocateOutputData() here: https://gitlab.kitware.com/vtk/vtk/blob/master/Common/ExecutionModel/ vtkImageAlgorithm.cxx#L198 But your idea of calling SetOutput() should work as long as you provide a large enough output buffer of the correct data type. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenjianyyzz at 163.com Sat Jan 21 21:58:31 2017 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Sat, 21 Jan 2017 19:58:31 -0700 (MST) Subject: [vtkusers] Problem to read the DICOM series using VTK In-Reply-To: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> References: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> Message-ID: <1485053911096-5741909.post@n5.nabble.com> Thank Alex and David, I use vtkDICOMReader and read out the images aboved. but now I use the same vtkDICOMReader and try to read the new attached data, and failed, do you know how to read it out? Thanks James Data_Fail_to_Read_A.7z -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-to-read-the-DICOM-series-using-VTK-tp5741842p5741909.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Sun Jan 22 00:45:55 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Sat, 21 Jan 2017 22:45:55 -0700 Subject: [vtkusers] Problem to read the DICOM series using VTK In-Reply-To: <1485053911096-5741909.post@n5.nabble.com> References: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> <1485053911096-5741909.post@n5.nabble.com> Message-ID: On Sat, Jan 21, 2017 at 7:58 PM, chenjianyyzz wrote: > Thank Alex and David, I use vtkDICOMReader and read out the images aboved. > > but now I use the same vtkDICOMReader and try to read the new attached > data, > and failed, do you know how to read it out? > > Thanks > James Data_Fail_to_Read_A.7z > I tried this series with vtkDICOMReader and it worked fine (see attached image). What happened when you tried to read it? - David -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ct.png Type: image/png Size: 97053 bytes Desc: not available URL: From chenjianyyzz at 163.com Sun Jan 22 01:53:43 2017 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Sat, 21 Jan 2017 23:53:43 -0700 (MST) Subject: [vtkusers] Problem to read the DICOM series using VTK In-Reply-To: References: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> <1485053911096-5741909.post@n5.nabble.com> Message-ID: <1485068023179-5741911.post@n5.nabble.com> Hello David, thank you very much for your reply, yes, the image result you attached is right. but in my code, I fail to GetNumberOfSeries, it return 0, below is my code: =================================== vtkSmartPointer filenames = vtkSmartPointer::New(); filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-286.dcm"); filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-287.dcm"); filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-288.dcm"); filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-289.dcm"); filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-290.dcm"); filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-291.dcm"); filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-292.dcm"); vtkSmartPointer sorter = vtkSmartPointer ::New(); sorter->SetInputFileNames(filenames); sorter->Update(); *int ns = sorter->GetNumberOfSeries();* // here ns returns 0, which should not be. =================================== and I don't know why sorter->GetNumberOfSeries() returns 0? Best Regards James -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-to-read-the-DICOM-series-using-VTK-tp5741842p5741911.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Sun Jan 22 09:34:36 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 22 Jan 2017 07:34:36 -0700 Subject: [vtkusers] Problem to read the DICOM series using VTK In-Reply-To: <1485068023179-5741911.post@n5.nabble.com> References: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> <1485053911096-5741909.post@n5.nabble.com> <1485068023179-5741911.post@n5.nabble.com> Message-ID: Hi James, In the code you sent in your email, there are single backslashes after "C:" and "temp". I tried on my computer with proper slashes, and sorter->GetNumberOfSeries() returns 1. - David On Sat, Jan 21, 2017 at 11:53 PM, chenjianyyzz wrote: > Hello David, > > thank you very much for your reply, yes, the image result you attached is > right. > but in my code, I fail to GetNumberOfSeries, it return 0, below is my > code: > =================================== > vtkSmartPointer filenames = > vtkSmartPointer::New(); > filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1- > 286.dcm"); > filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1- > 287.dcm"); > filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1- > 288.dcm"); > filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1- > 289.dcm"); > filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1- > 290.dcm"); > filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1- > 291.dcm"); > filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1- > 292.dcm"); > vtkSmartPointer sorter = vtkSmartPointer > ::New(); > sorter->SetInputFileNames(filenames); > sorter->Update(); > *int ns = sorter->GetNumberOfSeries();* // here ns returns 0, > which > should not be. > =================================== > > and I don't know why sorter->GetNumberOfSeries() returns 0? > > Best Regards > James > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alessandro.volz at gmail.com Sun Jan 22 12:15:31 2017 From: alessandro.volz at gmail.com (Alessandro Volz) Date: Sun, 22 Jan 2017 18:15:31 +0100 Subject: [vtkusers] vtkImageAlgorithm output to preallocated buffer In-Reply-To: References: <7A829733-91F6-4B75-9E48-75B61A3AF008@gmail.com> Message-ID: <291FC092-BC6B-416F-A64E-8EF9880C0A1C@gmail.com> Thanks David, So yes, I got there this way: reslice->GetOutput()->GetPointData()->SetScalars(vtkSmartPointer::New()); reslice->GetOutput()->GetPointData()->GetScalars()->SetVoidArray(myBufferPtr, myBufferBytesLen, 1); It works fine, but could you explain why in vtkImageData::AllocateScalars we have: if (scalars && scalars->GetDataType() == dataType && scalars->GetReferenceCount() == 1) Why does it matter, the ReferenceCount be equal to 1 ? Alessandro > On Jan 21, 2017, at 2:56 PM, David Gobbi wrote: > > On Sat, Jan 21, 2017 at 4:34 AM, Alessandro Volz > wrote: > I'm using vtkImageReslice to obtain a vtkImageData object that I read the output scalars from. All works fine. > I'm now in a situation where it would make sense that I preallocate thee output buffer for the reslice to write into. > Is there a way to do this? > I thought I'd create a vtkImageData and SetScalarPointer on it, then SetOutput on the reslice. But I haven't been able to. > Is there a way I could do this? Maybe I should create a vtkImageData subclass? > > Instead of subclassing vtkImageData, it might be better to subclass vtkImageReslice and override the AllocateOutputData() methods. See the current implementation of AllocateOutputData() here: > https://gitlab.kitware.com/vtk/vtk/blob/master/Common/ExecutionModel/vtkImageAlgorithm.cxx#L198 > > But your idea of calling SetOutput() should work as long as you provide a large enough output buffer of the correct data type. > > - David > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Jan 22 13:33:49 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 22 Jan 2017 11:33:49 -0700 Subject: [vtkusers] vtkImageAlgorithm output to preallocated buffer In-Reply-To: <291FC092-BC6B-416F-A64E-8EF9880C0A1C@gmail.com> References: <7A829733-91F6-4B75-9E48-75B61A3AF008@gmail.com> <291FC092-BC6B-416F-A64E-8EF9880C0A1C@gmail.com> Message-ID: On Sun, Jan 22, 2017 at 10:15 AM, Alessandro Volz wrote: > Thanks David, > > So yes, I got there this way: > reslice->GetOutput()->GetPointData()->SetScalars(vtkSmartPointer< > vtkFloatArray>::New()); > reslice->GetOutput()->GetPointData()->GetScalars()->SetVoidArray > (myBufferPtr, myBufferBytesLen, 1); > > It works fine, but could you explain why in vtkImageData::AllocateScalars we > have: > > if (scalars && scalars->GetDataType() == dataType > && scalars->GetReferenceCount() == 1) > > Why does it matter, the ReferenceCount be equal to 1 ? > I didn't know that check was there, but it is checking the reference count to see if it holds the only reference to data array. If it does, then it simply reallocates the array that it has, otherwise it creates a new array. Your code is creating a loose reference here: reslice->GetOutput()->GetPointData()->SetScalars(vtkSmartPointer::New()); The SetScalars() method does not take a smart pointer, so the smart pointer is being converted into a regular pointer. The result is exactly the same as if you called vtkFloatArray::New(). In VTK, you should only call vtkSmartPointer::New() if you are assigning the result to a smart pointer. Otherwise it's a memory leak. This is why most smart pointer like std::shared_ptr don't have a typecast operator to allow them to devolve into regular pointers. For VTK, it was decided that the convenience of having a typecast operator was worth the risk of memory leaks, since we have nightly testing to check for leaks. To avoid the leak and fix the reference count, vtkSmartPointer scalars = vtkSmartPointer::New(); scalars->SetVoidArray(myBufferPointer, myBufferLen, 1); reslice->GetOutput()->GetPointData()->SetScalars(scalars); And of course you'll have to make sure the smart pointer goes out of scope before you call Update() on reslice. To be absolutely sure the reference count will be one when AllocateScalars is called, do this: vtkFloatArray *scalars = vtkFloatArray::New(); scalars->SetVoidArray(myBufferPointer, myBufferLen, 1); reslice->GetOutput()->GetPointData()->SetScalars(scalars); scalars->Delete(); One further item of importance is that the "size" for SetVoidArray() is the number of elements, not the number of bytes. That's something that has confused me in the past, and the documentation is not at all clear on that point. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From chenjianyyzz at 163.com Sun Jan 22 19:44:18 2017 From: chenjianyyzz at 163.com (chenjianyyzz) Date: Sun, 22 Jan 2017 17:44:18 -0700 (MST) Subject: [vtkusers] Problem to read the DICOM series using VTK In-Reply-To: References: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> <1485053911096-5741909.post@n5.nabble.com> <1485068023179-5741911.post@n5.nabble.com> Message-ID: <1485132258788-5741915.post@n5.nabble.com> Sorry, the single "\" is my mistake. but after changed it to "\\", it still get 0, it's strange, I wonder where's the problem -- View this message in context: http://vtk.1045678.n5.nabble.com/Problem-to-read-the-DICOM-series-using-VTK-tp5741842p5741915.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Sun Jan 22 22:07:44 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 22 Jan 2017 20:07:44 -0700 Subject: [vtkusers] Problem to read the DICOM series using VTK In-Reply-To: <1485132258788-5741915.post@n5.nabble.com> References: <41b7fdcf.56a1.159b049f96b.Coremail.chenjianyyzz@163.com> <1485053911096-5741909.post@n5.nabble.com> <1485068023179-5741911.post@n5.nabble.com> <1485132258788-5741915.post@n5.nabble.com> Message-ID: On Sun, Jan 22, 2017 at 5:44 PM, chenjianyyzz wrote: > Sorry, the single "\" is my mistake. > but after changed it to "\\", it still get 0, it's strange, I wonder > where's > the problem > You can try vtkDICOMDirectory instead of vtkDICOMSorter (they work in much the same way). Also, what version of vtkDICOM are you using? - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkorir at ebi.ac.uk Mon Jan 23 04:27:30 2017 From: pkorir at ebi.ac.uk (Paul Korir) Date: Mon, 23 Jan 2017 09:27:30 +0000 Subject: [vtkusers] 3D vessel surface reconstruction In-Reply-To: References: Message-ID: Hi Tejas, You can check out vtkRuledSurfaceFilter for that. Here are some starters: http://www.paraview.org/Wiki/VTK/Examples/Python/PolyData/RuledSurfaceFilter Best, Paul On 20/01/2017 21:05, Tejas Sudharshan Mathai wrote: > Hi, > > I have a 3D vascular free-hand ultrasound volume containing one > vessel, and I am trying to reconstruct the surface of the vessel. The > 3D volume is constructed from a stack of 2D images/B-scans, and the > contour of the vessel in each B-scan has been segmented; that is, I > have an ellipse representing the contour of the vessel in each B-scan > in the volume. I have tried to reconstruct the contour of the vessel > by following the VTK example of 'GenerateModelsFromLabels.cxx' > (http://www.vtk.org/Wiki/VTK/Examples/Cxx/Medical/GenerateModelsFromLabels). > However, the result is not a smooth surface from one frame to another > as I would have hoped for it to be. It is discontinuous and irregular, > and the surface doesn't connect the vessel contours between two > adjacent frames in the volume if the displacement between the ellipses > is large. In my approach, I basically used DiscreteMarchingCubes -> > WindowedSincPolyDataFilter -> GeometryFilter. > > I played around with the passband, smoothingIterations and > featureAngle parameters, and I was able to obtain the best following > result: > > https://snag.gy/yqK3Fd.jpg > https://snag.gy/txu6Ur.jpg > https://snag.gy/ksJfUa.jpg > > > As you can see, it is not a smooth continuous surface with a lot of > uninterpolated "holes" between adjacent frames, but it is all right. > Can it be made better? I also tried using a 3D Delaunay triangulation, > but it only gave me the convex hull, which is not the output I > expected. I would like to know if there is a better approach towards > reconstructing a surface that closely follows the contour of the > vessel from one B-scan to the next in a volume? > > A minimal working example is shown below: > > vtkSmartPointer vesselVolume = > vtkSmartPointer::New(); > > int totalImages = 210; > > for (int z = 0; z < totalImages; z++) > { > std::string strFile = "E:/datasets/vasc/rendering/contour/" + > std::to_string(z + 1) + ".png"; > > cv::Mat im = cv::imread(strFile, CV_LOAD_IMAGE_GRAYSCALE); > > if (z == 0) > { > vesselVolume->SetExtent(0, im.cols, 0, im.rows, 0, totalImages - 1); > vesselVolume->SetSpacing(1, 1, 1); > vesselVolume->SetOrigin(0, 0, 0); > vesselVolume->AllocateScalars(VTK_UNSIGNED_CHAR, 0); > } > > std::vector locations; // output, locations of non-zero > pixels > cv::findNonZero(im, locations); > > for (int nzi = 0; nzi < locations.size(); nzi++) > { > unsigned char* pixel = static_cast char*>(vesselVolume->GetScalarPointer(locations[nzi].x, > locations[nzi].y, z)); > pixel[0] = 255; > } > } > > vtkSmartPointer discreteCubes = > vtkSmartPointer::New(); > > discreteCubes->SetInputData(vesselVolume); > discreteCubes->GenerateValues(1, 255, 255); > discreteCubes->ComputeNormalsOn(); > > vtkSmartPointer smoother = > vtkSmartPointer::New(); > > unsigned int smoothingIterations = 10; > double passBand = 2; > double featureAngle = 360.0; > > smoother->SetInputConnection(discreteCubes->GetOutputPort()); > smoother->SetNumberOfIterations(smoothingIterations); > smoother->BoundarySmoothingOff(); > //smoother->FeatureEdgeSmoothingOff(); > smoother->FeatureEdgeSmoothingOn(); > smoother->SetFeatureAngle(featureAngle); > smoother->SetPassBand(passBand); > smoother->NonManifoldSmoothingOn(); > smoother->BoundarySmoothingOn(); > smoother->NormalizeCoordinatesOn(); > smoother->Update(); > > vtkSmartPointer selector = > vtkSmartPointer::New(); > > selector->SetInputConnection(smoother->GetOutputPort()); > selector->SetInputArrayToProcess(0, 0, 0, > vtkDataObject::FIELD_ASSOCIATION_CELLS, > vtkDataSetAttributes::SCALARS); > > vtkSmartPointer scalarsOff = > vtkSmartPointer::New(); > > // Strip the scalars from the output > scalarsOff->SetInputConnection(selector->GetOutputPort()); > scalarsOff->CopyAttributeOff(vtkMaskFields::POINT_DATA, > vtkDataSetAttributes::SCALARS); > scalarsOff->CopyAttributeOff(vtkMaskFields::CELL_DATA, > vtkDataSetAttributes::SCALARS); > > vtkSmartPointer geometry = > vtkSmartPointer::New(); > > geometry->SetInputConnection(scalarsOff->GetOutputPort()); > geometry->Update(); > > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputConnection(geometry->GetOutputPort()); > mapper->ScalarVisibilityOff(); > mapper->Update(); > > vtkSmartPointer renderWindow = > vtkSmartPointer::New(); > > vtkSmartPointer renderWindowInteractor = > vtkSmartPointer::New(); > renderWindowInteractor->SetRenderWindow(renderWindow); > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > > renderWindow->AddRenderer(renderer); > renderer->SetBackground(.2, .3, .4); > > vtkSmartPointer actor = > vtkSmartPointer::New(); > actor->SetMapper(mapper); > renderer->AddActor(actor); > > renderer->ResetCamera(); > > renderWindow->Render(); > renderWindowInteractor->Start(); > > > Thanks, > Tejas > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- *Paul x4422* -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Mon Jan 23 09:17:09 2017 From: lasso at queensu.ca (Andras Lasso) Date: Mon, 23 Jan 2017 14:17:09 +0000 Subject: [vtkusers] 3D vessel surface reconstruction In-Reply-To: References: Message-ID: Tejas, Contours are not aligned to each other well - there is a very visible periodic displacement. You need to do something with this serious problem before trying to reconstruct the surface. If you are reconstructing the volume from a single sweep then the displacements are probably due to cardiac or respiratory motion, so it's not a tracking or calibration issue that you could solve by more careful data acquisition. I see two main approaches to address this. A. Compensate for the displacements. Compute the center-of-gravity of each contour, fit a curve (e.g., polynomial with an order of 2-3) to these center points, then translate each contour so that its center is on the curve. You can then apply VTK's generic-purpose surface reconstruction filters. For a simple tubular shape like a vessel you may simply use vtkDelaunay3D filter to construct a surface and optionally smooth it with vtkWindowedSincPolyDataFilter. B. Average displacements. Probably the easiest is to do this in the image domain. Reconstruct a volume from the image slices (you can use the open-source Plus toolkit for this, www.plustoolkit.org). Then, segment the vessel on the 3D volume using standard volumetric image segmentation tools (for example, in Segment Editor module in 3D Slicer, www.slicer.org). Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Paul Korir Sent: January 23, 2017 4:28 To: vtkusers at vtk.org Subject: Re: [vtkusers] 3D vessel surface reconstruction Hi Tejas, You can check out vtkRuledSurfaceFilter for that. Here are some starters: http://www.paraview.org/Wiki/VTK/Examples/Python/PolyData/RuledSurfaceFilter Best, Paul On 20/01/2017 21:05, Tejas Sudharshan Mathai wrote: Hi, I have a 3D vascular free-hand ultrasound volume containing one vessel, and I am trying to reconstruct the surface of the vessel. The 3D volume is constructed from a stack of 2D images/B-scans, and the contour of the vessel in each B-scan has been segmented; that is, I have an ellipse representing the contour of the vessel in each B-scan in the volume. I have tried to reconstruct the contour of the vessel by following the VTK example of 'GenerateModelsFromLabels.cxx' (http://www.vtk.org/Wiki/VTK/Examples/Cxx/Medical/GenerateModelsFromLabels). However, the result is not a smooth surface from one frame to another as I would have hoped for it to be. It is discontinuous and irregular, and the surface doesn't connect the vessel contours between two adjacent frames in the volume if the displacement between the ellipses is large. In my approach, I basically used DiscreteMarchingCubes -> WindowedSincPolyDataFilter -> GeometryFilter. I played around with the passband, smoothingIterations and featureAngle parameters, and I was able to obtain the best following result: https://snag.gy/yqK3Fd.jpg https://snag.gy/txu6Ur.jpg https://snag.gy/ksJfUa.jpg As you can see, it is not a smooth continuous surface with a lot of uninterpolated "holes" between adjacent frames, but it is all right. Can it be made better? I also tried using a 3D Delaunay triangulation, but it only gave me the convex hull, which is not the output I expected. I would like to know if there is a better approach towards reconstructing a surface that closely follows the contour of the vessel from one B-scan to the next in a volume? A minimal working example is shown below: vtkSmartPointer vesselVolume = vtkSmartPointer::New(); int totalImages = 210; for (int z = 0; z < totalImages; z++) { std::string strFile = "E:/datasets/vasc/rendering/contour/" + std::to_string(z + 1) + ".png"; cv::Mat im = cv::imread(strFile, CV_LOAD_IMAGE_GRAYSCALE); if (z == 0) { vesselVolume->SetExtent(0, im.cols, 0, im.rows, 0, totalImages - 1); vesselVolume->SetSpacing(1, 1, 1); vesselVolume->SetOrigin(0, 0, 0); vesselVolume->AllocateScalars(VTK_UNSIGNED_CHAR, 0); } std::vector locations; // output, locations of non-zero pixels cv::findNonZero(im, locations); for (int nzi = 0; nzi < locations.size(); nzi++) { unsigned char* pixel = static_cast(vesselVolume->GetScalarPointer(locations[nzi].x, locations[nzi].y, z)); pixel[0] = 255; } } vtkSmartPointer discreteCubes = vtkSmartPointer::New(); discreteCubes->SetInputData(vesselVolume); discreteCubes->GenerateValues(1, 255, 255); discreteCubes->ComputeNormalsOn(); vtkSmartPointer smoother = vtkSmartPointer::New(); unsigned int smoothingIterations = 10; double passBand = 2; double featureAngle = 360.0; smoother->SetInputConnection(discreteCubes->GetOutputPort()); smoother->SetNumberOfIterations(smoothingIterations); smoother->BoundarySmoothingOff(); //smoother->FeatureEdgeSmoothingOff(); smoother->FeatureEdgeSmoothingOn(); smoother->SetFeatureAngle(featureAngle); smoother->SetPassBand(passBand); smoother->NonManifoldSmoothingOn(); smoother->BoundarySmoothingOn(); smoother->NormalizeCoordinatesOn(); smoother->Update(); vtkSmartPointer selector = vtkSmartPointer::New(); selector->SetInputConnection(smoother->GetOutputPort()); selector->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_CELLS, vtkDataSetAttributes::SCALARS); vtkSmartPointer scalarsOff = vtkSmartPointer::New(); // Strip the scalars from the output scalarsOff->SetInputConnection(selector->GetOutputPort()); scalarsOff->CopyAttributeOff(vtkMaskFields::POINT_DATA, vtkDataSetAttributes::SCALARS); scalarsOff->CopyAttributeOff(vtkMaskFields::CELL_DATA, vtkDataSetAttributes::SCALARS); vtkSmartPointer geometry = vtkSmartPointer::New(); geometry->SetInputConnection(scalarsOff->GetOutputPort()); geometry->Update(); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputConnection(geometry->GetOutputPort()); mapper->ScalarVisibilityOff(); mapper->Update(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); vtkSmartPointer renderer = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); renderer->SetBackground(.2, .3, .4); vtkSmartPointer actor = vtkSmartPointer::New(); actor->SetMapper(mapper); renderer->AddActor(actor); renderer->ResetCamera(); renderWindow->Render(); renderWindowInteractor->Start(); Thanks, Tejas _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Paul x4422 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bebe0705 at colorado.edu Mon Jan 23 14:55:31 2017 From: bebe0705 at colorado.edu (BBerco) Date: Mon, 23 Jan 2017 12:55:31 -0700 (MST) Subject: [vtkusers] Get pointer coordinates in vtkChart axes Message-ID: <1485201331376-5741920.post@n5.nabble.com> Dear all, I am trying to access the coordinate of the mouse pointer when clicking on a vtkChartXY, expressed in the chart coordinates. Only one data series is plotted so there is only one Y axis to worry about. I am subclassing vtkInteractorStyleTrackballCamera and displaying the coordinates of the mouse click expressed in the window frame. That is, for a vktChartXY displayed in a 400 x 400 render window, clicking at the very center of the chart would return (200,200). The vtk class vtkCoordinate seems to be capable of coordinates transforms between the raw figure coordinates and other frames of reference, but I have yet to find a way to transform the pixel coordinates to the chart coordinates. Any advice? Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Get-pointer-coordinates-in-vtkChart-axes-tp5741920.html Sent from the VTK - Users mailing list archive at Nabble.com. From mozendi at gmail.com Tue Jan 24 02:32:06 2017 From: mozendi at gmail.com (mozendi) Date: Tue, 24 Jan 2017 00:32:06 -0700 (MST) Subject: [vtkusers] Improving visualization of geometric shapes Message-ID: <1485243126581-5741921.post@n5.nabble.com> Dear VTK Users, I have been using VTK for a montly and I noticed that it is the best visualization tool. For my PhD, I am trying to visualize hundreds of ellipsoids and some point clouds using VTK. So far, I visualized ellipsoids and point clouds successfully as shown in the attached figure. However, it has to be developed. Without some shading and lighting effects it is impossible to distinguish individual ellipsoids (shown by green). For example, there are a few ellipsoids at upper left but they cannot be distinguished. Could you please help me about this problem? How can I make them distinguishable? I am looking forward to hearing from you. -- View this message in context: http://vtk.1045678.n5.nabble.com/Improving-visualization-of-geometric-shapes-tp5741921.html Sent from the VTK - Users mailing list archive at Nabble.com. From edcpwk at gmail.com Tue Jan 24 04:51:07 2017 From: edcpwk at gmail.com (Eddy Cappeau) Date: Tue, 24 Jan 2017 10:51:07 +0100 Subject: [vtkusers] Problem using vtkDicomWriter Message-ID: Hi, I'd like to use the vtkDICOMWriter class to convert a vtkImage to a set of DICOM images. I've compile VTK with the vtkDICOM module enabled and followed the example from the pdf found on the github repository ( http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). The image data is created like this : auto img = vtkSmartPointer < vtkImageData >::New(); img->SetOrigin(0, 0, 0); img->SetDimensions(1024, 1024, numlayer); img->SetSpacing(1, 1, 1); img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); and the data filled like this : for (int n = 0; x < numlayer; n++) { for (int x = 0; x < 1024; x++) { for (int y = 0; y < 1024; y++) { char* pixel = static_cast(img->GetScalarPointer(x, y, n)); pixel[0] = values[x][y]; } I can load the converted result with paraview without problems. But with 3D Slicer, I can just load the first file of the serie and it display a blank image. What do I have to do to be able to load the images with both application ? Thanks, Eddy -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Jan 24 09:41:41 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 24 Jan 2017 07:41:41 -0700 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: Hi Eddy, Can you provide the code that you used to write the image with vtkDICOMWriter? Here is an example: http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html Creating an image with a loop that calls GetScalarPointer() for every pixel is not very efficient, and casting to a "char *" when the data is "unsigned short" is wrong: you are setting only 8 bits of each 16-bit pixel, while leaving the other 8 bits uninitialized. The vtkImageImport filter is a better way of generating image data: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport - David On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau wrote: > Hi, > > I'd like to use the vtkDICOMWriter class to convert a vtkImage to a set of > DICOM images. > > I've compile VTK with the vtkDICOM module enabled and followed the example > from the pdf found on the github repository (http://dgobbi.github.io/vtk- > dicom/doc/vtk-dicom.pdf). > > > The image data is created like this : > > auto img = vtkSmartPointer < vtkImageData >::New(); > img->SetOrigin(0, 0, 0); > img->SetDimensions(1024, 1024, numlayer); > img->SetSpacing(1, 1, 1); > img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); > > and the data filled like this : > > for (int n = 0; x < numlayer; n++) { > for (int x = 0; x < 1024; x++) { > for (int y = 0; y < 1024; y++) { > char* pixel = static_cast(img->GetScalarPointer(x, > y, n)); > pixel[0] = values[x][y]; > } > > I can load the converted result with paraview without problems. > But with 3D Slicer, I can just load the first file of the serie and it > display a blank image. > > What do I have to do to be able to load the images with both application ? > > Thanks, > > Eddy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Jan 24 09:57:11 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 24 Jan 2017 09:57:11 -0500 Subject: [vtkusers] ANN: Point Cloud Wiki Examples Message-ID: Folks, Will Schroeder has added a number of new filters to process point clouds. These are exciting additions to VTK. We have added number of new wiki examples that illustrate some of the new point cloud filters: Surface extraction http://www.vtk.org/Wiki/VTK/Examples/Cxx/Points/ExtractSurface Extract clusters http://www.vtk.org/Wiki/VTK/Examples/Cxx/Points/ExtractCluster Estimate normals http://www.vtk.org/Wiki/VTK/Examples/Cxx/Points/NormalEstimation Select points near an implicit function http://www.vtk.org/Wiki/VTK/Examples/Cxx/Points/FitImplicitFunction Add points to a point cloud http://www.vtk.org/Wiki/VTK/Examples/Cxx/Points/DensifyPoints Compute signed and unsigned distances to a point cloud http://www.vtk.org/Wiki/VTK/Examples/Cxx/Points/SignedDistance http://www.vtk.org/Wiki/VTK/Examples/Cxx/Points/UnsignedDistance Enjoy, Bill -- Unpaid intern in BillsBasement at noware dot com From renaud.lebrun at umontpellier.fr Tue Jan 24 10:18:44 2017 From: renaud.lebrun at umontpellier.fr (Renaud Lebrun) Date: Tue, 24 Jan 2017 16:18:44 +0100 Subject: [vtkusers] Picking composite/hybrid actors such as vtkAxesActor Message-ID: <2b6c9c2c-42a4-6e67-0e00-2a6b13be94dd@umontpellier.fr> Hello, I write you because I have troubles to manage to pick "composite/hybrid" actors comprising : - 1 vtkActor - 1 vtkCaption2D actor I followed the same design as the "vtkAxesActor" class to create a class which contains 2 actors : - vtkActor which represents a sphere constructed with a vtkSphereSource - Alabel (a vtkCaptionActor2D actor). => I would like to be able to pick these composite/hybrid actors with an interactor style such as "vtkInteractorStyleRubberBandPick" in order to move their position, reoriente them interactively etc. But unfortunately, the area picker never returns one of these composite/hybrid objects when calling areaPicker->GetProp3Ds(); (it finds well conventional vtkActors containing polydata only though) One illustration is on the following image: http://morphomuseum.com/img/picking.jpg 1) I manage to pick with no problem the "actor" containing the largest yellow structure (once picked I can change its orientation-position etc...). 2) I can't pick anly of the composite/hybrid actors (the red spheres associated with a number = 3D landmarks) Would you have an advice to make it possible to pick composite 3D structures containing polydata+ associated text ? Many thanks in advance. Best wishes, Renaud. From pbernardes at uaum.uminho.pt Tue Jan 24 11:09:11 2017 From: pbernardes at uaum.uminho.pt (Paulo Bernardes) Date: Tue, 24 Jan 2017 16:09:11 +0000 Subject: [vtkusers] 3D Surface or Volume Message-ID: Hi, I have 2 surfaces (3D mesh) of the same object: the upper surface and the lower surface. Each object is stored in a obj file. I read the 2 surfaces and render them in the render window. However, I want to create a closed surface or a volume from these surfaces. I have tried with delaunay 3D but the obtained result does not correspond to what I want: it creates a convex hull. I also tried to use Surface Reconstruction Filter, but the result was not acceptable. Can any one tell me what kind of filters I have to use? Thank you very much. Sincerely, Paulo -- ---- *Paulo Jos? Correia Bernardes* Unidade de Arqueologia da Universidade do Minho Edif?cio dos Congregados Avenida Central, 100 4710-228 Braga tel.: ++351 601270 fax: ++351 601274 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Tue Jan 24 11:49:25 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Tue, 24 Jan 2017 11:49:25 -0500 Subject: [vtkusers] 3D Surface or Volume In-Reply-To: References: Message-ID: If the two surfaces are aligned properly, you could use vtkAppendPolyDataFilter followed by vtkCleanPolyData On Tue, Jan 24, 2017 at 11:09 AM, Paulo Bernardes wrote: > Hi, > > I have 2 surfaces (3D mesh) of the same object: the upper surface and the > lower surface. Each object is stored in a obj file. > I read the 2 surfaces and render them in the render window. However, I want > to create a closed surface or a volume from these surfaces. > I have tried with delaunay 3D but the obtained result does not correspond to > what I want: it creates a convex hull. > I also tried to use Surface Reconstruction Filter, but the result was not > acceptable. > Can any one tell me what kind of filters I have to use? > > Thank you very much. > > Sincerely, > > Paulo > > > -- > ---- > Paulo Jos? Correia Bernardes > > Unidade de Arqueologia da Universidade do Minho > > Edif?cio dos Congregados > > Avenida Central, 100 > > 4710-228 Braga > > tel.: ++351 601270 > > fax: ++351 601274 > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From kalia.megha84 at gmail.com Tue Jan 24 16:49:05 2017 From: kalia.megha84 at gmail.com (Megha Kalia) Date: Tue, 24 Jan 2017 22:49:05 +0100 Subject: [vtkusers] vtkRenderingExternalModule.h Missing from vtkExternalOpenGLRenderWindow.h Message-ID: Hi Everyone, I am pretty new to VTK. The question is regarding adding vtk functionality to existing openGL context. I searched about *vtkExternalOpenGLRenderWindow. *What I found was that the header was located in Renderer - > External and was not automatically included in include files with cmake. But even after "including" the file manually vtkRenderingExternalModule.h is missing. I tried searching in Source but couldn't find it. I downloaded again the source (zip)(7.0.0) but still couldn't find it. Does any one know how to get access to this header and successfully add it to project. Thanks a lot -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Tue Jan 24 17:13:37 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 24 Jan 2017 22:13:37 +0000 Subject: [vtkusers] vtkRenderingExternalModule.h Missing from vtkExternalOpenGLRenderWindow.h In-Reply-To: References: Message-ID: Hi Megha, You?d have to enable the module in CMake when compiling VTK. -DModule_vtkRenderingExternal:BOOL=ON ? On Tue, Jan 24, 2017 at 4:49 PM Megha Kalia wrote: > Hi Everyone, > > I am pretty new to VTK. The question is regarding adding vtk functionality > to existing openGL context. I searched about > *vtkExternalOpenGLRenderWindow. *What I found was that the header was > located in Renderer - > External and was not automatically included in > include files with cmake. But even after "including" the file manually > vtkRenderingExternalModule.h is missing. I tried searching in Source but > couldn't find it. I downloaded again the source (zip)(7.0.0) but still > couldn't find it. Does any one know how to get access to this header and > successfully add it to project. > > 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: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Benn at csiro.au Wed Jan 25 02:36:39 2017 From: David.Benn at csiro.au (David.Benn at csiro.au) Date: Wed, 25 Jan 2017 07:36:39 +0000 Subject: [vtkusers] TimeValues attribute in vtkXMLReader limited to 4096 Message-ID: <664e78856fb346d8ab1424cd91aec3ee@exch4-cdc.nexus.csiro.au> I've submitted an issue re: this after a paraview mailing list interaction: https://gitlab.kitware.com/paraview/paraview/issues/17135 Should I submit an issue to the VTK gitlab instead or as well? David -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Benn at csiro.au Wed Jan 25 02:50:27 2017 From: David.Benn at csiro.au (David.Benn at csiro.au) Date: Wed, 25 Jan 2017 07:50:27 +0000 Subject: [vtkusers] TimeValues attribute in vtkXMLReader limited to 4096 Message-ID: <9ea8c3810da841379a074d65e5f20f0f@exch4-cdc.nexus.csiro.au> I've submitted an issue re: this after a paraview mailing list interaction: https://gitlab.kitware.com/paraview/paraview/issues/17135 Should I submit an issue to the VTK gitlab instead or as well? David -------------- next part -------------- An HTML attachment was scrubbed... URL: From edcpwk at gmail.com Wed Jan 25 03:57:57 2017 From: edcpwk at gmail.com (Eddy Cappeau) Date: Wed, 25 Jan 2017 09:57:57 +0100 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: Hi David, Here's the code below. This is almost the example of the api doc : auto generator = vtkSmartPointer ::New(); vtkSmartPointer meta = vtkSmartPointer ::New(); meta->SetAttributeValue(DC::PatientName, "Test"); meta->SetAttributeValue(DC::PatientID, "0000001"); meta->SetAttributeValue(DC::ScanOptions, ""); meta->SetAttributeValue(DC::ScanningSequence, "GR"); meta->SetAttributeValue(DC::SequenceVariant, "SP"); meta->SetAttributeValue(DC::ScanOptions, ""); meta->SetAttributeValue(DC::MRAcquisitionType, "2D"); vtkSmartPointer dicom_writer = vtkSmartPointer ::New(); dicom_writer->SetInputData(img); dicom_writer->SetMetaData(meta); dicom_writer->SetGenerator(generator); dicom_writer->SetSeriesDescription("Sagittal Multi-planar Reformat"); // Set the output filename format as a printf-style string. dicom_writer->SetFilePattern("%s/IM-0001-%04.4d.dcm"); // Set the directory to write the files into. dicom_writer->SetFilePrefix(path.toStdString().c_str()); // Write the file. dicom_writer->Write(); Sorry, the use of an unsigned short type was a carreless mistake. The result is better with unsigned char, but I still see just one image of the serie on 3D Slicer. Is there something missing to have a complete serie ? I didn't know the vtkImageImport and I'll give it a try. Thanks, Eddy 2017-01-24 15:41 GMT+01:00 David Gobbi : > Hi Eddy, > > Can you provide the code that you used to write the image with > vtkDICOMWriter? Here is an example: > http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html > > Creating an image with a loop that calls GetScalarPointer() for every > pixel is not very efficient, and casting to a "char *" when the data is > "unsigned short" is wrong: you are setting only 8 bits of each 16-bit > pixel, while leaving the other 8 bits uninitialized. The vtkImageImport > filter is a better way of generating image data: > http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport > > - David > > > On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau wrote: > >> Hi, >> >> I'd like to use the vtkDICOMWriter class to convert a vtkImage to a set >> of DICOM images. >> >> I've compile VTK with the vtkDICOM module enabled and followed the >> example from the pdf found on the github repository ( >> http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). >> >> >> The image data is created like this : >> >> auto img = vtkSmartPointer < vtkImageData >::New(); >> img->SetOrigin(0, 0, 0); >> img->SetDimensions(1024, 1024, numlayer); >> img->SetSpacing(1, 1, 1); >> img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); >> >> and the data filled like this : >> >> for (int n = 0; x < numlayer; n++) { >> for (int x = 0; x < 1024; x++) { >> for (int y = 0; y < 1024; y++) { >> char* pixel = static_cast(img->GetScalarPointer(x, >> y, n)); >> pixel[0] = values[x][y]; >> } >> >> I can load the converted result with paraview without problems. >> But with 3D Slicer, I can just load the first file of the serie and it >> display a blank image. >> >> What do I have to do to be able to load the images with both application ? >> >> Thanks, >> >> Eddy >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pbernardes at uaum.uminho.pt Wed Jan 25 06:38:08 2017 From: pbernardes at uaum.uminho.pt (=?iso-8859-1?Q?Paulo_Jos=E9_Correia_Bernardes?=) Date: Wed, 25 Jan 2017 11:38:08 +0000 Subject: [vtkusers] 3D Surface or Volume In-Reply-To: References: , Message-ID: <6DF0BB12B9A00146B0A26B97EA62EA8070BADE0B@SRV-EXCH-DAG-01.uminho.pt> Thank you Bill, I'll try it out. Best Regards, Paulo --- Paulo Bernardes Unidade de Arqueologia da Universidade do Minho Edif?cio dos Congregados Avenida Central, 100 4710-228 Braga tel.: ++351 601270 fax: ++351 601274 ________________________________________ De: Bill Lorensen [bill.lorensen at gmail.com] Enviado: 24 de Janeiro de 2017 16:49 Para: Paulo Jos? Correia Bernardes Cc: VTK Users Assunto: Re: [vtkusers] 3D Surface or Volume If the two surfaces are aligned properly, you could use vtkAppendPolyDataFilter followed by vtkCleanPolyData On Tue, Jan 24, 2017 at 11:09 AM, Paulo Bernardes wrote: > Hi, > > I have 2 surfaces (3D mesh) of the same object: the upper surface and the > lower surface. Each object is stored in a obj file. > I read the 2 surfaces and render them in the render window. However, I want > to create a closed surface or a volume from these surfaces. > I have tried with delaunay 3D but the obtained result does not correspond to > what I want: it creates a convex hull. > I also tried to use Surface Reconstruction Filter, but the result was not > acceptable. > Can any one tell me what kind of filters I have to use? > > Thank you very much. > > Sincerely, > > Paulo > > > -- > ---- > Paulo Jos? Correia Bernardes > > Unidade de Arqueologia da Universidade do Minho > > Edif?cio dos Congregados > > Avenida Central, 100 > > 4710-228 Braga > > tel.: ++351 601270 > > fax: ++351 601274 > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From david.gobbi at gmail.com Wed Jan 25 08:35:53 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 25 Jan 2017 06:35:53 -0700 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: Hi Eddy, The code is using a vtkDICOMCTGenerator to write an MR image, which is definitely wrong. Use the vtkDICOMMRGenerator, and make sure the meta data matches the IOD: http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.3.html The standard says that BitsAllocated must be 16 for MR images, therefore an 8-bit MR image is non-standard and DICOM software may to refuse to display it. You should convert your data to 16-bit (In fact, it seems fishy that you are working with unsigned char, since if you are writing a reformat of an MR image, then wasn't the original MR image a 16-bit image?) I can't answer about why Slicer is only showing one slice, as I don't currently have Slicer installed. - David On Wed, Jan 25, 2017 at 1:57 AM, Eddy Cappeau wrote: > Hi David, > > Here's the code below. This is almost the example of the api doc : > > auto generator = vtkSmartPointer ::New(); > vtkSmartPointer meta = vtkSmartPointer > ::New(); > > meta->SetAttributeValue(DC::PatientName, "Test"); > meta->SetAttributeValue(DC::PatientID, "0000001"); > meta->SetAttributeValue(DC::ScanOptions, ""); > meta->SetAttributeValue(DC::ScanningSequence, "GR"); > meta->SetAttributeValue(DC::SequenceVariant, "SP"); > meta->SetAttributeValue(DC::ScanOptions, ""); > meta->SetAttributeValue(DC::MRAcquisitionType, "2D"); > > vtkSmartPointer dicom_writer = > vtkSmartPointer ::New(); > dicom_writer->SetInputData(img); > dicom_writer->SetMetaData(meta); > dicom_writer->SetGenerator(generator); > dicom_writer->SetSeriesDescription("Sagittal Multi-planar Reformat"); > > // Set the output filename format as a printf-style string. > dicom_writer->SetFilePattern("%s/IM-0001-%04.4d.dcm"); > // Set the directory to write the files into. > dicom_writer->SetFilePrefix(path.toStdString().c_str()); > // Write the file. > dicom_writer->Write(); > > Sorry, the use of an unsigned short type was a carreless mistake. The > result is better with unsigned char, > but I still see just one image of the serie on 3D Slicer. Is there > something missing to have a complete serie ? > > I didn't know the vtkImageImport and I'll give it a try. > > Thanks, > > Eddy > > > 2017-01-24 15:41 GMT+01:00 David Gobbi : > >> Hi Eddy, >> >> Can you provide the code that you used to write the image with >> vtkDICOMWriter? Here is an example: >> http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html >> >> Creating an image with a loop that calls GetScalarPointer() for every >> pixel is not very efficient, and casting to a "char *" when the data is >> "unsigned short" is wrong: you are setting only 8 bits of each 16-bit >> pixel, while leaving the other 8 bits uninitialized. The vtkImageImport >> filter is a better way of generating image data: >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport >> >> - David >> >> >> On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau wrote: >> >>> Hi, >>> >>> I'd like to use the vtkDICOMWriter class to convert a vtkImage to a set >>> of DICOM images. >>> >>> I've compile VTK with the vtkDICOM module enabled and followed the >>> example from the pdf found on the github repository ( >>> http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). >>> >>> >>> The image data is created like this : >>> >>> auto img = vtkSmartPointer < vtkImageData >::New(); >>> img->SetOrigin(0, 0, 0); >>> img->SetDimensions(1024, 1024, numlayer); >>> img->SetSpacing(1, 1, 1); >>> img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); >>> >>> and the data filled like this : >>> >>> for (int n = 0; x < numlayer; n++) { >>> for (int x = 0; x < 1024; x++) { >>> for (int y = 0; y < 1024; y++) { >>> char* pixel = static_cast(img->GetScalarPointer(x, >>> y, n)); >>> pixel[0] = values[x][y]; >>> } >>> >>> I can load the converted result with paraview without problems. >>> But with 3D Slicer, I can just load the first file of the serie and it >>> display a blank image. >>> >>> What do I have to do to be able to load the images with both application >>> ? >>> >>> Thanks, >>> >>> Eddy >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From timo.oster at ovgu.de Wed Jan 25 08:47:36 2017 From: timo.oster at ovgu.de (Timo Oster) Date: Wed, 25 Jan 2017 14:47:36 +0100 Subject: [vtkusers] Correctly exporting dependency on VTK in CMake ProjectConfig Message-ID: Hi vtkusers, I am developing a small C++ library that is dependent on some components of VTK. I am using CMake to build my library, and I am providing a ProjectConfig.cmake file to make it easier to use my library with CMake. My ProjectConfig file is structured according to the example at https://cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file. This means when installing, I am creating a ProjectTargets.cmake file that contains my library plus all the libraries that my lib depends on. I should also mention that I am on Linux and am using VTK 7.1 and CMake 3.4. My problem is that this file does not contain the path of the vtk libraries I depend on, only their names. When I build my project, this is not a problem, as it knows the VTK link directory (via find_package(VTK)). However, when I use my lib in another CMake project, the VTK library path is not available any more (The other project does not and should not need to find VTK itself). This leads to lots of library not found errors when linking. Here is how my CMake Project is structured: Main CMakeLists.txt (almost 1:1 copy&paste from the Wiki example): ------------------------------------------------------------------------ [...] add_subdirectory(src) export(TARGETS my_lib FILE "${PROJECT_BINARY_DIR}/MyProjectTargets.cmake") # export(PACKAGE MyProject) file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${INSTALL_INCLUDE_DIR}") set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}") configure_file(MyProjectConfig.cmake.in "${PROJECT_BINARY_DIR}/MyProjectConfig.cmake" @ONLY) set(CONF_INCLUDE_DIRS "\${MYPROJECT_CMAKE_DIR}/${REL_INCLUDE_DIR}") configure_file(MyProjectConfig.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/MyProjectConfig.cmake" @ONLY) configure_file(MyProjectConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/MyProjectConfigVersion.cmake" @ONLY) install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/MyProjectConfig.cmake" "${PROJECT_BINARY_DIR}/MyProjectConfigVersion.cmake" DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev) install(EXPORT MyProjectTargets DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev) ------------------------------------------------------------------------ src/CMakeLists.txt: ------------------------------------------------------------------------ set(SOURCES ...) set(HEADERS ...) add_library(my_lib ${SOURCES} ${HEADERS}) ... find_package(VTK REQUIRED COMPONENTS vtkParallelMPI vtkIOParallelXML NO_MODULE) if(VTK_FOUND) include(${VTK_USE_FILE}) target_link_libraries(my_lib ${VTK_LIBRARIES}) endif() ... install(TARGETS my_lib EXPORT MyProjectTargets LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT lib ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" COMPONENT lib PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}/my_lib" COMPONENT dev) ------------------------------------------------------------------------ This works fine and I can use find_package(MyProject) in some other CMake project to use my lib. The generated MyProjectTargets-release.cmake file contains a statement to set up the dependencies of my lib looking like this: ------------------------------------------------------------------------ # Import target "my_lib" for configuration "Release" set_property(TARGET my_lib APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_target_properties(my_lib PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/some/path/lib64/libmpi.so;/some/path/lib64/libmpigc4.so;/usr/lib64/libdl.so;/some/path/intel64/libirc.so;/usr/lib64/libpthread.so;/usr/lib64/librt.so;[...];vtkParallelMPI;vtkCommonCore;vtksys;vtkCommonDataModel;vtkCommonMath; vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkParallelCore; vtkIOLegacy;vtkCommonExecutionModel;vtkIOCore;vtkzlib;vtkIOParallelXML; vtkIOXML;vtkIOXMLParser;vtkexpat" IMPORTED_LOCATION_RELEASE "/some/path/MyProject/lib/my_lib.so" IMPORTED_SONAME_RELEASE "my_lib.so" ) ------------------------------------------------------------------------ As you can see, all the dependent libraries listed are given with their full path, except for the vtk ones. Since they are installed in a non-standard location, the linker will not find them unless explicitly told where to look. There is however no reference to the path they reside in anywhere in that file. Where is the error? Does the VTKConfig.cmake file that is used when find_package(VTK) is called export its targets incorrectly? Did I forget to export something in my CMake script (it worked without that for all my other dependencies)? Do I have to add the VTK lib path to some environment variable so the linker finds it (I tried both LIBRARY_PATH and LD_LIBRARY_PATH to no effect)? I hope this question is not too complex, but I guess if anybody knows how to do ProjectConfig right it's the VTK developers. Best, Timo -- Timo Oster Visual Computing Group / Lab. of Fluid Dynamics and Technical Flows University of Magdeburg Universit?tsplatz 2 D-39106 Magdeburg Phone: (+49-391) 67-12647 / (+49-391) 67-51349 Offices: Building 29 - Room 234 / Building 14 - Room 108 PGP Fingerprint: 4F25 89EE A9FD C5FE FEE5 D086 C625 B58C 2411 932F From b.schober at stemmer-imaging.de Wed Jan 25 08:43:06 2017 From: b.schober at stemmer-imaging.de (Schober Beatrix [STEMMER IMAGING GmbH]) Date: Wed, 25 Jan 2017 13:43:06 +0000 Subject: [vtkusers] vtkAppendPolyData RemoveInputData leads to 0 connections Message-ID: <2c40e4592bb9494ca30134ddb079aa69@SIMAIL13.stemmer.local> Hi, it seems to be an easy issue, but I don't get the solution. I am appending multiple vtkPolyData to vtkAppendPolyData: vtkSmartPointer appendFilter = vtkSmartPointer::New(); appendFilter->AddInputData(polyData1); appendFilter->AddInputData(polyData2); In another functions I want to hide / show those polydata: Function to hide: appendFilter->RemoveInputData(polyDataX); appendFilter->Update(); Function to show: appendFilter->AddInputData(polyDataX); appendFilter->Update(); This works fine, unless I have only one polydata in the vtkAppendPolyData filter. If I hide (see Function to hide) this last polydata I get following error after appendFilter->Update(): Input port 0 of algorithm vtkAppendPolyData has 0 connections. The error message is clear, but how would you solve this? Is there a better way to do that? Thank you very much in advance! Sincerely, Bea -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Wed Jan 25 08:56:28 2017 From: lasso at queensu.ca (Andras Lasso) Date: Wed, 25 Jan 2017 13:56:28 +0000 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: If you drag-and-drop a single image slice into Slicer then by default it will load that single image slice. How to load the full volume from DICOM: Option A: Drag-and-drop the directory that contains your DICOM files to the Slicer main window. Slicer offers to import them, accept that option, wait for the import to complete, then select the data set in the DICOM browser and load it. Option B: Drag-and-drop a single DICOM file to Slicer. You have the option to load that single slice (default behavior), or check ?Show Options? in the top-right corner and uncheck ?Single File? option in the table. Andras From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of David Gobbi Sent: January 25, 2017 8:36 To: Eddy Cappeau Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Problem using vtkDicomWriter Hi Eddy, The code is using a vtkDICOMCTGenerator to write an MR image, which is definitely wrong. Use the vtkDICOMMRGenerator, and make sure the meta data matches the IOD: http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.8.3.html The standard says that BitsAllocated must be 16 for MR images, therefore an 8-bit MR image is non-standard and DICOM software may to refuse to display it. You should convert your data to 16-bit (In fact, it seems fishy that you are working with unsigned char, since if you are writing a reformat of an MR image, then wasn't the original MR image a 16-bit image?) I can't answer about why Slicer is only showing one slice, as I don't currently have Slicer installed. - David On Wed, Jan 25, 2017 at 1:57 AM, Eddy Cappeau > wrote: Hi David, Here's the code below. This is almost the example of the api doc : auto generator = vtkSmartPointer ::New(); vtkSmartPointer meta = vtkSmartPointer ::New(); meta->SetAttributeValue(DC::PatientName, "Test"); meta->SetAttributeValue(DC::PatientID, "0000001"); meta->SetAttributeValue(DC::ScanOptions, ""); meta->SetAttributeValue(DC::ScanningSequence, "GR"); meta->SetAttributeValue(DC::SequenceVariant, "SP"); meta->SetAttributeValue(DC::ScanOptions, ""); meta->SetAttributeValue(DC::MRAcquisitionType, "2D"); vtkSmartPointer dicom_writer = vtkSmartPointer ::New(); dicom_writer->SetInputData(img); dicom_writer->SetMetaData(meta); dicom_writer->SetGenerator(generator); dicom_writer->SetSeriesDescription("Sagittal Multi-planar Reformat"); // Set the output filename format as a printf-style string. dicom_writer->SetFilePattern("%s/IM-0001-%04.4d.dcm"); // Set the directory to write the files into. dicom_writer->SetFilePrefix(path.toStdString().c_str()); // Write the file. dicom_writer->Write(); Sorry, the use of an unsigned short type was a carreless mistake. The result is better with unsigned char, but I still see just one image of the serie on 3D Slicer. Is there something missing to have a complete serie ? I didn't know the vtkImageImport and I'll give it a try. Thanks, Eddy 2017-01-24 15:41 GMT+01:00 David Gobbi >: Hi Eddy, Can you provide the code that you used to write the image with vtkDICOMWriter? Here is an example: http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html Creating an image with a loop that calls GetScalarPointer() for every pixel is not very efficient, and casting to a "char *" when the data is "unsigned short" is wrong: you are setting only 8 bits of each 16-bit pixel, while leaving the other 8 bits uninitialized. The vtkImageImport filter is a better way of generating image data: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport - David On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau > wrote: Hi, I'd like to use the vtkDICOMWriter class to convert a vtkImage to a set of DICOM images. I've compile VTK with the vtkDICOM module enabled and followed the example from the pdf found on the github repository (http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). The image data is created like this : auto img = vtkSmartPointer < vtkImageData >::New(); img->SetOrigin(0, 0, 0); img->SetDimensions(1024, 1024, numlayer); img->SetSpacing(1, 1, 1); img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); and the data filled like this : for (int n = 0; x < numlayer; n++) { for (int x = 0; x < 1024; x++) { for (int y = 0; y < 1024; y++) { char* pixel = static_cast(img->GetScalarPointer(x, y, n)); pixel[0] = values[x][y]; } I can load the converted result with paraview without problems. But with 3D Slicer, I can just load the first file of the serie and it display a blank image. What do I have to do to be able to load the images with both application ? Thanks, Eddy -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Jan 25 09:04:08 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 25 Jan 2017 09:04:08 -0500 Subject: [vtkusers] vtkAppendPolyData RemoveInputData leads to 0 connections In-Reply-To: <2c40e4592bb9494ca30134ddb079aa69@SIMAIL13.stemmer.local> References: <2c40e4592bb9494ca30134ddb079aa69@SIMAIL13.stemmer.local> Message-ID: If you are concerned about seeing the error message, you can catch it. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ObserveError On Jan 25, 2017 8:53 AM, "Schober Beatrix [STEMMER IMAGING GmbH]" < b.schober at stemmer-imaging.de> wrote: > Hi, > > it seems to be an easy issue, but I don?t get the solution. I am appending > multiple vtkPolyData to vtkAppendPolyData: > > > > vtkSmartPointer appendFilter = vtkSmartPointer< > vtkAppendPolyData>::New(); > > appendFilter->AddInputData(polyData1); > > appendFilter->AddInputData(polyData2); > > > > In another functions I want to hide / show those polydata: > > > > Function to hide: > > appendFilter->RemoveInputData(polyDataX); > > appendFilter->Update(); > > > > Function to show: > > appendFilter->AddInputData(polyDataX); > > appendFilter->Update(); > > > > This works fine, unless I have only one polydata in the vtkAppendPolyData > filter. If I hide (see Function to hide) this last polydata I get following > error after appendFilter->Update(): > > Input port 0 of algorithm vtkAppendPolyData has 0 connections. > > > > The error message is clear, but how would you solve this? Is there a > better way to do that? > > > > Thank you very much in advance! > > > > Sincerely, > > > > Bea > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > 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 b.schober at stemmer-imaging.de Wed Jan 25 09:14:09 2017 From: b.schober at stemmer-imaging.de (Schober Beatrix [STEMMER IMAGING GmbH]) Date: Wed, 25 Jan 2017 14:14:09 +0000 Subject: [vtkusers] vtkAppendPolyData RemoveInputData leads to 0 connections In-Reply-To: References: <2c40e4592bb9494ca30134ddb079aa69@SIMAIL13.stemmer.local> Message-ID: <5633a873650c474b89c6b0eb566200f4@SIMAIL13.stemmer.local> Hi Bill, thank you very much, but I forgot to mention, that the last vtkPolyData is not removed then. Sorry for this missing piece of information. Bea Von: Bill Lorensen [mailto:bill.lorensen at gmail.com] Gesendet: Mittwoch, 25. Januar 2017 15:04 An: Schober Beatrix [STEMMER IMAGING GmbH] Cc: VTK Users Betreff: Re: [vtkusers] vtkAppendPolyData RemoveInputData leads to 0 connections If you are concerned about seeing the error message, you can catch it. http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ObserveError On Jan 25, 2017 8:53 AM, "Schober Beatrix [STEMMER IMAGING GmbH]" > wrote: Hi, it seems to be an easy issue, but I don?t get the solution. I am appending multiple vtkPolyData to vtkAppendPolyData: vtkSmartPointer appendFilter = vtkSmartPointer::New(); appendFilter->AddInputData(polyData1); appendFilter->AddInputData(polyData2); In another functions I want to hide / show those polydata: Function to hide: appendFilter->RemoveInputData(polyDataX); appendFilter->Update(); Function to show: appendFilter->AddInputData(polyDataX); appendFilter->Update(); This works fine, unless I have only one polydata in the vtkAppendPolyData filter. If I hide (see Function to hide) this last polydata I get following error after appendFilter->Update(): Input port 0 of algorithm vtkAppendPolyData has 0 connections. The error message is clear, but how would you solve this? Is there a better way to do that? Thank you very much in advance! Sincerely, Bea _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ 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 eric at evinceinc.com Wed Jan 25 09:53:19 2017 From: eric at evinceinc.com (Eric Stanton) Date: Wed, 25 Jan 2017 07:53:19 -0700 Subject: [vtkusers] VTK web application Message-ID: Hello, I've been developing a VTK/Qt desktop application for a while now. It uses vtkGraphLayoutView and other Infovis components. I'm looking in to what it would take to create a web application that provides similar functionality. What is the recommended solution or starting point? I see several possibilities available: ParaViewWeb/Visualizer, LightViz, vtk.js. Would it be LightViz, because it allows for a tailored user interface? Both the ParaViewWeb and LightViz documentation say that they are meant for scientific visualization, and among all of the screenshots and examples I don't see any graphs. Does that mean it doesn't support the rendering/interaction of vtkGraphs? Would I need to add that support myself? Or does it just treat it as a vtkPolyData? I appreciate any guidance. Eric Stanton -------------- next part -------------- An HTML attachment was scrubbed... URL: From nenadus at gmail.com Wed Jan 25 10:21:59 2017 From: nenadus at gmail.com (Nenad Vujicic) Date: Wed, 25 Jan 2017 16:21:59 +0100 Subject: [vtkusers] PLY Reader: vtkPLYReader.cxx needs Point Cloud Loading implementation Message-ID: Hello everyone, I found several PLY files which crashed my ParaView based application. I inspected vtkPLYReader.cxx and found that it doesn't support loading of PLY files with points. Example of such PLY file: https://courses.cs.washington.edu/courses/cse558/01sp/software/scanalyze/points.html Example of software which successfully opens such PLY file: CloudCompare - http://www.danielgm.net/cc/ Do you maybe have in plans adding support, to vtkPLYReader.cxx, for such PLY files? Thanks in advance, Nenad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Jan 25 11:17:54 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 25 Jan 2017 11:17:54 -0500 Subject: [vtkusers] PLY Reader: vtkPLYReader.cxx needs Point Cloud Loading implementation In-Reply-To: References: Message-ID: I'll take a look. On Jan 25, 2017 10:22 AM, "Nenad Vujicic" wrote: > Hello everyone, > > I found several PLY files which crashed my ParaView based application. I > inspected vtkPLYReader.cxx and found that it doesn't support loading of PLY > files with points. > > Example of such PLY file: https://courses.cs. > washington.edu/courses/cse558/01sp/software/scanalyze/points.html > Example of software which successfully opens such PLY file: CloudCompare - > http://www.danielgm.net/cc/ > > Do you maybe have in plans adding support, to vtkPLYReader.cxx, for such > PLY files? > > Thanks in advance, > Nenad. > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Jan 25 12:13:48 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 25 Jan 2017 12:13:48 -0500 Subject: [vtkusers] PLY Reader: vtkPLYReader.cxx needs Point Cloud Loading implementation In-Reply-To: References: Message-ID: I found the problem. I'll be submitting an MR soon. Can you point me to some fairly large point cloud files? Bill On Wed, Jan 25, 2017 at 11:17 AM, Bill Lorensen wrote: > I'll take a look. > > On Jan 25, 2017 10:22 AM, "Nenad Vujicic" wrote: >> >> Hello everyone, >> >> I found several PLY files which crashed my ParaView based application. I >> inspected vtkPLYReader.cxx and found that it doesn't support loading of PLY >> files with points. >> >> Example of such PLY file: >> https://courses.cs.washington.edu/courses/cse558/01sp/software/scanalyze/points.html >> Example of software which successfully opens such PLY file: CloudCompare - >> http://www.danielgm.net/cc/ >> >> Do you maybe have in plans adding support, to vtkPLYReader.cxx, for such >> PLY files? >> >> Thanks in advance, >> Nenad. >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > -- Unpaid intern in BillsBasement at noware dot com From jspencer at connectedsp.com Wed Jan 25 13:32:53 2017 From: jspencer at connectedsp.com (John Spencer) Date: Wed, 25 Jan 2017 18:32:53 +0000 Subject: [vtkusers] OPENING in MA - Sr Software Engineer - VTK, C++ Message-ID: Our client north of Boston, MA has a perm/direct hire opening for a Sr Software Engineer with strong C++, Object Oriented Design (OOD) experience as well as experience with VTK. Salary is in the $115-120K range plus benefits, but may go above that for the right person Must be able to interview and work on-site at your own expense. Telecommuting is not an option. MUST have 5+ years of commercial development experience. MUST be a US Citizen or US Perm Resident Sr Software Engineer Design and develop important pieces of the medical device software Work as part of a team, but also be responsible for individual tasks and assignments. Work with other engineering groups to ensure successful products. Must have 5+ years of strong C++ and OOD skills and experience working in a commercial environment Must have experience with VTK or related technology with medical imaging experience very helpful. BS Computer Engineering, CS or related technical degree If you are interested and qualified, please send your resume and contact info to John Spencer Connected Systems Partners Office: (978) 455-5550 x208 jspencer at connectedsp.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Wed Jan 25 13:43:33 2017 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Wed, 25 Jan 2017 11:43:33 -0700 Subject: [vtkusers] VTK web application In-Reply-To: References: Message-ID: Hi Eric, We used to have an example for vtkWeb using the graph view here: https://github.com/Kitware/VTK/tree/v7.0.0/Web/Applications/GraphLayout Since ParaView does not provide any proxy for the vtkGraphLayoutView, you most likely will have to stick with VTK on the server side. But between VTK 7.0 to 7.1, we removed all the JavaScript code from the VTK repository and created a dedicated JavaScript repo here ( https://github.com/kitware/paraviewweb). Even if we mostly use it with a ParaView server, you can still create a vtkWeb application based on it. We have some explanations here ( http://kitware.github.io/paraviewweb/examples/RemoteRenderer.html) where the code was taken from ( https://github.com/Kitware/VTK/tree/v7.0.0/Web/Applications/Cone). Hopefully from those examples, you will be able to redo our old GraphLayout example with the new code base. And see how to go forward based on your needs. Seb On Wed, Jan 25, 2017 at 7:53 AM, Eric Stanton wrote: > Hello, > > I've been developing a VTK/Qt desktop application for a while now. It uses > vtkGraphLayoutView and other Infovis components. I'm looking in to what it > would take to create a web application that provides similar functionality. > > What is the recommended solution or starting point? I see several > possibilities available: ParaViewWeb/Visualizer, LightViz, vtk.js. Would it > be LightViz, because it allows for a tailored user interface? > > Both the ParaViewWeb and LightViz documentation say that they are meant > for scientific visualization, and among all of the screenshots and examples > I don't see any graphs. Does that mean it doesn't support the > rendering/interaction of vtkGraphs? Would I need to add that support > myself? Or does it just treat it as a vtkPolyData? > > I appreciate any guidance. > > Eric Stanton > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Wed Jan 25 14:06:20 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 25 Jan 2017 14:06:20 -0500 Subject: [vtkusers] PLY Reader: vtkPLYReader.cxx needs Point Cloud Loading implementation In-Reply-To: References: Message-ID: here is an MR that allows point clouds to be read: https://gitlab.kitware.com/vtk/vtk/merge_requests/2429 On Wed, Jan 25, 2017 at 12:13 PM, Bill Lorensen wrote: > I found the problem. I'll be submitting an MR soon. > > Can you point me to some fairly large point cloud files? > > Bill > > On Wed, Jan 25, 2017 at 11:17 AM, Bill Lorensen wrote: >> I'll take a look. >> >> On Jan 25, 2017 10:22 AM, "Nenad Vujicic" wrote: >>> >>> Hello everyone, >>> >>> I found several PLY files which crashed my ParaView based application. I >>> inspected vtkPLYReader.cxx and found that it doesn't support loading of PLY >>> files with points. >>> >>> Example of such PLY file: >>> https://courses.cs.washington.edu/courses/cse558/01sp/software/scanalyze/points.html >>> Example of software which successfully opens such PLY file: CloudCompare - >>> http://www.danielgm.net/cc/ >>> >>> Do you maybe have in plans adding support, to vtkPLYReader.cxx, for such >>> PLY files? >>> >>> Thanks in advance, >>> Nenad. >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From kalia.megha84 at gmail.com Thu Jan 26 05:47:05 2017 From: kalia.megha84 at gmail.com (Megha Kalia) Date: Thu, 26 Jan 2017 11:47:05 +0100 Subject: [vtkusers] vtkRenderingExternalModule.h Missing from vtkExternalOpenGLRenderWindow.h In-Reply-To: References: Message-ID: Hey, Thanks a lot. It worked Finally :) On Tue, Jan 24, 2017 at 11:13 PM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > Hi Megha, > > You?d have to enable the module in CMake when compiling VTK. > > -DModule_vtkRenderingExternal:BOOL=ON > > ? > > On Tue, Jan 24, 2017 at 4:49 PM Megha Kalia > wrote: > >> Hi Everyone, >> >> I am pretty new to VTK. The question is regarding adding vtk >> functionality to existing openGL context. I searched about >> *vtkExternalOpenGLRenderWindow. *What I found was that the header was >> located in Renderer - > External and was not automatically included in >> include files with cmake. But even after "including" the file manually >> vtkRenderingExternalModule.h is missing. I tried searching in Source but >> couldn't find it. I downloaded again the source (zip)(7.0.0) but still >> couldn't find it. Does any one know how to get access to this header and >> successfully add it to project. >> >> 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: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nenadus at gmail.com Thu Jan 26 06:17:31 2017 From: nenadus at gmail.com (Nenad Vujicic) Date: Thu, 26 Jan 2017 12:17:31 +0100 Subject: [vtkusers] PLY Reader: vtkPLYReader.cxx needs Point Cloud Loading implementation In-Reply-To: References: Message-ID: Bill, Thank you very much for your help! Your patch works great! Now, I can load my PLY point cloud files and visualize them using Glyph filter. Nenad. On Wed, Jan 25, 2017 at 8:06 PM, Bill Lorensen wrote: > here is an MR that allows point clouds to be read: > https://gitlab.kitware.com/vtk/vtk/merge_requests/2429 > > > On Wed, Jan 25, 2017 at 12:13 PM, Bill Lorensen > wrote: > > I found the problem. I'll be submitting an MR soon. > > > > Can you point me to some fairly large point cloud files? > > > > Bill > > > > On Wed, Jan 25, 2017 at 11:17 AM, Bill Lorensen > wrote: > >> I'll take a look. > >> > >> On Jan 25, 2017 10:22 AM, "Nenad Vujicic" wrote: > >>> > >>> Hello everyone, > >>> > >>> I found several PLY files which crashed my ParaView based application. > I > >>> inspected vtkPLYReader.cxx and found that it doesn't support loading > of PLY > >>> files with points. > >>> > >>> Example of such PLY file: > >>> https://courses.cs.washington.edu/courses/cse558/01sp/ > software/scanalyze/points.html > >>> Example of software which successfully opens such PLY file: > CloudCompare - > >>> http://www.danielgm.net/cc/ > >>> > >>> Do you maybe have in plans adding support, to vtkPLYReader.cxx, for > such > >>> PLY files? > >>> > >>> Thanks in advance, > >>> Nenad. > >>> > >>> > >>> _______________________________________________ > >>> Powered by www.kitware.com > >>> > >>> Visit other Kitware open-source projects at > >>> http://www.kitware.com/opensource/opensource.html > >>> > >>> Please keep messages on-topic and check the VTK FAQ at: > >>> http://www.vtk.org/Wiki/VTK_FAQ > >>> > >>> Search the list archives at: http://markmail.org/search/?q=vtkusers > >>> > >>> Follow this link to subscribe/unsubscribe: > >>> http://public.kitware.com/mailman/listinfo/vtkusers > >>> > >> > > > > > > > > -- > > Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikhail.pukhlikov at outlook.com Thu Jan 26 06:34:09 2017 From: mikhail.pukhlikov at outlook.com (Mikhail Pukhlikov) Date: Thu, 26 Jan 2017 11:34:09 +0000 Subject: [vtkusers] Segmentation Fault: vtkXOpenGLRenderWindow::MakeCurrent Message-ID: I'm getting (very often but randomly) segfault on vtkXOpenGLRenderWindow::MakeCurrent on glXMakeCurrent Linux, Nvidia, mesa 13.0.3 VTK 7.0 What are possible reasons? How can I deduce it? Thank you! -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 529 bytes Desc: This is a digitally signed message part URL: From mjordan at live.at Thu Jan 26 08:31:15 2017 From: mjordan at live.at (M. Jordan) Date: Thu, 26 Jan 2017 13:31:15 +0000 Subject: [vtkusers] Improve vtkPolyData Surface Quality Message-ID: Hi, I have a .vtk polydata file which I load into my program with the vtkGenericDataObjectReader. The surface looks good but the triangles are visible to the unaided eye. When I import the same .vtk file into the tool "FreeSurfer ( Software Suite for Brain MRI Analysis)" the surface looks much better and there are no single triangles visible. When I enable "show mesh" in Freesurfer the triangle points are visible, but the surface itself is much better than in my VTK program. How I can improve/interpolate my data to improve the surface look? Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Jan 26 08:57:45 2017 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 26 Jan 2017 08:57:45 -0500 Subject: [vtkusers] Improve vtkPolyData Surface Quality In-Reply-To: References: Message-ID: Generate normals using vtkPolyDataNomals. On Thu, Jan 26, 2017 at 8:31 AM, M. Jordan wrote: > Hi, > > I have a .vtk polydata file which I load into my program with the > vtkGenericDataObjectReader. The surface looks good but the triangles are > visible to the unaided eye. When I import the same .vtk file into the tool > "FreeSurfer ( Software Suite for Brain MRI Analysis)" the surface looks much > better and there are no single triangles visible. When I enable "show mesh" > in Freesurfer the triangle points are visible, but the surface itself is > much better than in my VTK program. > > How I can improve/interpolate my data to improve the surface look? > > Thank you! > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From edcpwk at gmail.com Thu Jan 26 09:28:43 2017 From: edcpwk at gmail.com (Eddy Cappeau) Date: Thu, 26 Jan 2017 15:28:43 +0100 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: Hello David, I used the vtkDICOMMRGenerator filter, unsigned short instead of unsigned char and add this line : meta->SetAttributeValue(DC::SpacingBetweenSlices, "1"); The BitsAllocated has now a value of 16 but I've got the same result. Thanks to the tips given by Andras, I've opened each slice individually and they seems correct. There's definitly something wrong in my files, but I don't see why. Thanks. Eddy 2017-01-25 14:35 GMT+01:00 David Gobbi : > Hi Eddy, > > The code is using a vtkDICOMCTGenerator to write an MR image, which is > definitely wrong. Use the vtkDICOMMRGenerator, and make sure the meta data > matches the IOD: http://dicom.nema.org/medical/dicom/current/output/ > chtml/part03/sect_C.8.3.html > > The standard says that BitsAllocated must be 16 for MR images, therefore > an 8-bit MR image is non-standard and DICOM software may to refuse to > display it. You should convert your data to 16-bit (In fact, it seems > fishy that you are working with unsigned char, since if you are writing a > reformat of an MR image, then wasn't the original MR image a 16-bit image?) > > I can't answer about why Slicer is only showing one slice, as I don't > currently have Slicer installed. > > - David > > > > On Wed, Jan 25, 2017 at 1:57 AM, Eddy Cappeau wrote: > >> Hi David, >> >> Here's the code below. This is almost the example of the api doc : >> >> auto generator = vtkSmartPointer ::New(); >> vtkSmartPointer meta = vtkSmartPointer >> ::New(); >> >> meta->SetAttributeValue(DC::PatientName, "Test"); >> meta->SetAttributeValue(DC::PatientID, "0000001"); >> meta->SetAttributeValue(DC::ScanOptions, ""); >> meta->SetAttributeValue(DC::ScanningSequence, "GR"); >> meta->SetAttributeValue(DC::SequenceVariant, "SP"); >> meta->SetAttributeValue(DC::ScanOptions, ""); >> meta->SetAttributeValue(DC::MRAcquisitionType, "2D"); >> >> vtkSmartPointer dicom_writer = >> vtkSmartPointer ::New(); >> dicom_writer->SetInputData(img); >> dicom_writer->SetMetaData(meta); >> dicom_writer->SetGenerator(generator); >> dicom_writer->SetSeriesDescription("Sagittal Multi-planar Reformat"); >> >> // Set the output filename format as a printf-style string. >> dicom_writer->SetFilePattern("%s/IM-0001-%04.4d.dcm"); >> // Set the directory to write the files into. >> dicom_writer->SetFilePrefix(path.toStdString().c_str()); >> // Write the file. >> dicom_writer->Write(); >> >> Sorry, the use of an unsigned short type was a carreless mistake. The >> result is better with unsigned char, >> but I still see just one image of the serie on 3D Slicer. Is there >> something missing to have a complete serie ? >> >> I didn't know the vtkImageImport and I'll give it a try. >> >> Thanks, >> >> Eddy >> >> >> 2017-01-24 15:41 GMT+01:00 David Gobbi : >> >>> Hi Eddy, >>> >>> Can you provide the code that you used to write the image with >>> vtkDICOMWriter? Here is an example: >>> http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html >>> >>> Creating an image with a loop that calls GetScalarPointer() for every >>> pixel is not very efficient, and casting to a "char *" when the data is >>> "unsigned short" is wrong: you are setting only 8 bits of each 16-bit >>> pixel, while leaving the other 8 bits uninitialized. The vtkImageImport >>> filter is a better way of generating image data: >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport >>> >>> - David >>> >>> >>> On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau wrote: >>> >>>> Hi, >>>> >>>> I'd like to use the vtkDICOMWriter class to convert a vtkImage to a set >>>> of DICOM images. >>>> >>>> I've compile VTK with the vtkDICOM module enabled and followed the >>>> example from the pdf found on the github repository ( >>>> http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). >>>> >>>> >>>> The image data is created like this : >>>> >>>> auto img = vtkSmartPointer < vtkImageData >::New(); >>>> img->SetOrigin(0, 0, 0); >>>> img->SetDimensions(1024, 1024, numlayer); >>>> img->SetSpacing(1, 1, 1); >>>> img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); >>>> >>>> and the data filled like this : >>>> >>>> for (int n = 0; x < numlayer; n++) { >>>> for (int x = 0; x < 1024; x++) { >>>> for (int y = 0; y < 1024; y++) { >>>> char* pixel = static_cast(img->GetScalarPointer(x, >>>> y, n)); >>>> pixel[0] = values[x][y]; >>>> } >>>> >>>> I can load the converted result with paraview without problems. >>>> But with 3D Slicer, I can just load the first file of the serie and it >>>> display a blank image. >>>> >>>> What do I have to do to be able to load the images with both >>>> application ? >>>> >>>> Thanks, >>>> >>>> Eddy >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From edcpwk at gmail.com Thu Jan 26 09:30:54 2017 From: edcpwk at gmail.com (Eddy Cappeau) Date: Thu, 26 Jan 2017 15:30:54 +0100 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: Hi Andras, I didn't manage to load un single image before. Thank you for the tip. Eddy 2017-01-26 15:28 GMT+01:00 Eddy Cappeau : > Hello David, > > I used the vtkDICOMMRGenerator filter, unsigned short instead of unsigned > char and add this line : > > meta->SetAttributeValue(DC::SpacingBetweenSlices, "1"); > > The BitsAllocated has now a value of 16 but I've got the same result. > > Thanks to the tips given by Andras, I've opened each slice individually > and they seems correct. > > There's definitly something wrong in my files, but I don't see why. > > Thanks. > > Eddy > > 2017-01-25 14:35 GMT+01:00 David Gobbi : > >> Hi Eddy, >> >> The code is using a vtkDICOMCTGenerator to write an MR image, which is >> definitely wrong. Use the vtkDICOMMRGenerator, and make sure the meta data >> matches the IOD: http://dicom.nema.org/medical/dicom/current/output/chtm >> l/part03/sect_C.8.3.html >> >> The standard says that BitsAllocated must be 16 for MR images, therefore >> an 8-bit MR image is non-standard and DICOM software may to refuse to >> display it. You should convert your data to 16-bit (In fact, it seems >> fishy that you are working with unsigned char, since if you are writing a >> reformat of an MR image, then wasn't the original MR image a 16-bit image?) >> >> I can't answer about why Slicer is only showing one slice, as I don't >> currently have Slicer installed. >> >> - David >> >> >> >> On Wed, Jan 25, 2017 at 1:57 AM, Eddy Cappeau wrote: >> >>> Hi David, >>> >>> Here's the code below. This is almost the example of the api doc : >>> >>> auto generator = vtkSmartPointer ::New(); >>> vtkSmartPointer meta = vtkSmartPointer >>> ::New(); >>> >>> meta->SetAttributeValue(DC::PatientName, "Test"); >>> meta->SetAttributeValue(DC::PatientID, "0000001"); >>> meta->SetAttributeValue(DC::ScanOptions, ""); >>> meta->SetAttributeValue(DC::ScanningSequence, "GR"); >>> meta->SetAttributeValue(DC::SequenceVariant, "SP"); >>> meta->SetAttributeValue(DC::ScanOptions, ""); >>> meta->SetAttributeValue(DC::MRAcquisitionType, "2D"); >>> >>> vtkSmartPointer dicom_writer = >>> vtkSmartPointer ::New(); >>> dicom_writer->SetInputData(img); >>> dicom_writer->SetMetaData(meta); >>> dicom_writer->SetGenerator(generator); >>> dicom_writer->SetSeriesDescription("Sagittal Multi-planar >>> Reformat"); >>> >>> // Set the output filename format as a printf-style string. >>> dicom_writer->SetFilePattern("%s/IM-0001-%04.4d.dcm"); >>> // Set the directory to write the files into. >>> dicom_writer->SetFilePrefix(path.toStdString().c_str()); >>> // Write the file. >>> dicom_writer->Write(); >>> >>> Sorry, the use of an unsigned short type was a carreless mistake. The >>> result is better with unsigned char, >>> but I still see just one image of the serie on 3D Slicer. Is there >>> something missing to have a complete serie ? >>> >>> I didn't know the vtkImageImport and I'll give it a try. >>> >>> Thanks, >>> >>> Eddy >>> >>> >>> 2017-01-24 15:41 GMT+01:00 David Gobbi : >>> >>>> Hi Eddy, >>>> >>>> Can you provide the code that you used to write the image with >>>> vtkDICOMWriter? Here is an example: >>>> http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html >>>> >>>> Creating an image with a loop that calls GetScalarPointer() for every >>>> pixel is not very efficient, and casting to a "char *" when the data is >>>> "unsigned short" is wrong: you are setting only 8 bits of each 16-bit >>>> pixel, while leaving the other 8 bits uninitialized. The vtkImageImport >>>> filter is a better way of generating image data: >>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport >>>> >>>> - David >>>> >>>> >>>> On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau wrote: >>>> >>>>> Hi, >>>>> >>>>> I'd like to use the vtkDICOMWriter class to convert a vtkImage to a >>>>> set of DICOM images. >>>>> >>>>> I've compile VTK with the vtkDICOM module enabled and followed the >>>>> example from the pdf found on the github repository ( >>>>> http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). >>>>> >>>>> >>>>> The image data is created like this : >>>>> >>>>> auto img = vtkSmartPointer < vtkImageData >::New(); >>>>> img->SetOrigin(0, 0, 0); >>>>> img->SetDimensions(1024, 1024, numlayer); >>>>> img->SetSpacing(1, 1, 1); >>>>> img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); >>>>> >>>>> and the data filled like this : >>>>> >>>>> for (int n = 0; x < numlayer; n++) { >>>>> for (int x = 0; x < 1024; x++) { >>>>> for (int y = 0; y < 1024; y++) { >>>>> char* pixel = static_cast(img->GetScalarPointer(x, >>>>> y, n)); >>>>> pixel[0] = values[x][y]; >>>>> } >>>>> >>>>> I can load the converted result with paraview without problems. >>>>> But with 3D Slicer, I can just load the first file of the serie and it >>>>> display a blank image. >>>>> >>>>> What do I have to do to be able to load the images with both >>>>> application ? >>>>> >>>>> Thanks, >>>>> >>>>> Eddy >>>>> >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.lipsa at kitware.com Thu Jan 26 09:41:38 2017 From: dan.lipsa at kitware.com (Dan Lipsa) Date: Thu, 26 Jan 2017 09:41:38 -0500 Subject: [vtkusers] Segmentation Fault: vtkXOpenGLRenderWindow::MakeCurrent In-Reply-To: References: Message-ID: Random crashes are often caused by memory overwrites. Try to use valgrind on your program, maybe you'll see something. Also, try to run your program on a different machine with a different OpenGL driver. Do you get the same? Dan On Thu, Jan 26, 2017 at 6:34 AM, Mikhail Pukhlikov < mikhail.pukhlikov at outlook.com> wrote: > I'm getting (very often but randomly) segfault on vtkXOpenGLRenderWindow:: > MakeCurrent > > on glXMakeCurrent > > Linux, Nvidia, mesa 13.0.3 > > VTK 7.0 > > What are possible reasons? How can I deduce it? Thank you! > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 26 09:43:10 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 26 Jan 2017 07:43:10 -0700 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: Hi Eddy, In Slicer's DICOM browser, does it show all of the images as belonging to the same series? I'm wondering if, perhaps, each image has a different SeriesInstanceUID. That would definitely cause problems with loading into a "dicom aware" program like Slicer, but ParaView probably wouldn't care. - David On Thu, Jan 26, 2017 at 7:30 AM, Eddy Cappeau wrote: > Hi Andras, > > I didn't manage to load un single image before. > > Thank you for the tip. > > Eddy > > 2017-01-26 15:28 GMT+01:00 Eddy Cappeau : > >> Hello David, >> >> I used the vtkDICOMMRGenerator filter, unsigned short instead of unsigned >> char and add this line : >> >> meta->SetAttributeValue(DC::SpacingBetweenSlices, "1"); >> >> The BitsAllocated has now a value of 16 but I've got the same result. >> >> Thanks to the tips given by Andras, I've opened each slice individually >> and they seems correct. >> >> There's definitly something wrong in my files, but I don't see why. >> >> Thanks. >> >> Eddy >> >> 2017-01-25 14:35 GMT+01:00 David Gobbi : >> >>> Hi Eddy, >>> >>> The code is using a vtkDICOMCTGenerator to write an MR image, which is >>> definitely wrong. Use the vtkDICOMMRGenerator, and make sure the meta data >>> matches the IOD: http://dicom.nema.org/medical/dicom/current/output/chtm >>> l/part03/sect_C.8.3.html >>> >>> The standard says that BitsAllocated must be 16 for MR images, therefore >>> an 8-bit MR image is non-standard and DICOM software may to refuse to >>> display it. You should convert your data to 16-bit (In fact, it seems >>> fishy that you are working with unsigned char, since if you are writing a >>> reformat of an MR image, then wasn't the original MR image a 16-bit image?) >>> >>> I can't answer about why Slicer is only showing one slice, as I don't >>> currently have Slicer installed. >>> >>> - David >>> >>> >>> >>> On Wed, Jan 25, 2017 at 1:57 AM, Eddy Cappeau wrote: >>> >>>> Hi David, >>>> >>>> Here's the code below. This is almost the example of the api doc : >>>> >>>> auto generator = vtkSmartPointer ::New(); >>>> vtkSmartPointer meta = vtkSmartPointer >>>> ::New(); >>>> >>>> meta->SetAttributeValue(DC::PatientName, "Test"); >>>> meta->SetAttributeValue(DC::PatientID, "0000001"); >>>> meta->SetAttributeValue(DC::ScanOptions, ""); >>>> meta->SetAttributeValue(DC::ScanningSequence, "GR"); >>>> meta->SetAttributeValue(DC::SequenceVariant, "SP"); >>>> meta->SetAttributeValue(DC::ScanOptions, ""); >>>> meta->SetAttributeValue(DC::MRAcquisitionType, "2D"); >>>> >>>> vtkSmartPointer dicom_writer = >>>> vtkSmartPointer ::New(); >>>> dicom_writer->SetInputData(img); >>>> dicom_writer->SetMetaData(meta); >>>> dicom_writer->SetGenerator(generator); >>>> dicom_writer->SetSeriesDescription("Sagittal Multi-planar >>>> Reformat"); >>>> >>>> // Set the output filename format as a printf-style string. >>>> dicom_writer->SetFilePattern("%s/IM-0001-%04.4d.dcm"); >>>> // Set the directory to write the files into. >>>> dicom_writer->SetFilePrefix(path.toStdString().c_str()); >>>> // Write the file. >>>> dicom_writer->Write(); >>>> >>>> Sorry, the use of an unsigned short type was a carreless mistake. The >>>> result is better with unsigned char, >>>> but I still see just one image of the serie on 3D Slicer. Is there >>>> something missing to have a complete serie ? >>>> >>>> I didn't know the vtkImageImport and I'll give it a try. >>>> >>>> Thanks, >>>> >>>> Eddy >>>> >>>> >>>> 2017-01-24 15:41 GMT+01:00 David Gobbi : >>>> >>>>> Hi Eddy, >>>>> >>>>> Can you provide the code that you used to write the image with >>>>> vtkDICOMWriter? Here is an example: >>>>> http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html >>>>> >>>>> Creating an image with a loop that calls GetScalarPointer() for every >>>>> pixel is not very efficient, and casting to a "char *" when the data is >>>>> "unsigned short" is wrong: you are setting only 8 bits of each 16-bit >>>>> pixel, while leaving the other 8 bits uninitialized. The vtkImageImport >>>>> filter is a better way of generating image data: >>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport >>>>> >>>>> - David >>>>> >>>>> >>>>> On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I'd like to use the vtkDICOMWriter class to convert a vtkImage to a >>>>>> set of DICOM images. >>>>>> >>>>>> I've compile VTK with the vtkDICOM module enabled and followed the >>>>>> example from the pdf found on the github repository ( >>>>>> http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). >>>>>> >>>>>> >>>>>> The image data is created like this : >>>>>> >>>>>> auto img = vtkSmartPointer < vtkImageData >::New(); >>>>>> img->SetOrigin(0, 0, 0); >>>>>> img->SetDimensions(1024, 1024, numlayer); >>>>>> img->SetSpacing(1, 1, 1); >>>>>> img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); >>>>>> >>>>>> and the data filled like this : >>>>>> >>>>>> for (int n = 0; x < numlayer; n++) { >>>>>> for (int x = 0; x < 1024; x++) { >>>>>> for (int y = 0; y < 1024; y++) { >>>>>> char* pixel = static_cast(img->GetScalarPointer(x, >>>>>> y, n)); >>>>>> pixel[0] = values[x][y]; >>>>>> } >>>>>> >>>>>> I can load the converted result with paraview without problems. >>>>>> But with 3D Slicer, I can just load the first file of the serie and >>>>>> it display a blank image. >>>>>> >>>>>> What do I have to do to be able to load the images with both >>>>>> application ? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Eddy >>>>>> >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Jan 26 09:54:43 2017 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 26 Jan 2017 09:54:43 -0500 Subject: [vtkusers] Segmentation Fault: vtkXOpenGLRenderWindow::MakeCurrent In-Reply-To: References: Message-ID: Also in VTK 7.0 there were cases where when working with multiple windows or removing actors/mappers/textures from a live window could cause this type of error. If you have just one window and are not removing actors/mappers/textures from it then I'm not sure what it is. On Thu, Jan 26, 2017 at 9:41 AM, Dan Lipsa wrote: > Random crashes are often caused by memory overwrites. Try to use valgrind > on your program, maybe you'll see something. > Also, try to run your program on a different machine with a different > OpenGL driver. Do you get the same? > > Dan > > > On Thu, Jan 26, 2017 at 6:34 AM, Mikhail Pukhlikov < > mikhail.pukhlikov at outlook.com> wrote: > >> I'm getting (very often but randomly) segfault on >> vtkXOpenGLRenderWindow::MakeCurrent >> >> on glXMakeCurrent >> >> Linux, Nvidia, mesa 13.0.3 >> >> VTK 7.0 >> >> What are possible reasons? How can I deduce it? Thank you! >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From edcpwk at gmail.com Thu Jan 26 11:05:33 2017 From: edcpwk at gmail.com (Eddy Cappeau) Date: Thu, 26 Jan 2017 17:05:33 +0100 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: Hi David, When I load the DICOM directory, Slicer tells me that there's only one serie. Each image have the same SeriesInstanceUID. I don't know if it's normal but the SeriesInstanceUID is also used for the SOPInstanceUID, the StudyInstanceUID and the FrameOfReferenceUID. I've made a screenshot of the Slicer metadata browser here : https://framapic.org/t3tTt1RHhlWP/XhHP9dQ2Nz8s.png Eddy 2017-01-26 15:43 GMT+01:00 David Gobbi : > Hi Eddy, > > In Slicer's DICOM browser, does it show all of the images as belonging to > the same series? I'm wondering if, perhaps, each image has a different > SeriesInstanceUID. That would definitely cause problems with loading into > a "dicom aware" program like Slicer, but ParaView probably wouldn't care. > > - David > > On Thu, Jan 26, 2017 at 7:30 AM, Eddy Cappeau wrote: > >> Hi Andras, >> >> I didn't manage to load un single image before. >> >> Thank you for the tip. >> >> Eddy >> >> 2017-01-26 15:28 GMT+01:00 Eddy Cappeau : >> >>> Hello David, >>> >>> I used the vtkDICOMMRGenerator filter, unsigned short instead of >>> unsigned char and add this line : >>> >>> meta->SetAttributeValue(DC::SpacingBetweenSlices, "1"); >>> >>> The BitsAllocated has now a value of 16 but I've got the same result. >>> >>> Thanks to the tips given by Andras, I've opened each slice individually >>> and they seems correct. >>> >>> There's definitly something wrong in my files, but I don't see why. >>> >>> Thanks. >>> >>> Eddy >>> >>> 2017-01-25 14:35 GMT+01:00 David Gobbi : >>> >>>> Hi Eddy, >>>> >>>> The code is using a vtkDICOMCTGenerator to write an MR image, which is >>>> definitely wrong. Use the vtkDICOMMRGenerator, and make sure the meta data >>>> matches the IOD: http://dicom.nema.org/med >>>> ical/dicom/current/output/chtml/part03/sect_C.8.3.html >>>> >>>> The standard says that BitsAllocated must be 16 for MR images, >>>> therefore an 8-bit MR image is non-standard and DICOM software may to >>>> refuse to display it. You should convert your data to 16-bit (In fact, it >>>> seems fishy that you are working with unsigned char, since if you are >>>> writing a reformat of an MR image, then wasn't the original MR image a >>>> 16-bit image?) >>>> >>>> I can't answer about why Slicer is only showing one slice, as I don't >>>> currently have Slicer installed. >>>> >>>> - David >>>> >>>> >>>> >>>> On Wed, Jan 25, 2017 at 1:57 AM, Eddy Cappeau wrote: >>>> >>>>> Hi David, >>>>> >>>>> Here's the code below. This is almost the example of the api doc : >>>>> >>>>> auto generator = vtkSmartPointer ::New(); >>>>> vtkSmartPointer meta = vtkSmartPointer >>>>> ::New(); >>>>> >>>>> meta->SetAttributeValue(DC::PatientName, "Test"); >>>>> meta->SetAttributeValue(DC::PatientID, "0000001"); >>>>> meta->SetAttributeValue(DC::ScanOptions, ""); >>>>> meta->SetAttributeValue(DC::ScanningSequence, "GR"); >>>>> meta->SetAttributeValue(DC::SequenceVariant, "SP"); >>>>> meta->SetAttributeValue(DC::ScanOptions, ""); >>>>> meta->SetAttributeValue(DC::MRAcquisitionType, "2D"); >>>>> >>>>> vtkSmartPointer dicom_writer = >>>>> vtkSmartPointer ::New(); >>>>> dicom_writer->SetInputData(img); >>>>> dicom_writer->SetMetaData(meta); >>>>> dicom_writer->SetGenerator(generator); >>>>> dicom_writer->SetSeriesDescription("Sagittal Multi-planar >>>>> Reformat"); >>>>> >>>>> // Set the output filename format as a printf-style string. >>>>> dicom_writer->SetFilePattern("%s/IM-0001-%04.4d.dcm"); >>>>> // Set the directory to write the files into. >>>>> dicom_writer->SetFilePrefix(path.toStdString().c_str()); >>>>> // Write the file. >>>>> dicom_writer->Write(); >>>>> >>>>> Sorry, the use of an unsigned short type was a carreless mistake. The >>>>> result is better with unsigned char, >>>>> but I still see just one image of the serie on 3D Slicer. Is there >>>>> something missing to have a complete serie ? >>>>> >>>>> I didn't know the vtkImageImport and I'll give it a try. >>>>> >>>>> Thanks, >>>>> >>>>> Eddy >>>>> >>>>> >>>>> 2017-01-24 15:41 GMT+01:00 David Gobbi : >>>>> >>>>>> Hi Eddy, >>>>>> >>>>>> Can you provide the code that you used to write the image with >>>>>> vtkDICOMWriter? Here is an example: >>>>>> http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html >>>>>> >>>>>> Creating an image with a loop that calls GetScalarPointer() for every >>>>>> pixel is not very efficient, and casting to a "char *" when the data is >>>>>> "unsigned short" is wrong: you are setting only 8 bits of each 16-bit >>>>>> pixel, while leaving the other 8 bits uninitialized. The vtkImageImport >>>>>> filter is a better way of generating image data: >>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport >>>>>> >>>>>> - David >>>>>> >>>>>> >>>>>> On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau >>>>>> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I'd like to use the vtkDICOMWriter class to convert a vtkImage to a >>>>>>> set of DICOM images. >>>>>>> >>>>>>> I've compile VTK with the vtkDICOM module enabled and followed the >>>>>>> example from the pdf found on the github repository ( >>>>>>> http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). >>>>>>> >>>>>>> >>>>>>> The image data is created like this : >>>>>>> >>>>>>> auto img = vtkSmartPointer < vtkImageData >::New(); >>>>>>> img->SetOrigin(0, 0, 0); >>>>>>> img->SetDimensions(1024, 1024, numlayer); >>>>>>> img->SetSpacing(1, 1, 1); >>>>>>> img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); >>>>>>> >>>>>>> and the data filled like this : >>>>>>> >>>>>>> for (int n = 0; x < numlayer; n++) { >>>>>>> for (int x = 0; x < 1024; x++) { >>>>>>> for (int y = 0; y < 1024; y++) { >>>>>>> char* pixel = static_cast(img->GetScalarPointer(x, >>>>>>> y, n)); >>>>>>> pixel[0] = values[x][y]; >>>>>>> } >>>>>>> >>>>>>> I can load the converted result with paraview without problems. >>>>>>> But with 3D Slicer, I can just load the first file of the serie and >>>>>>> it display a blank image. >>>>>>> >>>>>>> What do I have to do to be able to load the images with both >>>>>>> application ? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Eddy >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Jan 26 11:23:04 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 26 Jan 2017 09:23:04 -0700 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: Hi Eddy, The SOPInstanceUID must be different for each image (and the other two UIDs shouldn't be the same as the SeriesInstanceUID, either). What version of vtk-dicom are you using, and what operating system? I can check on my end to make sure that the random numbers for the UUIDs are being properly generated. I use CryptGenRandom() on Windows and /dev/urandom on UNIX/Linux. - David On Thu, Jan 26, 2017 at 9:05 AM, Eddy Cappeau wrote: > Hi David, > > When I load the DICOM directory, Slicer tells me that there's only one > serie. > Each image have the same SeriesInstanceUID. > > I don't know if it's normal but the SeriesInstanceUID is also used for the > SOPInstanceUID, the StudyInstanceUID and the FrameOfReferenceUID. > > I've made a screenshot of the Slicer metadata browser here : > > https://framapic.org/t3tTt1RHhlWP/XhHP9dQ2Nz8s.png > > > Eddy > > > 2017-01-26 15:43 GMT+01:00 David Gobbi : > >> Hi Eddy, >> >> In Slicer's DICOM browser, does it show all of the images as belonging to >> the same series? I'm wondering if, perhaps, each image has a different >> SeriesInstanceUID. That would definitely cause problems with loading into >> a "dicom aware" program like Slicer, but ParaView probably wouldn't care. >> >> - David >> >> On Thu, Jan 26, 2017 at 7:30 AM, Eddy Cappeau wrote: >> >>> Hi Andras, >>> >>> I didn't manage to load un single image before. >>> >>> Thank you for the tip. >>> >>> Eddy >>> >>> 2017-01-26 15:28 GMT+01:00 Eddy Cappeau : >>> >>>> Hello David, >>>> >>>> I used the vtkDICOMMRGenerator filter, unsigned short instead of >>>> unsigned char and add this line : >>>> >>>> meta->SetAttributeValue(DC::SpacingBetweenSlices, "1"); >>>> >>>> The BitsAllocated has now a value of 16 but I've got the same result. >>>> >>>> Thanks to the tips given by Andras, I've opened each slice individually >>>> and they seems correct. >>>> >>>> There's definitly something wrong in my files, but I don't see why. >>>> >>>> Thanks. >>>> >>>> Eddy >>>> >>>> 2017-01-25 14:35 GMT+01:00 David Gobbi : >>>> >>>>> Hi Eddy, >>>>> >>>>> The code is using a vtkDICOMCTGenerator to write an MR image, which is >>>>> definitely wrong. Use the vtkDICOMMRGenerator, and make sure the meta data >>>>> matches the IOD: http://dicom.nema.org/med >>>>> ical/dicom/current/output/chtml/part03/sect_C.8.3.html >>>>> >>>>> The standard says that BitsAllocated must be 16 for MR images, >>>>> therefore an 8-bit MR image is non-standard and DICOM software may to >>>>> refuse to display it. You should convert your data to 16-bit (In fact, it >>>>> seems fishy that you are working with unsigned char, since if you are >>>>> writing a reformat of an MR image, then wasn't the original MR image a >>>>> 16-bit image?) >>>>> >>>>> I can't answer about why Slicer is only showing one slice, as I don't >>>>> currently have Slicer installed. >>>>> >>>>> - David >>>>> >>>>> >>>>> >>>>> On Wed, Jan 25, 2017 at 1:57 AM, Eddy Cappeau >>>>> wrote: >>>>> >>>>>> Hi David, >>>>>> >>>>>> Here's the code below. This is almost the example of the api doc : >>>>>> >>>>>> auto generator = vtkSmartPointer ::New(); >>>>>> vtkSmartPointer meta = vtkSmartPointer >>>>>> ::New(); >>>>>> >>>>>> meta->SetAttributeValue(DC::PatientName, "Test"); >>>>>> meta->SetAttributeValue(DC::PatientID, "0000001"); >>>>>> meta->SetAttributeValue(DC::ScanOptions, ""); >>>>>> meta->SetAttributeValue(DC::ScanningSequence, "GR"); >>>>>> meta->SetAttributeValue(DC::SequenceVariant, "SP"); >>>>>> meta->SetAttributeValue(DC::ScanOptions, ""); >>>>>> meta->SetAttributeValue(DC::MRAcquisitionType, "2D"); >>>>>> >>>>>> vtkSmartPointer dicom_writer = >>>>>> vtkSmartPointer ::New(); >>>>>> dicom_writer->SetInputData(img); >>>>>> dicom_writer->SetMetaData(meta); >>>>>> dicom_writer->SetGenerator(generator); >>>>>> dicom_writer->SetSeriesDescription("Sagittal Multi-planar >>>>>> Reformat"); >>>>>> >>>>>> // Set the output filename format as a printf-style string. >>>>>> dicom_writer->SetFilePattern("%s/IM-0001-%04.4d.dcm"); >>>>>> // Set the directory to write the files into. >>>>>> dicom_writer->SetFilePrefix(path.toStdString().c_str()); >>>>>> // Write the file. >>>>>> dicom_writer->Write(); >>>>>> >>>>>> Sorry, the use of an unsigned short type was a carreless mistake. The >>>>>> result is better with unsigned char, >>>>>> but I still see just one image of the serie on 3D Slicer. Is there >>>>>> something missing to have a complete serie ? >>>>>> >>>>>> I didn't know the vtkImageImport and I'll give it a try. >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Eddy >>>>>> >>>>>> >>>>>> 2017-01-24 15:41 GMT+01:00 David Gobbi : >>>>>> >>>>>>> Hi Eddy, >>>>>>> >>>>>>> Can you provide the code that you used to write the image with >>>>>>> vtkDICOMWriter? Here is an example: >>>>>>> http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html >>>>>>> >>>>>>> Creating an image with a loop that calls GetScalarPointer() for >>>>>>> every pixel is not very efficient, and casting to a "char *" when the data >>>>>>> is "unsigned short" is wrong: you are setting only 8 bits of each 16-bit >>>>>>> pixel, while leaving the other 8 bits uninitialized. The vtkImageImport >>>>>>> filter is a better way of generating image data: >>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport >>>>>>> >>>>>>> - David >>>>>>> >>>>>>> >>>>>>> On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau >>>>>>> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I'd like to use the vtkDICOMWriter class to convert a vtkImage to a >>>>>>>> set of DICOM images. >>>>>>>> >>>>>>>> I've compile VTK with the vtkDICOM module enabled and followed the >>>>>>>> example from the pdf found on the github repository ( >>>>>>>> http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). >>>>>>>> >>>>>>>> >>>>>>>> The image data is created like this : >>>>>>>> >>>>>>>> auto img = vtkSmartPointer < vtkImageData >::New(); >>>>>>>> img->SetOrigin(0, 0, 0); >>>>>>>> img->SetDimensions(1024, 1024, numlayer); >>>>>>>> img->SetSpacing(1, 1, 1); >>>>>>>> img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); >>>>>>>> >>>>>>>> and the data filled like this : >>>>>>>> >>>>>>>> for (int n = 0; x < numlayer; n++) { >>>>>>>> for (int x = 0; x < 1024; x++) { >>>>>>>> for (int y = 0; y < 1024; y++) { >>>>>>>> char* pixel = static_cast(img->GetScalarPointer(x, >>>>>>>> y, n)); >>>>>>>> pixel[0] = values[x][y]; >>>>>>>> } >>>>>>>> >>>>>>>> I can load the converted result with paraview without problems. >>>>>>>> But with 3D Slicer, I can just load the first file of the serie and >>>>>>>> it display a blank image. >>>>>>>> >>>>>>>> What do I have to do to be able to load the images with both >>>>>>>> application ? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Eddy >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mfaieghi at westerneng.ca Thu Jan 26 17:30:41 2017 From: mfaieghi at westerneng.ca (Reza Faieghi) Date: Thu, 26 Jan 2017 17:30:41 -0500 Subject: [vtkusers] how to move an actor by keyboard events Message-ID: Hello Everyone, I want to use arrow keys to move an actor in a scene. The actor is created from an STL reader from the following code: vtkSmartPointer reamer_reader = vtkSmartPointer::New(); reamer_reader->SetFileName(inputFilename.c_str()); reamer_reader->Update(); Then, I have the following transfer matrix and filter to make the translations: vtkSmartPointer transform_matrix = vtkSmartPointer< vtkTransform>::New(); transform_matrix->Translate(0.0, 0.0, 0.0); vtkSmartPointer transformFilter = vtkSmartPointer::New(); transformFilter->SetInputConnection(reamer_reader->GetOutputPort()); transformFilter->SetTransform(transform_matrix); transformFilter->Update(); And of course, there are the mapper, actor and renderer as follows: vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->SetBackground(.3, .6, .3); vtkSmartPointer reamer_mapper = vtkSmartPointer< vtkPolyDataMapper>::New(); reamer_mapper->SetInputConnection(reamer_reader->GetOutputPort()); vtkSmartPointer reamer_actor = vtkSmartPointer::New(); renderer->AddActor(reamer_actor); I create a window interactor and then add an observer to look for key press events: vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); vtkSmartPointer camera_style = vtkSmartPointer::New(); renderWindowInteractor->SetInteractorStyle(camera_style); vtkSmartPointer keypressCallback = vtkSmartPointer::New(); keypressCallback->SetCallback(KeypressCallbackFunction); renderWindowInteractor->AddObserver(vtkCommand::KeyPressEvent, keypressCallback); vtkSmartPointer keyboard_style = vtkSmartPointer::New(); renderWindowInteractor->SetInteractorStyle(keyboard_style); vtkSmartPointer renderWindow = vtkSmartPointer< vtkRenderWindow>::New(); renderWindowInteractor->SetRenderWindow(renderWindow); renderWindow->AddRenderer(renderer); renderWindow->Render(); renderWindowInteractor->Start(); and here is the KeypressCallbackFunction itself: void KeypressCallbackFunction(vtkObject* caller, long unsigned int vtkNotUsed(eventId), void* vtkNotUsed(clientData), void* vtkNotUsed(callData)){ vtkRenderWindowInteractor *iren = static_cast< vtkRenderWindowInteractor*>(caller); std::cout << "Pressed: " << iren->GetKeySym() << std::endl; std::string key = iren->GetKeySym(); if (key == "Up") { //??? What to do here ??? } } I can not figure out what commands should I write when the ?Up? key is pressed. I am assuming that I only need to update the translation matrix here, but I don?t know where to apply the updated translation matrix to the actor and I think I need to call renderWindow->Render(), too. I will really appreciate it if anyone helps me with (1) what to write within the if-block? (2) how to pass variables such as translation matrix to KeypressCallbackFunction? (3) where to call renderWindow->Render()? Many thanks! Reza -- PhD Candidate, Spencer Engineering Building Room 37 University of Western Ontario London, ON, Canada, N6A 5B9 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikhail.pukhlikov at outlook.com Fri Jan 27 02:46:36 2017 From: mikhail.pukhlikov at outlook.com (Mikhail Pukhlikov) Date: Fri, 27 Jan 2017 07:46:36 +0000 Subject: [vtkusers] Segmentation Fault: vtkXOpenGLRenderWindow::MakeCurrent In-Reply-To: References: Message-ID: It's very strange but dowgrading nvidia driver from 378.09 (where they enabled multithread optimizations) helped me there... I will wait for more people to confirm whether it's related or not but sumhow problem is disappeared after downgrade gpu driver for me On Thu, 2017-01-26 at 09:54 -0500, Ken Martin wrote: > Also in VTK 7.0 there were cases where when working with multiple windows or removing actors/mappers/textures from a live window could cause this type of error. If you have just one window and are > not removing actors/mappers/textures from it then I'm not sure what it is.? > > On Thu, Jan 26, 2017 at 9:41 AM, Dan Lipsa wrote: > > Random crashes are often caused by memory overwrites. Try to use valgrind on your program, maybe you'll see something. > > Also, try to run your program on a different machine with a different OpenGL driver. Do you get the same? > > > > Dan > > > > > > On Thu, Jan 26, 2017 at 6:34 AM, Mikhail Pukhlikov wrote: > > > I'm getting (very often but randomly) segfault on vtkXOpenGLRenderWindow::MakeCurrent > > > > > > on glXMakeCurrent > > > > > > Linux, Nvidia, mesa 13.0.3 > > > > > > VTK 7.0 > > > > > > What are possible reasons? How can I deduce it? Thank you! > > > _______________________________________________ > > > Powered by www.kitware.com > > > > > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > > > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > > > Follow this link to subscribe/unsubscribe: > > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > > > > --? > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.? Access to this email by anyone else is > unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication > in error please notify us immediately and destroy the original message.? Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 529 bytes Desc: This is a digitally signed message part URL: From edcpwk at gmail.com Fri Jan 27 08:31:09 2017 From: edcpwk at gmail.com (Eddy Cappeau) Date: Fri, 27 Jan 2017 14:31:09 +0100 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: Hi David, I've patched my vtk 7.1 source and recompile and that's working. I can load my dicom directory in Slicer without problems now. I've surely faced a corner case, but after reading the documentation ( https://msdn.microsoft.com/en-us/library/windows/desktop/ aa379886(v=vs.85).aspx), I think it's maybe safer to use the CRYPT_VERIFYCONTEXT flag. Thanks for your help. Eddy 2017-01-27 11:27 GMT+01:00 Eddy Cappeau : > Hi David, > > For the vtk-dicom I'm using, I've just compile VTK 7.1 with the vtkdicom > module activated. > I'm on Windows 7 and compile with visual studio 2013 in 64 bits. > > I've tried this : > > auto uidg = generator->GetUIDGenerator(); > > assert(uidg != nullptr); > > auto uid_1 = uidg->GenerateUID(DC::SeriesInstanceUID); > auto uid_2 = uidg->GenerateUID(DC::SOPInstanceUID); > auto uid_3 = uidg->GenerateUID(DC::FrameOfReferenceUID); > > auto uid_4 = vtkDICOMUtilities::GenerateUID(DC::SeriesInstanceUID); > auto uid_5 = vtkDICOMUtilities::GenerateUID(DC::SOPInstanceUID); > auto uid_6 = vtkDICOMUtilities::GenerateUID(DC::FrameOfReferenceUID); > > The value returned is always : "2.25.302240678275694148452352" > > After some investiations, I found a problem with the > vtkGenerateRandomBytes function in vtkDICOMUIDGenerator.cxx. > The error returned by CryptAcquireContext in my case is NTE_BAD_KEY_STATE. > So the CryptGenRandom function is never called a the buffer is filled with > zeros. > > I copied the function for debug purpose and used the fix proposed at the > end of this thread : > > http://stackoverflow.com/questions/29996467/cryptacquirecont > ext-fails-with-return-code-0x8009000b-nte-bad-key-state-but > > And that did the trick it seems. > > For testing the solution, how can I patch my vtk-dicom sources ? > is it enough to edit de source directly in VTK-7.1.0\Remote\vtkDICOM\Source > and rebuild VTK ? > > Thanks, > > Eddy > > 2017-01-26 17:23 GMT+01:00 David Gobbi : > >> Hi Eddy, >> >> The SOPInstanceUID must be different for each image (and the other two >> UIDs shouldn't be the same as the SeriesInstanceUID, either). >> >> What version of vtk-dicom are you using, and what operating system? I >> can check on my end to make sure that the random numbers for the UUIDs are >> being properly generated. I use CryptGenRandom() on Windows and >> /dev/urandom on UNIX/Linux. >> >> - David >> >> On Thu, Jan 26, 2017 at 9:05 AM, Eddy Cappeau wrote: >> >>> Hi David, >>> >>> When I load the DICOM directory, Slicer tells me that there's only one >>> serie. >>> Each image have the same SeriesInstanceUID. >>> >>> I don't know if it's normal but the SeriesInstanceUID is also used for >>> the SOPInstanceUID, the StudyInstanceUID and the FrameOfReferenceUID. >>> >>> I've made a screenshot of the Slicer metadata browser here : >>> >>> https://framapic.org/t3tTt1RHhlWP/XhHP9dQ2Nz8s.png >>> >>> >>> Eddy >>> >>> >>> 2017-01-26 15:43 GMT+01:00 David Gobbi : >>> >>>> Hi Eddy, >>>> >>>> In Slicer's DICOM browser, does it show all of the images as belonging >>>> to the same series? I'm wondering if, perhaps, each image has a different >>>> SeriesInstanceUID. That would definitely cause problems with loading into >>>> a "dicom aware" program like Slicer, but ParaView probably wouldn't care. >>>> >>>> - David >>>> >>>> On Thu, Jan 26, 2017 at 7:30 AM, Eddy Cappeau wrote: >>>> >>>>> Hi Andras, >>>>> >>>>> I didn't manage to load un single image before. >>>>> >>>>> Thank you for the tip. >>>>> >>>>> Eddy >>>>> >>>>> 2017-01-26 15:28 GMT+01:00 Eddy Cappeau : >>>>> >>>>>> Hello David, >>>>>> >>>>>> I used the vtkDICOMMRGenerator filter, unsigned short instead of >>>>>> unsigned char and add this line : >>>>>> >>>>>> meta->SetAttributeValue(DC::SpacingBetweenSlices, "1"); >>>>>> >>>>>> The BitsAllocated has now a value of 16 but I've got the same result. >>>>>> >>>>>> Thanks to the tips given by Andras, I've opened each slice >>>>>> individually and they seems correct. >>>>>> >>>>>> There's definitly something wrong in my files, but I don't see why. >>>>>> >>>>>> Thanks. >>>>>> >>>>>> Eddy >>>>>> >>>>>> 2017-01-25 14:35 GMT+01:00 David Gobbi : >>>>>> >>>>>>> Hi Eddy, >>>>>>> >>>>>>> The code is using a vtkDICOMCTGenerator to write an MR image, which >>>>>>> is definitely wrong. Use the vtkDICOMMRGenerator, and make sure the meta >>>>>>> data matches the IOD: http://dicom.nema.org/med >>>>>>> ical/dicom/current/output/chtml/part03/sect_C.8.3.html >>>>>>> >>>>>>> The standard says that BitsAllocated must be 16 for MR images, >>>>>>> therefore an 8-bit MR image is non-standard and DICOM software may to >>>>>>> refuse to display it. You should convert your data to 16-bit (In fact, it >>>>>>> seems fishy that you are working with unsigned char, since if you are >>>>>>> writing a reformat of an MR image, then wasn't the original MR image a >>>>>>> 16-bit image?) >>>>>>> >>>>>>> I can't answer about why Slicer is only showing one slice, as I >>>>>>> don't currently have Slicer installed. >>>>>>> >>>>>>> - David >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Jan 25, 2017 at 1:57 AM, Eddy Cappeau >>>>>>> wrote: >>>>>>> >>>>>>>> Hi David, >>>>>>>> >>>>>>>> Here's the code below. This is almost the example of the api doc : >>>>>>>> >>>>>>>> auto generator = vtkSmartPointer ::New(); >>>>>>>> vtkSmartPointer meta = vtkSmartPointer >>>>>>>> ::New(); >>>>>>>> >>>>>>>> meta->SetAttributeValue(DC::PatientName, "Test"); >>>>>>>> meta->SetAttributeValue(DC::PatientID, "0000001"); >>>>>>>> meta->SetAttributeValue(DC::ScanOptions, ""); >>>>>>>> meta->SetAttributeValue(DC::ScanningSequence, "GR"); >>>>>>>> meta->SetAttributeValue(DC::SequenceVariant, "SP"); >>>>>>>> meta->SetAttributeValue(DC::ScanOptions, ""); >>>>>>>> meta->SetAttributeValue(DC::MRAcquisitionType, "2D"); >>>>>>>> >>>>>>>> vtkSmartPointer dicom_writer = >>>>>>>> vtkSmartPointer ::New(); >>>>>>>> dicom_writer->SetInputData(img); >>>>>>>> dicom_writer->SetMetaData(meta); >>>>>>>> dicom_writer->SetGenerator(generator); >>>>>>>> dicom_writer->SetSeriesDescription("Sagittal Multi-planar >>>>>>>> Reformat"); >>>>>>>> >>>>>>>> // Set the output filename format as a printf-style string. >>>>>>>> dicom_writer->SetFilePattern("%s/IM-0001-%04.4d.dcm"); >>>>>>>> // Set the directory to write the files into. >>>>>>>> dicom_writer->SetFilePrefix(path.toStdString().c_str()); >>>>>>>> // Write the file. >>>>>>>> dicom_writer->Write(); >>>>>>>> >>>>>>>> Sorry, the use of an unsigned short type was a carreless mistake. >>>>>>>> The result is better with unsigned char, >>>>>>>> but I still see just one image of the serie on 3D Slicer. Is there >>>>>>>> something missing to have a complete serie ? >>>>>>>> >>>>>>>> I didn't know the vtkImageImport and I'll give it a try. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Eddy >>>>>>>> >>>>>>>> >>>>>>>> 2017-01-24 15:41 GMT+01:00 David Gobbi : >>>>>>>> >>>>>>>>> Hi Eddy, >>>>>>>>> >>>>>>>>> Can you provide the code that you used to write the image with >>>>>>>>> vtkDICOMWriter? Here is an example: >>>>>>>>> http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html >>>>>>>>> >>>>>>>>> Creating an image with a loop that calls GetScalarPointer() for >>>>>>>>> every pixel is not very efficient, and casting to a "char *" when the data >>>>>>>>> is "unsigned short" is wrong: you are setting only 8 bits of each 16-bit >>>>>>>>> pixel, while leaving the other 8 bits uninitialized. The vtkImageImport >>>>>>>>> filter is a better way of generating image data: >>>>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport >>>>>>>>> >>>>>>>>> - David >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> I'd like to use the vtkDICOMWriter class to convert a vtkImage to >>>>>>>>>> a set of DICOM images. >>>>>>>>>> >>>>>>>>>> I've compile VTK with the vtkDICOM module enabled and followed >>>>>>>>>> the example from the pdf found on the github repository ( >>>>>>>>>> http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> The image data is created like this : >>>>>>>>>> >>>>>>>>>> auto img = vtkSmartPointer < vtkImageData >::New(); >>>>>>>>>> img->SetOrigin(0, 0, 0); >>>>>>>>>> img->SetDimensions(1024, 1024, numlayer); >>>>>>>>>> img->SetSpacing(1, 1, 1); >>>>>>>>>> img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); >>>>>>>>>> >>>>>>>>>> and the data filled like this : >>>>>>>>>> >>>>>>>>>> for (int n = 0; x < numlayer; n++) { >>>>>>>>>> for (int x = 0; x < 1024; x++) { >>>>>>>>>> for (int y = 0; y < 1024; y++) { >>>>>>>>>> char* pixel = >>>>>>>>>> static_cast(img->GetScalarPointer(x, y, n)); >>>>>>>>>> pixel[0] = values[x][y]; >>>>>>>>>> } >>>>>>>>>> >>>>>>>>>> I can load the converted result with paraview without problems. >>>>>>>>>> But with 3D Slicer, I can just load the first file of the serie >>>>>>>>>> and it display a blank image. >>>>>>>>>> >>>>>>>>>> What do I have to do to be able to load the images with both >>>>>>>>>> application ? >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> >>>>>>>>>> Eddy >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alvaro.sanchez at kitware.com Fri Jan 27 10:39:30 2017 From: alvaro.sanchez at kitware.com (Alvaro Sanchez) Date: Fri, 27 Jan 2017 10:39:30 -0500 Subject: [vtkusers] Distortions in Volumerendering in VR-Mode (HTC Vive) In-Reply-To: References: <1481128708774-5741457.post@n5.nabble.com> Message-ID: I merged a branch that should fix some of the clipping/flickering issues with volume rendering. https://gitlab.kitware.com/vtk/vtk/merge_requests/2394 On Tue, Jan 10, 2017 at 1:31 PM, Ken Martin wrote: > I'm working on a Volume Rendering VR example right now so I'll see if I > bump into the same issue. > > On Thu, Dec 8, 2016 at 8:40 AM, Sebastian Heerwald > wrote: > >> Hey, >> >> >> Thank you for your reply. >> >> I have build a little program which only loads a volume dataset and >> displays it within the RenderWindow. >> >> Since the OpenVR interface is a little bit hackish within VTK the only >> thing that decides whether it renders for OpenVR or for normal 2D-Display >> is whether we link against vtkOpenVR and vtkRenderingOpenVR modules or not. >> >> Everything code related is the same. >> >> >> So to reply to your Question: >> >> > Could you try rendering a volume with an identity matrix set as its >> transformation? >> >> >> I've build this simple program and it only places a volume dataset within >> the world without any transformation. The volume is directly given to the GPUVolumeRCMapper >> without any transformation. In "2D"-Renderwindow everything is fine. >> Also in anaglyph rendering I get a nice 3D View. >> >> But when I link against OpenVR module the view dependend distortions >> appear within VR. I've tried some things. >> >> All I can say is, that the errors appear if I look at any edge or corner >> of the surrounding (invisible) boundingbox around the rendered volume. If I >> look directly on one side of the boundingbox everything seems fine. >> >> >> The only thing I can imagine from this perspective is, that the GPUVolumeRCMapper >> gets wrong view directions for the eyes. But the vtkOpenVRCamera objects >> seems to do everything right. >> >> >> I don't know how to adjust the clipping box / bounding box you mentioned. >> Can you explain how I can do this, maybe this helps me to debug further? >> >> >> Sincerely, >> >> Sebastian >> >> ------------------------------ >> *Von:* vtkusers im Auftrag von Alvaro Sanchez >> >> *Gesendet:* Mittwoch, 7. Dezember 2016 18:14 >> *An:* polybos >> *Cc:* VTK Users >> *Betreff:* Re: [vtkusers] Distortions in Volumerendering in VR-Mode (HTC >> Vive) >> >> Hi, >> >> I have never tested the GPUVolumeRCMapper with OpenVR but as far as I >> remember Ken mentioned some time ago that he encountered a clipping/bbox >> related issue when adjusting the volume's orientation and position. Could >> you try rendering a volume with an identity matrix set as its >> transformation?, this might give you a hint of what the mapper is doing >> wrong. >> >> Cheers, >> Alvaro >> >> On Wed, Dec 7, 2016 at 11:38 AM, polybos wrote: >> >>> Sebastian Heerwald wrote >>> > If I look onto the volume rendering and move around it, there appear >>> > "refraction" lines. >>> >>> Unfortunately I cannot help with this issue but I would also be very >>> pleased >>> if someone could help here. Or did you, Sebastian, already achieve some >>> more >>> insights into this problem? >>> I also get such distortions on the HTC Vive when using >>> vtkVolumeRayCastMapper, while everything seems perfectly well in a >>> mesh-only >>> rendering. >>> >>> Does anyone have similar issues? Maybe with Occulus Rift? As far as I >>> understand Sebastian just test with a HTC Vive. At least I can only test >>> with a HTC Vive. >>> >>> >>> >>> -- >>> View this message in context: http://vtk.1045678.n5.nabble.c >>> om/Distortions-in-Volumerendering-in-VR-Mode-HTC-Vive-tp5741 >>> 338p5741457.html >>> Sent from the VTK - Users mailing list archive at Nabble.com. >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >> >> >> >> -- >> Alvaro Sanchez >> Kitware, Inc. >> Senior R&D Engineer >> 21 Corporate Drive >> Clifton Park, NY 12065-8662 >> Phone: 518-881-4901 <(518)%20881-4901> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 <(518)%20371-3971> > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Alvaro Sanchez Kitware, Inc. Senior R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4901 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Jan 27 11:02:02 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 27 Jan 2017 09:02:02 -0700 Subject: [vtkusers] Problem using vtkDicomWriter In-Reply-To: References: Message-ID: Hi Eddy, Thanks for tracking this down, I'm adding this change to vtk-dicom. - David On Fri, Jan 27, 2017 at 6:31 AM, Eddy Cappeau wrote: > Hi David, > > I've patched my vtk 7.1 source and recompile and that's working. I can > load my dicom directory in Slicer without problems now. > > I've surely faced a corner case, but after reading the documentation ( > https://msdn.microsoft.com/en-us/library/windows/desktop/aa > 379886(v=vs.85).aspx), I think it's maybe safer to use the > CRYPT_VERIFYCONTEXT flag. > > Thanks for your help. > > Eddy > > > 2017-01-27 11:27 GMT+01:00 Eddy Cappeau : > >> Hi David, >> >> For the vtk-dicom I'm using, I've just compile VTK 7.1 with the vtkdicom >> module activated. >> I'm on Windows 7 and compile with visual studio 2013 in 64 bits. >> >> I've tried this : >> >> auto uidg = generator->GetUIDGenerator(); >> >> assert(uidg != nullptr); >> >> auto uid_1 = uidg->GenerateUID(DC::SeriesInstanceUID); >> auto uid_2 = uidg->GenerateUID(DC::SOPInstanceUID); >> auto uid_3 = uidg->GenerateUID(DC::FrameOfReferenceUID); >> >> auto uid_4 = vtkDICOMUtilities::GenerateUID(DC::SeriesInstanceUID); >> auto uid_5 = vtkDICOMUtilities::GenerateUID(DC::SOPInstanceUID); >> auto uid_6 = vtkDICOMUtilities::GenerateUID(DC::FrameOfReferenceUID); >> >> The value returned is always : "2.25.302240678275694148452352" >> >> After some investiations, I found a problem with the >> vtkGenerateRandomBytes function in vtkDICOMUIDGenerator.cxx. >> The error returned by CryptAcquireContext in my case is NTE_BAD_KEY_STATE. >> So the CryptGenRandom function is never called a the buffer is filled >> with zeros. >> >> I copied the function for debug purpose and used the fix proposed at the >> end of this thread : >> >> http://stackoverflow.com/questions/29996467/cryptacquirecont >> ext-fails-with-return-code-0x8009000b-nte-bad-key-state-but >> >> And that did the trick it seems. >> >> For testing the solution, how can I patch my vtk-dicom sources ? >> is it enough to edit de source directly in VTK-7.1.0\Remote\vtkDICOM\Source >> and rebuild VTK ? >> >> Thanks, >> >> Eddy >> >> 2017-01-26 17:23 GMT+01:00 David Gobbi : >> >>> Hi Eddy, >>> >>> The SOPInstanceUID must be different for each image (and the other two >>> UIDs shouldn't be the same as the SeriesInstanceUID, either). >>> >>> What version of vtk-dicom are you using, and what operating system? I >>> can check on my end to make sure that the random numbers for the UUIDs are >>> being properly generated. I use CryptGenRandom() on Windows and >>> /dev/urandom on UNIX/Linux. >>> >>> - David >>> >>> On Thu, Jan 26, 2017 at 9:05 AM, Eddy Cappeau wrote: >>> >>>> Hi David, >>>> >>>> When I load the DICOM directory, Slicer tells me that there's only one >>>> serie. >>>> Each image have the same SeriesInstanceUID. >>>> >>>> I don't know if it's normal but the SeriesInstanceUID is also used for >>>> the SOPInstanceUID, the StudyInstanceUID and the FrameOfReferenceUID. >>>> >>>> I've made a screenshot of the Slicer metadata browser here : >>>> >>>> https://framapic.org/t3tTt1RHhlWP/XhHP9dQ2Nz8s.png >>>> >>>> >>>> Eddy >>>> >>>> >>>> 2017-01-26 15:43 GMT+01:00 David Gobbi : >>>> >>>>> Hi Eddy, >>>>> >>>>> In Slicer's DICOM browser, does it show all of the images as belonging >>>>> to the same series? I'm wondering if, perhaps, each image has a different >>>>> SeriesInstanceUID. That would definitely cause problems with loading into >>>>> a "dicom aware" program like Slicer, but ParaView probably wouldn't care. >>>>> >>>>> - David >>>>> >>>>> On Thu, Jan 26, 2017 at 7:30 AM, Eddy Cappeau >>>>> wrote: >>>>> >>>>>> Hi Andras, >>>>>> >>>>>> I didn't manage to load un single image before. >>>>>> >>>>>> Thank you for the tip. >>>>>> >>>>>> Eddy >>>>>> >>>>>> 2017-01-26 15:28 GMT+01:00 Eddy Cappeau : >>>>>> >>>>>>> Hello David, >>>>>>> >>>>>>> I used the vtkDICOMMRGenerator filter, unsigned short instead of >>>>>>> unsigned char and add this line : >>>>>>> >>>>>>> meta->SetAttributeValue(DC::SpacingBetweenSlices, "1"); >>>>>>> >>>>>>> The BitsAllocated has now a value of 16 but I've got the same result. >>>>>>> >>>>>>> Thanks to the tips given by Andras, I've opened each slice >>>>>>> individually and they seems correct. >>>>>>> >>>>>>> There's definitly something wrong in my files, but I don't see why. >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> Eddy >>>>>>> >>>>>>> 2017-01-25 14:35 GMT+01:00 David Gobbi : >>>>>>> >>>>>>>> Hi Eddy, >>>>>>>> >>>>>>>> The code is using a vtkDICOMCTGenerator to write an MR image, which >>>>>>>> is definitely wrong. Use the vtkDICOMMRGenerator, and make sure the meta >>>>>>>> data matches the IOD: http://dicom.nema.org/med >>>>>>>> ical/dicom/current/output/chtml/part03/sect_C.8.3.html >>>>>>>> >>>>>>>> The standard says that BitsAllocated must be 16 for MR images, >>>>>>>> therefore an 8-bit MR image is non-standard and DICOM software may to >>>>>>>> refuse to display it. You should convert your data to 16-bit (In fact, it >>>>>>>> seems fishy that you are working with unsigned char, since if you are >>>>>>>> writing a reformat of an MR image, then wasn't the original MR image a >>>>>>>> 16-bit image?) >>>>>>>> >>>>>>>> I can't answer about why Slicer is only showing one slice, as I >>>>>>>> don't currently have Slicer installed. >>>>>>>> >>>>>>>> - David >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Jan 25, 2017 at 1:57 AM, Eddy Cappeau >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi David, >>>>>>>>> >>>>>>>>> Here's the code below. This is almost the example of the api doc : >>>>>>>>> >>>>>>>>> auto generator = vtkSmartPointer ::New(); >>>>>>>>> vtkSmartPointer meta = vtkSmartPointer >>>>>>>>> ::New(); >>>>>>>>> >>>>>>>>> meta->SetAttributeValue(DC::PatientName, "Test"); >>>>>>>>> meta->SetAttributeValue(DC::PatientID, "0000001"); >>>>>>>>> meta->SetAttributeValue(DC::ScanOptions, ""); >>>>>>>>> meta->SetAttributeValue(DC::ScanningSequence, "GR"); >>>>>>>>> meta->SetAttributeValue(DC::SequenceVariant, "SP"); >>>>>>>>> meta->SetAttributeValue(DC::ScanOptions, ""); >>>>>>>>> meta->SetAttributeValue(DC::MRAcquisitionType, "2D"); >>>>>>>>> >>>>>>>>> vtkSmartPointer dicom_writer = >>>>>>>>> vtkSmartPointer ::New(); >>>>>>>>> dicom_writer->SetInputData(img); >>>>>>>>> dicom_writer->SetMetaData(meta); >>>>>>>>> dicom_writer->SetGenerator(generator); >>>>>>>>> dicom_writer->SetSeriesDescription("Sagittal Multi-planar >>>>>>>>> Reformat"); >>>>>>>>> >>>>>>>>> // Set the output filename format as a printf-style string. >>>>>>>>> dicom_writer->SetFilePattern("%s/IM-0001-%04.4d.dcm"); >>>>>>>>> // Set the directory to write the files into. >>>>>>>>> dicom_writer->SetFilePrefix(path.toStdString().c_str()); >>>>>>>>> // Write the file. >>>>>>>>> dicom_writer->Write(); >>>>>>>>> >>>>>>>>> Sorry, the use of an unsigned short type was a carreless mistake. >>>>>>>>> The result is better with unsigned char, >>>>>>>>> but I still see just one image of the serie on 3D Slicer. Is there >>>>>>>>> something missing to have a complete serie ? >>>>>>>>> >>>>>>>>> I didn't know the vtkImageImport and I'll give it a try. >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> >>>>>>>>> Eddy >>>>>>>>> >>>>>>>>> >>>>>>>>> 2017-01-24 15:41 GMT+01:00 David Gobbi : >>>>>>>>> >>>>>>>>>> Hi Eddy, >>>>>>>>>> >>>>>>>>>> Can you provide the code that you used to write the image with >>>>>>>>>> vtkDICOMWriter? Here is an example: >>>>>>>>>> http://dgobbi.github.io/vtk-dicom/doc/api/image_writer.html >>>>>>>>>> >>>>>>>>>> Creating an image with a loop that calls GetScalarPointer() for >>>>>>>>>> every pixel is not very efficient, and casting to a "char *" when the data >>>>>>>>>> is "unsigned short" is wrong: you are setting only 8 bits of each 16-bit >>>>>>>>>> pixel, while leaving the other 8 bits uninitialized. The vtkImageImport >>>>>>>>>> filter is a better way of generating image data: >>>>>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageImport >>>>>>>>>> >>>>>>>>>> - David >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Tue, Jan 24, 2017 at 2:51 AM, Eddy Cappeau >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> I'd like to use the vtkDICOMWriter class to convert a vtkImage >>>>>>>>>>> to a set of DICOM images. >>>>>>>>>>> >>>>>>>>>>> I've compile VTK with the vtkDICOM module enabled and followed >>>>>>>>>>> the example from the pdf found on the github repository ( >>>>>>>>>>> http://dgobbi.github.io/vtk-dicom/doc/vtk-dicom.pdf). >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> The image data is created like this : >>>>>>>>>>> >>>>>>>>>>> auto img = vtkSmartPointer < vtkImageData >::New(); >>>>>>>>>>> img->SetOrigin(0, 0, 0); >>>>>>>>>>> img->SetDimensions(1024, 1024, numlayer); >>>>>>>>>>> img->SetSpacing(1, 1, 1); >>>>>>>>>>> img->AllocateScalars(VTK_UNSIGNED_SHORT, 1); >>>>>>>>>>> >>>>>>>>>>> and the data filled like this : >>>>>>>>>>> >>>>>>>>>>> for (int n = 0; x < numlayer; n++) { >>>>>>>>>>> for (int x = 0; x < 1024; x++) { >>>>>>>>>>> for (int y = 0; y < 1024; y++) { >>>>>>>>>>> char* pixel = >>>>>>>>>>> static_cast(img->GetScalarPointer(x, y, n)); >>>>>>>>>>> pixel[0] = values[x][y]; >>>>>>>>>>> } >>>>>>>>>>> >>>>>>>>>>> I can load the converted result with paraview without problems. >>>>>>>>>>> But with 3D Slicer, I can just load the first file of the serie >>>>>>>>>>> and it display a blank image. >>>>>>>>>>> >>>>>>>>>>> What do I have to do to be able to load the images with both >>>>>>>>>>> application ? >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> >>>>>>>>>>> Eddy >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nour_sn at hotmail.fr Fri Jan 27 14:15:33 2017 From: nour_sn at hotmail.fr (jaki19) Date: Fri, 27 Jan 2017 12:15:33 -0700 (MST) Subject: [vtkusers] Can I generate DRR image from DICOM slices series using vtk?? Message-ID: <1485544533819-5741974.post@n5.nabble.com> Hallo, I want to generate DRR from DICOM slices but I don't know if there are frameworks in vtk for that purpose? Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Can-I-generate-DRR-image-from-DICOM-slices-series-using-vtk-tp5741974.html Sent from the VTK - Users mailing list archive at Nabble.com. From peer9802 at gmail.com Sat Jan 28 18:21:56 2017 From: peer9802 at gmail.com (Eric Petersen) Date: Sat, 28 Jan 2017 17:21:56 -0600 Subject: [vtkusers] Struggling with ColorCellsWithRGB example and Python Message-ID: Hello, I'm relatively new to VTK and I'm running into an issue with a VTK example and Python (running VTK 6 and Python 3.6 on Win7 x64). I've got an STL file where I want to set certain cells to a given color. I've got the cell IDs (through ray casting) and colors using a colormap from matplotlib. >From what I can tell, the ColorCellsWithRGB example should allow me to set certain triangles to a given color. My current issue is the mesh is rendering black given the below code. If I comment out the 'InsertTuples" line and uncomment the "InsertNextTuple3" line, triangles are represented different colors; however, it's random and looks like a kaleidoscope when it should be monochromatic. FWIW, my STL images render fine when not using the SetScalars command. Can someone give me pointers on what I can look at next so that I can achieve my goals?*.* class Mesh: def __init__(self): self.MeshData = None self.__OldMeshData = None self.FileName = None self.Name = None def LoadSTL(self, filenameSTL): readerSTL = vtk.vtkSTLReader() readerSTL.SetFileName(filenameSTL) # 'update' the reader i.e. read the .stl file readerSTL.Update() polydata = readerSTL.GetOutput() # If there are no points in 'vtkPolyData' something went wrong if polydata.GetNumberOfPoints() == 0: raise ValueError( "No point data could be loaded from '" + filenameSTL) return None self.MeshData = polydata self.FileName = filenameSTL self.Name = self.FileName return polydata cellData = vtk.vtkUnsignedCharArray() cellData.SetNumberOfComponents(3) cellData.SetNumberOfTuples(laa.MeshData.GetNumberOfCells()) cellData.SetName('Colors') for i in range(0,laa.MeshData.GetNumberOfCells()): cellData.InsertTuple(i,(.5,.5,.5)) #cellData.InsertNextTuple3(.5,.5,.5) laa.MeshData.GetCellData().SetScalars(cellData) laa.MeshData.Modified() mapper = vtk.vtkPolyDataMapper() mapper.SetInputData(laa.MeshData) actor = vtk.vtkActor() actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderWindow = vtk.vtkRenderWindow() renderWindow.AddRenderer(renderer) renderWindowInteractor = vtk.vtkRenderWindowInteractor() renderWindowInteractor.SetRenderWindow(renderWindow) renderWindowInteractor.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) renderer.AddActor(actor) renderer.SetBackground((1,1,1)) renderWindow.Render() renderWindowInteractor.Start #ren.ShowWindow() -------------- next part -------------- An HTML attachment was scrubbed... URL: From peer9802 at gmail.com Sat Jan 28 18:53:05 2017 From: peer9802 at gmail.com (Eric) Date: Sat, 28 Jan 2017 16:53:05 -0700 (MST) Subject: [vtkusers] Struggling with ColorCellsWithRGB example and Python In-Reply-To: References: Message-ID: <1485647585562-5741976.post@n5.nabble.com> Sorry about this. I've been staring at code all day where color values are scaled between 0 and 1. After three hours of banging my head, I've realized color values, for this function, are scaled between 0 and 255. Dumb mistake. -- View this message in context: http://vtk.1045678.n5.nabble.com/Struggling-with-ColorCellsWithRGB-example-and-Python-tp5741975p5741976.html Sent from the VTK - Users mailing list archive at Nabble.com. From leonid_dulman at yahoo.co.uk Sun Jan 29 00:45:10 2017 From: leonid_dulman at yahoo.co.uk (Leonid Dulman) Date: Sun, 29 Jan 2017 05:45:10 +0000 (UTC) Subject: [vtkusers] QTADA 5.8.0 References: <1750916367.78765.1485668710209.ref@mail.yahoo.com> Message-ID: <1750916367.78765.1485668710209@mail.yahoo.com> Announce : Qt5Ada version 5.8.0 (539 packages) ?release 01/02/2017 free edition Qt5Ada is Ada-2012 port to Qt5 framework (based on Qt 5.8.0 final)Qt5ada version 5.8.0 open source and qt5c.dll,libqt5c.so(x64) built with Microsoft Visual Studio 2015 in Windows, gcc x86-64 in Linux.Package tested with gnat gpl 2012 ada compiler in Windows 32bit and 64bit , Linix x86,Linux x86-64 Debian 8.5 It supports GUI, SQL, Multimedia, Web, Network, Touch devices, Sensors,Bluetooth, Navigation and many others thinks. Changes for new Qt5Ada release :Added ?packages for modules :QWinExtracs,QTextToSpeech,QGamepad,QHelp ,QScxml,QtChart modules supportAdded new ?demos.Added easy way to use Qt resource files (qrc) My configuration script to build Qt 5.8.0 is: configure -opensource -release -nomake tests -opengl dynamic -qt-zlib -qt-libpng -qt-libjpeg -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -plugin-sql-mysql -plugin-sql-odbc -plugin-sql-oci -icu -prefix "e:/Qt/5.8"? As a role ADA is used in embedded systems, but with ?QTADA(+VTKADA) you can build any desktop applications with?powerful 2D/3D rendering and imaging (games, animations, emulations) GUI, Database connection, server/client, Internet browsing , Modbus control and many others thinks. Qt5Ada and VTKAda for Windows, Linux (Unix) is available fromhttps://drive.google.com/folderview?id=0B2QuZLoe-yiPbmNQRl83M1dTRVE&usp=sharing (google drive. It can be mounted as virtual drive or directory or viewed with Web Browser)? The full list of released classes is in "Qt5 classes to Qt5Ada packages relation table.docx"?VTKAda version 7.1.0 is based on VTK 7.1.0 (OpenGL2) is fully compatible with Qt5Ada 5.8.0 I hope Qt5Ada and VTKAda will be useful for students, engineers, scientists and enthusiastsWith Qt5Ada you can build any applications and solve any problems easy and quickly. If you have any problems or questions, tell me know. Leonid -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmerkow at gmail.com Sun Jan 29 14:37:36 2017 From: jmerkow at gmail.com (jmerkow) Date: Sun, 29 Jan 2017 12:37:36 -0700 (MST) Subject: [vtkusers] Faster way to create a vtkImageData with a single value Message-ID: <1485718656726-5741978.post@n5.nabble.com> Hello, I am working in creating volume images from PolyData using vtkPolyDataToImageStencil and vtkImageStencil. The process is outline here:[1] (for 2D images). To do this, you need to fill a vtkImageData with a background (or foreground) value. Something like this: imgvtk = vtk.vtkImageData() imgvtk.SetSpacing(spacing) imgvtk.SetOrigin(origin) imgvtk.SetExtent(extent) imgvtk.AllocateScalars(vtk.VTK_UNSIGNED_CHAR, 1) # fill vtk image with background count = imgvtk.GetNumberOfPoints() for i in range(count): imgvtk.GetPointData().GetScalars().SetTuple1(i, backgroud_value); However, this is very very slow, by far the slowest part of the process. Is there a faster way to do this? Full code: import vtk from vtk.util import numpy_support def pd_to_numpy_vol(pd, spacing=[1.,1.,1.], shape=None, origin=None foreground_value=255, backgroud_value = 0): if shape is None: bnds = np.array(pd.GetBounds()) shape = np.ceil((bnds[1::2]-bnds[::2])/spacing).astype(int)+15 if origin is None: origin = bnds[::2]+(bnds[1::2]-bnds[::2])/2 #make image extent = np.zeros(6).astype(int) extent[1::2] = np.array(shape)-1 imgvtk = vtk.vtkImageData() imgvtk.SetSpacing(spacing) imgvtk.SetOrigin(origin) imgvtk.SetExtent(extent) imgvtk.AllocateScalars(vtk.VTK_UNSIGNED_CHAR, 1) # fill vtk image with background count = imgvtk.GetNumberOfPoints() for i in range(count): imgvtk.GetPointData().GetScalars().SetTuple1(i, backgroud_value); #poly2 stencil pol2stenc = vtk.vtkPolyDataToImageStencil() pol2stenc.SetInputData(pd) pol2stenc.SetOutputSpacing(spacing) pol2stenc.SetOutputOrigin(origin) pol2stenc.SetOutputWholeExtent(extent) pol2stenc.Update() #stencil to image imgstenc = vtk.vtkImageStencil() imgstenc.SetInputData(imgvtk) imgstenc.SetStencilConnection(pol2stenc.GetOutputPort()) imgstenc.ReverseStencilOn() imgstenc.SetBackgroundValue(foreground_value) imgstenc.Update() ndseg = numpy_support.vtk_to_numpy(imgstenc.GetOutputDataObject(0).GetPointData().GetArray(0)) return ndseg.reshape(sitk.GetArrayFromImage(seg).shape) -- View this message in context: http://vtk.1045678.n5.nabble.com/Faster-way-to-create-a-vtkImageData-with-a-single-value-tp5741978.html Sent from the VTK - Users mailing list archive at Nabble.com. From sujin.philip at kitware.com Mon Jan 30 09:30:37 2017 From: sujin.philip at kitware.com (Sujin Philip) Date: Mon, 30 Jan 2017 09:30:37 -0500 Subject: [vtkusers] Faster way to create a vtkImageData with a single value In-Reply-To: <1485718656726-5741978.post@n5.nabble.com> References: <1485718656726-5741978.post@n5.nabble.com> Message-ID: Hi, A much faster way would be to replace the for loop with this: imgvtk.GetPointData().GetScalars().Filll(background_value) -Sujin On Sun, Jan 29, 2017 at 2:37 PM, jmerkow wrote: > Hello, > > I am working in creating volume images from PolyData using > vtkPolyDataToImageStencil and vtkImageStencil. > The process is outline here:[1] (for 2D images). > To do this, you need to fill a vtkImageData with a background (or > foreground) value. > Something like this: > > imgvtk = vtk.vtkImageData() > imgvtk.SetSpacing(spacing) > imgvtk.SetOrigin(origin) > imgvtk.SetExtent(extent) > imgvtk.AllocateScalars(vtk.VTK_UNSIGNED_CHAR, 1) > > # fill vtk image with background > count = imgvtk.GetNumberOfPoints() > for i in range(count): > imgvtk.GetPointData().GetScalars().SetTuple1(i, backgroud_value); > > > However, this is very very slow, by far the slowest part of the process. > Is > there a faster way to do this? > > > Full code: > import vtk > from vtk.util import numpy_support > > def pd_to_numpy_vol(pd, spacing=[1.,1.,1.], shape=None, origin=None > foreground_value=255, backgroud_value = 0): > if shape is None: > bnds = np.array(pd.GetBounds()) > shape = np.ceil((bnds[1::2]-bnds[::2])/spacing).astype(int)+15 > if origin is None: > origin = bnds[::2]+(bnds[1::2]-bnds[::2])/2 > > #make image > extent = np.zeros(6).astype(int) > extent[1::2] = np.array(shape)-1 > imgvtk = vtk.vtkImageData() > imgvtk.SetSpacing(spacing) > imgvtk.SetOrigin(origin) > imgvtk.SetExtent(extent) > imgvtk.AllocateScalars(vtk.VTK_UNSIGNED_CHAR, 1) > > # fill vtk image with background > count = imgvtk.GetNumberOfPoints() > for i in range(count): > imgvtk.GetPointData().GetScalars().SetTuple1(i, backgroud_value); > > #poly2 stencil > pol2stenc = vtk.vtkPolyDataToImageStencil() > pol2stenc.SetInputData(pd) > pol2stenc.SetOutputSpacing(spacing) > pol2stenc.SetOutputOrigin(origin) > pol2stenc.SetOutputWholeExtent(extent) > pol2stenc.Update() > > #stencil to image > imgstenc = vtk.vtkImageStencil() > imgstenc.SetInputData(imgvtk) > imgstenc.SetStencilConnection(pol2stenc.GetOutputPort()) > imgstenc.ReverseStencilOn() > imgstenc.SetBackgroundValue(foreground_value) > imgstenc.Update() > > ndseg = > numpy_support.vtk_to_numpy(imgstenc.GetOutputDataObject( > 0).GetPointData().GetArray(0)) > return ndseg.reshape(sitk.GetArrayFromImage(seg).shape) > > > > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble. > com/Faster-way-to-create-a-vtkImageData-with-a-single-value-tp5741978.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Mon Jan 30 10:00:09 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 30 Jan 2017 15:00:09 +0000 Subject: [vtkusers] vtkImageReslice and slab mode Message-ID: Hi David, I am looking at the vtkImageReslice class to reformat a vtkImageData, specifically at the slab operations to generate thick slices. When I set SlabNumberOfSlices to be greater than 1 and SlabSliceSpacingFraction = 1, I?d expect the output dimensions along the reslice direction to be less than the input dimensions. But, they come out to be the same. What am I missing here? Thank you! Sankhesh ? -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From renaud.lebrun at umontpellier.fr Mon Jan 30 10:14:06 2017 From: renaud.lebrun at umontpellier.fr (Renaud Lebrun) Date: Mon, 30 Jan 2017 16:14:06 +0100 Subject: [vtkusers] Anaglyph rendering of vtkCaptionActor2D In-Reply-To: <2b6c9c2c-42a4-6e67-0e00-2a6b13be94dd@umontpellier.fr> References: <2b6c9c2c-42a4-6e67-0e00-2a6b13be94dd@umontpellier.fr> Message-ID: <6635e62e-ee3f-d697-56d4-4f77ad5250f7@umontpellier.fr> Dear vtk Users, I write you because I have difficulties to use the anaglyph rendering capabilities of the vtkRenderWindow with vtkCaptionActor2D actors. => on the example shown at http://morphomuseum.com/img/anaglyph.jpg , I have managed to render without any problem anaglyph representations of several vtkActors (1 large yellow structure = a monkey's skull + several red spheres = 3D landmarks). However, the 3D landmark numbers (= vtkCaptionActor2D actors containing the text associated with the red spheres) are drawn in plain red. Many thanks in advance for your help, Best wishes, Renaud. -- Dr Renaud Lebrun Institut des Sciences de l'Evolution, Universit? de Montpellier, Campus Triolet Place Eug?ne Bataillon 34095 Montpellier cedex 5 France Tel: +33 (0)4 67 14 32 60 Email: renaud.lebrun at umontpellier.fr http://morphomuseum.com From david.gobbi at gmail.com Mon Jan 30 11:27:00 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 30 Jan 2017 09:27:00 -0700 Subject: [vtkusers] vtkImageReslice and slab mode In-Reply-To: References: Message-ID: Hi Sankesh, When I wrote this filter, I decided not to reduce the extent. Similarly, if someone uses vtkImageReslice to apply cubic interpolation (which has a kernel size of 4), I don't remove two slices from each of the 6 faces of the volume. Instead, for any kernel-based operation, if any of the kernel samples are outside of the input volume, then the default behavior is to clamp the coordinates of those samples to the bounds of the input (the same as what OpenGL does when you apply CLAMP_TO_EDGE with a texture lookup). The vtkImageInterpolator also provides other methods for handling the boundary. So, in the case you describe, the slab at the boundary will contain repeats of the outer slice. To avoid this, you'd have to explicitly set the OutputExtent yourself, or else override RequestInformation(). It used to be possible to wire such changes into the pipeline easily via the ExecuteInformationEvent. Really, a way to customize RequestInformation() is what is needed here... almost everyone seems to want something different, depending on their particular application, and the API for vtkImageReslice is already waaay to complicated. - David On Mon, Jan 30, 2017 at 8:00 AM, Sankhesh Jhaveri < sankhesh.jhaveri at kitware.com> wrote: > Hi David, > > I am looking at the vtkImageReslice class to reformat a vtkImageData, > specifically at the slab operations to generate thick slices. > > When I set SlabNumberOfSlices to be greater than 1 and SlabSliceSpacingFraction > = 1, I?d expect the output dimensions along the reslice direction to be > less than the input dimensions. But, they come out to be the same. What am > I missing here? > > Thank you! > Sankhesh > ? > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lplavorante at gmail.com Mon Jan 30 13:37:19 2017 From: lplavorante at gmail.com (Luca Pallozzi Lavorante) Date: Mon, 30 Jan 2017 16:37:19 -0200 Subject: [vtkusers] Fixed-size text in 3D : vtkVectorText + vtkFollower or vtkCaptionActor2D? Message-ID: Hi everybody, I am trying to visualize text labels in 3D space. I have successfully used vtkVectorText + vtkFollower. But the text is scaled as I zoom in /out of my 3D objects (geologic wells, the labels are their names). I have seen that there is a vtkCaptionActor2D class which displays a fixed-size text attached to a 3D point. This is almost what I need. The problem is that the text should get occluded by objects nearer to the camera as I rotate them. Apparently, the text generated by vtkCaptionActor2D is drawn on top of everything. Maybe this is a common issue and I have verified on the list that it has been discussed before. Can anybody give me some hint on how to do it? Sorry if I am asking a trivial or recurring question. Thank you in advance, Luca Pallozzi Lavorante -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicoddemus at gmail.com Mon Jan 30 13:44:56 2017 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Mon, 30 Jan 2017 18:44:56 +0000 Subject: [vtkusers] vtkImagePlaneWidget and vtkLookupTable being used partially? Message-ID: Hi everyone, I?ve looked at other emails from the mailing list but have not found anything which explains the problem I?m having. I have a vtkImageData object with scalars set as a vtkUnsignedCharArray ranging from 0 to 1. This volume represents rock porosity, with 0 meaning solid rock and 1 meaning a pore. I?m using 3 vtkImagePlaneWidget instances, each along one axis, to show 3 plane cuts of the rock. I?m trying to use a vtkLookupTable to show solid rock as black, and pore as white: lookup_table = vtk.vtkLookupTable() lookup_table.SetNumberOfTableValues(2) lookup_table.SetTableValue(0, (0., 0., 0., 1.0)) lookup_table.SetTableValue(1, (1., 1., 1., 1.0)) Unfortunately the planes appear as completely black. Changing the color values to other colors (say, first entry red and second entry blue) has no effect on the image. If I change the first table entry?s alpha value to zero though, I can then see the pores of the image as black, which shows that the data is correct and that the lookup table is being used. It seems that it is not using the RGB part of the lookup table somehow. Here?s the relevant part of the code: self._plane_widgets = [] lookup_table = vtk.vtkLookupTable() lookup_table.SetNumberOfTableValues(2) lookup_table.SetTableValue(0, (0., 0., 0., 1.0)) lookup_table.SetTableValue(1, (1., 0., 1., 1.0)) lookup_table.SetTableRange(0., 1.) for plane_name in ['XY', 'XZ', 'YZ']: orientation = vtk_reslice_details.GetVtkPlaneIndexValue(plane_name) slice_data = mpr_representation.slices_data[orientation] plane_widget = vtk.vtkImagePlaneWidget() plane_widget.SetInteractor(vizu.GetInteractor()) plane_widget.GetPlaneProperty().SetColor(slice_data.norm_color) plane_widget.TextureInterpolateOff() plane_widget.TextureVisibilityOn() plane_widget.SetInputData(vtk_image) plane_widget.SetPlaneOrientation(orientation) plane_widget.SetSliceIndex(slice_data.slice_index) plane_widget.UserControlledLookupTableOn() plane_widget.SetLookupTable(lookup_table) plane_widget.SetMiddleButtonAction(vtk.vtkImagePlaneWidget.VTK_CURSOR_ACTION) plane_widget.SetRightButtonAction(vtk.vtkImagePlaneWidget.VTK_CURSOR_ACTION) plane_widget.On() plane_widget.InteractionOn() plane_widget.DisplayTextOn() self._plane_widgets.append(plane_widget) Any helps or tips are greatly appreciated. Cheers, Bruno. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From hjchen.work at gmail.com Mon Jan 30 16:40:59 2017 From: hjchen.work at gmail.com (hchen) Date: Mon, 30 Jan 2017 14:40:59 -0700 (MST) Subject: [vtkusers] Faster way to create a vtkImageData with a single value In-Reply-To: <1485718656726-5741978.post@n5.nabble.com> References: <1485718656726-5741978.post@n5.nabble.com> Message-ID: <1485812459715-5741988.post@n5.nabble.com> it may be faster if you fill the image matrix in Python and then use vtkImageImportFromArray to get it into vtk. it would something like: from vtk.util import vtkImageImportFromArray as viifa a = np.ones( (3, 4, 5), dtype=np.uint8 ) * BackgroundValue ... f = viifa.vtkImageImportFromArray() f.SetArray( a ) f.SetDataOrigin( ... ) f.SetDataSpacing( ... ) f.SetDataExtent( ... ) f.Update() vimg = f.GetOutput() --good luck. Chen -- View this message in context: http://vtk.1045678.n5.nabble.com/Faster-way-to-create-a-vtkImageData-with-a-single-value-tp5741978p5741988.html Sent from the VTK - Users mailing list archive at Nabble.com. From sankhesh.jhaveri at kitware.com Mon Jan 30 17:47:47 2017 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 30 Jan 2017 22:47:47 +0000 Subject: [vtkusers] vtkImageReslice and slab mode In-Reply-To: References: Message-ID: Thanks for the clarification, David. I?ll clip the extents as you suggested. ? On Mon, Jan 30, 2017 at 11:27 AM David Gobbi wrote: > Hi Sankesh, > > When I wrote this filter, I decided not to reduce the extent. Similarly, > if someone uses vtkImageReslice to apply cubic interpolation (which has a > kernel size of 4), I don't remove two slices from each of the 6 faces of > the volume. > > Instead, for any kernel-based operation, if any of the kernel samples are > outside of the input volume, then the default behavior is to clamp the > coordinates of those samples to the bounds of the input (the same as what > OpenGL does when you apply CLAMP_TO_EDGE with a texture lookup). The > vtkImageInterpolator also provides other methods for handling the boundary. > > So, in the case you describe, the slab at the boundary will contain > repeats of the outer slice. To avoid this, you'd have to explicitly set > the OutputExtent yourself, or else override RequestInformation(). It used > to be possible to wire such changes into the pipeline easily via the > ExecuteInformationEvent. > > Really, a way to customize RequestInformation() is what is needed here... > almost everyone seems to want something different, depending on their > particular application, and the API for vtkImageReslice is already waaay to > complicated. > > - David > > > On Mon, Jan 30, 2017 at 8:00 AM, Sankhesh Jhaveri < > sankhesh.jhaveri at kitware.com> wrote: > > Hi David, > > I am looking at the vtkImageReslice class to reformat a vtkImageData, > specifically at the slab operations to generate thick slices. > > When I set SlabNumberOfSlices to be greater than 1 and SlabSliceSpacingFraction > = 1, I?d expect the output dimensions along the reslice direction to be > less than the input dimensions. But, they come out to be the same. What am > I missing here? > > Thank you! > Sankhesh > ? > -- > Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware > | (518) 881-4417 > ? > > > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jojotranel at hotmail.com Tue Jan 31 03:28:40 2017 From: jojotranel at hotmail.com (Jojobus) Date: Tue, 31 Jan 2017 01:28:40 -0700 (MST) Subject: [vtkusers] Superpose two vtkImageData with ResliceImageViewer In-Reply-To: <1485529488387-5741971.post@n5.nabble.com> References: <1485529488387-5741971.post@n5.nabble.com> Message-ID: <1485851320424-5741990.post@n5.nabble.com> Hello, I copy my former message in order to be broadcast in the mailing list :): I am trying to superpose two vtkImageDatas; one greyscale (DICOM) and another that is coloured (the dose-map). The dose map is mostly zero, and using vtkLookUpTable, I used LUT.SetTableValue(0, 0./255., 0./255., 0./255.,0) so that those voxels are transparent. The goal is to show the DICOM and place the dose-map over the top (but with transparent voxels where the dose is zero). I use vtkResliceImageViewer to visualise the vtkImageData because I am using python. I can visualise both the DICOM and the dose-map separately, but I can't superpose the two. Using the code attached at the end of this post opens two render windows with strange interactions (scrolling on one window moves through slices of the second render window). I imagine my problem comes from reusing the same interactor for two different vtkResliceImageViewers. Any ideas? Thanks in advance. # Create render window and interactor renWin = vtk.vtkRenderWindow() iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # Read DICOM directory = vtkDICOMPython.vtkDICOMDirectory() directory.SetDirectoryName(PathDicom) directory.Update() readerDICOM = vtkDICOMPython.vtkDICOMReader() readerDICOM.SetFileNames(directory.GetFileNamesForSeries(0)) readerDICOM.Update() # Read dose readerDose = vtk.vtkMetaImageReader() readerDose.SetFileName("/home/jonathan/Bureau/DICOMcochon/mhd/holmium.mhd") readerDose.Update() # Visualise DICOM StackViewerDICOM=vtk.vtkResliceImageViewer() StackViewerDICOM.SetInputData(readerDICOM.GetOutput()) StackViewerDICOM.SetupInteractor(iren) StackViewerDICOM.SetSliceOrientation(2) #Sur 0 ou 1: vue sagittale ou coronale # Visualise dose StackViewerDose=vtk.vtkResliceImageViewer() StackViewerDose.SetInputData(readerDose.GetOutput()) StackViewerDose.SetupInteractor(iren) StackViewerDose.SetSliceOrientation(2) #Sur 0 ou 1: vue sagittale ou coronale # Start interactor iren.Initialize() iren.Start() -- View this message in context: http://vtk.1045678.n5.nabble.com/Superpose-two-vtkImageData-with-ResliceImageViewer-tp5741971p5741990.html Sent from the VTK - Users mailing list archive at Nabble.com. From andrew2.hart at gmail.com Tue Jan 31 04:18:10 2017 From: andrew2.hart at gmail.com (andrew2hart .) Date: Tue, 31 Jan 2017 09:18:10 +0000 Subject: [vtkusers] Build VTK-7.1.0 with both python 2 and python 3 wrappers Message-ID: Is there a recommended way to build VTK-7.1.0 with both python 2 and python 3 wrappers? I am currently doing cmake -DCMAKE_POSITION_INDEPENDENT_CODE=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/vtk-7.1.0 -DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3.5.1 ../VTK-7.1.0 to get VTK with python 3 wrappers. It works so long as python 3 is built with --enable-shared and MESA_GL_VERSION_OVERRIDE=3.2 is set. -------------- next part -------------- An HTML attachment was scrubbed... URL: From renaud.lebrun at umontpellier.fr Tue Jan 31 04:28:11 2017 From: renaud.lebrun at umontpellier.fr (Renaud Lebrun) Date: Tue, 31 Jan 2017 02:28:11 -0700 (MST) Subject: [vtkusers] Anaglyph rendering of vtkCaptionActor2D In-Reply-To: <6635e62e-ee3f-d697-56d4-4f77ad5250f7@umontpellier.fr> References: <2b6c9c2c-42a4-6e67-0e00-2a6b13be94dd@umontpellier.fr> <6635e62e-ee3f-d697-56d4-4f77ad5250f7@umontpellier.fr> Message-ID: <1485854891670-5741992.post@n5.nabble.com> Sorry, anaglyph rendering of text works as expected provided that the vtkCaptionActor2D's color is not plain red (r=1,g=0,b=0) or plain blue. -- View this message in context: http://vtk.1045678.n5.nabble.com/Picking-composite-hybrid-actors-such-as-vtkAxesActor-tp5741926p5741992.html Sent from the VTK - Users mailing list archive at Nabble.com. From ali.hadimogullari at netcad.com.tr Tue Jan 31 05:41:57 2017 From: ali.hadimogullari at netcad.com.tr (alihadim) Date: Tue, 31 Jan 2017 03:41:57 -0700 (MST) Subject: [vtkusers] VTK Shader using LoadMaterialFromString Message-ID: <1485859317607-5741993.post@n5.nabble.com> I used vtk 5.6.1 version and LoadMaterialFromString method. I took message Shader not compiled. Do you have any idea? I added to using xml file. vtk.vtkProperty prop = (vtk.vtkProperty)prop1; prop.SetShading(1); prop.LoadMaterialFromString(ShaderVtkXML.GetOrganizedShaderXML(ShaderXML)); -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Shader-using-LoadMaterialFromString-tp5741993.html Sent from the VTK - Users mailing list archive at Nabble.com. From tevain at telecom-paristech.fr Tue Jan 31 06:14:46 2017 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Tue, 31 Jan 2017 12:14:46 +0100 (CET) Subject: [vtkusers] Bounds computation of vtkImageData In-Reply-To: <594662632.12191844.1485860474438.JavaMail.zimbra@enst.fr> Message-ID: <766899374.12204896.1485861286413.JavaMail.zimbra@enst.fr> Hello everyone, It may be more a dev issue, but I think there is a small mistake in the ComputeBounds() method of vtkImageData When computing upper bounds, code read (line 781 of vtkImageData.cxx): this->Bounds[1] = origin[0] + (extent[1-swapXBounds] * spacing[0]); this->Bounds[3] = origin[1] + (extent[3-swapYBounds] * spacing[1]); this->Bounds[5] = origin[2] + (extent[5-swapZBounds] * spacing[2]); Since the upper extent is meant to be the index of the last inside point, this leads to upper bounds excluding the upper fringe of data in each direction. So I guess this part should read something like: this->Bounds[1] = origin[0] + ( (extent[1-swapXBounds] + 1) * spacing[0]); this->Bounds[3] = origin[1] + ( (extent[3-swapYBounds] + 1) * spacing[1]); this->Bounds[5] = origin[2] + ( (extent[5-swapZBounds] + 1) * spacing[2]); Am I mistaken ? Tim From sehooi at gmail.com Tue Jan 31 06:43:42 2017 From: sehooi at gmail.com (Sehoon Lee) Date: Tue, 31 Jan 2017 04:43:42 -0700 (MST) Subject: [vtkusers] SetTimeValue() not work in vtkOpenFOAMReader.cxx Message-ID: <1485863022131-5741995.post@n5.nabble.com> Hello! I'm trying to test vtkOpenFOAMReader.cxx(vtk-6.2) with a sample cavity data. I got stuck in changing timestep using SetTimeValue(). The result of the following code shows the timestep is not changed at all. [sehooi at master02 bin]$ test Scalar range: -4.36666, 4.84854 Scalar range: -4.36666, 4.84854 The expected result is Scalar range: -4.36666, 4.84854 Scalar range: -4.36666, *4.84853* Anything wrong in my code? Thanks in advance. vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("/home/sehooi/cavity/cavity.foam"); reader->Update(); reader->SetTimeValue(0.5); reader->ReadZonesOn(); reader->Update(); vtkUnstructuredGrid *block0 = vtkUnstructuredGrid::SafeDownCast(reader->GetOutput()->GetBlock(0)); block0->GetCellData()->SetActiveScalars("p"); std::cout << "Scalar range: " << block0->GetCellData()->GetScalars()->GetRange()[0] << ", " << block0->GetCellData()->GetScalars()->GetRange()[1] << std::endl; reader->SetTimeValue(1.0); reader->ReadZonesOn(); reader->Update(); block0 = vtkUnstructuredGrid::SafeDownCast(reader->GetOutput()->GetBlock(0)); block0->GetCellData()->SetActiveScalars("p"); std::cout << "Scalar range: " << block0->GetCellData()->GetScalars()->GetRange()[0] << ", " << block0->GetCellData()->GetScalars()->GetRange()[1] << std::endl; -- View this message in context: http://vtk.1045678.n5.nabble.com/SetTimeValue-not-work-in-vtkOpenFOAMReader-cxx-tp5741995.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Jan 31 08:16:57 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 31 Jan 2017 06:16:57 -0700 Subject: [vtkusers] Bounds computation of vtkImageData In-Reply-To: <766899374.12204896.1485861286413.JavaMail.zimbra@enst.fr> References: <594662632.12191844.1485860474438.JavaMail.zimbra@enst.fr> <766899374.12204896.1485861286413.JavaMail.zimbra@enst.fr> Message-ID: Hi Tim, The bounds go from the center of the first voxel to the center of the last voxel. So the code in vtkImageData.cxx is correct. - David On Tue, Jan 31, 2017 at 4:14 AM, Timothee Evain wrote: > Hello everyone, > > It may be more a dev issue, but I think there is a small mistake in the > ComputeBounds() method of vtkImageData > When computing upper bounds, code read (line 781 of vtkImageData.cxx): > > this->Bounds[1] = origin[0] + (extent[1-swapXBounds] * spacing[0]); > this->Bounds[3] = origin[1] + (extent[3-swapYBounds] * spacing[1]); > this->Bounds[5] = origin[2] + (extent[5-swapZBounds] * spacing[2]); > > Since the upper extent is meant to be the index of the last inside point, > this leads to upper bounds excluding the upper fringe of data in each > direction. > So I guess this part should read something like: > > this->Bounds[1] = origin[0] + ( (extent[1-swapXBounds] + 1) * spacing[0]); > this->Bounds[3] = origin[1] + ( (extent[3-swapYBounds] + 1) * spacing[1]); > this->Bounds[5] = origin[2] + ( (extent[5-swapZBounds] + 1) * spacing[2]); > > Am I mistaken ? > > Tim > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Tue Jan 31 08:38:44 2017 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Tue, 31 Jan 2017 14:38:44 +0100 (CET) Subject: [vtkusers] Bounds computation of vtkImageData In-Reply-To: References: <594662632.12191844.1485860474438.JavaMail.zimbra@enst.fr> <766899374.12204896.1485861286413.JavaMail.zimbra@enst.fr> Message-ID: <675258709.12405844.1485869924383.JavaMail.zimbra@enst.fr> Oh right, thanks for remembering me that! Does that mean that, if image is displayed, a pick on border of data could return an out-of-bound position value ? Tim ----- Mail original ----- De: "David Gobbi" ?: "Timothee Evain" Cc: "VTK Users" Envoy?: Mardi 31 Janvier 2017 14:16:57 Objet: Re: [vtkusers] Bounds computation of vtkImageData Hi Tim, The bounds go from the center of the first voxel to the center of the last voxel. So the code in vtkImageData.cxx is correct. - David On Tue, Jan 31, 2017 at 4:14 AM, Timothee Evain wrote: > Hello everyone, > > It may be more a dev issue, but I think there is a small mistake in the > ComputeBounds() method of vtkImageData > When computing upper bounds, code read (line 781 of vtkImageData.cxx): > > this->Bounds[1] = origin[0] + (extent[1-swapXBounds] * spacing[0]); > this->Bounds[3] = origin[1] + (extent[3-swapYBounds] * spacing[1]); > this->Bounds[5] = origin[2] + (extent[5-swapZBounds] * spacing[2]); > > Since the upper extent is meant to be the index of the last inside point, > this leads to upper bounds excluding the upper fringe of data in each > direction. > So I guess this part should read something like: > > this->Bounds[1] = origin[0] + ( (extent[1-swapXBounds] + 1) * spacing[0]); > this->Bounds[3] = origin[1] + ( (extent[3-swapYBounds] + 1) * spacing[1]); > this->Bounds[5] = origin[2] + ( (extent[5-swapZBounds] + 1) * spacing[2]); > > Am I mistaken ? > > Tim > From david.gobbi at gmail.com Tue Jan 31 09:13:21 2017 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 31 Jan 2017 07:13:21 -0700 Subject: [vtkusers] Bounds computation of vtkImageData In-Reply-To: <675258709.12405844.1485869924383.JavaMail.zimbra@enst.fr> References: <594662632.12191844.1485860474438.JavaMail.zimbra@enst.fr> <766899374.12204896.1485861286413.JavaMail.zimbra@enst.fr> <675258709.12405844.1485869924383.JavaMail.zimbra@enst.fr> Message-ID: If you use vtkCellPicker, then positions beyond the bounds will not be picked. If you use vtkPropPicker, the pick will be based on what is drawn on the screen, and by default the vtkImageActor and vtkImageSliceMapper only draw the image out to its bounds (but this can be changed by setting the "Border" property of the mapper, which causes the border region to be drawn). - David On Tue, Jan 31, 2017 at 6:38 AM, Timothee Evain wrote: > Oh right, thanks for remembering me that! > Does that mean that, if image is displayed, a pick on border of data could > return an out-of-bound position value ? > > Tim > > ----- Mail original ----- > De: "David Gobbi" > ?: "Timothee Evain" > Cc: "VTK Users" > Envoy?: Mardi 31 Janvier 2017 14:16:57 > Objet: Re: [vtkusers] Bounds computation of vtkImageData > > Hi Tim, > > The bounds go from the center of the first voxel to the center of the last > voxel. So the code in vtkImageData.cxx is correct. > > - David > > On Tue, Jan 31, 2017 at 4:14 AM, Timothee Evain < > tevain at telecom-paristech.fr > > wrote: > > > Hello everyone, > > > > It may be more a dev issue, but I think there is a small mistake in the > > ComputeBounds() method of vtkImageData > > When computing upper bounds, code read (line 781 of vtkImageData.cxx): > > > > this->Bounds[1] = origin[0] + (extent[1-swapXBounds] * spacing[0]); > > this->Bounds[3] = origin[1] + (extent[3-swapYBounds] * spacing[1]); > > this->Bounds[5] = origin[2] + (extent[5-swapZBounds] * spacing[2]); > > > > Since the upper extent is meant to be the index of the last inside point, > > this leads to upper bounds excluding the upper fringe of data in each > > direction. > > So I guess this part should read something like: > > > > this->Bounds[1] = origin[0] + ( (extent[1-swapXBounds] + 1) * > spacing[0]); > > this->Bounds[3] = origin[1] + ( (extent[3-swapYBounds] + 1) * > spacing[1]); > > this->Bounds[5] = origin[2] + ( (extent[5-swapZBounds] + 1) * > spacing[2]); > > > > Am I mistaken ? > > > > Tim > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tevain at telecom-paristech.fr Tue Jan 31 09:54:12 2017 From: tevain at telecom-paristech.fr (Timothee Evain) Date: Tue, 31 Jan 2017 15:54:12 +0100 (CET) Subject: [vtkusers] Bounds computation of vtkImageData In-Reply-To: References: <594662632.12191844.1485860474438.JavaMail.zimbra@enst.fr> <766899374.12204896.1485861286413.JavaMail.zimbra@enst.fr> <675258709.12405844.1485869924383.JavaMail.zimbra@enst.fr> Message-ID: <596232011.12757718.1485874452252.JavaMail.zimbra@enst.fr> Ok, that's a bit clearer for me now. I'm trying to retrieve last voxels indexes of displayed images, through picking world points and the ComputeStructuredCoordinates method. Unfortunately, since the computed continuous index is rounded down, it never returns the last index before going out of bound. I will go with my own function for conversion. Many thanks for the help David! Tim ----- Mail original ----- De: "David Gobbi" ?: "Timothee Evain" Cc: "VTK Users" Envoy?: Mardi 31 Janvier 2017 15:13:21 Objet: Re: [vtkusers] Bounds computation of vtkImageData If you use vtkCellPicker, then positions beyond the bounds will not be picked. If you use vtkPropPicker, the pick will be based on what is drawn on the screen, and by default the vtkImageActor and vtkImageSliceMapper only draw the image out to its bounds (but this can be changed by setting the "Border" property of the mapper, which causes the border region to be drawn). - David On Tue, Jan 31, 2017 at 6:38 AM, Timothee Evain wrote: > Oh right, thanks for remembering me that! > Does that mean that, if image is displayed, a pick on border of data could > return an out-of-bound position value ? > > Tim > > ----- Mail original ----- > De: "David Gobbi" > ?: "Timothee Evain" > Cc: "VTK Users" > Envoy?: Mardi 31 Janvier 2017 14:16:57 > Objet: Re: [vtkusers] Bounds computation of vtkImageData > > Hi Tim, > > The bounds go from the center of the first voxel to the center of the last > voxel. So the code in vtkImageData.cxx is correct. > > - David > > On Tue, Jan 31, 2017 at 4:14 AM, Timothee Evain < > tevain at telecom-paristech.fr > > wrote: > > > Hello everyone, > > > > It may be more a dev issue, but I think there is a small mistake in the > > ComputeBounds() method of vtkImageData > > When computing upper bounds, code read (line 781 of vtkImageData.cxx): > > > > this->Bounds[1] = origin[0] + (extent[1-swapXBounds] * spacing[0]); > > this->Bounds[3] = origin[1] + (extent[3-swapYBounds] * spacing[1]); > > this->Bounds[5] = origin[2] + (extent[5-swapZBounds] * spacing[2]); > > > > Since the upper extent is meant to be the index of the last inside point, > > this leads to upper bounds excluding the upper fringe of data in each > > direction. > > So I guess this part should read something like: > > > > this->Bounds[1] = origin[0] + ( (extent[1-swapXBounds] + 1) * > spacing[0]); > > this->Bounds[3] = origin[1] + ( (extent[3-swapYBounds] + 1) * > spacing[1]); > > this->Bounds[5] = origin[2] + ( (extent[5-swapZBounds] + 1) * > spacing[2]); > > > > Am I mistaken ? > > > > Tim > > > From ben.boeckel at kitware.com Tue Jan 31 13:18:31 2017 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 31 Jan 2017 13:18:31 -0500 Subject: [vtkusers] Build VTK-7.1.0 with both python 2 and python 3 wrappers In-Reply-To: References: Message-ID: <20170131181822.GA16858@rotor> On Tue, Jan 31, 2017 at 09:18:10 +0000, andrew2hart . wrote: > Is there a recommended way to build VTK-7.1.0 with both python 2 and python > 3 wrappers? You need to build it twice. The build does not support using more than one Python library at a time (even 2.6 vs. 2.7). --Ben From charlesakang at gmail.com Tue Jan 31 16:13:07 2017 From: charlesakang at gmail.com (Charles A Kang) Date: Tue, 31 Jan 2017 13:13:07 -0800 Subject: [vtkusers] Where to get Windows binary package/wheel of VTK for Python 2.7 Message-ID: I have been using VTK via the Python bindings, and I am happy to say that it has worked very well for me. I've noticed that there seems to be an issue with version 7.0.0 and the Intel HD2000/3000 video cards ( http://public.kitware.com/pipermail/vtk-developers/2016-February/033170.html ). I understand that a workaround for this is to use a different version of VTK. However, I am having difficulty finding a Windows compiled package of VTK 7.1.0 or 6.3.0 that works with Python 2.7. Previously, I had been using the 7.0.0 wheel file provided by Christoph Gohlke's web site ( http://www.lfd.uci.edu/~gohlke/pythonlibs/#vtk ), but I cannot find the exact version I want there. I am looking for the following: Python 2.7, VTK version either 7.1.0 or 6.3.0, and preferably both 32 bit and 64 bit versions, but either is fine. Is there any way to get a pre-compiled Windows binary of VTK that I can install into my instance of Python 2.7? Alternatively, is there a way for me to convert the standalone Python windows binaries available through the VTK web site downloads section ( http://www.vtk.org/download/ ) into a package (such as a wheel file) that I can install in my own instance of Python 2.7? I've tried using the Anaconda distribution of VTK 7.1.0, but this causes mysterious problems when I use py2exe. I've also tried compiling VTK on my own in Windows, but I've had a lot of trouble. I can't get CMake to play nice with Microsoft Visual C++ Compiler for Python 2.7 ( https://www.microsoft.com/en-us/download/details.aspx?id=44266 ) -- it can't seem to locate the compiler. If possible, I would prefer to just use someone else's compiled windows binary Python package. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From bitminer at gmail.com Tue Jan 31 17:40:48 2017 From: bitminer at gmail.com (Brian Davis) Date: Tue, 31 Jan 2017 16:40:48 -0600 Subject: [vtkusers] VTK without the V(isualization) Message-ID: I understand that VTK is all about visualization (the V), however I am working on an app that uses VTK in the background and never shows a renderwindow. Ok well not quite true as it can/should also be capable of rendering the same pipleine/steps as the app can also be run with visualization and manual interaction rendering. So the app should be capable with the V and without the V ideally with little to no changes. Problem I seem to be running into is that some of the code to create say clip planes using a vtkBoxWidget is not possible without a render window or inter actor as is my understanding. When trying to find non visual "replacements" such as using vtkBoxRepresentation or vtkBox or (put whatever option here) the api does not seem to have a similar or same api interface such as GetPlanes() for what I think may be non visual replacements So If i use vtkBoxWidget in the V mode. boxWidget = vtkSmartPointer::New(); It works great. Then I look for a GetPlanes() replacemnt in non V mode here http://www.vtk.org/doc/nightly/html/functions_g.html#index_g and find: GetPlanes() : vtkBoxRepresentation , vtkBoxWidget , vtkClipConvexPolyData , vtkFrustumSource so I try box = vtkSmartPointer::New(); and I then get a bizarre warning as at the error window: Generic Warning: in C\yada\yada\VTK\Rendering\Core\vtkPropety.cxx, line 45 Error: no override found for vtkProperty The odd part is that at one point I could use vtkBoxRepresentation as a replacement in the past as it worked.This seems as though I am trying to create an abstract class or something. as stack trace yeilds: > mydll.dll!vtkSmartPointer::New() Line 117 C++ where 117 in vtkSmartPointer.h is: // Description: // Create an instance of a VTK object. static vtkSmartPointer New() { 117: return vtkSmartPointer(T::New(), NoReference()); } and vtkInteractionWidgets-7.0.dll!000007fed708f9ba() Unknown before finally going kittywampus at: vtkInteractionWidgets-7.0.dll!000007fed708f9ba() Unknown Is there any advice for using VTK in both modes "visualized" and "not Visualized" and just using it as a non visual processing pipeline. If I try using vtkBox inplace of vtkBoxWidget then I have to start diverging from the original code pipeline and use AddBounds and what ever the replacement would be for GetPlanes(clipFunc). Any thoughts on the problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sehooi at gmail.com Tue Jan 31 21:04:56 2017 From: sehooi at gmail.com (Sehoon Lee) Date: Tue, 31 Jan 2017 19:04:56 -0700 (MST) Subject: [vtkusers] SetTimeValue() not work in vtkOpenFOAMReader.cxx In-Reply-To: <1485863022131-5741995.post@n5.nabble.com> References: <1485863022131-5741995.post@n5.nabble.com> Message-ID: <1485914696338-5742003.post@n5.nabble.com> I found the solution using the following code reader->UpdateInformation(); vtkInformation* outInfo = reader->GetExecutive()->GetOutputInformation(0); outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP(), 1.5); reader->Update(); instead of reader->SetTimeValue(1.5); reader->Update(); -- View this message in context: http://vtk.1045678.n5.nabble.com/SetTimeValue-not-work-in-vtkOpenFOAMReader-cxx-tp5741995p5742003.html Sent from the VTK - Users mailing list archive at Nabble.com. From bitminer at gmail.com Tue Jan 31 23:44:04 2017 From: bitminer at gmail.com (Brian Davis) Date: Tue, 31 Jan 2017 22:44:04 -0600 Subject: [vtkusers] VTK without the V(isualization) In-Reply-To: References: Message-ID: Investigating ?GetPlanes() : vtkBoxRepresentation , vtkBoxWidget , vtkClipConvexPolyData , vtkFrustumSource a little further reveals virtual vtkPlaneCollection * vtkClipConvexPolyData::GetPlanes ( ) is not the same as void vtkBoxRepresentation::GetPlanes ( vtkPlanes * *planes*) and void vtkBoxWidget::GetPlanes ( vtkPlanes * *planes*) and hey... why would it be for consistency sake? or for that matter: virtual vtkPlanes * vtkFrustumSource::GetPlanes ( ) Not that I need a Frustrum. So I look into vtkClipConvexPolyData and vtkPlaneCollecion to see if I can get vtkPlanes* and of course I can't. I get the feeling that vtk is a bit fractured. Can someone explain to me why what is seemingly similar things in vtk have such different interfaces that don't seem to play nice with (itself) it's own api? -------------- next part -------------- An HTML attachment was scrubbed... URL: