From berti_krueger at hotmail.com Mon Oct 1 01:44:20 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Mon, 1 Oct 2018 05:44:20 +0000 Subject: [vtkusers] vtkTrimmedExtrusionFilter.h include file not found in vtk 8.1 In-Reply-To: References: Message-ID: To answer myself and for anyone else who also might need the vtkTrimmedExtrusionFilter now: The filter is indeed only part of the vtk nightly version which unfortunately does not work out of the box yet. But the two files "vtkTrimmedExtrusionFilter.h" and "vtkTrimmedExtrusionFilter.cxx" can be simply copied from the repository and included in a vtk 8.1 program and added to the CMakeLists.txt without any additional work. Regards, Berti PS: If anyone already knows if this will be part of vtk 8.2 it would be nice to know. Am So, 30. Sep, 2018 um 9:24 VORMITTAGS schrieb Berti Kr?ger : Hello everyone. I stumbled upon the vtkTrimmedExtrusionFilter (https://www.vtk.org/doc/nightly/html/classvtkTrimmedExtrusionFilter.html) which might be very useful for the project i am working on. Unfortunately when i try to include it, i get a compiler error that the include file could not be found. Is this filter not yet part of the newest vtk 8.1? And if so, will it be part of vtk 8.2 or vtk 9.0? Best regards, Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: From tharun160190 at gmail.com Mon Oct 1 05:53:30 2018 From: tharun160190 at gmail.com (Tharun) Date: Mon, 1 Oct 2018 02:53:30 -0700 (MST) Subject: [vtkusers] DPI scaling in QVTKWidget Message-ID: <1538387610923-0.post@n5.nabble.com> We are building an application based on QT using QVTKWidget. QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); enables automatic scaling of application except the widget part. Can anybody help me with the problem? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mathieu.westphal at kitware.com Mon Oct 1 06:26:11 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Mon, 1 Oct 2018 12:26:11 +0200 Subject: [vtkusers] DPI scaling in QVTKWidget In-Reply-To: <1538387610923-0.post@n5.nabble.com> References: <1538387610923-0.post@n5.nabble.com> Message-ID: Hi, You may want to use QVTKOpenGLWidget or QVTKOpenGLNativeWidget as QVTKWidget is now deprecated. Best, Mathieu Westphal On Mon, Oct 1, 2018 at 11:53 AM Tharun wrote: > We are building an application based on QT using QVTKWidget. > > QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); enables automatic > scaling of application except the widget part. > > Can anybody help me with the problem? > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Oct 1 09:11:31 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 1 Oct 2018 09:11:31 -0400 Subject: [vtkusers] vtkTrimmedExtrusionFilter.h include file not found in vtk 8.1 In-Reply-To: References: Message-ID: Major (8) and minor (2) releases are created from master. So since it is in master now it will be in 8.2.0. note: patch releases contain only fixes over an earlier release. Those come from the release branch. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Oct 1, 2018 at 1:44 AM Berti Kr?ger wrote: > To answer myself and for anyone else who also might need the > vtkTrimmedExtrusionFilter now: > > > The filter is indeed only part of the vtk nightly version which > unfortunately does not work out of the box yet. > > But the two files "vtkTrimmedExtrusionFilter.h" and > "vtkTrimmedExtrusionFilter.cxx" can be simply copied from the repository > and included in a vtk 8.1 program and added to the CMakeLists.txt without > any additional work. > > > Regards, > > Berti > > > PS: If anyone already knows if this will be part of vtk 8.2 it would be > nice to know. > > Am So, 30. Sep, 2018 um 9:24 VORMITTAGS schrieb Berti Kr?ger < > berti_krueger at hotmail.com>: > > Hello everyone. > > I stumbled upon the vtkTrimmedExtrusionFilter ( > https://www.vtk.org/doc/nightly/html/classvtkTrimmedExtrusionFilter.html) > which might be very useful for the project i am working on. > > Unfortunately when i try to include it, i get a compiler error that the > include file could not be found. > > > Is this filter not yet part of the newest vtk 8.1? > > And if so, will it be part of vtk 8.2 or vtk 9.0? > > > Best regards, > > Berti > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Oct 1 09:54:04 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 1 Oct 2018 09:54:04 -0400 Subject: [vtkusers] [vtk-developers] Discussion: OK to change VTK's version number from 9.0 to 8.2? In-Reply-To: References: <20180927143927.GA22820@rotor.kitware.com> <20180928130555.GA7447@rotor.kitware.com> Message-ID: Thanks for the input everyone. It seems that noone objects to changing master's name off of 9.0, so I will go ahead and finish up the merge request to reset it to 8.2.0 today. I'll defer the numbering scheme for subsequent releases for a little while. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Fri, Sep 28, 2018 at 9:27 AM Bill Lorensen wrote: > That would work. > > On Fri, Sep 28, 2018, 6:05 AM Ben Boeckel wrote: > >> On Thu, Sep 27, 2018 at 20:44:22 -0700, Bill Lorensen wrote: >> > I mean a # that increments nightly. Resets to 0 when a the revision >> > number changes. >> > >> > Major.Minor.Patch.Build >> > >> > Right now if a new class is added you there is no way to know from the >> > version when it was added. >> > >> > I think we used to do this in vtk... >> >> CMake does this, but it is not just a number that resets to 0, but a >> datestamp: >> >> >> https://gitlab.kitware.com/cmake/cmake/commit/8bb0e09e38d3ab75198b1cd9746bfa7a7b80ff94 >> >> It is used *as* the patch number, not a fourth component. This means >> that as soon as we branch and make M.N.0, `master` is already >> M.N.2018MMDD and "bigger". >> >> --Ben >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtk-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berti_krueger at hotmail.com Mon Oct 1 14:29:48 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Mon, 1 Oct 2018 18:29:48 +0000 Subject: [vtkusers] vtkTrimmedExtrusionFilter.h include file not found in vtk 8.1 In-Reply-To: References: Message-ID: Hi David, thank you very much for the information. Do you know approximately when VTK 8.2 will be released? Cheers, Berti Am Mo, 1. Okt, 2018 um 3:11 NACHMITTAGS schrieb David E DeMarle : Major (8) and minor (2) releases are created from master. So since it is in master now it will be in 8.2.0. note: patch releases contain only fixes over an earlier release. Those come from the release branch. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Oct 1, 2018 at 1:44 AM Berti Kr?ger > wrote: To answer myself and for anyone else who also might need the vtkTrimmedExtrusionFilter now: The filter is indeed only part of the vtk nightly version which unfortunately does not work out of the box yet. But the two files "vtkTrimmedExtrusionFilter.h" and "vtkTrimmedExtrusionFilter.cxx" can be simply copied from the repository and included in a vtk 8.1 program and added to the CMakeLists.txt without any additional work. Regards, Berti PS: If anyone already knows if this will be part of vtk 8.2 it would be nice to know. Am So, 30. Sep, 2018 um 9:24 VORMITTAGS schrieb Berti Kr?ger >: Hello everyone. I stumbled upon the vtkTrimmedExtrusionFilter (https://www.vtk.org/doc/nightly/html/classvtkTrimmedExtrusionFilter.html) which might be very useful for the project i am working on. Unfortunately when i try to include it, i get a compiler error that the include file could not be found. Is this filter not yet part of the newest vtk 8.1? And if so, will it be part of vtk 8.2 or vtk 9.0? Best regards, Berti _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Oct 1 14:36:02 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 1 Oct 2018 14:36:02 -0400 Subject: [vtkusers] vtkTrimmedExtrusionFilter.h include file not found in vtk 8.1 In-Reply-To: References: Message-ID: End of November. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Oct 1, 2018 at 2:29 PM Berti Kr?ger wrote: > Hi David, > > thank you very much for the information. > > Do you know approximately when VTK 8.2 will be released? > > > Cheers, > > Berti > > Am Mo, 1. Okt, 2018 um 3:11 NACHMITTAGS schrieb David E DeMarle < > dave.demarle at kitware.com>: > > Major (8) and minor (2) releases are created from master. So since it is > in master now it will be in 8.2.0. > > note: patch releases contain only fixes over an earlier release. Those > come from the release branch. > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > > On Mon, Oct 1, 2018 at 1:44 AM Berti Kr?ger > wrote: > >> To answer myself and for anyone else who also might need the >> vtkTrimmedExtrusionFilter now: >> >> >> The filter is indeed only part of the vtk nightly version which >> unfortunately does not work out of the box yet. >> >> But the two files "vtkTrimmedExtrusionFilter.h" and >> "vtkTrimmedExtrusionFilter.cxx" can be simply copied from the repository >> and included in a vtk 8.1 program and added to the CMakeLists.txt without >> any additional work. >> >> >> Regards, >> >> Berti >> >> >> PS: If anyone already knows if this will be part of vtk 8.2 it would be >> nice to know. >> >> Am So, 30. Sep, 2018 um 9:24 VORMITTAGS schrieb Berti Kr?ger < >> berti_krueger at hotmail.com>: >> >> Hello everyone. >> >> I stumbled upon the vtkTrimmedExtrusionFilter ( >> https://www.vtk.org/doc/nightly/html/classvtkTrimmedExtrusionFilter.html) >> which might be very useful for the project i am working on. >> >> Unfortunately when i try to include it, i get a compiler error that the >> include file could not be found. >> >> >> Is this filter not yet part of the newest vtk 8.1? >> >> And if so, will it be part of vtk 8.2 or vtk 9.0? >> >> >> Best regards, >> >> Berti >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berti_krueger at hotmail.com Mon Oct 1 19:10:06 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Mon, 1 Oct 2018 23:10:06 +0000 Subject: [vtkusers] vtkTrimmedExtrusionFilter.h include file not found in vtk 8.1 In-Reply-To: References: Message-ID: Thanks for the reply. Regards, Berti Am Mo, 1. Okt, 2018 um 8:36 NACHMITTAGS schrieb David E DeMarle : End of November. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Oct 1, 2018 at 2:29 PM Berti Kr?ger > wrote: Hi David, thank you very much for the information. Do you know approximately when VTK 8.2 will be released? Cheers, Berti Am Mo, 1. Okt, 2018 um 3:11 NACHMITTAGS schrieb David E DeMarle >: Major (8) and minor (2) releases are created from master. So since it is in master now it will be in 8.2.0. note: patch releases contain only fixes over an earlier release. Those come from the release branch. David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Oct 1, 2018 at 1:44 AM Berti Kr?ger > wrote: To answer myself and for anyone else who also might need the vtkTrimmedExtrusionFilter now: The filter is indeed only part of the vtk nightly version which unfortunately does not work out of the box yet. But the two files "vtkTrimmedExtrusionFilter.h" and "vtkTrimmedExtrusionFilter.cxx" can be simply copied from the repository and included in a vtk 8.1 program and added to the CMakeLists.txt without any additional work. Regards, Berti PS: If anyone already knows if this will be part of vtk 8.2 it would be nice to know. Am So, 30. Sep, 2018 um 9:24 VORMITTAGS schrieb Berti Kr?ger >: Hello everyone. I stumbled upon the vtkTrimmedExtrusionFilter (https://www.vtk.org/doc/nightly/html/classvtkTrimmedExtrusionFilter.html) which might be very useful for the project i am working on. Unfortunately when i try to include it, i get a compiler error that the include file could not be found. Is this filter not yet part of the newest vtk 8.1? And if so, will it be part of vtk 8.2 or vtk 9.0? Best regards, Berti _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From berti_krueger at hotmail.com Mon Oct 1 19:15:04 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Mon, 1 Oct 2018 23:15:04 +0000 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: , Message-ID: Hi David, thank you very much again for your reply. You are right in that the approach of doing rasterization with the graphics card in an offscreen buffer and then reading the pixel values out has its own problems and i stopped going that way. Even if it didn't sound like that, alltogether i am quite satisfied with the majority voting solution with the vtkPolyDataToImageStencil filter so far. It seems to be precise enough most of the time. But if it is not so much more work and if i have some time left, i will try to complete the solution with the rasterization of the polygons themselves. I already stumbled upon the vtkImplicitModeller, but to be honest, from the class documentation alone i didn't completely "get" what it is really doing, e.g. what is the "output" of it. Does it compute a distance field where the cell values of the grid contain the distances from the cell to the isosurface? Something like: [cid:inline_01 at geary] (image taken from: http://bytewrangler.blogspot.com/2011/10/signed-distance-fields.html) [http://2.bp.blogspot.com/-bQanRezjlk4/TpdpSpMq5rI/AAAAAAAAAWw/_8lQsmOJHWM/w1200-h630-p-k-no-nu/SignedDistanceField.png] Byte Wrangler: Signed Distance Fields bytewrangler.blogspot.com delta is a constant which determines how far from the edge of the letter the anti-aliasing extends. The actual shader code I use in bulldog is slightly more complex as it handles borders and reversed characters (such as when selecting text in a textbox), as well as adjusting the anti-aliasing for different font sizes. Regards, Berti Am Mo, 1. Okt, 2018 um 1:15 NACHMITTAGS schrieb David Gobbi : On Sat, Sep 29, 2018 at 2:54 AM Berti Kr?ger > wrote: Hi David, Is there some way with the available vtk filters to rasterize the polygons themselves instead of rasterizing the volume enclosed by the polygons? That's what vtkImplicitModeller does, so you could combine its results with the results that you already have. I know, i could in some way misuse the vtk renderer to do this by rendering the mesh without any shading, only in ambient, completely white with orthogonal projection etc. in a black render window, sized to the voxel resolution, then read the resulting screen pixels with the vtkWindowToImage Filter, fill the vtkImageData where i have white pixels, change the clipping planes to the next slice, draw the mesh again, read again ... and do that slice by slice for the depth part of the voxel resolution: This won't work for polygons that face the camera edge-on, since they are invisible in the rendering. So you would have to do it from three directions and then combine the results. Even then, I'm not sure how good the quality would be. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SignedDistanceField.png Type: image/png Size: 19306 bytes Desc: SignedDistanceField.png URL: From david.gobbi at gmail.com Mon Oct 1 20:58:20 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 1 Oct 2018 18:58:20 -0600 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: On Mon, Oct 1, 2018 at 5:15 PM Berti Kr?ger wrote: > > I already stumbled upon the vtkImplicitModeller, but to be honest, from > the class documentation alone i didn't completely "get" what it is really > doing, e.g. what is the "output" of it. > The full c++ source code is right there. Just sayin'. > Does it compute a distance field where the cell values of the grid contain > the distances from the cell to the isosurface? > It computes unsigned distance. No, it doesn't compute distance from an isosurface: it computes the distance to the actual polygon, which is a vectorized (not yet rasterized) object. All that remains to be done is binarization via thresholding. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From tharun160190 at gmail.com Mon Oct 1 21:09:37 2018 From: tharun160190 at gmail.com (Tharun) Date: Mon, 1 Oct 2018 18:09:37 -0700 (MST) Subject: [vtkusers] DPI scaling in QVTKWidget In-Reply-To: References: <1538387610923-0.post@n5.nabble.com> Message-ID: <1538442577170-0.post@n5.nabble.com> Thank you for the reply. May I know if using those widgets solve the problem? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From berti_krueger at hotmail.com Mon Oct 1 21:49:02 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Tue, 2 Oct 2018 01:49:02 +0000 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: , Message-ID: Hi David, thanks again. I am sorry, i don't want to get on your nerves. I know that all of you have a lot of work to do yourselves and i am thankful for every effort everybody takes on this mailing list in helping others and especially for your support in my problem. You are right in that since vtk is an open source project everybody can look at the code if the documentation alone is not clear enough to them. But as a vtk beginner, what i found out though is, that the amount of comments in the vtk filter classes vary a lot. While some classes are self explanatory, greatly commented and have some example code in the github repository others can require more research. Then some of the classes are self-contained where reading the source code of the class alone is enough, others depend on a lot of other vtk classes and you have to read through nearly all of them or at least the corresponding class documentation to get to know what is going on which can take a long time. So your explanation that it computes an unsigned distance to the actual polygon is completely to the point and is all what i wanted to know and saved me a lot of time. Cheers, Berti ________________________________ Von: David Gobbi Gesendet: Dienstag, 2. Oktober 2018 00:58 An: Berti Kr?ger Cc: VTK Users Betreff: Re: [vtkusers] Solid Voxelization with VTK On Mon, Oct 1, 2018 at 5:15 PM Berti Kr?ger > wrote: I already stumbled upon the vtkImplicitModeller, but to be honest, from the class documentation alone i didn't completely "get" what it is really doing, e.g. what is the "output" of it. The full c++ source code is right there. Just sayin'. Does it compute a distance field where the cell values of the grid contain the distances from the cell to the isosurface? It computes unsigned distance. No, it doesn't compute distance from an isosurface: it computes the distance to the actual polygon, which is a vectorized (not yet rasterized) object. All that remains to be done is binarization via thresholding. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Oct 1 23:00:10 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 1 Oct 2018 21:00:10 -0600 Subject: [vtkusers] Solid Voxelization with VTK In-Reply-To: References: Message-ID: Hi Berti, I just wanted to make it clear that I'm only closely familiar with a small fraction of the VTK classes... when I do anything in VTK that involves unfamiliar classes, of course I also have to delve into the documentation and often into the code. The vtkImplicitModeller falls into "unfamiliar" territory for me: I'm vaguely aware of what it does, but I've never used it and I'm hardly an expert on it. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Tue Oct 2 01:31:46 2018 From: jothybasu at gmail.com (Jothybasu Selvaraj) Date: Tue, 2 Oct 2018 15:31:46 +1000 Subject: [vtkusers] Problem coloring actor Message-ID: Dear All, I am using vtk7.1 in my project. I am trying to color the actor using the below code, while it works for some colors other are rendered as white or in something else. The same code used to work well in vtk6. Does ambient, diffuse, etc... has any effect? I tried setting the color in [0,1] and [0,255] format and no change in behavior. Any suggestions? // Create plane actor vtkSmartPointercutROI= vtkSmartPointer::New(); //qDebug()<GetProperty()->SetColor(255.0,180,255.0); cutROI->SetMapper(cutterMapper); cutROI->GetProperty()->SetAmbient(1.0); cutROI->GetProperty()->SetDiffuse(0.5); cutROI->GetProperty()->SetSpecular(0.0); cutROI->GetProperty()->SetOpacity(0.95); cutROI->GetProperty()->EdgeVisibilityOff(); //cutROI->GetProperty()->SetEdgeColor(R,G,B); cutROI->GetProperty()->SetLineWidth(1.5); Thanks Jothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jothybasu at gmail.com Tue Oct 2 01:34:55 2018 From: jothybasu at gmail.com (Jothybasu Selvaraj) Date: Tue, 2 Oct 2018 15:34:55 +1000 Subject: [vtkusers] Problem coloring actor In-Reply-To: References: Message-ID: Ia m using Mesa software based rendering rather than hardware based one since I don't have graphics card on my server. On Tue, Oct 2, 2018 at 3:31 PM Jothybasu Selvaraj wrote: > Dear All, > > I am using vtk7.1 in my project. I am trying to color the actor using the > below code, while it works for some colors other are rendered as white or > in something else. The same code used to work well in vtk6. > > Does ambient, diffuse, etc... has any effect? I tried setting the color in > [0,1] and [0,255] format and no change in behavior. > > Any suggestions? > > // Create plane actor > > vtkSmartPointercutROI= > > vtkSmartPointer::New(); > > //qDebug()< > //unsigned char color1[3] = {255, 180, 255}; > > cutROI->GetProperty()->SetColor(255.0,180,255.0); > > cutROI->SetMapper(cutterMapper); > > cutROI->GetProperty()->SetAmbient(1.0); > > cutROI->GetProperty()->SetDiffuse(0.5); > > cutROI->GetProperty()->SetSpecular(0.0); > > cutROI->GetProperty()->SetOpacity(0.95); > > cutROI->GetProperty()->EdgeVisibilityOff(); > > //cutROI->GetProperty()->SetEdgeColor(R,G,B); > > cutROI->GetProperty()->SetLineWidth(1.5); > > Thanks > > > Jothy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathieu.westphal at kitware.com Tue Oct 2 03:55:19 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Tue, 2 Oct 2018 09:55:19 +0200 Subject: [vtkusers] DPI scaling in QVTKWidget In-Reply-To: <1538442577170-0.post@n5.nabble.com> References: <1538387610923-0.post@n5.nabble.com> <1538442577170-0.post@n5.nabble.com> Message-ID: Hi, QVTKOpenGLWidget do support HighDpi. Best, Mathieu Westphal On Tue, Oct 2, 2018 at 3:09 AM Tharun wrote: > Thank you for the reply. May I know if using those widgets solve the > problem? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Oct 2 05:19:48 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 2 Oct 2018 11:19:48 +0200 Subject: [vtkusers] DPI scaling in QVTKWidget In-Reply-To: References: <1538387610923-0.post@n5.nabble.com> <1538442577170-0.post@n5.nabble.com> Message-ID: Den tis 2 okt. 2018 kl 09:30 skrev Mathieu Westphal : > > Hi, > > QVTKOpenGLWidget do support HighDpi. Just a small warning about QVTKOpenGLNativeWidget (the one you need to use if you require a native widget): It will not properly support fractional device pixel ratios (e.g. 150% or 250%), only integer ones (100%, 200%, ...). I have an old MR here to fix this: https://gitlab.kitware.com/vtk/vtk/merge_requests/3973 . It's been on my TODO to update this MR after the new QVTKOpenGLWidget was merged and the old one was renamed to QVTKOpenGLNativeWidget, but work has just kept me so busy that I haven't found time for it. Elvis > > Best, > > Mathieu Westphal > > > On Tue, Oct 2, 2018 at 3:09 AM Tharun wrote: >> >> Thank you for the reply. May I know if using those widgets solve the problem? >> >> >> >> -- >> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From jcfr at kitware.com Tue Oct 2 13:16:03 2018 From: jcfr at kitware.com (Jean-Christophe Fillion-Robin) Date: Tue, 2 Oct 2018 13:16:03 -0400 Subject: [vtkusers] [vtk-developers] Discussion: OK to change VTK's version number from 9.0 to 8.2? In-Reply-To: References: <20180927143927.GA22820@rotor.kitware.com> <20180928130555.GA7447@rotor.kitware.com> Message-ID: Hi Folks, My apology for answering late, I was literally our of town without any connection for the past two weeks and didn't have a chance to comment earlier. While 3D Slicer itself can easily be updated, there are projects that build against 3D Slicer and/or dependent on 3D Slicer while supporting being built against different of VTK. To avoid the burden of updating each one of these projects, I am writing an email to the list to check if others would support reverting back to version 9.0.0 ? Thanks Jc On Mon, Oct 1, 2018 at 9:54 AM David E DeMarle wrote: > Thanks for the input everyone. > > It seems that noone objects to changing master's name off of 9.0, so I > will go ahead and finish up the merge request > to reset it to > 8.2.0 today. > > I'll defer the numbering scheme for subsequent releases for a little while. > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > > On Fri, Sep 28, 2018 at 9:27 AM Bill Lorensen > wrote: > >> That would work. >> >> On Fri, Sep 28, 2018, 6:05 AM Ben Boeckel >> wrote: >> >>> On Thu, Sep 27, 2018 at 20:44:22 -0700, Bill Lorensen wrote: >>> > I mean a # that increments nightly. Resets to 0 when a the revision >>> > number changes. >>> > >>> > Major.Minor.Patch.Build >>> > >>> > Right now if a new class is added you there is no way to know from the >>> > version when it was added. >>> > >>> > I think we used to do this in vtk... >>> >>> CMake does this, but it is not just a number that resets to 0, but a >>> datestamp: >>> >>> >>> https://gitlab.kitware.com/cmake/cmake/commit/8bb0e09e38d3ab75198b1cd9746bfa7a7b80ff94 >>> >>> It is used *as* the patch number, not a fourth component. This means >>> that as soon as we branch and make M.N.0, `master` is already >>> M.N.2018MMDD and "bigger". >>> >>> --Ben >>> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtk-developers >> >> _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtk-developers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ysa0829 at gmail.com Wed Oct 3 06:17:38 2018 From: ysa0829 at gmail.com (Ang) Date: Wed, 3 Oct 2018 03:17:38 -0700 (MST) Subject: [vtkusers] smoothen binarized vtkImageData Message-ID: <1538561858096-0.post@n5.nabble.com> I want to smoothen binarized vtkImageData like image below from right to left I followed https://stackoverflow.com/questions/45365727/vtk-volume-visualization-issue and had results like below Then I tried using linear interpolation, the colors turned to be abnormal Below are my code pieces: //Declaring Variables vtkSmartPointer volumeProperty; vtkSmartPointer compositeOpacity; vtkSmartPointer color; vtkSmartPointer volume; vtkGPUVolumeRayCastMapper* mapper = vtkGPUVolumeRayCastMapper::New(); volumeProperty = vtkSmartPointer::New(); compositeOpacity = vtkSmartPointer::New(); color = vtkSmartPointer::New(); volume = vtkSmartPointer::New(); mapper->SetAutoAdjustSampleDistances(0); double spacing[3]; m_RegionImageData->GetSpacing(spacing); double distance = spacing[0]; if (distance>spacing[1]) { distance = spacing[1]; } if (distance>spacing[2]) { distance = spacing[2]; } distance = distance / 2.0; mapper->SetSampleDistance(static_cast(distance)); volumeProperty->ShadeOn(); volumeProperty->SetIndependentComponents(1); volumeProperty->SetInterpolationTypeToLinear(); volumeProperty->SetColor(color); volumeProperty->SetScalarOpacity(compositeOpacity); mapper->SetBlendModeToComposite(); m_RegionImageData->UpdateCellGhostArrayCache(); mapper->SetInputData(m_ReigonGrowing->m_RegionImageData); mapper->SetMaskTypeToLabelMap(); mapper->SetMaskBlendFactor(0.8); volume->SetMapper(mapper); volume->SetProperty(volumeProperty); m_cImage3DViewer->getRenderer()->AddViewProp(volume); //Setting Voxel Data and Its Properties compositeOpacity->AddPoint(0, 0); for (int i = 1; i < m_ReigonGrowing->m_lookupTable->GetNumberOfTableValues(); i++) { compositeOpacity->AddPoint(i, 1); color->AddRGBPoint(i, m_ReigonGrowing->m_lookupTable->GetTableValue(i)[0], m_ReigonGrowing->m_lookupTable->GetTableValue(i)[1], m_ReigonGrowing->m_lookupTable->GetTableValue(i)[2]); } m_cImage3DViewer->getRenderer()->ResetCamera(); /*m_cImage3DViewer->assignImageToVolume(m_pProjectData->GetActivePatientData()->GetOriginImageDataPtr(), m_cImage3DViewer->m_k3DLUT); StartAdjustCropRegionWidget();*/ m_cImage3DViewer->getRenderer()->GetRenderWindow()->GetInteractor()->Render(); Does anyone has any ways to smoothen binarized vtkImageData? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From blowekamp at mail.nih.gov Wed Oct 3 11:07:39 2018 From: blowekamp at mail.nih.gov (Bradley Lowekamp) Date: Wed, 03 Oct 2018 16:07:39 +0100 Subject: [vtkusers] Invoice from 10/03/2018 Message-ID: <6814004304920418790.1645D6AAFBD4FC54@public.kitware.com> Good day, I am trying to settle the balance payment, my proforma at hand is $2,86026 while your invoice (is attached) comes to $1,970.71 Kindly confirm the amount I was just about to pay the bigger amount now I am waiting for your final confirmation so to pay the balance. Hope to hear from you soon. * Bradley Lowekamp 927-931-0699, direct (pls. try here first, during business hours) 927-931-6687, office 927-931-3827, fax 927-931-3214, mobile 0630/5916134, WhatsApp E:blowekamp at mail.nih.gov * Sent from my iPhone -------------- next part -------------- A non-text attachment was scrubbed... Name: Y6/07-88/2287.doc Type: application/msword Size: 119808 bytes Desc: not available URL: From bill.lorensen at gmail.com Wed Oct 3 18:45:19 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 3 Oct 2018 15:45:19 -0700 Subject: [vtkusers] smoothen binarized vtkImageData In-Reply-To: <1538561858096-0.post@n5.nabble.com> References: <1538561858096-0.post@n5.nabble.com> Message-ID: The image on the right was produced with https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateCubesFromLabels/ on the left: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/GenerateModelsFromLabels/ Also, you may be interested in my Open Alas project that actually produced the image you show. https://github.com/lorensen/OpenAtlas and the SPLBrainAtlas https://github.com/lorensen/SPLBrainAtlas/wiki/Atlas-Summary Bill . On Wed, Oct 3, 2018 at 3:17 AM Ang wrote: > > I want to smoothen binarized vtkImageData like image below from right to left > > > I followed > https://stackoverflow.com/questions/45365727/vtk-volume-visualization-issue > and had results like below > > > Then I tried using linear interpolation, the colors turned to be abnormal > > > > Below are my code pieces: > > //Declaring Variables > vtkSmartPointer volumeProperty; > vtkSmartPointer compositeOpacity; > vtkSmartPointer color; > vtkSmartPointer volume; > vtkGPUVolumeRayCastMapper* mapper = vtkGPUVolumeRayCastMapper::New(); > > volumeProperty = vtkSmartPointer::New(); > compositeOpacity = vtkSmartPointer::New(); > color = vtkSmartPointer::New(); > volume = vtkSmartPointer::New(); > > mapper->SetAutoAdjustSampleDistances(0); > > double spacing[3]; > m_RegionImageData->GetSpacing(spacing); > > > double distance = spacing[0]; > if (distance>spacing[1]) > { > distance = spacing[1]; > } > if (distance>spacing[2]) > { > distance = spacing[2]; > } > distance = distance / 2.0; > > > > mapper->SetSampleDistance(static_cast(distance)); > volumeProperty->ShadeOn(); > volumeProperty->SetIndependentComponents(1); > volumeProperty->SetInterpolationTypeToLinear(); > volumeProperty->SetColor(color); > volumeProperty->SetScalarOpacity(compositeOpacity); > mapper->SetBlendModeToComposite(); > m_RegionImageData->UpdateCellGhostArrayCache(); > mapper->SetInputData(m_ReigonGrowing->m_RegionImageData); > mapper->SetMaskTypeToLabelMap(); > mapper->SetMaskBlendFactor(0.8); > volume->SetMapper(mapper); > volume->SetProperty(volumeProperty); > m_cImage3DViewer->getRenderer()->AddViewProp(volume); > //Setting Voxel Data and Its Properties > compositeOpacity->AddPoint(0, 0); > for (int i = 1; i < > m_ReigonGrowing->m_lookupTable->GetNumberOfTableValues(); i++) > { > > compositeOpacity->AddPoint(i, 1); > color->AddRGBPoint(i, m_ReigonGrowing->m_lookupTable->GetTableValue(i)[0], > m_ReigonGrowing->m_lookupTable->GetTableValue(i)[1], > m_ReigonGrowing->m_lookupTable->GetTableValue(i)[2]); > } > > m_cImage3DViewer->getRenderer()->ResetCamera(); > > > /*m_cImage3DViewer->assignImageToVolume(m_pProjectData->GetActivePatientData()->GetOriginImageDataPtr(), > m_cImage3DViewer->m_k3DLUT); > > StartAdjustCropRegionWidget();*/ > > m_cImage3DViewer->getRenderer()->GetRenderWindow()->GetInteractor()->Render(); > > Does anyone has any ways to smoothen binarized vtkImageData? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsParadise at noware dot com From bill.lorensen at gmail.com Wed Oct 3 18:46:10 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 3 Oct 2018 15:46:10 -0700 Subject: [vtkusers] smoothen binarized vtkImageData In-Reply-To: <1538561858096-0.post@n5.nabble.com> References: <1538561858096-0.post@n5.nabble.com> Message-ID: To interpolate a discrete segmentation you must use nearest neighbor interpolation. On Wed, Oct 3, 2018 at 3:17 AM Ang wrote: > > I want to smoothen binarized vtkImageData like image below from right to left > > > I followed > https://stackoverflow.com/questions/45365727/vtk-volume-visualization-issue > and had results like below > > > Then I tried using linear interpolation, the colors turned to be abnormal > > > > Below are my code pieces: > > //Declaring Variables > vtkSmartPointer volumeProperty; > vtkSmartPointer compositeOpacity; > vtkSmartPointer color; > vtkSmartPointer volume; > vtkGPUVolumeRayCastMapper* mapper = vtkGPUVolumeRayCastMapper::New(); > > volumeProperty = vtkSmartPointer::New(); > compositeOpacity = vtkSmartPointer::New(); > color = vtkSmartPointer::New(); > volume = vtkSmartPointer::New(); > > mapper->SetAutoAdjustSampleDistances(0); > > double spacing[3]; > m_RegionImageData->GetSpacing(spacing); > > > double distance = spacing[0]; > if (distance>spacing[1]) > { > distance = spacing[1]; > } > if (distance>spacing[2]) > { > distance = spacing[2]; > } > distance = distance / 2.0; > > > > mapper->SetSampleDistance(static_cast(distance)); > volumeProperty->ShadeOn(); > volumeProperty->SetIndependentComponents(1); > volumeProperty->SetInterpolationTypeToLinear(); > volumeProperty->SetColor(color); > volumeProperty->SetScalarOpacity(compositeOpacity); > mapper->SetBlendModeToComposite(); > m_RegionImageData->UpdateCellGhostArrayCache(); > mapper->SetInputData(m_ReigonGrowing->m_RegionImageData); > mapper->SetMaskTypeToLabelMap(); > mapper->SetMaskBlendFactor(0.8); > volume->SetMapper(mapper); > volume->SetProperty(volumeProperty); > m_cImage3DViewer->getRenderer()->AddViewProp(volume); > //Setting Voxel Data and Its Properties > compositeOpacity->AddPoint(0, 0); > for (int i = 1; i < > m_ReigonGrowing->m_lookupTable->GetNumberOfTableValues(); i++) > { > > compositeOpacity->AddPoint(i, 1); > color->AddRGBPoint(i, m_ReigonGrowing->m_lookupTable->GetTableValue(i)[0], > m_ReigonGrowing->m_lookupTable->GetTableValue(i)[1], > m_ReigonGrowing->m_lookupTable->GetTableValue(i)[2]); > } > > m_cImage3DViewer->getRenderer()->ResetCamera(); > > > /*m_cImage3DViewer->assignImageToVolume(m_pProjectData->GetActivePatientData()->GetOriginImageDataPtr(), > m_cImage3DViewer->m_k3DLUT); > > StartAdjustCropRegionWidget();*/ > > m_cImage3DViewer->getRenderer()->GetRenderWindow()->GetInteractor()->Render(); > > Does anyone has any ways to smoothen binarized vtkImageData? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsParadise at noware dot com From ysa0829 at gmail.com Wed Oct 3 21:46:07 2018 From: ysa0829 at gmail.com (Ang) Date: Wed, 3 Oct 2018 18:46:07 -0700 (MST) Subject: [vtkusers] smoothen binarized vtkImageData In-Reply-To: References: <1538561858096-0.post@n5.nabble.com> Message-ID: <1538617567659-0.post@n5.nabble.com> Hi Bill, thanks for your help, In your case, you did convert vtkImageData to vtkPolyData and use vtkWindowedSincPolyDataFilter to smooth vtkpolyData. If I don?t want to convert vtkImageData to vtkPolyData , can I obtain smooth result in 3D view using vtkImageData? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From allison.vacanti at kitware.com Thu Oct 4 09:36:46 2018 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Thu, 4 Oct 2018 09:36:46 -0400 Subject: [vtkusers] Create a custom valueType vtkArray In-Reply-To: References: Message-ID: While it might be tempting to hook into the templated vtkDataArray subclasses 'vtkAOSDataArrayTemplate' or 'vtkSOADataArrayTemplate', this will likely cause headaches as these ValueTypes expect to be implicitly convertible to/from double. Your best option here would be to write your own subclass of vtkAbstractArray (the superclass of vtkDataArray), since that has much less stringent requirements and is already used for things like strings, etc. See vtkStringArray for an example subclass that doesn't just hold a trivial numeric type. HTH, Allie On Sun, Sep 30, 2018 at 5:12 AM Ruben Di Battista wrote: > Hello, > > At the moment I have some code that reads like this: > > m_H->SetNumberOfValues(nPoints); > m_G->SetNumberOfValues(nPoints); > m_C->SetNumberOfValues(nPoints); > m_SI->SetNumberOfValues(nPoints); > > for ( auto p : this->IterateOver() ) { > auto curvatures = p.HG(); > m_H->SetValue(p.Id(), curvatures.H); > m_G->SetValue(p.Id(), curvatures.G); > m_C->SetValue(p.Id(), curvatures.C); > m_SI->SetValue(p.Id(), curvatures.SI); > } > > m_polyPtr->GetPointData()->AddArray(m_H); > m_polyPtr->GetPointData()->AddArray(m_G); > m_polyPtr->GetPointData()->AddArray(m_C); > m_polyPtr->GetPointData()->AddArray(m_SI); > > Where m_polyPtr is a vtkPolyData* and the return type of p.HG() is: > > struct Curvatures > { > double G; /**< Gauss Curvature */ > double H; /**< Mean Curvature */ > double C; /**< Curvedness */ > double SI; /**< Shape Index */ > }; > > Now I?m facing a problem where I need to add fields to the structure > ?Curvatures? and so I need to change code in three different classes. > Is there a way to create a vtkArray whose (templated?) valueType is > `Curvatures` such that I can just modify that struct to allow more fields > to be stored and set in a ?more abstract way? and that can be appended to > the `PointData` of the vtkPolyData in a transparent way? > > Any suggestion is appreciated! > > :) > > > _ > -. .? |???? > ', ; |?????? > ?? |????????? RdB > ,., |?????? > .' '. |???? > -' `? > https://rdb.is > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From deubel at dornheim-medical-images.com Thu Oct 4 09:56:32 2018 From: deubel at dornheim-medical-images.com (deubel at dornheim-medical-images.com) Date: Thu, 04 Oct 2018 13:56:32 +0000 Subject: [vtkusers] VTK with OpenVR on Linux (HTC Vive) Message-ID: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> Hey Guys, Has anyone of you been able to use the vtkOpenVR classes on Linux? I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to run the HelloWorld Example of VTK modified for VR, I encounter a segmentation fault. You can find the code I used here: https://pastebin.com/gjsvKy58 (https://pastebin.com/gjsvKy58) The whole project with binary and core dump can be found here: https://transfer.sh/6vONY/build.zip (https://transfer.sh/6vONY/build.zip) Do you have any suggestions on how to get this working? Thanks in advance! Best regards, Max.Deubel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Oct 4 10:10:48 2018 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 4 Oct 2018 10:10:48 -0400 Subject: [vtkusers] VTK with OpenVR on Linux (HTC Vive) In-Reply-To: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> References: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> Message-ID: You need to create an use an OpenVRCamera. From your code it doesn't look like you are. I doubt that is the crash but it could be. Does the example work on windows? Since linux is an unknown I would think it would be best to make sure you have something working on windows, then port to linux. On Thu, Oct 4, 2018 at 9:56 AM, wrote: > Hey Guys, > Has anyone of you been able to use the vtkOpenVR classes on Linux? > I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to > run the HelloWorld Example of VTK modified for VR, I encounter a > segmentation fault. > You can find the code I used here: https://pastebin.com/gjsvKy58 > The whole project with binary and core dump can be found here: > https://transfer.sh/6vONY/build.zip > > Do you have any suggestions on how to get this working? > > Thanks in advance! > > Best regards, > Max.Deubel > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Thu Oct 4 11:45:21 2018 From: andrew.slaughter at inl.gov (Andrew E. Slaughter) Date: Thu, 4 Oct 2018 15:45:21 +0000 Subject: [vtkusers] Adding and coloring data to a vtkLineSource Message-ID: I am trying to create a line that includes ?data? along the axis, one value for each cell. However, I cannot get the colormap to show the data. I have attached the script, I would greatly appreciate help getting this working. I am using python bindings to VTK7.1 on MacOS. Thank you, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_color.py Type: text/x-python-script Size: 1185 bytes Desc: cylinder_color.py URL: From romain.leguay at gmail.com Thu Oct 4 13:41:39 2018 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Thu, 4 Oct 2018 19:41:39 +0200 Subject: [vtkusers] Qt, vtkImageView2, image and mask Message-ID: <62ED5F8C-8E62-4B22-ACB4-7222C190E389@gmail.com> Hello everyone, I try to add a mask to a 3D image (dicom) with no success. I followed this example: https://cmake.org/Wiki/VTK/Examples/Cxx/Images/Transparency This is the step I follow: // Load the dicom vtkSmartPointer image = loadDicom(filename); imageViewer2D->SetInputData(image); imageViewer2D->GetRenderer()->ResetCamera(); imageViewer2D->Render(); // In a second time // Load the mask (with the same dimension, origin, spacing as the dicom image vtkSmartPointer maskImage = loadMask(filename_mask); vtkSmartPointer lookupTable = vtkSmartPointer::New(); lookupTable->SetNumberOfTableValues(3); lookupTable->SetRange(0.0,2.0); lookupTable->SetTableValue( 0, 0.0, 0.0, 0.0, 0.0 ); //label 0 is transparent lookupTable->SetTableValue( 1, 1.0, 0.0, 0.0, 1.0 ); //label 1 is opaque and red lookupTable->Build(); vtkSmartPointer mapTransparency = vtkSmartPointer::New(); mapTransparency->SetLookupTable(lookupTable); mapTransparency->PassAlphaToOutputOn(); mapTransparency->SetInputData(maskImage); mapTransparency->Update(); vtkSmartPointer maskActor = vtkSmartPointer::New(); maskActor->GetMapper()->SetInputConnection(mapTransparency->GetOutputPort()); maskActor->Update(); imageViewer2D->GetRenderer()->AddActor(maskActor); imageViewer2D->GetRenderer()->ResetCamera(); imageViewer2D->Render(); When I load my mask and add it using vtkImageViewer2D::SetInputData method, I see correctly my mask. Is it possible that the image is in first plane and not the mask is hidden by it? If it?s the case, how can I change this behavior? Thank you, Romain From stefan.neumann at tuhh.de Thu Oct 4 14:24:15 2018 From: stefan.neumann at tuhh.de (StevenNew) Date: Thu, 4 Oct 2018 11:24:15 -0700 (MST) Subject: [vtkusers] Picking an Actor only works with TrackballCamera? Message-ID: <1538677455302-0.post@n5.nabble.com> Hello guys, I'm trying to implement the picking mechanic in my project and the examples worked perfectly fine for me. Now I have problems when trying to implement the example (under CXX/Interaction/Picking) in my project. When I derive a class (so I can override OnLeftButtonDown) from vtkInteractorStyleTrackballCamera, like in the examples, it works in my project, but if I derive it from vtkInteractorStyleSwitch then the mouse event doesn't work. The OnLeftButtonDown just won't get called and I don't get why. I need the vtkInteractorStyleSwitch since I want the user to be able to switch styles. I hope someone can help. Thanks in advance! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ysa0829 at gmail.com Fri Oct 5 00:06:12 2018 From: ysa0829 at gmail.com (Ang) Date: Thu, 4 Oct 2018 21:06:12 -0700 (MST) Subject: [vtkusers] Smooth label-map volume rendering In-Reply-To: References: <2FAC7B9E487D2C478AB8E83F062AF6800736A4D8@doug.risc.local> Message-ID: <1538712372252-0.post@n5.nabble.com> Andras, As you said , using vtkflyingEdge3DFilter and vtkWindowedSincPolyDataFilter take much time to compute and I evaluate segmentation result by using volume rendering for displaying in real time. Could you share your code? thanks. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Fri Oct 5 00:21:05 2018 From: lasso at queensu.ca (Andras Lasso) Date: Fri, 5 Oct 2018 04:21:05 +0000 Subject: [vtkusers] Smooth label-map volume rendering In-Reply-To: <1538712372252-0.post@n5.nabble.com> References: <2FAC7B9E487D2C478AB8E83F062AF6800736A4D8@doug.risc.local> <1538712372252-0.post@n5.nabble.com> Message-ID: All of our source code is publicly available: https://github.com/Slicer/Slicer More specifically: - Slice and 3D visualization of overlapping segments: https://github.com/Slicer/Slicer/tree/master/Modules/Loadable/Segmentations/MRMLDM - Conversion between different representations (binary labelmap, closed surface, fractional labelmap): https://github.com/Slicer/Slicer/tree/master/Libs/vtkSegmentationCore You can take any code you find useful, there is no restriction of using the code or the entire application for any purpose. As you can see, there has been a lot of work put into this and it is constantly improved, so instead of re-developing segmentation tools from scratch (and keep maintaining and improving them), you can build your tools based on 3D Slicer and sit back and let others develop, test, maintain, optimize the underlying infrastructure. Andras -----Original Message----- From: vtkusers On Behalf Of Ang Sent: Friday, October 5, 2018 12:06 AM To: vtkusers at vtk.org Subject: Re: [vtkusers] Smooth label-map volume rendering Andras, As you said , using vtkflyingEdge3DFilter and vtkWindowedSincPolyDataFilter take much time to compute and I evaluate segmentation result by using volume rendering for displaying in real time. Could you share your code? thanks. -- Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40queensu.ca%7C331e605c49ac405e2c4e08d62a77e4a2%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636743091766328799&sdata=epzy4yOInxSN3mmxnOufqLSCXZjB1WgpHClMqzb9xok%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C331e605c49ac405e2c4e08d62a77e4a2%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636743091766328799&sdata=NJBvjMbM0DRqcmxg1Wtne3lYWNb7VC%2FPN%2FKKPC2qnIo%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C331e605c49ac405e2c4e08d62a77e4a2%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636743091766328799&sdata=QXd2WF%2F8Esy3dAx4BUBIgpPoIKVJfknQUaG07g%2Bba9Y%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C331e605c49ac405e2c4e08d62a77e4a2%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636743091766328799&sdata=21P2tWviuvYdOZTQU%2Fq8mMe46vJ5Hc99nKtiPc5iASo%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7C331e605c49ac405e2c4e08d62a77e4a2%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636743091766328799&sdata=7kaTIVeOGAIG%2B2%2Bn0idH1T%2BZfEA%2FwTW0%2BH7bauTWjy8%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7C331e605c49ac405e2c4e08d62a77e4a2%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636743091766328799&sdata=mNL%2BTaPF6QzIEB7n%2Bb753e6WkG72DdPNxsvpmX2563k%3D&reserved=0 From rccm.kyoshimi at gmail.com Fri Oct 5 06:59:43 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Fri, 5 Oct 2018 19:59:43 +0900 Subject: [vtkusers] Adding and coloring data to a vtkLineSource In-Reply-To: References: Message-ID: Hi, vtkLineSource creates a polyline with n points. Consequently, it outputs a single cell and the computed cell data contains just one value and you cannot get the colormap for this. Since there are multiple points, the point data should be used in stead of the cell data. Regards 2018?10?5?(?) 0:45 Andrew E. Slaughter via vtkusers : > > I am trying to create a line that includes ?data? along the axis, one value for each cell. However, I cannot get the colormap to show the data. I have attached the script, I would greatly appreciate help getting this working. > > > > I am using python bindings to VTK7.1 on MacOS. > > > > Thank you, > > > > 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: > https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- #!/usr/bin/env python import vtk n = 10 # Number of data points to create name = "data" # Name of data array generated # A Line source = vtk.vtkLineSource() source.SetResolution(n-1) source.SetPoint1(0, 0, 0) source.SetPoint2(0, 1, 0) # Create and apply nonlinear data along the line data = vtk.vtkFloatArray() data.SetName(name) data.SetNumberOfTuples(n) for i in xrange(n): data.SetValue(i, i*i) source.Update() source.GetOutput().GetPointData().AddArray(data) # Build a tube tube = vtk.vtkTubeFilter() tube.SetInputData(source.GetOutput()) tube.SetRadius(0.2) tube.SetNumberOfSides(100) tube.SetCapping(True) tube.Update() range = tube.GetOutput().GetPointData().GetArray(name).GetRange() mapper = vtk.vtkPolyDataMapper() mapper.SetInputConnection(tube.GetOutputPort()) mapper.SelectColorArray(name) mapper.SetScalarModeToUsePointFieldData() mapper.InterpolateScalarsBeforeMappingOn() mapper.SetScalarRange(range) actor = vtk.vtkActor() actor.SetMapper(mapper) renderer = vtk.vtkRenderer() renderer.AddActor(actor) window = vtk.vtkRenderWindow() window.AddRenderer(renderer) window.SetSize(500, 500) interactor = vtk.vtkRenderWindowInteractor() interactor.SetRenderWindow(window) interactor.Initialize() window.Render() interactor.Start() From andrew.slaughter at inl.gov Fri Oct 5 07:34:58 2018 From: andrew.slaughter at inl.gov (Andrew E. Slaughter) Date: Fri, 5 Oct 2018 11:34:58 +0000 Subject: [vtkusers] Adding and coloring data to a vtkLineSource In-Reply-To: References: Message-ID: <886C8DB4-B552-4962-A153-8E4A1BFFCBFD@inl.gov> Thank, I now have it working. Attached is the working script if anyone else is interested. ?On 10/5/18, 5:00 AM, "kenichiro yoshimi" wrote: Hi, vtkLineSource creates a polyline with n points. Consequently, it outputs a single cell and the computed cell data contains just one value and you cannot get the colormap for this. Since there are multiple points, the point data should be used in stead of the cell data. Regards 2018?10?5?(?) 0:45 Andrew E. Slaughter via vtkusers : > > I am trying to create a line that includes ?data? along the axis, one value for each cell. However, I cannot get the colormap to show the data. I have attached the script, I would greatly appreciate help getting this working. > > > > I am using python bindings to VTK7.1 on MacOS. > > > > Thank you, > > > > 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=DwIFaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=bBR0oxqKB9Dlgtxbg0sTD-KmmjTH8zK3DkDtERlVPGc&s=nBCRb6NYTq3hhnu9h1RFZoMs2aQ0oCUiqFm5Mqo7ZPs&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=DwIFaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=bBR0oxqKB9Dlgtxbg0sTD-KmmjTH8zK3DkDtERlVPGc&s=S7nghZGqIql0HJ1xeZ4SD9arMbXvGHGj2LlfrsgWoEo&e= > > Search the list archives at: https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwIFaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=bBR0oxqKB9Dlgtxbg0sTD-KmmjTH8zK3DkDtERlVPGc&s=Z074Asle35fJ1PUhwSy5-XxS8woPkvRRwdv_OZyuHb0&e= > > Follow this link to subscribe/unsubscribe: > https://urldefense.proofpoint.com/v2/url?u=https-3A__public.kitware.com_mailman_listinfo_vtkusers&d=DwIFaQ&c=54IZrppPQZKX9mLzcGdPfFD1hxrcB__aEkJFOKJFd00&r=h7heP8xwI1i_HikChvhFbEBurKirgfOCdwgBxB9lM8c&m=bBR0oxqKB9Dlgtxbg0sTD-KmmjTH8zK3DkDtERlVPGc&s=uzzkQ92BvaXWkAnDPDtIyZtJamtGP6uo-XRG0iMyiIc&e= -------------- next part -------------- A non-text attachment was scrubbed... Name: cylinder_color.py Type: text/x-python-script Size: 1186 bytes Desc: cylinder_color.py URL: From david.gobbi at gmail.com Fri Oct 5 09:55:12 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 5 Oct 2018 07:55:12 -0600 Subject: [vtkusers] Qt, vtkImageView2, image and mask In-Reply-To: <62ED5F8C-8E62-4B22-ACB4-7222C190E389@gmail.com> References: <62ED5F8C-8E62-4B22-ACB4-7222C190E389@gmail.com> Message-ID: Hi Romain, The vtkImageViewer2 is only designed for one image, so adding another vtkImageActor to it will usually not give good results. Your guess that it is not showing the same slice is probably correct, but even if it did show the same slice, the mask might be invisible if it is rendered first instead of last. Since your mask is the same size as the image, you can use vtkImageBlend to combine them into a single image for vtkImageViewer2. To do this, the DICOM image would have to go through vtkImageMapToColors to convert it from grayscale to RGB or RGBA, then the RGBA mask can be added with vtkImageBlend. The other option is to create your own vtkRenderWindow instead of using vtkImageViewer2. This will give you more flexibility in terms of what you add to the window and how you interact with it. For example, see the following example: https://github.com/Kitware/VTK/blob/9ac8f74/Examples/ImageProcessing/Python/ImageInteractorReslice.py Also, in for your mask lookup table you have SetNumberOfTableValues(3) and SetRange(0,2). I'm guessing that these were just experimental values, since a mask should use SetNumberOfTableValues(2) and SetRange(0,1). Cheers, - David On Thu, Oct 4, 2018 at 11:42 AM Romain LEGUAY wrote: > Hello everyone, > > I try to add a mask to a 3D image (dicom) with no success. > > I followed this example: > https://cmake.org/Wiki/VTK/Examples/Cxx/Images/Transparency > > This is the step I follow: > > // Load the dicom > vtkSmartPointer image = loadDicom(filename); > imageViewer2D->SetInputData(image); > imageViewer2D->GetRenderer()->ResetCamera(); > imageViewer2D->Render(); > > // In a second time > > // Load the mask (with the same dimension, origin, spacing as the dicom > image > vtkSmartPointer maskImage = loadMask(filename_mask); > > vtkSmartPointer lookupTable = > > vtkSmartPointer::New(); > lookupTable->SetNumberOfTableValues(3); > lookupTable->SetRange(0.0,2.0); > lookupTable->SetTableValue( 0, 0.0, 0.0, 0.0, 0.0 ); //label 0 is > transparent > lookupTable->SetTableValue( 1, 1.0, 0.0, 0.0, 1.0 ); //label 1 is opaque > and red > lookupTable->Build(); > > vtkSmartPointer mapTransparency = > vtkSmartPointer::New(); > mapTransparency->SetLookupTable(lookupTable); > mapTransparency->PassAlphaToOutputOn(); > mapTransparency->SetInputData(maskImage); > mapTransparency->Update(); > > vtkSmartPointer maskActor = > vtkSmartPointer::New(); > > maskActor->GetMapper()->SetInputConnection(mapTransparency->GetOutputPort()); > maskActor->Update(); > > imageViewer2D->GetRenderer()->AddActor(maskActor); > imageViewer2D->GetRenderer()->ResetCamera(); > imageViewer2D->Render(); > > > > When I load my mask and add it using vtkImageViewer2D::SetInputData > method, I see correctly my mask. > > Is it possible that the image is in first plane and not the mask is hidden > by it? If it?s the case, how can I change this behavior? > > Thank you, > > Romain > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f_u_7 at yahoo.com Fri Oct 5 18:22:04 2018 From: f_u_7 at yahoo.com (lucky) Date: Fri, 5 Oct 2018 15:22:04 -0700 (MST) Subject: [vtkusers] vtk.js How to read my *.vti file using vtkHttpDataSetReader? Message-ID: <1538778124656-0.post@n5.nabble.com> I have uploaded a volume data *.vti file to my server and setting up the URL reader.setUrl(`http://xyz.com/files/test.vti`). It never loaded in my application? But when I set a URL from vtk.js samples it works fine. I observed there is a index.json file that needs to be loaded but couldn't get what's that and where to put in my website? Is there any documentation on index.json file? Or any reference or utility to create my own data file compatible to vtk.js loaders? Thanks. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sebastien.jourdain at kitware.com Fri Oct 5 18:31:02 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 5 Oct 2018 16:31:02 -0600 Subject: [vtkusers] vtk.js How to read my *.vti file using vtkHttpDataSetReader? In-Reply-To: <1538778124656-0.post@n5.nabble.com> References: <1538778124656-0.post@n5.nabble.com> Message-ID: In the example for the HttpDataSetReader we have the following comment: *Caution*: The example is not actually loading a vtp file but a data structure that was coming from a vtp file. For more details please read the vtkHttpDataSetReader API ; For your file format, you want to use that following reader: https://github.com/Kitware/vtk-js/tree/master/Sources/IO/XML/XMLImageDataReader On Fri, Oct 5, 2018 at 4:22 PM lucky via vtkusers < vtkusers at public.kitware.com> wrote: > I have uploaded a volume data *.vti file to my server and setting up the > URL > reader.setUrl(`http://xyz.com/files/test.vti` > ). It never loaded in my > application? But when I set a URL from vtk.js samples it works fine. I > observed there is a index.json file that needs to be loaded but couldn't > get > what's that and where to put in my website? Is there any documentation on > index.json file? Or any reference or utility to create my own data file > compatible to vtk.js loaders? > > Thanks. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From f_u_7 at yahoo.com Fri Oct 5 19:16:00 2018 From: f_u_7 at yahoo.com (lucky) Date: Fri, 5 Oct 2018 16:16:00 -0700 (MST) Subject: [vtkusers] vtk.js How to read my *.vti file using vtkHttpDataSetReader? In-Reply-To: References: <1538778124656-0.post@n5.nabble.com> Message-ID: <1538781360102-0.post@n5.nabble.com> Thanks for the answer. That's where I got confused. Did several tests to load but never worked. I have already checked these links and try to follow but couldn't get file loaded. So, you mean I have to manual create an index.json metadata file that should contain *.vti file information? Actually, I am interested to load the file from the internet (urlfile), not from the local disk, so that's why I guess I have to use HttpDataSetReader? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From f_u_7 at yahoo.com Fri Oct 5 20:02:55 2018 From: f_u_7 at yahoo.com (lucky) Date: Fri, 5 Oct 2018 17:02:55 -0700 (MST) Subject: [vtkusers] vtk.js How to read my *.vti file using vtkHttpDataSetReader? In-Reply-To: <1538781360102-0.post@n5.nabble.com> References: <1538778124656-0.post@n5.nabble.com> <1538781360102-0.post@n5.nabble.com> Message-ID: <1538784175446-0.post@n5.nabble.com> Finally resolved it. This code works fine for a URL https://xyz.pk/file/volume.vti const reader = vtkXMLImageDataReader.newInstance(); reader.setUrl(urlToLoad).then(() => { reader.loadData().then(() => { -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From f_u_7 at yahoo.com Fri Oct 5 22:18:40 2018 From: f_u_7 at yahoo.com (lucky) Date: Fri, 5 Oct 2018 19:18:40 -0700 (MST) Subject: [vtkusers] vtk.js How to read my *.vti file using vtkHttpDataSetReader? In-Reply-To: <1538784175446-0.post@n5.nabble.com> References: <1538778124656-0.post@n5.nabble.com> <1538781360102-0.post@n5.nabble.com> <1538784175446-0.post@n5.nabble.com> Message-ID: <1538792320914-0.post@n5.nabble.com> Sorry the issue was not with any reader or method. I was using https with the link which was not working. http works fine for me. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sebastien.jourdain at kitware.com Sat Oct 6 00:15:23 2018 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Fri, 5 Oct 2018 22:15:23 -0600 Subject: [vtkusers] vtk.js How to read my *.vti file using vtkHttpDataSetReader? In-Reply-To: <1538792320914-0.post@n5.nabble.com> References: <1538778124656-0.post@n5.nabble.com> <1538781360102-0.post@n5.nabble.com> <1538784175446-0.post@n5.nabble.com> <1538792320914-0.post@n5.nabble.com> Message-ID: Glad that you figure it out. The HttpDataSet reader was created to load some pre-processed dataset before we had any reader that could understand vtki/vtp format. We use that script [1] with ParaView to load any dataset and convert into that json + binary format that was easy to load in JavaScript over http. It is still an interesting format as it is well designed for dataset over the network when you don't want/need to load everything right away. [1] https://github.com/Kitware/vtk-js/blob/master/Utilities/DataGenerator/convert-cli.js On Fri, Oct 5, 2018 at 8:18 PM lucky via vtkusers < vtkusers at public.kitware.com> wrote: > Sorry the issue was not with any reader or method. > I was using https with the link which was not working. http works fine for > me. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bel101103105 at gmail.com Sat Oct 6 04:33:04 2018 From: Bel101103105 at gmail.com (Bel) Date: Sat, 6 Oct 2018 01:33:04 -0700 (MST) Subject: [vtkusers] Light follow camera in QVTKWidget and OpenGL 1/2 build Message-ID: <1538814784169-0.post@n5.nabble.com> Hello! I use QVTKWidget to render 3D object and take it 2D projections with different light params and positions. Only standard headlight is used. VTK build with OpenGL1 work fine, but in OpenGL2 I cant disable light follow camera: Interactor->SetLightFollowCamera(false); Renderer->SetLightFollowCamera(false); //disable light follow camera in OpenGL1, but not OpenGL2 What would you recommend doing? Use manually created light and on/off following light by camera observer? vtkLightKit? PS. I know that QVTKWidget is deprecated, but it provide simplest way to change OpenGL 1/2 build type. Or I'm wrong, is there an easier way? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From rasoul.sharifian1 at gmail.com Sat Oct 6 07:48:53 2018 From: rasoul.sharifian1 at gmail.com (Rasoul Sharifian) Date: Sat, 6 Oct 2018 15:18:53 +0330 Subject: [vtkusers] Intermixing Volumes and Multi Planar Reformatting Message-ID: Hi every one, I want to show my segmentation output in MPR view. Something like the file attached to this email. which functions do you suggest for this purpose? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: liver2_small.png Type: image/png Size: 224187 bytes Desc: not available URL: From sankhesh.jhaveri at kitware.com Sun Oct 7 23:14:14 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Sun, 7 Oct 2018 23:14:14 -0400 Subject: [vtkusers] Intermixing Volumes and Multi Planar Reformatting In-Reply-To: References: Message-ID: Rasoul, What kind of data do you expect as a result of the segmentation? If it is polygonal data, you can use vtkPolyDataMapper for the segmentation. If it is volumetric, you can use the vtkGPUVolumeRayCastMapper. As for the MPR view, take a look at vtkImageActor (or vtkImageResliceMapper, if you expect oblique slices). ? On Sat, Oct 6, 2018 at 7:49 AM Rasoul Sharifian wrote: > Hi every one, > I want to show my segmentation output in MPR view. Something like the file > attached to this email. which functions do you suggest for this purpose? > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://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 sankhesh.jhaveri at kitware.com Mon Oct 8 10:38:27 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 8 Oct 2018 10:38:27 -0400 Subject: [vtkusers] Intermixing Volumes and Multi Planar Reformatting In-Reply-To: References: Message-ID: Take a look at VTK examples for setting up pipelines for MPR and volume rendering. As for showing them in the same window, you just have to make sure that all the actors/props should be added to the same renderer. Hope that helps. ? On Mon, Oct 8, 2018 at 9:07 AM Rasoul Sharifian wrote: > How I can show both of them in the same window? > > > On Mon, Oct 8, 2018 at 3:09 PM Sankhesh Jhaveri < > sankhesh.jhaveri at kitware.com> wrote: > >> Yes, you can show both of them in the same view. >> ? >> >> On Mon, Oct 8, 2018 at 3:57 AM Rasoul Sharifian < >> rasoul.sharifian1 at gmail.com> wrote: >> >>> My output comes from ITK. Now I save it as a .mha file. So I think that >>> is volumetric one. Is that OK? And can I show both of them (MPR and >>> Volumetric) in same view? >>> >>> On Mon, Oct 8, 2018 at 6:44 AM Sankhesh Jhaveri < >>> sankhesh.jhaveri at kitware.com> wrote: >>> >>>> Rasoul, >>>> >>>> What kind of data do you expect as a result of the segmentation? If it >>>> is polygonal data, you can use vtkPolyDataMapper for the segmentation. If >>>> it is volumetric, you can use the vtkGPUVolumeRayCastMapper. >>>> >>>> As for the MPR view, take a look at vtkImageActor (or >>>> vtkImageResliceMapper, if you expect oblique slices). >>>> ? >>>> >>>> On Sat, Oct 6, 2018 at 7:49 AM Rasoul Sharifian < >>>> rasoul.sharifian1 at gmail.com> wrote: >>>> >>>>> Hi every one, >>>>> I want to show my segmentation output in MPR view. Something like the >>>>> file attached to this email. which functions do you suggest for this >>>>> purpose? >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> https://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> -- >>>> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >>>> | (518) 881-4417 >>>> ? >>>> >>> -- >> 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 spuchals at gmail.com Tue Oct 9 04:09:49 2018 From: spuchals at gmail.com (SevPuch) Date: Tue, 9 Oct 2018 01:09:49 -0700 (MST) Subject: [vtkusers] Correct use of vtkClipVolume in volume rendering? Message-ID: <1539072589362-0.post@n5.nabble.com> Hi everyone, It is indeed a basic question but I've striven to find any example or explanation in the mailing list or forum or stack overflow concerning this. I have a .mhd file that I render in volume following the medical volume rendering example. I'd like to implement volume exploration for this, so I think about using a plane (then spheres etc.) to clip the volume. But my following code has no effect, and I guess I need to use vtkClipVolume, but there zero information about how to use it in the documentation. Code : //Plane clipping vtkSmartPointer cuttingPlane = vtkSmartPointer::New(); cuttingPlane->SetOrigin(0, 0, 0); volumeMapper->AddClippingPlane(cuttingPlane); Thank you very much for your help, I find learning VTK is drastically slowed down because of missing information. Severin -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From deubel at dornheim-medical-images.com Tue Oct 9 07:55:29 2018 From: deubel at dornheim-medical-images.com (deubel at dornheim-medical-images.com) Date: Tue, 09 Oct 2018 11:55:29 +0000 Subject: [vtkusers] VTK with OpenVR on Linux (HTC Vive) In-Reply-To: References: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> Message-ID: <184dd1d294f5f45b43e52881a028c071@dornheim-medical-images.com> Dear Ken, I finally managed to get my code building and running on both Windows and Linux. You can find it here: https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip (https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip) Unfortunately, it doesn't work with the latest VTK-Version from https://gitlab.kitware.com/vtk/vtk (https://gitlab.kitware.com/vtk/vtk) After some testing, I found the first commit it doesn't build with: https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d111f6c10af3dd79488f919cc (https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d111f6c10af3dd79488f919cc) (VTK builds, but my program doesn't build with this VTK Version) Even though I already use the vtkOpenVR* classes explicitly, it doesn't build. Is there something else I have to change to make it compatible? Make produces the following Linker error: [ 50%] Linking CXX executable vtkOpenVRHelloWorld CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' Any help would be appreciated! Best regards, Max.D. 4. Oktober 2018 16:10, "Ken Martin" )> schrieb: You need to create an use an OpenVRCamera. From your code it doesn't look like you are. I doubt that is the crash but it could be. Does the example work on windows? Since linux is an unknown I would think it would be best to make sure you have something working on windows, then port to linux. On Thu, Oct 4, 2018 at 9:56 AM, wrote: Hey Guys, Has anyone of you been able to use the vtkOpenVR classes on Linux? I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to run the HelloWorld Example of VTK modified for VR, I encounter a segmentation fault. You can find the code I used here: https://pastebin.com/gjsvKy58 (https://pastebin.com/gjsvKy58) The whole project with binary and core dump can be found here: https://transfer.sh/6vONY/build.zip (https://transfer.sh/6vONY/build.zip) Do you have any suggestions on how to get this working? Thanks in advance! Best regards, Max.Deubel _______________________________________________ Powered by www.kitware.com (http://www.kitware.com) Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html (http://www.kitware.com/opensource/opensource.html) Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ (http://www.vtk.org/Wiki/VTK_FAQ) Search the list archives at: http://markmail.org/search/?q=vtkusers (http://markmail.org/search/?q=vtkusers) Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers (https://public.kitware.com/mailman/listinfo/vtkusers) -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 Tue Oct 9 08:42:22 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 9 Oct 2018 08:42:22 -0400 Subject: [vtkusers] VTK with OpenVR on Linux (HTC Vive) In-Reply-To: <184dd1d294f5f45b43e52881a028c071@dornheim-medical-images.com> References: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> <184dd1d294f5f45b43e52881a028c071@dornheim-medical-images.com> Message-ID: You have to explicitly instantiate the OpenVR classes. Basically change vtkNew renderWindow; to vtkNew renderWindow; for renderwindow, renderer, interactor and camera. Give that a shot. Thanks! Ken On Tue, Oct 9, 2018 at 7:55 AM, wrote: > Dear Ken, > I finally managed to get my code building and running on both Windows and > Linux. > You can find it here: > https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip > > Unfortunately, it doesn't work with the latest VTK-Version from > https://gitlab.kitware.com/vtk/vtk > After some testing, I found the first commit it doesn't build with: > https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d111f6c10af3dd7 > 9488f919cc > (VTK builds, but my program doesn't build with this VTK Version) > > Even though I already use the vtkOpenVR* classes explicitly, it doesn't > build. > Is there something else I have to change to make it compatible? > > Make produces the following Linker error: > > [ 50%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_ > 11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_ > 11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > > Any help would be appreciated! > > Best regards, > Max.D. > > > 4. Oktober 2018 16:10, "Ken Martin" > > schrieb: > > You need to create an use an OpenVRCamera. From your code it doesn't look > like you are. I doubt that is the crash but it could be. > Does the example work on windows? Since linux is an unknown I would think > it would be best to make sure you have something working on windows, then > port to linux. > On Thu, Oct 4, 2018 at 9:56 AM, > wrote: > > Hey Guys, > Has anyone of you been able to use the vtkOpenVR classes on Linux? > I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to > run the HelloWorld Example of VTK modified for VR, I encounter a > segmentation fault. > You can find the code I used here: https://pastebin.com/gjsvKy58 > The whole project with binary and core dump can be found here: > https://transfer.sh/6vONY/build.zip > > Do you have any suggestions on how to get this working? > > Thanks in advance! > > Best regards, > Max.Deubel > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 sankhesh.jhaveri at kitware.com Tue Oct 9 08:43:43 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 9 Oct 2018 08:43:43 -0400 Subject: [vtkusers] Intermixing Volumes and Multi Planar Reformatting In-Reply-To: References: Message-ID: Great! Once you?ve loaded the volume into a vtkImageData, you could use vtkFlyingEdges3D to create isosurfaces from the volume. Please keep replies on the list for the benefit of other users. Thanks, Sankhesh ? On Tue, Oct 9, 2018 at 4:49 AM Rasoul Sharifian wrote: > Thanks a lot, It worked. Do you have idea about showing segmentation > output as an isosurface not a volume? > > On Mon, Oct 8, 2018 at 6:08 PM Sankhesh Jhaveri < > sankhesh.jhaveri at kitware.com> wrote: > >> Take a look at VTK examples for setting up pipelines for MPR and volume >> rendering. >> As for showing them in the same window, you just have to make sure that >> all the actors/props should be added to the same renderer. >> >> Hope that helps. >> ? >> >> On Mon, Oct 8, 2018 at 9:07 AM Rasoul Sharifian < >> rasoul.sharifian1 at gmail.com> wrote: >> >>> How I can show both of them in the same window? >>> >>> >>> On Mon, Oct 8, 2018 at 3:09 PM Sankhesh Jhaveri < >>> sankhesh.jhaveri at kitware.com> wrote: >>> >>>> Yes, you can show both of them in the same view. >>>> ? >>>> >>>> On Mon, Oct 8, 2018 at 3:57 AM Rasoul Sharifian < >>>> rasoul.sharifian1 at gmail.com> wrote: >>>> >>>>> My output comes from ITK. Now I save it as a .mha file. So I think >>>>> that is volumetric one. Is that OK? And can I show both of them (MPR and >>>>> Volumetric) in same view? >>>>> >>>>> On Mon, Oct 8, 2018 at 6:44 AM Sankhesh Jhaveri < >>>>> sankhesh.jhaveri at kitware.com> wrote: >>>>> >>>>>> Rasoul, >>>>>> >>>>>> What kind of data do you expect as a result of the segmentation? If >>>>>> it is polygonal data, you can use vtkPolyDataMapper for the segmentation. >>>>>> If it is volumetric, you can use the vtkGPUVolumeRayCastMapper. >>>>>> >>>>>> As for the MPR view, take a look at vtkImageActor (or >>>>>> vtkImageResliceMapper, if you expect oblique slices). >>>>>> ? >>>>>> >>>>>> On Sat, Oct 6, 2018 at 7:49 AM Rasoul Sharifian < >>>>>> rasoul.sharifian1 at gmail.com> wrote: >>>>>> >>>>>>> Hi every one, >>>>>>> I want to show my segmentation output in MPR view. Something like >>>>>>> the file attached to this email. which functions do you suggest for this >>>>>>> purpose? >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> https://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>> -- >>>>>> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >>>>>> | (518) 881-4417 >>>>>> ? >>>>>> >>>>> -- >>>> Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware >>>> | (518) 881-4417 >>>> ? >>>> >>> -- >> 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 ken.martin at kitware.com Tue Oct 9 09:12:27 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 9 Oct 2018 09:12:27 -0400 Subject: [vtkusers] VTK with OpenVR on Linux (HTC Vive) In-Reply-To: <184dd1d294f5f45b43e52881a028c071@dornheim-medical-images.com> References: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> <184dd1d294f5f45b43e52881a028c071@dornheim-medical-images.com> Message-ID: You may need #include "vtkAutoInit.h" VTK_MODULE_INIT(vtkRenderingOpenGL2) VTK_MODULE_INIT(vtkRenderingOpenVR) or similar. Give that a shot - Ken On Tue, Oct 9, 2018 at 7:55 AM, wrote: > Dear Ken, > I finally managed to get my code building and running on both Windows and > Linux. > You can find it here: > https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip > > Unfortunately, it doesn't work with the latest VTK-Version from > https://gitlab.kitware.com/vtk/vtk > After some testing, I found the first commit it doesn't build with: > https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d111f6c10af3dd7 > 9488f919cc > (VTK builds, but my program doesn't build with this VTK Version) > > Even though I already use the vtkOpenVR* classes explicitly, it doesn't > build. > Is there something else I have to change to make it compatible? > > Make produces the following Linker error: > > [ 50%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_ > 11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_ > 11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > > Any help would be appreciated! > > Best regards, > Max.D. > > > 4. Oktober 2018 16:10, "Ken Martin" > > schrieb: > > You need to create an use an OpenVRCamera. From your code it doesn't look > like you are. I doubt that is the crash but it could be. > Does the example work on windows? Since linux is an unknown I would think > it would be best to make sure you have something working on windows, then > port to linux. > On Thu, Oct 4, 2018 at 9:56 AM, > wrote: > > Hey Guys, > Has anyone of you been able to use the vtkOpenVR classes on Linux? > I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to > run the HelloWorld Example of VTK modified for VR, I encounter a > segmentation fault. > You can find the code I used here: https://pastebin.com/gjsvKy58 > The whole project with binary and core dump can be found here: > https://transfer.sh/6vONY/build.zip > > Do you have any suggestions on how to get this working? > > Thanks in advance! > > Best regards, > Max.Deubel > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 andrewkeeling at hotmail.com Tue Oct 9 10:04:11 2018 From: andrewkeeling at hotmail.com (andyjk) Date: Tue, 9 Oct 2018 07:04:11 -0700 (MST) Subject: [vtkusers] Selecting/Extracting cells using points In-Reply-To: References: Message-ID: <1539093851381-0.post@n5.nabble.com> Resurrecting this - I cannot even get it to work in inverse mode, it only keeps the points, not the cells. I have tried using vtkExtractSelection and vtkExtractSelectedIds, but neither will extract the cells. Any idea what I am missing here? std::cout << "Removing " << ids_for_removal->GetNumberOfTuples() << " points on boundary" << std::endl; // Run the extraction filter (inverted) vtkSmartPointer selectionNode = vtkSmartPointer::New(); selectionNode->SetFieldType(vtkSelectionNode::POINT); selectionNode->SetContentType(vtkSelectionNode::INDICES); selectionNode->SetSelectionList(ids_for_removal); selectionNode->GetProperties()->Set(vtkSelectionNode::INVERSE(), 1); //invert the selection so we extract everything NOT labelled selectionNode->GetProperties()->Set(vtkSelectionNode::CONTAINING_CELLS(), 1); vtkSmartPointer selection = vtkSmartPointer::New(); selection->AddNode(selectionNode); vtkSmartPointer extractSelectedIds = vtkSmartPointer::New(); extractSelectedIds->SetInputData(0, mesh_in_out); extractSelectedIds->SetInputData(1, selection); extractSelectedIds->Update(); // Back up the data vtkSmartPointer temp2 = vtkSmartPointer::New(); temp2->DeepCopy(extractSelectedIds->GetOutput()); std::cout << "Before mesh has : " << mesh_in_out->GetNumberOfCells() << " cells and " << mesh_in_out->GetNumberOfPoints() << " points" << std::endl; std::cout << "Extracted mesh has : " << temp2->GetNumberOfCells() << " cells and " << temp2->GetNumberOfPoints() << " points" << std::endl; My output is : Removing 216 points on boundary Before mesh has : 125688 cells and 62941 points Extracted mesh has : 0 cells and 62725 points -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Tue Oct 9 14:55:22 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 9 Oct 2018 14:55:22 -0400 Subject: [vtkusers] VTK with OpenVR on Linux (HTC Vive) In-Reply-To: <7360269beeac1f2a46cc6ff8dede98d2@dornheim-medical-images.com> References: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> <184dd1d294f5f45b43e52881a028c071@dornheim-medical-images.com> <7360269beeac1f2a46cc6ff8dede98d2@dornheim-medical-images.com> Message-ID: Maybe try something like the following in your CMakeLists. It works for me without adding any autoinit stuff. find_package(VTK REQUIRED) vtk_module_config(VTK vtkCommonCore vtkCommonDataModel vtkFiltersGeneral vtkIOImage vtkIOXML vtkInteractionStyle vtkRenderingOpenGL2 vtkRenderingOpenVR ) include(${VTK_USE_FILE}) On Tue, Oct 9, 2018 at 12:27 PM, wrote: > Dear Ken, > I tried to paste those lines in like that: https://pastebin.com/SRmt1GNp > > More fixing seems to be needed, as I am getting a very similar (but > longer) linker error message: > > [100%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenVR_ModuleInit::vtkRenderingOpenVR_ModuleInit()': > /media/max/home/max/vtkOpenVRHelloWorld/CylinderRenderingProperties.cxx:5: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenVR_ModuleInit::~vtkRenderingOpenVR_ModuleInit( > )': > /media/max/home/max/vtkOpenVRHelloWorld/CylinderRenderingProperties.cxx:5: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_ > 11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_ > 11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > collect2: error: ld returned 1 exit status > CMakeFiles/vtkOpenVRHelloWorld.dir/build.make:149: recipe for target > 'vtkOpenVRHelloWorld' failed > make[2]: *** [vtkOpenVRHelloWorld] Error 1 > CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/vtkOpenVRHelloWorld.dir/all' > failed > make[1]: *** [CMakeFiles/vtkOpenVRHelloWorld.dir/all] Error 2 > Makefile:83: recipe for target 'all' failed > make: *** [all] Error 2 > > Do you a hint on what to try next? > > Best wishes, > Max.D. > > > > 9. Oktober 2018 15:12, "Ken Martin" > > schrieb: > > You may need > #include "vtkAutoInit.h" > VTK_MODULE_INIT(vtkRenderingOpenGL2) > VTK_MODULE_INIT(vtkRenderingOpenVR) > or similar. Give that a shot - Ken > On Tue, Oct 9, 2018 at 7:55 AM, > wrote: > > Dear Ken, > I finally managed to get my code building and running on both Windows and > Linux. > You can find it here: > https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip > > Unfortunately, it doesn't work with the latest VTK-Version from > https://gitlab.kitware.com/vtk/vtk > After some testing, I found the first commit it doesn't build with: > https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d11 > 1f6c10af3dd79488f919cc > (VTK builds, but my program doesn't build with this VTK Version) > > Even though I already use the vtkOpenVR* classes explicitly, it doesn't > build. > Is there something else I have to change to make it compatible? > > Make produces the following Linker error: > > [ 50%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > > Any help would be appreciated! > > Best regards, > Max.D. > > > 4. Oktober 2018 16:10, "Ken Martin" > > schrieb: > > You need to create an use an OpenVRCamera. From your code it doesn't look > like you are. I doubt that is the crash but it could be. > Does the example work on windows? Since linux is an unknown I would think > it would be best to make sure you have something working on windows, then > port to linux. > On Thu, Oct 4, 2018 at 9:56 AM, > wrote: > > Hey Guys, > Has anyone of you been able to use the vtkOpenVR classes on Linux? > I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to > run the HelloWorld Example of VTK modified for VR, I encounter a > segmentation fault. > You can find the code I used here: https://pastebin.com/gjsvKy58 > The whole project with binary and core dump can be found here: > https://transfer.sh/6vONY/build.zip > > Do you have any suggestions on how to get this working? > > Thanks in advance! > > Best regards, > Max.Deubel > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 rphellan2210 at gmail.com Tue Oct 9 22:41:32 2018 From: rphellan2210 at gmail.com (Renzo) Date: Tue, 9 Oct 2018 19:41:32 -0700 (MST) Subject: [vtkusers] Color a contour from a Niftii image Message-ID: <1539139292633-0.post@n5.nabble.com> Hello, I am trying to generate a visualization of a contour of a Niftii file, but with colors interpolated from that same image, not a monochrome representation. The resulting image shows the color variation, but it does not use the colors I set in my lookup table. Do you know why this could be happening? I wonder if it is because of the interpolation affecting not only hue, but also saturation and value parameters. My code is below. NiftiReader = vtk.vtkNIFTIImageReader() ren = vtk.vtkRenderer() ren.SetBackground(0, 0, 0) renWin = vtk.vtkRenderWindow() renWin.SetSize(800, 600) renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) surface = vtk.vtkContourFilter() surface.SetInputConnection(NiftiReader.GetOutputPort()) surface.SetValue(0,300) #Colors lut = vtk.vtkLookupTable() lut.SetNumberOfColors(256) lut.SetTableRange(400, 905) lut.SetHueRange(0.0, 0.75) lut.SetSaturationRange(1.0, 1.0) lut.SetValueRange(1.0, 1.0) lut.Build() #Map to colors mapToC = vtk.vtkImageMapToColors() mapToC.PassAlphaToOutputOn() mapToC.SetLookupTable(lut) mapToC.SetInputConnection(NiftiReader.GetOutputPort()) #mapToC.SetOutputFormatToLuminance() mapToC.Update() #Probe probe = vtk.vtkProbeFilter() probe.SetInputConnection(surface.GetOutputPort()) probe.SetSourceConnection(mapToC.GetOutputPort()) probe.Update() # Create a mapper and an actor for the extracted surface smapper = vtk.vtkPolyDataMapper() smapper.SetInputConnection(probe.GetOutputPort()) #smapper.ScalarVisibilityOn() #smapper.SetLookupTable(lut) #smapper.SetScalarRange(400, 905) #smapper.SetScalarModeToUseCellData() actor = vtk.vtkActor() actor.SetMapper(smapper) ren.AddActor(actor) iren.Initialize() renWin.Render() iren.Start() -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lasso at queensu.ca Wed Oct 10 00:18:41 2018 From: lasso at queensu.ca (Andras Lasso) Date: Wed, 10 Oct 2018 04:18:41 +0000 Subject: [vtkusers] Color a contour from a Niftii image In-Reply-To: <1539139292633-0.post@n5.nabble.com> References: <1539139292633-0.post@n5.nabble.com> Message-ID: The code that you shared extracts an isosurface at intensity value of 300, which means that all the voxels at the surface have this same intensity value. No matter what lookup table you specify because all point scalars retrieved by probe filter will have the value of 300. If I understand correctly, you would like to extract a colored model from a volume, without segmentation - similarly to how a volume rendered image would look like, just with surface models. The issue is that this is not possible - see detailed discussion here: https://discourse.slicer.org/t/save-volume-rendering-as-stl-file/524. If the goal is to 3D print volume rendering in then you can do it with special 3D printers as described here (not from surface meshes): https://discourse.slicer.org/t/printing-volume-renderings-in-plastic/3017. Andras -----Original Message----- From: vtkusers On Behalf Of Renzo Sent: Tuesday, October 9, 2018 10:42 PM To: vtkusers at vtk.org Subject: [vtkusers] Color a contour from a Niftii image Hello, I am trying to generate a visualization of a contour of a Niftii file, but with colors interpolated from that same image, not a monochrome representation. The resulting image shows the color variation, but it does not use the colors I set in my lookup table. Do you know why this could be happening? I wonder if it is because of the interpolation affecting not only hue, but also saturation and value parameters. My code is below. NiftiReader = vtk.vtkNIFTIImageReader() ren = vtk.vtkRenderer() ren.SetBackground(0, 0, 0) renWin = vtk.vtkRenderWindow() renWin.SetSize(800, 600) renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) surface = vtk.vtkContourFilter() surface.SetInputConnection(NiftiReader.GetOutputPort()) surface.SetValue(0,300) #Colors lut = vtk.vtkLookupTable() lut.SetNumberOfColors(256) lut.SetTableRange(400, 905) lut.SetHueRange(0.0, 0.75) lut.SetSaturationRange(1.0, 1.0) lut.SetValueRange(1.0, 1.0) lut.Build() #Map to colors mapToC = vtk.vtkImageMapToColors() mapToC.PassAlphaToOutputOn() mapToC.SetLookupTable(lut) mapToC.SetInputConnection(NiftiReader.GetOutputPort()) #mapToC.SetOutputFormatToLuminance() mapToC.Update() #Probe probe = vtk.vtkProbeFilter() probe.SetInputConnection(surface.GetOutputPort()) probe.SetSourceConnection(mapToC.GetOutputPort()) probe.Update() # Create a mapper and an actor for the extracted surface smapper = vtk.vtkPolyDataMapper() smapper.SetInputConnection(probe.GetOutputPort()) #smapper.ScalarVisibilityOn() #smapper.SetLookupTable(lut) #smapper.SetScalarRange(400, 905) #smapper.SetScalarModeToUseCellData() actor = vtk.vtkActor() actor.SetMapper(smapper) ren.AddActor(actor) iren.Initialize() renWin.Render() iren.Start() -- Sent from: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40queensu.ca%7Cf52a42c6a4f84bd2059908d62e59e613%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636747360992416000&sdata=XHh3%2FvLPCo5y6bSZ948mMzu6yUNiJ%2FxZ0ntIiHCDbr8%3D&reserved=0 _______________________________________________ Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Cf52a42c6a4f84bd2059908d62e59e613%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636747360992426005&sdata=TijHqv3xny7MSOSeZXBJMUcvIyItQSONJoWGJVbyVhs%3D&reserved=0 Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Cf52a42c6a4f84bd2059908d62e59e613%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636747360992426005&sdata=VkQW%2Bykknxgt4ao745Xy%2FuKPFKVOXuM0vkv0tINWCUU%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Cf52a42c6a4f84bd2059908d62e59e613%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636747360992426005&sdata=AjHN3HsAls4X8Ikc4OKCGh5QmO7HlBuImbNvg9eSbgk%3D&reserved=0 Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Cf52a42c6a4f84bd2059908d62e59e613%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636747360992426005&sdata=cHYAz%2Bijk2wA5JDo9km1LkWCPJL1PDriU1QiiOQW1Iw%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Cf52a42c6a4f84bd2059908d62e59e613%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636747360992426005&sdata=7oCmT%2BYJZNkAx3VcW9yFBly3yfdx2Cw2QNaad6PE64s%3D&reserved=0 From satwik.k8 at gmail.com Wed Oct 10 01:33:06 2018 From: satwik.k8 at gmail.com (satwik k) Date: Wed, 10 Oct 2018 11:03:06 +0530 Subject: [vtkusers] Multiplanar reconstruction(MPR) for MR Message-ID: Hey Guys, I'm facing problem in creating MPR for particular MR data set which is having image orientation: *0.08153987675905\0.77476596832275\0.62696808576583\0.03836457058787\0.62615668773651\-0.7787528038024* By using this orientation how can i able to find out in which plane the MR data has been acquired. whether it is Axial/Sagittal / Coronal? Is there any class in VTK which gives this output. PFA Image1 is the output i'm getting and Image2 is the expected output. [image: Image1 (2).PNG] [image: Image1 (1).PNG] Best Regards, Satwik k -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Image1 (2).PNG Type: image/png Size: 101835 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Image1 (1).PNG Type: image/png Size: 81746 bytes Desc: not available URL: From s.bruge at sim-and-cure.com Wed Oct 10 04:47:29 2018 From: s.bruge at sim-and-cure.com (sofi) Date: Wed, 10 Oct 2018 01:47:29 -0700 (MST) Subject: [vtkusers] VTK compilation with ExternalRendering Message-ID: <1539161249299-0.post@n5.nabble.com> Hi Everyone, I woud try to use the vtkExternalOpenGLCamera to set my own view and projection matrices. So after a git clone, I have tried to compile the last version of the master branch with Visual Studio 14. The compilation failed due to line 130: if ((ren->GetRenderWindow())->GetErase() && ren->GetErase() && !ren->GetIsPicking() ) -> vtkRenderer has no GetIsPicking member. If I comment this last part, everything compiles well but maybe it's not a good solution to remove this last test. What do you think? Best Regards Sophie -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From simon.esneault at gmail.com Wed Oct 10 08:16:15 2018 From: simon.esneault at gmail.com (Simon Esneault) Date: Wed, 10 Oct 2018 14:16:15 +0200 Subject: [vtkusers] (no subject) Message-ID: Hello community, We sometimes get an ugly crash in our app, for the first rendering on a 3D view on OSX. We are using QT 5.9.4, and VTK 8.1. Here is the stacktrace, does that ring a bell to anyone ? ********************************************************************************** 0: Process: App_Starter [65595] 1: Path: /Applications/EndoSize.app/Contents/MacOS/App_Starter 2: Identifier: App_Starter 3: Version: ??? 4: Code Type: X86-64 (Native) 5: Parent Process: ??? [1] 6: Responsible: App_Starter [65595] 7: User ID: 501 8: 9: Date/Time: 2018-10-10 13:41:35.706 +0200 10: OS Version: Mac OS X 10.13.6 (17G65) 11: Report Version: 12 12: Anonymous UUID: 2296AEBE-E6B4-BDDD-C0D9-5C1C10D27782 13: 14: Sleep/Wake UUID: E59AB7AB-66BB-4E40-9F86-4E6D8239F26B 15: 16: Time Awake Since Boot: 540000 seconds 17: Time Since Wake: 250 seconds 18: 19: System Integrity Protection: enabled 20: 21: Crashed Thread: 0 Dispatch queue: com.apple.main-thread 22: 23: Exception Type: EXC_CRASH (SIGABRT) 24: Exception Codes: 0x0000000000000000, 0x0000000000000000 25: Exception Note: EXC_CORPSE_NOTIFY 26: 27: Application Specific Information: 28: abort() called 29: 30: Application Specific Signatures: 31: Graphics hardware encountered an error and was reset: 0x00000003 32: 33: 34: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 35: 0 libsystem_kernel.dylib 0x00007fff51aacb66 __pthread_kill + 10 36: 1 libsystem_pthread.dylib 0x00007fff51c77080 pthread_kill + 333 37: 2 libsystem_c.dylib 0x00007fff51a081ae abort + 127 38: 3 libGPUSupportMercury.dylib 0x00007fff4259a0f1 gpusGenerateCrashLog + 168 39: 4 com.apple.driver.AppleIntelHD5000GraphicsGLDriver 0x0000000116900c5d gpusKillClientExt + 9 40: 5 libGPUSupportMercury.dylib 0x00007fff4259b63a gpusSubmitDataBuffers + 540 41: 6 com.apple.driver.AppleIntelHD5000GraphicsGLDriver 0x00000001164b963a IntelCommandBuffer::getNew(GLDContextRec*) + 178 42: 7 com.apple.driver.AppleIntelHD5000GraphicsGLDriver 0x00000001164b9232 intelSubmitCommands + 178 43: 8 com.apple.driver.AppleIntelHD5000GraphicsGLDriver 0x00000001164c6b76 intelFinishCommands + 187 44: 9 com.apple.driver.AppleIntelHD5000GraphicsGLDriver 0x00000001164c60e0 glrReadFramebufferData + 4556 45: 10 GLEngine 0x00007fff3406d4f9 glReadPixels_Exec + 1032 46: 11 libGL.dylib 0x00007fff334b7dc3 glReadPixels + 42 47: 12 libThVtk.dylib 0x000000010a49ae87 vtkOpenGLRenderWindow::ReadPixels(vtkRecti const&, int, int, int, void*, int) + 743 48: 13 libThVtk.dylib 0x000000010a49aa9d vtkOpenGLRenderWindow::GetPixelData(int, int, int, int, int, int) + 157 49: 14 libThVtk.dylib 0x000000010a5ccc43 vtkRenderer::Render() + 1683 50: 15 libThVtk.dylib 0x000000010a5cba09 vtkRendererCollection::Render() + 137 51: 16 libThVtk.dylib 0x000000010a5d624c vtkRenderWindow::DoStereoRender() + 140 52: 17 libThVtk.dylib 0x000000010a5d5559 vtkRenderWindow::Render() + 649 53: 18 libThVtk.dylib 0x000000010a42af02 vtkGenericOpenGLRenderWindow::Render() + 34 54: 19 libThVtk.dylib 0x000000010a5d9627 vtkRenderWindowInteractor::Render() + 39 55: 20 libThVtk.dylib 0x000000010a16b90a QVTKOpenGLWindow::paintGL() + 138 56: 21 QtGui 0x0000000110ef87a5 0x110e8f000 + 432037 57: 22 QtGui 0x0000000110ef85ad QPaintDeviceWindow::exposeEvent(QExposeEvent*) + 173 58: 23 QtGui 0x0000000110ecd25e QWindow::event(QEvent*) + 798 59: 24 QtGui 0x0000000110ef8656 QPaintDeviceWindow::event(QEvent*) + 118 60: 25 QtWidgets 0x00000001108f4c52 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 306 61: 26 QtWidgets 0x00000001108f5f6f QApplication::notify(QObject*, QEvent*) + 383 ********************************************************************************** Thanks Simon -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From silverusion at yandex.ru Wed Oct 10 15:52:55 2018 From: silverusion at yandex.ru (=?utf-8?B?0JjQstCw0L0g0JvQsNGA0LjQvtC90L7Qsg==?=) Date: Wed, 10 Oct 2018 22:52:55 +0300 Subject: [vtkusers] Question about visualization 3D image data with VTK Message-ID: <4667651539201175@iva5-d3020dc3459d.qloud-c.yandex.net> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: result.png Type: image/png Size: 6944 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source.png Type: image/png Size: 416959 bytes Desc: not available URL: From david.gobbi at gmail.com Wed Oct 10 16:21:46 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Wed, 10 Oct 2018 14:21:46 -0600 Subject: [vtkusers] Question about visualization 3D image data with VTK In-Reply-To: <4667651539201175@iva5-d3020dc3459d.qloud-c.yandex.net> References: <4667651539201175@iva5-d3020dc3459d.qloud-c.yandex.net> Message-ID: You will need to set the volume property, e.g.: https://lorensen.github.io/VTKExamples/site/Cxx/Medical/MedicalDemo4/ From msmerps at gmail.com Thu Oct 11 11:05:44 2018 From: msmerps at gmail.com (The Merper) Date: Thu, 11 Oct 2018 11:05:44 -0400 Subject: [vtkusers] using vtkLandmarkTransform to align two nii volumes Message-ID: Hi VTK experts, I am trying to using vtkLandmarkTransform to align two nii volumes and am getting puzzling results. I identify the landmarks in the two 3D volumes by visualizing the volumes in VTK and using the GetPickPosition method. The coordinates I get are in units of mm with the origin being one corner of 3D volume. I then use vtkLandmarkTransform to get an affine transformation to align the points. The points align great, but when I apply that same transform to the analogous nii volume via vtkImageReslice, the results are wildly off (e.g., the volume is flipped upside down). Is the qform matrix of each nii file somehow causing this? Do I need to first apply the qform matrix to the landmark points to get them in scanner coordinates before using vtkLandmarkTransform? thank you for any advice you can provide, -Ms. Merps -------------- next part -------------- An HTML attachment was scrubbed... URL: From silverusion at yandex.ru Fri Oct 12 03:10:33 2018 From: silverusion at yandex.ru (silverusion) Date: Fri, 12 Oct 2018 00:10:33 -0700 (MST) Subject: [vtkusers] Question about visualization 3D image data with VTK In-Reply-To: References: <4667651539201175@iva5-d3020dc3459d.qloud-c.yandex.net> Message-ID: <1539328233019-0.post@n5.nabble.com> Thank you for your answer. To simplify the analysis of correctness, I created a test image. Added volume property code: vtkNew volumeProperty; volumeProperty->SetInterpolationTypeToLinear(); volumeProperty-> ShadeOn (); v-> SetMapper (volumeMapper); v-> SetProperty (volumeProperty); However, this solution did not help correctly display the loaded image. I also tried to set the parameters Ambient, Diffuse, Specular. I attach the original object and the result of the visualization. Maybe tell me what could I miss? On the original image, different levels of brightness of the object are clearly visible, while rendering the brightness is completely different. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From david.gobbi at gmail.com Fri Oct 12 06:02:10 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 12 Oct 2018 04:02:10 -0600 Subject: [vtkusers] Question about visualization 3D image data with VTK In-Reply-To: <1539328233019-0.post@n5.nabble.com> References: <4667651539201175@iva5-d3020dc3459d.qloud-c.yandex.net> <1539328233019-0.post@n5.nabble.com> Message-ID: The property needs a color transfer function and an opacity transfer function. Please read all the comments in the example, the comments will answer most of your questions. There is also a description of the volume rendering process in the VTK textbook: https://lorensen.github.io/VTKExamples/site/VTKBook/07Chapter7/#77-volume-classification To keep things simple at first, you can use ShadeOff() and you can ignore the gradient opacity function. But the color transfer function and the opacity transfer function are always required. David From edo.paskino at gmail.com Fri Oct 12 06:25:51 2018 From: edo.paskino at gmail.com (Edoardo Pasca) Date: Fri, 12 Oct 2018 11:25:51 +0100 Subject: [vtkusers] slicing ploydata with plane Message-ID: dear all, I am displaying a volume with an interactor style vtkInteractorStyleImage . That means I'm looking at slices. I'm overlaying a group of points in space as a polydata. The expected behaviour would be to be able to see the points which are in the current slice. The slice is updated by a MouseWheelForwardEvent and MouseWheelBackwardEvent. I attach a small drawing to clarify. 1) the drawing depicts a side view (say XZ). The camera is looking from the top on the XY plane 2) the points I am talking about are the circles connected with line. 3) the slice I'm showing is 1 voxel thick, is colored in red and is at Z_slice 4) in red are also the points I expect to see If I display the polydata as is, I will see every point whose Z >= Z_slice, as the one below the slice will be hidden by it. Therefore: 1) I use a vtkClipPolyData with a plane implicit function. 2) I added an observer to update the plane position on mouse wheel back/forward events. 3) I attached the observers to the same callback. 4) the callback puts the plane at Z_slice While the MouseWheelBackwardEvent works fine, the MouseWheelForwardEvent does what I expect only if I shift the plane of +2 voxels in Z. Do you have any explanation on why should I add that +2 voxel shift? Thanks Edo -- Edo I know you think you understand what you thought I said, but I'm not sure you realize that what you heard is not what I meant (prob. Alan Greenspan) :wq -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: slice.jpg Type: image/jpeg Size: 65335 bytes Desc: not available URL: From jon.haitz.legarreta at gmail.com Fri Oct 12 09:04:33 2018 From: jon.haitz.legarreta at gmail.com (=?UTF-8?Q?Jon_Haitz_Legarreta_Gorro=C3=B1o?=) Date: Fri, 12 Oct 2018 09:04:33 -0400 Subject: [vtkusers] using vtkLandmarkTransform to align two nii volumes In-Reply-To: References: Message-ID: Hi, I'd dare to say that the short answer is yes. Long answer is that VTK deals with world coordinates, and according to the right hand rule. NIfTI uses RAS convention. According to the vtkNIFTIImageReader::GetQFormMatrix documentation, NIfTI does not ensure that coordinates are stored following that convention, so you should definitely use the matrix given. The following Slicer 3D wiki page and David Gobbi's document be helpful to this end: https://www.slicer.org/wiki/Coordinate_systems http://calgaryimageanalysis.ca/wiki/images/5/52/Image-orientation.pdf May be David himself can chime in and be able to provide a better or cleaner explanation. HTH, JON HAITZ On Thu, Oct 11, 2018 at 11:05 AM The Merper wrote: > > Hi VTK experts, > I am trying to using vtkLandmarkTransform to align two nii volumes and am getting puzzling results. I identify the landmarks in the two 3D volumes by visualizing the volumes in VTK and using the GetPickPosition method. The coordinates I get are in units of mm with the origin being one corner of 3D volume. > I then use vtkLandmarkTransform to get an affine transformation to align the points. The points align great, but when I apply that same transform to the analogous nii volume via vtkImageReslice, the results are wildly off (e.g., the volume is flipped upside down). > Is the qform matrix of each nii file somehow causing this? Do I need to first apply the qform matrix to the landmark points to get them in scanner coordinates before using vtkLandmarkTransform? > thank you for any advice you can provide, > -Ms. Merps > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From david.gobbi at gmail.com Fri Oct 12 10:31:00 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 12 Oct 2018 08:31:00 -0600 Subject: [vtkusers] using vtkLandmarkTransform to align two nii volumes In-Reply-To: References: Message-ID: Hi Jon, The vtkNIFTIImageReader ensures that the vtkImageData that it produces follows the right-hand-rule, even if the slices were ordered in reverse in the NIFTI file itself. As the documentation states: ...if QFac is -1, then the first slice in the VTK image data is the last slice in the NIFTI file... All the details of qfac are documented in the nifti header file: https://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h Use of the qform in VTK is optional. Use it if you want to work in RAS coordinates. But often it is both simpler and more appropriate to work in VTK data coordinates instead, and to me it sounds like this is the case for the original question. In any case, vtkImageReslice uses VTK data coordinates (not VTK world coordinates, nor RAS coordinates). I know this isn't a very clear explanation, but unfortunately it's all I have time for (and all that my brain is capable of right now, given the tiny amount of sleep I've had over the past few days). - David On Fri, Oct 12, 2018 at 7:05 AM Jon Haitz Legarreta Gorro?o wrote: > > Hi, > I'd dare to say that the short answer is yes. > > Long answer is that VTK deals with world coordinates, and according to > the right hand rule. NIfTI uses RAS convention. According to the > vtkNIFTIImageReader::GetQFormMatrix documentation, NIfTI does not > ensure that coordinates are stored following that convention, so you > should definitely use the matrix given. > > The following Slicer 3D wiki page and David Gobbi's document be > helpful to this end: > https://www.slicer.org/wiki/Coordinate_systems > http://calgaryimageanalysis.ca/wiki/images/5/52/Image-orientation.pdf > > May be David himself can chime in and be able to provide a better or > cleaner explanation. > > HTH, > JON HAITZ > > On Thu, Oct 11, 2018 at 11:05 AM The Merper wrote: > > > > Hi VTK experts, > > I am trying to using vtkLandmarkTransform to align two nii volumes and am getting puzzling results. I identify the landmarks in the two 3D volumes by visualizing the volumes in VTK and using the GetPickPosition method. The coordinates I get are in units of mm with the origin being one corner of 3D volume. > > I then use vtkLandmarkTransform to get an affine transformation to align the points. The points align great, but when I apply that same transform to the analogous nii volume via vtkImageReslice, the results are wildly off (e.g., the volume is flipped upside down). > > Is the qform matrix of each nii file somehow causing this? Do I need to first apply the qform matrix to the landmark points to get them in scanner coordinates before using vtkLandmarkTransform? > > thank you for any advice you can provide, > > -Ms. Merps From msmerps at gmail.com Fri Oct 12 13:46:51 2018 From: msmerps at gmail.com (The Merper) Date: Fri, 12 Oct 2018 13:46:51 -0400 Subject: [vtkusers] using vtkLandmarkTransform to align two nii volumes In-Reply-To: References: Message-ID: Thanks very much for the speedy help, David & Jon. Applying the inverse of the landmark transform derived from the points solved the problem. I still don't understand why for polydata you apply the landmark transform and for image data you apply the inverse, but that's Ok for now. I also want to write the transformed nii volume to file. In addition to using SetInformationInput to set the transformed nii volume's spacing, origin, and extent, is there any other information I should be modifying in the transformed Nii's header? thank you again, -M On Fri, Oct 12, 2018 at 10:31 AM David Gobbi wrote: > Hi Jon, > > The vtkNIFTIImageReader ensures that the vtkImageData that it produces > follows the right-hand-rule, even if the slices were ordered in > reverse in the NIFTI file itself. As the documentation states: > > ...if QFac is -1, then the first slice in the VTK image data is the > last slice in the NIFTI file... > > All the details of qfac are documented in the nifti header file: > https://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h > > Use of the qform in VTK is optional. Use it if you want to work in > RAS coordinates. But often it is both simpler and more appropriate to > work in VTK data coordinates instead, and to me it sounds like this is > the case for the original question. In any case, vtkImageReslice uses > VTK data coordinates (not VTK world coordinates, nor RAS coordinates). > > I know this isn't a very clear explanation, but unfortunately it's all > I have time for (and all that my brain is capable of right now, given > the tiny amount of sleep I've had over the past few days). > > - David > > > On Fri, Oct 12, 2018 at 7:05 AM Jon Haitz Legarreta Gorro?o > wrote: > > > > Hi, > > I'd dare to say that the short answer is yes. > > > > Long answer is that VTK deals with world coordinates, and according to > > the right hand rule. NIfTI uses RAS convention. According to the > > vtkNIFTIImageReader::GetQFormMatrix documentation, NIfTI does not > > ensure that coordinates are stored following that convention, so you > > should definitely use the matrix given. > > > > The following Slicer 3D wiki page and David Gobbi's document be > > helpful to this end: > > https://www.slicer.org/wiki/Coordinate_systems > > http://calgaryimageanalysis.ca/wiki/images/5/52/Image-orientation.pdf > > > > May be David himself can chime in and be able to provide a better or > > cleaner explanation. > > > > HTH, > > JON HAITZ > > > > On Thu, Oct 11, 2018 at 11:05 AM The Merper wrote: > > > > > > Hi VTK experts, > > > I am trying to using vtkLandmarkTransform to align two nii volumes > and am getting puzzling results. I identify the landmarks in the two 3D > volumes by visualizing the volumes in VTK and using the GetPickPosition > method. The coordinates I get are in units of mm with the origin being one > corner of 3D volume. > > > I then use vtkLandmarkTransform to get an affine transformation to > align the points. The points align great, but when I apply that same > transform to the analogous nii volume via vtkImageReslice, the results are > wildly off (e.g., the volume is flipped upside down). > > > Is the qform matrix of each nii file somehow causing this? Do I > need to first apply the qform matrix to the landmark points to get them in > scanner coordinates before using vtkLandmarkTransform? > > > thank you for any advice you can provide, > > > -Ms. Merps > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Oct 12 14:08:54 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 12 Oct 2018 12:08:54 -0600 Subject: [vtkusers] using vtkLandmarkTransform to align two nii volumes In-Reply-To: References: Message-ID: For writing a nifti file after registration, it's very important to set the sform and qform for the writer to the sform and qform of the reference image (I.e. _not_ the qform, sform of the image that was resliced!) writer->SetSFormMatrix(referenceReader->GetSFormMatrix()); writer->SetQFormMatrix(referenceReader->GetQFormMatrix()); if (referenceReader->GetQFac() < 1) { writer->SetQFac(-1.0); } The QFac setting ensures that the slices are written in the same order as the reference image. It's possible to copy other parts of the header, too, but you have to be careful when you do so, since some parts of the header relate to the reference image, other parts of the header relate to the image that was resliced, and some parts relate to neither. Just copying the qform and sform is usually sufficient. David On Fri, Oct 12, 2018 at 11:47 AM The Merper wrote: > > Thanks very much for the speedy help, David & Jon. > Applying the inverse of the landmark transform derived from the points solved the problem. > I still don't understand why for polydata you apply the landmark transform and for image data you apply the inverse, but that's Ok for now. > > I also want to write the transformed nii volume to file. In addition to using SetInformationInput to set the transformed nii volume's spacing, origin, and extent, is there any other information I should be modifying in the transformed Nii's header? > thank you again, > -M > > > On Fri, Oct 12, 2018 at 10:31 AM David Gobbi wrote: >> >> Hi Jon, >> >> The vtkNIFTIImageReader ensures that the vtkImageData that it produces >> follows the right-hand-rule, even if the slices were ordered in >> reverse in the NIFTI file itself. As the documentation states: >> >> ...if QFac is -1, then the first slice in the VTK image data is the >> last slice in the NIFTI file... >> >> All the details of qfac are documented in the nifti header file: >> https://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h >> >> Use of the qform in VTK is optional. Use it if you want to work in >> RAS coordinates. But often it is both simpler and more appropriate to >> work in VTK data coordinates instead, and to me it sounds like this is >> the case for the original question. In any case, vtkImageReslice uses >> VTK data coordinates (not VTK world coordinates, nor RAS coordinates). >> >> I know this isn't a very clear explanation, but unfortunately it's all >> I have time for (and all that my brain is capable of right now, given >> the tiny amount of sleep I've had over the past few days). >> >> - David >> >> >> On Fri, Oct 12, 2018 at 7:05 AM Jon Haitz Legarreta Gorro?o >> wrote: >> > >> > Hi, >> > I'd dare to say that the short answer is yes. >> > >> > Long answer is that VTK deals with world coordinates, and according to >> > the right hand rule. NIfTI uses RAS convention. According to the >> > vtkNIFTIImageReader::GetQFormMatrix documentation, NIfTI does not >> > ensure that coordinates are stored following that convention, so you >> > should definitely use the matrix given. >> > >> > The following Slicer 3D wiki page and David Gobbi's document be >> > helpful to this end: >> > https://www.slicer.org/wiki/Coordinate_systems >> > http://calgaryimageanalysis.ca/wiki/images/5/52/Image-orientation.pdf >> > >> > May be David himself can chime in and be able to provide a better or >> > cleaner explanation. >> > >> > HTH, >> > JON HAITZ >> > >> > On Thu, Oct 11, 2018 at 11:05 AM The Merper wrote: >> > > >> > > Hi VTK experts, >> > > I am trying to using vtkLandmarkTransform to align two nii volumes and am getting puzzling results. I identify the landmarks in the two 3D volumes by visualizing the volumes in VTK and using the GetPickPosition method. The coordinates I get are in units of mm with the origin being one corner of 3D volume. >> > > I then use vtkLandmarkTransform to get an affine transformation to align the points. The points align great, but when I apply that same transform to the analogous nii volume via vtkImageReslice, the results are wildly off (e.g., the volume is flipped upside down). >> > > Is the qform matrix of each nii file somehow causing this? Do I need to first apply the qform matrix to the landmark points to get them in scanner coordinates before using vtkLandmarkTransform? >> > > thank you for any advice you can provide, >> > > -Ms. Merps From david.gobbi at gmail.com Fri Oct 12 14:11:45 2018 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 12 Oct 2018 12:11:45 -0600 Subject: [vtkusers] using vtkLandmarkTransform to align two nii volumes In-Reply-To: References: Message-ID: I made a typo in the code in my last reply. It should be: if (referenceReader->GetQFac() < 0.0) { writer->SetQFac(-1.0); } On Fri, Oct 12, 2018 at 12:08 PM David Gobbi wrote: > > For writing a nifti file after registration, it's very important to > set the sform and qform for the writer to the sform and qform of the > reference image (I.e. _not_ the qform, sform of the image that was > resliced!) > > writer->SetSFormMatrix(referenceReader->GetSFormMatrix()); > writer->SetQFormMatrix(referenceReader->GetQFormMatrix()); > if (referenceReader->GetQFac() < 1) { > writer->SetQFac(-1.0); > } > > The QFac setting ensures that the slices are written in the same order > as the reference image. > > It's possible to copy other parts of the header, too, but you have to > be careful when you do so, since some parts of the header relate to > the reference image, other parts of the header relate to the image > that was resliced, and some parts relate to neither. Just copying the > qform and sform is usually sufficient. > > David > > On Fri, Oct 12, 2018 at 11:47 AM The Merper wrote: > > > > Thanks very much for the speedy help, David & Jon. > > Applying the inverse of the landmark transform derived from the points solved the problem. > > I still don't understand why for polydata you apply the landmark transform and for image data you apply the inverse, but that's Ok for now. > > > > I also want to write the transformed nii volume to file. In addition to using SetInformationInput to set the transformed nii volume's spacing, origin, and extent, is there any other information I should be modifying in the transformed Nii's header? > > thank you again, > > -M > > > > > > On Fri, Oct 12, 2018 at 10:31 AM David Gobbi wrote: > >> > >> Hi Jon, > >> > >> The vtkNIFTIImageReader ensures that the vtkImageData that it produces > >> follows the right-hand-rule, even if the slices were ordered in > >> reverse in the NIFTI file itself. As the documentation states: > >> > >> ...if QFac is -1, then the first slice in the VTK image data is the > >> last slice in the NIFTI file... > >> > >> All the details of qfac are documented in the nifti header file: > >> https://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h > >> > >> Use of the qform in VTK is optional. Use it if you want to work in > >> RAS coordinates. But often it is both simpler and more appropriate to > >> work in VTK data coordinates instead, and to me it sounds like this is > >> the case for the original question. In any case, vtkImageReslice uses > >> VTK data coordinates (not VTK world coordinates, nor RAS coordinates). > >> > >> I know this isn't a very clear explanation, but unfortunately it's all > >> I have time for (and all that my brain is capable of right now, given > >> the tiny amount of sleep I've had over the past few days). > >> > >> - David > >> > >> > >> On Fri, Oct 12, 2018 at 7:05 AM Jon Haitz Legarreta Gorro?o > >> wrote: > >> > > >> > Hi, > >> > I'd dare to say that the short answer is yes. > >> > > >> > Long answer is that VTK deals with world coordinates, and according to > >> > the right hand rule. NIfTI uses RAS convention. According to the > >> > vtkNIFTIImageReader::GetQFormMatrix documentation, NIfTI does not > >> > ensure that coordinates are stored following that convention, so you > >> > should definitely use the matrix given. > >> > > >> > The following Slicer 3D wiki page and David Gobbi's document be > >> > helpful to this end: > >> > https://www.slicer.org/wiki/Coordinate_systems > >> > http://calgaryimageanalysis.ca/wiki/images/5/52/Image-orientation.pdf > >> > > >> > May be David himself can chime in and be able to provide a better or > >> > cleaner explanation. > >> > > >> > HTH, > >> > JON HAITZ > >> > > >> > On Thu, Oct 11, 2018 at 11:05 AM The Merper wrote: > >> > > > >> > > Hi VTK experts, > >> > > I am trying to using vtkLandmarkTransform to align two nii volumes and am getting puzzling results. I identify the landmarks in the two 3D volumes by visualizing the volumes in VTK and using the GetPickPosition method. The coordinates I get are in units of mm with the origin being one corner of 3D volume. > >> > > I then use vtkLandmarkTransform to get an affine transformation to align the points. The points align great, but when I apply that same transform to the analogous nii volume via vtkImageReslice, the results are wildly off (e.g., the volume is flipped upside down). > >> > > Is the qform matrix of each nii file somehow causing this? Do I need to first apply the qform matrix to the landmark points to get them in scanner coordinates before using vtkLandmarkTransform? > >> > > thank you for any advice you can provide, > >> > > -Ms. Merps From msmerps at gmail.com Fri Oct 12 16:15:26 2018 From: msmerps at gmail.com (The Merper) Date: Fri, 12 Oct 2018 16:15:26 -0400 Subject: [vtkusers] using vtkLandmarkTransform to align two nii volumes In-Reply-To: References: Message-ID: Thank you, Mr. Gobbi! I owe you one. -M On Fri, Oct 12, 2018 at 2:11 PM David Gobbi wrote: > I made a typo in the code in my last reply. It should be: > > if (referenceReader->GetQFac() < 0.0) { > writer->SetQFac(-1.0); > } > On Fri, Oct 12, 2018 at 12:08 PM David Gobbi > wrote: > > > > For writing a nifti file after registration, it's very important to > > set the sform and qform for the writer to the sform and qform of the > > reference image (I.e. _not_ the qform, sform of the image that was > > resliced!) > > > > writer->SetSFormMatrix(referenceReader->GetSFormMatrix()); > > writer->SetQFormMatrix(referenceReader->GetQFormMatrix()); > > if (referenceReader->GetQFac() < 1) { > > writer->SetQFac(-1.0); > > } > > > > The QFac setting ensures that the slices are written in the same order > > as the reference image. > > > > It's possible to copy other parts of the header, too, but you have to > > be careful when you do so, since some parts of the header relate to > > the reference image, other parts of the header relate to the image > > that was resliced, and some parts relate to neither. Just copying the > > qform and sform is usually sufficient. > > > > David > > > > On Fri, Oct 12, 2018 at 11:47 AM The Merper wrote: > > > > > > Thanks very much for the speedy help, David & Jon. > > > Applying the inverse of the landmark transform derived from the points > solved the problem. > > > I still don't understand why for polydata you apply the landmark > transform and for image data you apply the inverse, but that's Ok for now. > > > > > > I also want to write the transformed nii volume to file. In addition > to using SetInformationInput to set the transformed nii volume's spacing, > origin, and extent, is there any other information I should be modifying in > the transformed Nii's header? > > > thank you again, > > > -M > > > > > > > > > On Fri, Oct 12, 2018 at 10:31 AM David Gobbi > wrote: > > >> > > >> Hi Jon, > > >> > > >> The vtkNIFTIImageReader ensures that the vtkImageData that it produces > > >> follows the right-hand-rule, even if the slices were ordered in > > >> reverse in the NIFTI file itself. As the documentation states: > > >> > > >> ...if QFac is -1, then the first slice in the VTK image data is the > > >> last slice in the NIFTI file... > > >> > > >> All the details of qfac are documented in the nifti header file: > > >> https://nifti.nimh.nih.gov/pub/dist/src/niftilib/nifti1.h > > >> > > >> Use of the qform in VTK is optional. Use it if you want to work in > > >> RAS coordinates. But often it is both simpler and more appropriate to > > >> work in VTK data coordinates instead, and to me it sounds like this is > > >> the case for the original question. In any case, vtkImageReslice uses > > >> VTK data coordinates (not VTK world coordinates, nor RAS coordinates). > > >> > > >> I know this isn't a very clear explanation, but unfortunately it's all > > >> I have time for (and all that my brain is capable of right now, given > > >> the tiny amount of sleep I've had over the past few days). > > >> > > >> - David > > >> > > >> > > >> On Fri, Oct 12, 2018 at 7:05 AM Jon Haitz Legarreta Gorro?o > > >> wrote: > > >> > > > >> > Hi, > > >> > I'd dare to say that the short answer is yes. > > >> > > > >> > Long answer is that VTK deals with world coordinates, and according > to > > >> > the right hand rule. NIfTI uses RAS convention. According to the > > >> > vtkNIFTIImageReader::GetQFormMatrix documentation, NIfTI does not > > >> > ensure that coordinates are stored following that convention, so you > > >> > should definitely use the matrix given. > > >> > > > >> > The following Slicer 3D wiki page and David Gobbi's document be > > >> > helpful to this end: > > >> > https://www.slicer.org/wiki/Coordinate_systems > > >> > > http://calgaryimageanalysis.ca/wiki/images/5/52/Image-orientation.pdf > > >> > > > >> > May be David himself can chime in and be able to provide a better or > > >> > cleaner explanation. > > >> > > > >> > HTH, > > >> > JON HAITZ > > >> > > > >> > On Thu, Oct 11, 2018 at 11:05 AM The Merper > wrote: > > >> > > > > >> > > Hi VTK experts, > > >> > > I am trying to using vtkLandmarkTransform to align two nii > volumes and am getting puzzling results. I identify the landmarks in the > two 3D volumes by visualizing the volumes in VTK and using the > GetPickPosition method. The coordinates I get are in units of mm with the > origin being one corner of 3D volume. > > >> > > I then use vtkLandmarkTransform to get an affine > transformation to align the points. The points align great, but when I > apply that same transform to the analogous nii volume via vtkImageReslice, > the results are wildly off (e.g., the volume is flipped upside down). > > >> > > Is the qform matrix of each nii file somehow causing this? Do > I need to first apply the qform matrix to the landmark points to get them > in scanner coordinates before using vtkLandmarkTransform? > > >> > > thank you for any advice you can provide, > > >> > > -Ms. Merps > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patricio.sandana at synopsys.com Fri Oct 12 16:13:52 2018 From: patricio.sandana at synopsys.com (Pato Sandana) Date: Fri, 12 Oct 2018 20:13:52 +0000 Subject: [vtkusers] Drawing custom image with depth buffer and a translucent plane Message-ID: <4A2A9A281AE5D54CA205FB13069FD874017ACEF22D@US01WEMBX2.internal.synopsys.com> Hi Everyone, I'm trying to draw a vtkVolume and a vtkPlaneWidget both intersecting and the vtkPlaneWidget is translucent. I cannot achieve that, either the plane is totally behind or front. For a vtkActor with the same box extent this works. I tried to get the z-buffer from the context using vtkRenderer::GetZbufferData() method, but I only get 1s. (Is this correct?) I also tried to write the z-buffer data I got with vtkRenderer::SetZbuferData() method, but the plane is still behind. Any hints how to achieve this? Thanks in advance. Regards, Pato Sanda?a TCAD Senior R&D Engineer Synopsys Inc. - Santiago, Chile [https://spp/pic/corporate/Lists/Signatures%20Database/Attachments/164/CS12924_AutomotiveEmailSignature_2.jpg] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 11353 bytes Desc: image001.jpg URL: From berti_krueger at hotmail.com Sun Oct 14 00:35:37 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Sun, 14 Oct 2018 04:35:37 +0000 Subject: [vtkusers] Alternative to vtkDelaunay2D for surface reconstruction or how to get rid of "Edge not recovered, polygon fill suspect" Message-ID: Hello everyone. In my project i have a standard 3D triangle mesh surface where i select all vertices which lie inside a region (polygon) which is defined by a closed polyline created by an user interaction using the vtkContourWidget: [cid:inline_01 at geary] I then create a polygon mesh which has the shape of the vtkContourWidget polygon selection contour line plus the selected part of the underlying mesh and which lies like a sticker or texture on the the given stl mesh surface: [cid:inline_00 at geary] For the reconstruction of the surface i use the vtkDelaunay2D filter using all the points of the vtkContourWidget polygon and the mesh surface points as inputs. This works absolutely great but depending on the used mesh i sometimes get the following error message from the vtkDelaunay2D filter: "vtkDelaunay2D (0x556183dcfba0): Edge not recovered, polygon fill suspect" Does anybody know why this happens and what i can do to get rid of this error? While nice, but since i don't necessarily need the delaunay properties, is there an alternative to the vtkDelaunay2D filter to get a polygon surface mesh given a bunch of points as an input? (points -> surface) Thank you very much in advance. Regards, Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_delaunay.jpg Type: image/jpeg Size: 259659 bytes Desc: vtk_delaunay.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: selection1.png Type: image/png Size: 968853 bytes Desc: selection1.png URL: From evgenimalikova at gmail.com Mon Oct 15 00:47:45 2018 From: evgenimalikova at gmail.com (Evgeniya Malikova) Date: Mon, 15 Oct 2018 05:47:45 +0100 Subject: [vtkusers] CMake custom class python wrapping doesn't work Message-ID: Hello. I have a common wrapping that previously worked on windows 8.1 with VTK 8.1.1. As I had problems to compile vtk8 on Mac (don't remember all details of that) I switched to https://gitlab.kitware.com/vtk/vtk.git. With following settings compilation on Mac of custom class gives a strange error, referencing some hierarchy file: [ 85%] Built target vtkHF make[5]: *** No rule to make target `../../hf/pythonClasses/vtkHFHierarchy', needed by `hf/pythonClasses/vtkHFFunctionPython.cxx'. Stop. make[4]: *** [hf/pythonClasses/CMakeFiles/vtkHFPythonD.dir/all] Error 2 make[3]: *** [all] Error 2 make[2]: *** [hfvisual-prefix/src/hfvisual-stamp/hfvisual-build] Error 2 make[1]: *** [CMakeFiles/hfvisual.dir/all] Error 2 make: *** [all] Error 2 //------------- My CMakeLists: find_package(VTK REQUIRED vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkImagingHybrid vtkImagingCore vtkImagingStencil vtkImagingGeneral vtkFiltersCore vtkRenderingCore vtkWrappingPythonCore ) include(${VTK_USE_FILE}) # Python and vtk wrapping find_package(PythonInterp REQUIRED) find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED) set(CUSTOM_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) include(vtkWrapPython) include_directories("${PYTHON_INCLUDE_PATH}") set (OPENAL_INCLUDE_DIR ${INSTALL_DEPENDENCIES_DIR}/include/AL) LINK_DIRECTORIES(${INSTALL_DEPENDENCIES_DIR}/lib/) set(CMAKE_MACOSX_RPATH 1) set (openAL OpenAL32) if( APPLE ) set (openAL OpenAL) endif() set (OPENAL_LIBRARY} ${INSTALL_DEPENDENCIES_DIR}/lib/${openAL}) set (ALUT_LIBRARY} ${INSTALL_DEPENDENCIES_DIR}/lib/alut) include_directories(${OPENAL_INCLUDE_DIR}) include_directories(${INSTALL_DEPENDENCIES_DIR}/include) ####################################### # Building vtkHFFunction list(APPEND libraries_list cppinterpreter) .... add_library(vtkHF SHARED ${WRAP_LIST}) # Build main library TARGET_LINK_LIBRARIES(vtkHF ${VTK_LIBRARIES} alut ${openAL} ${libraries_list}) if(APPLE) set_target_properties(vtkHF PROPERTIES SUFFIX ".so") endif() set(vtkHFPython_EXCLUDE_FROM_WRAP_HIERARCHY 1) # Python wrapping include_directories("${PYTHON_INCLUDE_PATH}") #include_directories(${PythonVTKLibs_SOURCE_DIR}) ####################################### # Wrapping vtk_wrap_python3(vtkHFPython KitPython_SRCS "${WRAP_LIST}") add_library(vtkHFPythonD ${KitPython_SRCS} ${WRAP_LIST} ) IF(KIT_PYTHON_DEPS) ADD_DEPENDENCIES(vtkHFPythonD ${KIT_PYTHON_DEPS} ${VTK_PYTHON_LIBRARIES}) ENDIF(KIT_PYTHON_DEPS) #Here happens error python_add_module(vtkHFPython vtkHFPythonInit.cxx) What I do wrong? Thank you in advance, Best regards, Evgeniya From jcfr at kitware.com Mon Oct 15 01:11:06 2018 From: jcfr at kitware.com (Jean-Christophe Fillion-Robin) Date: Mon, 15 Oct 2018 01:11:06 -0400 Subject: [vtkusers] CMake custom class python wrapping doesn't work In-Reply-To: References: Message-ID: Hi Evgeniya, Based on my understanding, wrapping of custom classes without (1) creating an external VTK module or (2) using the VTK build system (like Paraview does) is not supported. If possible, I suggest you re-organize your code to create a VTK external module. That you will be able to use the VTK CMake API by including the vtkExternalmoduleMacros. For example, see https://github.com/Kitware/VTK/blob/master/Rendering/OpenVR/CMakeLists.txt (while this module can be built both as a built-in module and an external module, it illustrates the idea) If not possible, you need to make sure the python hierarchy files are generated. Here is a module we maintain in Slicer that enable this. It provides a macro named "vtkMacroKitPythonWrap" See https://github.com/Slicer/Slicer/blob/master/CMake/vtkMacroKitPythonWrap.cmake Here is an example of usage: include(vtkMacroKitPythonWrap) vtkMacroKitPythonWrap( KIT_NAME vtkFoo KIT_SRCS ${vtkFoo_SRCS} ) Hth Jc On Mon, Oct 15, 2018 at 12:48 AM Evgeniya Malikova wrote: > Hello. > I have a common wrapping that previously worked on windows 8.1 with > VTK 8.1.1. As I had problems to compile vtk8 on Mac (don't remember > all details of that) I switched to > https://gitlab.kitware.com/vtk/vtk.git. > > With following settings compilation on Mac of custom class gives a > strange error, referencing some hierarchy file: > > [ 85%] Built target vtkHF > > make[5]: *** No rule to make target > `../../hf/pythonClasses/vtkHFHierarchy', needed by > `hf/pythonClasses/vtkHFFunctionPython.cxx'. Stop. > > make[4]: *** [hf/pythonClasses/CMakeFiles/vtkHFPythonD.dir/all] Error 2 > > make[3]: *** [all] Error 2 > > make[2]: *** [hfvisual-prefix/src/hfvisual-stamp/hfvisual-build] Error 2 > > make[1]: *** [CMakeFiles/hfvisual.dir/all] Error 2 > > make: *** [all] Error 2 > > //------------- > > My CMakeLists: > > > find_package(VTK REQUIRED > vtkCommonCore > vtkCommonDataModel > vtkCommonExecutionModel > vtkImagingHybrid > vtkImagingCore > vtkImagingStencil > vtkImagingGeneral > vtkFiltersCore > vtkRenderingCore > vtkWrappingPythonCore > > ) > include(${VTK_USE_FILE}) > > # Python and vtk wrapping > find_package(PythonInterp REQUIRED) > find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED) > set(CUSTOM_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) > include(vtkWrapPython) > include_directories("${PYTHON_INCLUDE_PATH}") > > > set (OPENAL_INCLUDE_DIR ${INSTALL_DEPENDENCIES_DIR}/include/AL) > > LINK_DIRECTORIES(${INSTALL_DEPENDENCIES_DIR}/lib/) > set(CMAKE_MACOSX_RPATH 1) > > set (openAL OpenAL32) > if( APPLE ) > set (openAL OpenAL) > endif() > > set (OPENAL_LIBRARY} ${INSTALL_DEPENDENCIES_DIR}/lib/${openAL}) > set (ALUT_LIBRARY} ${INSTALL_DEPENDENCIES_DIR}/lib/alut) > include_directories(${OPENAL_INCLUDE_DIR}) > include_directories(${INSTALL_DEPENDENCIES_DIR}/include) > > > ####################################### > # Building vtkHFFunction > list(APPEND libraries_list cppinterpreter) > .... > > add_library(vtkHF SHARED ${WRAP_LIST}) > > # Build main library > TARGET_LINK_LIBRARIES(vtkHF ${VTK_LIBRARIES} alut ${openAL} > ${libraries_list}) > if(APPLE) > set_target_properties(vtkHF PROPERTIES SUFFIX ".so") > endif() > > set(vtkHFPython_EXCLUDE_FROM_WRAP_HIERARCHY 1) > # Python wrapping > > include_directories("${PYTHON_INCLUDE_PATH}") > > > #include_directories(${PythonVTKLibs_SOURCE_DIR}) > ####################################### > # Wrapping > > vtk_wrap_python3(vtkHFPython KitPython_SRCS "${WRAP_LIST}") > add_library(vtkHFPythonD ${KitPython_SRCS} ${WRAP_LIST} ) > > > IF(KIT_PYTHON_DEPS) > ADD_DEPENDENCIES(vtkHFPythonD ${KIT_PYTHON_DEPS} ${VTK_PYTHON_LIBRARIES}) > ENDIF(KIT_PYTHON_DEPS) > > #Here happens error > python_add_module(vtkHFPython vtkHFPythonInit.cxx) > > > What I do wrong? > Thank you in advance, > Best regards, Evgeniya > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcin.krotkiewski at gmail.com Mon Oct 15 03:38:13 2018 From: marcin.krotkiewski at gmail.com (marcin.krotkiewski) Date: Mon, 15 Oct 2018 09:38:13 +0200 Subject: [vtkusers] A bug in Above/BelowRangeColor mapping? Message-ID: <7917862a-e659-cc50-597b-058c752d2206@gmail.com> Hi, I think the behavior of UseBelowRangeColor in both VTK 8.1.1, and Parview 5.5 is wrong. As an example, I load a surface into Paraview, rescale the color range to point data (elevation in this case, fig. paraview.png), and enable the 'Use Below Range Color' checkbox. What you see is that part of the surface are colored with black (fig. paraview_wrong.png), although they are in fact within the automatically computed value range. So they should get the usual color from the lookup table. I also observe wrong behavior when I color the surface by a constant value. In VTK, I set lower/upper bound on data values in vtkLookupTable to be the same. Say, my point data has value 50. I set the lookup table range to [60,60] and turn on Above/Below range color. Figure constant_wrong.png shows that my surface is colored with the in-range color, although it is below range. To get a correct coloring I need to spread the range a little bit, e.g., [60,61] (constant_below.png), or [40, 41] (constant_above.png). But even in this case we go back to the first problem: for point values that are on the edge of the range VTK uses out-of-range color (range [50,51], constant_extreme.png). So the question is - is this behavior intended, and if so - how should I organize my color mapping and data ranges to get the expected behavior? Regards, Marcin Krotkiewski -------------- next part -------------- A non-text attachment was scrubbed... Name: constant_above.png Type: image/png Size: 176413 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: constant_below.png Type: image/png Size: 85845 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: constant_wrong.png Type: image/png Size: 161272 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: paraview.png Type: image/png Size: 229009 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: paraview_wrong.png Type: image/png Size: 228354 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: constant_extreme.png Type: image/png Size: 85994 bytes Desc: not available URL: From mathieu.westphal at kitware.com Mon Oct 15 04:21:18 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Mon, 15 Oct 2018 10:21:18 +0200 Subject: [vtkusers] A bug in Above/BelowRangeColor mapping? In-Reply-To: <7917862a-e659-cc50-597b-058c752d2206@gmail.com> References: <7917862a-e659-cc50-597b-058c752d2206@gmail.com> Message-ID: Hi Marcin, Regarding ParaView, you may want to post on our discourse instead https://discourse.paraview.org/ Mathieu Westphal On Mon, Oct 15, 2018 at 9:38 AM marcin.krotkiewski < marcin.krotkiewski at gmail.com> wrote: > Hi, > > I think the behavior of UseBelowRangeColor in both VTK 8.1.1, and > Parview 5.5 is wrong. As an example, I load a surface into Paraview, > rescale the color range to point data (elevation in this case, fig. > paraview.png), and enable the 'Use Below Range Color' checkbox. What you > see is that part of the surface are colored with black (fig. > paraview_wrong.png), although they are in fact within the automatically > computed value range. So they should get the usual color from the lookup > table. > > I also observe wrong behavior when I color the surface by a constant > value. In VTK, I set lower/upper bound on data values in vtkLookupTable > to be the same. Say, my point data has value 50. I set the lookup table > range to [60,60] and turn on Above/Below range color. Figure > constant_wrong.png shows that my surface is colored with the in-range > color, although it is below range. To get a correct coloring I need to > spread the range a little bit, e.g., [60,61] (constant_below.png), or > [40, 41] (constant_above.png). But even in this case we go back to the > first problem: for point values that are on the edge of the range VTK > uses out-of-range color (range [50,51], constant_extreme.png). > > So the question is - is this behavior intended, and if so - how should I > organize my color mapping and data ranges to get the expected behavior? > > Regards, > > Marcin Krotkiewski > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcin.krotkiewski at gmail.com Mon Oct 15 04:16:20 2018 From: marcin.krotkiewski at gmail.com (marcin.krotkiewski) Date: Mon, 15 Oct 2018 10:16:20 +0200 Subject: [vtkusers] A bug in Above/BelowRangeColor mapping? In-Reply-To: References: <7917862a-e659-cc50-597b-058c752d2206@gmail.com> Message-ID: <875f4c3e-61e5-736f-07d1-2f7b8ca17b59@gmail.com> Thanks, Mathieu, I can do that. I might not have been very clear in the first paragraph, but the unexpected behavior comes from VTK. Paraview was mentioned here only as a simple way to reproduce the problem, and as an example. I'd like to avoid bothering too many people at once, but if you still think I should re-post, I can do that. Thanks, Marcin On 10/15/2018 10:21 AM, Mathieu Westphal wrote: > Hi Marcin, > > Regarding ParaView, you may want to post on our discourse instead > https://discourse.paraview.org/ > > > Mathieu Westphal > > > On Mon, Oct 15, 2018 at 9:38 AM marcin.krotkiewski > > > wrote: > > Hi, > > I think the behavior of UseBelowRangeColor in both VTK 8.1.1, and > Parview 5.5 is wrong. As an example, I load a surface into Paraview, > rescale the color range to point data (elevation in this case, fig. > paraview.png), and enable the 'Use Below Range Color' checkbox. > What you > see is that part of the surface are colored with black (fig. > paraview_wrong.png), although they are in fact within the > automatically > computed value range. So they should get the usual color from the > lookup > table. > > I also observe wrong behavior when I color the surface by a constant > value. In VTK, I set lower/upper bound on data values in > vtkLookupTable > to be the same. Say, my point data has value 50. I set the lookup > table > range to [60,60] and turn on Above/Below range color. Figure > constant_wrong.png shows that my surface is colored with the in-range > color, although it is below range. To get a correct coloring I > need to > spread the range a little bit, e.g., [60,61] (constant_below.png), or > [40, 41] (constant_above.png). But even in this case we go back to > the > first problem: for point values that are on the edge of the range VTK > uses out-of-range color (range [50,51], constant_extreme.png). > > So the question is - is this behavior intended, and if so - how > should I > organize my color mapping and data ranges to get the expected > behavior? > > Regards, > > Marcin Krotkiewski > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From isalako1 at sheffield.ac.uk Mon Oct 15 05:33:55 2018 From: isalako1 at sheffield.ac.uk (Idayat Salako) Date: Mon, 15 Oct 2018 10:33:55 +0100 Subject: [vtkusers] 'InsertNextTupleValue': is not a member of 'vtkFloatArray' Message-ID: Hi, My OS: Windows. I am building a project /app in visual studio 2017 using VTK 8.1. However I get the error below 1>c:\users\idayat\desktop\2017_phd\niftysim-253\source\tledgenericvtkmeshsource.tpp(76): error C2039: 'InsertNextTupleValue': is not a member of 'vtkFloatArray' the vtkFloatArray.h code is given below and does not include any such member. Found ***THIS*** but I am not sure if replacing the header file will an older version will cause a problem. ***THIS***: https://www.vtk.org/doc/release/6.0/html/vtkFloatArray_8h_source.html vtkFloatArray.h code /*========================================================================*/ /** * @class vtkFloatArray * @brief dynamic, self-adjusting array of float * * vtkFloatArray is an array of values of type float. It provides * methods for insertion and retrieval of values and will * automatically resize itself to hold new data. */ #ifndef vtkFloatArray_h #define vtkFloatArray_h #include "vtkCommonCoreModule.h" // For export macro #include "vtkDataArray.h" #include "vtkAOSDataArrayTemplate.h" // Real Superclass // Fake the superclass for the wrappers. #ifndef __VTK_WRAP__ #define vtkDataArray vtkAOSDataArrayTemplate #endif class VTKCOMMONCORE_EXPORT vtkFloatArray : public vtkDataArray { public: vtkTypeMacro(vtkFloatArray, vtkDataArray) #ifndef __VTK_WRAP__ #undef vtkDataArray #endif static vtkFloatArray* New(); void PrintSelf(ostream& os, vtkIndent indent) override; // NEW CODE IN VTK 8.1. COMPARED TO ***THIS*** // This macro expands to the set of method declarations that // make up the interface of vtkAOSDataArrayTemplate, which is ignored // by the wrappers. #if defined(__VTK_WRAP__) || defined (__WRAP_GCCXML__) vtkCreateWrappedArrayInterface(float); #endif /** * A faster alternative to SafeDownCast for downcasting vtkAbstractArrays. */ static vtkFloatArray* FastDownCast(vtkAbstractArray *source) { return static_cast(Superclass::FastDownCast(source)); } // END OF NEW CODE IN VTK 8.1. COMPARED TO ***THIS*** /** * Get the minimum data value in its native type. */ static float GetDataTypeValueMin() { return VTK_FLOAT_MIN; } /** * Get the maximum data value in its native type. */ static float GetDataTypeValueMax() { return VTK_FLOAT_MAX; } protected: vtkFloatArray(); ~vtkFloatArray() override; private: typedef vtkAOSDataArrayTemplate RealSuperclass; vtkFloatArray(const vtkFloatArray&) = delete; void operator=(const vtkFloatArray&) = delete; }; // Define vtkArrayDownCast implementation: vtkArrayDownCast_FastCastMacro(vtkFloatArray) #endif Thank you Idayat Salako ***Whoever wakes up in the morning and is safe in his home, in good health and has enough provision for the day, it is as if he has all the good things of this world [HadithTirmidhi 2346]*** -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Mon Oct 15 09:35:46 2018 From: sean at rogue-research.com (Sean McBride) Date: Mon, 15 Oct 2018 09:35:46 -0400 Subject: [vtkusers] A bug in Above/BelowRangeColor mapping? In-Reply-To: <7917862a-e659-cc50-597b-058c752d2206@gmail.com> References: <7917862a-e659-cc50-597b-058c752d2206@gmail.com> Message-ID: <20181015133546.1700898252@mail.rogue-research.com> On Mon, 15 Oct 2018 09:38:13 +0200, marcin.krotkiewski said: >I think the behavior of UseBelowRangeColor in both VTK 8.1.1, and >Parview 5.5 is wrong. Do you mean compared to an older version of VTK/Paraview? There have been some changes to that code in the last year or so.... Might be revealing to try with older version of Paraview to see... 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 marcin.krotkiewski at gmail.com Mon Oct 15 12:30:05 2018 From: marcin.krotkiewski at gmail.com (marcin.krotkiewski) Date: Mon, 15 Oct 2018 18:30:05 +0200 Subject: [vtkusers] A bug in Above/BelowRangeColor mapping? In-Reply-To: <20181015133546.1700898252@mail.rogue-research.com> References: <7917862a-e659-cc50-597b-058c752d2206@gmail.com> <20181015133546.1700898252@mail.rogue-research.com> Message-ID: <02c4fd0f-16b5-6dd4-eb7f-4aed67ea1b3b@gmail.com> I've checked Paraview version 5.2 from November 2016. Same behavior. To further clarify, the issue here is that the vtkLookupTable seems to be working with an exclusive interval: (min, max) instead of what I think it should do, i.e., working with an inclusive interval: [min, max] That is, if my point data is in range [min, max], and I use it to SetValueRange in a vtkLookupTable, then I would expect that the end-point values are also covered by the normal color map, and are not considered to be out of range. Marcin On 10/15/2018 03:35 PM, Sean McBride wrote: > On Mon, 15 Oct 2018 09:38:13 +0200, marcin.krotkiewski said: > >> I think the behavior of UseBelowRangeColor in both VTK 8.1.1, and >> Parview 5.5 is wrong. > Do you mean compared to an older version of VTK/Paraview? There have been some changes to that code in the last year or so.... Might be revealing to try with older version of Paraview to see... > > Cheers, > From nfoudilbey at gmail.com Mon Oct 15 17:45:20 2018 From: nfoudilbey at gmail.com (cimo) Date: Mon, 15 Oct 2018 14:45:20 -0700 (MST) Subject: [vtkusers] problem with opengl Message-ID: <1539639920343-0.post@n5.nabble.com> Hi everyone,I have the same problem with the following example:https://stackoverflow.com/questions/36790966/vtk-rendering-artifacts-with-opengl-es-2-0How to fix the OpenGl context (which file to modify)Thanks for your help :) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From gunter.moeller at arkema.com Mon Oct 15 18:22:51 2018 From: gunter.moeller at arkema.com (MOELLER Gunter) Date: Mon, 15 Oct 2018 22:22:51 +0000 Subject: [vtkusers] custom units on axes, vtkCubeAxisActor2D Message-ID: Hello, This is a stupid question from a first time VTK user: I would like to display data using vtkCubeAxisActor2D with custom units for the axes. For example, the physical object extends 15 micrometers into the x-direction, so the x-axis range should be 0 to 15 micrometers and not the length in pixels of the image representation. I do not want to modify the data, just custom display units on axes. How do I do this? Gunter MOELLER Sr. Res. Scientist Analytical & Systems Research Arkema Inc. 900 First Avenue King of Prussia, PA 19406 USA Email: Gunter.Moeller at arkema.com [cid:image001.png at 01D464AE.48854E50] Legal Disclaimer: This email (and any attachments) is intended only for the individual(s) to whom it is addressed and may contain information that is privileged, confidential, or proprietary. If you believe you have received this message in error, please advise the sender by return e-mail and delete this message. Thank you. Ce courriel, pi?ces jointes incluses, peut contenir des informations confidentielles et/ou couvertes par le secret professionnel et/ou propri?t? du Groupe Arkema ou de tiers. Il ne peut ?tre utilis? que dans le cadre de son objet. Si vous n'en ?tes pas le destinataire, merci d'en informer l'exp?diteur par retour et de supprimer ce courriel sans le lire, le copier ni le distribuer. Merci. This e-mail, attachments included, may contain information that is confidential and/or privileged and/or proprietary to the Arkema Group or third party. It may only be used for its intended purpose. If you are not the intended recipient, please advise the sender by return and delete this e-mail without reading, copying nor distributing it. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 3021 bytes Desc: image001.png URL: From omalyushytskyvtkuser at gmail.com Mon Oct 15 18:48:16 2018 From: omalyushytskyvtkuser at gmail.com (Oleksandr Malyushytsky) Date: Mon, 15 Oct 2018 15:48:16 -0700 Subject: [vtkusers] vtkInteractorStyleTrackballCamera problem with multiple views Message-ID: 1. Push the left mouse button. 2. Drag the mouse out of the view, do not release it 3. Click and release right mouse button (or middle button, any button which was not grabbed). Release left mouse button. 4 In this state you can move mouse back to view. View will behave like left mouse button is clicked. Problem is that only left button was grabbing a mouse. Releasing right mouse button will prevent interactorStyle from receiving OnLeftButtonUp(), so when you move mouse into the view not even it will still remain in previously set interaction state, but the appropriate mouse button will not be grabbed. This seems like a bug and I would appreciate if anybody could at least point on work around. It does not appear on my version of paraview, but I am not sure what fixed the behaviour. (I use vtk 8.1.1 with Qt 5.9) Best regards, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From omalyushytskyvtkuser at gmail.com Mon Oct 15 19:33:16 2018 From: omalyushytskyvtkuser at gmail.com (Oleksandr Malyushytsky) Date: Mon, 15 Oct 2018 16:33:16 -0700 Subject: [vtkusers] Alternative to vtkDelaunay2D for surface reconstruction or how to get rid of "Edge not recovered, polygon fill suspect" In-Reply-To: References: Message-ID: I can't help you with alternative and afraid that you can't use vtkDelaunay2D here, since it assumes that all points lie on 2D plan, while your points are not. On Sat, Oct 13, 2018 at 9:35 PM Berti Kr?ger wrote: > Hello everyone. > > In my project i have a standard 3D triangle mesh surface where i select > all vertices which lie inside a region (polygon) which is defined by a > closed polyline created by an user interaction using the vtkContourWidget: > > > I then create a polygon mesh which has the shape of the vtkContourWidget > polygon selection contour line plus the selected part of the underlying > mesh and which lies like a sticker or texture on the the given stl mesh > surface: > > > For the reconstruction of the surface i use the vtkDelaunay2D filter using > all the points of the vtkContourWidget polygon and the mesh surface points > as inputs. > > This works absolutely great but depending on the used mesh i sometimes get > the following error message from the vtkDelaunay2D filter: > > *"vtkDelaunay2D (0x556183dcfba0): Edge not recovered, polygon fill > suspect"* > > > *Does anybody know why this happens and what i can do to get rid of this > error?* > > *While nice, but since i don't necessarily need the delaunay properties, > is there an alternative to the vtkDelaunay2D filter to get a polygon > surface mesh given a bunch of points as an input? (points -> surface)* > > > Thank you very much in advance. > > Regards, > Berti > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_delaunay.jpg Type: image/jpeg Size: 259659 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: selection1.png Type: image/png Size: 968853 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtk_delaunay.jpg Type: image/jpeg Size: 259659 bytes Desc: not available URL: From omalyushytskyvtkuser at gmail.com Mon Oct 15 20:40:04 2018 From: omalyushytskyvtkuser at gmail.com (Oleksandr Malyushytsky) Date: Mon, 15 Oct 2018 17:40:04 -0700 Subject: [vtkusers] A bug in Above/BelowRangeColor mapping? In-Reply-To: <02c4fd0f-16b5-6dd4-eb7f-4aed67ea1b3b@gmail.com> References: <7917862a-e659-cc50-597b-058c752d2206@gmail.com> <20181015133546.1700898252@mail.rogue-research.com> <02c4fd0f-16b5-6dd4-eb7f-4aed67ea1b3b@gmail.com> Message-ID: above or below color range values might be really below or above due to precision. I guess you could use SetUseBelowRangeColor and SetUseAboveRangeColor if you want to enforce such behavior On Mon, Oct 15, 2018 at 9:30 AM marcin.krotkiewski < marcin.krotkiewski at gmail.com> wrote: > I've checked Paraview version 5.2 from November 2016. Same behavior. > > To further clarify, the issue here is that the vtkLookupTable seems to > be working with an exclusive interval: > > (min, max) > > instead of what I think it should do, i.e., working with an inclusive > interval: > > [min, max] > > That is, if my point data is in range [min, max], and I use it to > SetValueRange in a vtkLookupTable, then I would expect that the > end-point values are also covered by the normal color map, and are not > considered to be out of range. > > Marcin > > > On 10/15/2018 03:35 PM, Sean McBride wrote: > > On Mon, 15 Oct 2018 09:38:13 +0200, marcin.krotkiewski said: > > > >> I think the behavior of UseBelowRangeColor in both VTK 8.1.1, and > >> Parview 5.5 is wrong. > > Do you mean compared to an older version of VTK/Paraview? There have > been some changes to that code in the last year or so.... Might be > revealing to try with older version of Paraview to see... > > > > Cheers, > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From spuchals at gmail.com Tue Oct 16 01:20:38 2018 From: spuchals at gmail.com (SevPuch) Date: Mon, 15 Oct 2018 22:20:38 -0700 (MST) Subject: [vtkusers] Creating a GUI based project for VTK and ITK In-Reply-To: References: Message-ID: <1539667238069-0.post@n5.nabble.com> Those examples seem deprecated, they throw a bunch of errors related to vtkWidget.h (apparently now vtkOpenGLWidget replaces it?), or simply errors related to the use of various components. Which makes it very difficult for vtk/Qt beginners like me and plenty others if you look at all the posts... Do you know any reliable recent example? These all seem to strongly depend on which version of vtk and Qt you're using, and it isn't mentioned. Hoping to get it to work one day, Thank you -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From berti_krueger at hotmail.com Tue Oct 16 02:44:04 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Tue, 16 Oct 2018 06:44:04 +0000 Subject: [vtkusers] Alternative to vtkDelaunay2D for surface reconstruction or how to get rid of "Edge not recovered, polygon fill suspect" In-Reply-To: References: , Message-ID: Hi Oleksandr. Thank you very much for your help. I don't think that the problem here is that the vtkDelaunay2D filter is getting 3D points which don't lie on 2D plane. The vtkDelaunay2D class documentation states: "The input to this filter is a list of points specified in 3D, even though the triangulation is 2D. Thus the triangulation is constructed in the x-y plane, and the z coordinate is ignored (although carried through to the output)." And in my program it works basicly most of the time absolutely perfect. Only in some situations it doesn't work and i get the error "Edge not recovered, polygon fill suspect". I haven't found out when and why it happens and hoped maybe some of you have a clue here. I don't even understand, what this error message means. Some help here would also be great because it would help to find the error. Or is the vtkDelaunay2D filter buggy? I also tried using the vtkDelaunay2D filter with points which all lie in a 2D plane to test if your hypothesis is right: [cid:5796291d-e8d6-41e1-8c7d-3b64b48d48a7] [cid:ebff186b-999b-462d-a4e2-b289e41e9e06] But that didn't change anything. Most of the time it works, but sometimes i get the error message above. Is vtkDelaunay the only vtk triangulation algorithm built in or are there others i haven't found yet? So far, when i looked through the documentation, i haven't found anything quite like it. If anybody knows some other triangulation filter in vtk (it can be a simple ear-cut algorithm i need nothing special) it would be great to know. Thanks again. Regard, Berti ________________________________ Von: vtkusers im Auftrag von Oleksandr Malyushytsky Gesendet: Montag, 15. Oktober 2018 23:33 An: vtkusers at vtk.org Betreff: Re: [vtkusers] Alternative to vtkDelaunay2D for surface reconstruction or how to get rid of "Edge not recovered, polygon fill suspect" I can't help you with alternative and afraid that you can't use vtkDelaunay2D here, since it assumes that all points lie on 2D plan, while your points are not. On Sat, Oct 13, 2018 at 9:35 PM Berti Kr?ger > wrote: Hello everyone. In my project i have a standard 3D triangle mesh surface where i select all vertices which lie inside a region (polygon) which is defined by a closed polyline created by an user interaction using the vtkContourWidget: [cid:inline_01 at geary] I then create a polygon mesh which has the shape of the vtkContourWidget polygon selection contour line plus the selected part of the underlying mesh and which lies like a sticker or texture on the the given stl mesh surface: [cid:inline_00 at geary] For the reconstruction of the surface i use the vtkDelaunay2D filter using all the points of the vtkContourWidget polygon and the mesh surface points as inputs. This works absolutely great but depending on the used mesh i sometimes get the following error message from the vtkDelaunay2D filter: "vtkDelaunay2D (0x556183dcfba0): Edge not recovered, polygon fill suspect" Does anybody know why this happens and what i can do to get rid of this error? While nice, but since i don't necessarily need the delaunay properties, is there an alternative to the vtkDelaunay2D filter to get a polygon surface mesh given a bunch of points as an input? (points -> surface) Thank you very much in advance. Regards, Berti _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: delaunay2.jpg Type: image/jpeg Size: 436239 bytes Desc: delaunay2.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: delaunay.jpg Type: image/jpeg Size: 343488 bytes Desc: delaunay.jpg URL: From mathieu.westphal at kitware.com Tue Oct 16 04:31:44 2018 From: mathieu.westphal at kitware.com (Mathieu Westphal) Date: Tue, 16 Oct 2018 10:31:44 +0200 Subject: [vtkusers] Creating a GUI based project for VTK and ITK In-Reply-To: <1539667238069-0.post@n5.nabble.com> References: <1539667238069-0.post@n5.nabble.com> Message-ID: The VTK examples can be found here https://lorensen.github.io/VTKExamples/site/ Best regards, Mathieu Westphal On Tue, Oct 16, 2018 at 7:20 AM SevPuch wrote: > Those examples seem deprecated, they throw a bunch of errors related to > vtkWidget.h (apparently now vtkOpenGLWidget replaces it?), or simply errors > related to the use of various components. > > Which makes it very difficult for vtk/Qt beginners like me and plenty > others > if you look at all the posts... > > Do you know any reliable recent example? These all seem to strongly depend > on which version of vtk and Qt you're using, and it isn't mentioned. > > Hoping to get it to work one day, > Thank you > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From allison.vacanti at kitware.com Tue Oct 16 13:48:56 2018 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Tue, 16 Oct 2018 13:48:56 -0400 Subject: [vtkusers] 'InsertNextTupleValue': is not a member of 'vtkFloatArray' In-Reply-To: References: Message-ID: Use InsertNextTypedTuple instead. It does the same thing with a new name. HTH, Allie On Mon, Oct 15, 2018 at 5:34 AM Idayat Salako wrote: > Hi, > My OS: Windows. > I am building a project /app in visual studio 2017 using VTK 8.1. However > I get the error below > > 1>c:\users\idayat\desktop\2017_phd\niftysim-253\source\tledgenericvtkmeshsource.tpp(76): > error C2039: 'InsertNextTupleValue': is not a member of 'vtkFloatArray' > > the vtkFloatArray.h code is given below and does not include any such > member. Found ***THIS*** but I am not sure if replacing the header file > will an older version will cause a problem. > > ***THIS***: > https://www.vtk.org/doc/release/6.0/html/vtkFloatArray_8h_source.html > > vtkFloatArray.h code > > /*========================================================================*/ > /** > * @class vtkFloatArray > * @brief dynamic, self-adjusting array of float > * > * vtkFloatArray is an array of values of type float. It provides > * methods for insertion and retrieval of values and will > * automatically resize itself to hold new data. > */ > > #ifndef vtkFloatArray_h > #define vtkFloatArray_h > > #include "vtkCommonCoreModule.h" // For export macro > #include "vtkDataArray.h" > #include "vtkAOSDataArrayTemplate.h" // Real Superclass > > // Fake the superclass for the wrappers. > #ifndef __VTK_WRAP__ > #define vtkDataArray vtkAOSDataArrayTemplate > #endif > class VTKCOMMONCORE_EXPORT vtkFloatArray : public vtkDataArray > { > public: > vtkTypeMacro(vtkFloatArray, vtkDataArray) > #ifndef __VTK_WRAP__ > #undef vtkDataArray > #endif > > static vtkFloatArray* New(); > void PrintSelf(ostream& os, vtkIndent indent) override; > > // NEW CODE IN VTK 8.1. COMPARED TO ***THIS*** > // This macro expands to the set of method declarations that > // make up the interface of vtkAOSDataArrayTemplate, which is ignored > // by the wrappers. > #if defined(__VTK_WRAP__) || defined (__WRAP_GCCXML__) > vtkCreateWrappedArrayInterface(float); > #endif > > /** > * A faster alternative to SafeDownCast for downcasting > vtkAbstractArrays. > */ > > static vtkFloatArray* FastDownCast(vtkAbstractArray *source) > { > return static_cast(Superclass::FastDownCast(source)); > } > > // END OF NEW CODE IN VTK 8.1. COMPARED TO ***THIS*** > > /** > * Get the minimum data value in its native type. > */ > static float GetDataTypeValueMin() { return VTK_FLOAT_MIN; } > > /** > * Get the maximum data value in its native type. > */ > static float GetDataTypeValueMax() { return VTK_FLOAT_MAX; } > > > protected: > vtkFloatArray(); > ~vtkFloatArray() override; > > private: > > typedef vtkAOSDataArrayTemplate RealSuperclass; > > vtkFloatArray(const vtkFloatArray&) = delete; > void operator=(const vtkFloatArray&) = delete; > }; > > // Define vtkArrayDownCast implementation: > vtkArrayDownCast_FastCastMacro(vtkFloatArray) > > #endif > > Thank you > Idayat Salako > > ***Whoever wakes up in the morning and is safe in his home, in good health > and has enough provision for the day, it is as if he has all the good > things of this world [HadithTirmidhi 2346]*** > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcfr at kitware.com Tue Oct 16 14:12:29 2018 From: jcfr at kitware.com (Jean-Christophe Fillion-Robin) Date: Tue, 16 Oct 2018 14:12:29 -0400 Subject: [vtkusers] Creating a GUI based project for VTK and ITK In-Reply-To: References: Message-ID: Hi Ashef, To complement Aron answer, if you would like to support distribution of your code and leverage existing segmentation and visualization capabilities, you could consider creating 3D Slicer plugin in either C++ or Python. 3D Slicer is a medical imaging application built on top of ITK, VTK, Qt and Python. See https://www.slicer.org/ and https://www.slicer.org/wiki/Documentation/Nightly/Training There is also an active forum where you can ask question: http://discourse.slicer.org/ Doing so, you could leverage a proven and robust platform built on top of mature libraries. More specifically, if you already have processing code you could create a command line module implementing the Slicer Execution Model interface (basically an executable describing itself by passing the --xml parameter), that way you could have Slicer discover it, generate its UI and expose the processing capabilities to users. To illustrate, here are example of segmentation and visualization capabilities: Whole heart segmentation from cardiac CT in 10 minutes: https://www.youtube.com/watch?v=BJoIexIvtGo Creating femur model from CT volume using 3D Slicer: https://www.youtube.com/watch?v=0at15gjk-Ns How to segment multiple vertebrae in spine CT for 3D printing: https://www.youtube.com/watch?v=Uht6Fwtr9hE Quick manual segmentation with contour interpolation: https://www.youtube.com/watch?v=u93kI1MG6Ic Let me know if you have questions, Jc On Mon, Apr 30, 2018 at 9:42 AM Aron Helser wrote: > Hi Ashef, > VTK and ITK do not provide any prescribed way to do a GUI - there are > hundreds of choices you could use, and they would all work. For instance, > ParaView is built on VTK, and uses QT for it's GUI. You could also build a > gui in Python, perhaps using wxWidgets python bindings. > Since you are working with DICOM, instead you may want to look at 3D > Slicer (https://www.slicer.org/) which is an open-source medical > visualization app that uses VTK and ITK. You may be able to write a plugin > for it which does what you want, and take advantage of all it's other > features. > > The best choice may be something that you are familiar with, or something > that you can get help with! > Good luck, > Aron > > On Sun, Apr 29, 2018 at 2:43 PM, Ashef Shahrior > wrote: > >> Hi, I have done some basic work with DICOM file segmentation and >> visualization using ITK and VTK in C++. I have built it with CMAKE and >> Visual Studio and run it with command prompt (Windows 10). But now I wish >> to make a Graphical User Interface for this so that I can give it more of a >> project look. How can I do this? Please, help. Thank you. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> >> > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nfoudilbey at gmail.com Tue Oct 16 15:00:04 2018 From: nfoudilbey at gmail.com (cimo) Date: Tue, 16 Oct 2018 12:00:04 -0700 (MST) Subject: [vtkusers] QVTKWidget render artefact Message-ID: <1539716404707-0.post@n5.nabble.com> Hello community, I have problem, I use QVTKWidget for rendering 3d objects. how to correct visualization artifacts (see figures). Thank you in advance. cimo -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jcfr at kitware.com Tue Oct 16 15:19:49 2018 From: jcfr at kitware.com (Jean-Christophe Fillion-Robin) Date: Tue, 16 Oct 2018 15:19:49 -0400 Subject: [vtkusers] QVTKWidget render artefact In-Reply-To: <1539716404707-0.post@n5.nabble.com> References: <1539716404707-0.post@n5.nabble.com> Message-ID: Hi Cimo, The use of QVTKWidget is deprecated, please could you try using QVTKOpenGLWidget instead ? See https://github.com/Kitware/VTK/blob/master/GUISupport/Qt/QVTKOpenGLWidget.h Hth Jc On Tue, Oct 16, 2018 at 3:00 PM cimo wrote: > Hello community, > I have problem, I use QVTKWidget for rendering 3d objects. > how to correct visualization artifacts (see figures). > Thank you in advance. > cimo > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcfr at kitware.com Tue Oct 16 16:55:04 2018 From: jcfr at kitware.com (Jean-Christophe Fillion-Robin) Date: Tue, 16 Oct 2018 16:55:04 -0400 Subject: [vtkusers] QVTKWidget render artefact In-Reply-To: References: <1539716404707-0.post@n5.nabble.com> Message-ID: (re-adding the mailing list in cc) > I think, I need to download the 8 version. You could indeed get version 8.1 (the latest release) Hth Jc On Tue, Oct 16, 2018 at 4:49 PM Nacim Foudilbey wrote: > Dear Jean-Christophe, > Thank you for the quick reply. > I think, I need to download the 8 version. > Cimo > > On Tue, 16 Oct 2018 at 15:20, Jean-Christophe Fillion-Robin < > jcfr at kitware.com> wrote: > >> Hi Cimo, >> >> The use of QVTKWidget is deprecated, please could you try using >> QVTKOpenGLWidget instead ? >> >> See >> https://github.com/Kitware/VTK/blob/master/GUISupport/Qt/QVTKOpenGLWidget.h >> >> Hth >> Jc >> >> On Tue, Oct 16, 2018 at 3:00 PM cimo wrote: >> >>> Hello community, >>> I have problem, I use QVTKWidget for rendering 3d objects. >>> how to correct visualization artifacts (see figures). >>> Thank you in advance. >>> cimo >>> >>> >>> >>> >>> >>> -- >>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://public.kitware.com/mailman/listinfo/vtkusers >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From BSchleimer at vytronus.com Tue Oct 16 21:21:41 2018 From: BSchleimer at vytronus.com (Benjamin Schleimer) Date: Wed, 17 Oct 2018 01:21:41 +0000 Subject: [vtkusers] Invalidating the OpenGL2 shader cache Message-ID: <0f9ce3731aba49ac9e45f203ff39dc7c@vytronus.com> Hi, I have come across an interesting problem with VTK and I wanted to ask if there is another way to work around it. Using the OpenGL2 backend, we have discovered that if another system renders to the same opengl context as VTK, then the shader cache is put into an invalidated state. The root problem is that in Rendering/OpenGL2/vtkOpenGLShaderCache.cxx, in vtkOpenGLShaderCache::BindShader(), the lastShaderBound is assumed to not change. VTK assumes that it's the only system setting glUseProgram() for the opengl context. So if another system clears the GL_CURRENT_PROGRAM value, then VTK doesn't know about it and the following calls to set program uniforms fails with an opengl error. A suggested is to add a call to glGetIntegerv(GL_CURRENT_PROGRAM, ...) and compare it against this->Handle before returning. I worked around this problem by clearing the shader cache before invoking vtkRenderWindow::Render() but this required knowing that the shader cache was invalid. Sincerely, Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: From hinh1108 at gmail.com Tue Oct 16 22:17:22 2018 From: hinh1108 at gmail.com (HinhCT) Date: Tue, 16 Oct 2018 19:17:22 -0700 (MST) Subject: [vtkusers] Convert a series of DICOM files into a VTI File Message-ID: <1539742642875-0.post@n5.nabble.com> Hi, I need to write a vti file that can be opened in volView or paraveiw. I use the below code to convert a series of DICOM files into a vti file. But the output file size is too big,I want to reduce the size of it. // Read all the DICOM files in the specified directory. vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetDirectoryName(inputFoldername.c_str()); reader->Update(); //write vti vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("head.vti"); writer-> SetInputData(reader->GetOutput()); writer->Write(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jiangpengyiwu at gmail.com Tue Oct 16 22:49:14 2018 From: jiangpengyiwu at gmail.com (maskjp) Date: Tue, 16 Oct 2018 19:49:14 -0700 (MST) Subject: [vtkusers] Generate Cloud Point From Depth Map Image Message-ID: <1539744554235-0.post@n5.nabble.com> depthmaptopointcloud.zip I wrote a code in python to generate a depth map of a 3D model and save it as an image. But when I wrote code to generate the point cloud from the image, only part of the point cloud was generated. I set the same camera parameters but not work. I attached the code and 3D model in this post. Anyone have any idea? very appreciative. Thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From brett.ables at gmail.com Wed Oct 17 00:37:39 2018 From: brett.ables at gmail.com (Brett Ables) Date: Tue, 16 Oct 2018 23:37:39 -0500 Subject: [vtkusers] QVTKWidget render artefact In-Reply-To: References: <1539716404707-0.post@n5.nabble.com> Message-ID: I have a related question then. So for using vtk with pyqt I'm doing something similar to this example, except modified for pyqt5: https://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt Should I be using QVTKOpenGLWidget instead of the QVTKRenderWindowInteractor with a QFrame? Everything seems to work fine for me. Does the OpenGL widget have better performance? I've read on kitware blogs that there were recent OpenGL rendering improvements, but I assumed I was already benefiting from those since I'm on a recent version acquired through pip or conda. Thanks! On Tue, Oct 16, 2018, 10:41 PM Brett Ables wrote: > I have a related question then. So for using vtk with pyqt I'm doing > something similar to this example, except modified for pyqt5: > > https://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt > > Should I be using QVTKOpenGLWidget instead of the QVTKRenderWindowInteractor > with a QFrame? Everything seems to work fine for me. Does the OpenGL widget > have better performance? I've read on kitware blogs that there were recent > OpenGL rendering improvements, but I assumed I was already benefiting from > those since I'm on a recent version acquired through pip or conda. > > Thanks! > > > > > On Tue, Oct 16, 2018, 3:55 PM Jean-Christophe Fillion-Robin < > jcfr at kitware.com> wrote: > >> (re-adding the mailing list in cc) >> >> > I think, I need to download the 8 version. >> >> You could indeed get version 8.1 (the latest release) >> >> Hth >> Jc >> >> >> On Tue, Oct 16, 2018 at 4:49 PM Nacim Foudilbey >> wrote: >> >>> Dear Jean-Christophe, >>> Thank you for the quick reply. >>> I think, I need to download the 8 version. >>> Cimo >>> >>> On Tue, 16 Oct 2018 at 15:20, Jean-Christophe Fillion-Robin < >>> jcfr at kitware.com> wrote: >>> >>>> Hi Cimo, >>>> >>>> The use of QVTKWidget is deprecated, please could you try using >>>> QVTKOpenGLWidget instead ? >>>> >>>> See >>>> https://github.com/Kitware/VTK/blob/master/GUISupport/Qt/QVTKOpenGLWidget.h >>>> >>>> Hth >>>> Jc >>>> >>>> On Tue, Oct 16, 2018 at 3:00 PM cimo wrote: >>>> >>>>> Hello community, >>>>> I have problem, I use QVTKWidget for rendering 3d objects. >>>>> how to correct visualization artifacts (see figures). >>>>> Thank you in advance. >>>>> cimo >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> https://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rccm.kyoshimi at gmail.com Wed Oct 17 01:11:42 2018 From: rccm.kyoshimi at gmail.com (kenichiro yoshimi) Date: Wed, 17 Oct 2018 14:11:42 +0900 Subject: [vtkusers] Convert a series of DICOM files into a VTI File In-Reply-To: <1539742642875-0.post@n5.nabble.com> References: <1539742642875-0.post@n5.nabble.com> Message-ID: Hi, Using vtkExtractVOI is a convenient way of deducing image data size. If specifying the SampleRate=(2,2,2), the result has a volume 1/8th the original size. // Read all the DICOM files in the specified directory. auto reader = vtkSmartPointer::New(); reader->SetDirectoryName(inputFoldername.c_str()); reader->Update(); int* extent = reader->GetOutput()->GetExtent(); auto extractVOI = vtkSmartPointer::New(); extractVOI->SetInputData(reader->GetOutput()); extractVOI->SetVOI(extent); extractVOI->SetSampleRate(2, 2, 2); extractVOI->Update(); // write vti auto writer = vtkSmartPointer::New(); writer->SetFileName("head.vti"); writer->SetInputData(extractVOI->GetOutput()); writer->Write(); Best 2018?10?17?(?) 11:17 HinhCT : > > Hi, > > I need to write a vti file that can be opened in volView or paraveiw. > I use the below code to convert a series of DICOM files into a vti file. But > the output file size is too big,I want to reduce the size of it. > > // Read all the DICOM files in the specified directory. > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetDirectoryName(inputFoldername.c_str()); > reader->Update(); > > //write vti > vtkSmartPointer writer = > vtkSmartPointer::New(); > writer->SetFileName("head.vti"); > writer-> SetInputData(reader->GetOutput()); > writer->Write(); > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From elvis.stansvik at orexplore.com Wed Oct 17 01:56:34 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Wed, 17 Oct 2018 07:56:34 +0200 Subject: [vtkusers] QVTKWidget render artefact In-Reply-To: References: <1539716404707-0.post@n5.nabble.com> Message-ID: Den ons 17 okt. 2018 kl 06:37 skrev Brett Ables : > > I have a related question then. So for using vtk with pyqt I'm doing something similar to this example, except modified for pyqt5: > > https://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt > > Should I be using QVTKOpenGLWidget instead of the QVTKRenderWindowInteractor with a QFrame? Everything seems to work fine for me. Does the OpenGL widget have better performance? I've read on kitware blogs that there were recent OpenGL rendering improvements, but I assumed I was already benefiting from those since I'm on a recent version acquired through pip or conda. I think for Python, QVTKRenderWindowInteractor is the only option. QVTKOpenGLWidget is unfortunately not wrapped for Python, since it's not a vtkObjectBase-derived class (needed for the wrapper generator). Elvis > > Thanks! > > On Tue, Oct 16, 2018, 10:41 PM Brett Ables wrote: >> >> I have a related question then. So for using vtk with pyqt I'm doing something similar to this example, except modified for pyqt5: >> >> https://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt >> >> Should I be using QVTKOpenGLWidget instead of the QVTKRenderWindowInteractor with a QFrame? Everything seems to work fine for me. Does the OpenGL widget have better performance? I've read on kitware blogs that there were recent OpenGL rendering improvements, but I assumed I was already benefiting from those since I'm on a recent version acquired through pip or conda. >> >> Thanks! >> >> >> >> >> On Tue, Oct 16, 2018, 3:55 PM Jean-Christophe Fillion-Robin wrote: >>> >>> (re-adding the mailing list in cc) >>> >>> > I think, I need to download the 8 version. >>> >>> You could indeed get version 8.1 (the latest release) >>> >>> Hth >>> Jc >>> >>> >>> On Tue, Oct 16, 2018 at 4:49 PM Nacim Foudilbey wrote: >>>> >>>> Dear Jean-Christophe, >>>> Thank you for the quick reply. >>>> I think, I need to download the 8 version. >>>> Cimo >>>> >>>> On Tue, 16 Oct 2018 at 15:20, Jean-Christophe Fillion-Robin wrote: >>>>> >>>>> Hi Cimo, >>>>> >>>>> The use of QVTKWidget is deprecated, please could you try using QVTKOpenGLWidget instead ? >>>>> >>>>> See https://github.com/Kitware/VTK/blob/master/GUISupport/Qt/QVTKOpenGLWidget.h >>>>> >>>>> Hth >>>>> Jc >>>>> >>>>> On Tue, Oct 16, 2018 at 3:00 PM cimo wrote: >>>>>> >>>>>> Hello community, >>>>>> I have problem, I use QVTKWidget for rendering 3d objects. >>>>>> how to correct visualization artifacts (see figures). >>>>>> Thank you in advance. >>>>>> cimo >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> https://public.kitware.com/mailman/listinfo/vtkusers >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From hinh1108 at gmail.com Wed Oct 17 02:57:47 2018 From: hinh1108 at gmail.com (HinhCT) Date: Tue, 16 Oct 2018 23:57:47 -0700 (MST) Subject: [vtkusers] Convert a series of DICOM files into a VTI File In-Reply-To: References: <1539742642875-0.post@n5.nabble.com> Message-ID: <1539759467958-0.post@n5.nabble.com> Yeah, Thank you! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From frank at kapernikov.com Wed Oct 17 05:05:35 2018 From: frank at kapernikov.com (kervel) Date: Wed, 17 Oct 2018 02:05:35 -0700 (MST) Subject: [vtkusers] QVtkWidget / vtkPointPicker wrong coordinates Message-ID: <1539767135591-0.post@n5.nabble.com> Hello, i'm having trouble using the point picking (but also the "fly to point" from PCL) when using the PCLVisualizer with QT5. It seems that the vtkPointPicker does not compute the right x/y/z coordinates. The problem shows when building eg this git repo: https://github.com/lesterlo/cloud_annotation_tool and trying to use the fly to point functionality (by clicking on the vtk widget and hitting the "f" key). The fly to point jumps to the wrong point. When instantiating and using a vtkPointPicker myself, i also get the wrong x/y/z coords (of a point that was not under the mouse cursor) Funny thing is that it works when using the pclvisualizer stand-alone (eg not in QT), it seems to work fine. I found some old questions (without answers) on the mailing list about vtkPointPicker giving wrong coordinates. In one instance. I'm using ubuntu bionic which bundles a rather old vtk version. I don't really know where to start for debugging this problem. Could anybody give me a hint ? Frank -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From ken.martin at kitware.com Wed Oct 17 07:37:14 2018 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 17 Oct 2018 07:37:14 -0400 Subject: [vtkusers] VTK with OpenVR on Linux (HTC Vive) In-Reply-To: References: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> <184dd1d294f5f45b43e52881a028c071@dornheim-medical-images.com> <7360269beeac1f2a46cc6ff8dede98d2@dornheim-medical-images.com> Message-ID: Maybe try starting with something like this https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Cylinder/ Get that built and running on your system. Then edit that to add in the openvr codes. On Wed, Oct 17, 2018 at 5:59 AM, wrote: > Dear Ken, > Unfortunately, this still doesn't work on the current master(pulled some > minutes ago). This is my current CMakeLists.txt: > https://pastebin.com/J2UyX6tr > > The error looks pretty much the same as before: > [ 50%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > CylinderRenderingProperties.cxx:(.text._ZN28vtkRenderingOpenGL2_ > AutoInitD2Ev[_ZN28vtkRenderingOpenGL2_AutoInitD5Ev]+0x1): undefined > reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `_GLOBAL__sub_I_main': > CylinderRenderingProperties.cxx:(.text.startup+0x340): undefined > reference to `vtkRenderingOpenVR_AutoInit_Construct()' > collect2: error: ld returned 1 exit status > CMakeFiles/vtkOpenVRHelloWorld.dir/build.make:149: recipe for target > 'vtkOpenVRHelloWorld' failed > make[2]: *** [vtkOpenVRHelloWorld] Error 1 > CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/vtkOpenVRHelloWorld.dir/all' > failed > make[1]: *** [CMakeFiles/vtkOpenVRHelloWorld.dir/all] Error 2 > Makefile:83: recipe for target 'all' failed > make: *** [all] Error 2 > > Here you can find the verbose make output: https://pastebin.com/uKkPwWJP > > What is AutoInit? > > Do you have another idea what to try? > > Best wishes, > Max.D. > > 9. Oktober 2018 20:55, "Ken Martin" > > schrieb: > > Maybe try something like the following in your CMakeLists. It works for me > without adding any autoinit stuff. > find_package(VTK REQUIRED) > vtk_module_config(VTK > vtkCommonCore > vtkCommonDataModel > vtkFiltersGeneral > vtkIOImage > vtkIOXML > vtkInteractionStyle > vtkRenderingOpenGL2 > vtkRenderingOpenVR > ) > include(${VTK_USE_FILE}) > On Tue, Oct 9, 2018 at 12:27 PM, > wrote: > > Dear Ken, > I tried to paste those lines in like that: https://pastebin.com/SRmt1GNp > > More fixing seems to be needed, as I am getting a very similar (but > longer) linker error message: > > [100%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenVR_ModuleInit::vtkRenderingOpenVR_ModuleInit()': > /media/max/home/max/vtkOpenVRHelloWorld/CylinderRenderingProperties.cxx:5: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenVR_ModuleInit::~vtkRenderingOpenVR_ > ModuleInit()': > /media/max/home/max/vtkOpenVRHelloWorld/CylinderRenderingProperties.cxx:5: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > collect2: error: ld returned 1 exit status > CMakeFiles/vtkOpenVRHelloWorld.dir/build.make:149: recipe for target > 'vtkOpenVRHelloWorld' failed > make[2]: *** [vtkOpenVRHelloWorld] Error 1 > CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/vtkOpenVRHelloWorld.dir/all' > failed > make[1]: *** [CMakeFiles/vtkOpenVRHelloWorld.dir/all] Error 2 > Makefile:83: recipe for target 'all' failed > make: *** [all] Error 2 > > Do you a hint on what to try next? > > Best wishes, > Max.D. > > > > 9. Oktober 2018 15:12, "Ken Martin" > > schrieb: > > You may need > #include "vtkAutoInit.h" > VTK_MODULE_INIT(vtkRenderingOpenGL2) > VTK_MODULE_INIT(vtkRenderingOpenVR) > or similar. Give that a shot - Ken > On Tue, Oct 9, 2018 at 7:55 AM, > wrote: > > Dear Ken, > I finally managed to get my code building and running on both Windows and > Linux. > You can find it here: > https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip > > Unfortunately, it doesn't work with the latest VTK-Version from > https://gitlab.kitware.com/vtk/vtk > After some testing, I found the first commit it doesn't build with: > https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d11 > 1f6c10af3dd79488f919cc > (VTK builds, but my program doesn't build with this VTK Version) > > Even though I already use the vtkOpenVR* classes explicitly, it doesn't > build. > Is there something else I have to change to make it compatible? > > Make produces the following Linker error: > > [ 50%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > > Any help would be appreciated! > > Best regards, > Max.D. > > > 4. Oktober 2018 16:10, "Ken Martin" > > schrieb: > > You need to create an use an OpenVRCamera. From your code it doesn't look > like you are. I doubt that is the crash but it could be. > Does the example work on windows? Since linux is an unknown I would think > it would be best to make sure you have something working on windows, then > port to linux. > On Thu, Oct 4, 2018 at 9:56 AM, > wrote: > > Hey Guys, > Has anyone of you been able to use the vtkOpenVR classes on Linux? > I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to > run the HelloWorld Example of VTK modified for VR, I encounter a > segmentation fault. > You can find the code I used here: https://pastebin.com/gjsvKy58 > The whole project with binary and core dump can be found here: > https://transfer.sh/6vONY/build.zip > > Do you have any suggestions on how to get this working? > > Thanks in advance! > > Best regards, > Max.Deubel > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 Wed Oct 17 07:40:43 2018 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 17 Oct 2018 07:40:43 -0400 Subject: [vtkusers] Invalidating the OpenGL2 shader cache In-Reply-To: <0f9ce3731aba49ac9e45f203ff39dc7c@vytronus.com> References: <0f9ce3731aba49ac9e45f203ff39dc7c@vytronus.com> Message-ID: Last I heard glGet calls can sometimes stall the pipeline so I have been trying to avoid them. I usually use the method clearing the shader cache when mixing opengl codes and that seems to work. On Tue, Oct 16, 2018 at 9:21 PM, Benjamin Schleimer wrote: > Hi, > > I have come across an interesting problem with VTK and I wanted to ask > if there is another way to work around it. > > > Using the OpenGL2 backend, we have discovered that if another system > renders to the same opengl context as VTK, > > then the shader cache is put into an invalidated state. > > > The root problem is that in Rendering/OpenGL2/vtkOpenGLShaderCache.cxx, > in vtkOpenGLShaderCache::BindShader(), the lastShaderBound is assumed to > not change. VTK assumes that it's the only system setting glUseProgram() > for the opengl context. > > So if another system clears the GL_CURRENT_PROGRAM value, then VTK doesn't > know about it and the following calls to set program uniforms fails with an > opengl error. > > > A suggested is to add a call to glGetIntegerv(GL_CURRENT_PROGRAM, ...) > and compare it against this->Handle before returning. > > > I worked around this problem by clearing the shader cache before invoking > vtkRenderWindow::Render() but this required knowing that the shader cache > was invalid. > > > Sincerely, > > 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: > https://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 deubel at dornheim-medical-images.com Wed Oct 17 08:02:17 2018 From: deubel at dornheim-medical-images.com (deubel at dornheim-medical-images.com) Date: Wed, 17 Oct 2018 12:02:17 +0000 Subject: [vtkusers] VTK with OpenVR on Linux (HTC Vive) In-Reply-To: References: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> <184dd1d294f5f45b43e52881a028c071@dornheim-medical-images.com> <7360269beeac1f2a46cc6ff8dede98d2@dornheim-medical-images.com> Message-ID: Dear Ken, I did as you requested. In 2D, it works just fine, but when including the vtkOpenVR headers, it cannot build anymore. The make error message while linking is the same as before. This is the modified code file: https://pastebin.com/NDk2kzhc (https://pastebin.com/NDk2kzhc) And the modified CMakeLists: https://pastebin.com/Gs9szZGc (https://pastebin.com/Gs9szZGc) (This builds and runs with the old vtk version) Make error message: Scanning dependencies of target Cylinder [ 50%] Building CXX object CMakeFiles/Cylinder.dir/Cylinder.cxx.o [100%] Linking CXX executable Cylinder CMakeFiles/Cylinder.dir/Cylinder.cxx.o: In function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': Cylinder.cxx:(.text._ZN28vtkRenderingOpenGL2_AutoInitD2Ev[_ZN28vtkRenderingOpenGL2_AutoInitD5Ev]+0x1): undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' CMakeFiles/Cylinder.dir/Cylinder.cxx.o: In function `_GLOBAL__sub_I_main': Cylinder.cxx:(.text.startup+0x470): undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' collect2: error: ld returned 1 exit status CMakeFiles/Cylinder.dir/build.make:149: recipe for target 'Cylinder' failed make[2]: *** [Cylinder] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Cylinder.dir/all' failed make[1]: *** [CMakeFiles/Cylinder.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 Best wishes, Max.D. 17. Oktober 2018 13:37, "Ken Martin" )> schrieb: Maybe try starting with something like this https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Cylinder/ (https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Cylinder/) Get that built and running on your system. Then edit that to add in the openvr codes. On Wed, Oct 17, 2018 at 5:59 AM, wrote: Dear Ken, Unfortunately, this still doesn't work on the current master(pulled some minutes ago). This is my current CMakeLists.txt: https://pastebin.com/J2UyX6tr (https://pastebin.com/J2UyX6tr) The error looks pretty much the same as before: [ 50%] Linking CXX executable vtkOpenVRHelloWorld CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': CylinderRenderingProperties.cxx:(.text._ZN28vtkRenderingOpenGL2_AutoInitD2Ev[_ZN28vtkRenderingOpenGL2_AutoInitD5Ev]+0x1): undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In function `_GLOBAL__sub_I_main': CylinderRenderingProperties.cxx:(.text.startup+0x340): undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' collect2: error: ld returned 1 exit status CMakeFiles/vtkOpenVRHelloWorld.dir/build.make:149: recipe for target 'vtkOpenVRHelloWorld' failed make[2]: *** [vtkOpenVRHelloWorld] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/vtkOpenVRHelloWorld.dir/all' failed make[1]: *** [CMakeFiles/vtkOpenVRHelloWorld.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 Here you can find the verbose make output: https://pastebin.com/uKkPwWJP (https://pastebin.com/uKkPwWJP) What is AutoInit? Do you have another idea what to try? Best wishes, Max.D. 9. Oktober 2018 20:55, "Ken Martin" schrieb: Maybe try something like the following in your CMakeLists. It works for me without adding any autoinit stuff. find_package(VTK REQUIRED) vtk_module_config(VTK vtkCommonCore vtkCommonDataModel vtkFiltersGeneral vtkIOImage vtkIOXML vtkInteractionStyle vtkRenderingOpenGL2 vtkRenderingOpenVR ) include(${VTK_USE_FILE}) On Tue, Oct 9, 2018 at 12:27 PM, wrote: Dear Ken, I tried to paste those lines in like that: https://pastebin.com/SRmt1GNp (https://pastebin.com/SRmt1GNp) More fixing seems to be needed, as I am getting a very similar (but longer) linker error message: [100%] Linking CXX executable vtkOpenVRHelloWorld CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In function `vtkRenderingOpenVR_ModuleInit::vtkRenderingOpenVR_ModuleInit()': /media/max/home/max/vtkOpenVRHelloWorld/CylinderRenderingProperties.cxx:5: undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In function `vtkRenderingOpenVR_ModuleInit::~vtkRenderingOpenVR_ModuleInit()': /media/max/home/max/vtkOpenVRHelloWorld/CylinderRenderingProperties.cxx:5: undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' collect2: error: ld returned 1 exit status CMakeFiles/vtkOpenVRHelloWorld.dir/build.make:149: recipe for target 'vtkOpenVRHelloWorld' failed make[2]: *** [vtkOpenVRHelloWorld] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/vtkOpenVRHelloWorld.dir/all' failed make[1]: *** [CMakeFiles/vtkOpenVRHelloWorld.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 Do you a hint on what to try next? Best wishes, Max.D. 9. Oktober 2018 15:12, "Ken Martin" schrieb: You may need #include "vtkAutoInit.h" VTK_MODULE_INIT(vtkRenderingOpenGL2) VTK_MODULE_INIT(vtkRenderingOpenVR) or similar. Give that a shot - Ken On Tue, Oct 9, 2018 at 7:55 AM, wrote: Dear Ken, I finally managed to get my code building and running on both Windows and Linux. You can find it here: https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip (https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip) Unfortunately, it doesn't work with the latest VTK-Version from https://gitlab.kitware.com/vtk/vtk (https://gitlab.kitware.com/vtk/vtk) After some testing, I found the first commit it doesn't build with: https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d111f6c10af3dd79488f919cc (https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d111f6c10af3dd79488f919cc) (VTK builds, but my program doesn't build with this VTK Version) Even though I already use the vtkOpenVR* classes explicitly, it doesn't build. Is there something else I have to change to make it compatible? Make produces the following Linker error: [ 50%] Linking CXX executable vtkOpenVRHelloWorld CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11_2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' Any help would be appreciated! Best regards, Max.D. 4. Oktober 2018 16:10, "Ken Martin" schrieb: You need to create an use an OpenVRCamera. From your code it doesn't look like you are. I doubt that is the crash but it could be. Does the example work on windows? Since linux is an unknown I would think it would be best to make sure you have something working on windows, then port to linux. On Thu, Oct 4, 2018 at 9:56 AM, wrote: Hey Guys, Has anyone of you been able to use the vtkOpenVR classes on Linux? I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to run the HelloWorld Example of VTK modified for VR, I encounter a segmentation fault. You can find the code I used here: https://pastebin.com/gjsvKy58 (https://pastebin.com/gjsvKy58) The whole project with binary and core dump can be found here: https://transfer.sh/6vONY/build.zip (https://transfer.sh/6vONY/build.zip) Do you have any suggestions on how to get this working? Thanks in advance! Best regards, Max.Deubel _______________________________________________ Powered by www.kitware.com (http://www.kitware.com) Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html (http://www.kitware.com/opensource/opensource.html) Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ (http://www.vtk.org/Wiki/VTK_FAQ) Search the list archives at: http://markmail.org/search/?q=vtkusers (http://markmail.org/search/?q=vtkusers) Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers (https://public.kitware.com/mailman/listinfo/vtkusers) -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street (https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g) Carrboro, North Carolina (https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g) 27510 USA (https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g) This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street (https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g) Carrboro, North Carolina (https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g) 27510 USA (https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g) This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street (https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g) Carrboro, North Carolina (https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g) 27510 USA (https://maps.google.com/?q=101+East+Weaver+Street+Carrboro,+North+Carolina+27510+USA&entry=gmail&source=g) This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 Wed Oct 17 08:26:12 2018 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 17 Oct 2018 08:26:12 -0400 Subject: [vtkusers] VTK with OpenVR on Linux (HTC Vive) In-Reply-To: References: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> <184dd1d294f5f45b43e52881a028c071@dornheim-medical-images.com> <7360269beeac1f2a46cc6ff8dede98d2@dornheim-medical-images.com> Message-ID: Hmm everything looks fine. Maybe something is left over on your VTK build causing openvr to try to link to factory methods. Make sure VTK_OPENVR_OBJECT_FACTORY is off/false in your cmake cache and do a clean rebuild of VTK. On Wed, Oct 17, 2018 at 8:02 AM, wrote: > Dear Ken, > > I did as you requested. > In 2D, it works just fine, but when including the vtkOpenVR headers, it > cannot build anymore. > The make error message while linking is the same as before. > This is the modified code file: https://pastebin.com/NDk2kzhc > And the modified CMakeLists: https://pastebin.com/Gs9szZGc > (This builds and runs with the old vtk version) > > Make error message: > Scanning dependencies of target Cylinder > [ 50%] Building CXX object CMakeFiles/Cylinder.dir/Cylinder.cxx.o > [100%] Linking CXX executable Cylinder > CMakeFiles/Cylinder.dir/Cylinder.cxx.o: In function > `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > Cylinder.cxx:(.text._ZN28vtkRenderingOpenGL2_AutoInitD2Ev[_ > ZN28vtkRenderingOpenGL2_AutoInitD5Ev]+0x1): undefined reference to > `vtkRenderingOpenVR_AutoInit_Destruct()' > CMakeFiles/Cylinder.dir/Cylinder.cxx.o: In function `_GLOBAL__sub_I_main': > Cylinder.cxx:(.text.startup+0x470): undefined reference to > `vtkRenderingOpenVR_AutoInit_Construct()' > collect2: error: ld returned 1 exit status > CMakeFiles/Cylinder.dir/build.make:149: recipe for target 'Cylinder' > failed > make[2]: *** [Cylinder] Error 1 > CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Cylinder.dir/all' > failed > make[1]: *** [CMakeFiles/Cylinder.dir/all] Error 2 > Makefile:83: recipe for target 'all' failed > make: *** [all] Error 2 > > Best wishes, > Max.D. > > > > 17. Oktober 2018 13:37, "Ken Martin" > > schrieb: > > Maybe try starting with something like this > https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Cylinder/ > Get that built and running on your system. Then edit that to add in the > openvr codes. > On Wed, Oct 17, 2018 at 5:59 AM, > wrote: > > Dear Ken, > Unfortunately, this still doesn't work on the current master(pulled some > minutes ago). This is my current CMakeLists.txt: > https://pastebin.com/J2UyX6tr > > The error looks pretty much the same as before: > [ 50%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > CylinderRenderingProperties.cxx:(.text._ZN28vtkRenderingOpen > GL2_AutoInitD2Ev[_ZN28vtkRenderingOpenGL2_AutoInitD5Ev]+0x1): undefined > reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `_GLOBAL__sub_I_main': > CylinderRenderingProperties.cxx:(.text.startup+0x340): undefined > reference to `vtkRenderingOpenVR_AutoInit_Construct()' > collect2: error: ld returned 1 exit status > CMakeFiles/vtkOpenVRHelloWorld.dir/build.make:149: recipe for target > 'vtkOpenVRHelloWorld' failed > make[2]: *** [vtkOpenVRHelloWorld] Error 1 > CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/vtkOpenVRHelloWorld.dir/all' > failed > make[1]: *** [CMakeFiles/vtkOpenVRHelloWorld.dir/all] Error 2 > Makefile:83: recipe for target 'all' failed > make: *** [all] Error 2 > > Here you can find the verbose make output: https://pastebin.com/uKkPwWJP > > What is AutoInit? > > Do you have another idea what to try? > > Best wishes, > Max.D. > > 9. Oktober 2018 20:55, "Ken Martin" > > schrieb: > > Maybe try something like the following in your CMakeLists. It works for me > without adding any autoinit stuff. > find_package(VTK REQUIRED) > vtk_module_config(VTK > vtkCommonCore > vtkCommonDataModel > vtkFiltersGeneral > vtkIOImage > vtkIOXML > vtkInteractionStyle > vtkRenderingOpenGL2 > vtkRenderingOpenVR > ) > include(${VTK_USE_FILE}) > On Tue, Oct 9, 2018 at 12:27 PM, > wrote: > > Dear Ken, > I tried to paste those lines in like that: https://pastebin.com/SRmt1GNp > > More fixing seems to be needed, as I am getting a very similar (but > longer) linker error message: > > [100%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenVR_ModuleInit::vtkRenderingOpenVR_ModuleInit()': > /media/max/home/max/vtkOpenVRHelloWorld/CylinderRenderingProperties.cxx:5: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenVR_ModuleInit::~vtkRenderingOpenVR_ModuleIn > it()': > /media/max/home/max/vtkOpenVRHelloWorld/CylinderRenderingProperties.cxx:5: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > collect2: error: ld returned 1 exit status > CMakeFiles/vtkOpenVRHelloWorld.dir/build.make:149: recipe for target > 'vtkOpenVRHelloWorld' failed > make[2]: *** [vtkOpenVRHelloWorld] Error 1 > CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/vtkOpenVRHelloWorld.dir/all' > failed > make[1]: *** [CMakeFiles/vtkOpenVRHelloWorld.dir/all] Error 2 > Makefile:83: recipe for target 'all' failed > make: *** [all] Error 2 > > Do you a hint on what to try next? > > Best wishes, > Max.D. > > > > 9. Oktober 2018 15:12, "Ken Martin" > > schrieb: > > You may need > #include "vtkAutoInit.h" > VTK_MODULE_INIT(vtkRenderingOpenGL2) > VTK_MODULE_INIT(vtkRenderingOpenVR) > or similar. Give that a shot - Ken > On Tue, Oct 9, 2018 at 7:55 AM, > wrote: > > Dear Ken, > I finally managed to get my code building and running on both Windows and > Linux. > You can find it here: > https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip > > Unfortunately, it doesn't work with the latest VTK-Version from > https://gitlab.kitware.com/vtk/vtk > After some testing, I found the first commit it doesn't build with: > https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d11 > 1f6c10af3dd79488f919cc > (VTK builds, but my program doesn't build with this VTK Version) > > Even though I already use the vtkOpenVR* classes explicitly, it doesn't > build. > Is there something else I have to change to make it compatible? > > Make produces the following Linker error: > > [ 50%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > > Any help would be appreciated! > > Best regards, > Max.D. > > > 4. Oktober 2018 16:10, "Ken Martin" > > schrieb: > > You need to create an use an OpenVRCamera. From your code it doesn't look > like you are. I doubt that is the crash but it could be. > Does the example work on windows? Since linux is an unknown I would think > it would be best to make sure you have something working on windows, then > port to linux. > On Thu, Oct 4, 2018 at 9:56 AM, > wrote: > > Hey Guys, > Has anyone of you been able to use the vtkOpenVR classes on Linux? > I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to > run the HelloWorld Example of VTK modified for VR, I encounter a > segmentation fault. > You can find the code I used here: https://pastebin.com/gjsvKy58 > The whole project with binary and core dump can be found here: > https://transfer.sh/6vONY/build.zip > > Do you have any suggestions on how to get this working? > > Thanks in advance! > > Best regards, > Max.Deubel > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 deubel at dornheim-medical-images.com Wed Oct 17 12:45:23 2018 From: deubel at dornheim-medical-images.com (deubel at dornheim-medical-images.com) Date: Wed, 17 Oct 2018 16:45:23 +0000 Subject: [vtkusers] VR: Delay in objects following the vive controllers Message-ID: <98874f317c22c4048d3a612dc69dff1c@dornheim-medical-images.com> Hello! I tried out using VTK(master) with openVR and a HTC Vive. Using the default InteractorStyle(vtkOpenVRInteractorStyle), one can display hints for what the buttons do. When moving the controllers quickly, these hints follow the controller models delayed. This also happened in my own experiments with a custom InteractorStyle. Do you know a way to circumvent this? Best whishes, Max.D. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed Oct 17 13:08:43 2018 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 17 Oct 2018 13:08:43 -0400 Subject: [vtkusers] VTK with OpenVR on Linux (HTC Vive) In-Reply-To: <207f14f786726c2900e1b32c093ec1cd@dornheim-medical-images.com> References: <1047b72226116c14c1660cf45b54fb65@dornheim-medical-images.com> <184dd1d294f5f45b43e52881a028c071@dornheim-medical-images.com> <7360269beeac1f2a46cc6ff8dede98d2@dornheim-medical-images.com> <207f14f786726c2900e1b32c093ec1cd@dornheim-medical-images.com> Message-ID: Awesome! Glad you tracked it down and got it working. More recent versions of VTK removed that option so hopefully it will not bite others like it did you. On Wed, Oct 17, 2018 at 12:40 PM, wrote: > Dear Ken, > Thank you very much! > Using a clean git-clone worked. I cannot build VTK with the BUILD_TESTING > option, but I can live with that. > > Best wishes, > Max.D. > > 17. Oktober 2018 14:26, "Ken Martin" > > schrieb: > > Hmm everything looks fine. Maybe something is left over on your VTK build > causing openvr to try to link to factory methods. Make sure > VTK_OPENVR_OBJECT_FACTORY > is off/false in your cmake cache and do a clean rebuild of VTK. > On Wed, Oct 17, 2018 at 8:02 AM, > wrote: > > Dear Ken, > > I did as you requested. > In 2D, it works just fine, but when including the vtkOpenVR headers, it > cannot build anymore. > The make error message while linking is the same as before. > This is the modified code file: https://pastebin.com/NDk2kzhc > And the modified CMakeLists: https://pastebin.com/Gs9szZGc > (This builds and runs with the old vtk version) > > Make error message: > Scanning dependencies of target Cylinder > [ 50%] Building CXX object CMakeFiles/Cylinder.dir/Cylinder.cxx.o > [100%] Linking CXX executable Cylinder > CMakeFiles/Cylinder.dir/Cylinder.cxx.o: In function > `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > Cylinder.cxx:(.text._ZN28vtkRenderingOpenGL2_AutoInitD2Ev[_Z > N28vtkRenderingOpenGL2_AutoInitD5Ev]+0x1): undefined reference to > `vtkRenderingOpenVR_AutoInit_Destruct()' > CMakeFiles/Cylinder.dir/Cylinder.cxx.o: In function `_GLOBAL__sub_I_main': > Cylinder.cxx:(.text.startup+0x470): undefined reference to > `vtkRenderingOpenVR_AutoInit_Construct()' > collect2: error: ld returned 1 exit status > CMakeFiles/Cylinder.dir/build.make:149: recipe for target 'Cylinder' > failed > make[2]: *** [Cylinder] Error 1 > CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Cylinder.dir/all' > failed > make[1]: *** [CMakeFiles/Cylinder.dir/all] Error 2 > Makefile:83: recipe for target 'all' failed > make: *** [all] Error 2 > > Best wishes, > Max.D. > > > > 17. Oktober 2018 13:37, "Ken Martin" > > schrieb: > > Maybe try starting with something like this > https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Cylinder/ > Get that built and running on your system. Then edit that to add in the > openvr codes. > On Wed, Oct 17, 2018 at 5:59 AM, > wrote: > > Dear Ken, > Unfortunately, this still doesn't work on the current master(pulled some > minutes ago). This is my current CMakeLists.txt: > https://pastebin.com/J2UyX6tr > > The error looks pretty much the same as before: > [ 50%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > CylinderRenderingProperties.cxx:(.text._ZN28vtkRenderingOpen > GL2_AutoInitD2Ev[_ZN28vtkRenderingOpenGL2_AutoInitD5Ev]+0x1): undefined > reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `_GLOBAL__sub_I_main': > CylinderRenderingProperties.cxx:(.text.startup+0x340): undefined > reference to `vtkRenderingOpenVR_AutoInit_Construct()' > collect2: error: ld returned 1 exit status > CMakeFiles/vtkOpenVRHelloWorld.dir/build.make:149: recipe for target > 'vtkOpenVRHelloWorld' failed > make[2]: *** [vtkOpenVRHelloWorld] Error 1 > CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/vtkOpenVRHelloWorld.dir/all' > failed > make[1]: *** [CMakeFiles/vtkOpenVRHelloWorld.dir/all] Error 2 > Makefile:83: recipe for target 'all' failed > make: *** [all] Error 2 > > Here you can find the verbose make output: https://pastebin.com/uKkPwWJP > > What is AutoInit? > > Do you have another idea what to try? > > Best wishes, > Max.D. > > 9. Oktober 2018 20:55, "Ken Martin" > > schrieb: > > Maybe try something like the following in your CMakeLists. It works for me > without adding any autoinit stuff. > find_package(VTK REQUIRED) > vtk_module_config(VTK > vtkCommonCore > vtkCommonDataModel > vtkFiltersGeneral > vtkIOImage > vtkIOXML > vtkInteractionStyle > vtkRenderingOpenGL2 > vtkRenderingOpenVR > ) > include(${VTK_USE_FILE}) > On Tue, Oct 9, 2018 at 12:27 PM, > wrote: > > Dear Ken, > I tried to paste those lines in like that: https://pastebin.com/SRmt1GNp > > More fixing seems to be needed, as I am getting a very similar (but > longer) linker error message: > > [100%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenVR_ModuleInit::vtkRenderingOpenVR_ModuleInit()': > /media/max/home/max/vtkOpenVRHelloWorld/CylinderRenderingProperties.cxx:5: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenVR_ModuleInit::~vtkRenderingOpenVR_ModuleIn > it()': > /media/max/home/max/vtkOpenVRHelloWorld/CylinderRenderingProperties.cxx:5: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > collect2: error: ld returned 1 exit status > CMakeFiles/vtkOpenVRHelloWorld.dir/build.make:149: recipe for target > 'vtkOpenVRHelloWorld' failed > make[2]: *** [vtkOpenVRHelloWorld] Error 1 > CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/vtkOpenVRHelloWorld.dir/all' > failed > make[1]: *** [CMakeFiles/vtkOpenVRHelloWorld.dir/all] Error 2 > Makefile:83: recipe for target 'all' failed > make: *** [all] Error 2 > > Do you a hint on what to try next? > > Best wishes, > Max.D. > > > > 9. Oktober 2018 15:12, "Ken Martin" > > schrieb: > > You may need > #include "vtkAutoInit.h" > VTK_MODULE_INIT(vtkRenderingOpenGL2) > VTK_MODULE_INIT(vtkRenderingOpenVR) > or similar. Give that a shot - Ken > On Tue, Oct 9, 2018 at 7:55 AM, > wrote: > > Dear Ken, > I finally managed to get my code building and running on both Windows and > Linux. > You can find it here: > https://transfer.sh/gJ1Sg/vtkOpenVRHelloWorld.zip > > Unfortunately, it doesn't work with the latest VTK-Version from > https://gitlab.kitware.com/vtk/vtk > After some testing, I found the first commit it doesn't build with: > https://gitlab.kitware.com/vtk/vtk/commit/61bc6b5b4b8f0d2d11 > 1f6c10af3dd79488f919cc > (VTK builds, but my program doesn't build with this VTK Version) > > Even though I already use the vtkOpenVR* classes explicitly, it doesn't > build. > Is there something else I have to change to make it compatible? > > Make produces the following Linker error: > > [ 50%] Linking CXX executable vtkOpenVRHelloWorld > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Construct()' > CMakeFiles/vtkOpenVRHelloWorld.dir/CylinderRenderingProperties.cxx.o: In > function `vtkRenderingOpenGL2_AutoInit::~vtkRenderingOpenGL2_AutoInit()': > /media/max/home/max/build-vtk-current-master-Desktop_Qt_5_11 > _2_GCC_64bit-Default/Rendering/OpenGL2/vtkRenderingOpenGL2Module.h:47: > undefined reference to `vtkRenderingOpenVR_AutoInit_Destruct()' > > Any help would be appreciated! > > Best regards, > Max.D. > > > 4. Oktober 2018 16:10, "Ken Martin" > > schrieb: > > You need to create an use an OpenVRCamera. From your code it doesn't look > like you are. I doubt that is the crash but it could be. > Does the example work on windows? Since linux is an unknown I would think > it would be best to make sure you have something working on windows, then > port to linux. > On Thu, Oct 4, 2018 at 9:56 AM, > wrote: > > Hey Guys, > Has anyone of you been able to use the vtkOpenVR classes on Linux? > I can run Steam with SteamVR on a Ubuntu 18.04 system, but when I try to > run the HelloWorld Example of VTK modified for VR, I encounter a > segmentation fault. > You can find the code I used here: https://pastebin.com/gjsvKy58 > The whole project with binary and core dump can be found here: > https://transfer.sh/6vONY/build.zip > > Do you have any suggestions on how to get this working? > > Thanks in advance! > > Best regards, > Max.Deubel > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensou > rce/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > > > -- > Ken Martin PhD > Distinguished Engineer > Kitware Inc. > 101 East Weaver Street > > Carrboro, North Carolina > > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 sankhesh.jhaveri at kitware.com Wed Oct 17 14:40:10 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 17 Oct 2018 14:40:10 -0400 Subject: [vtkusers] changing cursor representation within qvtk? In-Reply-To: <1450449241699-5735581.post@n5.nabble.com> References: <1450449241699-5735581.post@n5.nabble.com> Message-ID: The fix for the issue is included in: https://gitlab.kitware.com/vtk/vtk/merge_requests/4795 Best, Sankhesh ? On Fri, Dec 18, 2015 at 9:34 AM joaoroberto88 wrote: > Hi people, > > I'm facing the same issue described here. Additionally, I tried to change > the cursor using Qt setCursor method, but again I had no luck. Has anyone > had this problem before? > > Thanks, > > Joao. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/changing-cursor-representation-within-qvtk-tp5734482p5735581.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 > -- Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware | (518) 881-4417 ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mhalle at bwh.harvard.edu Wed Oct 17 22:06:15 2018 From: mhalle at bwh.harvard.edu (Halle, Michael Wilfred,Ph.D.) Date: Thu, 18 Oct 2018 02:06:15 +0000 Subject: [vtkusers] please support the Open Anatomy Project: vote for funding! Message-ID: <81059E99-D9AB-44AE-95C2-F070B68B7ED7@bwh.harvard.edu> Dear VTK community, I wanted to write to you to ask your support for the Open Anatomy Project, which is the result of the medical imaging analysis and open source software development work done over the last 25 years at the Surgical Planning Lab at Brigham and Women's Hospital. If you haven't seen it yet, please visit: https://openanatomy.org (While you are there, please vote for the Open Anatomy Project as part of a BWH research prize. Anyone can vote! Tell your friends!) We are building ways to publish annotated, structured image and geometry data, the underlying data representation of anatomy atlases but also a great way to represent lots of meaningful visualization data. The tools we are developing include an atlas data format, web-based data viewers, and a backend community portal for developing collaborative atlases. Once completed, we hope to have "one button export" from VTK-based applications such as 3D Slicer to produce atlases that can then be published for easy viewing and data reuse. The portal site will offer Wikipedia-like user access to atlases and a vaguely GitHub-like developer experience. We are publishing atlases that we have developed over the years, but that's just the start. We want to build up a rich library of atlases, the pieces of which can be used for any purpose (3D printing, VR, ...). This site ultimately will be one-stop shopping for medical atlases of all sorts, including normal anatomy, anatomical variations, pathology, and surgical plans. We already using these atlases for educational outreach around the globe. For instance, we are working with African medical partners to develop medical classroom materials to teach the next generation of African medical students. This is a grand but important vision. We are just at the beginning of this project. But the success of the VTK, ITK, and Slicer communities proves to us that vibrant communities can emerge around meaningful software and data projects. Your help is welcome! Could you please vote for our project by following the "Vote" link when you visit our home page at https://openanatomy.org ? It will help us secure next year's funding and raise the profile of the project. Thanks so much. Michael Halle Ron Kikinis and the rest of the Open Anatomy Team. The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. From frank at kapernikov.com Thu Oct 18 04:59:47 2018 From: frank at kapernikov.com (kervel) Date: Thu, 18 Oct 2018 01:59:47 -0700 (MST) Subject: [vtkusers] QVtkWidget / vtkPointPicker wrong coordinates In-Reply-To: <1539767135591-0.post@n5.nabble.com> References: <1539767135591-0.post@n5.nabble.com> Message-ID: <1539853187683-0.post@n5.nabble.com> Hello, For reference: i managed to fix this by switching to QVTKOpenGLWidget. Unfortunately this requires PCL from master (for reference: this http://www.pcl-users.org/QVTKOpenGLWidget-Qt-PCLVisualizer-td4045158.html is not yet in a released version). Now i have some other issues: i need to run it with MESA_GL_VERSION_OVERRIDE=3.2 otherwise i get this: vtkShaderProgram (0x563e8e366510): 0:1(10): error: GLSL 1.50 is not supported thanks, Frank -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From deubel at dornheim-medical-images.com Thu Oct 18 06:00:06 2018 From: deubel at dornheim-medical-images.com (deubel at dornheim-medical-images.com) Date: Thu, 18 Oct 2018 10:00:06 +0000 Subject: [vtkusers] vtkSampleFunction in existing image Message-ID: <520ea9081b60566342bbe4b16e5e7bea@dornheim-medical-images.com> Hello! Is it possible to sample an implicit function into an existing vtkImageData Object? Something the just replaces/fills all voxels 'inside' the function with a given value and leave the rest as-is. Best wishes, Max.D. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ophagen at dornheim-medical-images.de Thu Oct 18 07:17:50 2018 From: ophagen at dornheim-medical-images.de (Angelika Ophagen) Date: Thu, 18 Oct 2018 13:17:50 +0200 Subject: [vtkusers] vtkMultiVolume, vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ClearRemovedInputs() throws SegFault during/after Render Message-ID: <2398843.lChJ16j1jy@hekate> Hello, I have a question about using vtkMultiVolume. I am using the nightly-master to use vtkMultiVolume for a bachelor thesis about multi-modal medical images rendering possibilities. I get a SegFault as soon as I have removed input connections of the mapper ports and wonder if there is an error in VTK or if I am using it wrong. My simple prototype has no problem - it hardly does a thing, as it is roughly based on this (https://gitlab.kitware.com/vtk/vtk/blob/nightly-master/ Rendering/Volume/Testing/Cxx/TestGPURayCastMultiVolumeAddRemove.cxx). But the "real" implementation has problems. It is inside a large code base with lots of GUI triggers that result in Rendering, so it might be a missing call to Render or one too many at the wrong time. (After / While?) Rendering from vtkOpenGLRenderer::UpdateGeometry (https:// gitlab.kitware.com/vtk/vtk/blob/nightly-master/Rendering/OpenGL2/ vtkOpenGLRenderer.cxx#L335), vtkMultiVolume::RenderVolumetricGeometry (https://gitlab.kitware.com/vtk/vtk/blob/nightly-master/Rendering/Volume/ vtkMultiVolume.cxx#L275) calls its Mapper to Render and vtkOpenGLGPUVolumeRayCastMapper::GPURender (https://gitlab.kitware.com/vtk/ vtk/blame/b8ab2d693a54024b7e81cb57a32c289cb7dc8314/Rendering/VolumeOpenGL2/ vtkOpenGLGPUVolumeRayCastMapper.cxx#L3324) tries to clear up the removed inputs here: https://gitlab.kitware.com/vtk/vtk/blame/ b8ab2d693a54024b7e81cb57a32c289cb7dc8314/Rendering/VolumeOpenGL2/ vtkOpenGLGPUVolumeRayCastMapper.cxx#L3162 At that moment input.GradientOpacityTables, input.OpacityTables and input.RGBTables are vtkSmartPointer with a nullptr as pointed object. A quick fix is to change the code like so: if( input.GradientOpacityTables ) input.GradientOpacityTables- >ReleaseGraphicsResources(win); But I am concerned I might be masking the symptom of my using vtkMultiVolume the wrong way. Anybody out there who can help and tell me of a better way to fix that bug? Regards, A. Ophagen -- Dipl.-?bers. A. Ophagen Dornheim Medical Images GmbH Listemannstra?e 10, 39104 Magdeburg, Deutschland WWW: http://www.dornheim-medical-images.de/ E-Mail: info at dornheim-medical-images.de Tel: +49 (391) 5054 57 0 Gesch?ftsf?hrer: Lars Dornheim, Jana Dornheim Eingetragen beim Amtsgericht Stendal, HRB 10737 From omalyushytskyvtkuser at gmail.com Thu Oct 18 16:47:07 2018 From: omalyushytskyvtkuser at gmail.com (Oleksandr Malyushytsky) Date: Thu, 18 Oct 2018 13:47:07 -0700 Subject: [vtkusers] vtkInteractorStyleTrackballCamera problem with multiple views In-Reply-To: References: Message-ID: For some reason I can't see my question in mail, so I am not sure was it posted, but was not replied or never ended up in the mailing list. 1. Could anybody confirm that it was posted on mailing list? 2. Can anybody give a hint how to notify interactor style (reset mode) when even propagated to other widget? Best regards, Alex On Mon, Oct 15, 2018 at 3:48 PM Oleksandr Malyushytsky < omalyushytskyvtkuser at gmail.com> wrote: > 1. Push the left mouse button. > 2. Drag the mouse out of the view, do not release it > 3. Click and release right mouse button (or middle button, any button > which was not grabbed). Release left mouse button. > 4 In this state you can move mouse back to view. View will behave like > left mouse button is clicked. > > Problem is that only left button was grabbing a mouse. Releasing right > mouse button will prevent interactorStyle from receiving OnLeftButtonUp(), > > so when you move mouse into the view not even it will still remain in > previously set interaction state, but the appropriate mouse button will not > be grabbed. > > This seems like a bug and I would appreciate if anybody could at least > point on work around. > It does not appear on my version of paraview, but I am not sure what fixed > the behaviour. > > (I use vtk 8.1.1 with Qt 5.9) > > Best regards, > Alex > -------------- next part -------------- An HTML attachment was scrubbed... URL: From omalyushytskyvtkuser at gmail.com Thu Oct 18 17:18:55 2018 From: omalyushytskyvtkuser at gmail.com (Oleksandr Malyushytsky) Date: Thu, 18 Oct 2018 14:18:55 -0700 Subject: [vtkusers] QVtkWidget / vtkPointPicker wrong coordinates In-Reply-To: <1539853187683-0.post@n5.nabble.com> References: <1539767135591-0.post@n5.nabble.com> <1539853187683-0.post@n5.nabble.com> Message-ID: I think VTK has wrong assumption about mesa gl version and capabilities. And we found that setting MESA_GL_VERSION_OVERRIDE is the only workaround. Why do you think this is a problem? By the way you would have the same problem before, but for QVTKWidget that was not a requirement. On Thu, Oct 18, 2018 at 2:00 AM kervel wrote: > Hello, > > For reference: > > i managed to fix this by switching to QVTKOpenGLWidget. Unfortunately this > requires PCL from master (for reference: this > http://www.pcl-users.org/QVTKOpenGLWidget-Qt-PCLVisualizer-td4045158.html > is > not yet in a released version). > > Now i have some other issues: i need to run it with > MESA_GL_VERSION_OVERRIDE=3.2 otherwise i get this: > > vtkShaderProgram (0x563e8e366510): 0:1(10): error: GLSL 1.50 is not > supported > > thanks, > Frank > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiangpengyiwu at gmail.com Fri Oct 19 12:05:17 2018 From: jiangpengyiwu at gmail.com (maskjp) Date: Fri, 19 Oct 2018 09:05:17 -0700 (MST) Subject: [vtkusers] How's the Projection Transform Matrix computed in VTK? and Generate Cloud Point From Depth Map Image In-Reply-To: <1539744554235-0.post@n5.nabble.com> References: <1539744554235-0.post@n5.nabble.com> Message-ID: <1539965117896-0.post@n5.nabble.com> I figure out the problem. When I use the vtkBMPReader, the output of this class is a 3 channel vtkImageData, but the vtkDepthImageToPointCloud only receive a 1 channel depth image. So We need to use vtkImageExtractComponents to get the first channel of the vtkBMPReader output. But I still don't understand how vtk compute projection transform matrix. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From jason.kimmel at albint.com Fri Oct 19 15:29:27 2018 From: jason.kimmel at albint.com (Kimmel, Jason) Date: Fri, 19 Oct 2018 19:29:27 +0000 Subject: [vtkusers] vtkInteractorStyleTrackballCamera problem with multiple views In-Reply-To: References: Message-ID: Hi Alex, I see your original message from Monday, so it seems it was posted successfully. Regarding your question, I?m assuming each of the interactorstyles is in a different Qt widget? If so, you could use Qt leave events to reset the state of the interactor whenever the mouse leaves the rendering area. I?m not sure offhand if there?s a single method to reset the internal state of the interactorsyle, you may have to query GetState and then end whatever the interaction is. Hope that helps, Jason Jason Kimmel Sr Software Developer ? Research & Technology Albany Engineered Composites, Inc. 112 Airport Drive Rochester, NH 03867 Phone: +1.603.330.5959 www.albint.com/aec From: vtkusers [mailto:vtkusers-bounces at public.kitware.com] On Behalf Of Oleksandr Malyushytsky Sent: Thursday, October 18, 2018 4:47 PM To: vtkusers at public.kitware.com Subject: Re: [vtkusers] vtkInteractorStyleTrackballCamera problem with multiple views CAUTION: This email originated from outside Albany International Corp. Do not click links or open attachments unless you recognize the sender and know the content is safe. For some reason I can't see my question in mail, so I am not sure was it posted, but was not replied or never ended up in the mailing list. 1. Could anybody confirm that it was posted on mailing list? 2. Can anybody give a hint how to notify interactor style (reset mode) when even propagated to other widget? Best regards, Alex On Mon, Oct 15, 2018 at 3:48 PM Oleksandr Malyushytsky > wrote: 1. Push the left mouse button. 2. Drag the mouse out of the view, do not release it 3. Click and release right mouse button (or middle button, any button which was not grabbed). Release left mouse button. 4 In this state you can move mouse back to view. View will behave like left mouse button is clicked. Problem is that only left button was grabbing a mouse. Releasing right mouse button will prevent interactorStyle from receiving OnLeftButtonUp(), so when you move mouse into the view not even it will still remain in previously set interaction state, but the appropriate mouse button will not be grabbed. This seems like a bug and I would appreciate if anybody could at least point on work around. It does not appear on my version of paraview, but I am not sure what fixed the behaviour. (I use vtk 8.1.1 with Qt 5.9) Best regards, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiangpengyiwu at gmail.com Fri Oct 19 17:43:55 2018 From: jiangpengyiwu at gmail.com (maskjp) Date: Fri, 19 Oct 2018 14:43:55 -0700 (MST) Subject: [vtkusers] vtkOBJImporter can't read the whole mesh of an obj file including several parts Message-ID: <1539985435003-0.post@n5.nabble.com> Hi,everyone! I use vtkOBJImporter to read an obj file including several parts (the file is from shapenet https://www.shapenet.org/ models.zip ). But it can only read part of it. I also try to use paraview, but get the same results. The following is the code:(its's the example code on website.). Thanks. vtkNew importer; importer->SetFileName(filenameOBJ.data()); importer->SetFileNameMTL(filenameMTL.data()); importer->SetTexturePath(texturePath.data()); vtkNew ren; vtkNew renWin; vtkNew iren; renWin->AddRenderer(ren); iren->SetRenderWindow(renWin); importer->SetRenderWindow(renWin); importer->Update(); renWin->SetSize(800,600); ren->SetBackground(0.4,0.5,0.6); ren->ResetCamera(); renWin->Render(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From omalyushytskyvtkuser at gmail.com Fri Oct 19 18:12:07 2018 From: omalyushytskyvtkuser at gmail.com (Oleksandr Malyushytsky) Date: Fri, 19 Oct 2018 15:12:07 -0700 Subject: [vtkusers] vtkInteractorStyleTrackballCamera problem with multiple views In-Reply-To: References: Message-ID: Many thanks Jason for response! I did manage to fix the problem by adding interactorStyle()->OnLeave(); interactorStyle()->OnLeftButtonUp(); interactorStyle()->OnMiddleButtonUp(); interactorStyle()->OnRightButtonUp(); interactorStyle()->OnFourthButtonUp(); interactorStyle()->OnFifthButtonUp(); to specific widget subclass But this seems a wrong place for this fix. QVTKOpenGLWidget should invoke such behavior (as I believe QVTKWidget was doing). Another problem is that I am not sure what function to call. First impression is to call OnLeave(), but it does not have any effect on the vtkInteractorStyleTrackballCam. I definitely can subclass every interactor style and override OnLeave() to do a proper job, but this seems was working with QVTKWidget somehow, so I would rather not subclass every vtkInteractorStyle to fix the behavior which supposed to work already. So I do have a workaround which requires a significant changes in application, counting the number of places QVTKOpenGLWidget and vtkInteractorStyle subclasses are used. On Fri, Oct 19, 2018 at 12:29 PM Kimmel, Jason wrote: > Hi Alex, > > > > I see your original message from Monday, so it seems it was posted > successfully. > > > > Regarding your question, I?m assuming each of the interactorstyles is in a > different Qt widget? If so, you could use Qt leave events to reset the > state of the interactor whenever the mouse leaves the rendering area. I?m > not sure offhand if there?s a single method to reset the internal state of > the interactorsyle, you may have to query GetState and then end whatever > the interaction is. > > > > Hope that helps, > > Jason > > > > > > *Jason Kimmel* > > *Sr Software Developer ? Research & Technology* > > *Albany Engineered Composites, Inc.* > > 112 Airport Drive > > Rochester, NH 03867 > > Phone: +1.603.330.5959 > > *www.albint.com/aec * > > > > > > > > > > *From:* vtkusers [mailto:vtkusers-bounces at public.kitware.com] *On Behalf > Of *Oleksandr Malyushytsky > *Sent:* Thursday, October 18, 2018 4:47 PM > *To:* vtkusers at public.kitware.com > *Subject:* Re: [vtkusers] vtkInteractorStyleTrackballCamera problem with > multiple views > > > > *CAUTION:* This email originated from outside Albany International Corp. > Do not click links or open attachments unless you recognize the sender and > know the content is safe. > > > > For some reason I can't see my question in mail, so I am not sure was it > posted, but was not replied or never ended up in the mailing list. > > > > 1. Could anybody confirm that it was posted on mailing list? > > 2. Can anybody give a hint how to notify interactor style (reset mode) > when even propagated to other widget? > > > > Best regards, > > Alex > > > > > > On Mon, Oct 15, 2018 at 3:48 PM Oleksandr Malyushytsky < > omalyushytskyvtkuser at gmail.com> wrote: > > 1. Push the left mouse button. > > 2. Drag the mouse out of the view, do not release it > > 3. Click and release right mouse button (or middle button, any button > which was not grabbed). Release left mouse button. > > 4 In this state you can move mouse back to view. View will behave like > left mouse button is clicked. > > > > Problem is that only left button was grabbing a mouse. Releasing right > mouse button will prevent interactorStyle from receiving OnLeftButtonUp(), > > > > so when you move mouse into the view not even it will still remain in > previously set interaction state, but the appropriate mouse button will not > be grabbed. > > > > This seems like a bug and I would appreciate if anybody could at least > point on work around. > > It does not appear on my version of paraview, but I am not sure what fixed > the behaviour. > > > > (I use vtk 8.1.1 with Qt 5.9) > > > > Best regards, > > Alex > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jyotid407 at gmail.com Fri Oct 19 20:41:37 2018 From: jyotid407 at gmail.com (Jyoti Dubey) Date: Sat, 20 Oct 2018 06:11:37 +0530 Subject: [vtkusers] Point picking callback not giving accurate points in pcl viewer Message-ID: Hi, I am trying to draw a cuboid in pcl viewer by clicking two diagonal points in pcl viewer.The callback function does not return the accurate points sometimes hence in certain cases either the cuboid drawn is larger than required or the cuboid is shifted and doesn't get drawn at clicked points. Could you please let me know what can be the issue and how to resolve it. Thanks and Regards, Jyoti Dubey -------------- next part -------------- An HTML attachment was scrubbed... URL: From pbergeron at spiria.com Fri Oct 19 21:24:13 2018 From: pbergeron at spiria.com (Patrick Bergeron) Date: Sat, 20 Oct 2018 01:24:13 +0000 Subject: [vtkusers] Point picking callback not giving accurate points in pcl viewer In-Reply-To: References: Message-ID: I have experienced the same issue. I used the cell picker instead to get the point. Sent from my iPhone On Oct 19, 2018, at 20:41, Jyoti Dubey > wrote: Hi, I am trying to draw a cuboid in pcl viewer by clicking two diagonal points in pcl viewer.The callback function does not return the accurate points sometimes hence in certain cases either the cuboid drawn is larger than required or the cuboid is shifted and doesn't get drawn at clicked points. Could you please let me know what can be the issue and how to resolve it. Thanks and Regards, Jyoti Dubey _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From jyotid407 at gmail.com Fri Oct 19 21:27:34 2018 From: jyotid407 at gmail.com (Jyoti Dubey) Date: Sat, 20 Oct 2018 06:57:34 +0530 Subject: [vtkusers] Point picking callback not giving accurate points in pcl viewer In-Reply-To: References: Message-ID: Ok, thanks! On Sat, Oct 20, 2018, 6:54 AM Patrick Bergeron wrote: > I have experienced the same issue. I used the cell picker instead to get > the point. > > Sent from my iPhone > > On Oct 19, 2018, at 20:41, Jyoti Dubey wrote: > > Hi, > I am trying to draw a cuboid in pcl viewer by clicking two diagonal points > in pcl viewer.The callback function does not return the accurate points > sometimes hence in certain cases either the cuboid drawn is larger than > required or the cuboid is shifted and doesn't get drawn at clicked points. > > Could you please let me know what can be the issue and how to resolve it. > > Thanks and Regards, > Jyoti Dubey > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jiangpengyiwu at gmail.com Fri Oct 19 21:55:54 2018 From: jiangpengyiwu at gmail.com (maskjp) Date: Fri, 19 Oct 2018 18:55:54 -0700 (MST) Subject: [vtkusers] vtkOBJImporter can't read the whole mesh of an obj file including several parts In-Reply-To: <1539985435003-0.post@n5.nabble.com> References: <1539985435003-0.post@n5.nabble.com> Message-ID: <1540000554653-0.post@n5.nabble.com> I import the file in blender. I find there are 2000+ components but vtkOBJImporter said only 91 actors. Is this a bug of OBJImporter? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From bill.lorensen at gmail.com Sat Oct 20 00:09:10 2018 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 19 Oct 2018 21:09:10 -0700 Subject: [vtkusers] vtkOBJImporter can't read the whole mesh of an obj file including several parts In-Reply-To: <1540000554653-0.post@n5.nabble.com> References: <1539985435003-0.post@n5.nabble.com> <1540000554653-0.post@n5.nabble.com> Message-ID: Looks like a bug. There are only 91 unique materials for all of the components. Many components share materials and it seems the importer can't handle it. I'll take a look. Bill On Fri, Oct 19, 2018 at 6:56 PM maskjp wrote: > > I import the file in blender. I find there are 2000+ components but > vtkOBJImporter said only 91 actors. Is this a bug of OBJImporter? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsParadise at noware dot com From jiangpengyiwu at gmail.com Sun Oct 21 11:53:05 2018 From: jiangpengyiwu at gmail.com (maskjp) Date: Sun, 21 Oct 2018 08:53:05 -0700 (MST) Subject: [vtkusers] vtkOBJImporter can't read the whole mesh of an obj file including several parts In-Reply-To: References: <1539985435003-0.post@n5.nabble.com> <1540000554653-0.post@n5.nabble.com> Message-ID: <1540137185568-0.post@n5.nabble.com> Thank you! maskjp -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From A.Buykx at dianafea.com Mon Oct 22 03:16:57 2018 From: A.Buykx at dianafea.com (Andreas Buykx) Date: Mon, 22 Oct 2018 07:16:57 +0000 Subject: [vtkusers] vtkAbstractMapper hierarchy uses non-virtual ShallowCopy? Message-ID: Hi, I noticed that the class hierarchy of vtkAbstractMapper has non-virtual ShallowCopy methods whereas the vtkDataObject and vtkProp hierarchies have virtual ShallowCopy. To me this came as a surprise. Is it intentional to have non-virtual ShallowCopy or can I make a contribution to make these virtual? Thanks, Andreas DIANA FEA BV Software Developers and Analysis Consultants for Civil and Geotechnical Engineering Delftechpark 19a, 2628XJ, Delft, The Netherlands Tel: +31 88 34262 15 (Direct) ? Tel: +31 88 34262 00 (Switchboard) ? Fax: +31 88 34262 99 http://dianafea.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Oct 22 10:07:25 2018 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 22 Oct 2018 10:07:25 -0400 Subject: [vtkusers] vtkAbstractMapper hierarchy uses non-virtual ShallowCopy? In-Reply-To: References: Message-ID: Please do submit a merge request Andreas, I don't see any reason for that not to be virtual. It has been that way since at least 2001, maybe for efficiency. thanks David E DeMarle Kitware, Inc. Principal Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Mon, Oct 22, 2018 at 3:26 AM Andreas Buykx wrote: > Hi, > > > > I noticed that the class hierarchy of vtkAbstractMapper has non-virtual > ShallowCopy methods whereas the vtkDataObject and vtkProp hierarchies have > virtual ShallowCopy. To me this came as a surprise. Is it intentional to > have non-virtual ShallowCopy or can I make a contribution to make these > virtual? > > > > Thanks, > > Andreas > > > > *DIANA FEA BV * > > *Software Developers and Analysis Consultants for Civil and Geotechnical > Engineering * > > > > Delftechpark 19a, 2628XJ, Delft, The Netherlands > > Tel: +31 88 34262 15 (Direct) ? Tel: +31 88 34262 00 (Switchboard) ? Fax: > +31 88 34262 99 > > http://dianafea.com > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarsh.ayachit at kitware.com Mon Oct 22 10:40:04 2018 From: utkarsh.ayachit at kitware.com (Utkarsh Ayachit) Date: Mon, 22 Oct 2018 10:40:04 -0400 Subject: [vtkusers] vtkAbstractMapper hierarchy uses non-virtual ShallowCopy? In-Reply-To: References: Message-ID: Actually, the API looks odd to me. DeepCopy/ShallowCopy make sense for data objects since the definition (and distinction) between the two is reasonable. What does ShallowCopy mean for non-data objects? Unclear. If the intent is to allow copying parameters (note, there's no API for that for general VTK objects), we may want to rename it at the very least. On Mon, Oct 22, 2018 at 10:07 AM David E DeMarle wrote: > > Please do submit a merge request Andreas, > > I don't see any reason for that not to be virtual. > It has been that way since at least 2001, maybe for efficiency. > > thanks > > David E DeMarle > Kitware, Inc. > Principal Engineer > 21 Corporate Drive > Clifton Park, NY 12065-8662 > Phone: 518-881-4909 > > > On Mon, Oct 22, 2018 at 3:26 AM Andreas Buykx wrote: >> >> Hi, >> >> >> >> I noticed that the class hierarchy of vtkAbstractMapper has non-virtual ShallowCopy methods whereas the vtkDataObject and vtkProp hierarchies have virtual ShallowCopy. To me this came as a surprise. Is it intentional to have non-virtual ShallowCopy or can I make a contribution to make these virtual? >> >> >> >> Thanks, >> >> Andreas >> >> >> >> DIANA FEA BV >> >> Software Developers and Analysis Consultants for Civil and Geotechnical Engineering >> >> >> >> Delftechpark 19a, 2628XJ, Delft, The Netherlands >> >> Tel: +31 88 34262 15 (Direct) ? Tel: +31 88 34262 00 (Switchboard) ? Fax: +31 88 34262 99 >> >> http://dianafea.com >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From patricio.sandana at synopsys.com Mon Oct 22 14:33:15 2018 From: patricio.sandana at synopsys.com (Pato Sandana) Date: Mon, 22 Oct 2018 18:33:15 +0000 Subject: [vtkusers] How's the Projection Transform Matrix computed in VTK? Message-ID: <4A2A9A281AE5D54CA205FB13069FD874017ACF1764@US01WEMBX2.internal.synopsys.com> Hi maskjp, What I found so far, is that for some reason the depth buffer is filled with 1.0s and not 0.0s as one could expect. I asked about that before and I got no answer. To get the correct projection matrix, you can use this in C++, assuming a vtkRenderer* renderer vtkCamera* camera = renderer->GetActiveCamera(); vtkSmartPointer projection = vtkSmartPointer::New(); projection->DeepCopy( camera->GetCompositeProjectionTransformMatrix( renderer->GetTiledAspectRation(), 0.0, 1.0) ); // This maps the z-buffer from 0.0 to 1.0. I found this usage in classes like vtkRenderer and vtkVolume source code. Hope that helps. Cheers, Pato From iamdpak at gmail.com Mon Oct 22 19:50:01 2018 From: iamdpak at gmail.com (vinmean) Date: Mon, 22 Oct 2018 16:50:01 -0700 (MST) Subject: [vtkusers] Erase part of a polydata, that is close to another polydata Message-ID: <1540252201965-0.post@n5.nabble.com> I have two overlapping mesh objects in my renderwindow. I have a small 3D scan sticking on top of a larger scan of the same scene as a result of ICP algorithm. Now I want to get rid of the part of the larger scan that is close the surface of smaller 3D scan. How do I go about this? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From joaosausen at gmail.com Mon Oct 22 22:19:32 2018 From: joaosausen at gmail.com (=?UTF-8?B?Sm/Do28gU2F1c2Vu?=) Date: Mon, 22 Oct 2018 23:19:32 -0300 Subject: [vtkusers] Print 2d Image on context Message-ID: Hello, I'm using vtk.js to render some nifti images, I have 3 "windows" showing the same image on different angles, coronal, sagittal and transverse, when I click on a specific point on one of the images, I set the slices on the other images based on the point I clicked, so if I click on the sagittal view on some point, it will grab the y and z slices from that point and set the slices on the respective mappers. What I need to do now is to add a "crosshair" png, setting the point I just clicked on the window, I dont want that crosshair image to have zoom applied to it (if possible) when I zoom the window. Should I use the vtkActor2D and some imageMapper? I have not idea on where to begin or even if thats possible at all. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Tue Oct 23 13:32:30 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 23 Oct 2018 19:32:30 +0200 Subject: [vtkusers] Drawing custom image with depth buffer and a translucent plane In-Reply-To: <4A2A9A281AE5D54CA205FB13069FD874017ACEF22D@US01WEMBX2.internal.synopsys.com> References: <4A2A9A281AE5D54CA205FB13069FD874017ACEF22D@US01WEMBX2.internal.synopsys.com> Message-ID: I believe this is a limitation of VTK. Translucent polygonal geometry with opacity != 1.0 can't be rendered intersected with a volume other than in a back-to-front or front-to-back manner. Someone correct me if I'm wrong (we'd also very much like to be able to do this). Elvis Den fre 12 okt. 2018 kl 22:20 skrev Pato Sandana < patricio.sandana at synopsys.com>: > Hi Everyone, > > > > I?m trying to draw a vtkVolume and a vtkPlaneWidget both intersecting and > the vtkPlaneWidget is translucent. I cannot achieve that, either the plane > is totally behind or front. > > > > For a vtkActor with the same box extent this works. > > > > I tried to get the z-buffer from the context using > vtkRenderer::GetZbufferData() method, but I only get 1s. (Is this correct?) > > I also tried to write the z-buffer data I got with > vtkRenderer::SetZbuferData() method, but the plane is still behind. > > > > Any hints how to achieve this? Thanks in advance. > > > > Regards, > > > > *Pato Sanda?a* > > TCAD Senior R&D Engineer > > Synopsys Inc. ? Santiago, Chile > > [image: > https://spp/pic/corporate/Lists/Signatures%20Database/Attachments/164/CS12924_AutomotiveEmailSignature_2.jpg] > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 11353 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 11353 bytes Desc: not available URL: From ken.martin at kitware.com Tue Oct 23 13:40:49 2018 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 23 Oct 2018 13:40:49 -0400 Subject: [vtkusers] Drawing custom image with depth buffer and a translucent plane In-Reply-To: References: <4A2A9A281AE5D54CA205FB13069FD874017ACEF22D@US01WEMBX2.internal.synopsys.com> Message-ID: Maybe from vtkRenderer.h /** * This flag is on and the GPU supports it, depth-peel volumes along with * the translucent geometry. Only supported on OpenGL2 with dual-depth * peeling. Default is false. */ vtkSetMacro(UseDepthPeelingForVolumes, bool) vtkGetMacro(UseDepthPeelingForVolumes, bool) vtkBooleanMacro(UseDepthPeelingForVolumes, bool) On Tue, Oct 23, 2018 at 1:32 PM, Elvis Stansvik < elvis.stansvik at orexplore.com> wrote: > I believe this is a limitation of VTK. Translucent polygonal geometry with > opacity != 1.0 can't be rendered intersected with a volume other than in a > back-to-front or front-to-back manner. > > Someone correct me if I'm wrong (we'd also very much like to be able to do > this). > > Elvis > > Den fre 12 okt. 2018 kl 22:20 skrev Pato Sandana < > patricio.sandana at synopsys.com>: > >> Hi Everyone, >> >> >> >> I?m trying to draw a vtkVolume and a vtkPlaneWidget both intersecting and >> the vtkPlaneWidget is translucent. I cannot achieve that, either the plane >> is totally behind or front. >> >> >> >> For a vtkActor with the same box extent this works. >> >> >> >> I tried to get the z-buffer from the context using >> vtkRenderer::GetZbufferData() method, but I only get 1s. (Is this correct?) >> >> I also tried to write the z-buffer data I got with >> vtkRenderer::SetZbuferData() method, but the plane is still behind. >> >> >> >> Any hints how to achieve this? Thanks in advance. >> >> >> >> Regards, >> >> >> >> *Pato Sanda?a* >> >> TCAD Senior R&D Engineer >> >> Synopsys Inc. ? Santiago, Chile >> >> [image: >> https://spp/pic/corporate/Lists/Signatures%20Database/Attachments/164/CS12924_AutomotiveEmailSignature_2.jpg] >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/ >> opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 patricio.sandana at synopsys.com Tue Oct 23 14:04:57 2018 From: patricio.sandana at synopsys.com (Pato Sandana) Date: Tue, 23 Oct 2018 18:04:57 +0000 Subject: [vtkusers] Drawing custom image with depth buffer and a translucent plane In-Reply-To: References: <4A2A9A281AE5D54CA205FB13069FD874017ACEF22D@US01WEMBX2.internal.synopsys.com> Message-ID: <4A2A9A281AE5D54CA205FB13069FD874017ACF1ABD@US01WEMBX2.internal.synopsys.com> Hi Elvis and Ken, Thanks for the help. What it seems to start to work for me, is to use layered renderers: using two renderers, and using the first for my volume and the second for the plane. Currently I?m dealing with the depth buffer definition as I couldn?t find its definition yet in VTK code, but so far, I could draw some extent of the translucent plane in front and the other back. I think that by fixing the depth buffer definition in my code, I would be able to mimic this behavior. I will poke you again if I succeed. Cheers, Pato From: Ken Martin Sent: Tuesday, October 23, 2018 2:41 PM To: Elvis Stansvik Cc: patricio.sandana at synopsys.com; vtkusers at public.kitware.com Subject: Re: [vtkusers] Drawing custom image with depth buffer and a translucent plane Maybe from vtkRenderer.h /** * This flag is on and the GPU supports it, depth-peel volumes along with * the translucent geometry. Only supported on OpenGL2 with dual-depth * peeling. Default is false. */ vtkSetMacro(UseDepthPeelingForVolumes, bool) vtkGetMacro(UseDepthPeelingForVolumes, bool) vtkBooleanMacro(UseDepthPeelingForVolumes, bool) On Tue, Oct 23, 2018 at 1:32 PM, Elvis Stansvik > wrote: I believe this is a limitation of VTK. Translucent polygonal geometry with opacity != 1.0 can't be rendered intersected with a volume other than in a back-to-front or front-to-back manner. Someone correct me if I'm wrong (we'd also very much like to be able to do this). Elvis Den fre 12 okt. 2018 kl 22:20 skrev Pato Sandana >: Hi Everyone, I?m trying to draw a vtkVolume and a vtkPlaneWidget both intersecting and the vtkPlaneWidget is translucent. I cannot achieve that, either the plane is totally behind or front. For a vtkActor with the same box extent this works. I tried to get the z-buffer from the context using vtkRenderer::GetZbufferData() method, but I only get 1s. (Is this correct?) I also tried to write the z-buffer data I got with vtkRenderer::SetZbuferData() method, but the plane is still behind. Any hints how to achieve this? Thanks in advance. Regards, Pato Sanda?a TCAD Senior R&D Engineer Synopsys Inc. ? Santiago, Chile _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 sankhesh.jhaveri at kitware.com Tue Oct 23 14:14:58 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Tue, 23 Oct 2018 14:14:58 -0400 Subject: [vtkusers] Drawing custom image with depth buffer and a translucent plane In-Reply-To: <4A2A9A281AE5D54CA205FB13069FD874017ACF1ABD@US01WEMBX2.internal.synopsys.com> References: <4A2A9A281AE5D54CA205FB13069FD874017ACEF22D@US01WEMBX2.internal.synopsys.com> <4A2A9A281AE5D54CA205FB13069FD874017ACF1ABD@US01WEMBX2.internal.synopsys.com> Message-ID: Hi Pato, You need to use vtkRenderer::SetUseDepthPeeling(true) along with vtkRenderer::SetUseDepthPeelingForVolumes(true). We have a test for this sort of thing - TestGPURayCastDepthPeelingTransVol that renders two translucent spheres (polydata) and a volume (vase). See the image below: [image: TestGPURayCastDepthPeelingTransVol] ? On Tue, Oct 23, 2018 at 2:05 PM Pato Sandana wrote: > Hi Elvis and Ken, > > > > Thanks for the help. What it seems to start to work for me, is to use > layered renderers: using two renderers, and using the first for my volume > and the second for the plane. Currently I?m dealing with the depth buffer > definition as I couldn?t find its definition yet in VTK code, but so far, I > could draw some extent of the translucent plane in front and the other back. > > > > I think that by fixing the depth buffer definition in my code, I would be > able to mimic this behavior. I will poke you again if I succeed. > > > > Cheers, > > Pato > > > > *From:* Ken Martin > *Sent:* Tuesday, October 23, 2018 2:41 PM > *To:* Elvis Stansvik > *Cc:* patricio.sandana at synopsys.com; vtkusers at public.kitware.com > *Subject:* Re: [vtkusers] Drawing custom image with depth buffer and a > translucent plane > > > > Maybe from vtkRenderer.h > > > > /** > * This flag is on and the GPU supports it, depth-peel volumes along with > * the translucent geometry. Only supported on OpenGL2 with dual-depth > * peeling. Default is false. > */ > vtkSetMacro(UseDepthPeelingForVolumes, bool) > vtkGetMacro(UseDepthPeelingForVolumes, bool) > vtkBooleanMacro(UseDepthPeelingForVolumes, bool) > > > > > > > > On Tue, Oct 23, 2018 at 1:32 PM, Elvis Stansvik < > elvis.stansvik at orexplore.com> wrote: > > I believe this is a limitation of VTK. Translucent polygonal geometry with > opacity != 1.0 can't be rendered intersected with a volume other than in a > back-to-front or front-to-back manner. > > > > Someone correct me if I'm wrong (we'd also very much like to be able to do > this). > > > > Elvis > > > > Den fre 12 okt. 2018 kl 22:20 skrev Pato Sandana < > patricio.sandana at synopsys.com>: > > Hi Everyone, > > > > I?m trying to draw a vtkVolume and a vtkPlaneWidget both intersecting and > the vtkPlaneWidget is translucent. I cannot achieve that, either the plane > is totally behind or front. > > > > For a vtkActor with the same box extent this works. > > > > I tried to get the z-buffer from the context using > vtkRenderer::GetZbufferData() method, but I only get 1s. (Is this correct?) > > I also tried to write the z-buffer data I got with > vtkRenderer::SetZbuferData() method, but the plane is still behind. > > > > Any hints how to achieve this? Thanks in advance. > > > > Regards, > > > > *Pato Sanda?a* > > TCAD Senior R&D Engineer > > Synopsys Inc. ? Santiago, Chile > > > > > > _______________________________________________ > > > Powered by www.kitware.com > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > > > _______________________________________________ > Powered by www.kitware.com > > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > > > > > -- > > Ken Martin PhD > > Distinguished Engineer > Kitware Inc. > > 101 East Weaver Street > Carrboro, North Carolina > 27510 USA > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://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 elvis.stansvik at orexplore.com Tue Oct 23 14:37:57 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Tue, 23 Oct 2018 20:37:57 +0200 Subject: [vtkusers] Drawing custom image with depth buffer and a translucent plane In-Reply-To: References: <4A2A9A281AE5D54CA205FB13069FD874017ACEF22D@US01WEMBX2.internal.synopsys.com> Message-ID: Den tis 23 okt. 2018 kl 19:32 skrev Elvis Stansvik < elvis.stansvik at orexplore.com>: > I believe this is a limitation of VTK. Translucent polygonal geometry with > opacity != 1.0 can't be rendered intersected with a volume other than in a > back-to-front or front-to-back manner. > > Someone correct me if I'm wrong (we'd also very much like to be able to do > this). > Sorry for the misinformation! Depth peeling indeed should make it possible. Elvis > Elvis > > Den fre 12 okt. 2018 kl 22:20 skrev Pato Sandana < > patricio.sandana at synopsys.com>: > >> Hi Everyone, >> >> >> >> I?m trying to draw a vtkVolume and a vtkPlaneWidget both intersecting and >> the vtkPlaneWidget is translucent. I cannot achieve that, either the plane >> is totally behind or front. >> >> >> >> For a vtkActor with the same box extent this works. >> >> >> >> I tried to get the z-buffer from the context using >> vtkRenderer::GetZbufferData() method, but I only get 1s. (Is this correct?) >> >> I also tried to write the z-buffer data I got with >> vtkRenderer::SetZbuferData() method, but the plane is still behind. >> >> >> >> Any hints how to achieve this? Thanks in advance. >> >> >> >> Regards, >> >> >> >> *Pato Sanda?a* >> >> TCAD Senior R&D Engineer >> >> Synopsys Inc. ? Santiago, Chile >> >> [image: >> https://spp/pic/corporate/Lists/Signatures%20Database/Attachments/164/CS12924_AutomotiveEmailSignature_2.jpg] >> >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jalaly.mohammad at gmail.com Wed Oct 24 01:02:52 2018 From: jalaly.mohammad at gmail.com (Mohammad Jalali) Date: Wed, 24 Oct 2018 08:32:52 +0330 Subject: [vtkusers] Problem compiling a project uses VTK Message-ID: I'm trying to build and use a project for my thesis ( https://miccai.creatis.insa-lyon.fr/miccai/core/EvaluationMetrics.zip) which needs VTK libraries such as 'vtkProcessObject.h' to be accessible. Unfortunately, these libraries seem to be removeed from VTK. I'm wondering how I can compile a full version of VTK? Regards, Mohammad -------------- next part -------------- An HTML attachment was scrubbed... URL: From ftpronk at engits.com Wed Oct 24 05:17:03 2018 From: ftpronk at engits.com (Fcs) Date: Wed, 24 Oct 2018 02:17:03 -0700 (MST) Subject: [vtkusers] Problem compiling a project uses VTK In-Reply-To: References: Message-ID: <1540372623706-0.post@n5.nabble.com> It looks like your file is available in vtk 5. Vtk 5 is available for installation on Ubuntu 16.04, so if that's the system you happen to be developing on, you're good to go. In the worst case, you can download vtk (tag 5.10.1) from the development repository, and compile it yourself: https://gitlab.kitware.com/vtk/vtk/tree/v5.10.1 Good luck. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Jacopo.monti.jm at gmail.com Wed Oct 24 06:04:24 2018 From: Jacopo.monti.jm at gmail.com (UbrJaco) Date: Wed, 24 Oct 2018 03:04:24 -0700 (MST) Subject: [vtkusers] vtkDICOMImageReader Message-ID: <1540375464363-0.post@n5.nabble.com> Hi, I'm using ActiViz.NET by Kitware to create a Console App with Visual Studio. I am trying to read some DICOM images and render them. I have been able to do so, but I would like to improve my code. I have many DICOM series of a single subject taken at different time. I aim to load all the DICOM togheter, when my app starts, so that then I am able to switch between them without waiting the DICOMImageReader loading process. I need some sort of DICOMImageReader array, in which different series are loaded in different array slots. In this way I would be able to select the DICOM series to render simply thanks to an index selection. Unfortunately, DICOMImageReader does not support time frames. Is there a class that I could use to store multiple DICOMImageReader output? Thanks for your help. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From isalako1 at sheffield.ac.uk Wed Oct 24 06:57:58 2018 From: isalako1 at sheffield.ac.uk (Idayat Salako) Date: Wed, 24 Oct 2018 11:57:58 +0100 Subject: [vtkusers] missing vtk library for vtk5 compilation Message-ID: Cmake: v3.12.2-win64-x64 OS: Windows Visual studio: Community 2017 I am building a program that requires an older version of vtk due to compatibility issues. I have currently downloaded VTK v5.0.0 from ( https://gitlab.kitware.com/vtk/vtk/tree/v5.0.0) but I get missing library error (cannot open input file......vtkRendering.lib) when i compile in visual studio; this is after i have configured/generated in cmake. Any idea how I might get this library or how to avoid this error to compile vtk 5.0? [image: image.png] Thanks in advance for your help. Thank you Idayat Salako ***Whoever wakes up in the morning and is safe in his home, in good health and has enough provision for the day, it is as if he has all the good things of this world [HadithTirmidhi 2346]*** -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 216896 bytes Desc: not available URL: From ophagen at dornheim-medical-images.de Wed Oct 24 12:51:37 2018 From: ophagen at dornheim-medical-images.de (Angelika Ophagen) Date: Wed, 24 Oct 2018 18:51:37 +0200 Subject: [vtkusers] vtkMultiVolume, vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ClearRemovedInputs() throws SegFault during/after Render In-Reply-To: <2398843.lChJ16j1jy@hekate> References: <2398843.lChJ16j1jy@hekate> Message-ID: <53142923.OYaoM5gMdl@hekate> Update: I have locally used the quick fix mentioned: > A quick fix is to change the code like so: > if( input.GradientOpacityTables ) input.GradientOpacityTables- >ReleaseGraphicsResources(win); and now I am going on to other things in my programming with vtkMultiVolume. -- Dipl.-?bers. A. Ophagen Dornheim Medical Images GmbH Listemannstra?e 10, 39104 Magdeburg, Deutschland WWW: http://www.dornheim-medical-images.de/ E-Mail: info at dornheim-medical-images.de Tel: +49 (391) 5054 57 0 Gesch?ftsf?hrer: Lars Dornheim, Jana Dornheim Eingetragen beim Amtsgericht Stendal, HRB 10737 From sankhesh.jhaveri at kitware.com Wed Oct 24 12:56:27 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Wed, 24 Oct 2018 12:56:27 -0400 Subject: [vtkusers] vtkMultiVolume, vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::ClearRemovedInputs() throws SegFault during/after Render In-Reply-To: <53142923.OYaoM5gMdl@hekate> References: <2398843.lChJ16j1jy@hekate> <53142923.OYaoM5gMdl@hekate> Message-ID: Hi A, Seems like you have a bug fix. Mind contributing it to VTK? Take a look at https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md#workflow for instructions. Best, Sankhesh ? On Wed, Oct 24, 2018 at 12:51 PM Angelika Ophagen < ophagen at dornheim-medical-images.de> wrote: > Update: I have locally used the quick fix mentioned: > > > A quick fix is to change the code like so: > > if( input.GradientOpacityTables ) input.GradientOpacityTables- > >ReleaseGraphicsResources(win); > > and now I am going on to other things in my programming with > vtkMultiVolume. > > -- > Dipl.-?bers. A. Ophagen > Dornheim Medical Images GmbH > Listemannstra?e 10, 39104 Magdeburg, Deutschland > WWW: http://www.dornheim-medical-images.de/ > E-Mail: info at dornheim-medical-images.de > Tel: +49 (391) 5054 57 0 > Gesch?ftsf?hrer: Lars Dornheim, Jana Dornheim > Eingetragen beim Amtsgericht Stendal, HRB 10737 > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://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 berti_krueger at hotmail.com Wed Oct 24 18:19:08 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Wed, 24 Oct 2018 22:19:08 +0000 Subject: [vtkusers] Difference between vtkSmartPointer assignment operator and ShallowCopy Message-ID: Hello. I (hopefully) already understand the difference between the ShallowCopy and the DeepCopy method (e.g. copying only the pointer vs. copying the pointer and the content pointed to). But what i don't understand yet is, what is the difference between using the overloaded assignment operator of vtkSmartPointer and the ShallowCopy method, e.g. what is the difference between vtkSmartPointer myStrangePolydata = vtkSmartPointer::New(); myStrangePolydata = vtkTransmogrifyFilter->GetOutput(); and myStangePolydata->ShallowCopy(vtkTransmogrifyFilter->GetOutput(); Does it make a difference to the reference count of the vtkSmartPointer? Thank you very much in advance. Cheers, Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: From omalyushytskyvtkuser at gmail.com Wed Oct 24 20:15:29 2018 From: omalyushytskyvtkuser at gmail.com (Oleksandr Malyushytsky) Date: Wed, 24 Oct 2018 17:15:29 -0700 Subject: [vtkusers] Difference between vtkSmartPointer assignment operator and ShallowCopy In-Reply-To: References: Message-ID: vtkSmartPointer has nothing to do with neither deep or shallow copy. if you assign vtk object to smartpointer the reference count of vtk object is incremented, there is only one vtkObject in the memory. Once smartpointer is released (going out of scope for example) vtk object reference count it was pointing is decremented. In another words vtkSmartPointer is like a normal pointer, which adds does reference couning. Operations with smartpointer DO NOT copy any data related to the object they point to. While deep and shalow copy are always performed with 2 different objects. On Wed, Oct 24, 2018 at 3:19 PM Berti Kr?ger wrote: > Hello. > > I (hopefully) already understand the difference between the ShallowCopy > and the DeepCopy method (e.g. copying only the pointer vs. copying the > pointer and the content pointed to). > > But what i don't understand yet is, what is the difference between using > the overloaded assignment operator of vtkSmartPointer and the ShallowCopy > method, e.g. what is the difference between > > > vtkSmartPointer myStrangePolydata = > vtkSmartPointer::New(); > > > myStrangePolydata = vtkTransmogrifyFilter->GetOutput(); > > > and > > > myStangePolydata->ShallowCopy(vtkTransmogrifyFilter->GetOutput(); > > > > Does it make a difference to the reference count of the vtkSmartPointer? > > > Thank you very much in advance. > > > Cheers, > Berti > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berti_krueger at hotmail.com Wed Oct 24 20:46:54 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Thu, 25 Oct 2018 00:46:54 +0000 Subject: [vtkusers] Difference between vtkSmartPointer assignment operator and ShallowCopy In-Reply-To: References: Message-ID: Thanks Oleksandr for the great answer. OK, i see, so when i use ShallowCopy, i copy the underlying structure of the vtk object e.g. attributes like the pointers the vtk object consists of without copying the content which the pointers point to. So for example by using a ShallowCopy on a vtkPolydata object i copy all the underlying pointers to things like vtkPointSet, vtkDataSet, Cells, Lines, Vertices, Points etc. which a vtkPolydata object is composed of but unlike using a DeepCopy not the actual content (vertices and stuff arrays) which these pointers point to. By using the vtkSmartPointer i get a reference counted pointer to the vtkObject without transfering the ownership of this object. It only increments the lease count by one and if the lease count becomes zero the destructor of the object is called. Just one question: Does every vtk filter copies the data it is given to? e.g. When using vtkNew transformFilter; transformFilter->SetInputData(polyData); transformFilter->SetTransform(transformation); transformFilter->Update(); does the polyData exists twice in memory (the original polyData and the filter keeps its own transformed copy of the polyData)? Thanks and regards, Berti Am Do, 25. Okt, 2018 um 2:15 VORMITTAGS schrieb Oleksandr Malyushytsky : vtkSmartPointer has nothing to do with neither deep or shallow copy. if you assign vtk object to smartpointer the reference count of vtk object is incremented, there is only one vtkObject in the memory. Once smartpointer is released (going out of scope for example) vtk object reference count it was pointing is decremented. In another words vtkSmartPointer is like a normal pointer, which adds does reference couning. Operations with smartpointer DO NOT copy any data related to the object they point to. While deep and shalow copy are always performed with 2 different objects. On Wed, Oct 24, 2018 at 3:19 PM Berti Kr?ger > wrote: Hello. I (hopefully) already understand the difference between the ShallowCopy and the DeepCopy method (e.g. copying only the pointer vs. copying the pointer and the content pointed to). But what i don't understand yet is, what is the difference between using the overloaded assignment operator of vtkSmartPointer and the ShallowCopy method, e.g. what is the difference between vtkSmartPointer myStrangePolydata = vtkSmartPointer::New(); myStrangePolydata = vtkTransmogrifyFilter->GetOutput(); and myStangePolydata->ShallowCopy(vtkTransmogrifyFilter->GetOutput(); Does it make a difference to the reference count of the vtkSmartPointer? Thank you very much in advance. Cheers, Berti _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From omalyushytskyvtkuser at gmail.com Wed Oct 24 21:37:40 2018 From: omalyushytskyvtkuser at gmail.com (Oleksandr Malyushytsky) Date: Wed, 24 Oct 2018 18:37:40 -0700 Subject: [vtkusers] Difference between vtkSmartPointer assignment operator and ShallowCopy In-Reply-To: References: Message-ID: Typical filter does not change the input. vtkNew polyData; // assume polydata reference count =1 { vtkNew transformFilter; transformFilter->SetInputData(polyData); // polyData reference count is incremented = 2 transformFilter->SetTransform(transformation); transformFilter->Update(); // filter produced new polydata with count 1 // at this point there are 2 polydata in the memory } // smartpointer deleted transformFilter // output polydata is deleted since its reference count dropped to 0 // polyData reference count is incremented = 1 On Wed, Oct 24, 2018 at 5:46 PM Berti Kr?ger wrote: > Thanks Oleksandr for the great answer. > > OK, i see, so when i use ShallowCopy, i copy the underlying structure of > the vtk object e.g. attributes like the pointers the vtk object consists of > without copying the content which the pointers point to. > > So for example by using a ShallowCopy on a vtkPolydata object i copy all > the underlying pointers to things like vtkPointSet, vtkDataSet, Cells, > Lines, Vertices, Points etc. which a vtkPolydata object is composed of but > unlike using a DeepCopy not the actual content (vertices and stuff arrays) > which these pointers point to. > > By using the vtkSmartPointer i get a reference counted pointer to the > vtkObject without transfering the ownership of this object. It only > increments the lease count by one and if the lease count becomes zero the > destructor of the object is called. > > > > Just one question: > > Does every vtk filter copies the data it is given to? > > e.g. > > When using > > vtkNew transformFilter; > > transformFilter->SetInputData(polyData); > > transformFilter->SetTransform(transformation); > > transformFilter->Update(); > > > > does the polyData exists twice in memory (the original polyData and the filter keeps its own transformed copy of the polyData)? > > > > Thanks and regards, > > > Berti > > > > Am Do, 25. Okt, 2018 um 2:15 VORMITTAGS schrieb Oleksandr Malyushytsky < > omalyushytskyvtkuser at gmail.com>: > > vtkSmartPointer has nothing to do with neither deep or shallow copy. > > if you assign vtk object to smartpointer the reference count of vtk object > is incremented, > there is only one vtkObject in the memory. Once smartpointer is released > (going out of scope for example) vtk object reference count it was > pointing is decremented. > In another words vtkSmartPointer is like a normal pointer, which adds > does reference couning. > > Operations with smartpointer DO NOT copy any data related to the object > they point to. > > > While deep and shalow copy are always performed with 2 different objects. > > > > > > On Wed, Oct 24, 2018 at 3:19 PM Berti Kr?ger > wrote: > >> Hello. >> >> I (hopefully) already understand the difference between the ShallowCopy >> and the DeepCopy method (e.g. copying only the pointer vs. copying the >> pointer and the content pointed to). >> >> But what i don't understand yet is, what is the difference between using >> the overloaded assignment operator of vtkSmartPointer and the ShallowCopy >> method, e.g. what is the difference between >> >> >> vtkSmartPointer myStrangePolydata = >> vtkSmartPointer::New(); >> >> >> myStrangePolydata = vtkTransmogrifyFilter->GetOutput(); >> >> >> and >> >> >> myStangePolydata->ShallowCopy(vtkTransmogrifyFilter->GetOutput(); >> >> >> >> Does it make a difference to the reference count of the vtkSmartPointer? >> >> >> Thank you very much in advance. >> >> >> Cheers, >> Berti >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berti_krueger at hotmail.com Wed Oct 24 22:46:43 2018 From: berti_krueger at hotmail.com (=?iso-8859-1?Q?Berti_Kr=FCger?=) Date: Thu, 25 Oct 2018 02:46:43 +0000 Subject: [vtkusers] Difference between vtkSmartPointer assignment operator and ShallowCopy In-Reply-To: References: Message-ID: Am Do, 25. Okt, 2018 um 3:37 VORMITTAGS schrieb Oleksandr Malyushytsky : } Thanks Oleksandr for the clarification and the good example! Cheers, Berti -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Thu Oct 25 03:45:16 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 25 Oct 2018 09:45:16 +0200 Subject: [vtkusers] Difference between vtkSmartPointer assignment operator and ShallowCopy In-Reply-To: References: Message-ID: Den tors 25 okt. 2018 kl 04:46 skrev Berti Kr?ger : > > Am Do, 25. Okt, 2018 um 3:37 VORMITTAGS schrieb Oleksandr Malyushytsky : > > } > > > Thanks Oleksandr for the clarification and the good example! Funny that this would come up. I recently tracked down an unusually high memory usage in our application. It turned out it was simple matter of us not "terminating" a pipeline at the right place in a function that creates an image data (valgrind's massif tool led me to it). E.g. we had something like vtkSmartPointer createVolume(....) { auto reader = vtkSmartPointer::New(); ... auto extract = vtkSmartPointer::New(); extract->SetInputConnection(reader->GetOutputPort()); ... auto threshold = vtkSmartPointer::New(); threshold->SetInputConnection(extract->GetOutputPort()); ... auto mapper = vtkSmartPointer::New(); mapper->SetInputConnection(threshold->GetOutputPort()); ... auto volume = vtkSmartPointer::New(); volume->SetMapper(mapper); volume->Update(); ... return volume; } In this case, we had no need for keeping around the reader/extract/threshold part of the pipeline, but since there there were back-references back through the pipeline, these elements were kept around and the copies of the data that they had were taking up pretty big chunks of memory (or well, at least the threshold filter did if I remember correctly). The solution was simply to change auto threshold = vtkSmartPointer::New(); threshold->SetInputConnection(extract->GetOutputPort()); ... auto mapper = vtkSmartPointer::New(); mapper->SetInputConnection(threshold->GetOutputPort()); ... to auto threshold = vtkSmartPointer::New(); threshold->SetInputConnection(extract->GetOutputPort()); threshold->Update(); ... auto mapper = vtkSmartPointer::New(); mapper->SetInputData(threshold->GetOutput()); ... in order to "cut off" the pipeline and let those parts of the pipeline destruct when the function returns. Just thought I should mention this as a potential gotcha, where you're looking for issues where the memory usage is unusually high. Elvis > > > Cheers, > > Berti > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From ftpronk at engits.com Thu Oct 25 04:39:40 2018 From: ftpronk at engits.com (Fcs) Date: Thu, 25 Oct 2018 01:39:40 -0700 (MST) Subject: [vtkusers] vtkDICOMImageReader In-Reply-To: <1540375464363-0.post@n5.nabble.com> References: <1540375464363-0.post@n5.nabble.com> Message-ID: <1540456780618-0.post@n5.nabble.com> vtkDICOMImageReader reader_1 = vtkDICOMImageReader.New() ... vtkDICOMImageReader reader_2 = vtkDICOMImageReader.New() ... List my_list = new List() my_list.Add(reader_1) my_list.Add(reader_2) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dooolabayooomy at gmail.com Thu Oct 25 04:32:33 2018 From: dooolabayooomy at gmail.com (Mohammed Adel) Date: Thu, 25 Oct 2018 10:32:33 +0200 Subject: [vtkusers] Reading Multiframe DICOM Message-ID: Hi all I have installed VTK6.3 and i want to read a multi-frame DICOM image, unfortunately the vtkDICOMImageReader can't open my files. I also have tried to decompress the file using gdcm but it didn't work, also tried to split the file into a series of images but i can't know which tags are necessary to the reader in order to read the series, any help would be appreciated. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From gavin.wheeler at kcl.ac.uk Thu Oct 25 07:05:03 2018 From: gavin.wheeler at kcl.ac.uk (Wheeler, Gavin) Date: Thu, 25 Oct 2018 11:05:03 +0000 Subject: [vtkusers] Correct use of vtkClipVolume in volume rendering? In-Reply-To: <1539072589362-0.post@n5.nabble.com> References: <1539072589362-0.post@n5.nabble.com> Message-ID: Hi Severin, We are using cropping planes successfully - so they can be made to work. We set up our clipping plane in the same way, and similarly set the origin (and normal). So as the code looks OK, perhaps it is a problem with some of the values? For investigating cropping planes we found modifying the "GPURenderDemo" example a helpful way of getting things working. We would make it work interactively there and then check/hard code the values in our application to achieve the same result and then work from there. There is definitely a learning curve to VTK, so I hope you get it working soon. Gavin -----Original Message----- From: vtkusers On Behalf Of SevPuch Sent: 09 October 2018 09:10 To: vtkusers at vtk.org Subject: [vtkusers] Correct use of vtkClipVolume in volume rendering? Hi everyone, It is indeed a basic question but I've striven to find any example or explanation in the mailing list or forum or stack overflow concerning this. I have a .mhd file that I render in volume following the medical volume rendering example. I'd like to implement volume exploration for this, so I think about using a plane (then spheres etc.) to clip the volume. But my following code has no effect, and I guess I need to use vtkClipVolume, but there zero information about how to use it in the documentation. Code : //Plane clipping vtkSmartPointer cuttingPlane = vtkSmartPointer::New(); cuttingPlane->SetOrigin(0, 0, 0); volumeMapper->AddClippingPlane(cuttingPlane); Thank you very much for your help, I find learning VTK is drastically slowed down because of missing information. Severin -- Sent from: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7C2497f878dd304046ddf108d62dbe9a70%7C8370cf1416f34c16b83c724071654356%7C0&sdata=XhMaaYNcbNcW4MvUDSDjyojPBqaUUjfoeWEryKI6VJI%3D&reserved=0 _______________________________________________ Powered by https://emea01.safelinks.protection.outlook.com/?url=www.kitware.com&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7C2497f878dd304046ddf108d62dbe9a70%7C8370cf1416f34c16b83c724071654356%7C0&sdata=kjnypF7J88VtaakhAikYrtW%2FA9bt0hy1BUqqYejWMfo%3D&reserved=0 Visit other Kitware open-source projects at https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7C2497f878dd304046ddf108d62dbe9a70%7C8370cf1416f34c16b83c724071654356%7C0&sdata=x87wV%2Bej9%2FN9CLfsRmnGeWnjxjD95e95gOARzp%2FareM%3D&reserved=0 Please keep messages on-topic and check the VTK FAQ at: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7C2497f878dd304046ddf108d62dbe9a70%7C8370cf1416f34c16b83c724071654356%7C0&sdata=SiEh7reA2jF%2BtPdry9wr2MHfP%2Ff4fgZKanJnd4C9rXE%3D&reserved=0 Search the list archives at: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7C2497f878dd304046ddf108d62dbe9a70%7C8370cf1416f34c16b83c724071654356%7C0&sdata=YKAFOZhM7IIefqnJn%2FxLw855S%2B3j9nEdvh2RKKX2ZoU%3D&reserved=0 Follow this link to subscribe/unsubscribe: https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7C2497f878dd304046ddf108d62dbe9a70%7C8370cf1416f34c16b83c724071654356%7C0&sdata=oLMS0FDSFjUXhLAaAaVQO2S5LXhUK1GlkiMGLB%2B8bqo%3D&reserved=0 From Jacopo.monti.jm at gmail.com Thu Oct 25 07:08:10 2018 From: Jacopo.monti.jm at gmail.com (UbrJaco) Date: Thu, 25 Oct 2018 04:08:10 -0700 (MST) Subject: [vtkusers] vtkDICOMImageReader In-Reply-To: <1540456780618-0.post@n5.nabble.com> References: <1540375464363-0.post@n5.nabble.com> <1540456780618-0.post@n5.nabble.com> Message-ID: <1540465690725-0.post@n5.nabble.com> That's a solution. Unfortunately I don't know how many DICOM series the app will need to read, since I could have a different time frame number for different subjects. I would like to avoid to instatiate object that I won't use (vtkDICOMImageReader number > time frame) or have a limit on the time frame number that I can read. Anyway thanks for your advice. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From dooolabayooomy at gmail.com Thu Oct 25 05:48:04 2018 From: dooolabayooomy at gmail.com (Mohammed Adel) Date: Thu, 25 Oct 2018 11:48:04 +0200 Subject: [vtkusers] Constructing volume from 3d array Message-ID: I am new to vtk, and i am using vtk with Activiz.net and i have a 3 dimensional array in C# and i want to construct a scalar volume that i can apply volume rendering algorithms on it such as ray casting? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From pbergeron at spiria.com Thu Oct 25 11:02:01 2018 From: pbergeron at spiria.com (Patrick Bergeron) Date: Thu, 25 Oct 2018 15:02:01 +0000 Subject: [vtkusers] Multi-texturing?? Message-ID: Hi. I am trying to use a second texture in a fragment shader. vtkActor::SetTexture(vtkTexture*) seems to only take a single texture image and no way to add more. vtkActor::GetProperty()->SetTexture(textureUnit, vtkTexture*) is deprecated and shows an error in an output window, and doesn't seem to pass any other texture variable to the shader. I've looked and looked, and I'm probably blind, but how do I do this seemingly simple task? Thanks. Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: From evgenimalikova at gmail.com Thu Oct 25 12:58:02 2018 From: evgenimalikova at gmail.com (Evgeniya Malikova) Date: Thu, 25 Oct 2018 17:58:02 +0100 Subject: [vtkusers] CMake custom class python wrapping doesn't work In-Reply-To: References: Message-ID: <8ED19290-04DF-473B-BFF0-CEE287F67579@gmail.com> Thank you very much, Jean-Christophe. Finally managed to write hierarchy files wrapping on base of macro "vtkMacroKitPythonWrap", it solved the issue. Best regards, Evgenia > On 15 Oct 2018, at 06:11, Jean-Christophe Fillion-Robin wrote: > > Hi Evgeniya, > > Based on my understanding, wrapping of custom classes without (1) creating an external VTK module or (2) using the VTK build system (like Paraview does) is not supported. > > If possible, I suggest you re-organize your code to create a VTK external module. That you will be able to use the VTK CMake API by including the vtkExternalmoduleMacros. > For example, see https://github.com/Kitware/VTK/blob/master/Rendering/OpenVR/CMakeLists.txt (while this module can be built both as a built-in module and an external module, it illustrates the idea) > > > > If not possible, you need to make sure the python hierarchy files are generated. > Here is a module we maintain in Slicer that enable this. It provides a macro named "vtkMacroKitPythonWrap" > See https://github.com/Slicer/Slicer/blob/master/CMake/vtkMacroKitPythonWrap.cmake > > Here is an example of usage: > > include(vtkMacroKitPythonWrap) > > vtkMacroKitPythonWrap( > KIT_NAME vtkFoo > KIT_SRCS ${vtkFoo_SRCS} > ) > > > Hth > Jc > > On Mon, Oct 15, 2018 at 12:48 AM Evgeniya Malikova > wrote: > Hello. > I have a common wrapping that previously worked on windows 8.1 with > VTK 8.1.1. As I had problems to compile vtk8 on Mac (don't remember > all details of that) I switched to > https://gitlab.kitware.com/vtk/vtk.git . > > With following settings compilation on Mac of custom class gives a > strange error, referencing some hierarchy file: > > [ 85%] Built target vtkHF > > make[5]: *** No rule to make target > `../../hf/pythonClasses/vtkHFHierarchy', needed by > `hf/pythonClasses/vtkHFFunctionPython.cxx'. Stop. > > make[4]: *** [hf/pythonClasses/CMakeFiles/vtkHFPythonD.dir/all] Error 2 > > make[3]: *** [all] Error 2 > > make[2]: *** [hfvisual-prefix/src/hfvisual-stamp/hfvisual-build] Error 2 > > make[1]: *** [CMakeFiles/hfvisual.dir/all] Error 2 > > make: *** [all] Error 2 > > //------------- > > My CMakeLists: > > > find_package(VTK REQUIRED > vtkCommonCore > vtkCommonDataModel > vtkCommonExecutionModel > vtkImagingHybrid > vtkImagingCore > vtkImagingStencil > vtkImagingGeneral > vtkFiltersCore > vtkRenderingCore > vtkWrappingPythonCore > > ) > include(${VTK_USE_FILE}) > > # Python and vtk wrapping > find_package(PythonInterp REQUIRED) > find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED) > set(CUSTOM_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) > include(vtkWrapPython) > include_directories("${PYTHON_INCLUDE_PATH}") > > > set (OPENAL_INCLUDE_DIR ${INSTALL_DEPENDENCIES_DIR}/include/AL) > > LINK_DIRECTORIES(${INSTALL_DEPENDENCIES_DIR}/lib/) > set(CMAKE_MACOSX_RPATH 1) > > set (openAL OpenAL32) > if( APPLE ) > set (openAL OpenAL) > endif() > > set (OPENAL_LIBRARY} ${INSTALL_DEPENDENCIES_DIR}/lib/${openAL}) > set (ALUT_LIBRARY} ${INSTALL_DEPENDENCIES_DIR}/lib/alut) > include_directories(${OPENAL_INCLUDE_DIR}) > include_directories(${INSTALL_DEPENDENCIES_DIR}/include) > > > ####################################### > # Building vtkHFFunction > list(APPEND libraries_list cppinterpreter) > .... > > add_library(vtkHF SHARED ${WRAP_LIST}) > > # Build main library > TARGET_LINK_LIBRARIES(vtkHF ${VTK_LIBRARIES} alut ${openAL} ${libraries_list}) > if(APPLE) > set_target_properties(vtkHF PROPERTIES SUFFIX ".so") > endif() > > set(vtkHFPython_EXCLUDE_FROM_WRAP_HIERARCHY 1) > # Python wrapping > > include_directories("${PYTHON_INCLUDE_PATH}") > > > #include_directories(${PythonVTKLibs_SOURCE_DIR}) > ####################################### > # Wrapping > > vtk_wrap_python3(vtkHFPython KitPython_SRCS "${WRAP_LIST}") > add_library(vtkHFPythonD ${KitPython_SRCS} ${WRAP_LIST} ) > > > IF(KIT_PYTHON_DEPS) > ADD_DEPENDENCIES(vtkHFPythonD ${KIT_PYTHON_DEPS} ${VTK_PYTHON_LIBRARIES}) > ENDIF(KIT_PYTHON_DEPS) > > #Here happens error > python_add_module(vtkHFPython vtkHFPythonInit.cxx) > > > What I do wrong? > Thank you in advance, > Best regards, Evgeniya > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From ophagen at dornheim-medical-images.de Thu Oct 25 14:36:45 2018 From: ophagen at dornheim-medical-images.de (Angelika Ophagen) Date: Thu, 25 Oct 2018 20:36:45 +0200 Subject: [vtkusers] vtkMultiVolume, vtkOpenGLGPUVolumeRayCastMapper - How to use vtkVolume->GetProperty()->SetScalarOpacity( vtkPiecewiseFunction ) correctly? Message-ID: <3103625.u6C8mHh0Y9@hekate> Hello, I am trying to use vtkMultiVolume for a rather large application for 3D medical image data to meld multiple data - as my bachelor thesis project. I have based my code on commit https://gitlab.kitware.com/vtk/vtk/commit/9db353bb72c5567c4b75573b79517ec090d8df02 of the VTK and on branch nightly-master. I need color transfer functions, scalar opacity functions and image data separately for each volume. I cannot get the scalar opacity to do what I want, somehow. Even in a very small example*, alpha is 1 all over the volume in the end. Gradient opacity, which I do not need, afaik, will result in alpha values smaller 1. I have debugged the shader source code right before they are given to openGL, I have stepped through the vtlVolumeInputHelper and vtkTextureObject and vtkOpenGLVolumeOpacityTable and checked the values of the actual float-Array and - kind of** - found my expected values in there until just before they were given to openGL. From all I have seen, there should be semi-transparent parts to my generated cuboids. I have not altered bias or scale of any volume or the multivolume and presume them to be 0 and 1 respectively. I temporarily changed the fragment shader template to try and output the LUT values (for the 1st volume) instead of the image values***. The whole "volume" in my render window was opaque white. That was the trick I am most unfamiliar with, so it might have just failed to do what I wanted. Have I not used vtkMultiVolume and vtkOpenGLGPUVolumeRayCastMapper in the way they are supposed to be used? Please have a look at my small example code*. Regards, A. Ophagen -- Dipl.-?bers. A. Ophagen Dornheim Medical Images GmbH Listemannstra?e 10, 39104 Magdeburg, Deutschland WWW: http://www.dornheim-medical-images.de/ E-Mail: info at dornheim-medical-images.de Tel: +49 (391) 5054 57 0 Gesch?ftsf?hrer: Lars Dornheim, Jana Dornheim Eingetragen beim Amtsgericht Stendal, HRB 10737 * See gist here: https://gist.github.com/AOphagen/f09d302320db67168dd9fe7316bd35e5 ** I have found that the maximum image value is reduced from 127 to 63 in the process and that the LUT array has min value 0.3, but does not reach max value 0.8 in it's 1024 entries. It stops at about 0.54 - which still is not opaque at all - this should be unrelated. *** Snippet from fragment shader template's void finalizeRayCast() + my code (commented out already): g_fragColor.r = g_fragColor.r * in_scale + in_bias * g_fragColor.a; g_fragColor.g = g_fragColor.g * in_scale + in_bias * g_fragColor.a; g_fragColor.b = g_fragColor.b * in_scale + in_bias * g_fragColor.a; gl_FragData[0] = g_fragColor; // gl_FragData[0].rgb = texture2D( in_opacityTransferFunc_0[0], vec2( gl_FragCoord.x, 0.0 ) ).rrr; // gl_FragData[0].a = 1.0; From elvis.stansvik at orexplore.com Thu Oct 25 15:35:31 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 25 Oct 2018 21:35:31 +0200 Subject: [vtkusers] vtkMultiVolume, vtkOpenGLGPUVolumeRayCastMapper - How to use vtkVolume->GetProperty()->SetScalarOpacity( vtkPiecewiseFunction ) correctly? In-Reply-To: <3103625.u6C8mHh0Y9@hekate> References: <3103625.u6C8mHh0Y9@hekate> Message-ID: Hi Angelika, See answer inline below. Den tors 25 okt. 2018 kl 20:36 skrev Angelika Ophagen : > > Hello, > > I am trying to use vtkMultiVolume for a rather large application for 3D medical image data to meld multiple data - as my bachelor thesis project. I have based my code on commit https://gitlab.kitware.com/vtk/vtk/commit/9db353bb72c5567c4b75573b79517ec090d8df02 of the VTK and on branch nightly-master. > I need color transfer functions, scalar opacity functions and image data separately for each volume. I cannot get the scalar opacity to do what I want, somehow. Even in a very small example*, alpha is 1 all over the volume in the end. Gradient opacity, which I do not need, afaik, will result in alpha values smaller 1. Hm, I tried your code and can't reproduce the problem. It would be good with a screenshot of what you're seeing. When I run it, volumes are showing some transparency. See attached pic1.png and pic2.png. Keep in mind that the value produced by the opacity transfer function is how much opacity is accumulated by a cast ray over one ScalarOpacityUnitDistance (see this property on vtkVolumeProperty). It defaults to 1.0 VTK world unit. This means that, given the opacity functions you've set up in your code, your 64x64x64, which have a spacing of 1.0, are going to look mostly opaque (but not completely). As an example, I changed all your opacity functions to go from opacity 0.0 to 0.1 instead (see pic3.png). Now it's easier to see that there's some transparency. Elvis > > I have debugged the shader source code right before they are given to openGL, I have stepped through the vtlVolumeInputHelper and vtkTextureObject and vtkOpenGLVolumeOpacityTable and checked the values of the actual float-Array and - kind of** - found my expected values in there until just before they were given to openGL. From all I have seen, there should be semi-transparent parts to my generated cuboids. I have not altered bias or scale of any volume or the multivolume and presume them to be 0 and 1 respectively. > > I temporarily changed the fragment shader template to try and output the LUT values (for the 1st volume) instead of the image values***. The whole "volume" in my render window was opaque white. That was the trick I am most unfamiliar with, so it might have just failed to do what I wanted. > > Have I not used vtkMultiVolume and vtkOpenGLGPUVolumeRayCastMapper in the way they are supposed to be used? > Please have a look at my small example code*. > > Regards, > A. Ophagen > > -- > Dipl.-?bers. A. Ophagen > Dornheim Medical Images GmbH > Listemannstra?e 10, 39104 Magdeburg, Deutschland > WWW: http://www.dornheim-medical-images.de/ > E-Mail: info at dornheim-medical-images.de > Tel: +49 (391) 5054 57 0 > Gesch?ftsf?hrer: Lars Dornheim, Jana Dornheim > Eingetragen beim Amtsgericht Stendal, HRB 10737 > > > * See gist here: https://gist.github.com/AOphagen/f09d302320db67168dd9fe7316bd35e5 > ** I have found that the maximum image value is reduced from 127 to 63 in the process and that the LUT array has min value 0.3, but does not reach max value 0.8 in it's 1024 entries. It stops at about 0.54 - which still is not opaque at all - this should be unrelated. > *** Snippet from fragment shader template's void finalizeRayCast() + my code (commented out already): > > g_fragColor.r = g_fragColor.r * in_scale + in_bias * g_fragColor.a; > g_fragColor.g = g_fragColor.g * in_scale + in_bias * g_fragColor.a; > g_fragColor.b = g_fragColor.b * in_scale + in_bias * g_fragColor.a; > gl_FragData[0] = g_fragColor; > > // gl_FragData[0].rgb = texture2D( in_opacityTransferFunc_0[0], vec2( gl_FragCoord.x, 0.0 ) ).rrr; > // gl_FragData[0].a = 1.0; > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- A non-text attachment was scrubbed... Name: pic2.png Type: image/png Size: 40864 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic1.png Type: image/png Size: 43523 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic3.png Type: image/png Size: 40100 bytes Desc: not available URL: From elvis.stansvik at orexplore.com Thu Oct 25 15:46:25 2018 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Thu, 25 Oct 2018 21:46:25 +0200 Subject: [vtkusers] vtkMultiVolume, vtkOpenGLGPUVolumeRayCastMapper - How to use vtkVolume->GetProperty()->SetScalarOpacity( vtkPiecewiseFunction ) correctly? In-Reply-To: References: <3103625.u6C8mHh0Y9@hekate> Message-ID: Den tors 25 okt. 2018 kl 21:35 skrev Elvis Stansvik : > > Hi Angelika, > > See answer inline below. > > Den tors 25 okt. 2018 kl 20:36 skrev Angelika Ophagen > : > > > > Hello, > > > > I am trying to use vtkMultiVolume for a rather large application for 3D medical image data to meld multiple data - as my bachelor thesis project. I have based my code on commit https://gitlab.kitware.com/vtk/vtk/commit/9db353bb72c5567c4b75573b79517ec090d8df02 of the VTK and on branch nightly-master. > > I need color transfer functions, scalar opacity functions and image data separately for each volume. I cannot get the scalar opacity to do what I want, somehow. Even in a very small example*, alpha is 1 all over the volume in the end. Gradient opacity, which I do not need, afaik, will result in alpha values smaller 1. > > Hm, I tried your code and can't reproduce the problem. It would be > good with a screenshot of what you're seeing. > > When I run it, volumes are showing some transparency. See attached > pic1.png and pic2.png. > > Keep in mind that the value produced by the opacity transfer function > is how much opacity is accumulated by a cast ray over one > ScalarOpacityUnitDistance (see this property on vtkVolumeProperty). It > defaults to 1.0 VTK world unit. > > This means that, given the opacity functions you've set up in your > code, your 64x64x64, which have a spacing of 1.0, are going to look > mostly opaque (but not completely). Put another way, with the ScalarOpacityUnitDistance set to its default value (1.0) and a 1.0 voxel spacing, you can think of your opacity transfer function as giving the opacity of one voxel. Since your volumes are 64x64x64 voxels, they're going to look roughly 64 times more opaque than your opacity function says. There's really 4 things that influence the opacity of a rendered volume - The number of voxels that you're "looking through" (the extent of your volume) - The spacing between those voxels (the spacing of your volume) - The scalar opacity unit distance (the ScalarOpacityUnitDistance property) - The opacity transfer function HTH, Elvis > > As an example, I changed all your opacity functions to go from opacity > 0.0 to 0.1 instead (see pic3.png). Now it's easier to see that there's > some transparency. > > Elvis > > > > > I have debugged the shader source code right before they are given to openGL, I have stepped through the vtlVolumeInputHelper and vtkTextureObject and vtkOpenGLVolumeOpacityTable and checked the values of the actual float-Array and - kind of** - found my expected values in there until just before they were given to openGL. From all I have seen, there should be semi-transparent parts to my generated cuboids. I have not altered bias or scale of any volume or the multivolume and presume them to be 0 and 1 respectively. > > > > I temporarily changed the fragment shader template to try and output the LUT values (for the 1st volume) instead of the image values***. The whole "volume" in my render window was opaque white. That was the trick I am most unfamiliar with, so it might have just failed to do what I wanted. > > > > Have I not used vtkMultiVolume and vtkOpenGLGPUVolumeRayCastMapper in the way they are supposed to be used? > > Please have a look at my small example code*. > > > > Regards, > > A. Ophagen > > > > -- > > Dipl.-?bers. A. Ophagen > > Dornheim Medical Images GmbH > > Listemannstra?e 10, 39104 Magdeburg, Deutschland > > WWW: http://www.dornheim-medical-images.de/ > > E-Mail: info at dornheim-medical-images.de > > Tel: +49 (391) 5054 57 0 > > Gesch?ftsf?hrer: Lars Dornheim, Jana Dornheim > > Eingetragen beim Amtsgericht Stendal, HRB 10737 > > > > > > * See gist here: https://gist.github.com/AOphagen/f09d302320db67168dd9fe7316bd35e5 > > ** I have found that the maximum image value is reduced from 127 to 63 in the process and that the LUT array has min value 0.3, but does not reach max value 0.8 in it's 1024 entries. It stops at about 0.54 - which still is not opaque at all - this should be unrelated. > > *** Snippet from fragment shader template's void finalizeRayCast() + my code (commented out already): > > > > g_fragColor.r = g_fragColor.r * in_scale + in_bias * g_fragColor.a; > > g_fragColor.g = g_fragColor.g * in_scale + in_bias * g_fragColor.a; > > g_fragColor.b = g_fragColor.b * in_scale + in_bias * g_fragColor.a; > > gl_FragData[0] = g_fragColor; > > > > // gl_FragData[0].rgb = texture2D( in_opacityTransferFunc_0[0], vec2( gl_FragCoord.x, 0.0 ) ).rrr; > > // gl_FragData[0].a = 1.0; > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > https://public.kitware.com/mailman/listinfo/vtkusers From ophagen at dornheim-medical-images.de Thu Oct 25 16:45:34 2018 From: ophagen at dornheim-medical-images.de (Angelika Ophagen) Date: Thu, 25 Oct 2018 22:45:34 +0200 Subject: [vtkusers] vtkMultiVolume, vtkOpenGLGPUVolumeRayCastMapper - How to use vtkVolume->GetProperty()->SetScalarOpacity( vtkPiecewiseFunction ) correctly? In-Reply-To: References: <3103625.u6C8mHh0Y9@hekate> Message-ID: <2546122.LZVXJMiMHA@hekate> Am Donnerstag, 25. Oktober 2018, 21:46:25 CEST schrieb Elvis Stansvik: > Den tors 25 okt. 2018 kl 21:35 skrev Elvis Stansvik > > : > > Hi Angelika, > > > > See answer inline below. > > > > Den tors 25 okt. 2018 kl 20:36 skrev Angelika Ophagen > > > > : > > > Hello, > > > > > > I am trying to use vtkMultiVolume for a rather large application for 3D > > > medical image data to meld multiple data - as my bachelor thesis > > > project. I have based my code on commit > > > https://gitlab.kitware.com/vtk/vtk/commit/9db353bb72c5567c4b75573b79517 > > > ec090d8df02 of the VTK and on branch nightly-master. I need color > > > transfer functions, scalar opacity functions and image data separately > > > for each volume. I cannot get the scalar opacity to do what I want, > > > somehow. Even in a very small example*, alpha is 1 all over the volume > > > in the end. Gradient opacity, which I do not need, afaik, will result > > > in alpha values smaller 1.> > > Hm, I tried your code and can't reproduce the problem. It would be > > good with a screenshot of what you're seeing. > > > > When I run it, volumes are showing some transparency. See attached > > pic1.png and pic2.png. > > > > Keep in mind that the value produced by the opacity transfer function > > is how much opacity is accumulated by a cast ray over one > > ScalarOpacityUnitDistance (see this property on vtkVolumeProperty). It > > defaults to 1.0 VTK world unit. > > > > This means that, given the opacity functions you've set up in your > > code, your 64x64x64, which have a spacing of 1.0, are going to look > > mostly opaque (but not completely). > > Put another way, with the ScalarOpacityUnitDistance set to its default > value (1.0) and a 1.0 voxel spacing, you can think of your opacity > transfer function as giving the opacity of one voxel. Since your > volumes are 64x64x64 voxels, they're going to look roughly 64 times > more opaque than your opacity function says. > > There's really 4 things that influence the opacity of a rendered volume > > - The number of voxels that you're "looking through" (the extent of your > volume) - The spacing between those voxels (the spacing of your volume) > - The scalar opacity unit distance (the ScalarOpacityUnitDistance property) > - The opacity transfer function > > HTH, > Elvis Thanks a lot! If I understand you correctly, when I want my opacityTransferFunction to signify the transfer function for the whole dataset, I will need to set the ScalarOpacityUnitDistance to the maxValue - minValue of the dataset? Or is it the max size of the dataset? In this case they are the same values, because I was lazy with the test data. I will immediately test that. We afaik never used ScalarOpacityUnitDistance before. Is it a new mechanism? As of now, we already use Release VTK 8.1 and it seems strange that our medical datasets look just like we want them when all we used to set were color and scalar opacity. The example has a teeny weeny value range and I am not excluding any of its value range, which is very different from a 'real' dataset. We are talking about medical images and they sometimes have a range that is already clamped by DICOM having only an amount of int16-range of values - of course you usually have invisible background, but in case of medical data - a LOT of the data is invisible most of the time. I am mapping the opacity to the grey values of the dataset. When I have a trapezoid function, I usually start at some grey value with 0 opacity then two nodes with some visibility and then another (lighter) grey value again with zero opacity. This function to me defines the opacity of the dataset, in it's entirety. Which additional information do I give the volume property with ScalarOpacityUnitDistance? Should I put additional zero opacity nodes at the extremes of the dataset's value range, too? In case of a triangular function like so: _/\_ ? To me, that seems weird, because I just presume anything below range-min is zero and anything above range-max is zero. Unless you use the clamping, that is. Thanks again! A. Ophagen Sorry, I babble when tired. Should go home and continue tomorrow, really. > > As an example, I changed all your opacity functions to go from opacity > > 0.0 to 0.1 instead (see pic3.png). Now it's easier to see that there's > > some transparency. > > > > Elvis > > > > > I have debugged the shader source code right before they are given to > > > openGL, I have stepped through the vtlVolumeInputHelper and > > > vtkTextureObject and vtkOpenGLVolumeOpacityTable and checked the values > > > of the actual float-Array and - kind of** - found my expected values in > > > there until just before they were given to openGL. From all I have > > > seen, there should be semi-transparent parts to my generated cuboids. I > > > have not altered bias or scale of any volume or the multivolume and > > > presume them to be 0 and 1 respectively. > > > > > > I temporarily changed the fragment shader template to try and output the > > > LUT values (for the 1st volume) instead of the image values***. The > > > whole "volume" in my render window was opaque white. That was the trick > > > I am most unfamiliar with, so it might have just failed to do what I > > > wanted. > > > > > > Have I not used vtkMultiVolume and vtkOpenGLGPUVolumeRayCastMapper in > > > the way they are supposed to be used? Please have a look at my small > > > example code*. > > > > > > Regards, > > > A. Ophagen > > > > > > -- > > > Dipl.-?bers. A. Ophagen > > > Dornheim Medical Images GmbH > > > Listemannstra?e 10, 39104 Magdeburg, Deutschland > > > WWW: http://www.dornheim-medical-images.de/ > > > E-Mail: info at dornheim-medical-images.de > > > Tel: +49 (391) 5054 57 0 > > > Gesch?ftsf?hrer: Lars Dornheim, Jana Dornheim > > > Eingetragen beim Amtsgericht Stendal, HRB 10737 > > > > > > > > > * See gist here: > > > https://gist.github.com/AOphagen/f09d302320db67168dd9fe7316bd35e5 ** I > > > have found that the maximum image value is reduced from 127 to 63 in > > > the process and that the LUT array has min value 0.3, but does not > > > reach max value 0.8 in it's 1024 entries. It stops at about 0.54 - > > > which still is not opaque at all - this should be unrelated. *** > > > Snippet from fragment shader template's void finalizeRayCast() + my > > > code (commented out already): > > > > > > g_fragColor.r = g_fragColor.r * in_scale + in_bias * g_fragColor.a; > > > g_fragColor.g = g_fragColor.g * in_scale + in_bias * g_fragColor.a; > > > g_fragColor.b = g_fragColor.b * in_scale + in_bias * g_fragColor.a; > > > gl_FragData[0] = g_fragColor; > > > > > > // gl_FragData[0].rgb = texture2D( in_opacityTransferFunc_0[0], vec2( > > > gl_FragCoord.x, 0.0 ) ).rrr; // gl_FragData[0].a = 1.0; > > > > > > > > > > > > _______________________________________________ > > > Powered by www.kitware.com > > > > > > Visit other Kitware open-source projects at > > > http://www.kitware.com/opensource/opensource.html > > > > > > Please keep messages on-topic and check the VTK FAQ at: > > > http://www.vtk.org/Wiki/VTK_FAQ > > > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > > > Follow this link to subscribe/unsubscribe: > > > https://public.kitware.com/mailman/listinfo/vtkusers -- Dipl.-?bers. A. Ophagen Dornheim Medical Images GmbH Listemannstra?e 10, 39104 Magdeburg, Deutschland WWW: http://www.dornheim-medical-images.de/ E-Mail: info at dornheim-medical-images.de Tel: +49 (391) 5054 57 0 Gesch?ftsf?hrer: Lars Dornheim, Jana Dornheim Eingetragen beim Amtsgericht Stendal, HRB 10737 From michelmuerner at gmx.ch Fri Oct 26 06:03:10 2018 From: michelmuerner at gmx.ch (=?UTF-8?Q?=22Michel_M=C3=BCrner=22?=) Date: Fri, 26 Oct 2018 12:03:10 +0200 Subject: [vtkusers] VTK 8.1.1 & Qt QML: Dual Depth Peeling not working Message-ID: An HTML attachment was scrubbed... URL: From evgenimalikova at gmail.com Fri Oct 26 08:23:17 2018 From: evgenimalikova at gmail.com (Evgeniya Malikova) Date: Fri, 26 Oct 2018 13:23:17 +0100 Subject: [vtkusers] Can't run build vtk from source with python wrappings Message-ID: <72BCADE7-0FD5-4240-9CBC-6F2422A9291B@gmail.com> Hello, I?m trying to run vtk with python wrappings build from source https://gitlab.kitware.com/vtk/vtk.git. Target os - MacOs, python version 3.6. The basic call of ?import vtk? from python gives error that libraries can?t be loaded (python program from https://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder ): Traceback (most recent call last): File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 5, in from .vtkCommonCorePython import * ImportError: dlopen(/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so, 2): Library not loaded: @rpath/libvtkCommonCorePython36D-8.2.1.dylib Referenced from: /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so Reason: image not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/evgeniya/PycharmProjects/untitled/vtk_test.py", line 1, in import vtk File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/__init__.py", line 7, in from .vtkCommonCore import * File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 9, in from vtkCommonCorePython import * ModuleNotFoundError: No module named ?vtkCommonCorePython' This is the error with added path to /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ to PYTHONPATH variable. Looks very much like libraries are found but can?t be loaded for some reasons. Any suggestions what can cause such an error? Thank you very much in advance, Best regards, Evgeniya -------------- next part -------------- An HTML attachment was scrubbed... URL: From evgenimalikova at gmail.com Fri Oct 26 08:29:21 2018 From: evgenimalikova at gmail.com (Evgeniya Malikova) Date: Fri, 26 Oct 2018 13:29:21 +0100 Subject: [vtkusers] Can't run build vtk from source with python wrappings In-Reply-To: <72BCADE7-0FD5-4240-9CBC-6F2422A9291B@gmail.com> References: <72BCADE7-0FD5-4240-9CBC-6F2422A9291B@gmail.com> Message-ID: <8EB9C3A1-EBCF-45AF-AFD3-90261A59B5A5@gmail.com> Forgot to add, main library files, like libvtkCommonCorePython36-8.2.1.dylib are in Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ folder. Best regards, Evgeniya > On 26 Oct 2018, at 13:23, Evgeniya Malikova wrote: > > Hello, I?m trying to run vtk with python wrappings build from source https://gitlab.kitware.com/vtk/vtk.git . Target os - MacOs, python version 3.6. The basic call of ?import vtk? from python gives error that libraries can?t be loaded (python program from https://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder ): > > > Traceback (most recent call last): > File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 5, in > from .vtkCommonCorePython import * > ImportError: dlopen(/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so, 2): Library not loaded: @rpath/libvtkCommonCorePython36D-8.2.1.dylib > Referenced from: /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so > Reason: image not found > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/Users/evgeniya/PycharmProjects/untitled/vtk_test.py", line 1, in > import vtk > File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/__init__.py", line 7, in > from .vtkCommonCore import * > File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 9, in > from vtkCommonCorePython import * > ModuleNotFoundError: No module named ?vtkCommonCorePython' > > This is the error with added path to /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ to PYTHONPATH variable. > > Looks very much like libraries are found but can?t be loaded for some reasons. Any suggestions what can cause such an error? > > Thank you very much in advance, > Best regards, > Evgeniya > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Fri Oct 26 08:45:23 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Fri, 26 Oct 2018 08:45:23 -0400 Subject: [vtkusers] VTK 8.1.1 & Qt QML: Dual Depth Peeling not working In-Reply-To: References: Message-ID: Does the issue exist only when depth peeling is enabled? Do you see it rendering correctly when depth peeling is disabled? Ensure that the color and depth buffers are preserved with the renderer : _renderer->SetPreserveColorBuffer(1); _renderer->SetPreserveDepthBuffer(1); ? On Fri, Oct 26, 2018 at 6:08 AM "Michel M?rner" wrote: > The application I'm working on is based on Qt QML and I'm frequently using > VTK via the vtkExternalOpenGLRenderWindow rendering to a > QQuickFramebufferObject. Because semi-transparent geometries weren't > rendered correctly I found out about the dual depth peeling and enabled it > as recommended on the VTK website: > > > https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CorrectlyRenderTranslucentGeometry > > _renderer = vtkSmartPointer::New(); > _renderer->SetUseDepthPeeling( 1 ); > _renderer->SetMaximumNumberOfPeels( 100 ); > _renderer->SetOcclusionRatio( 0.1 ); > _renderWindow = vtkExternalOpenGLRenderWindow::New(); > _renderWindow->SetAlphaBitPlanes( 1 ); > _renderWindow->SetMultiSamples( 0 ); > _renderWindow->AddRenderer( _renderer ); > > Unfortunately all I can see now is a red background. (Note: Red isn't a > color I'm using for any objects or backgrounds) > > The Versions I'm using are VTK Version 8.1.1 and Qt 5.11.2 > > Has anyone tried something similar with vtkExternalOpenGLRenderWindow, > QQuickFramebufferObject and Dual Depth Peeling? Or an idea what might be > the problem. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://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 jcfr at kitware.com Fri Oct 26 10:11:21 2018 From: jcfr at kitware.com (Jean-Christophe Fillion-Robin) Date: Fri, 26 Oct 2018 10:11:21 -0400 Subject: [vtkusers] Can't run build vtk from source with python wrappings In-Reply-To: <8EB9C3A1-EBCF-45AF-AFD3-90261A59B5A5@gmail.com> References: <72BCADE7-0FD5-4240-9CBC-6F2422A9291B@gmail.com> <8EB9C3A1-EBCF-45AF-AFD3-90261A59B5A5@gmail.com> Message-ID: Hi, If you explicitly set or update DYLD_LIBRARY_PATH environment variable first with the path" /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/", are you able to import ? While sub-optimal, knowing that this work would provide good information. Jc On Fri, Oct 26, 2018 at 8:29 AM Evgeniya Malikova wrote: > Forgot to add, main library files, like > libvtkCommonCorePython36-8.2.1.dylib are in > Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ folder. > > Best regards, > Evgeniya > > On 26 Oct 2018, at 13:23, Evgeniya Malikova > wrote: > > Hello, I?m trying to run vtk with python wrappings build from source > https://gitlab.kitware.com/vtk/vtk.git. Target os - MacOs, python version > 3.6. The basic call of ?import vtk? from python gives error that libraries > can?t be loaded (python program from > https://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder): > > > Traceback (most recent call last): > File > "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", > line 5, in > from .vtkCommonCorePython import * > ImportError: > dlopen(/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so, > 2): Library not loaded: @rpath/libvtkCommonCorePython36D-8.2.1.dylib > Referenced from: > /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so > Reason: image not found > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/Users/evgeniya/PycharmProjects/untitled/vtk_test.py", line 1, in > > import vtk > File > "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/__init__.py", > line 7, in > from .vtkCommonCore import * > File > "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", > line 9, in > from vtkCommonCorePython import * > ModuleNotFoundError: No module named ?vtkCommonCorePython' > > This is the error with added path to > /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ to PYTHONPATH > variable. > > Looks very much like libraries are found but can?t be loaded for some > reasons. Any suggestions what can cause such an error? > > Thank you very much in advance, > Best regards, > Evgeniya > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From evgenimalikova at gmail.com Fri Oct 26 11:54:51 2018 From: evgenimalikova at gmail.com (Evgeniya Malikova) Date: Fri, 26 Oct 2018 16:54:51 +0100 Subject: [vtkusers] Can't run build vtk from source with python wrappings In-Reply-To: References: <72BCADE7-0FD5-4240-9CBC-6F2422A9291B@gmail.com> <8EB9C3A1-EBCF-45AF-AFD3-90261A59B5A5@gmail.com> Message-ID: No, looks like updating DYLS_LIBRARY_PATH didn?t solve the problem. However, vtkpython works well. Just come across this description: https://stackoverflow.com/questions/48148376/running-vtk-from-python-not-just-vtkpython The similar check gives me similar list of dependencies with vtk python depending on libpython3.6m.dylib: otool -L libvtkCommonCorePython36D-8.2.1.dylib libvtkCommonCorePython36D-8.2.1.dylib: @rpath/libvtkCommonCorePython36D-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/libvtkWrappingPython36Core-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/libvtkCommonCore-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/libvtksys-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0) otool -L vtkpython vtkpython: @rpath/libvtkWrappingPython36Core-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/libvtkPythonInterpreter-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version 3.6.0) @rpath/libvtksys-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/libvtkCommonCore-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0) Best regards, Evgeniya > On 26 Oct 2018, at 15:11, Jean-Christophe Fillion-Robin wrote: > > Hi, > > If you explicitly set or update DYLD_LIBRARY_PATH environment variable first with the path" /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/", are you able to import ? > > While sub-optimal, knowing that this work would provide good information. > > Jc > > On Fri, Oct 26, 2018 at 8:29 AM Evgeniya Malikova > wrote: > Forgot to add, main library files, like libvtkCommonCorePython36-8.2.1.dylib are in Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ folder. > > Best regards, > Evgeniya > >> On 26 Oct 2018, at 13:23, Evgeniya Malikova > wrote: >> >> Hello, I?m trying to run vtk with python wrappings build from source https://gitlab.kitware.com/vtk/vtk.git . Target os - MacOs, python version 3.6. The basic call of ?import vtk? from python gives error that libraries can?t be loaded (python program from https://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder ): >> >> >> Traceback (most recent call last): >> File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 5, in >> from .vtkCommonCorePython import * >> ImportError: dlopen(/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so, 2): Library not loaded: @rpath/libvtkCommonCorePython36D-8.2.1.dylib >> Referenced from: /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so >> Reason: image not found >> >> During handling of the above exception, another exception occurred: >> >> Traceback (most recent call last): >> File "/Users/evgeniya/PycharmProjects/untitled/vtk_test.py", line 1, in >> import vtk >> File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/__init__.py", line 7, in >> from .vtkCommonCore import * >> File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 9, in >> from vtkCommonCorePython import * >> ModuleNotFoundError: No module named ?vtkCommonCorePython' >> >> This is the error with added path to /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ to PYTHONPATH variable. >> >> Looks very much like libraries are found but can?t be loaded for some reasons. Any suggestions what can cause such an error? >> >> Thank you very much in advance, >> Best regards, >> Evgeniya >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcfr at kitware.com Fri Oct 26 13:41:38 2018 From: jcfr at kitware.com (Jean-Christophe Fillion-Robin) Date: Fri, 26 Oct 2018 13:41:38 -0400 Subject: [vtkusers] Can't run build vtk from source with python wrappings In-Reply-To: References: <72BCADE7-0FD5-4240-9CBC-6F2422A9291B@gmail.com> <8EB9C3A1-EBCF-45AF-AFD3-90261A59B5A5@gmail.com> Message-ID: Hi, I see. As an alternative approach, you could also look into building VTK python package using https://github.com/jcfr/VTKPythonPackage This is what is used to build the VTK python wheels. That said, note that we are are not yet officially supporting VTK python wheels. Hth Jc On Fri, Oct 26, 2018 at 11:54 AM Evgeniya Malikova wrote: > No, looks like updating DYLS_LIBRARY_PATH didn?t solve the problem. > > However, vtkpython works well. Just come across this description: > > https://stackoverflow.com/questions/48148376/running-vtk-from-python-not-just-vtkpython > > The similar check gives me similar list of dependencies with vtk python > depending on libpython3.6m.dylib: > otool -L libvtkCommonCorePython36D-8.2.1.dylib > libvtkCommonCorePython36D-8.2.1.dylib: > @rpath/libvtkCommonCorePython36D-8.2.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > @rpath/libvtkWrappingPython36Core-8.2.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > @rpath/libvtkCommonCore-8.2.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > @rpath/libvtksys-8.2.1.dylib (compatibility version 1.0.0, current version > 1.0.0) > /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version > 400.9.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1252.0.0) > > otool -L vtkpython > vtkpython: > @rpath/libvtkWrappingPython36Core-8.2.1.dylib (compatibility version > 1.0.0, current version 1.0.0) > @rpath/libvtkPythonInterpreter-8.2.1.dylib (compatibility version 1.0.0, > current version 1.0.0) > /usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0) > @rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version > 3.6.0) > @rpath/libvtksys-8.2.1.dylib (compatibility version 1.0.0, current version > 1.0.0) > @rpath/libvtkCommonCore-8.2.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version > 400.9.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version > 1252.0.0) > > Best regards, > Evgeniya > > On 26 Oct 2018, at 15:11, Jean-Christophe Fillion-Robin > wrote: > > Hi, > > If you explicitly set or update DYLD_LIBRARY_PATH environment variable > first with the path" > /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/", are you able > to import ? > > While sub-optimal, knowing that this work would provide good information. > > Jc > > On Fri, Oct 26, 2018 at 8:29 AM Evgeniya Malikova < > evgenimalikova at gmail.com> wrote: > >> Forgot to add, main library files, like >> libvtkCommonCorePython36-8.2.1.dylib are in >> Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ folder. >> >> Best regards, >> Evgeniya >> >> On 26 Oct 2018, at 13:23, Evgeniya Malikova >> wrote: >> >> Hello, I?m trying to run vtk with python wrappings build from source >> https://gitlab.kitware.com/vtk/vtk.git. Target os - MacOs, python >> version 3.6. The basic call of ?import vtk? from python gives error that >> libraries can?t be loaded (python program from >> https://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder): >> >> >> Traceback (most recent call last): >> File >> "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", >> line 5, in >> from .vtkCommonCorePython import * >> ImportError: >> dlopen(/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so, >> 2): Library not loaded: @rpath/libvtkCommonCorePython36D-8.2.1.dylib >> Referenced from: >> /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so >> Reason: image not found >> >> During handling of the above exception, another exception occurred: >> >> Traceback (most recent call last): >> File "/Users/evgeniya/PycharmProjects/untitled/vtk_test.py", line 1, in >> >> import vtk >> File >> "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/__init__.py", >> line 7, in >> from .vtkCommonCore import * >> File >> "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", >> line 9, in >> from vtkCommonCorePython import * >> ModuleNotFoundError: No module named ?vtkCommonCorePython' >> >> This is the error with added path to >> /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ to PYTHONPATH >> variable. >> >> Looks very much like libraries are found but can?t be loaded for some >> reasons. Any suggestions what can cause such an error? >> >> Thank you very much in advance, >> Best regards, >> Evgeniya >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From evgenimalikova at gmail.com Fri Oct 26 20:23:54 2018 From: evgenimalikova at gmail.com (Evgeniya Malikova) Date: Sat, 27 Oct 2018 03:23:54 +0300 Subject: [vtkusers] Can't run build vtk from source with python wrappings In-Reply-To: References: <72BCADE7-0FD5-4240-9CBC-6F2422A9291B@gmail.com> <8EB9C3A1-EBCF-45AF-AFD3-90261A59B5A5@gmail.com> Message-ID: Ok. Thank you very much. Evgeniya ??, 26 ???. 2018 ?. ? 20:41, Jean-Christophe Fillion-Robin : > > Hi, > > I see. As an alternative approach, you could also look into building VTK python package using https://github.com/jcfr/VTKPythonPackage > > This is what is used to build the VTK python wheels. That said, note that we are are not yet officially supporting VTK python wheels. > > Hth > Jc > > On Fri, Oct 26, 2018 at 11:54 AM Evgeniya Malikova wrote: >> >> No, looks like updating DYLS_LIBRARY_PATH didn?t solve the problem. >> >> However, vtkpython works well. Just come across this description: >> https://stackoverflow.com/questions/48148376/running-vtk-from-python-not-just-vtkpython >> >> The similar check gives me similar list of dependencies with vtk python depending on libpython3.6m.dylib: >> otool -L libvtkCommonCorePython36D-8.2.1.dylib >> libvtkCommonCorePython36D-8.2.1.dylib: >> @rpath/libvtkCommonCorePython36D-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) >> @rpath/libvtkWrappingPython36Core-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) >> @rpath/libvtkCommonCore-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) >> @rpath/libvtksys-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) >> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0) >> >> otool -L vtkpython >> vtkpython: >> @rpath/libvtkWrappingPython36Core-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) >> @rpath/libvtkPythonInterpreter-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) >> /usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0) >> @rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version 3.6.0) >> @rpath/libvtksys-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) >> @rpath/libvtkCommonCore-8.2.1.dylib (compatibility version 1.0.0, current version 1.0.0) >> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0) >> >> Best regards, >> Evgeniya >> >> On 26 Oct 2018, at 15:11, Jean-Christophe Fillion-Robin wrote: >> >> Hi, >> >> If you explicitly set or update DYLD_LIBRARY_PATH environment variable first with the path" /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/", are you able to import ? >> >> While sub-optimal, knowing that this work would provide good information. >> >> Jc >> >> On Fri, Oct 26, 2018 at 8:29 AM Evgeniya Malikova wrote: >>> >>> Forgot to add, main library files, like libvtkCommonCorePython36-8.2.1.dylib are in Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ folder. >>> >>> Best regards, >>> Evgeniya >>> >>> On 26 Oct 2018, at 13:23, Evgeniya Malikova wrote: >>> >>> Hello, I?m trying to run vtk with python wrappings build from source https://gitlab.kitware.com/vtk/vtk.git. Target os - MacOs, python version 3.6. The basic call of ?import vtk? from python gives error that libraries can?t be loaded (python program from https://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder): >>> >>> >>> Traceback (most recent call last): >>> File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 5, in >>> from .vtkCommonCorePython import * >>> ImportError: dlopen(/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so, 2): Library not loaded: @rpath/libvtkCommonCorePython36D-8.2.1.dylib >>> Referenced from: /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCorePython.so >>> Reason: image not found >>> >>> During handling of the above exception, another exception occurred: >>> >>> Traceback (most recent call last): >>> File "/Users/evgeniya/PycharmProjects/untitled/vtk_test.py", line 1, in >>> import vtk >>> File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/__init__.py", line 7, in >>> from .vtkCommonCore import * >>> File "/Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/vtkCommonCore.py", line 9, in >>> from vtkCommonCorePython import * >>> ModuleNotFoundError: No module named ?vtkCommonCorePython' >>> >>> This is the error with added path to /Users/evgeniya/anaconda3/lib/python3.6/site-packages/vtk/ to PYTHONPATH variable. >>> >>> Looks very much like libraries are found but can?t be loaded for some reasons. Any suggestions what can cause such an error? >>> >>> Thank you very much in advance, >>> Best regards, >>> Evgeniya >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://public.kitware.com/mailman/listinfo/vtkusers >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://public.kitware.com/mailman/listinfo/vtkusers From iamdpak at gmail.com Sat Oct 27 03:38:35 2018 From: iamdpak at gmail.com (vinmean) Date: Sat, 27 Oct 2018 00:38:35 -0700 (MST) Subject: [vtkusers] Creating a fly through in vtk Message-ID: <1540625915077-0.post@n5.nabble.com> I want to create a smooth 'fly though' like rendering in vtk. I have a 3D scene and want to create a movie using successive camera poses. Can this be done in vtk? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From evgenimalikova at gmail.com Sat Oct 27 11:01:23 2018 From: evgenimalikova at gmail.com (Evgeniya Malikova) Date: Sat, 27 Oct 2018 18:01:23 +0300 Subject: [vtkusers] Problem compiling a project uses VTK In-Reply-To: <1540372623706-0.post@n5.nabble.com> References: <1540372623706-0.post@n5.nabble.com> Message-ID: Just a suggestion. From what I see, the code implements standard medical image segmentation quality metrics, like HausdorffDistance and etc. Those are implemented, well tested and fast in ITK (https://itk.org/Doxygen/html/classitk_1_1HausdorffDistanceImageFilter.html), and VTK main purpose of use is visualization tasks. You can play with the ITK algorithms from python (for example http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/Python_html/34_Segmentation_Evaluation.html or you can google other examples), before modifying and creating something new on the base of existing algorithms. That is of course if you don't have a particular task to use the suggested vtk based code. Best regards, Evgeniya ??, 24 ???. 2018 ?. ? 12:17, Fcs : > > It looks like your file is available in vtk 5. Vtk 5 is available for > installation on Ubuntu 16.04, so if that's the system you happen to be > developing on, you're good to go. > > In the worst case, you can download vtk (tag 5.10.1) from the development > repository, and compile it yourself: > https://gitlab.kitware.com/vtk/vtk/tree/v5.10.1 > > Good luck. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers From masterwangzx at gmail.com Sun Oct 28 02:25:20 2018 From: masterwangzx at gmail.com (Franks) Date: Sat, 27 Oct 2018 23:25:20 -0700 (MST) Subject: [vtkusers] Can't read image with VTK Message-ID: <1540707920888-0.post@n5.nabble.com> Hi, I have a question when I use VTK with CLion. I'm using VTK 8.1 in c++ build with cmake3.12. When I read image by using class *"vtkMetaImageReader"(other class inheriting "vtkImageReader2" have the same problem*), the program crash with "*Process finished with exit code -1073741515 (0xC0000135)*"(display in clion). But class "vtkStructuredPointsReader" can run correctly. I think it may lack some libraries related with image. Now, I have no idea with this problem. CMakeLists.txt /cmake_minimum_required(VERSION 3.12) project(vtk_demo) set(CMAKE_CXX_STANDARD 14) aux_source_directory(src SOURCE_FILES) set(RES_FILES res/brain.mhd res/brain.raw) include_directories(include) #vtk set(VTK_DIR G:\\VTK) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(vtk_demo ${SOURCE_FILES} ${RES_FILES}) target_link_libraries(vtk_demo ${VTK_LIBRARIES})/ main.cpp /#include #include #include #include #include #include int main(int argc, char* argv[]) { auto reader = vtkSmartPointer::New(); reader->SetFileName("../res/brain.mhd"); reader->Update(); auto imageViewer = vtkSmartPointer::New(); imageViewer->SetInputConnection(reader->GetOutputPort()); auto renderWindowInteractor = vtkSmartPointer::New(); imageViewer->SetupInteractor(renderWindowInteractor); imageViewer->SetColorLevel(500); imageViewer->SetColorWindow(2000); imageViewer->SetSlice(40); imageViewer->SetSliceOrientationToXY(); imageViewer->Render(); imageViewer->GetRenderer()->SetBackground(1.0, 1.0, 1.0); imageViewer->SetSize(640, 480); imageViewer->GetRenderWindow()->SetWindowName("DisplayImageExample"); renderWindowInteractor->Start(); return 0; } / Thank you very much in advance, Best regards, Franks -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From anpedroni at gmail.com Sun Oct 28 07:33:10 2018 From: anpedroni at gmail.com (Andreas Pedroni) Date: Sun, 28 Oct 2018 12:33:10 +0100 Subject: [vtkusers] Image from OpenCV as texture Message-ID: Dear list My final goal is to render a movie (read by the openCV method VideoCapture) on a plane in 3D space (using VTK). As a first step I tried to map a single RGB-frame (a numpy nd.array (1020, 720,3) ) as texture on a plane (see the code snippet below). However this does not work. What I don?t get is how to create a 2D color image to map to the texture. Now it is recognized as a 3D texture map and returns the error: "3D texture maps currently are not supported!?. As I am very new to VTK and do not know anything about C++, I find it difficult to orient myself in VTK through the C++ examples. So, any hints would be greatly appreciated! Best Andreas # Python 3.6, VTK 8.1.1, OpenCV 3.4.2) # Create a video capture object to read videos cap = cv2.VideoCapture(VIDEOPATH) # Read first frame success, frame = cap.read() frame_shape = frame.shape vtk_array = numpy_support.numpy_to_vtk(frame.transpose(2, 0, 1).ravel(), deep=True, array_type=vtk.VTK_UNSIGNED_CHAR) # Convert vtkFloatArray to vtkImageData vtk_image_data = vtk.vtkImageData() vtk_image_data.SetDimensions(frame.shape) vtk_image_data.SetSpacing([1,1,1]) vtk_image_data.GetPointData().SetScalars(vtk_array) vtk_image_data.SetOrigin(0,0,0) # create the texture atext = vtk.vtkTexture() atext.SetInputData(vtk_image_data) atext.InterpolateOn() plane = vtk.vtkPlaneSource() ? From masterwangzx at gmail.com Sun Oct 28 08:02:23 2018 From: masterwangzx at gmail.com (Franks) Date: Sun, 28 Oct 2018 05:02:23 -0700 (MST) Subject: [vtkusers] Can't read image with VTK In-Reply-To: <1540707920888-0.post@n5.nabble.com> References: <1540707920888-0.post@n5.nabble.com> Message-ID: <1540728143544-0.post@n5.nabble.com> I have solved this problem. Add your tiff path(tiff/bin) to environmental variable and then vtk will work fine. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From addison.elliott at gmail.com Sun Oct 28 14:30:51 2018 From: addison.elliott at gmail.com (Addison Elliott) Date: Sun, 28 Oct 2018 13:30:51 -0500 Subject: [vtkusers] Image from OpenCV as texture In-Reply-To: References: Message-ID: I came across a similar problem when I was working on a VTK application in Python. There are few examples of how to do this (if any). Take a look at this excerpt of code that I use to load in RGB data. In short, the answer to your problem is to have the data is NxM where N is the product of the size of the data (i.e. 10x10x10 => N = 1000) and M is the number of color channels you have (1 for grayscale, 3 for RGB, 4 for RGBA). # Use VTK support function to convert Numpy to VTK array # The data is reshaped to one long 2D array where the first dimension is the data and the second dimension is # the color channels (1, 3 or 4 typically) # Note: Fortran memory ordering is required to import the data correctly # Type is not specified, default is to use type of Numpy array vtkArray = numpy_support.numpy_to_vtk(self.data.reshape((-1, self.channels), order='F'), deep=False) # Create image, set parameters and import data self.vtkImage = vtkImageData() # For vtkImage, dimensions, spacing and origin is assumed to be 3D. VTK images cannot be larger than 3D and if # they are less than 3D, the remaining dimensions should be set to default values. The function padRightMinimum # adds default values to make the list 3D. self.vtkImage.SetDimensions(padRightMinimum(self.size, 3, 1)) self.vtkImage.SetSpacing(padRightMinimum(self.spacing, 3, 1)) self.vtkImage.SetOrigin(padRightMinimum(self.origin, 3, 0)) # Import the data (vtkArray) into the vtkImage self.vtkImage.GetPointData().SetScalars(vtkArray) On Sun, Oct 28, 2018 at 6:33 AM Andreas Pedroni wrote: > > Dear list > > My final goal is to render a movie (read by the openCV method VideoCapture) on a plane in 3D space (using VTK). > > As a first step I tried to map a single RGB-frame (a numpy nd.array (1020, 720,3) ) as texture on a plane (see the code snippet below). > However this does not work. What I don?t get is how to create a 2D color image to map to the texture. Now it is recognized as a 3D texture map and returns the error: "3D texture maps currently are not supported!?. > > As I am very new to VTK and do not know anything about C++, I find it difficult to orient myself in VTK through the C++ examples. > So, any hints would be greatly appreciated! > > Best > Andreas > > > # Python 3.6, VTK 8.1.1, OpenCV 3.4.2) > > # Create a video capture object to read videos > cap = cv2.VideoCapture(VIDEOPATH) > > # Read first frame > success, frame = cap.read() > > frame_shape = frame.shape > vtk_array = numpy_support.numpy_to_vtk(frame.transpose(2, 0, 1).ravel(), deep=True, array_type=vtk.VTK_UNSIGNED_CHAR) > > # Convert vtkFloatArray to vtkImageData > vtk_image_data = vtk.vtkImageData() > vtk_image_data.SetDimensions(frame.shape) > vtk_image_data.SetSpacing([1,1,1]) > vtk_image_data.GetPointData().SetScalars(vtk_array) > vtk_image_data.SetOrigin(0,0,0) > > # create the texture > atext = vtk.vtkTexture() > atext.SetInputData(vtk_image_data) > atext.InterpolateOn() > > plane = vtk.vtkPlaneSource() > ? > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Oct 29 08:29:54 2018 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 29 Oct 2018 08:29:54 -0400 Subject: [vtkusers] Multi-texturing?? In-Reply-To: References: Message-ID: Here is one example. https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/OpenGL2/Testing/Cxx/TestMultiTexturing.cxx On Thu, Oct 25, 2018 at 11:02 AM, Patrick Bergeron wrote: > Hi. > > > I am trying to use a second texture in a fragment shader. > > > vtkActor::SetTexture(vtkTexture*) seems to only take a single texture > image and no way to add more. > > > vtkActor::GetProperty()->SetTexture(textureUnit, vtkTexture*) is > deprecated and shows an error in an output window, and doesn't seem to pass > any other texture variable to the shader. > > > I've looked and looked, and I'm probably blind, but how do I do this > seemingly simple task? > > > Thanks. > > Patrick > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/ > opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Distinguished Engineer Kitware Inc. 101 East Weaver Street Carrboro, North Carolina 27510 USA 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 masterwangzx at gmail.com Mon Oct 29 09:21:37 2018 From: masterwangzx at gmail.com (Franks) Date: Mon, 29 Oct 2018 06:21:37 -0700 (MST) Subject: [vtkusers] Clarification and help using vtkLookupTable In-Reply-To: <1502202724381-5744320.post@n5.nabble.com> References: <1502150683321-5744313.post@n5.nabble.com> <1502202724381-5744320.post@n5.nabble.com> Message-ID: <1540819297924-0.post@n5.nabble.com> Dear Mr. Patel I have the same problem as you. I saw your problem, but still don't understand why it works like that. Could you do me a favour to have a look and tell me your understanding about *SetRange()*. Thank you, and I look forward to hearing from you. Best regards, Franks -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From zhouyu at live.com Mon Oct 29 18:27:30 2018 From: zhouyu at live.com (Yu Zhou) Date: Mon, 29 Oct 2018 22:27:30 +0000 Subject: [vtkusers] Question to use the vtkStreamTracer Message-ID: Hello, I have a problem with vtkStreamTracer. Here is the code: ``` def generate_streamline(source_file, dest_file, axis, resolution=1): reader = vtk.vtkXMLImageDataReader() reader.SetFileName(source_file) reader.GetPointDataArraySelection().DisableArray('density') reader.Update() extent = reader.GetOutput().GetExtent() center = [np.mean(extent[0:2]), np.mean(extent[2:4]), np.mean(extent[4:6])] seeds = vtk.vtkPointSource() seeds.SetCenter(center) seeds.SetRadius(10.5) seeds.SetNumberOfPoints(100) seeds.Update() streamTracer = vtk.vtkStreamTracer() streamTracer.SetInterpolatorTypeToDataSetPointLocator() streamTracer.SetInputData(reader.GetOutputDataObject(0)) streamTracer.SetSourceData(seeds.GetOutputDataObject(0)) streamTracer.SetIntegratorTypeToRungeKutta45() streamTracer.SetMaximumPropagation(104) streamTracer.SetInitialIntegrationStep(0.2) streamTracer.SetMaximumIntegrationStep(0.5) streamTracer.SetIntegrationDirectionToBoth() streamTracer.SetStartPosition(center) streamTracer.SurfaceStreamlinesOn() streamTracer.Update() print(streamTracer.GetOutputDataObject(0)) ``` The output is: ``` vtkPolyData (0x273ece0) Debug: Off Modified Time: 2638 Reference Count: 2 Registered Events: (none) Information: 0x2ccb540 Data Released: False Global Release Data: Off UpdateTime: 2680 Field Data: Debug: Off Modified Time: 2628 Reference Count: 1 Registered Events: (none) Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Number Of Points: 0 Number Of Cells: 0 Cell Data: Debug: Off Modified Time: 2636 Reference Count: 1 Registered Events: Registered Observers: vtkObserver (0x2ccc370) Event: 33 EventName: ModifiedEvent Command: 0x2ccb880 Priority: 0 Tag: 1 Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 1 ) Pass Through Flags: ( 1 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) EdgeFlag: (none) Point Data: Debug: Off Modified Time: 2638 Reference Count: 1 Registered Events: Registered Observers: vtkObserver (0x2ccc210) Event: 33 EventName: ModifiedEvent Command: 0x2ccb880 Priority: 0 Tag: 1 Number Of Arrays: 0 Number Of Components: 0 Number Of Tuples: 0 Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 ) Interpolate Flags: ( 1 1 1 1 1 0 0 1 ) Pass Through Flags: ( 1 1 1 1 1 1 1 1 ) Scalars: (none) Vectors: (none) Normals: (none) TCoords: (none) Tensors: (none) GlobalIds: (none) PedigreeIds: (none) EdgeFlag: (none) Bounds: Xmin,Xmax: (1, -1) Ymin,Ymax: (1, -1) Zmin,Zmax: (1, -1) Compute Time: 2692 Number Of Points: 0 Point Coordinates: 0 Locator: 0 Number Of Vertices: 0 Number Of Lines: 0 Number Of Polygons: 0 Number Of Triangle Strips: 0 Number Of Pieces: 1 Piece: 0 Ghost Level: 0 ``` And I get an empty vtkPolyData without any streamline in it. Attached please find the testing dataset. Please help me. Thanks, Joey -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 45de41e7.0000000100.vti Type: application/octet-stream Size: 569329 bytes Desc: 45de41e7.0000000100.vti URL: From sankhesh.jhaveri at kitware.com Mon Oct 29 21:19:41 2018 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 29 Oct 2018 21:19:41 -0400 Subject: [vtkusers] Creating a fly through in vtk In-Reply-To: <1540625915077-0.post@n5.nabble.com> References: <1540625915077-0.post@n5.nabble.com> Message-ID: Take a look at vtkInteractorStyleFlight and vtkAnimationScene . ? On Sat, Oct 27, 2018 at 3:38 AM vinmean wrote: > I want to create a smooth 'fly though' like rendering in vtk. I have a 3D > scene and want to create a movie using successive camera poses. Can this be > done in vtk? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://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 meakcey at gmail.com Tue Oct 30 04:05:29 2018 From: meakcey at gmail.com (meakcey) Date: Tue, 30 Oct 2018 01:05:29 -0700 (MST) Subject: [vtkusers] Combine Interactors Message-ID: <1540886729411-0.post@n5.nabble.com> Hi I am trying to create point cloud visualizer and editor and need to combine three functions below: - area picking inherited by rubber band picking interactor - point picking inherited by trackball camera - get to know of rotation given by trackball actor How can I combine these three interactor classes? Thanks. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From abhishekworld at gmail.com Tue Oct 30 05:36:00 2018 From: abhishekworld at gmail.com (Abhishek) Date: Tue, 30 Oct 2018 20:36:00 +1100 Subject: [vtkusers] TubesFromSplines change the tube and line color Message-ID: Hello Everyone, I have modified the TubesFromSplines to set the specific color (blue(0,0,255) to a tube. I have tried setting the color directly to the actore and many other ways but no luck. Can some one please help me out with this? what I am missing here? #include #include #include #include #include #include "QVTKOpenGLWidget.h" #include "vtkPolyLine.h" #include "vtkPoints.h" #include "vtkCellArray.h" #include "vtkPolyData.h" #include "vtkAppendPolyData.h" #include "vtkAlgorithmOutput.h" #include "vtkUnsignedCharArray.h" #include "vtkActor.h" #include "vtkPolyDataMapper.h" #include "vtkParametricSpline.h" #include "vtkParametricFunctionSource.h" #include "vtkTupleInterpolator.h" #include "vtkTubeFilter.h" #include "vtkDoubleArray.h" #include "vtkInteractorStyleTrackballCamera.h" #include "vtkPointData.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkGenericOpenGLRenderWindow.h" #include "vtkAutoInit.h" VTK_MODULE_INIT(vtkRenderingOpenGL2); // VTK was built with vtkRenderingOpenGL2 VTK_MODULE_INIT(vtkInteractionStyle); VTK_MODULE_INIT(vtkRenderingFreeType); double convertToz(double n) { //NewValue = (((OldValue - OldMin) * (NewMax - NewMin)) / (OldMax - OldMin)) + NewMin if(n < 100) { n = 100; } else if(n > 300) { n = 300; } return (((n-0)*(0.06-0.0))/(300-100))+ 0.0; } int main(int argc, char *argv[]){ QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); QApplication a(argc, argv); QColor color(0,0, 255, 50); QVector> positions; QListp1; p1<< 1.0 <<0.0 <<0.0 << 131.162; positions.append(QVector::fromList(p1)); QListp2; p2<< 0.0 <<1.0 <<0.0 << 130.408; positions.append(QVector::fromList(p2)); QListp3; p3<< 3.0 <<1.0 <<0.0 << 131.512; positions.append(QVector::fromList(p3)); QListp4; p4<< 0.0 <<2.0 <<1.0 << 134.464; positions.append(QVector::fromList(p4)); QListp5; p5<< 0.0 <<3.0 <<2.0 << 132.8; positions.append(QVector::fromList(p5)); QListp6; p6<< 1.0 <<2.0 <<3.0 << 129.458; positions.append(QVector::fromList(p6)); vtkSmartPointer points; vtkSmartPointer spline; vtkSmartPointer functionSource; vtkSmartPointer interpolatedRadius; vtkSmartPointer tubeRadius; vtkSmartPointer tubePolyData; vtkSmartPointer tuber; vtkSmartPointer lineMapper; vtkSmartPointer tubeMapper; vtkSmartPointer lineActor; vtkSmartPointer tubeActor; vtkSmartPointer lineColors; QVTKOpenGLWidget* vtkWidget; vtkSmartPointer renderer; vtkSmartPointer renderWindow; vtkSmartPointer rInteractor; vtkSmartPointer style ; lineColors = vtkSmartPointer::New(); lineColors->SetName("Colors"); lineColors->SetNumberOfComponents(4); points = vtkSmartPointer::New(); for(int i=0; i < positions.size(); i++){ points->InsertPoint(i, positions[i][0], positions[i][1], positions[i][2]); float c[4] = { static_cast(color.red()), static_cast(color.green()), static_cast(color.blue()), static_cast(color.alpha()) }; lineColors->InsertNextTuple(c); } // Fit a spline to the points spline = vtkSmartPointer::New(); spline->SetPoints(points); functionSource = vtkSmartPointer::New(); functionSource->SetParametricFunction(spline); functionSource->SetUResolution(10 * points->GetNumberOfPoints()); functionSource->Update(); // Interpolate the scalars interpolatedRadius = vtkSmartPointer ::New(); interpolatedRadius->SetInterpolationTypeToLinear(); interpolatedRadius->SetNumberOfComponents(1); for(int j=0; j < positions.size(); j++){ double rad = convertToz(positions[j][3]); interpolatedRadius->AddTuple(j, &rad); } // Generate the radius scalars tubeRadius = vtkSmartPointer::New(); unsigned int n = functionSource->GetOutput()->GetNumberOfPoints(); tubeRadius->SetNumberOfTuples(n); tubeRadius->SetName("TubeRadius"); double tMin = interpolatedRadius->GetMinimumT(); double tMax = interpolatedRadius->GetMaximumT(); double r; for (unsigned int i = 0; i < n; ++i) { double t = (tMax - tMin) / (n - 1) * i + tMin; interpolatedRadius->InterpolateTuple(t, &r); tubeRadius->SetTuple1(i, r); float c[4] = { static_cast(color.red()), static_cast(color.green()), static_cast(color.blue()), static_cast(color.alpha()) }; lineColors->InsertNextTuple(c); } // Add the scalars to the polydata tubePolyData = vtkSmartPointer::New(); tubePolyData = functionSource->GetOutput(); tubePolyData->GetPointData()->AddArray(tubeRadius); tubePolyData->GetPointData()->SetActiveScalars("TubeRadius"); // set the color array tubePolyData->GetPointData()->AddArray(lineColors); // Create the tubes tuber = vtkSmartPointer::New(); tuber->SetInputData(tubePolyData); tuber->SetNumberOfSides(20); tuber->SetVaryRadiusToVaryRadiusByAbsoluteScalar(); //-------------- // Setup actors and mappers lineMapper = vtkSmartPointer::New(); lineMapper->SetInputData(tubePolyData); // lineMapper->SetScalarRange(tubePolyData->GetScalarRange()); lineMapper->SelectColorArray("Colors"); lineActor = vtkSmartPointer::New(); lineActor->SetMapper(lineMapper); tubeMapper = vtkSmartPointer::New(); tubeMapper->SetInputConnection(tuber->GetOutputPort()); tubeMapper->SetScalarRange(tubePolyData->GetScalarRange()); // Activate the color array tubeMapper->SelectColorArray("Colors"); tubeActor = vtkSmartPointer::New(); tubeActor->SetMapper(tubeMapper); vtkWidget = new QVTKOpenGLWidget; vtkWidget->setMinimumSize(800,600); renderer = vtkSmartPointer::New(); renderWindow = vtkSmartPointer::New(); style = vtkSmartPointer::New(); renderer->AddActor(tubeActor); renderer->AddActor(lineActor); vtkWidget->SetRenderWindow(renderWindow); vtkWidget->GetRenderWindow()->AddRenderer(renderer); vtkWidget->GetInteractor()->SetInteractorStyle(style); QWidget widget; QVBoxLayout* layout = new QVBoxLayout(); layout->addWidget(vtkWidget); widget.setLayout(layout); widget.setMaximumSize(866,600); widget.show(); return a.exec(); } Thanks, -- Abhishek http://zeroth.me -------------- next part -------------- An HTML attachment was scrubbed... URL: From allison.vacanti at kitware.com Tue Oct 30 09:42:19 2018 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Tue, 30 Oct 2018 09:42:19 -0400 Subject: [vtkusers] How's the Projection Transform Matrix computed in VTK? and Generate Cloud Point From Depth Map Image In-Reply-To: <1539965117896-0.post@n5.nabble.com> References: <1539744554235-0.post@n5.nabble.com> <1539965117896-0.post@n5.nabble.com> Message-ID: Depending on settings, there are a few ways it can be computed. vtkCamera::ComputeProjectionTransform is the starting point for tracking down the specifics: https://github.com/Kitware/VTK/blob/master/Rendering/Core/vtkCamera.cxx#L1035-L1127 HTH, Allie On Fri, Oct 19, 2018 at 12:05 PM maskjp wrote: > I figure out the problem. When I use the vtkBMPReader, the output of this > class is a 3 channel vtkImageData, but the vtkDepthImageToPointCloud only > receive a 1 channel depth image. So We need to use > vtkImageExtractComponents > to get the first channel of the vtkBMPReader output. > > But I still don't understand how vtk compute projection transform matrix. > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bitminer at gmail.com Tue Oct 30 17:19:46 2018 From: bitminer at gmail.com (Brian Davis) Date: Tue, 30 Oct 2018 16:19:46 -0500 Subject: [vtkusers] (no subject) Message-ID: At https://www.vtk.org/doc/nightly/html/classvtkDecimatePolylineFilter.html#details States WarningThis algorithm is a very simple implementation that overlooks some potential complexities. For example, if a vertex is multiply connected, meaning that it is used by multiple distinct polylines, then the extra topological constraints are ignored. This can produce less than optimal results. Is above warning code for "crash at following lines" void Remove(vtkIdType vertexIdx) { this->Size--; (*(this->Vertices[vertexIdx].prev)).next = this->Vertices[vertexIdx].next; (*(this->Vertices[vertexIdx].next)).prev = this->Vertices[vertexIdx].prev; } in vtkDecimatePolylineFilter.cxx class vtkDecimatePolylineFilter::Polyline ? I have multiple distinct polylines housed in vtkPolyData. I can seem to do batch mode operations, *not that this documented anywhere mind you*, with vtkParametricFunctionSource for splines and vtkSmoothPolyDataFilter for smoothing.... decimation errr not so much. The goal which seems to work for some vtk classes ( vtkParametricFunctionSource and vtkSmoothPolyDataFilter ) but not for others (vtkDecimatePolylineFilter) is to house a network of lines connected in a graph, but not a simple graph node to node, which do not represent some geometry say like a circle or polygon, but rather a network of paths and nodes. Goal was to put in pipeline with optional decimation, smoothing or spline, but then goes the crash at decimation. Just what are those "potential complexities" and the bit about overlooking say like bad memory access. next has a pointer, but prev pointer not so much (NULL). Hey what about overlooking error checking and null pointers. Clearly it seems to be overlooking that. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bitminer at gmail.com Tue Oct 30 17:30:01 2018 From: bitminer at gmail.com (Brian Davis) Date: Tue, 30 Oct 2018 16:30:01 -0500 Subject: [vtkusers] Is "Warning" ... "code" for "hey this is bound to crash on you in" vtkSmoothPolyDataFilter doc? Message-ID: At https://www.vtk.org/doc/nightly/html/classvtkDecimatePolylineFilter.html#details States WarningThis algorithm is a very simple implementation that overlooks some potential complexities. For example, if a vertex is multiply connected, meaning that it is used by multiple distinct polylines, then the extra topological constraints are ignored. This can produce less than optimal results. Is above warning code for "crash at following lines" void Remove(vtkIdType vertexIdx) { this->Size--; (*(this->Vertices[vertexIdx].prev)).next = this->Vertices[vertexIdx].next; (*(this->Vertices[vertexIdx].next)).prev = this->Vertices[vertexIdx].prev; } in vtkDecimatePolylineFilter.cxx class vtkDecimatePolylineFilter::Polyline ? I have multiple distinct polylines housed in vtkPolyData. I can seem to do batch mode operations, *not that this documented anywhere mind you*, with vtkParametricFunctionSource for splines and vtkSmoothPolyDataFilter for smoothing.... decimation errr not so much. The goal which seems to work for some vtk classes ( vtkParametricFunctionSource and vtkSmoothPolyDataFilter ) but not for others (vtkDecimatePolylineFilter) is to house a network of lines connected in a graph, but not a simple graph node to node, which do not represent some geometry say like a circle or polygon, but rather a network of paths and nodes. Goal was to put in pipeline with optional decimation, smoothing or spline, but then goes the crash at decimation. Just what are those "potential complexities" and the bit about overlooking say like bad memory access. next has a pointer, but prev pointer not so much (NULL). Hey what about overlooking error checking and null pointers. Clearly it seems to be overlooking that. apologies for repost of "(no subject)" this one has a titile. -------------- next part -------------- An HTML attachment was scrubbed... URL: From meakcey at gmail.com Wed Oct 31 10:20:48 2018 From: meakcey at gmail.com (meakcey) Date: Wed, 31 Oct 2018 07:20:48 -0700 (MST) Subject: [vtkusers] Point Smoothing Message-ID: <1540995648660-0.post@n5.nabble.com> Hi I am working on a point cloud renderer with Qt which OpenGLWidget has been promoted as custom class and all VTK related codes are included. That seems working stable. When I rendered point cloud, they seems as square and so I tried to apply GetRenderWindow()->PointSmoothingOn(); in the beginning of the load events. Points seems as circle till I resize or move the window. How can I keep them always circle? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From gouasmia at umich.edu Wed Oct 31 16:41:27 2018 From: gouasmia at umich.edu (aygo) Date: Wed, 31 Oct 2018 13:41:27 -0700 (MST) Subject: [vtkusers] Writing a pvts file properly Message-ID: <1541018487717-0.post@n5.nabble.com> Hi all, I'm trying to understand how to write a .pvts file properly. I have 50x50x50 point data on a cubic, uniform grid. The data is split into four different processors, each having a slice (in the z direction) of the grid point positions and point values (pressure, velocity, density). There is no overlap between the datasets of each processor. I can write .vts files using the vtk library just fine. Paraview reads each one of them just fine. The vts file of the first processor "output_0.vts" looks like this: now I'd like to write the corresponding pvts file. What I have so far is the following: When I open this in paraview I get the error message: "vtkXMLPStructuredGridReader (0x896d9c0): No available piece provides data for the following extents: 0 49 0 49 11 12 0 49 0 49 23 24 0 49 0 49 35 36 The UpdateExtent cannot be filled." It's basically complaining that I don't provide data for the extents separating the pieces... Do I have to or is there some modification to the file I can make so that it works out? The data from two neighboring processors do not overlap (is that a crime for paraview/vtk?) but the points values at the boundary are one Mesh_spacing away from each other. Best -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html