From kavyajain4 at gmail.com Mon Nov 2 01:34:44 2015 From: kavyajain4 at gmail.com (kavya) Date: Sun, 1 Nov 2015 23:34:44 -0700 (MST) Subject: [vtkusers] VTK multithread example Message-ID: <1446446084536-5734759.post@n5.nabble.com> Hi, I am new into VTK, finding it hard to figure out how to implement thread safe callback. Could you provide any VTK example or code snippet? Specifically any example code showing use of vtkmutex lock. Regards, Kavya -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-multithread-example-tp5734759.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Mon Nov 2 08:02:32 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 2 Nov 2015 08:02:32 -0500 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Hi Simon, I found the reason behind the appeared performance you were getting. We have this code in volume rendering that when you interact changes the sampling distance and in the newer code we were too conservative compare to the last version. That's why you were getting better quality when you move your mouse but lower frame rates. I pushed a branch in VTK to address the issue. Would it be possible for you to build Paraview with VTK master? It may take 3-4 days or longer for Paraview's VTK to get updated. Thanks, Aashish On Wed, Oct 28, 2015 at 11:59 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Hi Simon, > > I am just finishing up a ParaView5 related parallel volume rendering bug > (pushing a branch today to VTK). This is next on my list. > > - Aashish > > On Wed, Oct 28, 2015 at 11:57 AM, Simon ESNEAULT > wrote: > >> Hello Aashish >> >> Did you get a chance to try to load the dataset on Windows ? >> Can I do anything to help you investigate ? Should I feel a bug, that may >> act as a reminder ? >> Have a nice day >> Simon >> >> >> 2015-10-27 18:26 GMT+01:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> >>> Thanks Simon. This is really strange since we are not seeing it on Mac >>> and Linux (but both has dedicated cards). >>> >>> I will look into it soon. >>> >>> - aashish >>> >>> On Tue, Oct 27, 2015 at 1:03 PM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> Ok, thank you very much fort digging into this. >>>> I've done some test and I believe I can see a similar slowdown >>>> happening on OSX, with a MacBook pro retina 13" from 2013, Intel Iris 5100 >>>> graphics. >>>> Good luck in the investigation, I you need more details, do not >>>> hesitate to ask >>>> Simon >>>> >>>> 2015-10-27 17:37 GMT+01:00 Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com>: >>>> >>>>> Ah, thanks. I will get back to you on this since on Linux I don't any >>>>> issue so it has to be Windows specific thing. >>>>> >>>>> - Aashish >>>>> >>>>> On Tue, Oct 27, 2015 at 10:36 AM, Simon ESNEAULT < >>>>> simon.esneault at gmail.com> wrote: >>>>> >>>>>> I tried with that one from yesterday and today's version >>>>>> (4.4.0-209-gc399648) >>>>>> >>>>>> Thanks, >>>>>> Simon >>>>>> >>>>>> 2015-10-27 15:19 GMT+01:00 Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com>: >>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> And when did you download this version? ParaView-latest-Qt4-OpenGL2- >>>>>>> Windows-64bit.exe >>>>>>> >>>>>>> Thanks, >>>>>>> Aashish >>>>>>> >>>>>>> On Tue, Oct 27, 2015 at 10:17 AM, Simon ESNEAULT < >>>>>>> simon.esneault at gmail.com> wrote: >>>>>>> >>>>>>>> Yes, I tried with and without the shading. Without shading enabled, >>>>>>>> the new Opengl2 is also slower when zoomed in (in the described condition). >>>>>>>> With shading enabled, the difference in speed between the two version seems >>>>>>>> even bigger. >>>>>>>> I got the version from the nightly build download section of >>>>>>>> paraview website (it is still available). And I've just tried with that one >>>>>>>> labeled "ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe" with the same >>>>>>>> results. >>>>>>>> >>>>>>>> About the FPS, it is difficult to give an exact number, because it >>>>>>>> depends of the condition (zoomed or not etc...) but yes, this is the idea. >>>>>>>> In our software, I've exposed the frame rate using this example : >>>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/FrameRate >>>>>>>> And the frame rate is around 15/20 for the first backend, and >>>>>>>> around 6/8 for the new backend, on the same dataset (the one provided for >>>>>>>> example), with the same mapper parameters >>>>>>>> >>>>>>>> Thanks >>>>>>>> Simon >>>>>>>> >>>>>>>> >>>>>>>> 2015-10-27 14:48 GMT+01:00 Aashish Chaudhary < >>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>> >>>>>>>>> Hi Simon, >>>>>>>>> >>>>>>>>> This is helpful but just missing few more bits: >>>>>>>>> >>>>>>>>> 1) Did you try without the shading and see how the performance >>>>>>>>> compares? >>>>>>>>> >>>>>>>>> 2) ParaView 4.4.0-193-gec96423 --> Where did you get this one >>>>>>>>> from (ParaView download page or did you built yourself?) >>>>>>>>> >>>>>>>>> Also, so on your system the old mapper is running 30FPS and the >>>>>>>>> new one at 15-20 FPS as per your summary. >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> - Aashish >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT < >>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Hello Aashish, >>>>>>>>>> >>>>>>>>>> Sorry for the late answer, I was busy this morning. >>>>>>>>>> Thanks for testing with the DataSet. >>>>>>>>>> I agree the performance is still quite good with the new backend, >>>>>>>>>> and I also get something like 15/20 fps on windows on an HD screen. But >>>>>>>>>> when compared to the old one, and in some condition (when zoomed >>>>>>>>>> especially), it looks really slower to me >>>>>>>>>> The two tested version are : >>>>>>>>>> - ParaView 4.4.0 64 bits final version for the old backend >>>>>>>>>> - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 backend. >>>>>>>>>> on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and Nvidia >>>>>>>>>> Quadro K420 >>>>>>>>>> >>>>>>>>>> To highlight the difference, here is what I do : >>>>>>>>>> - Launch both version on the same computer at the same time >>>>>>>>>> - Load the above dataset on each >>>>>>>>>> - Select volume rendering >>>>>>>>>> - Adjust the transfer function data range to [100-750] (the >>>>>>>>>> default "Cool to Warm" is fine) >>>>>>>>>> - Set the view direction to +Y >>>>>>>>>> - Adjust the Y of the camera position to -300 >>>>>>>>>> >>>>>>>>>> And start interacting ... >>>>>>>>>> Dunno if there is an easy way to print out the Frame Rate in >>>>>>>>>> Paraview, but the new version seems really twice slower in these >>>>>>>>>> conditions... We can see it does not scale in the same way, the old backend >>>>>>>>>> seems more aggressive on the image sample reduction, hence the >>>>>>>>>> interactivity is better. >>>>>>>>>> Shading enable or not does not change much >>>>>>>>>> >>>>>>>>>> I'm aware of the DesiredUpdateRate thing, we use to play with >>>>>>>>>> this with the old backend to fine tune the interactivity, although what's >>>>>>>>>> really inside was never clear to me >>>>>>>>>> >>>>>>>>>> I hope that there is enough information for you to reproduce >>>>>>>>>> this, do not hesitate to ask for some more information. >>>>>>>>>> >>>>>>>>>> Thanks a lot for your help >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < >>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>> >>>>>>>>>>> Dear Simon, >>>>>>>>>>> >>>>>>>>>>> Checking again. Wondering if you can provide some more detail on >>>>>>>>>>> the binary you are using and whether or not without shading the rendering >>>>>>>>>>> performance comparable to older version. >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Simon, >>>>>>>>>>>> >>>>>>>>>>>> I used your dataset on paraview master as of today on my Linux >>>>>>>>>>>> box running Ubuntu 14.04 and NVIDA Quadro card and I am getting about 15-20 >>>>>>>>>>>> FPS with shading on with 1920x1080 resolution. >>>>>>>>>>>> >>>>>>>>>>>> Are you on the proper 4.4 or using RC1/RC2? I checked the >>>>>>>>>>>> shading performance fix was in 4.4 but not in RC's. I don't have access to >>>>>>>>>>>> Windows box right away but I will try there too. >>>>>>>>>>>> >>>>>>>>>>>> NOTE: You might get multiple emails because of the attachment >>>>>>>>>>>> size issue. Sorry about that. >>>>>>>>>>>> >>>>>>>>>>>> Thanks, >>>>>>>>>>>> >>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks for the quick answer >>>>>>>>>>>>>> We are using a vtkImageData, 512x512x591 with short element >>>>>>>>>>>>>> (you can find the dataset here : >>>>>>>>>>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). So I >>>>>>>>>>>>>> think it's all about GPU volume raycast mapper. >>>>>>>>>>>>>> The new mapper does bring low resolution, but when compared >>>>>>>>>>>>>> to the old one, it seems less "low resolution" during interaction than the >>>>>>>>>>>>>> old one >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Right, so that's why its not a exact comparison. What happens >>>>>>>>>>>>> is that depending on what is interactive, (you can set the desired update >>>>>>>>>>>>> rate in VTK, not exposed in ParaView I believe), it will do interactive >>>>>>>>>>>>> but with higher resolution (smaller sample distance). If they both have >>>>>>>>>>>>> the same sample distance, then the new mapper should out perform the old >>>>>>>>>>>>> one, however, there is another thing we need to consider here which is >>>>>>>>>>>>> shading. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>>> Shading is enabled, gradient opacity disabled >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Can you disable the shading and see if now they both (opengl1 >>>>>>>>>>>>> and 2) equally better? We already pushed a fix for it but not sure if that >>>>>>>>>>>>> you have in your build. >>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Don't know if you need a minimal example, but I believe the >>>>>>>>>>>>>> GPURenderDemo used with this dataset is enough to highlight the slow down. >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Yes, I will use this dataset. Thanks. >>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Also, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Do you have shading enabled? We fixed a bug with shading >>>>>>>>>>>>>>> that was causing the slow performance a while back. I don't remember if >>>>>>>>>>>>>>> that was included in 4.4 or not ( I can check ). >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> What kind of dataset you are using? Depending on the data >>>>>>>>>>>>>>>> type you might be using >>>>>>>>>>>>>>>> the GPU one or the unstructured renderer. The performance >>>>>>>>>>>>>>>> we measured is related to the GPU ray cast mapper >>>>>>>>>>>>>>>> and will apply only to the vtkImageData inputs. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Also, helpful would be is if you can tell if the new mapper >>>>>>>>>>>>>>>> is bringing low resolution when you interact with the volume (and whether >>>>>>>>>>>>>>>> or not it happens with old mapper). >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> We are trying to make the switch to the new OpenGL2 >>>>>>>>>>>>>>>>> backend for our application, and although the switch was easy (thanks for >>>>>>>>>>>>>>>>> not breaking the API ;) ), we can see a significant slowdown on the GPU >>>>>>>>>>>>>>>>> volume rendering part, especially during interaction. Typically we dropped >>>>>>>>>>>>>>>>> from 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), >>>>>>>>>>>>>>>>> with the same code around. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> This slow down can be seen in ParaView, if you compare the >>>>>>>>>>>>>>>>> latest 4.4 OpenGL2 build with the classic 4.4 build while volume rendering >>>>>>>>>>>>>>>>> a big enough volume (512^3) >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> The blog post here >>>>>>>>>>>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>>>>>>>>>>> claims that the new GPU volume rendering implementation >>>>>>>>>>>>>>>>> should be faster than the old one, is there some more detailed explanation >>>>>>>>>>>>>>>>> somewhere ? Are there some important parameters that can make the >>>>>>>>>>>>>>>>> difference ? >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> PS : The polygonal rendering seems a lot faster with the >>>>>>>>>>>>>>>>> new backend ! >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>> * >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>> Inc. * >>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>> * >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>>> * >>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>> * >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>> * >>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>> * >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> Simon Esneault >>>>>>>>>> Rennes, France >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>> * >>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>> * >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> Simon Esneault >>>>>>>> Rennes, France >>>>>>>> ------------------------------------------------------------------ >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Mon Nov 2 09:39:00 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Mon, 2 Nov 2015 07:39:00 -0700 (MST) Subject: [vtkusers] Smart pointers and Android Message-ID: <1446475140758-5734762.post@n5.nabble.com> Hello all, Not running into an issue or anything but I have a question on the use of Smart pointers with vtk for android. While looking at the code for all the examples on Android, I noticed that vtkSmartPointer<> are not used at all in the examples. Is there any particular reason for that? I kind of got used to using them now and I was wondering if their use might lead to some issues or not? I just tried to re-implement one example using only smartpointers and I'm not running into any issue so far but I was wondering if that was a good idea or not. As usual I also posted on stack overflow this exact same question so that people can get the extra rep if they want :). You can find the post here -- View this message in context: http://vtk.1045678.n5.nabble.com/Smart-pointers-and-Android-tp5734762.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Mon Nov 2 09:58:39 2015 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 2 Nov 2015 09:58:39 -0500 Subject: [vtkusers] Smart pointers and Android In-Reply-To: <1446475140758-5734762.post@n5.nabble.com> References: <1446475140758-5734762.post@n5.nabble.com> Message-ID: <45112487efece862f30b85228b160d34@mail.gmail.com> Using vtkNew or vtkSmartPointer should be fine with Android. - Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Lonni Besan?on Sent: Monday, November 2, 2015 9:39 AM To: vtkusers at vtk.org Subject: [vtkusers] Smart pointers and Android Hello all, Not running into an issue or anything but I have a question on the use of Smart pointers with vtk for android. While looking at the code for all the examples on Android, I noticed that vtkSmartPointer<> are not used at all in the examples. Is there any particular reason for that? I kind of got used to using them now and I was wondering if their use might lead to some issues or not? I just tried to re-implement one example using only smartpointers and I'm not running into any issue so far but I was wondering if that was a good idea or not. As usual I also posted on stack overflow this exact same question so that people can get the extra rep if they want :). You can find the post here -- View this message in context: http://vtk.1045678.n5.nabble.com/Smart-pointers-and-Android-tp5734762.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From lonni.besancon at gmail.com Mon Nov 2 10:02:36 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Mon, 2 Nov 2015 08:02:36 -0700 (MST) Subject: [vtkusers] Smart pointers and Android In-Reply-To: <45112487efece862f30b85228b160d34@mail.gmail.com> References: <1446475140758-5734762.post@n5.nabble.com> <45112487efece862f30b85228b160d34@mail.gmail.com> Message-ID: <1446476556659-5734764.post@n5.nabble.com> Alright thanks. As usual, if you want to get the rep on SO feel free to copy-paste there. Or I'll do it myself if you don't want to :) -- View this message in context: http://vtk.1045678.n5.nabble.com/Smart-pointers-and-Android-tp5734762p5734764.html Sent from the VTK - Users mailing list archive at Nabble.com. From marcus.hanwell at kitware.com Mon Nov 2 10:10:51 2015 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Mon, 2 Nov 2015 10:10:51 -0500 Subject: [vtkusers] Smart pointers and Android In-Reply-To: <1446476556659-5734764.post@n5.nabble.com> References: <1446475140758-5734762.post@n5.nabble.com> <45112487efece862f30b85228b160d34@mail.gmail.com> <1446476556659-5734764.post@n5.nabble.com> Message-ID: On Mon, Nov 2, 2015 at 10:02 AM, Lonni Besan?on wrote: > Alright thanks. > > As usual, if you want to get the rep on SO feel free to copy-paste there. Or > I'll do it myself if you don't want to :) > I added a brief summary of my thoughts, and a link to an old article discussing our smart pointer classes. You seem to have someone who wants to discuss ownership semantics on there too, answer downvoted within seconds ;-) Marcus From lonni.besancon at gmail.com Mon Nov 2 10:13:59 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Mon, 2 Nov 2015 08:13:59 -0700 (MST) Subject: [vtkusers] Smart pointers and Android In-Reply-To: References: <1446475140758-5734762.post@n5.nabble.com> <45112487efece862f30b85228b160d34@mail.gmail.com> <1446476556659-5734764.post@n5.nabble.com> Message-ID: <1446477239389-5734766.post@n5.nabble.com> Yes I know, that's why I up-voted you too. To compensate for that. And I marked as accepted :). Ownership was not at all part of my question but whatever, sometimes people are tiring on SO (even though community as a whole is very helpful) -- View this message in context: http://vtk.1045678.n5.nabble.com/Smart-pointers-and-Android-tp5734762p5734766.html Sent from the VTK - Users mailing list archive at Nabble.com. From marcus.hanwell at kitware.com Mon Nov 2 10:21:42 2015 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Mon, 2 Nov 2015 10:21:42 -0500 Subject: [vtkusers] Smart pointers and Android In-Reply-To: <1446477239389-5734766.post@n5.nabble.com> References: <1446475140758-5734762.post@n5.nabble.com> <45112487efece862f30b85228b160d34@mail.gmail.com> <1446476556659-5734764.post@n5.nabble.com> <1446477239389-5734766.post@n5.nabble.com> Message-ID: On Mon, Nov 2, 2015 at 10:13 AM, Lonni Besan?on wrote: > Yes I know, that's why I up-voted you too. To compensate for that. And I > marked as accepted :). > Ownership was not at all part of my question but whatever, sometimes people > are tiring on SO (even though community as a whole is very helpful) > No worries, I am not too concerned with SO reputation points but hopefully it makes the pointer situation clearer. I added the third type (vtkNew), and wrote the summary article to try and make it clear why a third was necessary and which was most appropriate in each case. Marcus From lonni.besancon at gmail.com Mon Nov 2 10:23:22 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Mon, 2 Nov 2015 08:23:22 -0700 (MST) Subject: [vtkusers] Smart pointers and Android In-Reply-To: References: <1446475140758-5734762.post@n5.nabble.com> <45112487efece862f30b85228b160d34@mail.gmail.com> <1446476556659-5734764.post@n5.nabble.com> <1446477239389-5734766.post@n5.nabble.com> Message-ID: <1446477802145-5734768.post@n5.nabble.com> Great. Thanks again for the answer :) -- View this message in context: http://vtk.1045678.n5.nabble.com/Smart-pointers-and-Android-tp5734762p5734768.html Sent from the VTK - Users mailing list archive at Nabble.com. From ben.boeckel at kitware.com Mon Nov 2 11:27:29 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 2 Nov 2015 11:27:29 -0500 Subject: [vtkusers] Invalid pixel format, no OpenGL support In-Reply-To: References: <1446049356979-5734668.post@n5.nabble.com> <1446134290586-5734684.post@n5.nabble.com> Message-ID: <20151102162725.GA26333@megas.khq.kitware.com> On Thu, Oct 29, 2015 at 12:05:38 -0400, Shawn Waldon wrote: > > > > Problem solved by using QVTKWidget2 instead of QVTKWidget. > > > > I'm glad you were able to solve your problem. The solution is probably a > good thing as QVTKWidget is deprecated in favor of QVTKWidget2 in the > master branch of VTK. Well, it isn't in master yet, but that is its future. --Ben From ben.boeckel at kitware.com Mon Nov 2 11:28:40 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Mon, 2 Nov 2015 11:28:40 -0500 Subject: [vtkusers] Opengl2 and Qt5.5 In-Reply-To: <9327C7DA-8031-4377-94C5-943C78EC9F83@me.com> References: <9327C7DA-8031-4377-94C5-943C78EC9F83@me.com> Message-ID: <20151102162840.GB26333@megas.khq.kitware.com> On Thu, Oct 29, 2015 at 18:16:10 -0400, Richard Frank wrote: > Does one need to turn on Module_vtkGUISupportQtOpenGL on or off with > the OpenGL2 options on? It is (should be) agnostic to the rendering backend, so it can work either on or off. --Ben From dave.demarle at kitware.com Mon Nov 2 17:50:05 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 2 Nov 2015 17:50:05 -0500 Subject: [vtkusers] Set vertex normals ? In-Reply-To: <1445668376931-5734546.post@n5.nabble.com> References: <1445535172487-5734525.post@n5.nabble.com> <1445668376931-5734546.post@n5.nabble.com> Message-ID: Took me a minute to find it. On Sat, Oct 24, 2015 at 2:32 AM, Ronald Levine wrote: > normals.SetNumberOfComponents(3) > normals.SetNumberOfTuples(4) > Normals looks something like this at this point . [0,0,0] [0,0,0] [0,0,0] [0,0,0] normals.InsertNextTuple3(0.,0.,1.) > normals.InsertNextTuple3(0.,0.,1.) > normals.InsertNextTuple3(0.,0.,1.) > normals.InsertNextTuple3(0.,0.,1.) > now it looks like this [0,0,0] [0,0,0] [0,0,0] [0,0,0] > [0,0,1] [0,0,1] [0,0,1] [0,0,1] Thus the mapper never saw what you wanted it too. To fix, take the SetNumberOfTuples() call out and use keep letting InsertNext append to the initially empty array, or better yet keep SetNumberOfTuples and then use SetTuple3(idx, vx,vy,vz) for faster non-checked inserts. David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From henry.blanco at cbiomed.cu Mon Nov 2 18:10:48 2015 From: henry.blanco at cbiomed.cu (Henry Blanco) Date: Mon, 02 Nov 2015 18:10:48 -0500 Subject: [vtkusers] help for rendering a large amount of images Message-ID: <1446505848.5730.6.camel@cohiba> Hello guys, I need some hints on how to render a large amount of images (e.g., thousands of images) using just few RAM resources (e.g., 128 MB) using the vtkImageReslice class for the whole volume. Thanks in advance Henry From david.gobbi at gmail.com Mon Nov 2 19:29:51 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 2 Nov 2015 17:29:51 -0700 Subject: [vtkusers] help for rendering a large amount of images In-Reply-To: <1446505848.5730.6.camel@cohiba> References: <1446505848.5730.6.camel@cohiba> Message-ID: What kind of views will you need? Do you just have to view the original slices? If so, then the VTK pipeline's streaming will make the job easy. If you need orthogonal or oblique views, things are more difficult. Also, how is the data stored on disk? If the whole volume is stored on disk as a single flat file, then you can memory map the file. - David On Mon, Nov 2, 2015 at 4:10 PM, Henry Blanco wrote: > Hello guys, I need some hints on how to render a large amount of images > (e.g., thousands of images) using just few RAM resources (e.g., 128 MB) > using the vtkImageReslice class for the whole volume. > > Thanks in advance > > Henry > -------------- next part -------------- An HTML attachment was scrubbed... URL: From romain.leguay at gmail.com Tue Nov 3 04:09:32 2015 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Tue, 3 Nov 2015 10:09:32 +0100 Subject: [vtkusers] Weird Bounds after vtkCutter Message-ID: Hello everyone, I applied the filter vtkCutter to a mesh and I want to get the bounds of the result contours. The bounds of the mesh seem goods. When I display the vtkCutter output result, I see the expected result but I obtained those bound values: xmin = ymin = zmin = 1.0, and xmax = ymax = zmax = -1.0. I don't understand what I did wrong in my code: // Create a plane of the current Y-axis vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetOrigin(0,0,0); plane->SetNormal(0,1,0); // Cut the mesh -> contours creation vtkSmartPointer cutter = vtkSmartPointer::New(); cutter->SetCutFunction(plane); cutter->SetInputConnection(readerOBJ->GetOutputPort()); cutter->Update(); double boundsCutter[6]; cutter->GetOutput()->GetBounds(boundsCutter); // [1.0, -1.0, 1.0, -1.0, 1.0, -1.0] Do I need to do another update? Thank you, Romain -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Nov 3 08:47:10 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 3 Nov 2015 08:47:10 -0500 Subject: [vtkusers] Weird Bounds after vtkCutter In-Reply-To: References: Message-ID: Romain, I don't see anything wrong with the code you posted. Could you post a complete example that can be compiled and tested and which shows your problem? I tried using your cutter code with a vtkSphereSource instead of an OBJ reader and it seemed to work fine. Thanks, Cory On Tue, Nov 3, 2015 at 4:09 AM, Romain LEGUAY wrote: > Hello everyone, > > I applied the filter vtkCutter to a mesh and I want to get the bounds of > the result contours. > > The bounds of the mesh seem goods. > > When I display the vtkCutter output result, I see the expected result but > I obtained those bound values: xmin = ymin = zmin = 1.0, and xmax = ymax = > zmax = -1.0. > > I don't understand what I did wrong in my code: > > // Create a plane of the current Y-axis > vtkSmartPointer plane = vtkSmartPointer::New(); > plane->SetOrigin(0,0,0); > plane->SetNormal(0,1,0); > // Cut the mesh -> contours creation > vtkSmartPointer cutter = vtkSmartPointer::New(); > cutter->SetCutFunction(plane); > cutter->SetInputConnection(readerOBJ->GetOutputPort()); > cutter->Update(); > > double boundsCutter[6]; > cutter->GetOutput()->GetBounds(boundsCutter); // [1.0, -1.0, 1.0, -1.0, > 1.0, -1.0] > > > Do I need to do another update? > > Thank you, > > Romain > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From romain.leguay at gmail.com Tue Nov 3 09:11:46 2015 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Tue, 3 Nov 2015 15:11:46 +0100 Subject: [vtkusers] Weird Bounds after vtkCutter In-Reply-To: References: Message-ID: Thank you Cory for your answer. I attach my code with the CMake file. Maybe my first cut on my mesh does nothing because on other cut, the bound values seems quite good. In this code, I first use vtkCutter then vtkContourTriangular but I have the same result (the first cut give me some weird bounds). Thanks again! Romain 2015-11-03 14:47 GMT+01:00 Cory Quammen : > Romain, > > I don't see anything wrong with the code you posted. Could you post a > complete example that can be compiled and tested and which shows your > problem? > > I tried using your cutter code with a vtkSphereSource instead of an OBJ > reader and it seemed to work fine. > > Thanks, > Cory > > On Tue, Nov 3, 2015 at 4:09 AM, Romain LEGUAY > wrote: > >> Hello everyone, >> >> I applied the filter vtkCutter to a mesh and I want to get the bounds of >> the result contours. >> >> The bounds of the mesh seem goods. >> >> When I display the vtkCutter output result, I see the expected result but >> I obtained those bound values: xmin = ymin = zmin = 1.0, and xmax = ymax = >> zmax = -1.0. >> >> I don't understand what I did wrong in my code: >> >> // Create a plane of the current Y-axis >> vtkSmartPointer plane = vtkSmartPointer::New(); >> plane->SetOrigin(0,0,0); >> plane->SetNormal(0,1,0); >> // Cut the mesh -> contours creation >> vtkSmartPointer cutter = vtkSmartPointer::New(); >> cutter->SetCutFunction(plane); >> cutter->SetInputConnection(readerOBJ->GetOutputPort()); >> cutter->Update(); >> >> double boundsCutter[6]; >> cutter->GetOutput()->GetBounds(boundsCutter); // [1.0, -1.0, 1.0, -1.0, >> 1.0, -1.0] >> >> >> Do I need to do another update? >> >> Thank you, >> >> Romain >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- cmake_minimum_required(VERSION 2.8) PROJECT(ContourTriangular) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(ContourTriangular MACOSX_BUNDLE ContourTriangular) if(VTK_LIBRARIES) target_link_libraries(ContourTriangular ${VTK_LIBRARIES}) else() target_link_libraries(ContourTriangular vtkHybrid vtkWidgets) endif() -------------- next part -------------- A non-text attachment was scrubbed... Name: ContourTriangular.cpp Type: text/x-c++src Size: 3994 bytes Desc: not available URL: From cory.quammen at kitware.com Tue Nov 3 09:33:23 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 3 Nov 2015 09:33:23 -0500 Subject: [vtkusers] Weird Bounds after vtkCutter In-Reply-To: References: Message-ID: On Tue, Nov 3, 2015 at 9:11 AM, Romain LEGUAY wrote: > Thank you Cory for your answer. > > I attach my code with the CMake file. Maybe my first cut on my mesh does > nothing because on other cut, the bound values seems quite good. > Yeah. The first plane cuts on the very edge of the object, yielding 0 cells and 0 points. I tested this with your code on the armadillo.obj file that you can find with some Googling. Since there are no points, the bounds are left in their default invalid state. HTH, Cory > In this code, I first use vtkCutter then vtkContourTriangular but I have > the same result (the first cut give me some weird bounds). > > Thanks again! > > Romain > > > 2015-11-03 14:47 GMT+01:00 Cory Quammen : > >> Romain, >> >> I don't see anything wrong with the code you posted. Could you post a >> complete example that can be compiled and tested and which shows your >> problem? >> >> I tried using your cutter code with a vtkSphereSource instead of an OBJ >> reader and it seemed to work fine. >> >> Thanks, >> Cory >> >> On Tue, Nov 3, 2015 at 4:09 AM, Romain LEGUAY >> wrote: >> >>> Hello everyone, >>> >>> I applied the filter vtkCutter to a mesh and I want to get the bounds of >>> the result contours. >>> >>> The bounds of the mesh seem goods. >>> >>> When I display the vtkCutter output result, I see the expected result >>> but I obtained those bound values: xmin = ymin = zmin = 1.0, and xmax = >>> ymax = zmax = -1.0. >>> >>> I don't understand what I did wrong in my code: >>> >>> // Create a plane of the current Y-axis >>> vtkSmartPointer plane = vtkSmartPointer::New(); >>> plane->SetOrigin(0,0,0); >>> plane->SetNormal(0,1,0); >>> // Cut the mesh -> contours creation >>> vtkSmartPointer cutter = vtkSmartPointer::New(); >>> cutter->SetCutFunction(plane); >>> cutter->SetInputConnection(readerOBJ->GetOutputPort()); >>> cutter->Update(); >>> >>> double boundsCutter[6]; >>> cutter->GetOutput()->GetBounds(boundsCutter); // [1.0, -1.0, 1.0, -1.0, >>> 1.0, -1.0] >>> >>> >>> Do I need to do another update? >>> >>> Thank you, >>> >>> Romain >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From romain.leguay at gmail.com Tue Nov 3 09:45:02 2015 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Tue, 3 Nov 2015 15:45:02 +0100 Subject: [vtkusers] Solved - Weird Bounds after vtkCutter Message-ID: I tested on armadillo.obj too so this result is normal. Thanks again! Romain PS: I have another question about saving the ouput polydata result (from vtkContourTriangulator) inside a picture file (PNG for example) but I'm going to open a new discussion. 2015-11-03 15:33 GMT+01:00 Cory Quammen : > > > On Tue, Nov 3, 2015 at 9:11 AM, Romain LEGUAY > wrote: > >> Thank you Cory for your answer. >> >> I attach my code with the CMake file. Maybe my first cut on my mesh does >> nothing because on other cut, the bound values seems quite good. >> > > Yeah. The first plane cuts on the very edge of the object, yielding 0 > cells and 0 points. I tested this with your code on the armadillo.obj file > that you can find with some Googling. Since there are no points, the bounds > are left in their default invalid state. > > HTH, > Cory > > >> In this code, I first use vtkCutter then vtkContourTriangular but I have >> the same result (the first cut give me some weird bounds). >> >> Thanks again! >> >> Romain >> >> >> 2015-11-03 14:47 GMT+01:00 Cory Quammen : >> >>> Romain, >>> >>> I don't see anything wrong with the code you posted. Could you post a >>> complete example that can be compiled and tested and which shows your >>> problem? >>> >>> I tried using your cutter code with a vtkSphereSource instead of an OBJ >>> reader and it seemed to work fine. >>> >>> Thanks, >>> Cory >>> >>> On Tue, Nov 3, 2015 at 4:09 AM, Romain LEGUAY >>> wrote: >>> >>>> Hello everyone, >>>> >>>> I applied the filter vtkCutter to a mesh and I want to get the bounds >>>> of the result contours. >>>> >>>> The bounds of the mesh seem goods. >>>> >>>> When I display the vtkCutter output result, I see the expected result >>>> but I obtained those bound values: xmin = ymin = zmin = 1.0, and xmax = >>>> ymax = zmax = -1.0. >>>> >>>> I don't understand what I did wrong in my code: >>>> >>>> // Create a plane of the current Y-axis >>>> vtkSmartPointer plane = vtkSmartPointer::New(); >>>> plane->SetOrigin(0,0,0); >>>> plane->SetNormal(0,1,0); >>>> // Cut the mesh -> contours creation >>>> vtkSmartPointer cutter = vtkSmartPointer::New(); >>>> cutter->SetCutFunction(plane); >>>> cutter->SetInputConnection(readerOBJ->GetOutputPort()); >>>> cutter->Update(); >>>> >>>> double boundsCutter[6]; >>>> cutter->GetOutput()->GetBounds(boundsCutter); // [1.0, -1.0, 1.0, -1.0, >>>> 1.0, -1.0] >>>> >>>> >>>> Do I need to do another update? >>>> >>>> Thank you, >>>> >>>> Romain >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> Cory Quammen >>> R&D Engineer >>> Kitware, Inc. >>> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jianjun.Tian at autodesk.com Tue Nov 3 10:32:24 2015 From: Jianjun.Tian at autodesk.com (Jianjun Tian) Date: Tue, 3 Nov 2015 15:32:24 +0000 Subject: [vtkusers] bug in vtkQuadraticTetra::IntersectWithLine ? Message-ID: Hi, Should the 4 in the i loop be 6 because the Face has 6 nodes, not 4. int vtkQuadraticTetra::IntersectWithLine(double* p1, double* p2, double tol, double& t, double* x, double* pcoords, int& subId) { int intersection=0; double tTemp; double pc[3], xTemp[3]; int faceNum; t = VTK_DOUBLE_MAX; for (faceNum=0; faceNum<4; faceNum++) { for (int i=0; i<4; i++) { this->Face->Points->SetPoint(i,this->Points->GetPoint(TetraFaces[faceNum][i])); } ...... } Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From jobka_5 at mail.ru Tue Nov 3 11:32:18 2015 From: jobka_5 at mail.ru (zsn) Date: Tue, 3 Nov 2015 09:32:18 -0700 (MST) Subject: [vtkusers] VTK update simulation data Message-ID: <1446568338599-5734782.post@n5.nabble.com> Dear VTK users, there is a simulation application which outputs some vtk point data every time step and I would like to render this data at every time step and also keep it interactive. I have created a pipeline which takes simulation points (points->SetInputData(data)) as an input and applies a set of filters to it. For the sake of testing I've created a simple timer and added an observer reacting on the timer event: renderWindowInteractor->AddObserver(vtkCommand::TimerEvent, cb); int timerId = renderWindowInteractor->CreateRepeatingTimer(1000); This works just as I want it. The only problem left is to add a custom user event. Basically I want to trigger some event at the end of each simulation timestep and update the model in the render window. I saw some of the VTK examples but I still don't get how to do this for my case. Could anyone help? Thank you! Best Regards, zsn -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-update-simulation-data-tp5734782.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Tue Nov 3 13:03:51 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 3 Nov 2015 11:03:51 -0700 Subject: [vtkusers] help for rendering a large amount of images In-Reply-To: <1446571996.31503.13.camel@cohiba> References: <1446505848.5730.6.camel@cohiba> <1446571996.31503.13.camel@cohiba> Message-ID: Hi Henry, Please reply to the vtk list, not just to me. You're requirement of rendering "thousands of medical images" is way too vague. Do you need to render them all simultaneously, i.e. will they all be on screen at the same time? I really do not understand what you are trying to do. The vtkImageDataStreamer will be no help to you, because it always loads the entire volume. It's job is to pull the data through the pipeline in small chunks, but the end result is still that the whole volume ends up in memory. Yes, vtkImageReslice can show a sagittal or coronal view by only streaming a small part of the volume into memory, but this will only work with certain reader classes. For example, the vtkTIFFReader always reads entire slices, so it cannot read just one row of a slice that vtkImageReslice can then incorporate into a sagittal view. In fact, I think that only vtkImageReader2 can stream individual rows or columns of an image from disk. The other readers can only stream the data slice-by-slice. You should seriously consider my recommendation of using memory mapping. If you simply map a flat file to a memory address and then use that memory address as a pixel data inside a vtkImageData, then the operating system can make all the decisions about how and when to load the data from disk. - David On Tue, Nov 3, 2015 at 10:33 AM, Henry Blanco wrote: > Thanks David for your soon reply. Ok, my problem is to load and render > thousands of medical images, > organized into series, by using VTK, but considering strong limitations > in terms of RAM (e.g., only 128 or 256 MB of RAM available). > > To achieve this task, we have tried to use the "vtkImageDataStreamer" > class, but we have failed. This class seems to load the whole volume into > memory, therefore loading 2000 CT images (1GB) into memory may fail if > we consider just 128 MB of RAM. > > We are thinking to partition the whole volume into K blocks and to load > a block of images into memory just when it's needed. The illusion of > having the whole volume loaded in memory could be achieved by > uploading/downloading one or more blocks of images to/from memory when > needed. I'm wondering whether exist some vtk classes which can be used > to picture a different view than the original (e.g., sagittal, coronal, > or even oblique) without loading the whole volume of images. > > Henry > > On lun, 2015-11-02 at 17:29 -0700, David Gobbi wrote: > > What kind of views will you need? Do you just have to view the > > original > > slices? If so, then the VTK pipeline's streaming will make the job > > easy. > > If you need orthogonal or oblique views, things are more difficult. > > Also, > > how is the data stored on disk? If the whole volume is stored on disk > > as a single flat file, then you can memory map the file. > > > > > > - David > > > > On Mon, Nov 2, 2015 at 4:10 PM, Henry Blanco > > wrote: > > Hello guys, I need some hints on how to render a large amount > > of images > > (e.g., thousands of images) using just few RAM resources > > (e.g., 128 MB) > > using the vtkImageReslice class for the whole volume. > > > > Thanks in advance > > > > Henry > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yassminabdallah at gmail.com Tue Nov 3 13:17:35 2015 From: yassminabdallah at gmail.com (YassminAbdallah) Date: Tue, 3 Nov 2015 11:17:35 -0700 (MST) Subject: [vtkusers] Volume Rendering in iOS Message-ID: <1446574655186-5734785.post@n5.nabble.com> hello, i trying to run volume rendering example in iOS using DICOM images, but i get those errors, ERROR: In /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, line 850 vtkOpenGLPolyDataMapper2D (0x7fae62e6d7f0): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Unknown error ERROR: In /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 1485 vtkTextureObject (0x7fae62e6c120): failed at glTexImage2D 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 554 vtkTextureObject (0x7fae62e6c120): failed at glBindTexture(0) 1 OpenGL errors detected 0 : (1286) Unknown error and here is sample code, vtkNew volumeMapper; vtkNew reader ; reader->SetDirectoryName("Users/Yassmin/Desktop/sample"); reader->Update(); double range[2]; reader->GetOutput()->GetPointData()->GetScalars()->GetRange(range); volumeMapper->SetInputConnection(reader->GetOutputPort()); Thanks in advance -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Tue Nov 3 13:20:58 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 3 Nov 2015 13:20:58 -0500 Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: <1446574655186-5734785.post@n5.nabble.com> References: <1446574655186-5734785.post@n5.nabble.com> Message-ID: What version of VTK are you using? - Aashish On Tue, Nov 3, 2015 at 1:17 PM, YassminAbdallah wrote: > > hello, > > i trying to run volume rendering example in iOS using DICOM images, but i > get those errors, > > ERROR: In > > /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, > line 850 > vtkOpenGLPolyDataMapper2D (0x7fae62e6d7f0): failed after RenderOverlay 1 > OpenGL errors detected > 0 : (1286) Unknown error > > > ERROR: In > /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, > line 1485 > vtkTextureObject (0x7fae62e6c120): failed at glTexImage2D 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In > /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, > line 554 > vtkTextureObject (0x7fae62e6c120): failed at glBindTexture(0) 1 OpenGL > errors detected > 0 : (1286) Unknown error > > > > and here is sample code, > > > vtkNew volumeMapper; > vtkNew reader ; > reader->SetDirectoryName("Users/Yassmin/Desktop/sample"); > reader->Update(); > double range[2]; > reader->GetOutput()->GetPointData()->GetScalars()->GetRange(range); > volumeMapper->SetInputConnection(reader->GetOutputPort()); > > > Thanks in advance > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785.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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Nov 3 13:21:27 2015 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 3 Nov 2015 13:21:27 -0500 Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: <1446574655186-5734785.post@n5.nabble.com> References: <1446574655186-5734785.post@n5.nabble.com> Message-ID: Did the volume rendering example for iOS included with VTK work? Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of YassminAbdallah Sent: Tuesday, November 3, 2015 1:18 PM To: vtkusers at vtk.org Subject: [vtkusers] Volume Rendering in iOS hello, i trying to run volume rendering example in iOS using DICOM images, but i get those errors, ERROR: In /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMappe r2D.cxx, line 850 vtkOpenGLPolyDataMapper2D (0x7fae62e6d7f0): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Unknown error ERROR: In /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 1485 vtkTextureObject (0x7fae62e6c120): failed at glTexImage2D 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 554 vtkTextureObject (0x7fae62e6c120): failed at glBindTexture(0) 1 OpenGL errors detected 0 : (1286) Unknown error and here is sample code, vtkNew volumeMapper; vtkNew reader ; reader->SetDirectoryName("Users/Yassmin/Desktop/sample"); reader->Update(); double range[2]; reader->GetOutput()->GetPointData()->GetScalars()->GetRange(range); volumeMapper->SetInputConnection(reader->GetOutputPort()); Thanks in advance -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From yassminabdallah at gmail.com Tue Nov 3 13:25:47 2015 From: yassminabdallah at gmail.com (YassminAbdallah) Date: Tue, 3 Nov 2015 11:25:47 -0700 (MST) Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: References: <1446574655186-5734785.post@n5.nabble.com> Message-ID: <1446575147182-5734788.post@n5.nabble.com> Hello Aashish, i'm using the latest version that support VTK for iOS. VTk 6.2 Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5734788.html Sent from the VTK - Users mailing list archive at Nabble.com. From yassminabdallah at gmail.com Tue Nov 3 13:27:47 2015 From: yassminabdallah at gmail.com (YassminAbdallah) Date: Tue, 3 Nov 2015 11:27:47 -0700 (MST) Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: References: <1446574655186-5734785.post@n5.nabble.com> Message-ID: <1446575267247-5734789.post@n5.nabble.com> Hello Ken, Yes, you can find the example here https://github.com/Kitware/VTK/tree/master/Examples/iOS the one i'm using is VolumeRender. Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5734789.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Tue Nov 3 13:31:49 2015 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 3 Nov 2015 13:31:49 -0500 Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: <1446575267247-5734789.post@n5.nabble.com> References: <1446574655186-5734785.post@n5.nabble.com> <1446575267247-5734789.post@n5.nabble.com> Message-ID: Did you try running that example with the wavelet data source (change the #if 0 to #if 1) Just to make sure the default example works for you? Also what device are you testing it on (aka does it support OpenGL ES 3) e.g. iphone 6, ipad Air etc. Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of YassminAbdallah Sent: Tuesday, November 3, 2015 1:28 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] Volume Rendering in iOS Hello Ken, Yes, you can find the example here https://github.com/Kitware/VTK/tree/master/Examples/iOS the one i'm using is VolumeRender. Thanks -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5734789 .html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From aashish.chaudhary at kitware.com Tue Nov 3 13:42:18 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 3 Nov 2015 13:42:18 -0500 Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: References: <1446574655186-5734785.post@n5.nabble.com> <1446575267247-5734789.post@n5.nabble.com> Message-ID: This line here: https://github.com/Kitware/VTK/blob/master/Examples/iOS/VolumeRender/Classes/MyGLKViewController.mm#l120 On Tue, Nov 3, 2015 at 1:31 PM, Ken Martin wrote: > Did you try running that example with the wavelet data source (change the > #if 0 to #if 1) Just to make sure the default example works for you? Also > what device are you testing it on (aka does it support OpenGL ES 3) e.g. > iphone 6, ipad Air etc. > > Thanks > Ken > > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > ken.martin at kitware.com > 919 869-8871 (w) > > > 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. > > > -----Original Message----- > From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of > YassminAbdallah > Sent: Tuesday, November 3, 2015 1:28 PM > To: vtkusers at vtk.org > Subject: Re: [vtkusers] Volume Rendering in iOS > > Hello Ken, > > Yes, you can find the example here > https://github.com/Kitware/VTK/tree/master/Examples/iOS > > the one i'm using is VolumeRender. > > Thanks > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5734789 > .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 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From yassminabdallah at gmail.com Tue Nov 3 13:44:31 2015 From: yassminabdallah at gmail.com (YassminAbdallah) Date: Tue, 3 Nov 2015 11:44:31 -0700 (MST) Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: References: <1446574655186-5734785.post@n5.nabble.com> <1446575267247-5734789.post@n5.nabble.com> Message-ID: <1446576271014-5734792.post@n5.nabble.com> i'm running on iphone 6 plus simulator. after change to #if 1, i have 2 errors ERROR: In /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, line 850 vtkOpenGLPolyDataMapper2D (0x7fd3b0f5c9b0): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Unknown error ERROR: In /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 554 vtkTextureObject (0x7fd3b0d3bb20): failed at glBindTexture(0) 1 OpenGL errors detected 0 : (1286) Unknown error i didn't understand what that mean did i build the binary wrong or what ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5734792.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Tue Nov 3 13:44:34 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 3 Nov 2015 13:44:34 -0500 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Hi Simon, the branch has been merged into VTK master. I am not sure when Paraview is going to update the VTK, but you can do it manually if needed. We are also going to run our bench marking again to be sure since recently lot many changes went into the VTK / volume rendering. Please feel free to ping me again if it does not solve your issue. Looking forward to your feedback. - Aashish On Mon, Nov 2, 2015 at 8:02 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Hi Simon, > > I found the reason behind the appeared performance you were getting. We > have this code in volume rendering that when you interact changes the > sampling distance and in the newer code we were too conservative compare to > the last version. That's why you were getting better quality when you move > your mouse but lower frame rates. I pushed a branch in VTK to address the > issue. Would it be possible for you to build Paraview with VTK master? It > may take 3-4 days or longer for Paraview's VTK to get updated. > > Thanks, > Aashish > > On Wed, Oct 28, 2015 at 11:59 AM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> Hi Simon, >> >> I am just finishing up a ParaView5 related parallel volume rendering bug >> (pushing a branch today to VTK). This is next on my list. >> >> - Aashish >> >> On Wed, Oct 28, 2015 at 11:57 AM, Simon ESNEAULT < >> simon.esneault at gmail.com> wrote: >> >>> Hello Aashish >>> >>> Did you get a chance to try to load the dataset on Windows ? >>> Can I do anything to help you investigate ? Should I feel a bug, that >>> may act as a reminder ? >>> Have a nice day >>> Simon >>> >>> >>> 2015-10-27 18:26 GMT+01:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>>> Thanks Simon. This is really strange since we are not seeing it on Mac >>>> and Linux (but both has dedicated cards). >>>> >>>> I will look into it soon. >>>> >>>> - aashish >>>> >>>> On Tue, Oct 27, 2015 at 1:03 PM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> Ok, thank you very much fort digging into this. >>>>> I've done some test and I believe I can see a similar slowdown >>>>> happening on OSX, with a MacBook pro retina 13" from 2013, Intel Iris 5100 >>>>> graphics. >>>>> Good luck in the investigation, I you need more details, do not >>>>> hesitate to ask >>>>> Simon >>>>> >>>>> 2015-10-27 17:37 GMT+01:00 Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com>: >>>>> >>>>>> Ah, thanks. I will get back to you on this since on Linux I don't any >>>>>> issue so it has to be Windows specific thing. >>>>>> >>>>>> - Aashish >>>>>> >>>>>> On Tue, Oct 27, 2015 at 10:36 AM, Simon ESNEAULT < >>>>>> simon.esneault at gmail.com> wrote: >>>>>> >>>>>>> I tried with that one from yesterday and today's version >>>>>>> (4.4.0-209-gc399648) >>>>>>> >>>>>>> Thanks, >>>>>>> Simon >>>>>>> >>>>>>> 2015-10-27 15:19 GMT+01:00 Aashish Chaudhary < >>>>>>> aashish.chaudhary at kitware.com>: >>>>>>> >>>>>>>> Thanks. >>>>>>>> >>>>>>>> And when did you download this version? >>>>>>>> ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Aashish >>>>>>>> >>>>>>>> On Tue, Oct 27, 2015 at 10:17 AM, Simon ESNEAULT < >>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>> >>>>>>>>> Yes, I tried with and without the shading. Without shading >>>>>>>>> enabled, the new Opengl2 is also slower when zoomed in (in the described >>>>>>>>> condition). With shading enabled, the difference in speed between the two >>>>>>>>> version seems even bigger. >>>>>>>>> I got the version from the nightly build download section of >>>>>>>>> paraview website (it is still available). And I've just tried with that one >>>>>>>>> labeled "ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe" with the same >>>>>>>>> results. >>>>>>>>> >>>>>>>>> About the FPS, it is difficult to give an exact number, because it >>>>>>>>> depends of the condition (zoomed or not etc...) but yes, this is the idea. >>>>>>>>> In our software, I've exposed the frame rate using this example : >>>>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/FrameRate >>>>>>>>> And the frame rate is around 15/20 for the first backend, and >>>>>>>>> around 6/8 for the new backend, on the same dataset (the one provided for >>>>>>>>> example), with the same mapper parameters >>>>>>>>> >>>>>>>>> Thanks >>>>>>>>> Simon >>>>>>>>> >>>>>>>>> >>>>>>>>> 2015-10-27 14:48 GMT+01:00 Aashish Chaudhary < >>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>> >>>>>>>>>> Hi Simon, >>>>>>>>>> >>>>>>>>>> This is helpful but just missing few more bits: >>>>>>>>>> >>>>>>>>>> 1) Did you try without the shading and see how the performance >>>>>>>>>> compares? >>>>>>>>>> >>>>>>>>>> 2) ParaView 4.4.0-193-gec96423 --> Where did you get this one >>>>>>>>>> from (ParaView download page or did you built yourself?) >>>>>>>>>> >>>>>>>>>> Also, so on your system the old mapper is running 30FPS and the >>>>>>>>>> new one at 15-20 FPS as per your summary. >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> - Aashish >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT < >>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hello Aashish, >>>>>>>>>>> >>>>>>>>>>> Sorry for the late answer, I was busy this morning. >>>>>>>>>>> Thanks for testing with the DataSet. >>>>>>>>>>> I agree the performance is still quite good with the new >>>>>>>>>>> backend, and I also get something like 15/20 fps on windows on an HD >>>>>>>>>>> screen. But when compared to the old one, and in some condition (when >>>>>>>>>>> zoomed especially), it looks really slower to me >>>>>>>>>>> The two tested version are : >>>>>>>>>>> - ParaView 4.4.0 64 bits final version for the old backend >>>>>>>>>>> - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 backend. >>>>>>>>>>> on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and Nvidia >>>>>>>>>>> Quadro K420 >>>>>>>>>>> >>>>>>>>>>> To highlight the difference, here is what I do : >>>>>>>>>>> - Launch both version on the same computer at the same time >>>>>>>>>>> - Load the above dataset on each >>>>>>>>>>> - Select volume rendering >>>>>>>>>>> - Adjust the transfer function data range to [100-750] (the >>>>>>>>>>> default "Cool to Warm" is fine) >>>>>>>>>>> - Set the view direction to +Y >>>>>>>>>>> - Adjust the Y of the camera position to -300 >>>>>>>>>>> >>>>>>>>>>> And start interacting ... >>>>>>>>>>> Dunno if there is an easy way to print out the Frame Rate in >>>>>>>>>>> Paraview, but the new version seems really twice slower in these >>>>>>>>>>> conditions... We can see it does not scale in the same way, the old backend >>>>>>>>>>> seems more aggressive on the image sample reduction, hence the >>>>>>>>>>> interactivity is better. >>>>>>>>>>> Shading enable or not does not change much >>>>>>>>>>> >>>>>>>>>>> I'm aware of the DesiredUpdateRate thing, we use to play with >>>>>>>>>>> this with the old backend to fine tune the interactivity, although what's >>>>>>>>>>> really inside was never clear to me >>>>>>>>>>> >>>>>>>>>>> I hope that there is enough information for you to reproduce >>>>>>>>>>> this, do not hesitate to ask for some more information. >>>>>>>>>>> >>>>>>>>>>> Thanks a lot for your help >>>>>>>>>>> Simon >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>> >>>>>>>>>>>> Dear Simon, >>>>>>>>>>>> >>>>>>>>>>>> Checking again. Wondering if you can provide some more detail >>>>>>>>>>>> on the binary you are using and whether or not without shading the >>>>>>>>>>>> rendering performance comparable to older version. >>>>>>>>>>>> >>>>>>>>>>>> Thanks, >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Simon, >>>>>>>>>>>>> >>>>>>>>>>>>> I used your dataset on paraview master as of today on my Linux >>>>>>>>>>>>> box running Ubuntu 14.04 and NVIDA Quadro card and I am getting about 15-20 >>>>>>>>>>>>> FPS with shading on with 1920x1080 resolution. >>>>>>>>>>>>> >>>>>>>>>>>>> Are you on the proper 4.4 or using RC1/RC2? I checked the >>>>>>>>>>>>> shading performance fix was in 4.4 but not in RC's. I don't have access to >>>>>>>>>>>>> Windows box right away but I will try there too. >>>>>>>>>>>>> >>>>>>>>>>>>> NOTE: You might get multiple emails because of the attachment >>>>>>>>>>>>> size issue. Sorry about that. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks, >>>>>>>>>>>>> >>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks for the quick answer >>>>>>>>>>>>>>> We are using a vtkImageData, 512x512x591 with short element >>>>>>>>>>>>>>> (you can find the dataset here : >>>>>>>>>>>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). So I >>>>>>>>>>>>>>> think it's all about GPU volume raycast mapper. >>>>>>>>>>>>>>> The new mapper does bring low resolution, but when compared >>>>>>>>>>>>>>> to the old one, it seems less "low resolution" during interaction than the >>>>>>>>>>>>>>> old one >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Right, so that's why its not a exact comparison. What happens >>>>>>>>>>>>>> is that depending on what is interactive, (you can set the desired update >>>>>>>>>>>>>> rate in VTK, not exposed in ParaView I believe), it will do interactive >>>>>>>>>>>>>> but with higher resolution (smaller sample distance). If they both have >>>>>>>>>>>>>> the same sample distance, then the new mapper should out perform the old >>>>>>>>>>>>>> one, however, there is another thing we need to consider here which is >>>>>>>>>>>>>> shading. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Shading is enabled, gradient opacity disabled >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Can you disable the shading and see if now they both (opengl1 >>>>>>>>>>>>>> and 2) equally better? We already pushed a fix for it but not sure if that >>>>>>>>>>>>>> you have in your build. >>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Don't know if you need a minimal example, but I believe the >>>>>>>>>>>>>>> GPURenderDemo used with this dataset is enough to highlight the slow down. >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Yes, I will use this dataset. Thanks. >>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Also, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Do you have shading enabled? We fixed a bug with shading >>>>>>>>>>>>>>>> that was causing the slow performance a while back. I don't remember if >>>>>>>>>>>>>>>> that was included in 4.4 or not ( I can check ). >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> What kind of dataset you are using? Depending on the data >>>>>>>>>>>>>>>>> type you might be using >>>>>>>>>>>>>>>>> the GPU one or the unstructured renderer. The performance >>>>>>>>>>>>>>>>> we measured is related to the GPU ray cast mapper >>>>>>>>>>>>>>>>> and will apply only to the vtkImageData inputs. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Also, helpful would be is if you can tell if the new >>>>>>>>>>>>>>>>> mapper is bringing low resolution when you interact with the volume (and >>>>>>>>>>>>>>>>> whether or not it happens with old mapper). >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> We are trying to make the switch to the new OpenGL2 >>>>>>>>>>>>>>>>>> backend for our application, and although the switch was easy (thanks for >>>>>>>>>>>>>>>>>> not breaking the API ;) ), we can see a significant slowdown on the GPU >>>>>>>>>>>>>>>>>> volume rendering part, especially during interaction. Typically we dropped >>>>>>>>>>>>>>>>>> from 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), >>>>>>>>>>>>>>>>>> with the same code around. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> This slow down can be seen in ParaView, if you compare >>>>>>>>>>>>>>>>>> the latest 4.4 OpenGL2 build with the classic 4.4 build while volume >>>>>>>>>>>>>>>>>> rendering a big enough volume (512^3) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> The blog post here >>>>>>>>>>>>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>>>>>>>>>>>> claims that the new GPU volume rendering implementation >>>>>>>>>>>>>>>>>> should be faster than the old one, is there some more detailed explanation >>>>>>>>>>>>>>>>>> somewhere ? Are there some important parameters that can make the >>>>>>>>>>>>>>>>>> difference ? >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> PS : The polygonal rendering seems a lot faster with the >>>>>>>>>>>>>>>>>> new backend ! >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>> * >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>> Inc. * >>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>> * >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>>> * >>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>> * >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>> Simon Esneault >>>>>>>>>>> Rennes, France >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>> * >>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>> * >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> Simon Esneault >>>>>>>>> Rennes, France >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>> * >>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>> * >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> ------------------------------------------------------------------ >>>>>>> Simon Esneault >>>>>>> Rennes, France >>>>>>> ------------------------------------------------------------------ >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Nov 3 13:56:37 2015 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 3 Nov 2015 13:56:37 -0500 Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: <1446576271014-5734792.post@n5.nabble.com> References: <1446574655186-5734785.post@n5.nabble.com> <1446575267247-5734789.post@n5.nabble.com> <1446576271014-5734792.post@n5.nabble.com> Message-ID: <4db65c0a9c2aa6eea5bb238e374cf65f@mail.gmail.com> I have not tried that example on the simulator. It should work on an iPhone6 (I have tested it). I always worry a bit with the simulator and OpenGL as it depends on how good they are at emulating the actual hardware/driver. If you can, give it a shot on a ES3 supported device and see if it works there for you. Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of YassminAbdallah Sent: Tuesday, November 3, 2015 1:45 PM To: vtkusers at vtk.org Subject: Re: [vtkusers] Volume Rendering in iOS i'm running on iphone 6 plus simulator. after change to #if 1, i have 2 errors ERROR: In /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMappe r2D.cxx, line 850 vtkOpenGLPolyDataMapper2D (0x7fd3b0f5c9b0): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Unknown error ERROR: In /Users/Yassmin/desktop/VTKBin/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 554 vtkTextureObject (0x7fd3b0d3bb20): failed at glBindTexture(0) 1 OpenGL errors detected 0 : (1286) Unknown error i didn't understand what that mean did i build the binary wrong or what ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5734792 .html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From yassminabdallah at gmail.com Tue Nov 3 14:21:54 2015 From: yassminabdallah at gmail.com (YassminAbdallah) Date: Tue, 3 Nov 2015 12:21:54 -0700 (MST) Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: <4db65c0a9c2aa6eea5bb238e374cf65f@mail.gmail.com> References: <1446574655186-5734785.post@n5.nabble.com> <1446575267247-5734789.post@n5.nabble.com> <1446576271014-5734792.post@n5.nabble.com> <4db65c0a9c2aa6eea5bb238e374cf65f@mail.gmail.com> Message-ID: <1446578514323-5734796.post@n5.nabble.com> iPhone that support ES3 not available at this time, so i was hoping it will run on the simulator. Anyway thanks alot -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5734796.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Tue Nov 3 14:29:26 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 3 Nov 2015 14:29:26 -0500 Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: <1446578514323-5734796.post@n5.nabble.com> References: <1446574655186-5734785.post@n5.nabble.com> <1446575267247-5734789.post@n5.nabble.com> <1446576271014-5734792.post@n5.nabble.com> <4db65c0a9c2aa6eea5bb238e374cf65f@mail.gmail.com> <1446578514323-5734796.post@n5.nabble.com> Message-ID: I am assuming you don't have access to iPhone 5S or higher? https://developer.apple.com/library/ios/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/OpenGLESPlatforms/OpenGLESPlatforms.html On Tue, Nov 3, 2015 at 2:21 PM, YassminAbdallah wrote: > iPhone that support ES3 not available at this time, so i was hoping it will > run on the simulator. > > > Anyway thanks alot > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5734796.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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From yassminabdallah at gmail.com Tue Nov 3 14:35:52 2015 From: yassminabdallah at gmail.com (YassminAbdallah) Date: Tue, 3 Nov 2015 12:35:52 -0700 (MST) Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: References: <1446574655186-5734785.post@n5.nabble.com> <1446575267247-5734789.post@n5.nabble.com> <1446576271014-5734792.post@n5.nabble.com> <4db65c0a9c2aa6eea5bb238e374cf65f@mail.gmail.com> <1446578514323-5734796.post@n5.nabble.com> Message-ID: <1446579352947-5734798.post@n5.nabble.com> unfortunately not available at this time, i will try to have access to any device that support ES3 and try it. Thanks alot for your concern -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5734798.html Sent from the VTK - Users mailing list archive at Nabble.com. From henry.blanco at cbiomed.cu Tue Nov 3 14:49:12 2015 From: henry.blanco at cbiomed.cu (Henry Blanco) Date: Tue, 03 Nov 2015 14:49:12 -0500 Subject: [vtkusers] help for rendering a large amount of images In-Reply-To: <1446571996.31503.13.camel@cohiba> References: <1446505848.5730.6.camel@cohiba> <1446571996.31503.13.camel@cohiba> Message-ID: <1446580152.31503.17.camel@cohiba> Thanks David for your soon reply. My problem is to load and render thousands of medical images, organized into series, by using VTK, but considering strong limitations in terms of RAM (e.g., only 128 or 256 MB of RAM available). To achieve this task, we have tried to use the "vtkImageDataStreamer" class, but we have failed. This class seems to load the whole volume into memory, therefore loading 2000 CT images (1GB) into memory may fail if we just consider 128 MB of RAM. We are thinking to split the whole volume into K blocks and to load a block of images into memory just when it's needed. The illusion of having the whole volume loaded in memory could be achieved by uploading/downloading one or more blocks of images to/from memory when needed. We're wondering whether exists some vtk classes which can be used to picture a view different than the original one (e.g., sagittal, coronal, or even oblique view) without loading the whole volume of images into memory. Henry On mar, 2015-11-03 at 12:33 -0500, Henry Blanco wrote: > Thanks David for your soon reply. Ok, my problem is to load and render thousands of medical images, > organized into series, by using VTK, but considering strong limitations > in terms of RAM (e.g., only 128 or 256 MB of RAM available). > > To achieve this task, we have tried to use the "vtkImageDataStreamer" > class, but we have failed. This class seems to load the whole volume into > memory, therefore loading 2000 CT images (1GB) into memory may fail if > we consider just 128 MB of RAM. > > We are thinking to partition the whole volume into K blocks and to load > a block of images into memory just when it's needed. The illusion of > having the whole volume loaded in memory could be achieved by > uploading/downloading one or more blocks of images to/from memory when > needed. I'm wondering whether exist some vtk classes which can be used > to picture a different view than the original (e.g., sagittal, coronal, > or even oblique) without loading the whole volume of images. > > Henry > > On lun, 2015-11-02 at 17:29 -0700, David Gobbi wrote: > > What kind of views will you need? Do you just have to view the > > original > > slices? If so, then the VTK pipeline's streaming will make the job > > easy. > > If you need orthogonal or oblique views, things are more difficult. > > Also, > > how is the data stored on disk? If the whole volume is stored on disk > > as a single flat file, then you can memory map the file. > > > > > > - David > > > > On Mon, Nov 2, 2015 at 4:10 PM, Henry Blanco > > wrote: > > Hello guys, I need some hints on how to render a large amount > > of images > > (e.g., thousands of images) using just few RAM resources > > (e.g., 128 MB) > > using the vtkImageReslice class for the whole volume. > > > > Thanks in advance > > > > Henry > > From pedropaulobmjr at hotmail.com Tue Nov 3 15:55:17 2015 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Tue, 3 Nov 2015 20:55:17 +0000 Subject: [vtkusers] VTK and PyQt Message-ID: Please, how can I read a image in VTK and display it in Qt using PyQt4? -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.askeland at gmail.com Tue Nov 3 16:10:04 2015 From: christian.askeland at gmail.com (Christian Askeland) Date: Tue, 3 Nov 2015 22:10:04 +0100 Subject: [vtkusers] QMainWindow+QVTKWidget issues on Mac Message-ID: Hi all, I have an issue with QMainWindow when using a QVTKWidget as the centralwidget. Both the Toolbars and DockWidgets get messed up, meaning that for some toolbar elements get unclickable after some reordering of the elements, and moving DockWidgets causes a large white square to appear. The following snippet produces a white square over the window when attempting to dock DockWidget "B" onto Dockwidget "A": (A full compiling version is also available at https://github.com/christiana/issue1044) main.cpp: int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow window; window.resize(800,500); window.show(); return app.exec(); } MainWindow.cpp: MainWindow::MainWindow(){ QVTKWidget* widget = new QVTKWidget(); this->setCentralWidget(widget); // The hidden toolbar makes the bug more obvious. // Without this the drag/drop of QDockWidgets is still messed up. this->addHiddenToolbar(); // drag A on top of B -> white square appears (if not already present at startup) this->addDock("A"); this->addDock("B");} void MainWindow::addHiddenToolbar(){ QToolBar* toolbar = new QToolBar("FooBar"); this->addToolBar(toolbar); toolbar->hide(); toolbar->addAction("Foo");} void MainWindow::addDock(QString name){ QDockWidget* dockWidget = new QDockWidget(name, this); dockWidget->setWidget(new QLabel(name)); this->addDockWidget(Qt::LeftDockWidgetArea, dockWidget);} This seems to have been present since Qt 5.0, and is still there with VTK 6.3 and Qt 5.5.1. Mac only (OSX10.8-10.11). I'll continue working on this issue, but any tips and comments are very welcome. Best, Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: From darya.yelshyna at yahoo.com Tue Nov 3 17:24:31 2015 From: darya.yelshyna at yahoo.com (Darya Yelshyna) Date: Tue, 3 Nov 2015 22:24:31 +0000 (UTC) Subject: [vtkusers] Compute Hausdorff distance between two meshes References: <1209502912.1442479.1446589471987.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1209502912.1442479.1446589471987.JavaMail.yahoo@mail.yahoo.com> Hello everyone! I am new to VTK and I have some questions on measuring the distance between meshes.After applying the ICP algorithm, I would like to measure the error between my target and transformed source meshes. I think the Hausdorff distance is the most appropriate indicator. I applied the?vtkDistancePolyDataFilter, but it gives me a much greater error than the one I get in the MeshLab (for Hausdorff distance). I understand that those measures are different, and the sampling has a different effect, so I would like to know if I should implement the Hausdorff distance by myself using VTK classes, or if there is already some implementation.I found?this?implementation, but since I am using python bindings, I don't think this would work for me. Sorry for inconvenience and thank you all in advance. Best regards,Darya -------------- next part -------------- An HTML attachment was scrubbed... URL: From laysrodriguessilva at gmail.com Tue Nov 3 17:47:19 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Tue, 3 Nov 2015 20:47:19 -0200 Subject: [vtkusers] [QT+VTK] QVTKWidget x QVTKWidget2 Message-ID: Hi guys, Yestarday i was able to get the code ReadSTL from VTK Wiki and convert to use in my QtApp using QVTKWidget. But, this class is depreciade. So i'm trying to use the QVTKWidget2. Was told to me that i only need to this to make the code fom VTK Wiki works on my code: vtkRenderWindow* renderWindow = this->GetRenderWindow(); Using the class QVTKWidget the return of GetRenderWindow is the type vtkRenderWindow, so its easy to solve. But in the QVTKWidget2, the return type of the function is a vtkGenericOpenGLRenderWindow, so with a little help for other guy i came to this: vtkSmartPointer renderer = vtkSmartPointer::New(); vtkRenderWindowInteractor *r = this->GetRenderWindow()->GetInteractor(); vtkRenderWindow* renderWindow = vtkRenderWindow::New(); r->SetRenderWindow(renderWindow); renderWindow->AddRenderer(renderer); renderer->AddActor(actor); renderer->SetBackground(.0, .5, 1); // Background color blue renderer->ResetCamera(); renderWindow->Render(); BUT, the stl is load on a popup window, and dont permit zoom or move the load model . I guess that i'm missing something. But how i have only 2 days working with VTK, i dont know. I think that is something small and stupid, but i can be wrong too. Any tips? Thanks! ? -- __ *Lays Rodrigues* *Developer Front-End at Br-Print3D Project* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From rax20037 at gmail.com Tue Nov 3 22:56:46 2015 From: rax20037 at gmail.com (Raul Huertas) Date: Tue, 3 Nov 2015 22:56:46 -0500 Subject: [vtkusers] QMainWindow+QVTKWidget issues on Mac In-Reply-To: References: Message-ID: <3DA4B589-1049-4C91-A3C3-6ED473C765E7@gmail.com> I had similar issues, use QVTKWidget2. > El 3 nov. 2015, a las 4:10 p.m., Christian Askeland escribi?: > > Hi all, > > I have an issue with QMainWindow when using a QVTKWidget as the centralwidget. Both the Toolbars and DockWidgets get messed up, meaning that for some toolbar elements get unclickable after some reordering of the elements, and moving DockWidgets causes a large white square to appear. > > The following snippet produces a white square over the window when attempting to dock DockWidget "B" onto Dockwidget "A": > (A full compiling version is also available at https://github.com/christiana/issue1044) > > main.cpp: > > int main(int argc, char *argv[]) > { > QApplication app(argc, argv); > > MainWindow window; > window.resize(800,500); > window.show(); > > return app.exec(); > } > > MainWindow.cpp: > > MainWindow::MainWindow() > { > QVTKWidget* widget = new QVTKWidget(); > this->setCentralWidget(widget); > > // The hidden toolbar makes the bug more obvious. > // Without this the drag/drop of QDockWidgets is still messed up. > this->addHiddenToolbar(); > > // drag A on top of B -> white square appears (if not already present at startup) > this->addDock("A"); > this->addDock("B"); > } > > void MainWindow::addHiddenToolbar() > { > QToolBar* toolbar = new QToolBar("FooBar"); > this->addToolBar(toolbar); > toolbar->hide(); > toolbar->addAction("Foo"); > } > > void MainWindow::addDock(QString name) > { > QDockWidget* dockWidget = new QDockWidget(name, this); > dockWidget->setWidget(new QLabel(name)); > this->addDockWidget(Qt::LeftDockWidgetArea, dockWidget); > } > > This seems to have been present since Qt 5.0, > and is still there with VTK 6.3 and Qt 5.5.1. > Mac only (OSX10.8-10.11). > > I'll continue working on this issue, but any tips and comments are > very welcome. > > Best, > > Christian > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.nellmeldin at open-engineering.com Wed Nov 4 05:10:35 2015 From: f.nellmeldin at open-engineering.com (Fernando Nellmeldin) Date: Wed, 4 Nov 2015 11:10:35 +0100 Subject: [vtkusers] How to use vtkClipDataSet and preserve Arrays Message-ID: Hello everyone. I'm new with VTK and I'm working on a visualization interface. I need some help. Input: I have a vtkUnstructuredGrid with one Point Array Data called "Displacements" Point 1: I would like to clip this ugrid with a Plane. Then, display the resulting clipped data. Point 2: On the other hand, as the array is a 3d vector array that represents displacement, I want to display the mesh warped into the direction of the vectors (the points moved and the mesh deformed). I can do both Point 1 and Point 2 on separate cases, but when I try to combine them, after Point 1, the array disappear from the output grid of vtkClipDataSet. My objective is to see the clipped data displaced. I attach an image on Paraview of what I would like to have (more or less). I'm using VTK 5.10 under Windows 8.1 (64 bits). Thank you!. PS: Here is the relevant part of code. /* omitted code that reads the model */ vtkSmartPointer model = reader->GetOutput(); // this shows that model has one point data array called "Displacements" model->Print(std::cout); // Plane to cut it vtkSmartPointer plane = vtkSmartPointer::New(); plane->SetOrigin(0.0,0.0,0.0); plane->SetNormal(1,0,0); // Clip data vtkSmartPointer clipDataSet = vtkSmartPointer::New(); clipDataSet->SetClipFunction(plane); clipDataSet->SetInputConnection(model->GetProducerPort()); clipDataSet->InsideOutOn(); clipDataSet->GenerateClippedOutputOn(); //PROBLEM HERE. The print shows that there aren't any arrays on the output data clipDataSet->GetOutput()->Print(std::cout); // Warp the data. vtkSmartPointer warpingVector = vtkSmartPointer::New(); warpingVector->SetInput(clipDataSet->GetOutput()); warpingVector->Update(); // Filter the data because vtkFeatureEdges needs polydata as input vtkSmartPointer outGeometryFilter = vtkSmartPointer::New(); outGeometryFilter->SetInput(warpingVector->GetOutput()); //Create a filter to only draw the boundaries of the displaced mesh vtkSmartPointer drawOnlyBoundaries = vtkSmartPointer::New(); drawOnlyBoundaries->SetInputConnection(outGeometryFilter->GetOutputPort()); // configuration of drawOnlyBoundaries, it is not important drawOnlyBoundaries->BoundaryEdgesOn(); drawOnlyBoundaries->ManifoldEdgesOff(); drawOnlyBoundaries->NonManifoldEdgesOff(); drawOnlyBoundaries->Update(); /* Here I omitted the code to display the mesh using clipDataSet->GetOutputPort() as input*/ /* Also, the code to configure the mapper and actor using drawOnlyBoundaries as input */ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: clipped_displaced_data.png Type: image/png Size: 43124 bytes Desc: not available URL: From christian.askeland at gmail.com Wed Nov 4 15:22:06 2015 From: christian.askeland at gmail.com (Christian Askeland) Date: Wed, 4 Nov 2015 21:22:06 +0100 Subject: [vtkusers] QMainWindow+QVTKWidget issues on Mac In-Reply-To: <3DA4B589-1049-4C91-A3C3-6ED473C765E7@gmail.com> References: <3DA4B589-1049-4C91-A3C3-6ED473C765E7@gmail.com> Message-ID: That's very interesting. In my example code, replacing QVTKWidget with QVTKWidget2 gives exactly the same result. Do you have any code showing the improvement? Do you, for example, wrap the QVTKWidget2 in anything? -Christian On Wed, Nov 4, 2015 at 4:56 AM, Raul Huertas wrote: > I had similar issues, use QVTKWidget2. > > > > El 3 nov. 2015, a las 4:10 p.m., Christian Askeland < > christian.askeland at gmail.com> escribi?: > > Hi all, > > I have an issue with QMainWindow when using a QVTKWidget as the > centralwidget. Both the Toolbars and DockWidgets get messed up, meaning > that for some toolbar elements get unclickable after some reordering of the > elements, and moving DockWidgets causes a large white square to appear. > > The following snippet produces a white square over the window when > attempting to dock DockWidget "B" onto Dockwidget "A": > (A full compiling version is also available at > https://github.com/christiana/issue1044) > > main.cpp: > > int main(int argc, char *argv[]) > > { > > QApplication app(argc, argv); > > > MainWindow window; > > window.resize(800,500); > > window.show(); > > > return app.exec(); > > } > > MainWindow.cpp: > MainWindow::MainWindow(){ QVTKWidget* widget = new QVTKWidget(); this->setCentralWidget(widget); > // The hidden toolbar makes the bug more obvious. // Without this the drag/drop of QDockWidgets is still messed up. this->addHiddenToolbar(); > // drag A on top of B -> white square appears (if not already present at startup) this->addDock("A"); this->addDock("B");} > void MainWindow::addHiddenToolbar(){ QToolBar* toolbar = new QToolBar("FooBar"); this->addToolBar(toolbar); toolbar->hide(); toolbar->addAction("Foo");} > void MainWindow::addDock(QString name){ QDockWidget* dockWidget = new QDockWidget(name, this); dockWidget->setWidget(new QLabel(name)); this->addDockWidget(Qt::LeftDockWidgetArea, dockWidget);} > > This seems to have been present since Qt 5.0, > and is still there with VTK 6.3 and Qt 5.5.1. > > Mac only (OSX10.8-10.11). > > I'll continue working on this issue, but any tips and comments are > > very welcome. > > > Best, > > Christian > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pedropaulobmjr at hotmail.com Wed Nov 4 17:28:01 2015 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Wed, 4 Nov 2015 22:28:01 +0000 Subject: [vtkusers] Convert DICOM Image Message-ID: Hello, I am trying to make a conversion from a DICOM image to a JPG and save the image, but the image that I produce does not match the original. I know I need rescaling the image to convert it but I do not know how, if you can help me, thank you.Attached image generated, and below the code in python: from vtk import * reader = vtkDICOMImageReader()reader.SetFileName('image.dcm')reader.Update() castFilter = vtkImageCast()castFilter.SetOutputScalarTypeToUnsignedChar()castFilter.SetInputConnection(reader.GetOutputPort())castFilter.Update() writer = vtkJPEGWriter()writer.SetFileName('output.jpg')writer.SetInputConnection(castFilter.GetOutputPort())writer.Write() -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: output.jpg Type: image/jpeg Size: 114774 bytes Desc: not available URL: From k_h at inbox.ru Thu Nov 5 02:48:33 2015 From: k_h at inbox.ru (=?UTF-8?B?Tmlrb2xheSBLaG9raGxvdg==?=) Date: Thu, 05 Nov 2015 10:48:33 +0300 Subject: [vtkusers] =?utf-8?q?_pvti_and_PointData_without_ghost_cells?= Message-ID: <1446709713.410185780@f170.i.mail.ru> Hello, I'm trying to use pvti to store values at grid nodes (not cells). So I use PointData. When I use serial saving with vti everything is ok. But when I use pvti something gone wrong. What I see and what I want to see has shown at picture bug.png. Here is my files. ./grid2_000009.pvti ? ??? ??? ????? ??????? ??????? ????? ? ./grid2_0_000009.vti ? ??? ????? ??????? 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ??????? ????? ??? ? ./grid2_1_000009.vti ? ??? ????? ??????? 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ??????? ????? ??? ? Thanks. Best regards, Nikolay Khokhlov ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bug.png Type: image/png Size: 29619 bytes Desc: not available URL: From ich_daniel at habmalnefrage.de Thu Nov 5 05:24:57 2015 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Thu, 5 Nov 2015 03:24:57 -0700 (MST) Subject: [vtkusers] vtkAssembly - get the overall actor Message-ID: <1446719097163-5734811.post@n5.nabble.com> Hi there, I use multiple vtkActor's to add them to a vtkAssembly. How to get the overall actor from the vtkAssembly-class? Is this possible? This following codesnippet is from a class that has been extended with vtkAssembly. With ..GetRenderer().GetActors().GetLastActor() I get only the last assembly-part. How can I get this "actor" who was added to the renderer? Or what's behind it? -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkAssembly-get-the-overall-actor-tp5734811.html Sent from the VTK - Users mailing list archive at Nabble.com. From rax20037 at gmail.com Thu Nov 5 09:35:47 2015 From: rax20037 at gmail.com (Raul Huertas) Date: Thu, 5 Nov 2015 09:35:47 -0500 Subject: [vtkusers] QMainWindow+QVTKWidget issues on Mac In-Reply-To: References: <3DA4B589-1049-4C91-A3C3-6ED473C765E7@gmail.com> Message-ID: I use it in a slightly different way: //inside the constructor w = new QVTKWidget2(fmt, ui->centralWidget) ly= new QHBoxLayout lay->addWidget(w) ui->centralWidget->setLayout(w) With qvtkwidget1 i had an issue regarding the retina resolution, but not about layouts. Hope this help. Bye! > El 4 nov. 2015, a las 3:22 p.m., Christian Askeland escribi?: > > That's very interesting. In my example code, replacing QVTKWidget with QVTKWidget2 gives exactly the same result. Do you have any code showing the improvement? Do you, for example, wrap the QVTKWidget2 in anything? > > -Christian > >> On Wed, Nov 4, 2015 at 4:56 AM, Raul Huertas wrote: >> I had similar issues, use QVTKWidget2. >> >> >> >>> El 3 nov. 2015, a las 4:10 p.m., Christian Askeland escribi?: >>> >>> Hi all, >>> >>> I have an issue with QMainWindow when using a QVTKWidget as the centralwidget. Both the Toolbars and DockWidgets get messed up, meaning that for some toolbar elements get unclickable after some reordering of the elements, and moving DockWidgets causes a large white square to appear. >>> >>> The following snippet produces a white square over the window when attempting to dock DockWidget "B" onto Dockwidget "A": >>> (A full compiling version is also available at https://github.com/christiana/issue1044) >>> >>> main.cpp: >>> >>> int main(int argc, char *argv[]) >>> { >>> QApplication app(argc, argv); >>> >>> MainWindow window; >>> window.resize(800,500); >>> window.show(); >>> >>> return app.exec(); >>> } >>> >>> MainWindow.cpp: >>> >>> MainWindow::MainWindow() >>> { >>> QVTKWidget* widget = new QVTKWidget(); >>> this->setCentralWidget(widget); >>> >>> // The hidden toolbar makes the bug more obvious. >>> // Without this the drag/drop of QDockWidgets is still messed up. >>> this->addHiddenToolbar(); >>> >>> // drag A on top of B -> white square appears (if not already present at startup) >>> this->addDock("A"); >>> this->addDock("B"); >>> } >>> >>> void MainWindow::addHiddenToolbar() >>> { >>> QToolBar* toolbar = new QToolBar("FooBar"); >>> this->addToolBar(toolbar); >>> toolbar->hide(); >>> toolbar->addAction("Foo"); >>> } >>> >>> void MainWindow::addDock(QString name) >>> { >>> QDockWidget* dockWidget = new QDockWidget(name, this); >>> dockWidget->setWidget(new QLabel(name)); >>> this->addDockWidget(Qt::LeftDockWidgetArea, dockWidget); >>> } >>> >>> This seems to have been present since Qt 5.0, >>> and is still there with VTK 6.3 and Qt 5.5.1. >>> Mac only (OSX10.8-10.11). >>> >>> I'll continue working on this issue, but any tips and comments are >>> very welcome. >>> >>> Best, >>> >>> Christian >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rax20037 at gmail.com Thu Nov 5 09:39:59 2015 From: rax20037 at gmail.com (Raul Huertas) Date: Thu, 5 Nov 2015 09:39:59 -0500 Subject: [vtkusers] QMainWindow+QVTKWidget issues on Mac In-Reply-To: References: <3DA4B589-1049-4C91-A3C3-6ED473C765E7@gmail.com> Message-ID: <9C75C7DE-AB6D-4FDA-BC58-C1F54C9DA574@gmail.com> The last line is: w->setLayout->(ly) > El 4 nov. 2015, a las 3:22 p.m., Christian Askeland escribi?: > > That's very interesting. In my example c, replacing QVTKWidget with QVTKWidget2 gives exactly the same result. Do you have any code showing the improvement? Do you, for example, wrap the QVTKWidget2 in anything? > > -Christian > >> On Wed, Nov 4, 2015 at 4:56 AM, Raul Huertas wrote: >> I had similar issues, use QVTKWidget2. >> >> >> >>> El 3 nov. 2015, a las 4:10 p.m., Christian Askeland escribi?: >>> >>> Hi all, >>> >>> I have an issue with QMainWindow when using a QVTKWidget as the centralwidget. Both the Toolbars and DockWidgets get messed up, meaning that for some toolbar elements get unclickable after some reordering of the elements, and moving DockWidgets causes a large white square to appear. >>> >>> The following snippet produces a white square over the window when attempting to dock DockWidget "B" onto Dockwidget "A": >>> (A full compiling version is also available at https://github.com/christiana/issue1044) >>> >>> main.cpp: >>> >>> int main(int argc, char *argv[]) >>> { >>> QApplication app(argc, argv); >>> >>> MainWindow window; >>> window.resize(800,500); >>> window.show(); >>> >>> return app.exec(); >>> } >>> >>> MainWindow.cpp: >>> >>> MainWindow::MainWindow() >>> { >>> QVTKWidget* widget = new QVTKWidget(); >>> this->setCentralWidget(widget); >>> >>> // The hidden toolbar makes the bug more obvious. >>> // Without this the drag/drop of QDockWidgets is still messed up. >>> this->addHiddenToolbar(); >>> >>> // drag A on top of B -> white square appears (if not already present at startup) >>> this->addDock("A"); >>> this->addDock("B"); >>> } >>> >>> void MainWindow::addHiddenToolbar() >>> { >>> QToolBar* toolbar = new QToolBar("FooBar"); >>> this->addToolBar(toolbar); >>> toolbar->hide(); >>> toolbar->addAction("Foo"); >>> } >>> >>> void MainWindow::addDock(QString name) >>> { >>> QDockWidget* dockWidget = new QDockWidget(name, this); >>> dockWidget->setWidget(new QLabel(name)); >>> this->addDockWidget(Qt::LeftDockWidgetArea, dockWidget); >>> } >>> >>> This seems to have been present since Qt 5.0, >>> and is still there with VTK 6.3 and Qt 5.5.1. >>> Mac only (OSX10.8-10.11). >>> >>> I'll continue working on this issue, but any tips and comments are >>> very welcome. >>> >>> Best, >>> >>> Christian >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kekko84 at gmail.com Thu Nov 5 11:55:21 2015 From: kekko84 at gmail.com (francesco.argese) Date: Thu, 5 Nov 2015 09:55:21 -0700 (MST) Subject: [vtkusers] Error porting from VTK 5.10 to VTK 6.1 Message-ID: <1446742521422-5734818.post@n5.nabble.com> Hello, I'm having problems trying to port an application from VTK 5.10 to VTK 6.1. The application is a simple LSDyna reader which loads the frames of the animation and stores them in a vector of actors; then it uses them for a conversion. The only modification needed to compile the code with VTK 6.1 is the following one: #ifdef __VTK_5__ mapper.at(k)->SetInput(myData.at(k).GetPointer()); #else mapper.at(k)->SetInputData(myData.at(k).GetPointer()); #endif The error at runtime is generated when I call SetMapper function. The entire code with a note on the runtime error is below. What could be the problem? Francesco ---------------------------- CODE (BEGIN) ----------------------------------------- int main(int argc, char **argv) { // 0) Parse command line arguments. First argument is path of dir containing LS-DYNA files if(argc != 2) { std::cout << "Usage: " << argv[0] << " directory path" << std::endl; return EXIT_FAILURE; } std::string dir= argv[1]; // Save command-line argument to dir variable // 1) Use lsDyna reader to read file from lsDyna output vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(dir.c_str()); reader->Update(); // Extract a vector of actors from lsDynaReader std::vector>> vectorOfFrames; // every frame is a vector of actor for(unsigned int i = 0; i < reader->GetNumberOfTimeSteps(); i++) // loop over frames { // Set frame number and update reader->SetTimeStep(i); reader->Update(); vtkMultiBlockDataSet* mbds = reader->GetOutput(); std::vector> mapper; std::vector> myData; std::vector> actorsForThisFrame; for(unsigned int k=0; k<=mbds->GetNumberOfBlocks(); k++) { // Define a new mapper (process object to be related to the new vtkActor) and add it to vector of mappers vtkSmartPointer newMapper = vtkSmartPointer::New(); // newMapper->SetScalarRange(0, 10); mapper.push_back(newMapper); // Take vtkDataSet extracted from multiBlockDataset extracted from lsDynaReader myData.push_back((vtkDataSet *)mbds->GetBlock(k)); // Set dataset inserted as last mapper input #ifdef __VTK_5__ mapper.at(k)->SetInput(myData.at(k).GetPointer()); #else mapper.at(k)->SetInputData(myData.at(k).GetPointer()); #endif // add a new vtkactor to vector of vtkActors actorsForThisFrame.push_back(vtkSmartPointer::New()); // Set mapper created as mapper of the vtkActor actorsForThisFrame.at(k)->SetMapper(mapper.at(k).GetPointer()); // Here there is the run time error!!! } vectorOfFrames.push_back(actorsForThisFrame); } ---------------------------- CODE (END) ----------------------------------------- -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-porting-from-VTK-5-10-to-VTK-6-1-tp5734818.html Sent from the VTK - Users mailing list archive at Nabble.com. From laysrodriguessilva at gmail.com Thu Nov 5 12:39:51 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Thu, 5 Nov 2015 15:39:51 -0200 Subject: [vtkusers] Cmake Error Could not find Qt4 Message-ID: Hi folks! I'm trying to compile Vtk 6.2/6.3 on Fedora and the cmake returns a error: CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find Qt4 (missing: QT_QTWEBKIT_INCLUDE_DIR QT_QTWEBKIT_LIBRARY) (found version "4.8.6") Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindQt4.cmake:1333 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) GUISupport/QtWebkit/CMakeLists.txt:22 (find_package) Fedora dont have qt4 on repository and i have some libraries installed on qt4: /usr/lib/qt4 /usr/lib64/qt4 /usr/share/qt4 What should i do? -- __ *Lays Rodrigues* *Developer Front-End at Br-Print3D Project* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Nov 5 13:18:54 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 5 Nov 2015 13:18:54 -0500 Subject: [vtkusers] Error porting from VTK 5.10 to VTK 6.1 In-Reply-To: <1446742521422-5734818.post@n5.nabble.com> References: <1446742521422-5734818.post@n5.nabble.com> Message-ID: Could you provide some more information that might be helpful for debugging: 1). Are you using CMake to configure your project? 2). Could you provide a stack trace? Thanks, Cory On Thu, Nov 5, 2015 at 11:55 AM, francesco.argese wrote: > Hello, > > I'm having problems trying to port an application from VTK 5.10 to VTK 6.1. > > The application is a simple LSDyna reader which loads the frames of the > animation and stores them in a vector of actors; then it uses them for a > conversion. > > The only modification needed to compile the code with VTK 6.1 is the > following one: > #ifdef __VTK_5__ > mapper.at(k)->SetInput(myData.at(k).GetPointer()); > #else > mapper.at(k)->SetInputData(myData.at(k).GetPointer()); > #endif > > The error at runtime is generated when I call SetMapper function. > > The entire code with a note on the runtime error is below. > > What could be the problem? > > Francesco > > > ---------------------------- CODE (BEGIN) > ----------------------------------------- > int main(int argc, char **argv) > { > // 0) Parse command line arguments. First argument is path of dir > containing LS-DYNA files > if(argc != 2) > { > std::cout << "Usage: " << argv[0] << " directory path" << > std::endl; > return EXIT_FAILURE; > } > std::string dir= argv[1]; // Save command-line argument to dir > variable > > // 1) Use lsDyna reader to read file from lsDyna output > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName(dir.c_str()); > reader->Update(); > > // Extract a vector of actors from lsDynaReader > std::vector>> > vectorOfFrames; > // every frame is a vector of actor > for(unsigned int i = 0; i < reader->GetNumberOfTimeSteps(); i++) > // loop > over frames > { > // Set frame number and update > reader->SetTimeStep(i); > reader->Update(); > > vtkMultiBlockDataSet* mbds = reader->GetOutput(); > > std::vector> mapper; > std::vector> myData; > > std::vector> > actorsForThisFrame; > > for(unsigned int k=0; k<=mbds->GetNumberOfBlocks(); k++) > { > // Define a new mapper (process object to be > related to the new vtkActor) > and add it to vector of mappers > vtkSmartPointer newMapper = > vtkSmartPointer::New(); > // newMapper->SetScalarRange(0, 10); > mapper.push_back(newMapper); > > // Take vtkDataSet extracted from > multiBlockDataset extracted from > lsDynaReader > myData.push_back((vtkDataSet *)mbds->GetBlock(k)); > > // Set dataset inserted as last mapper input > #ifdef __VTK_5__ > mapper.at > (k)->SetInput(myData.at(k).GetPointer()); > #else > mapper.at > (k)->SetInputData(myData.at(k).GetPointer()); > #endif > > // add a new vtkactor to vector of vtkActors > > actorsForThisFrame.push_back(vtkSmartPointer::New()); > > // Set mapper created as mapper of the vtkActor > actorsForThisFrame.at(k)->SetMapper(mapper.at(k).GetPointer()); > // Here > there is the run time error!!! > } > > vectorOfFrames.push_back(actorsForThisFrame); > } > ---------------------------- CODE (END) > ----------------------------------------- > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Error-porting-from-VTK-5-10-to-VTK-6-1-tp5734818.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Thu Nov 5 16:48:42 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Thu, 5 Nov 2015 14:48:42 -0700 Subject: [vtkusers] Select active renderer for interaction Message-ID: I have a scenario where I have two vtkRenderer objects that occupy the entire viewport, one on layer 0 and another on layer 1. What is the correct method to select which renderer is active in the interactor? I would like to make a keyboard event to switch between which rendered object may be manipulated via the mouse, is this sort of thing possible? Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From saeedbakhshmand at gmail.com Thu Nov 5 19:27:04 2015 From: saeedbakhshmand at gmail.com (Saeed Mahdizadeh Bakhshmand) Date: Thu, 5 Nov 2015 19:27:04 -0500 Subject: [vtkusers] vtkselectpolydata -- How to get indices of selected cells(lines)? Message-ID: Hello, I am working on selecting and extracting a subset of lines from a vtkpolydata (PD) that pass through a vtkpoints (selectionPoints). How can I access to indices of selected lines? Also based on below code, output of loop is an empty polydata! Here is my sample code: loop = vtk.vtkSelectPolyData() loop.SetInputData(PD) loop.SetLoop(selectionPoints) loop.GenerateSelectionScalarsOff() I would appreciate any help. Best, Saeed -------------- next part -------------- An HTML attachment was scrubbed... URL: From audrius at tomographix.com Thu Nov 5 23:19:15 2015 From: audrius at tomographix.com (Audrius Stundzia) Date: Thu, 05 Nov 2015 23:19:15 -0500 Subject: [vtkusers] Heap corruption | vtkLookupTable? Message-ID: <1446783555.4100604.430683297.52DA04C2@webmail.messagingengine.com> Dear All, OS: Windows 10 x64 IDE: MS VS 2015 VTK: 6.3.0 x64 build I am getting a "heap corruption" message when a vtkRenderWindow is closed and the vtkRenderWindowInteractor is stopped. Specifically the line renderWindowInteractor->TerminateApp(); in a callback function static void KeyPressCallbackFunction The relevant code fragments, appended below, are conventional texture mapping of an image to a plane. This "heap corruption" did not occur in Windows 8.1 x64; MS VS 2010; VTK 5.10.1 x64 build >From the call stack it appears to due to a problem with deleting an instantiation of vtkLoopupTable: vtkCommonCore-6.3.dll!vtkDataArrayTemplate::DeleteArray() Line 214 C++ vtkCommonCore-6.3.dll!vtkDataArrayTemplate::~vtkDataArrayTemplate() Line 92 C++ vtkCommonCore- 6.3.dll!vtkUnsignedCharArray::~vtkUnsignedCharArray() Line 37 C++ [External Code] vtkCommonCore- 6.3.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase * __formal, int check) Line 232 C++ vtkCommonCore- 6.3.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o, int check) Line 901 C++ vtkCommonCore-6.3.dll!vtkObjectBase::UnRegister(vtkObjectBase * o) Line 190 C++ vtkCommonCore-6.3.dll!vtkLookupTable::~vtkLookupTable() Line 89C++ [External Code] vtkCommonCore- 6.3.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase * __formal, int check) Line 232 C++ vtkCommonCore- 6.3.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o, int check) Line 901 C++ vtkCommonCore-6.3.dll!vtkObjectBase::UnRegister(vtkObjectBase * o) Line 190 C++ vtkCommonCore- 6.3.dll!vtkSmartPointerBase::~vtkSmartPointerBase() Line 62 C++ [External Code] Any insight would be appreciated. Regards, Audrius //--------------------------------------- // Start: relevant code fragment //--------------------------------------- { . . . vtkSmartPointer?camera_ = vtkSmartPointer::New(); camera_->SetPosition( 0.0, 0.0, -1.0); camera_->SetRoll(180.0); camera_->Zoom( zoomFactor_ ); //--------------- vtkSmartPointer?renderer_ = vtkSmartPointer::New(); renderer_- >SetActiveCamera(camera_); renderer_->SetBackground( 0.0, 0.0, 0.0 ); //--------------- vtkSmartPointer?renderWindow_ = vtkSmartPointer::New(); renderWindow_->AddRenderer( renderer_ ); renderWindow_->SetSize ( winSizeX_ , winSizeY_ ); renderWindow_- >SetPosition ( winPosX_ , winPosY_ ); renderWindow_->SwapBuffersOn(); //--------------- vtkSmartPointer renderWindowInteractor_ = vtkSmartPointer::New(); renderWindowInteractor_- >SetRenderWindow( renderWindow_); vtkSmartPointer?keyPressCallback_ = vtkSmartPointer::New(); keyPressCallback_- >SetCallback( advDiagnosticDisplay::KeyPressCallbackFunction); renderWindowInteractor_->AddObserver ( vtkCommand::KeyPressEvent , keyPressCallback_ ); // Build a colour map vtkSmartPointer colourMap_ = vtkSmartPointer::New(); InitializeColourMap(colourMap_); // Apply the texture vtkSmartPointer texture_ = vtkSmartPointer::New(); if(interpolation_) texture_- >InterpolateOn(); else texture_->InterpolateOff(); texture_- >RepeatOff(); texture_->SetQualityTo32Bit(); texture_- >MapColorScalarsThroughLookupTableOn(); texture_->SetInputData( imageReslice_- >GetOutput()); texture_->SetLookupTable( colourMap_); //--------------- vtkSmartPointer planeSource_ = vtkSmartPointer::New(); planeSource_->SetResolution( 1, 1 ); planeSource_->SetPoint1( eX_, 0.0, 0.0); planeSource_->SetPoint2( 0.0, eY_, 0.0); planeSource_->SetCenter( centre_.data()); planeSource_- >SetNormal( 0.0, 0.0, 1.0); planeSource_->Update(); //--------------- vtkSmartPointer mapper_ = vtkSmartPointer::New(); mapper_- >ScalarVisibilityOff(); mapper_->SetInputData( planeSource_- >GetOutput()); mapper_->Update(); //--------------- vtkSmartPointer property_ = vtkSmartPointer::New(); property_->SetOpacity( opacity_); //--------------- vtkSmartPointer actor_ = vtkSmartPointer::New(); actor_->SetProperty( property_ ); actor_- >SetTexture( texture_ ); actor_->SetMapper( mapper_ ); //--------------- renderer_->AddActor(actor_); renderer_->ResetCamera(); renderWindow_->Render(); renderWindow_->SetWindowName( "Window name here"); renderWindowInteractor_->Start(); . . . } void InitializeColourMap(vtkSmartPointer& colourMap) { //--------------- colourMap->SetNumberOfColors(nImageColours_ + 1); colourMap- >SetTableRange (minScalar_ , maxScalar_); if (colour_) { colourMap->SetHueRange(0.666667f, 0.0f); colourMap- >Build(); colourMap->SetTableValue(0, 0.0f, 0.0f, 0.0f, 0.0f); } else { colourMap->SetHueRange(0.5f, 0.5f); colourMap->SetSaturationRange(0.0f, 1.0f); colourMap->Build(); colourMap->SetTableValue(0, 0.0f, 0.0f, 0.0f, 0.0f); for (int iC = 1; iC <= nImageColours_; ++iC) { const float val = static_cast(iC) / static_cast(nImageColours_ + 1); colourMap- >SetTableValue (iC , val , val , val , 1.0f); } } } // // vtk callback function: stop rendering and close window // static void KeyPressCallbackFunction ( vtkObject* caller , long unsigned int vtkNotUsed(eventId) , void* vtkNotUsed(clientData) , void* vtkNotUsed(callData)) { vtkRenderWindowInteractor* renderWindowInteractor = dynamic_cast(caller); // Close the window vtkRenderWindow* renderWindow = renderWindowInteractor- >GetRenderWindow(); renderWindow->Finalize(); // Stop the interactor // When the next line is executed, the heap corruption message is generated renderWindowInteractor->TerminateApp(); std::cout << "Window closed." << std::endl; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam24666806 at gmail.com Fri Nov 6 02:47:31 2015 From: sam24666806 at gmail.com (LaChen) Date: Fri, 6 Nov 2015 00:47:31 -0700 (MST) Subject: [vtkusers] How to set const lookup table into vtkPiecewiseFunction? Message-ID: <1446796051189-5734831.post@n5.nabble.com> Hi all, I needs to use my lookup table for volume rendering. But we only can set transfer function by vtkPiecewiseFunction. If I needs to set look up table, how can I set it?? Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-set-const-lookup-table-into-vtkPiecewiseFunction-tp5734831.html Sent from the VTK - Users mailing list archive at Nabble.com. From kekko84 at gmail.com Fri Nov 6 03:30:49 2015 From: kekko84 at gmail.com (francesco.argese) Date: Fri, 6 Nov 2015 01:30:49 -0700 (MST) Subject: [vtkusers] Error porting from VTK 5.10 to VTK 6.1 In-Reply-To: References: <1446742521422-5734818.post@n5.nabble.com> Message-ID: <1446798649517-5734832.post@n5.nabble.com> 1) No, I'm not using CMake. I'm using Visual Studio. 2) Stack trace after run-time error: Thanks, Francesco -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-porting-from-VTK-5-10-to-VTK-6-1-tp5734818p5734832.html Sent from the VTK - Users mailing list archive at Nabble.com. From romain.leguay at gmail.com Fri Nov 6 04:22:04 2015 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Fri, 6 Nov 2015 10:22:04 +0100 Subject: [vtkusers] Save a vtkContourTriangulator output inside a PNG Message-ID: Hello everyone, In purpose to create a series of pictures (with the same size 512*512 for example), I cut a mesh along an axis (X, Y or Z) with vtkCutter, then I triangulate those contours with vtkContourTriangulator. I obtain some "flat" vtkPolydata*s* (one per cut). Now, I want to save all those "flat" meshes to 2D images with fixed size. I saw on the wiki ( http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData) how to convert a vtkPolydata in vtkImageData, but in this case, my vtkPolydata is in a plane (the output of vtkContourTriangulator) so the dimension of the white image is 0 or negative because of this part of code: vtkSmartPointer whiteImage = vtkSmartPointer::New(); double bounds[6]; polydata->GetBounds(bounds); double spacing[3]; // desired volume spacing spacing[0] = 0.5; spacing[1] = 0.5; spacing[2] = 0.5; whiteImage->SetSpacing(spacing); // compute dimensions int dim[3]; for (int i = 0; i < 3; i++) { dim[i] = static_cast(ceil((bounds[i * 2 + 1] - bounds[i * 2]) / spacing[i])); // One of the dimension is 0 } whiteImage->SetDimensions(dim); whiteImage->SetExtent(0, dim[0] - 1, 0, dim[1] - 1, 0, dim[2] - 1); // Here I don't know if there is other choice to convert a polydata to an image but this code always give some black pictures. I'm not sure if I use the good filter to convert my polydata to a 2D image but I don't find anything. Do you have any clues? Thanks, Romain -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaya.onur.dag at gmail.com Fri Nov 6 04:43:06 2015 From: kaya.onur.dag at gmail.com (Kaya Onur Dag) Date: Fri, 6 Nov 2015 10:43:06 +0100 Subject: [vtkusers] how to avoid overlapping (ghost) layer in *.pvti files Message-ID: I have my own cfd solver in which I was using *.vti for paraview input but decided to use parallel data write with *.pvti format and do node parallelisation. My *.pvti file is like : The problem I am facing is I am having a gap in between z-axis 15-16 - which paraview complains. I know that the solution is to have a ghost (overlapping) layer (can't understand why since I am using point data?), and the issue is that my code is not capable of generating overlapping nodes, unless I code it up and manually transfer ghost layers at each data output stage for the sake of being able to write data in parallel but it feels like an overkill... Any suggestions? Thanks in advance. Kaya -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Nov 6 08:15:52 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 6 Nov 2015 06:15:52 -0700 Subject: [vtkusers] Save a vtkContourTriangulator output inside a PNG In-Reply-To: References: Message-ID: Hi Romain, The vtkPolyDataToImageStencil class needs a "hollow" shape as input, either a 3D surface or a 2D contour. If you fill the contour, then it can't be used by vtkPolyDataToImageStencil. - David On Fri, Nov 6, 2015 at 2:22 AM, Romain LEGUAY wrote: > Hello everyone, > > In purpose to create a series of pictures (with the same size 512*512 for > example), I cut a mesh along an axis (X, Y or Z) with vtkCutter, then I > triangulate those contours with vtkContourTriangulator. I obtain some > "flat" vtkPolydata*s* (one per cut). Now, I want to save all those "flat" > meshes to 2D images with fixed size. > I saw on the wiki ( > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData) > how to convert a vtkPolydata in vtkImageData, but in this case, my > vtkPolydata is in a plane (the output of vtkContourTriangulator) so the > dimension of the white image is 0 or negative because of this part of code: > > vtkSmartPointer whiteImage = > vtkSmartPointer::New(); > double bounds[6]; > polydata->GetBounds(bounds); > double spacing[3]; // desired volume spacing > spacing[0] = 0.5; > spacing[1] = 0.5; > spacing[2] = 0.5; > whiteImage->SetSpacing(spacing); > > // compute dimensions > int dim[3]; > for (int i = 0; i < 3; i++) > { > dim[i] = static_cast(ceil((bounds[i * 2 + 1] - bounds[i * 2]) / > spacing[i])); // One of the dimension is 0 > } > whiteImage->SetDimensions(dim); > whiteImage->SetExtent(0, dim[0] - 1, 0, dim[1] - 1, 0, dim[2] - 1); // > Here > > > I don't know if there is other choice to convert a polydata to an image > but this code always give some black pictures. > I'm not sure if I use the good filter to convert my polydata to a 2D image > but I don't find anything. > > Do you have any clues? > > Thanks, > > Romain > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Nov 6 09:24:20 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 6 Nov 2015 09:24:20 -0500 Subject: [vtkusers] vtk 6.3.0 | OpenGL2: OpenGL errors? In-Reply-To: <1442855378.1815151.389566673.4FEAA289@webmail.messagingengine.com> References: <1442855378.1815151.389566673.4FEAA289@webmail.messagingengine.com> Message-ID: <6d3e51269a6d4af1106c10f7566bad99@mail.gmail.com> With the new rendering backend in VTK we are using a more recent version of OpenGL (version 3.2 typically). There are still some spots where old calls are made that no longer work with newer versions of OpenGL. As we find them we fix them so they should be fairly rare with the current VTK tree now. Typically they just produce an error and get ignored by OpenGL and everything works. Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of *Audrius Stundzia *Sent:* Monday, September 21, 2015 1:10 PM *To:* VTK Users *Subject:* [vtkusers] vtk 6.3.0 | OpenGL2: OpenGL errors? Hello, OS: Windows 10 x64 IDE: MS VS2015 x64 CMake: VTK_RENDERING_BACKEND OpenGL2 VTK_REPORT_OPENGL_ERRORS [Checkmark - On] VTK: 6.3.0 x64 Debug build In stdafx.h, have #include Encountering the following runtime error message: Error in ...\OpenGL2\vtkOpenGLRenderer.cxx, line 351 vtkOpenGLRenderer [...]: failed after Clear 16 OpenGL errors detected 0:[1282] Invalid Operation ... 15:[1282] Invalid Operation in previously working code, in vtk 5.10.1, that texture maps an image onto a plane. The image is displayed as before, however, it is accompanied by the above error message. A Google search suggests that this may be a GLSL version issue: https://stackoverflow.com/questions/31323870/opengl-error-1282-invalid-operation-when-using-texture Also, attempting to add the vtk line of code vtkOpenGLClearErrorMacro(); generates the following error message: error LNK2019: unresolved external symbol __imp_glGetError referenced in function "void __cdecl vtkClearOpenGLErrors(unsigned int)" (?vtkClearOpenGLErrors@@YAXI at Z) Please advise. -------------- next part -------------- An HTML attachment was scrubbed... URL: From romain.leguay at gmail.com Fri Nov 6 09:32:18 2015 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Fri, 6 Nov 2015 15:32:18 +0100 Subject: [vtkusers] Save a vtkContourTriangulator output inside a PNG In-Reply-To: References: Message-ID: Thanks David for your answer! I just saw on the vtkPolyDataToImageStencil documentation that the contour must be align throw the Z planes. I use vtkCutter to cut my mesh along Z-axis but all the pictures saved are black. I attached my code and the CMakeLists.txt. Is there another way to "project" my filled contour on an image? Thanks again. Romain 2015-11-06 14:15 GMT+01:00 David Gobbi : > Hi Romain, > > The vtkPolyDataToImageStencil class needs a "hollow" shape as input, > either a 3D surface or a 2D contour. If you fill the contour, then it > can't > be used by vtkPolyDataToImageStencil. > > - David > > > On Fri, Nov 6, 2015 at 2:22 AM, Romain LEGUAY > wrote: > >> Hello everyone, >> >> In purpose to create a series of pictures (with the same size 512*512 for >> example), I cut a mesh along an axis (X, Y or Z) with vtkCutter, then I >> triangulate those contours with vtkContourTriangulator. I obtain some >> "flat" vtkPolydata*s* (one per cut). Now, I want to save all those >> "flat" meshes to 2D images with fixed size. >> I saw on the wiki ( >> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData) >> how to convert a vtkPolydata in vtkImageData, but in this case, my >> vtkPolydata is in a plane (the output of vtkContourTriangulator) so the >> dimension of the white image is 0 or negative because of this part of code: >> >> vtkSmartPointer whiteImage = >> vtkSmartPointer::New(); >> double bounds[6]; >> polydata->GetBounds(bounds); >> double spacing[3]; // desired volume spacing >> spacing[0] = 0.5; >> spacing[1] = 0.5; >> spacing[2] = 0.5; >> whiteImage->SetSpacing(spacing); >> >> // compute dimensions >> int dim[3]; >> for (int i = 0; i < 3; i++) >> { >> dim[i] = static_cast(ceil((bounds[i * 2 + 1] - bounds[i * 2]) / >> spacing[i])); // One of the dimension is 0 >> } >> whiteImage->SetDimensions(dim); >> whiteImage->SetExtent(0, dim[0] - 1, 0, dim[1] - 1, 0, dim[2] - 1); // >> Here >> >> >> I don't know if there is other choice to convert a polydata to an image >> but this code always give some black pictures. >> I'm not sure if I use the good filter to convert my polydata to a 2D >> image but I don't find anything. >> >> Do you have any clues? >> >> Thanks, >> >> Romain >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From audrius at tomographix.com Fri Nov 6 09:38:40 2015 From: audrius at tomographix.com (Audrius Stundzia) Date: Fri, 06 Nov 2015 09:38:40 -0500 Subject: [vtkusers] vtk 6.3.0 | OpenGL2: OpenGL errors? In-Reply-To: <6d3e51269a6d4af1106c10f7566bad99@mail.gmail.com> References: <1442855378.1815151.389566673.4FEAA289@webmail.messagingengine.com> <6d3e51269a6d4af1106c10f7566bad99@mail.gmail.com> Message-ID: <1446820720.50427.431067681.34426C1A@webmail.messagingengine.com> The OpenGL bug I posted Sept 21 was resolved. Thank you. On Fri, Nov 6, 2015, at 09:24, Ken Martin wrote: > With the new rendering backend in VTK we are using a more recent > version of OpenGL (version 3.2 typically).? There are still some spots > where old calls are made that no longer work with newer versions of > OpenGL. As we find them we fix them so they should be fairly rare with > the current VTK tree now.? Typically they just produce an error and > get ignored by OpenGL and everything works. > > Thanks > Ken > > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > ken.martin at kitware.com > 919 869-8871 (w) > > > 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. > > *From:* vtkusers [mailto:vtkusers-bounces at vtk.org] *On Behalf Of > *Audrius Stundzia *Sent:* Monday, September 21, 2015 1:10 PM *To:* VTK > Users *Subject:* [vtkusers] vtk 6.3.0 | OpenGL2: OpenGL errors? > > Hello, > > OS: Windows 10 x64 > IDE: MS VS2015 x64 > CMake: > VTK_RENDERING_BACKEND OpenGL2 > VTK_REPORT_OPENGL_ERRORS [Checkmark - On] > VTK: 6.3.0 x64 Debug build > > In stdafx.h, have > > #include > > Encountering the following runtime error message: > > Error in ...\OpenGL2\vtkOpenGLRenderer.cxx, line 351 > vtkOpenGLRenderer [...]: failed after Clear 16 OpenGL errors detected > :[1282] Invalid Operation > ... > 15:[1282] Invalid Operation > > in previously working code, in vtk 5.10.1, that texture maps an image > onto a plane. > The image is displayed as before, however, it is accompanied by the > above error message. > > A Google search suggests that this may be a GLSL version issue: > > https://stackoverflow.com/questions/31323870/opengl-error-1282-invalid-operation-when-using-texture > > Also, attempting to add the vtk line of code > > vtkOpenGLClearErrorMacro(); > > generates the following error message: > > error LNK2019: unresolved external symbol __imp_glGetError referenced > in function "void __cdecl vtkClearOpenGLErrors(unsigned int)" > (?vtkClearOpenGLErrors@@YAXI at Z) > > Please advise. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Nov 6 09:41:39 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 6 Nov 2015 09:41:39 -0500 Subject: [vtkusers] Save a vtkContourTriangulator output inside a PNG In-Reply-To: References: Message-ID: Romain, Let's pop up a level and discuss what you are trying to do. It sounds like you are trying to voxelize a geometry into a 3D image. Is that right? You don't have to use the vtkCutter at all but rather set your geometry as the input for vtkPolyDataToImageStencil. I have used this class for voxelization in the past and it works very well. HTH, Cory On Fri, Nov 6, 2015 at 9:32 AM, Romain LEGUAY wrote: > Thanks David for your answer! > > I just saw on the vtkPolyDataToImageStencil documentation that the contour > must be align throw the Z planes. > > I use vtkCutter to cut my mesh along Z-axis but all the pictures saved are > black. I attached my code and the CMakeLists.txt. > > Is there another way to "project" my filled contour on an image? > > Thanks again. > > Romain > > > > 2015-11-06 14:15 GMT+01:00 David Gobbi : > >> Hi Romain, >> >> The vtkPolyDataToImageStencil class needs a "hollow" shape as input, >> either a 3D surface or a 2D contour. If you fill the contour, then it >> can't >> be used by vtkPolyDataToImageStencil. >> >> - David >> >> >> On Fri, Nov 6, 2015 at 2:22 AM, Romain LEGUAY >> wrote: >> >>> Hello everyone, >>> >>> In purpose to create a series of pictures (with the same size 512*512 >>> for example), I cut a mesh along an axis (X, Y or Z) with vtkCutter, then I >>> triangulate those contours with vtkContourTriangulator. I obtain some >>> "flat" vtkPolydata*s* (one per cut). Now, I want to save all those >>> "flat" meshes to 2D images with fixed size. >>> I saw on the wiki ( >>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData) >>> how to convert a vtkPolydata in vtkImageData, but in this case, my >>> vtkPolydata is in a plane (the output of vtkContourTriangulator) so the >>> dimension of the white image is 0 or negative because of this part of code: >>> >>> vtkSmartPointer whiteImage = >>> vtkSmartPointer::New(); >>> double bounds[6]; >>> polydata->GetBounds(bounds); >>> double spacing[3]; // desired volume spacing >>> spacing[0] = 0.5; >>> spacing[1] = 0.5; >>> spacing[2] = 0.5; >>> whiteImage->SetSpacing(spacing); >>> >>> // compute dimensions >>> int dim[3]; >>> for (int i = 0; i < 3; i++) >>> { >>> dim[i] = static_cast(ceil((bounds[i * 2 + 1] - bounds[i * 2]) / >>> spacing[i])); // One of the dimension is 0 >>> } >>> whiteImage->SetDimensions(dim); >>> whiteImage->SetExtent(0, dim[0] - 1, 0, dim[1] - 1, 0, dim[2] - 1); // >>> Here >>> >>> >>> I don't know if there is other choice to convert a polydata to an image >>> but this code always give some black pictures. >>> I'm not sure if I use the good filter to convert my polydata to a 2D >>> image but I don't find anything. >>> >>> Do you have any clues? >>> >>> Thanks, >>> >>> Romain >>> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dakopoulos at gmail.com Fri Nov 6 10:22:30 2015 From: dakopoulos at gmail.com (dakopoulos) Date: Fri, 6 Nov 2015 08:22:30 -0700 (MST) Subject: [vtkusers] vtkInteractorStyleRubberBand3D zoom selection Message-ID: <1446823350392-5734844.post@n5.nabble.com> Hello. I am using vtkInteractorStyleRubberBand3D and I want to zoom on the selected (left-click-released) area. I can find the coordinates on the display coordinate system and I am getting confused on how to reposition my camera. main.cpp Any help is really appreciated. Best Dimitris // using vtk-6.2 on linux with gcc-4.8.2 -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkInteractorStyleRubberBand3D-zoom-selection-tp5734844.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Fri Nov 6 10:53:38 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 6 Nov 2015 10:53:38 -0500 Subject: [vtkusers] Error porting from VTK 5.10 to VTK 6.1 In-Reply-To: <1446798649517-5734832.post@n5.nabble.com> References: <1446742521422-5734818.post@n5.nabble.com> <1446798649517-5734832.post@n5.nabble.com> Message-ID: Francesco, If you are using Visual Studio directly, then you need to define some symbols either in your code or as /D options. This sets up VTK's object factory so that you can instantiate vtkActors - if you don't define these symbols, all invocations to vtkActor::New() will return NULL, which is leading to the error you are seeing. See these threads for some details on using VTK_AUTOINIT definitions to set up the VTK factory: http://vtk.1045678.n5.nabble.com/probe-vtk6-installation-for-AUTOINIT-values-td5715271.html http://vtk.1045678.n5.nabble.com/VTK-6-1-linking-autoinit-td5723342.html There is also some useful information here: http://www.vtk.org/Wiki/VTK/Build_System_Migration#Implementation_Modules HTH, Cory On Fri, Nov 6, 2015 at 3:30 AM, francesco.argese wrote: > 1) No, I'm not using CMake. I'm using Visual Studio. > > 2) Stack trace after run-time error: > > > Thanks, > Francesco > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Error-porting-from-VTK-5-10-to-VTK-6-1-tp5734818p5734832.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From henry.blanco at cbiomed.cu Fri Nov 6 10:52:59 2015 From: henry.blanco at cbiomed.cu (Henry Blanco) Date: Fri, 06 Nov 2015 10:52:59 -0500 Subject: [vtkusers] help for rendering a large amount of images In-Reply-To: References: <1446505848.5730.6.camel@cohiba> <1446571996.31503.13.camel@cohiba> Message-ID: <1446825179.13628.6.camel@cohiba> Hello David, thanks for your help and sorry for the late reply, I've been absent for a couple of days. Well we're newbies on vtk, ... therefore it would nice if you give us more details on: 1- How to create a flat file from several images. I guess we have to use some vtk classes, but we don't know which one. 2- How to achieve the mapping from the flat file memory address to the vtkImageData. Thanks in advance, Henry On mar, 2015-11-03 at 11:03 -0700, David Gobbi wrote: > Hi Henry, > > > Please reply to the vtk list, not just to me. > > > You're requirement of rendering "thousands of medical images" is > way too vague. Do you need to render them all simultaneously, > i.e. will they all be on screen at the same time? I really do not > understand what you are trying to do. > > > The vtkImageDataStreamer will be no help to you, because it always > loads the entire volume. It's job is to pull the data through the > pipeline > in small chunks, but the end result is still that the whole volume > ends > up in memory. > > > Yes, vtkImageReslice can show a sagittal or coronal view by only > streaming a small part of the volume into memory, but this will only > work with certain reader classes. For example, the vtkTIFFReader > always reads entire slices, so it cannot read just one row of a > slice that vtkImageReslice can then incorporate into a sagittal view. > In fact, I think that only vtkImageReader2 can stream individual > rows or columns of an image from disk. The other readers can > only stream the data slice-by-slice. > > > You should seriously consider my recommendation of using memory > mapping. If you simply map a flat file to a memory address and then > use that memory address as a pixel data inside a vtkImageData, then > the operating system can make all the decisions about how and when > to load the data from disk. > > > - David > > > > On Tue, Nov 3, 2015 at 10:33 AM, Henry Blanco > wrote: > Thanks David for your soon reply. Ok, my problem is to load > and render thousands of medical images, > organized into series, by using VTK, but considering strong > limitations > in terms of RAM (e.g., only 128 or 256 MB of RAM available). > > To achieve this task, we have tried to use the > "vtkImageDataStreamer" > class, but we have failed. This class seems to load the whole > volume into > memory, therefore loading 2000 CT images (1GB) into memory may > fail if > we consider just 128 MB of RAM. > > We are thinking to partition the whole volume into K blocks > and to load > a block of images into memory just when it's needed. The > illusion of > having the whole volume loaded in memory could be achieved by > uploading/downloading one or more blocks of images to/from > memory when > needed. I'm wondering whether exist some vtk classes which can > be used > to picture a different view than the original (e.g., sagittal, > coronal, > or even oblique) without loading the whole volume of images. > > Henry > > On lun, 2015-11-02 at 17:29 -0700, David Gobbi wrote: > > What kind of views will you need? Do you just have to view > the > > original > > slices? If so, then the VTK pipeline's streaming will make > the job > > easy. > > If you need orthogonal or oblique views, things are more > difficult. > > Also, > > how is the data stored on disk? If the whole volume is > stored on disk > > as a single flat file, then you can memory map the file. > > > > > > - David > > > > On Mon, Nov 2, 2015 at 4:10 PM, Henry Blanco > > > wrote: > > Hello guys, I need some hints on how to render a > large amount > > of images > > (e.g., thousands of images) using just few RAM > resources > > (e.g., 128 MB) > > using the vtkImageReslice class for the whole > volume. > > > > Thanks in advance > > > > Henry > > > > > > From kekko84 at gmail.com Fri Nov 6 11:25:20 2015 From: kekko84 at gmail.com (francesco.argese) Date: Fri, 6 Nov 2015 09:25:20 -0700 (MST) Subject: [vtkusers] Error porting from VTK 5.10 to VTK 6.1 In-Reply-To: References: <1446742521422-5734818.post@n5.nabble.com> <1446798649517-5734832.post@n5.nabble.com> Message-ID: <1446827120209-5734847.post@n5.nabble.com> Thank you. I've solved adding the following preprocessor definitions to the Visual Studio project: vtkRenderingVolume_AUTOINIT=1(vtkRenderingVolumeOpenGL) vtkRenderingCore_INCLUDE=\"$(VTK_INC)/vtkRenderingCore_AUTOINIT_vtkInteractionStyle_vtkRenderingFreeType_vtkRenderingFreeTypeOpenGL_vtkRenderingOpenGL.h\" I've copied the header file from another VTK application developed with CMake. Thanks, Francesco -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-porting-from-VTK-5-10-to-VTK-6-1-tp5734818p5734847.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Nov 6 11:34:23 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 6 Nov 2015 09:34:23 -0700 Subject: [vtkusers] help for rendering a large amount of images In-Reply-To: <1446825179.13628.6.camel@cohiba> References: <1446505848.5730.6.camel@cohiba> <1446571996.31503.13.camel@cohiba> <1446825179.13628.6.camel@cohiba> Message-ID: Hi Henry, A "flat file" is a file whose layout on disk is identical to the needed layout of the data in memory. A flat file can be "memory mapped" so that data in the file can be accessed via a C/C++ pointer, even without loading the whole file into memory. Memory mapping and flat files are not part of VTK, so you have to create the flat file and memory-map it _before_ you pass the memory pointer to VTK. For more information on memory mapping, see e.g. https://en.wikipedia.org/wiki/Memory-mapped_file As an example, here is how I use a flat file with VTK in Python, in order to display a very large RGB image: import mmap import vtk f = open("earth.21601x10801.bin","rb") memory = mmap.mmap(f.fileno(),0,mmap.MAP_PRIVATE,mmap.PROT_READ) importer = vtk.vtkImageImport() importer.SetImportVoidPointer(memory) importer.SetDataScalarTypeToUnsignedChar() importer.SetNumberOfScalarComponents(3) importer.SetDataExtent(0,21600,0,10800,0,0) importer.SetWholeExtent(0,21600,0,10800,0,0) importer.SetDataOrigin(0,0,0) importer.SetDataSpacing(1,1,1) reslice = vtkImageReslice() reslice.SetInputConnection(importer.GetOutputPort()) # etcetera The same concept can be used in C++, you just need to store your entire data set as a huge flat file, use "mmap" (or an equivalent function) to map the file to memory, and then use vtkImageImport to allow the VTK pipeline to use the file as virtual memory. My advice is to read as much as you can about memory mapping and about how computers use virtual memory. This will be very useful knowledge if you are using a computer with limited memory. - David On Fri, Nov 6, 2015 at 8:52 AM, Henry Blanco wrote: > Hello David, thanks for your help and sorry for the late reply, I've > been absent for a couple of days. > Well we're newbies on vtk, ... therefore it would nice if you give us > more details on: > 1- How to create a flat file from several images. I guess we have to use > some vtk classes, but we don't know which one. > 2- How to achieve the mapping from the flat file memory address to the > vtkImageData. > > Thanks in advance, > > Henry > > On mar, 2015-11-03 at 11:03 -0700, David Gobbi wrote: > > Hi Henry, > > > > > > Please reply to the vtk list, not just to me. > > > > > > You're requirement of rendering "thousands of medical images" is > > way too vague. Do you need to render them all simultaneously, > > i.e. will they all be on screen at the same time? I really do not > > understand what you are trying to do. > > > > > > The vtkImageDataStreamer will be no help to you, because it always > > loads the entire volume. It's job is to pull the data through the > > pipeline > > in small chunks, but the end result is still that the whole volume > > ends > > up in memory. > > > > > > Yes, vtkImageReslice can show a sagittal or coronal view by only > > streaming a small part of the volume into memory, but this will only > > work with certain reader classes. For example, the vtkTIFFReader > > always reads entire slices, so it cannot read just one row of a > > slice that vtkImageReslice can then incorporate into a sagittal view. > > In fact, I think that only vtkImageReader2 can stream individual > > rows or columns of an image from disk. The other readers can > > only stream the data slice-by-slice. > > > > > > You should seriously consider my recommendation of using memory > > mapping. If you simply map a flat file to a memory address and then > > use that memory address as a pixel data inside a vtkImageData, then > > the operating system can make all the decisions about how and when > > to load the data from disk. > > > > > > - David > > > > > > > > On Tue, Nov 3, 2015 at 10:33 AM, Henry Blanco > > wrote: > > Thanks David for your soon reply. Ok, my problem is to load > > and render thousands of medical images, > > organized into series, by using VTK, but considering strong > > limitations > > in terms of RAM (e.g., only 128 or 256 MB of RAM available). > > > > To achieve this task, we have tried to use the > > "vtkImageDataStreamer" > > class, but we have failed. This class seems to load the whole > > volume into > > memory, therefore loading 2000 CT images (1GB) into memory may > > fail if > > we consider just 128 MB of RAM. > > > > We are thinking to partition the whole volume into K blocks > > and to load > > a block of images into memory just when it's needed. The > > illusion of > > having the whole volume loaded in memory could be achieved by > > uploading/downloading one or more blocks of images to/from > > memory when > > needed. I'm wondering whether exist some vtk classes which can > > be used > > to picture a different view than the original (e.g., sagittal, > > coronal, > > or even oblique) without loading the whole volume of images. > > > > Henry > > > > On lun, 2015-11-02 at 17:29 -0700, David Gobbi wrote: > > > What kind of views will you need? Do you just have to view > > the > > > original > > > slices? If so, then the VTK pipeline's streaming will make > > the job > > > easy. > > > If you need orthogonal or oblique views, things are more > > difficult. > > > Also, > > > how is the data stored on disk? If the whole volume is > > stored on disk > > > as a single flat file, then you can memory map the file. > > > > > > > > > - David > > > > > > On Mon, Nov 2, 2015 at 4:10 PM, Henry Blanco > > > > > wrote: > > > Hello guys, I need some hints on how to render a > > large amount > > > of images > > > (e.g., thousands of images) using just few RAM > > resources > > > (e.g., 128 MB) > > > using the vtkImageReslice class for the whole > > volume. > > > > > > Thanks in advance > > > > > > Henry > > > > > > > > > > > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From saeedbakhshmand at gmail.com Fri Nov 6 12:24:18 2015 From: saeedbakhshmand at gmail.com (Saeed Mahdizadeh Bakhshmand) Date: Fri, 6 Nov 2015 12:24:18 -0500 Subject: [vtkusers] [vtk-developers] How to change opacity/visibility of polyline In-Reply-To: References: Message-ID: Hello Mathieu, Thanks for your response, And this output should be saved into an vtkUnstructuredGrid or there is a better way to copy data from selection? Best, Saeed On Fri, Oct 30, 2015 at 3:03 AM, Mathieu Westphal < mathieu.westphal at kitware.com> wrote: > Hello > > No, but you can extract the cells you want to see, and display the output. > > Mathieu > > Mathieu Westphal > > On Thu, Oct 29, 2015 at 11:19 PM, Saeed Mahdizadeh Bakhshmand < > saeedbakhshmand at gmail.com> wrote: > >> Hello, >> >> Is there any way to toggle visibility of each line of a vtkpolydata (or >> vtkpolyline) independently? >> >> Best, >> Saeed >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From darya.yelshyna at yahoo.com Fri Nov 6 12:36:48 2015 From: darya.yelshyna at yahoo.com (Darya Yelshyna) Date: Fri, 6 Nov 2015 17:36:48 +0000 (UTC) Subject: [vtkusers] Problems using vtkConnectivityFilter on Image Data References: <1442227242.748773.1446831408868.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <1442227242.748773.1446831408868.JavaMail.yahoo@mail.yahoo.com> Hi everyone! I was trying to apply?vtkConnectivityFilter to vtkImageData, but the program crashes at this step."This application has requested the Runtime to terminate it in an unusual way." This is this a part of my code: dilateFilter = vtk.vtkImageContinuousDilate3D()dilateFilter.SetKernelSize(5, 5, 5)dilateFilter.SetInputConnection(logic2.GetOutputPort())dilateFilter.Update() connectFilter = vtk.vtkConnectivityFilter()connectFilter.SetExtractionModeToLargestRegion()connectFilter.SetInputConnection(dilateFilter.GetOutputPort())connectFilter.Update() I don't understand what is happening.. Can anybody help me? Thank you in advance. Best regards,Darya -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Nov 6 12:49:21 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 6 Nov 2015 10:49:21 -0700 Subject: [vtkusers] Problems using vtkConnectivityFilter on Image Data In-Reply-To: <1442227242.748773.1446831408868.JavaMail.yahoo@mail.yahoo.com> References: <1442227242.748773.1446831408868.JavaMail.yahoo.ref@mail.yahoo.com> <1442227242.748773.1446831408868.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Darya, The vtkConnectivityFilter is meant for use on mesh data. It suspect that when you used it on image data, it caused your computer to run out of memory. I have a connectivity filter that I wrote specifically for images, but it is on github. I haven't contributed it to VTK yet. But you can try it if you are interested: https://github.com/dgobbi/AIRS/tree/master/ImageSegmentation You can also try the vtkImageThresholdConnectivity filter that comes with VTK: http://www.vtk.org/doc/nightly/html/classvtkImageThresholdConnectivity.html - David On Fri, Nov 6, 2015 at 10:36 AM, Darya Yelshyna via vtkusers < vtkusers at vtk.org> wrote: > Hi everyone! > > I was trying to apply vtkConnectivityFilter to vtkImageData, but the > program crashes at this step. > "This application has requested the Runtime to terminate it in an unusual > way." This is this a part of my code: > > dilateFilter = vtk.vtkImageContinuousDilate3D() > dilateFilter.SetKernelSize(5, 5, 5) > dilateFilter.SetInputConnection(logic2.GetOutputPort()) > dilateFilter.Update() > > connectFilter = vtk.vtkConnectivityFilter() > connectFilter.SetExtractionModeToLargestRegion() > connectFilter.SetInputConnection(dilateFilter.GetOutputPort()) > connectFilter.Update() > > I don't understand what is happening.. Can anybody help me? > > Thank you in advance. > > Best regards, > Darya > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Nov 6 13:27:44 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 6 Nov 2015 13:27:44 -0500 Subject: [vtkusers] How to set const lookup table into vtkPiecewiseFunction? In-Reply-To: <1446796051189-5734831.post@n5.nabble.com> References: <1446796051189-5734831.post@n5.nabble.com> Message-ID: I think you'll need to use vtkPiecewiseFunction and use vtkPiecewiseFunction::AddSegment() [1] to add segments between neighboring entries in your table. HTH, Cory [1] http://www.vtk.org/doc/nightly/html/classvtkPiecewiseFunction.html#add92350b9d1803d1fecad7cd1220b068 On Fri, Nov 6, 2015 at 2:47 AM, LaChen wrote: > Hi all, > > I needs to use my lookup table for volume rendering. > > But we only can set transfer function by vtkPiecewiseFunction. > > If I needs to set look up table, how can I set it?? > > Thanks. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-set-const-lookup-table-into-vtkPiecewiseFunction-tp5734831.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From romain.leguay at gmail.com Fri Nov 6 13:38:19 2015 From: romain.leguay at gmail.com (Romain LEGUAY) Date: Fri, 6 Nov 2015 19:38:19 +0100 Subject: [vtkusers] Save a vtkContourTriangulator output inside a PNG In-Reply-To: References: Message-ID: 2015-11-06 15:41 GMT+01:00 Cory Quammen : > Romain, > > Let's pop up a level and discuss what you are trying to do. It sounds like > you are trying to voxelize a geometry into a 3D image. Is that right? > > Exactly! > You don't have to use the vtkCutter at all but rather set your geometry as > the input for vtkPolyDataToImageStencil. I have used this class for > voxelization in the past and it works very well. > I just did some test with just using vtkPolyDataToImageStencil and it works perfectly!!!! At first I still had some black pictures but I fixed the origin of the whiteImage and it's all working. I forgot to put the code before, I'm going to fix my mistake now :) Thanks again! Romain > > HTH, > Cory > > On Fri, Nov 6, 2015 at 9:32 AM, Romain LEGUAY > wrote: > >> Thanks David for your answer! >> >> I just saw on the vtkPolyDataToImageStencil documentation that the >> contour must be align throw the Z planes. >> >> I use vtkCutter to cut my mesh along Z-axis but all the pictures saved >> are black. I attached my code and the CMakeLists.txt. >> >> Is there another way to "project" my filled contour on an image? >> >> Thanks again. >> >> Romain >> >> >> >> 2015-11-06 14:15 GMT+01:00 David Gobbi : >> >>> Hi Romain, >>> >>> The vtkPolyDataToImageStencil class needs a "hollow" shape as input, >>> either a 3D surface or a 2D contour. If you fill the contour, then it >>> can't >>> be used by vtkPolyDataToImageStencil. >>> >>> - David >>> >>> >>> On Fri, Nov 6, 2015 at 2:22 AM, Romain LEGUAY >>> wrote: >>> >>>> Hello everyone, >>>> >>>> In purpose to create a series of pictures (with the same size 512*512 >>>> for example), I cut a mesh along an axis (X, Y or Z) with vtkCutter, then I >>>> triangulate those contours with vtkContourTriangulator. I obtain some >>>> "flat" vtkPolydata*s* (one per cut). Now, I want to save all those >>>> "flat" meshes to 2D images with fixed size. >>>> I saw on the wiki ( >>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData) >>>> how to convert a vtkPolydata in vtkImageData, but in this case, my >>>> vtkPolydata is in a plane (the output of vtkContourTriangulator) so the >>>> dimension of the white image is 0 or negative because of this part of code: >>>> >>>> vtkSmartPointer whiteImage = >>>> vtkSmartPointer::New(); >>>> double bounds[6]; >>>> polydata->GetBounds(bounds); >>>> double spacing[3]; // desired volume spacing >>>> spacing[0] = 0.5; >>>> spacing[1] = 0.5; >>>> spacing[2] = 0.5; >>>> whiteImage->SetSpacing(spacing); >>>> >>>> // compute dimensions >>>> int dim[3]; >>>> for (int i = 0; i < 3; i++) >>>> { >>>> dim[i] = static_cast(ceil((bounds[i * 2 + 1] - bounds[i * 2]) / >>>> spacing[i])); // One of the dimension is 0 >>>> } >>>> whiteImage->SetDimensions(dim); >>>> whiteImage->SetExtent(0, dim[0] - 1, 0, dim[1] - 1, 0, dim[2] - 1); // >>>> Here >>>> >>>> >>>> I don't know if there is other choice to convert a polydata to an image >>>> but this code always give some black pictures. >>>> I'm not sure if I use the good filter to convert my polydata to a 2D >>>> image but I don't find anything. >>>> >>>> Do you have any clues? >>>> >>>> Thanks, >>>> >>>> Romain >>>> >>> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- cmake_minimum_required(VERSION 2.8) PROJECT(Cutter) find_package(VTK REQUIRED) include(${VTK_USE_FILE}) add_executable(Cutter MACOSX_BUNDLE Cutter) if(VTK_LIBRARIES) target_link_libraries(Cutter ${VTK_LIBRARIES}) else() target_link_libraries(Cutter vtkHybrid vtkWidgets) endif() -------------- next part -------------- #include #include #include #include #include #include #include #include #include #include #include #include struct MatchPathSeparator { bool operator()(char ch) const { return ch == '/'; } }; std::string basename(std::string const& pathname) { return std::string(std::find_if( pathname.rbegin(), pathname.rend(), MatchPathSeparator() ).base(), pathname.end()); } std::string removeExtension(std::string const& filename) { std::string::const_reverse_iterator pivot = std::find( filename.rbegin(), filename.rend(), '.'); return pivot == filename.rend() ? filename : std::string(filename.begin(), pivot.base() - 1); } /** * Convert an object or a fundamental type to a std::string. */ template std::string toString(const T & val) { std::ostringstream oss; oss << val; return oss.str(); } int main(int argc, char * argv[]) { // Parse command line arguments if(argc != 2) { std::cout << "Usage: " << argv[0] << " Filename(.obj)" << std::endl; return EXIT_FAILURE; } std::string filename = argv[1]; vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(filename.c_str()); reader->Update(); double bounds[6]; reader->GetOutput()->GetBounds(bounds); std::string baseOutput = removeExtension(basename(filename)); int count = 0; for (double z = bounds[4]; z < bounds[5]; z += 0.1) { vtkSmartPointer polydata = reader->GetOutput(); double spacing[3]; // desired volume spacing spacing[0] = 0.005; spacing[1] = 0.005; spacing[2] = 1; vtkSmartPointer whiteImage = vtkSmartPointer::New(); whiteImage->SetSpacing(spacing); // compute dimensions int dim[3]; for (int i = 0; i < 3; i++) { dim[i] = static_cast(ceil((bounds[i * 2 + 1] - bounds[i * 2]) / spacing[i])); } whiteImage->SetDimensions(dim); whiteImage->SetExtent(0, dim[0] - 1, 0, dim[1] - 1, 0, dim[2] - 1); double origin[3]; origin[0] = bounds[0] + spacing[0] / 2; origin[1] = bounds[2] + spacing[1] / 2; origin[2] = bounds[4] + spacing[2] / 2 + z; // Move the origin along Z-axis whiteImage->SetOrigin(origin); whiteImage->AllocateScalars(VTK_UNSIGNED_CHAR, 1); // fill the image with foreground voxels: unsigned char inval = 255; unsigned char outval = 0; vtkIdType pointCount = whiteImage->GetNumberOfPoints(); for (vtkIdType i = 0; i < pointCount; ++i) { whiteImage->GetPointData()->GetScalars()->SetTuple1(i, inval); } // polygonal data --> image stencil: vtkSmartPointer pol2stenc = vtkSmartPointer::New(); pol2stenc->SetInputData(polydata); pol2stenc->SetOutputOrigin(origin); pol2stenc->SetOutputSpacing(spacing); pol2stenc->SetOutputWholeExtent(whiteImage->GetExtent()); pol2stenc->Update(); // cut the corresponding white image and set the background: vtkSmartPointer imgstenc = vtkSmartPointer::New(); imgstenc->SetInputData(whiteImage); imgstenc->SetStencilConnection(pol2stenc->GetOutputPort()); imgstenc->ReverseStencilOff(); imgstenc->SetBackgroundValue(outval); imgstenc->Update(); std::string outputFilename = "./" + baseOutput + "_00" + toString(count) + ".png"; vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName(outputFilename.c_str()); writer->SetInputData(imgstenc->GetOutput()); writer->Write(); std::cout << outputFilename << std::endl; ++count; } return EXIT_SUCCESS; } From andy.bauer at kitware.com Fri Nov 6 13:56:55 2015 From: andy.bauer at kitware.com (Andy Bauer) Date: Fri, 6 Nov 2015 13:56:55 -0500 Subject: [vtkusers] how to avoid overlapping (ghost) layer in *.pvti files In-Reply-To: References: Message-ID: VTK doesn't do node partitoning since it won't know about the missing cells in the gap. You can either extend the vtkXMLPImageDataReader to understand about the gap cells or fix it in your writer. On Fri, Nov 6, 2015 at 4:43 AM, Kaya Onur Dag wrote: > I have my own cfd solver in which I was using *.vti for paraview input but > decided to use parallel data write with *.pvti format and do node > parallelisation. > > My *.pvti file is like : > > > header_type="UInt64"> > 31 0 31" Origin=" 0.000000000000E+00 0.000000000000E+00 > 0.000000000000E+00" Spacing=" 0.196349540849E+00 0.196349540849E+00 > 0.645161290323E-01" GhostLevel="0"> > > format="appended"/> > format="appended"/> > format="appended"/> > > > > > > > The problem I am facing is I am having a gap in between z-axis 15-16 - > which paraview complains. > > I know that the solution is to have a ghost (overlapping) layer (can't > understand why since I am using point data?), and the issue is that my code > is not capable of generating overlapping nodes, unless I code it up and > manually transfer ghost layers at each data output stage for the sake of > being able to write data in parallel but it feels like an overkill... > > Any suggestions? > > Thanks in advance. > Kaya > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From darya.yelshyna at yahoo.com Fri Nov 6 14:06:12 2015 From: darya.yelshyna at yahoo.com (Darya Yelshyna) Date: Fri, 6 Nov 2015 19:06:12 +0000 (UTC) Subject: [vtkusers] Problems using vtkConnectivityFilter on Image Data In-Reply-To: References: Message-ID: <1706448138.809641.1446836772819.JavaMail.yahoo@mail.yahoo.com> Thank you so much for your reply!I am using Python wrapping to access VTK and I don't know how to add?vtkImageConnectivityFilter. I am trying to use?vtkImageThresholdConnectivity and I am a little confused with setting the seed.?The seeds should be in real data coordinates, not in voxel index locations. How do I retrieve these coordinates from X, Y and Z indexes? Sorry for inconveniece. Best regards,Darya On Friday, November 6, 2015 5:49 PM, David Gobbi wrote: Hi Darya, The vtkConnectivityFilter is meant for use on mesh data.? It suspectthat when you used it on image data, it caused your computer to runout of memory. I have a connectivity filter that I wrote specifically for images, but itis on github.? I haven't contributed it to VTK yet.? But you can try itif you are interested: https://github.com/dgobbi/AIRS/tree/master/ImageSegmentation You can also try the vtkImageThresholdConnectivity filter that comeswith VTK:http://www.vtk.org/doc/nightly/html/classvtkImageThresholdConnectivity.html ?- David On Fri, Nov 6, 2015 at 10:36 AM, Darya Yelshyna via vtkusers wrote: Hi everyone! I was trying to apply?vtkConnectivityFilter to vtkImageData, but the program crashes at this step."This application has requested the Runtime to terminate it in an unusual way." This is this a part of my code: dilateFilter = vtk.vtkImageContinuousDilate3D()dilateFilter.SetKernelSize(5, 5, 5)dilateFilter.SetInputConnection(logic2.GetOutputPort())dilateFilter.Update() connectFilter = vtk.vtkConnectivityFilter()connectFilter.SetExtractionModeToLargestRegion()connectFilter.SetInputConnection(dilateFilter.GetOutputPort())connectFilter.Update() I don't understand what is happening.. Can anybody help me? Thank you in advance. Best regards,Darya _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From saeedbakhshmand at gmail.com Fri Nov 6 14:33:51 2015 From: saeedbakhshmand at gmail.com (Saeed Mahdizadeh Bakhshmand) Date: Fri, 6 Nov 2015 14:33:51 -0500 Subject: [vtkusers] vtkExtractSelection -- how to get output as polydata Message-ID: Hello, Any idea on how to get output of vtkExtractSelection as polydata? I input polydata but output is an UnstructuredGrid which is not suitable for next step and converting to vtkpolydata seems to be a pain. Thanks, Saeed -------------- next part -------------- An HTML attachment was scrubbed... URL: From darya.yelshyna at yahoo.com Fri Nov 6 14:40:30 2015 From: darya.yelshyna at yahoo.com (Darya Yelshyna) Date: Fri, 6 Nov 2015 19:40:30 +0000 (UTC) Subject: [vtkusers] Problems using vtkConnectivityFilter on Image Data In-Reply-To: <1706448138.809641.1446836772819.JavaMail.yahoo@mail.yahoo.com> References: <1706448138.809641.1446836772819.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1655262865.800882.1446838830760.JavaMail.yahoo@mail.yahoo.com> I guess I figured out what are real coordinates, but I still don't get my connected region. This is my code: seed = vtk.vtkPoints()i = (xyz[0] - origin[0]) / spacing[0]j = (xyz[1] - origin[1]) / spacing[1]k = (xyz[2] - origin[2]) / spacing[2]seed.InsertNextPoint(i, j, k) connectFilter = vtk.vtkImageThresholdConnectivity()connectFilter.SetInputConnection(dilateFilter.GetOutputPort())connectFilter.SetSeedPoints(seed)connectFilter.ThresholdByUpper(1)connectFilter.ReplaceInOn()connectFilter.SetInValue(1)connectFilter.ReplaceOutOn()connectFilter.SetOutValue(0)connectFilter.Update() My image is a vtkImageData CT head scan with values 0 and 1. The value 1 corresponds to segmented head and some artifacts, which I want to remove (they are disconnected from the head). My xyz point is a voxel that lies within the head region ( I checked, its value is 1 in the dilateFilter output). The output from vtkImageThresholdConnectivity is a image filled with 0. What am I doing wrong? Thank you all in advance. Best regards,Darya On Friday, November 6, 2015 7:06 PM, Darya Yelshyna wrote: Thank you so much for your reply!I am using Python wrapping to access VTK and I don't know how to add?vtkImageConnectivityFilter. I am trying to use?vtkImageThresholdConnectivity and I am a little confused with setting the seed.?The seeds should be in real data coordinates, not in voxel index locations. How do I retrieve these coordinates from X, Y and Z indexes? Sorry for inconveniece. Best regards,Darya On Friday, November 6, 2015 5:49 PM, David Gobbi wrote: Hi Darya, The vtkConnectivityFilter is meant for use on mesh data.? It suspectthat when you used it on image data, it caused your computer to runout of memory. I have a connectivity filter that I wrote specifically for images, but itis on github.? I haven't contributed it to VTK yet.? But you can try itif you are interested: https://github.com/dgobbi/AIRS/tree/master/ImageSegmentation You can also try the vtkImageThresholdConnectivity filter that comeswith VTK:http://www.vtk.org/doc/nightly/html/classvtkImageThresholdConnectivity.html ?- David On Fri, Nov 6, 2015 at 10:36 AM, Darya Yelshyna via vtkusers wrote: Hi everyone! I was trying to apply?vtkConnectivityFilter to vtkImageData, but the program crashes at this step."This application has requested the Runtime to terminate it in an unusual way." This is this a part of my code: dilateFilter = vtk.vtkImageContinuousDilate3D()dilateFilter.SetKernelSize(5, 5, 5)dilateFilter.SetInputConnection(logic2.GetOutputPort())dilateFilter.Update() connectFilter = vtk.vtkConnectivityFilter()connectFilter.SetExtractionModeToLargestRegion()connectFilter.SetInputConnection(dilateFilter.GetOutputPort())connectFilter.Update() I don't understand what is happening.. Can anybody help me? Thank you in advance. Best regards,Darya _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Fri Nov 6 15:11:11 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 6 Nov 2015 15:11:11 -0500 Subject: [vtkusers] vtkExtractSelection -- how to get output as polydata In-Reply-To: References: Message-ID: You should be able to use vtkDataSetSurfaceFilter to get a vtkPolyData from a vtkUnstructuredGrid [1]. HTH, Cory [1] http://www.vtk.org/doc/nightly/html/classvtkDataSetSurfaceFilter.html On Fri, Nov 6, 2015 at 2:33 PM, Saeed Mahdizadeh Bakhshmand < saeedbakhshmand at gmail.com> wrote: > Hello, > > Any idea on how to get output of vtkExtractSelection as polydata? I input > polydata but output is an UnstructuredGrid which is not suitable for next > step and converting to vtkpolydata seems to be a pain. > > Thanks, > Saeed > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Fri Nov 6 15:38:53 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Fri, 6 Nov 2015 15:38:53 -0500 Subject: [vtkusers] Problems using vtkConnectivityFilter on Image Data In-Reply-To: References: <1442227242.748773.1446831408868.JavaMail.yahoo.ref@mail.yahoo.com> <1442227242.748773.1446831408868.JavaMail.yahoo@mail.yahoo.com> Message-ID: David, Should you add your ImageSegmentation as an External Module? Bill On Fri, Nov 6, 2015 at 12:49 PM, David Gobbi wrote: > Hi Darya, > > The vtkConnectivityFilter is meant for use on mesh data. It suspect > that when you used it on image data, it caused your computer to run > out of memory. > > I have a connectivity filter that I wrote specifically for images, but it > is on github. I haven't contributed it to VTK yet. But you can try it > if you are interested: > > https://github.com/dgobbi/AIRS/tree/master/ImageSegmentation > > You can also try the vtkImageThresholdConnectivity filter that comes > with VTK: > http://www.vtk.org/doc/nightly/html/classvtkImageThresholdConnectivity.html > > - David > > > > On Fri, Nov 6, 2015 at 10:36 AM, Darya Yelshyna via vtkusers > wrote: >> >> Hi everyone! >> >> I was trying to apply vtkConnectivityFilter to vtkImageData, but the >> program crashes at this step. >> "This application has requested the Runtime to terminate it in an unusual >> way." This is this a part of my code: >> >> dilateFilter = vtk.vtkImageContinuousDilate3D() >> dilateFilter.SetKernelSize(5, 5, 5) >> dilateFilter.SetInputConnection(logic2.GetOutputPort()) >> dilateFilter.Update() >> >> connectFilter = vtk.vtkConnectivityFilter() >> connectFilter.SetExtractionModeToLargestRegion() >> connectFilter.SetInputConnection(dilateFilter.GetOutputPort()) >> connectFilter.Update() >> >> I don't understand what is happening.. Can anybody help me? >> >> Thank you in advance. >> >> Best regards, >> Darya >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Unpaid intern in BillsBasement at noware dot com From david.gobbi at gmail.com Fri Nov 6 15:49:23 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 6 Nov 2015 13:49:23 -0700 Subject: [vtkusers] Problems using vtkConnectivityFilter on Image Data In-Reply-To: References: <1442227242.748773.1446831408868.JavaMail.yahoo.ref@mail.yahoo.com> <1442227242.748773.1446831408868.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Bill, Yes, I intend to do that one of these days. The vtkMRIBrainExtractor filter in particular is a very useful tool for visualization, but it really doesn't belong in VTK as a core class. Remote modules are the perfect solution for such classes. - David On Fri, Nov 6, 2015 at 1:38 PM, Bill Lorensen wrote: > David, > > Should you add your ImageSegmentation as an External Module? > > Bill > > On Fri, Nov 6, 2015 at 12:49 PM, David Gobbi > wrote: > > Hi Darya, > > > > The vtkConnectivityFilter is meant for use on mesh data. It suspect > > that when you used it on image data, it caused your computer to run > > out of memory. > > > > I have a connectivity filter that I wrote specifically for images, but it > > is on github. I haven't contributed it to VTK yet. But you can try it > > if you are interested: > > > > https://github.com/dgobbi/AIRS/tree/master/ImageSegmentation > > > > You can also try the vtkImageThresholdConnectivity filter that comes > > with VTK: > > > http://www.vtk.org/doc/nightly/html/classvtkImageThresholdConnectivity.html > > > > - David > > > > > > > > On Fri, Nov 6, 2015 at 10:36 AM, Darya Yelshyna via vtkusers > > wrote: > >> > >> Hi everyone! > >> > >> I was trying to apply vtkConnectivityFilter to vtkImageData, but the > >> program crashes at this step. > >> "This application has requested the Runtime to terminate it in an > unusual > >> way." This is this a part of my code: > >> > >> dilateFilter = vtk.vtkImageContinuousDilate3D() > >> dilateFilter.SetKernelSize(5, 5, 5) > >> dilateFilter.SetInputConnection(logic2.GetOutputPort()) > >> dilateFilter.Update() > >> > >> connectFilter = vtk.vtkConnectivityFilter() > >> connectFilter.SetExtractionModeToLargestRegion() > >> connectFilter.SetInputConnection(dilateFilter.GetOutputPort()) > >> connectFilter.Update() > >> > >> I don't understand what is happening.. Can anybody help me? > >> > >> Thank you in advance. > >> > >> Best regards, > >> Darya > -------------- next part -------------- An HTML attachment was scrubbed... URL: From saeedbakhshmand at gmail.com Fri Nov 6 17:18:42 2015 From: saeedbakhshmand at gmail.com (Saeed Mahdizadeh Bakhshmand) Date: Fri, 6 Nov 2015 17:18:42 -0500 Subject: [vtkusers] vtkExtractSelection -- how to get output as polydata In-Reply-To: References: Message-ID: Thanks Cory, I figured to use vtkExtractSelectedPolyDataIds instead of vtkExtractSelection. Cheers, Saeed On Fri, Nov 6, 2015 at 3:11 PM, Cory Quammen wrote: > You should be able to use vtkDataSetSurfaceFilter to get a vtkPolyData > from a vtkUnstructuredGrid [1]. > > HTH, > Cory > > [1] http://www.vtk.org/doc/nightly/html/classvtkDataSetSurfaceFilter.html > > On Fri, Nov 6, 2015 at 2:33 PM, Saeed Mahdizadeh Bakhshmand < > saeedbakhshmand at gmail.com> wrote: > >> Hello, >> >> Any idea on how to get output of vtkExtractSelection as polydata? I input >> polydata but output is an UnstructuredGrid which is not suitable for next >> step and converting to vtkpolydata seems to be a pain. >> >> Thanks, >> Saeed >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Nov 6 17:36:42 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 6 Nov 2015 15:36:42 -0700 Subject: [vtkusers] Problems using vtkConnectivityFilter on Image Data In-Reply-To: <1655262865.800882.1446838830760.JavaMail.yahoo@mail.yahoo.com> References: <1706448138.809641.1446836772819.JavaMail.yahoo@mail.yahoo.com> <1655262865.800882.1446838830760.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Darya, The math for the indices should be the other way around. If you already have the voxel indices, then compute the point coordinates like this: x = origin[0] + xyz[0]*spacing[0] etc. for y and z seed.InsertNextPoint(x,y,z) Also, of course, if ThresholdByUpper(1) doesn't work, then also try ThresholdByLower(1). The names of those two methods always confuses me, and I always forget which method does what... - David On Fri, Nov 6, 2015 at 12:40 PM, Darya Yelshyna wrote: > I guess I figured out what are real coordinates, but I still don't get my > connected region. This is my code: > > seed = vtk.vtkPoints() > i = (xyz[0] - origin[0]) / spacing[0] > j = (xyz[1] - origin[1]) / spacing[1] > k = (xyz[2] - origin[2]) / spacing[2] > seed.InsertNextPoint(i, j, k) > > connectFilter = vtk.vtkImageThresholdConnectivity() > connectFilter.SetInputConnection(dilateFilter.GetOutputPort()) > connectFilter.SetSeedPoints(seed) > connectFilter.ThresholdByUpper(1) > connectFilter.ReplaceInOn() > connectFilter.SetInValue(1) > connectFilter.ReplaceOutOn() > connectFilter.SetOutValue(0) > connectFilter.Update() > > My image is a vtkImageData CT head scan with values 0 and 1. The value 1 > corresponds to segmented head and some artifacts, which I want to remove > (they are disconnected from the head). My xyz point is a voxel that lies > within the head region ( I checked, its value is 1 in the dilateFilter > output). The output from vtkImageThresholdConnectivity is a image filled > with 0. What am I doing wrong? > > Thank you all in advance. > > Best regards, > Darya > > > > On Friday, November 6, 2015 7:06 PM, Darya Yelshyna < > darya.yelshyna at yahoo.com> wrote: > > > Thank you so much for your reply! > I am using Python wrapping to access VTK and I don't know how to > add vtkImageConnectivityFilter. I am trying to > use vtkImageThresholdConnectivity and I am a little confused with setting > the seed. The seeds should be in real data coordinates, not in voxel > index locations. How do I retrieve these coordinates from X, Y and Z > indexes? > > Sorry for inconveniece. > > Best regards, > Darya > > > > On Friday, November 6, 2015 5:49 PM, David Gobbi > wrote: > > > Hi Darya, > > The vtkConnectivityFilter is meant for use on mesh data. It suspect > that when you used it on image data, it caused your computer to run > out of memory. > > I have a connectivity filter that I wrote specifically for images, but it > is on github. I haven't contributed it to VTK yet. But you can try it > if you are interested: > > https://github.com/dgobbi/AIRS/tree/master/ImageSegmentation > > You can also try the vtkImageThresholdConnectivity filter that comes > with VTK: > http://www.vtk.org/doc/nightly/html/classvtkImageThresholdConnectivity.html > > - David > > > > On Fri, Nov 6, 2015 at 10:36 AM, Darya Yelshyna via vtkusers < > vtkusers at vtk.org> wrote: > > Hi everyone! > > I was trying to apply vtkConnectivityFilter to vtkImageData, but the > program crashes at this step. > "This application has requested the Runtime to terminate it in an unusual > way." This is this a part of my code: > > dilateFilter = vtk.vtkImageContinuousDilate3D() > dilateFilter.SetKernelSize(5, 5, 5) > dilateFilter.SetInputConnection(logic2.GetOutputPort()) > dilateFilter.Update() > > connectFilter = vtk.vtkConnectivityFilter() > connectFilter.SetExtractionModeToLargestRegion() > connectFilter.SetInputConnection(dilateFilter.GetOutputPort()) > connectFilter.Update() > > I don't understand what is happening.. Can anybody help me? > > Thank you in advance. > > Best regards, > Darya > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From darya.yelshyna at yahoo.com Fri Nov 6 18:10:52 2015 From: darya.yelshyna at yahoo.com (Darya Yelshyna) Date: Fri, 6 Nov 2015 23:10:52 +0000 (UTC) Subject: [vtkusers] Problems using vtkConnectivityFilter on Image Data In-Reply-To: References: Message-ID: <1459826821.902322.1446851452858.JavaMail.yahoo@mail.yahoo.com> Hi David, Thank you very much for your help, it worked now with?ThresholdByUpper! Now I have only one more question. Is it possible to bind C++ implementation of VTK classes outside the VTK distribution (for example?this one) to a Python script? Best regads,Darya On Friday, November 6, 2015 10:37 PM, David Gobbi wrote: Hi Darya, The math for the indices should be the other way around.If you already have the voxel indices, then compute the pointcoordinates like this: x = origin[0] + xyz[0]*spacing[0]etc. for y and zseed.InsertNextPoint(x,y,z) Also, of course, if ThresholdByUpper(1) doesn't work, then alsotry ThresholdByLower(1).? The names of those two methods alwaysconfuses me, and I always forget which method does what... ?- David On Fri, Nov 6, 2015 at 12:40 PM, Darya Yelshyna wrote: I guess I figured out what are real coordinates, but I still don't get my connected region. This is my code: seed = vtk.vtkPoints()i = (xyz[0] - origin[0]) / spacing[0]j = (xyz[1] - origin[1]) / spacing[1]k = (xyz[2] - origin[2]) / spacing[2]seed.InsertNextPoint(i, j, k) connectFilter = vtk.vtkImageThresholdConnectivity()connectFilter.SetInputConnection(dilateFilter.GetOutputPort())connectFilter.SetSeedPoints(seed)connectFilter.ThresholdByUpper(1)connectFilter.ReplaceInOn()connectFilter.SetInValue(1)connectFilter.ReplaceOutOn()connectFilter.SetOutValue(0)connectFilter.Update() My image is a vtkImageData CT head scan with values 0 and 1. The value 1 corresponds to segmented head and some artifacts, which I want to remove (they are disconnected from the head). My xyz point is a voxel that lies within the head region ( I checked, its value is 1 in the dilateFilter output). The output from vtkImageThresholdConnectivity is a image filled with 0. What am I doing wrong? Thank you all in advance. Best regards,Darya On Friday, November 6, 2015 7:06 PM, Darya Yelshyna wrote: Thank you so much for your reply!I am using Python wrapping to access VTK and I don't know how to add?vtkImageConnectivityFilter. I am trying to use?vtkImageThresholdConnectivity and I am a little confused with setting the seed.?The seeds should be in real data coordinates, not in voxel index locations. How do I retrieve these coordinates from X, Y and Z indexes? Sorry for inconveniece. Best regards,Darya On Friday, November 6, 2015 5:49 PM, David Gobbi wrote: Hi Darya, The vtkConnectivityFilter is meant for use on mesh data.? It suspectthat when you used it on image data, it caused your computer to runout of memory. I have a connectivity filter that I wrote specifically for images, but itis on github.? I haven't contributed it to VTK yet.? But you can try itif you are interested: https://github.com/dgobbi/AIRS/tree/master/ImageSegmentation You can also try the vtkImageThresholdConnectivity filter that comeswith VTK:http://www.vtk.org/doc/nightly/html/classvtkImageThresholdConnectivity.html ?- David On Fri, Nov 6, 2015 at 10:36 AM, Darya Yelshyna via vtkusers wrote: Hi everyone! I was trying to apply?vtkConnectivityFilter to vtkImageData, but the program crashes at this step."This application has requested the Runtime to terminate it in an unusual way." This is this a part of my code: dilateFilter = vtk.vtkImageContinuousDilate3D()dilateFilter.SetKernelSize(5, 5, 5)dilateFilter.SetInputConnection(logic2.GetOutputPort())dilateFilter.Update() connectFilter = vtk.vtkConnectivityFilter()connectFilter.SetExtractionModeToLargestRegion()connectFilter.SetInputConnection(dilateFilter.GetOutputPort())connectFilter.Update() I don't understand what is happening.. Can anybody help me? Thank you in advance. Best regards,Darya -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Fri Nov 6 18:29:12 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 6 Nov 2015 16:29:12 -0700 Subject: [vtkusers] Problems using vtkConnectivityFilter on Image Data In-Reply-To: <1459826821.902322.1446851452858.JavaMail.yahoo@mail.yahoo.com> References: <1459826821.902322.1446851452858.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Darya, If you are using VTK 6 or later, you can do this by creating a new module for VTK and then adding the desired classes to that module (and then re-building VTK, of course!) To see how a module is structured, take a look at these two very simple files in the Imaging/Math module: Imaging/Math/module.cmake Imaging/Math/CMakeLists.txt It's possible to go a step further by putting a VTK module in its own git repository. This is the "Remote Module" mechanism that Bill referred to, he documents it here: http://www.vtk.org/Wiki/VTK/Remote_Modules If a class is put into a VTK module (remote or otherwise), then that class is automatically wrapped for python and can be accessed like any other wrapped class: import vtk f = vtk.vtkHausdorffDistancePointSetFilter() Note that filters written for VTK 5 usually have to be modified before they will work with VTK 6: http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide - David On Fri, Nov 6, 2015 at 4:10 PM, Darya Yelshyna wrote: > Hi David, > > Thank you very much for your help, it worked now with ThresholdByUpper! > Now I have only one more question. Is it possible to bind C++ > implementation of VTK classes outside the VTK distribution (for example this > one ) to a Python > script? > > > Best regads, > Darya > > On Friday, November 6, 2015 10:37 PM, David Gobbi > wrote: > > > Hi Darya, > > The math for the indices should be the other way around. > If you already have the voxel indices, then compute the point > coordinates like this: > > x = origin[0] + xyz[0]*spacing[0] > etc. for y and z > seed.InsertNextPoint(x,y,z) > > Also, of course, if ThresholdByUpper(1) doesn't work, then also > try ThresholdByLower(1). The names of those two methods always > confuses me, and I always forget which method does what... > > - David > > > > > > > > > On Fri, Nov 6, 2015 at 12:40 PM, Darya Yelshyna > wrote: > > I guess I figured out what are real coordinates, but I still don't get my > connected region. This is my code: > > seed = vtk.vtkPoints() > i = (xyz[0] - origin[0]) / spacing[0] > j = (xyz[1] - origin[1]) / spacing[1] > k = (xyz[2] - origin[2]) / spacing[2] > seed.InsertNextPoint(i, j, k) > > connectFilter = vtk.vtkImageThresholdConnectivity() > connectFilter.SetInputConnection(dilateFilter.GetOutputPort()) > connectFilter.SetSeedPoints(seed) > connectFilter.ThresholdByUpper(1) > connectFilter.ReplaceInOn() > connectFilter.SetInValue(1) > connectFilter.ReplaceOutOn() > connectFilter.SetOutValue(0) > connectFilter.Update() > > My image is a vtkImageData CT head scan with values 0 and 1. The value 1 > corresponds to segmented head and some artifacts, which I want to remove > (they are disconnected from the head). My xyz point is a voxel that lies > within the head region ( I checked, its value is 1 in the dilateFilter > output). The output from vtkImageThresholdConnectivity is a image filled > with 0. What am I doing wrong? > > Thank you all in advance. > > Best regards, > Darya > > > > On Friday, November 6, 2015 7:06 PM, Darya Yelshyna < > darya.yelshyna at yahoo.com> wrote: > > > Thank you so much for your reply! > I am using Python wrapping to access VTK and I don't know how to > add vtkImageConnectivityFilter. I am trying to > use vtkImageThresholdConnectivity and I am a little confused with setting > the seed. The seeds should be in real data coordinates, not in voxel > index locations. How do I retrieve these coordinates from X, Y and Z > indexes? > > Sorry for inconveniece. > > Best regards, > Darya > > > > On Friday, November 6, 2015 5:49 PM, David Gobbi > wrote: > > > Hi Darya, > > The vtkConnectivityFilter is meant for use on mesh data. It suspect > that when you used it on image data, it caused your computer to run > out of memory. > > I have a connectivity filter that I wrote specifically for images, but it > is on github. I haven't contributed it to VTK yet. But you can try it > if you are interested: > > https://github.com/dgobbi/AIRS/tree/master/ImageSegmentation > > You can also try the vtkImageThresholdConnectivity filter that comes > with VTK: > http://www.vtk.org/doc/nightly/html/classvtkImageThresholdConnectivity.html > > - David > > > > On Fri, Nov 6, 2015 at 10:36 AM, Darya Yelshyna via vtkusers < > vtkusers at vtk.org> wrote: > > Hi everyone! > > I was trying to apply vtkConnectivityFilter to vtkImageData, but the > program crashes at this step. > "This application has requested the Runtime to terminate it in an unusual > way." This is this a part of my code: > > dilateFilter = vtk.vtkImageContinuousDilate3D() > dilateFilter.SetKernelSize(5, 5, 5) > dilateFilter.SetInputConnection(logic2.GetOutputPort()) > dilateFilter.Update() > > connectFilter = vtk.vtkConnectivityFilter() > connectFilter.SetExtractionModeToLargestRegion() > connectFilter.SetInputConnection(dilateFilter.GetOutputPort()) > connectFilter.Update() > > I don't understand what is happening.. Can anybody help me? > > Thank you in advance. > > Best regards, > Darya > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joaorobertojr88 at gmail.com Sat Nov 7 11:03:42 2015 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Sat, 7 Nov 2015 09:03:42 -0700 (MST) Subject: [vtkusers] Issue when reading unstructured grid on VTK legacy file Message-ID: <1446912222014-5734867.post@n5.nabble.com> Hello VTK Users, I'm facing a problem reading a legacy VTK file that stores a vtkUnstructuredGrid with some scalar arrays. Specifically, I'm interested on waterSurfaceElevation array. When I open it on Paraview it displays correctly (please see attached), but when I try to render it in my own application a wrong result is shown (attached). Could anyone help me? I'm using the code bellow to read and render the legacy file (available at https://www.dropbox.com/s/fgm1rgne32rd0qw/output-00000001.vtk?dl=0). std::string filename = "output-00000001.vtk"; std::string arrayName = "waterSurfaceElevation"; vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(filename.c_str()); reader->Update(); vtkSmartPointer unstructuredGrid = reader->GetUnstructuredGridOutput(); unstructuredGrid->GetCellData()->SetActiveScalars(arrayName.c_str()); vtkSmartPointer mapper = vtkSmartPointer::New(); mapper->SetInputData(unstructuredGrid); mapper->SetScalarModeToUseCellData(); vtkSmartPointer meshActor = vtkSmartPointer::New(); meshActor->SetMapper(mapper->GetPolyDataMapper()); // All rendering stuff allocated in class constructor renderer->AddActor(meshActor); renderer->ResetCamera(); Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Issue-when-reading-unstructured-grid-on-VTK-legacy-file-tp5734867.html Sent from the VTK - Users mailing list archive at Nabble.com. From laysrodriguessilva at gmail.com Sat Nov 7 18:33:58 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Sat, 7 Nov 2015 21:33:58 -0200 Subject: [vtkusers] Problem with STL Files Message-ID: Hi guys, good night! I have made a function to render Stl files on my qtApp. However, dont work with a STL that worked before. At the first time that I open a Doctor Who Tardis worked fine(a few days ago), but when i try to open again(today) this error happens: ------------------ *^CERROR: In /home/lays/Downloads/VTK-6.3.0/IO/Geometry/vtkSTLReader.cxx, line 461* *vtkSTLReader (0x463f570): STLReader: error while reading file /home/lays/Downloads/Doctor_Who_Tardis/Doctor_Who_Tardis.STL at line 3: unable to read point.* *ERROR: In /home/lays/Downloads/VTK-6.3.0/Common/ExecutionModel/vtkExecutive.cxx, line 784* *vtkCompositeDataPipeline (0x36c2040): Algorithm vtkSTLReader(0x463f570) returned failure for request: vtkInformation (0x359d700)* * Debug: Off* * Modified Time: 148542* * Reference Count: 1* * Registered Events: (none)* * Request: REQUEST_DATA* * FROM_OUTPUT_PORT: 0* * ALGORITHM_AFTER_FORWARD: 1* * FORWARD_DIRECTION: 0* ------------------ It happens with other STL files to. The function is this: http://pastebin.com/qPzTsidp Any tips for what happening? Thanks! -- __ *Lays Rodrigues* *Developer Front-End at Br-Print3D Project* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Sun Nov 8 09:44:52 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Sun, 8 Nov 2015 09:44:52 -0500 Subject: [vtkusers] Issue when reading unstructured grid on VTK legacy file In-Reply-To: <1446912222014-5734867.post@n5.nabble.com> References: <1446912222014-5734867.post@n5.nabble.com> Message-ID: Hi, Three things: 1). A possibly simpler way to tell the mapper which array to color by is: mapper->SetScalarModeToUseCellFieldData(); // note this is different form what you had mapper->SelectColorArray(arrayName); This does not require you to go through setting up the active scalars in the cell data as you have done in your code. That will work, but the way I suggest takes fewer lines of code. 2). The problem you see is likely that you need to specify a lookup table range that matches your data range. Try calling mapper->SetScalarRange(min, max); where min and max are the min and max of your array. 3). The default color map in VTK is not the same as in ParaView, so if you don't see a direct match after doing 2). above, don't worry. You'll just need to specify a different lookup table. HTH, Cory On Sat, Nov 7, 2015 at 11:03 AM, joaoroberto88 wrote: > Hello VTK Users, > > I'm facing a problem reading a legacy VTK file that stores a > vtkUnstructuredGrid with some scalar arrays. Specifically, I'm interested > on > waterSurfaceElevation array. When I open it on Paraview it displays > correctly (please see attached), but when I try to render it in my own > application a wrong result is shown (attached). Could anyone help me? I'm > using the code bellow to read and render the legacy file (available at > https://www.dropbox.com/s/fgm1rgne32rd0qw/output-00000001.vtk?dl=0). > > std::string filename = "output-00000001.vtk"; > std::string arrayName = "waterSurfaceElevation"; > > vtkSmartPointer reader = > vtkSmartPointer::New(); > reader->SetFileName(filename.c_str()); > reader->Update(); > > vtkSmartPointer unstructuredGrid = > reader->GetUnstructuredGridOutput(); > unstructuredGrid->GetCellData()->SetActiveScalars(arrayName.c_str()); > > vtkSmartPointer mapper = > vtkSmartPointer::New(); > mapper->SetInputData(unstructuredGrid); > mapper->SetScalarModeToUseCellData(); > > vtkSmartPointer meshActor = vtkSmartPointer::New(); > meshActor->SetMapper(mapper->GetPolyDataMapper()); > > // All rendering stuff allocated in class constructor > renderer->AddActor(meshActor); > renderer->ResetCamera(); > > Thanks! > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Issue-when-reading-unstructured-grid-on-VTK-legacy-file-tp5734867.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joaorobertojr88 at gmail.com Sun Nov 8 13:07:31 2015 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Sun, 8 Nov 2015 11:07:31 -0700 (MST) Subject: [vtkusers] Issue when reading unstructured grid on VTK legacy file In-Reply-To: References: <1446912222014-5734867.post@n5.nabble.com> Message-ID: <1447006051596-5734871.post@n5.nabble.com> Hi Cory, It worked using SetScalarRange method! Thanks, Joao. -- View this message in context: http://vtk.1045678.n5.nabble.com/Issue-when-reading-unstructured-grid-on-VTK-legacy-file-tp5734867p5734871.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Sun Nov 8 15:26:17 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Sun, 8 Nov 2015 15:26:17 -0500 Subject: [vtkusers] Heap corruption | vtkLookupTable? In-Reply-To: <1446783555.4100604.430683297.52DA04C2@webmail.messagingengine.com> References: <1446783555.4100604.430683297.52DA04C2@webmail.messagingengine.com> Message-ID: Hi Audrius, That is indeed suspicious. I don't immediately see anything in your code that would explain the crash. Would you mind attaching a compilable example program with accompanying CMakeLists.txt file? That will make it easier to take a look. Thanks, Cory On Thu, Nov 5, 2015 at 11:19 PM, Audrius Stundzia wrote: > Dear All, > > OS: Windows 10 x64 > IDE: MS VS 2015 > VTK: 6.3.0 x64 build > > I am getting a "heap corruption" message when a vtkRenderWindow is closed > and the vtkRenderWindowInteractor is stopped. > Specifically the line > > renderWindowInteractor->TerminateApp(); > > in a callback function > > static void KeyPressCallbackFunction > > The relevant code fragments, appended below, are conventional texture > mapping of an image to a plane. > This "heap corruption" did not occur in Windows 8.1 x64; MS VS 2010; VTK > 5.10.1 x64 build > > From the call stack it appears to due to a problem with deleting an > instantiation of vtkLoopupTable: > > vtkCommonCore-6.3.dll!vtkDataArrayTemplate::DeleteArray() > Line 214 C++ > vtkCommonCore-6.3.dll!vtkDataArrayTemplate char>::~vtkDataArrayTemplate() Line 92 C++ > vtkCommonCore-6.3.dll!vtkUnsignedCharArray::~vtkUnsignedCharArray() Line > 37 C++ > [External Code] > vtkCommonCore-6.3.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase * > __formal, int check) Line 232 C++ > vtkCommonCore-6.3.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o, int > check) Line 901 C++ > vtkCommonCore-6.3.dll!vtkObjectBase::UnRegister(vtkObjectBase * o) Line > 190 C++ > vtkCommonCore-6.3.dll!vtkLookupTable::~vtkLookupTable() Line 89C++ > [External Code] > vtkCommonCore-6.3.dll!vtkObjectBase::UnRegisterInternal(vtkObjectBase * > __formal, int check) Line 232 C++ > vtkCommonCore-6.3.dll!vtkObject::UnRegisterInternal(vtkObjectBase * o, int > check) Line 901 C++ > vtkCommonCore-6.3.dll!vtkObjectBase::UnRegister(vtkObjectBase * o) Line > 190 C++ > vtkCommonCore-6.3.dll!vtkSmartPointerBase::~vtkSmartPointerBase() Line 62 > C++ > [External Code] > > Any insight would be appreciated. > > Regards, > > Audrius > > //--------------------------------------- > // Start: relevant code fragment > //--------------------------------------- > > { > . . . > > vtkSmartPointer camera_ = vtkSmartPointer::New(); > > camera_->SetPosition( 0.0, 0.0, -1.0); > camera_->SetRoll(180.0); > > camera_->Zoom( zoomFactor_ ); > > //--------------- > vtkSmartPointer renderer_ = > vtkSmartPointer::New(); > renderer_->SetActiveCamera(camera_); > renderer_->SetBackground( 0.0, 0.0, 0.0 ); > > //--------------- > vtkSmartPointer renderWindow_ = > vtkSmartPointer::New(); > renderWindow_->AddRenderer( renderer_ ); > renderWindow_->SetSize > ( winSizeX_ > , winSizeY_ ); > renderWindow_->SetPosition > ( winPosX_ > , winPosY_ ); > renderWindow_->SwapBuffersOn(); > > //--------------- > vtkSmartPointer renderWindowInteractor_ = > vtkSmartPointer::New(); > renderWindowInteractor_->SetRenderWindow( renderWindow_); > > vtkSmartPointer keyPressCallback_ = > vtkSmartPointer::New(); > keyPressCallback_->SetCallback( > advDiagnosticDisplay::KeyPressCallbackFunction); > > renderWindowInteractor_->AddObserver > ( vtkCommand::KeyPressEvent > , keyPressCallback_ ); > > // Build a colour map > vtkSmartPointer colourMap_ = > vtkSmartPointer::New(); > InitializeColourMap(colourMap_); > > // Apply the texture > vtkSmartPointer texture_ = vtkSmartPointer::New(); > if(interpolation_) > texture_->InterpolateOn(); > else > texture_->InterpolateOff(); > texture_->RepeatOff(); > texture_->SetQualityTo32Bit(); > texture_->MapColorScalarsThroughLookupTableOn(); > texture_->SetInputData( imageReslice_->GetOutput()); > texture_->SetLookupTable( colourMap_); > > //--------------- > vtkSmartPointer planeSource_ = > vtkSmartPointer::New(); > planeSource_->SetResolution( 1, 1 ); > planeSource_->SetPoint1( eX_, 0.0, 0.0); > planeSource_->SetPoint2( 0.0, eY_, 0.0); > planeSource_->SetCenter( centre_.data()); > planeSource_->SetNormal( 0.0, 0.0, 1.0); > planeSource_->Update(); > > //--------------- > vtkSmartPointer mapper_ = > vtkSmartPointer::New(); > mapper_->ScalarVisibilityOff(); > mapper_->SetInputData( planeSource_->GetOutput()); > mapper_->Update(); > > //--------------- > vtkSmartPointer property_ = > vtkSmartPointer::New(); > property_->SetOpacity( opacity_); > > //--------------- > vtkSmartPointer actor_ = vtkSmartPointer::New(); > actor_->SetProperty( property_ ); > actor_->SetTexture( texture_ ); > actor_->SetMapper( mapper_ ); > > //--------------- > renderer_->AddActor(actor_); > > renderer_->ResetCamera(); > > renderWindow_->Render(); > renderWindow_->SetWindowName( "Window name here"); > > renderWindowInteractor_->Start(); > > . . . > > } > > void InitializeColourMap(vtkSmartPointer& colourMap) > { > //--------------- > colourMap->SetNumberOfColors(nImageColours_ + 1); > colourMap->SetTableRange > (minScalar_ > , maxScalar_); > > if (colour_) > { > colourMap->SetHueRange(0.666667f, 0.0f); > colourMap->Build(); > colourMap->SetTableValue(0, 0.0f, 0.0f, 0.0f, 0.0f); > } > else > { > colourMap->SetHueRange(0.5f, 0.5f); > colourMap->SetSaturationRange(0.0f, 1.0f); > colourMap->Build(); > colourMap->SetTableValue(0, 0.0f, 0.0f, 0.0f, 0.0f); > > for (int iC = 1; iC <= nImageColours_; ++iC) > { > const float val = static_cast(iC) / > static_cast(nImageColours_ + 1); > colourMap->SetTableValue > (iC > , val > , val > , val > , 1.0f); > } > } > } > > > // > // vtk callback function: stop rendering and close window > // > > static void KeyPressCallbackFunction > ( vtkObject* caller > , long unsigned int vtkNotUsed(eventId) > , void* vtkNotUsed(clientData) > , void* vtkNotUsed(callData)) > { > vtkRenderWindowInteractor* renderWindowInteractor = > dynamic_cast(caller); > > // Close the window > vtkRenderWindow* renderWindow = renderWindowInteractor->GetRenderWindow(); > renderWindow->Finalize(); > > // Stop the interactor > // When the next line is executed, the heap corruption message is generated > renderWindowInteractor->TerminateApp(); > > std::cout << "Window closed." << std::endl; > } > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjfrankcn at icloud.com Sun Nov 8 20:53:27 2015 From: bjfrankcn at icloud.com (Frank) Date: Mon, 09 Nov 2015 09:53:27 +0800 Subject: [vtkusers] VTK Examples CustomLinkView and EasyView crashed if compiled using vs-2010 with release Message-ID: <806B5E95-E657-4F18-9B25-1FF11688EC97@icloud.com> I have been using VTK5 in my software, which was developed in vs-2008. Recently, we are trying to migrate our software development from vs-2008 to vs-2010, and found that its release version in vs-2010 crashed, but its debug version worked fine. Finally, we found that the release versions of the VTK5 examples CustomLinkView and EasyView are also crash in vs-2010, but their debug versions work fine. Both release and debug versions of these examples work in vs-2008. Because our software uses the same function as that used by CustomLinkView and EasyView, our software might be crashed due to a VTK bug. We are using VTK 5.10.1 with Qt 4.8.7. Did anybody experience the same problem, or have a solution for this problem ? Thank you in advance. Best regards, Frank. From hsriniv2 at ncsu.edu Mon Nov 9 02:02:20 2015 From: hsriniv2 at ncsu.edu (harshad1) Date: Mon, 9 Nov 2015 00:02:20 -0700 (MST) Subject: [vtkusers] Using QVTKWidget2 - an example or two Message-ID: <1447052540051-5734874.post@n5.nabble.com> Hi all, As far as I can tell, I should be using QVTKWidget2 rather than QVTKWidget Z Buffer issues Possibly deprecated? More z buffer trouble My linux laptop runs Mesa 11.0.4 and I am experiencing the z buffer bug explained in the link above (VTK 6.3 and QT 5.5.1) My QVTKWidget2 code compiles fine but doesn't work. This is not surprising - All I've done is nievely replace QVTKWidget with QVTKwidget2: >>==================================================================== >> display = new QVTKWidget2(); >> ui->mainLayout->insertWidget(0,display,3); >> >> //Setup rendering >> //--------------- >> displayRenderer = vtkSmartPointer::New(); >> >> //displayRenderWindow = vtkSmartPointer::New(); >> //display->SetRenderWindow(displayRenderWindow); >> //displayRenderWindow->AddRenderer(displayRenderer); >> >> display->GetRenderWindow()->AddRenderer(displayRenderer); >> >> //Adding an axis actor >> //------------------- >> vtkSmartPointer axes = >> vtkSmartPointer::New(); >> axes->SetShaftType(vtkAxesActor::CYLINDER_SHAFT); >> displayRenderer->AddViewProp(axes); >> >> displayRenderer->ResetCamera(); >>==================================================================== All I get is a blank screen. I can't seem to find any examples or tutorials on using QVTKWidget2. I would appreciate it a lot if someone could help me figure this out. -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-QVTKWidget2-an-example-or-two-tp5734874.html Sent from the VTK - Users mailing list archive at Nabble.com. From jaisingla at gmail.com Mon Nov 9 09:33:41 2015 From: jaisingla at gmail.com (jai singla) Date: Mon, 9 Nov 2015 20:03:41 +0530 Subject: [vtkusers] python_vtk_rendering Message-ID: Hello All, I am new to vtk. I just installed vtk on anaconda on ubuntu . My example programs cube, disc are complied well but does not render anything please help me out -- Regards, Jai Singla -------------- next part -------------- An HTML attachment was scrubbed... URL: From berk.geveci at kitware.com Mon Nov 9 09:54:45 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Mon, 9 Nov 2015 09:54:45 -0500 Subject: [vtkusers] how to avoid overlapping (ghost) layer in *.pvti files In-Reply-To: References: Message-ID: Dear Kaya, We need nodes overlapping for visualization purposes. We need to be able to interpolate the field on each partition all the way to a shared boundary to prevent gaps. Think of operations such as slicing or iso-surfacing. You can verify this by loading several vti files individually, grouping them and then applying slice. You'll see the gap at the boundary. There are various way of fixing this. One would be to use a format such as hdf5 and write to a single 3D array. Another would be to do the data movement to close the gaps in ParaView. We currently don't have a filter that does this out of box so using a Python programmable with mpi4py would be the simplest way to go there. Then there is the option of doing it in the code before outputting of course. From a developer perspective, this may be the simplest one for you to do but may introduce an overhead that may not be acceptable if you are running on thousands of codes and cannot exploit some sort of locality. Best, -berk On Fri, Nov 6, 2015 at 4:43 AM, Kaya Onur Dag wrote: > I have my own cfd solver in which I was using *.vti for paraview input but > decided to use parallel data write with *.pvti format and do node > parallelisation. > > My *.pvti file is like : > > > header_type="UInt64"> > 31 0 31" Origin=" 0.000000000000E+00 0.000000000000E+00 > 0.000000000000E+00" Spacing=" 0.196349540849E+00 0.196349540849E+00 > 0.645161290323E-01" GhostLevel="0"> > > format="appended"/> > format="appended"/> > format="appended"/> > > > > > > > The problem I am facing is I am having a gap in between z-axis 15-16 - > which paraview complains. > > I know that the solution is to have a ghost (overlapping) layer (can't > understand why since I am using point data?), and the issue is that my code > is not capable of generating overlapping nodes, unless I code it up and > manually transfer ghost layers at each data output stage for the sake of > being able to write data in parallel but it feels like an overkill... > > Any suggestions? > > Thanks in advance. > Kaya > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsriniv2 at ncsu.edu Mon Nov 9 14:18:43 2015 From: hsriniv2 at ncsu.edu (harshad1) Date: Mon, 9 Nov 2015 12:18:43 -0700 (MST) Subject: [vtkusers] Using QVTKWidget2 - an example or two In-Reply-To: <1447052540051-5734874.post@n5.nabble.com> References: <1447052540051-5734874.post@n5.nabble.com> Message-ID: <1447096723209-5734887.post@n5.nabble.com> Actually, I'm beginning to wonder if QVTKWidget2 is indeed the better, modern, option: When built with OpenGL2 vtk doesn't seem to build QVTKWidget2 at all (this is both on windows and on linux) Now I am stuck with the z buffer issue with QVTKWidget on my Linux laptop (My windows desktop with an Nvidia card works fine). Running with VTK compiled against OpenGL2 doesn't work - I get a /"VTK is designed to work with OpenGL version 3.2 but it appears it has been given a context that does not support 3.2. VTK will run in a compatibility mode designed to work with OpenGL 2.1 but some features may not work"/ bug followed by a crash. Again, any help would be appreciated. Thanks Harshad -- View this message in context: http://vtk.1045678.n5.nabble.com/Using-QVTKWidget2-an-example-or-two-tp5734874p5734887.html Sent from the VTK - Users mailing list archive at Nabble.com. From thomas.fastl at kcl.ac.uk Mon Nov 9 15:06:33 2015 From: thomas.fastl at kcl.ac.uk (Fastl, Thomas) Date: Mon, 9 Nov 2015 20:06:33 +0000 Subject: [vtkusers] Precision Loss During PolyData File Manipulation Message-ID: Hey VTK-User, I recently started using the VTK libraries in Python and would need some help to preserve the initial precision of 12 digits lost during file writing. I want to read a file containing polydata to perform a cleaning and write the resulting data back to another file, however, during this manipulation the initial precision is lost. I checked the coordinates after the reading and the cleaning phase and realized that the precision loss occurs in the writing stage. In addition, some random numerical artifacts seem to be added to the coordinates after the reading which I cannot explain. Below is the code I'm using: def readPolyData(fileName): reader = vtk.vtkPolyDataReader() reader.SetFileName(fileName) reader.Update() return (reader.GetOutput()) def writePolyData(outputPolyData,fileName): writer = vtk.vtkPolyDataWriter() writer.SetInput(outputPolyData) writer.SetFileTypeToASCII() writer.SetFileName(fileName) return (writer.Write()) def cleanPolyData(inputPolyData): cleaner = vtk.vtkCleanPolyData() cleaner.SetInput(inputPolyData) cleaner.Update() return (cleaner.GetOutput()) if __name__ == '__main__': personalizedMesh = readPolyData(inputPersonalized) personalizedMesh = cleanPolyData(personalizedMesh) personalizedAdapt = writePolyData(personalizedMesh,preFix+inputPersonalized) How can I increase the number of digits when writing the cleaned mesh data back to a file in writePolyData()? Why are there numerical artifacts occurring in the reading of the polydata and how can I get rid of them? Basically, I want the coordinates of the polydata to be exactly the same before and after the reading, only the mesh should be cleaned. I really appreciate any help/hint from your side, thanks! Best, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From sancho at whu.edu.cn Mon Nov 9 19:09:12 2015 From: sancho at whu.edu.cn (oyster) Date: Mon, 9 Nov 2015 17:09:12 -0700 (MST) Subject: [vtkusers] Precision Loss During PolyData File Manipulation In-Reply-To: References: Message-ID: <1447114152509-5734889.post@n5.nabble.com> Hi, Thomas The precision loss is caused by the polydatawriter, since you stored it as ASCII. Using BINARY would cure this usually. BTW, is you are not sure float will be as precise as it, set vtkPoints' datatype to DOUBLE. Some vtkAlgorithm also has similar settings. Regards, Sancho. -- View this message in context: http://vtk.1045678.n5.nabble.com/Precision-Loss-During-PolyData-File-Manipulation-tp5734888p5734889.html Sent from the VTK - Users mailing list archive at Nabble.com. From g.bogle at auckland.ac.nz Mon Nov 9 20:01:06 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Tue, 10 Nov 2015 01:01:06 +0000 Subject: [vtkusers] Building VTK 5.10 with VS 2015 Message-ID: Hi, Unfortunately my student has Visual Studio 2015 Community - the earlier VS versions seem to be no longer available on Dreamspark. I am trying to build VTK 5.10.1 with this version, but 8 library builds failed. Here are a few of the error messages: 8>C:\VTK5.10.1\Utilities\vtkhdf5\src\H5Omtime.c(226): error C2065: 'timezone': undeclared identifier 20>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt_search.h(191): error C2375: 'lfind': redefinition; different linkage (compiling source file C:\VTK5.10.1\Utilities\vtktiff\tif_close.c) 20> c:\vtk5.10.1\utilities\vtktiff\tiffiop.h(57): note: see declaration of 'lfind' (compiling source file C:\VTK5.10.1\Utilities\vtktiff\tif_close.c) (this error occurred many times) 16>C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx(60): error C2678: binary '<<': no operator found which takes a left-hand operand of type 'std::ostream' (or there is no acceptable conversion) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(497): note: could be 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_streambuf> *)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(477): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(const void *)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(457): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(long double)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(437): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(double)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(417): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(float)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(396): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned __int64)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(376): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(__int64)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(355): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned long)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(335): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(long)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(315): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned int)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(290): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(int)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(270): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(unsigned short)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(236): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(short)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(216): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(bool)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(209): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::ios_base &(__cdecl *)(std::ios_base &))' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(202): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_ios> &(__cdecl *)(std::basic_ios> &))' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream(196): note: or 'std::basic_ostream> &std::basic_ostream>::operator <<(std::basic_ostream> &(__cdecl *)(std::basic_ostream> &))' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> c:\vtk5.10.1\common\vtkSmartPointerBase.h(115): note: or 'std::ostream &operator <<(std::ostream &,const vtkSmartPointerBase &)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> c:\vtk5.10.1\common\vtkStdString.h(28): note: or 'std::ostream &operator <<(std::ostream &,const vtkStdString &)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 16> c:\vtk5.10.1\common\vtkLargeInteger.h(94): note: or 'std::ostream &operator <<(std::ostream &,const vtkLargeInteger &)' (compiling source file C:\VTK5.10.1\Common\vtkOStreamWrapper.cxx) 27>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file C:\VTK5.10.1\Utilities\vtklibxml2\DOCBparser.c) 27> C:\VTK-build\Utilities\vtklibxml2\config.h(254): note: see previous definition of 'snprintf' (compiling source file C:\VTK5.10.1\Utilities\vtklibxml2\DOCBparser.c) 27>cl : Command line warning D9025: overriding '/W1' with '/w' 27>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file C:\VTK5.10.1\Utilities\vtklibxml2\DOCBparser.c) 27> SAX2.c (this error occurs many times) 38>C:\VTK5.10.1\IO\vtkEnSightGoldBinaryReader.cxx(3925): error C2678: binary '==': no operator found which takes a left-hand operand of type 'std::basic_istream>' (or there is no acceptable conversion) 37> vtkImageHSIToRGB.cxx 38> c:\vtk5.10.1\common\vtkUnicodeString.h(234): note: could be 'bool operator ==(const vtkUnicodeString &,const vtkUnicodeString &)' (compiling source file C:\VTK5.10.1\IO\vtkEnSightGoldBinaryReader.cxx) 38> c:\vtk5.10.1\common\vtkWeakPointerBase.h(96): note: or 'bool operator ==(const vtkWeakPointerBase &,vtkObjectBase *)' (compiling source file C:\VTK5.10.1\IO\vtkEnSightGoldBinaryReader.cxx) 38> c:\vtk5.10.1\common\vtkWeakPointerBase.h(96): note: or 'bool operator ==(vtkObjectBase *,const vtkWeakPointerBase &)' (compiling source file C:\VTK5.10.1\IO\vtkEnSightGoldBinaryReader.cxx) 38> c:\vtk5.10.1\common\vtkWeakPointerBase.h(96): note: or 'bool operator ==(const vtkWeakPointerBase &,const vtkWeakPointerBase &)' (compiling source file C:\VTK5.10.1\IO\vtkEnSightGoldBinaryReader.cxx) ... Am I wasting my time with VS 2015? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From dieter.rosch at gmail.com Tue Nov 10 09:53:52 2015 From: dieter.rosch at gmail.com (Dieter Rosch) Date: Tue, 10 Nov 2015 16:53:52 +0200 Subject: [vtkusers] Fwd: Clipping STL only clips part of the object In-Reply-To: References: Message-ID: Hi all, I have just started experimenting with VTK via the ActiViz.NET wrapper. The examples are a very useful introduction, and I am really enjoying the toolkit so far. As an exercise, I have taken the regular BoxWidget example, and replaced the mace object with an STL I have. However I am running into a slight problem: When I move the BoxWidget to clip the STL image, it only seems to clip the front of the STL. An example of what I mean is visible here: <> I am pretty sure it is something small I am missing, it's as if the clipping algorithm does not see the not clipped part as an outside surface, perhaps a normal problem. Can anyone perhaps shed some light on this for me? .NET Code below for critique: using Kitware.VTK; using System; /// /// Class containing main method /// public class Demo { public static vtkWindowedSincPolyDataFilter GetBoneSTL() { string path = "C:\\Data\\sandbox\\python\\dicom\\example_images\\Shoulder"; var reader = new vtkDICOMImageReader(); reader.SetDirectoryName(path); var threshold = new vtkImageThreshold(); threshold.SetInputConnection(reader.GetOutputPort()); threshold.ThresholdByLower(350);// remove all soft tissue threshold.ReplaceInOn(); threshold.SetInValue(0); //set all values below 400 to 0 threshold.ReplaceOutOn(); threshold.SetOutValue(1); //set all values above 400 to 1 //Discrete Marching Cubes algorithm var dmc = new vtkDiscreteMarchingCubes(); dmc.SetInputConnection(threshold.GetOutputPort()); dmc.GenerateValues(1, 1, 1); //Clean the mesh var connect = new vtkPolyDataConnectivityFilter(); connect.SetInputConnection(dmc.GetOutputPort()); connect.SetExtractionModeToLargestRegion(); var clean = new vtkCleanPolyData(); clean.SetInputConnection(connect.GetOutputPort()); //clean.SetInputConnection(dmc.GetOutputPort()); //Smooth var smooth = new vtkWindowedSincPolyDataFilter(); smooth.SetNumberOfIterations(25); smooth.SetInputConnection(clean.GetOutputPort()); return smooth; } public static void Main(String[] argv) { boneSTL = Demo.GetBoneSTL(); glyph = vtkGlyph3D.New(); glyph.SetInputConnection(boneSTL.GetOutputPort()); glyph.SetVectorModeToUseNormal(); glyph.SetScaleModeToScaleByVector(); glyph.SetScaleFactor(0.25); boneMapper = vtkPolyDataMapper.New(); boneMapper.SetInputConnection(boneSTL.GetOutputPort()); boneActor = vtkLODActor.New(); boneActor.SetMapper(boneMapper); boneActor.VisibilityOn(); // This portion of the code clips the mace with the vtkPlanes implicit function. // The clipped region is colored green. planes = vtkPlanes.New(); clipper = vtkClipPolyData.New(); clipper.SetInputConnection(boneSTL.GetOutputPort()); clipper.SetClipFunction(planes); clipper.InsideOutOn(); selectMapper = vtkPolyDataMapper.New(); selectMapper.SetInputConnection(clipper.GetOutputPort()); selectMapper.ScalarVisibilityOff(); selectActor = vtkLODActor.New(); selectActor.SetMapper(selectMapper); selectActor.GetProperty().SetColor(0, 1, 0); selectActor.VisibilityOff(); selectActor.SetScale(1.01, 1.01, 1.01); // Create the RenderWindow, Renderer and both Actors ren1 = vtkRenderer.New(); renWin = vtkRenderWindow.New(); renWin.AddRenderer(ren1); iren = vtkRenderWindowInteractor.New(); iren.SetRenderWindow(renWin); // The SetInteractor method is how 3D widgets are associated with the render // window interactor. Internally, SetInteractor sets up a bunch of callbacks // using the Command/Observer mechanism (AddObserver()). boxWidget = vtkBoxWidget.New(); boxWidget.SetInteractor(iren); boxWidget.SetPlaceFactor(1.25); ren1.AddActor(boneActor); ren1.AddActor(selectActor); // Add the actors to the renderer, set the background and size ren1.SetBackground(0.1, 0.2, 0.4); renWin.SetSize(600, 600); // Place the interactor initially. The input to a 3D widget is used to // initially position and scale the widget. The EndInteractionEvent is // observed which invokes the SelectPolygons callback. boxWidget.SetInput(glyph.GetOutput()); boxWidget.PlaceWidget(); boxWidget.EndInteractionEvt += new vtkObject.vtkObjectEventHandler(SelectPolygons); // render the image iren.Initialize(); iren.Start(); //Clean up deleteAllVTKObjects(); } static vtkPolyDataAlgorithm boneSTL; static vtkGlyph3D glyph; static vtkAppendPolyData apd; static vtkPolyDataMapper boneMapper; static vtkLODActor boneActor; static vtkPlanes planes; static vtkClipPolyData clipper; static vtkPolyDataMapper selectMapper; static vtkLODActor selectActor; static vtkRenderer ren1; static vtkRenderWindow renWin; static vtkRenderWindowInteractor iren; static vtkBoxWidget boxWidget; /// /// Callback function for boxWidget.EndInteractionEvt /// public static void SelectPolygons(vtkObject sender, vtkObjectEventArgs e) { boxWidget.GetPlanes(planes); selectActor.VisibilityOn(); } /// ///Deletes all static objects created /// public static void deleteAllVTKObjects() { //clean up vtk objects if (boneSTL != null) { boneSTL.Dispose(); } //if (cone != null) { cone.Dispose(); } if (glyph != null) { glyph.Dispose(); } //if (apd != null) { apd.Dispose(); } if (boneMapper != null) { boneMapper.Dispose(); } if (boneActor != null) { boneActor.Dispose(); } if (planes != null) { planes.Dispose(); } if (clipper != null) { clipper.Dispose(); } if (selectMapper != null) { selectMapper.Dispose(); } if (selectActor != null) { selectActor.Dispose(); } if (ren1 != null) { ren1.Dispose(); } if (renWin != null) { renWin.Dispose(); } if (iren != null) { iren.Dispose(); } if (boxWidget != null) { boxWidget.Dispose(); } } } Regards, Dieter -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Tue Nov 10 10:54:32 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 10 Nov 2015 10:54:32 -0500 Subject: [vtkusers] Building VTK 5.10 with VS 2015 In-Reply-To: References: Message-ID: <20151110155432.GA11263@megas.khq.kitware.com> On Tue, Nov 10, 2015 at 01:01:06 +0000, Gib Bogle wrote: > Unfortunately my student has Visual Studio 2015 Community - the > earlier VS versions seem to be no longer available on Dreamspark. I > am trying to build VTK 5.10.1 with this version, but 8 library builds > failed. Here are a few of the error messages: VS2013 Community should still be available. Maybe not on Dreamspark, but it doesn't need a paid-for license either (as long as the work is FOSS). > Am I wasting my time with VS 2015? We only got VTK 6 working with VS2015 this year; I doubt VTK 5 support would be turn-key. There are numerous places in the code that assume that MSVC is not well-behaved where 2015 actually is (e.g., providing things like snprintf *as* snprintf). It could probably be patched to work, but VTK 5 is unlikely to get another release. --Ben From baoyun_li123 at yahoo.com Tue Nov 10 12:00:29 2015 From: baoyun_li123 at yahoo.com (baoyun) Date: Tue, 10 Nov 2015 10:00:29 -0700 (MST) Subject: [vtkusers] rotate a volume and show a slice. Message-ID: <1447174829337-5734893.post@n5.nabble.com> All: I need to show two slices of different volumes in the same view. The two volume had some rigid body transformation between them. The bounding box of second transformed volume should be a oblique rectangular box in 2D view. I attached two png, one named wanted.png, another named notWanted.png. Can somebody tell me how to show a slice as wanted.png with a regular slice image behind that in vtk framework. thanks Baoyun -- View this message in context: http://vtk.1045678.n5.nabble.com/rotate-a-volume-and-show-a-slice-tp5734893.html Sent from the VTK - Users mailing list archive at Nabble.com. From thomas.fastl at kcl.ac.uk Tue Nov 10 12:40:17 2015 From: thomas.fastl at kcl.ac.uk (Fastl, Thomas) Date: Tue, 10 Nov 2015 17:40:17 +0000 Subject: [vtkusers] Precision Loss During PolyData File Manipulation In-Reply-To: <1447114152509-5734889.post@n5.nabble.com> References: , <1447114152509-5734889.post@n5.nabble.com> Message-ID: Hello Sancho, storing data as BINARY rather then ASCII solved the precision problem, thanks! But honestly, I don't understand why this is an issue when storing as ASCII, this should be possible since this can be quite convenient especially during code development for checking outputs. I'm still struggling with the vtkPolyDataReader() and associated precisions, therefore I want to provide a test example here: def readPolyData(fileName): reader = vtk.vtkPolyDataReader() reader.SetFileName(fileName) reader.Update() return (reader.GetOutput()) personalizedMesh = readPolyData('test.vtk') The first vertex in the file 'test.vtk' is specified to be at [32376.558590 16410.828120 19045.751950], however, running the provided test example leads to (32376.55859375 16410.828125 19045.751953125). I don't understand why random digits are added (would expect that only 0 are added) and therefore played around with DOUBLE, but couldn't get this to work. Can anybody help me on that? I read that more people had this problem, but couldn't find a solution, thanks! Best, Thomas ________________________________________ From: vtkusers on behalf of oyster Sent: Tuesday, November 10, 2015 12:09 AM To: vtkusers at vtk.org Subject: Re: [vtkusers] Precision Loss During PolyData File Manipulation Hi, Thomas The precision loss is caused by the polydatawriter, since you stored it as ASCII. Using BINARY would cure this usually. BTW, is you are not sure float will be as precise as it, set vtkPoints' datatype to DOUBLE. Some vtkAlgorithm also has similar settings. Regards, Sancho. -- View this message in context: http://vtk.1045678.n5.nabble.com/Precision-Loss-During-PolyData-File-Manipulation-tp5734888p5734889.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From g.bogle at auckland.ac.nz Tue Nov 10 13:27:34 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Tue, 10 Nov 2015 18:27:34 +0000 Subject: [vtkusers] Building VTK 5.10 with VS 2015 In-Reply-To: <20151110155432.GA11263@megas.khq.kitware.com> References: , <20151110155432.GA11263@megas.khq.kitware.com> Message-ID: Thanks for that clarification, Ben. I found online a list of patches for Qt, and was able to build it, but I don't want to (and lack the knowledge to) undertake the same effort with VTK. I have not been able to locate free access to previous VS versions, so we are going to buy VS 2012, which is what I have been using. Best Gib ________________________________________ From: Ben Boeckel [ben.boeckel at kitware.com] Sent: Wednesday, 11 November 2015 4:54 a.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Building VTK 5.10 with VS 2015 On Tue, Nov 10, 2015 at 01:01:06 +0000, Gib Bogle wrote: > Unfortunately my student has Visual Studio 2015 Community - the > earlier VS versions seem to be no longer available on Dreamspark. I > am trying to build VTK 5.10.1 with this version, but 8 library builds > failed. Here are a few of the error messages: VS2013 Community should still be available. Maybe not on Dreamspark, but it doesn't need a paid-for license either (as long as the work is FOSS). > Am I wasting my time with VS 2015? We only got VTK 6 working with VS2015 this year; I doubt VTK 5 support would be turn-key. There are numerous places in the code that assume that MSVC is not well-behaved where 2015 actually is (e.g., providing things like snprintf *as* snprintf). It could probably be patched to work, but VTK 5 is unlikely to get another release. --Ben From ben.boeckel at kitware.com Tue Nov 10 14:40:12 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Tue, 10 Nov 2015 14:40:12 -0500 Subject: [vtkusers] Building VTK 5.10 with VS 2015 In-Reply-To: References: <20151110155432.GA11263@megas.khq.kitware.com> Message-ID: <20151110194012.GA9611@megas.khq.kitware.com> On Tue, Nov 10, 2015 at 18:27:34 +0000, Gib Bogle wrote: > Thanks for that clarification, Ben. I found online a list of patches > for Qt, and was able to build it, but I don't want to (and lack the > knowledge to) undertake the same effort with VTK. I have not been > able to locate free access to previous VS versions, so we are going to > buy VS 2012, which is what I have been using. Hrm, it does seem Microsoft has been aggressive in removing access to old versions. --Ben From dzenanz at gmail.com Tue Nov 10 14:50:29 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 10 Nov 2015 14:50:29 -0500 Subject: [vtkusers] Read STL File QVTKWidget vs QVTKWidget2 In-Reply-To: References: Message-ID: Hi Lays, this might be too late, but did you try this with an interactor? Appropriate example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/StyleSwitch Regards On Sat, Oct 31, 2015 at 4:12 PM, Lays Rodrigues < laysrodriguessilva at gmail.com> wrote: > Hi guys, > Yestarday i was able to get the code ReadSTL from VTK Wiki and convert to > use in my QtApp using QVTKWidget. But, this class is depreciade. So i'm > trying to use the QVTKWidget2. > Was told to me that i only need to this to make the code fom VTK Wiki > works on my code: > > vtkRenderWindow* renderWindow = this->GetRenderWindow(); > > Using the class QVTKWidget the return of GetRenderWindow is the type > vtkRenderWindow, so its easy to solve. But in the QVTKWidget2, the return > type of the function is a vtkGenericOpenGLRenderWindow, so with a little > help for other guy i came to this: > > vtkSmartPointer renderer = vtkSmartPointer::New(); > > vtkRenderWindowInteractor *r = this->GetRenderWindow()->GetInteractor(); > > vtkRenderWindow* renderWindow = vtkRenderWindow::New(); > > r->SetRenderWindow(renderWindow); > > renderWindow->AddRenderer(renderer); > > > renderer->AddActor(actor); > > renderer->SetBackground(.0, .5, 1); // Background color green > > > renderer->ResetCamera(); > > renderWindow->Render(); > > > > BUT, the stl is load on a popup window, and dont permit zoom or move the > load model . I guess that i'm missing something. But how i have only 2 days > working with VTK, i dont know. I think that is something small and stupid, > but i can be wrong too. > Any tips? > Thanks! > > ? > > > -- > __ > *Lays Rodrigues* > *Developer Front-End at Br-Print3D Project* > *Student of Computer Science at UFF/PURO* > Organizadora da Semana da Computa??o UFF-PURO > www.facebook.com/semanacomputacaopuro > www.facebook.com/brprint3d > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Tue Nov 10 14:54:17 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 10 Nov 2015 14:54:17 -0500 Subject: [vtkusers] VTK 5.10 significantly slower In-Reply-To: <1446130556987-5734680.post@n5.nabble.com> References: <1446043622022-5734649.post@n5.nabble.com> <1446045536648-5734654.post@n5.nabble.com> <1446046767501-5734659.post@n5.nabble.com> <1446130556987-5734680.post@n5.nabble.com> Message-ID: ?arko, make sure to select Release when building your project. That Debug/Release build type is controlled by CMAKE_BUILD_TYPE on *nix. Regards On Thu, Oct 29, 2015 at 10:55 AM, zarko.milosevic wrote: > CMAKE_BUILD_TYPE is not present anywhere on CmakeCache file. How do i set > it > ? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/VTK-5-10-significantly-slower-tp5734649p5734680.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Tue Nov 10 16:09:49 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Tue, 10 Nov 2015 21:09:49 +0000 Subject: [vtkusers] Building VTK 5.10 with VS 2015 In-Reply-To: <20151110194012.GA9611@megas.khq.kitware.com> References: <20151110155432.GA11263@megas.khq.kitware.com> , <20151110194012.GA9611@megas.khq.kitware.com> Message-ID: And perhaps my experience indicates the reason - my grant is now a paying customer. ________________________________________ From: Ben Boeckel [ben.boeckel at kitware.com] Sent: Wednesday, 11 November 2015 8:40 a.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] Building VTK 5.10 with VS 2015 On Tue, Nov 10, 2015 at 18:27:34 +0000, Gib Bogle wrote: > Thanks for that clarification, Ben. I found online a list of patches > for Qt, and was able to build it, but I don't want to (and lack the > knowledge to) undertake the same effort with VTK. I have not been > able to locate free access to previous VS versions, so we are going to > buy VS 2012, which is what I have been using. Hrm, it does seem Microsoft has been aggressive in removing access to old versions. --Ben From laysrodriguessilva at gmail.com Tue Nov 10 16:32:33 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Tue, 10 Nov 2015 19:32:33 -0200 Subject: [vtkusers] Problem with STL Files In-Reply-To: References: Message-ID: Well, after a few researchs, i discover this: with STL's at the binary forms, works well, the problem is when the STL file is in format ASCII. Well, I could not go much further than that. I looked all class vtkSTLReader provided on github ( https://github.com/Kitware/VTK/blob/master/IO/Geometry/vtkSTLReader.cxx) and analyzed with my file of Tardis. The error happens when the first point was readed. I think(?) 0 ->solid Object01 (Ignore) 1-> facet normal 0.000000e+000 -0.000000e+000 -1.000000e+000 (LineCount=1) at line 350/ (LineCount=2) at line 353 2-> outer loop *3-> vertex -6.820349e-001 -6.797730e-001 3.191896e+001* 4-> vertex -6.820349e-001 6.797730e-001 3.191896e+001 5-> vertex 6.820349e-001 6.797730e-001 3.191896e+001 6-> endloop 7-> endfacet What I find funny is that, when I compile the file provided by VTK Wiki ( http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadSTL) everything works normally. The problem is when I generate this code inside my App. At my previous e-mail is my function, i just change 3 lines to work at my project. I'm really confused. Please, help me to discover whats going on. Thanks LineCount 1 at line 350 Read Line at line 351: facet normal 0.000000e+000 -0.000000e+000 -1.000000e+000 LineCount 2 at line 353 Test Failed, Jump to line 367 Read Line -> outer loop at line 367 LineCount 3 at line 371 Read one String and 3 Floats -> vertex -6.820349e-001 -6.797730e-001 3.191896e+001 at line 373 throw error ate line 375 Could be problem of my SO(Fedora 22)? Because my friend in ArchLinux open the App and works fine. Thanks 2015-11-07 21:33 GMT-02:00 Lays Rodrigues : > Hi guys, good night! > I have made a function to render Stl files on my qtApp. However, dont work > with a STL that worked before. At the first time that I open a Doctor Who > Tardis worked fine(a few days ago), but when i try to open again(today) > this error happens: > ------------------ > *^CERROR: In /home/lays/Downloads/VTK-6.3.0/IO/Geometry/vtkSTLReader.cxx, > line 461* > *vtkSTLReader (0x463f570): STLReader: error while reading file > /home/lays/Downloads/Doctor_Who_Tardis/Doctor_Who_Tardis.STL at line 3: > unable to read point.* > > *ERROR: In > /home/lays/Downloads/VTK-6.3.0/Common/ExecutionModel/vtkExecutive.cxx, line > 784* > *vtkCompositeDataPipeline (0x36c2040): Algorithm vtkSTLReader(0x463f570) > returned failure for request: vtkInformation (0x359d700)* > * Debug: Off* > * Modified Time: 148542* > * Reference Count: 1* > * Registered Events: (none)* > * Request: REQUEST_DATA* > * FROM_OUTPUT_PORT: 0* > * ALGORITHM_AFTER_FORWARD: 1* > * FORWARD_DIRECTION: 0* > ------------------ > It happens with other STL files to. > > The function is this: > > http://pastebin.com/qPzTsidp > > Any tips for what happening? > Thanks! > -- > __ > *Lays Rodrigues* > *Developer Front-End at Br-Print3D Project* > *Student of Computer Science at UFF/PURO* > Organizadora da Semana da Computa??o UFF-PURO > www.facebook.com/semanacomputacaopuro > www.facebook.com/brprint3d > > > > -- __ *Lays Rodrigues* *Developer Front-End at Br-Print3D Project* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.robertson at cfdrc.com Tue Nov 10 17:47:17 2015 From: eric.robertson at cfdrc.com (Eric D. Robertson) Date: Tue, 10 Nov 2015 22:47:17 +0000 Subject: [vtkusers] VTK Threshold Discrepancy Message-ID: <1B22639EA62F9B41AF2D9DE147555DF308A52D22@Mail.cfdrc.com> I am using vtkThreshold to filter point data stored as vtkStructuredGrid. The data is essentially an array of 0's and 1's, where I am looking to only keep the cells with 1's stored. When I apply the vtkThreshold, the result is a domain slightly smaller than the number of cells with 1's. In other words, the number of cells in the vtkThreshold doesn't exactly match up to the number of 1's available in the original unthresholded domain. Is this a known issue? Eric Robertson Research Engineer, BET CFD Research Corporation 701 McMillian Way NW, Suite D Huntsville, AL 35806 Ph: 256-726-4912 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Nov 10 17:58:00 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 10 Nov 2015 17:58:00 -0500 Subject: [vtkusers] VTK Threshold Discrepancy In-Reply-To: <1B22639EA62F9B41AF2D9DE147555DF308A52D22@Mail.cfdrc.com> References: <1B22639EA62F9B41AF2D9DE147555DF308A52D22@Mail.cfdrc.com> Message-ID: Eric, Try unchecking the "All Scalars" option in the Threshold filter properties. HTH, Cory On Tue, Nov 10, 2015 at 5:47 PM, Eric D. Robertson wrote: > I am using vtkThreshold to filter point data stored as vtkStructuredGrid. > > > > The data is essentially an array of 0?s and 1?s, where I am looking to > only keep the cells with 1?s stored. > > > > When I apply the vtkThreshold, the result is a domain slightly smaller > than the number of cells with 1?s. In other words, the number of cells in > the vtkThreshold doesn?t exactly match up to the number of 1?s available in > the original unthresholded domain. Is this a known issue? > > > > > > > > Eric Robertson > > Research Engineer, BET > > CFD Research Corporation > > 701 McMillian Way NW, Suite D > > Huntsville, AL 35806 > > Ph: 256-726-4912 > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Nov 10 18:05:00 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 10 Nov 2015 18:05:00 -0500 Subject: [vtkusers] Precision Loss During PolyData File Manipulation In-Reply-To: References: <1447114152509-5734889.post@n5.nabble.com> Message-ID: Thomas, Saving as BINARY saves the bits that represent the binary floating point number in RAM exactly to disk. When you load those bits back, you get exactly the same number in RAM again. Saving as ASCII requires that the binary float point number be converted to a base-10 string representation, and loading the ASCII file requires conversion from a base-10 string back to binary. This conversion isn't always perfect (consider the number 0.1 [1]), hence the differences you see. HTH, Cory [1] http://www.exploringbinary.com/why-0-point-1-does-not-exist-in-floating-point/ On Tue, Nov 10, 2015 at 12:40 PM, Fastl, Thomas wrote: > Hello Sancho, > > storing data as BINARY rather then ASCII solved the precision problem, > thanks! But honestly, I don't understand why this is an issue when storing > as ASCII, this should be possible since this can be quite convenient > especially during code development for checking outputs. I'm still > struggling with the vtkPolyDataReader() and associated precisions, > therefore I want to provide a test example here: > > def readPolyData(fileName): > > reader = vtk.vtkPolyDataReader() > reader.SetFileName(fileName) > reader.Update() > > return (reader.GetOutput()) > > personalizedMesh = readPolyData('test.vtk') > > The first vertex in the file 'test.vtk' is specified to be at > [32376.558590 16410.828120 19045.751950], however, running the provided > test example leads to (32376.55859375 16410.828125 19045.751953125). I > don't understand why random digits are added (would expect that only 0 are > added) and therefore played around with DOUBLE, but couldn't get this to > work. Can anybody help me on that? I read that more people had this > problem, but couldn't find a solution, thanks! > > Best, Thomas > > ________________________________________ > From: vtkusers on behalf of oyster < > sancho at whu.edu.cn> > Sent: Tuesday, November 10, 2015 12:09 AM > To: vtkusers at vtk.org > Subject: Re: [vtkusers] Precision Loss During PolyData File Manipulation > > Hi, Thomas > The precision loss is caused by the polydatawriter, since you stored it as > ASCII. Using BINARY would cure this usually. > > BTW, is you are not sure float will be as precise as it, set vtkPoints' > datatype to DOUBLE. Some vtkAlgorithm also has similar settings. > > Regards, > Sancho. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Precision-Loss-During-PolyData-File-Manipulation-tp5734888p5734889.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 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dieter.rosch at gmail.com Wed Nov 11 03:57:00 2015 From: dieter.rosch at gmail.com (Dieter Rosch) Date: Wed, 11 Nov 2015 10:57:00 +0200 Subject: [vtkusers] Clipping DiscreteMarchingCubes extracted object with BoxWidget only clips the front surfaces Message-ID: Good morning, Apologies for the repost of the question I posted yesterday - when I woke up this morning I realised I had completely mislabeled the question, referring to an STL when in fact, the object was a DICOM object I had extracted using Thresholding and MarchingCubes. Hopefully the clarified subject line and explanation will target the correct audience. I have just started experimenting with VTK via the ActiViz.NET wrapper. The examples are a very useful introduction to the toolkit. As an exercise, I have taken the regular BoxWidget example, and replaced the mace object with an object I have extracted from a DICOM. However I am running into a slight problem:When I move the BoxWidget to clip the object, it only seems to clip the front of the object. An example of what I mean is visible here: <>. As you can see, only the front surfaces seem to turn green (green indicates the clipped area). I am pretty sure it is something small I am missing, it's as if the clipping algorithm does not see the not clipped part as an outside surface, perhaps a problem with normals. Can anyone perhaps shed some light on this for me?.NET Code below for critique,thought it maps pretty closely to the C++ code: > > using Kitware.VTK; > using System; > > /// > /// Class containing main method > /// > public class Demo > { > > > public static void Main(String[] argv) > { > string path = > "C:\\Data\\sandbox\\python\\dicom\\example_images\\Shoulder"; > var reader = new vtkDICOMImageReader(); > reader.SetDirectoryName(path); > > var threshold = new vtkImageThreshold(); > threshold.SetInputConnection(reader.GetOutputPort()); > threshold.ThresholdByLower(350);// remove all soft tissue > threshold.ReplaceInOn(); > threshold.SetInValue(0); //set all values below 400 to 0 > threshold.ReplaceOutOn(); > threshold.SetOutValue(1); //set all values above 400 to 1 > > > //Discrete Marching Cubes algorithm > var dmc = new vtkDiscreteMarchingCubes(); > dmc.SetInputConnection(threshold.GetOutputPort()); > dmc.GenerateValues(1, 1, 1); > > //Clean the mesh > var connect = new vtkPolyDataConnectivityFilter(); > connect.SetInputConnection(dmc.GetOutputPort()); > connect.SetExtractionModeToLargestRegion(); > > var clean = new vtkCleanPolyData(); > clean.SetInputConnection(connect.GetOutputPort()); > //clean.SetInputConnection(dmc.GetOutputPort()); > > //Smooth > var boneSTL = new vtkWindowedSincPolyDataFilter(); > boneSTL.SetNumberOfIterations(25); > boneSTL.SetInputConnection(clean.GetOutputPort()); > > glyph = vtkGlyph3D.New(); > > glyph.SetInputConnection(boneSTL.GetOutputPort()); > glyph.SetVectorModeToUseNormal(); > glyph.SetScaleModeToScaleByVector(); > glyph.SetScaleFactor(0.25); > > boneMapper = vtkPolyDataMapper.New(); > boneMapper.SetInputConnection(boneSTL.GetOutputPort()); > > boneActor = vtkLODActor.New(); > boneActor.SetMapper(boneMapper); > > boneActor.VisibilityOn(); > > // This portion of the code clips the mace with the vtkPlanes > implicit function. > // The clipped region is colored green. > planes = vtkPlanes.New(); > clipper = vtkClipPolyData.New(); > > clipper.SetInputConnection(boneSTL.GetOutputPort()); > clipper.SetClipFunction(planes); > clipper.InsideOutOn(); > > selectMapper = vtkPolyDataMapper.New(); > selectMapper.SetInputConnection(clipper.GetOutputPort()); > selectMapper.ScalarVisibilityOff(); > > selectActor = vtkLODActor.New(); > selectActor.SetMapper(selectMapper); > selectActor.GetProperty().SetColor(0, 1, 0); > selectActor.VisibilityOff(); > selectActor.SetScale(1.01, 1.01, 1.01); > > // Create the RenderWindow, Renderer and both Actors > ren1 = vtkRenderer.New(); > renWin = vtkRenderWindow.New(); > renWin.AddRenderer(ren1); > iren = vtkRenderWindowInteractor.New(); > iren.SetRenderWindow(renWin); > > // The SetInteractor method is how 3D widgets are associated with > the render > // window interactor. Internally, SetInteractor sets up a bunch of > callbacks > // using the Command/Observer mechanism (AddObserver()). > boxWidget = vtkBoxWidget.New(); > boxWidget.SetInteractor(iren); > boxWidget.SetPlaceFactor(1.25); > ren1.AddActor(boneActor); > ren1.AddActor(selectActor); > > // Add the actors to the renderer, set the background and size > ren1.SetBackground(0.1, 0.2, 0.4); > renWin.SetSize(600, 600); > > // Place the interactor initially. The input to a 3D widget is > used to > // initially position and scale the widget. The > EndInteractionEvent is > // observed which invokes the SelectPolygons callback. > boxWidget.SetInput(glyph.GetOutput()); > boxWidget.PlaceWidget(); > boxWidget.EndInteractionEvt += new > vtkObject.vtkObjectEventHandler(SelectPolygons); > > // render the image > iren.Initialize(); > iren.Start(); > //Clean up > deleteAllVTKObjects(); > } > > static vtkPolyDataAlgorithm boneSTL; > static vtkGlyph3D glyph; > static vtkAppendPolyData apd; > static vtkPolyDataMapper boneMapper; > static vtkLODActor boneActor; > static vtkPlanes planes; > static vtkClipPolyData clipper; > static vtkPolyDataMapper selectMapper; > static vtkLODActor selectActor; > static vtkRenderer ren1; > static vtkRenderWindow renWin; > static vtkRenderWindowInteractor iren; > static vtkBoxWidget boxWidget; > > /// > /// Callback function for boxWidget.EndInteractionEvt > /// > public static void SelectPolygons(vtkObject sender, vtkObjectEventArgs > e) > { > boxWidget.GetPlanes(planes); > selectActor.VisibilityOn(); > } > > /// > ///Deletes all static objects created > /// > public static void deleteAllVTKObjects() > { > //clean up vtk objects > if (boneSTL != null) { boneSTL.Dispose(); } > //if (cone != null) { cone.Dispose(); } > if (glyph != null) { glyph.Dispose(); } > //if (apd != null) { apd.Dispose(); } > if (boneMapper != null) { boneMapper.Dispose(); } > if (boneActor != null) { boneActor.Dispose(); } > if (planes != null) { planes.Dispose(); } > if (clipper != null) { clipper.Dispose(); } > if (selectMapper != null) { selectMapper.Dispose(); } > if (selectActor != null) { selectActor.Dispose(); } > if (ren1 != null) { ren1.Dispose(); } > if (renWin != null) { renWin.Dispose(); } > if (iren != null) { iren.Dispose(); } > if (boxWidget != null) { boxWidget.Dispose(); } > } > } > > > Thank you in advance for the help. > > Regards, > Dieter > -------------- next part -------------- An HTML attachment was scrubbed... URL: From baoyun_li123 at yahoo.com Wed Nov 11 09:43:54 2015 From: baoyun_li123 at yahoo.com (baoyun) Date: Wed, 11 Nov 2015 07:43:54 -0700 (MST) Subject: [vtkusers] rotate a volume and show a slice. In-Reply-To: <1447174829337-5734893.post@n5.nabble.com> References: <1447174829337-5734893.post@n5.nabble.com> Message-ID: <1447253034162-5734907.post@n5.nabble.com> All: I figured out the solution. when I display 2 slices from different volume( volume 1, and volume 2 which had orietation and shift regarding to volume1), do following: 1, volume 1, extract orthogoral slice to display. 2, using othogonal plane to intersect with bounding box of second volume, I will get an oblique rectanglar. 3, make an orthogonal rectangular using xmin,ymin,xmax,ymax of oblique rectangular. 4, interpolate from volume2 to get fill the above rectangular to get new image. 5,the new image has outside value for the region outside of the oblique rectrangular box. 6,when display the second image, for the outside value set alpha zero when making look up table. thanks baoyun -- View this message in context: http://vtk.1045678.n5.nabble.com/rotate-a-volume-and-show-a-slice-tp5734893p5734907.html Sent from the VTK - Users mailing list archive at Nabble.com. From berk.geveci at kitware.com Wed Nov 11 10:34:41 2015 From: berk.geveci at kitware.com (Berk Geveci) Date: Wed, 11 Nov 2015 10:34:41 -0500 Subject: [vtkusers] how to avoid overlapping (ghost) layer in *.pvti files In-Reply-To: References: Message-ID: Yes, writing as cell data will fix the issue. I also agree that in practice, there is no difference and that the reader should handle your case by doing redundant reads across files when reading in parallel and without any additional work when reading in serial. It is a deficiency in the reader. Best, -berk On Mon, Nov 9, 2015 at 11:37 AM, Kaya Onur Dag wrote: > Dear Berk, > > Thanks for the reply. > > I will adjust my data to write cell data instead of point data and overlap > cell boundary nodes.. I think this would be most reasonable approach. To my > (naive) understanding, (even) if I reproduce nodes to overlap with mpi > transfers, that would be wrong since paraview will be taking them as cell > arrays even if they were mentioned as point data. > > Further, technically it should be possible to interpolate also with the > point data with given information since the shared boundary this time is > the one in between two points from two different fields. Also I think there > should not be a need for an external filter to do such an operation. It > should just do it automatically. It is referred as point data at the end, > and necessary information is provided in the pvti file... Well it just > boils to the point that I just can't understand why Paraview is not capable > of taking 2 datas from 2 different fields and interpolate in between. > Because it does interpolate if the data is from the same file. This is very > annoying for a user like me who doesn't know much about these :) > > Thanks again. > > Kaya > > On 9 November 2015 at 15:54, Berk Geveci wrote: > >> Dear Kaya, >> >> We need nodes overlapping for visualization purposes. We need to be able >> to interpolate the field on each partition all the way to a shared boundary >> to prevent gaps. Think of operations such as slicing or iso-surfacing. You >> can verify this by loading several vti files individually, grouping them >> and then applying slice. You'll see the gap at the boundary. There are >> various way of fixing this. One would be to use a format such as hdf5 and >> write to a single 3D array. Another would be to do the data movement to >> close the gaps in ParaView. We currently don't have a filter that does this >> out of box so using a Python programmable with mpi4py would be the simplest >> way to go there. Then there is the option of doing it in the code before >> outputting of course. From a developer perspective, this may be the >> simplest one for you to do but may introduce an overhead that may not be >> acceptable if you are running on thousands of codes and cannot exploit some >> sort of locality. >> >> Best, >> -berk >> >> On Fri, Nov 6, 2015 at 4:43 AM, Kaya Onur Dag >> wrote: >> >>> I have my own cfd solver in which I was using *.vti for paraview input >>> but decided to use parallel data write with *.pvti format and do node >>> parallelisation. >>> >>> My *.pvti file is like : >>> >>> >>> >> header_type="UInt64"> >>> >> 31 0 31" Origin=" 0.000000000000E+00 0.000000000000E+00 >>> 0.000000000000E+00" Spacing=" 0.196349540849E+00 0.196349540849E+00 >>> 0.645161290323E-01" GhostLevel="0"> >>> >>> >> format="appended"/> >>> >> format="appended"/> >>> >> format="appended"/> >>> >>> >>> >>> >>> >>> >>> The problem I am facing is I am having a gap in between z-axis 15-16 - >>> which paraview complains. >>> >>> I know that the solution is to have a ghost (overlapping) layer (can't >>> understand why since I am using point data?), and the issue is that my code >>> is not capable of generating overlapping nodes, unless I code it up and >>> manually transfer ghost layers at each data output stage for the sake of >>> being able to write data in parallel but it feels like an overkill... >>> >>> Any suggestions? >>> >>> Thanks in advance. >>> Kaya >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hongsongyang at 163.com Wed Nov 11 11:21:52 2015 From: hongsongyang at 163.com (hongsongyang) Date: Thu, 12 Nov 2015 00:21:52 +0800 (CST) Subject: [vtkusers] An Issue About Cmake and Building VTK 6.2 or 6.3 on VS2010 Message-ID: <69a02432.1226e.150f75a7597.Coremail.hongsongyang@163.com> Hello Everyone, As I known, the vtk 6 version will add version number in output dll or lib files. Such as in 5.10, the vtkCommon.dll will be changed into vtkCommonCore-6.3.dll However, when I cmake and build the 6.2 or 6.3 version, the -6.3 will dispear sometimes. Such as the vtkCommonCore.dll will generated instead of vtkCommonCore-6.x.dll Especially when I make the jave option on in cmake. I have tested in 6.2 version and 6.3 version. I am not sure why this happened. Is there any one who could tell me why? Best regards, Hongsongyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Wed Nov 11 13:58:51 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 11 Nov 2015 13:58:51 -0500 Subject: [vtkusers] An Issue About Cmake and Building VTK 6.2 or 6.3 on VS2010 In-Reply-To: <69a02432.1226e.150f75a7597.Coremail.hongsongyang@163.com> References: <69a02432.1226e.150f75a7597.Coremail.hongsongyang@163.com> Message-ID: <20151111185851.GB3519@megas.khq.kitware.com> On Thu, Nov 12, 2015 at 00:21:52 +0800, hongsongyang wrote: > However, when I cmake and build the 6.2 or 6.3 version, the -6.3 will dispear sometimes. > Such as the vtkCommonCore.dll will generated instead of vtkCommonCore-6.x.dll > Especially when I make the jave option on in cmake. > I have tested in 6.2 version and 6.3 version. > I am not sure why this happened. Is there any one who could tell me why? The suffix can be controlled by a cache variable (VTK_CUSTOM_LIBRARY_SUFFIX), but defaults to "-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}". Do you have a custom suffix or a custom version setting? --Ben From sebastian.hilbert at gmx.net Wed Nov 11 14:46:12 2015 From: sebastian.hilbert at gmx.net (Sebastian Hilbert) Date: Wed, 11 Nov 2015 20:46:12 +0100 Subject: [vtkusers] tool for cutting away parts of a mesh Message-ID: <1700819.4d4or9LlEG@basti-thinkpad-t410> Hi all, Can anyone recommend a software product that can easily and readily manipulate meshes in the following way ... We are reconstructing 3D models from Dicom datasets (heart) and exports those as STL or VTK. This is basically volume rendering and exporting. I am looking for a software that can read those models and let the user cut away parts of the model by simply encircling a region (freehand). Any help is appreciated. Sebastian From hongsongyang at 163.com Thu Nov 12 00:02:55 2015 From: hongsongyang at 163.com (HongSongyang) Date: Thu, 12 Nov 2015 13:02:55 +0800 Subject: [vtkusers] An Issue About Cmake and Building VTK 6.2 or 6.3 on VS2010 In-Reply-To: <20151111185851.GB3519@megas.khq.kitware.com> References: <69a02432.1226e.150f75a7597.Coremail.hongsongyang@163.com> <20151111185851.GB3519@megas.khq.kitware.com> Message-ID: <000001d11d07$654f7de0$2fee79a0$@163.com> Hi Ben, Thank you for your reply. It seems this issue has been solved after I add -6.3 to the VTK_CUSTOM_LIBRARY_SUFFIX. It's quite abnormal that why sometimes this prefix is same with VTK version but sometimes it is blank? Do you know why? HongSongyang -----Original Message----- From: Ben Boeckel [mailto:ben.boeckel at kitware.com] Sent: 2015?11?12? 2:59 To: hongsongyang Cc: vtkusers at vtk.org Subject: Re: [vtkusers] An Issue About Cmake and Building VTK 6.2 or 6.3 on VS2010 On Thu, Nov 12, 2015 at 00:21:52 +0800, hongsongyang wrote: > However, when I cmake and build the 6.2 or 6.3 version, the -6.3 will dispear sometimes. > Such as the vtkCommonCore.dll will generated instead of > vtkCommonCore-6.x.dll Especially when I make the jave option on in cmake. > I have tested in 6.2 version and 6.3 version. > I am not sure why this happened. Is there any one who could tell me why? The suffix can be controlled by a cache variable (VTK_CUSTOM_LIBRARY_SUFFIX), but defaults to "-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}". Do you have a custom suffix or a custom version setting? --Ben From csaravanakumar2010 at gmail.com Thu Nov 12 04:12:32 2015 From: csaravanakumar2010 at gmail.com (saravanakumar) Date: Thu, 12 Nov 2015 02:12:32 -0700 (MST) Subject: [vtkusers] How to write .vtp files? Message-ID: <1447319552974-5734916.post@n5.nabble.com> Hi Everyone, I am trying to create .vtp files. Is there any possible to create .vtp files from TIFF Images? -- View this message in context: http://vtk.1045678.n5.nabble.com/How-to-write-vtp-files-tp5734916.html Sent from the VTK - Users mailing list archive at Nabble.com. From hongsongyang at 163.com Thu Nov 12 03:57:22 2015 From: hongsongyang at 163.com (HongSongyang) Date: Thu, 12 Nov 2015 16:57:22 +0800 Subject: [vtkusers] About java in VTK 6.3 Message-ID: <000301d11d28$260a4680$721ed380$@163.com> Hi everyone, About VTK usage in java, we have some examples in VTK. E.g in . \Examples\Tutorial\Step5\Java\Cone5.java There are following code: static { System.loadLibrary("vtkCommonJava"); System.loadLibrary("vtkFilteringJava"); System.loadLibrary("vtkIOJava"); System.loadLibrary("vtkImagingJava"); System.loadLibrary("vtkGraphicsJava"); System.loadLibrary("vtkRenderingJava"); } However, there is no these libraries in vtk 6.3 Could anyone give me some advice? Thanks a lot. HongSongyang From lonni.besancon at gmail.com Thu Nov 12 05:05:49 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Thu, 12 Nov 2015 03:05:49 -0700 (MST) Subject: [vtkusers] VTK for android In-Reply-To: <1446110257022-5734676.post@n5.nabble.com> References: <1444655686433-5734365.post@n5.nabble.com> <20151013133844.GA17907@megas.khq.kitware.com> <1444752143727-5734393.post@n5.nabble.com> <1445612315711-5734538.post@n5.nabble.com> <1445877745725-5734567.post@n5.nabble.com> <1445913229439-5734600.post@n5.nabble.com> <1446110257022-5734676.post@n5.nabble.com> Message-ID: <1447322749348-5734918.post@n5.nabble.com> Hi Ken, Do you have any news on a possible blog post? Thanks in advance, Have a nice day -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-for-android-tp5734365p5734918.html Sent from the VTK - Users mailing list archive at Nabble.com. From lonni.besancon at gmail.com Thu Nov 12 07:06:56 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Thu, 12 Nov 2015 05:06:56 -0700 (MST) Subject: [vtkusers] Apply one transformation matrix to an other actor Message-ID: <1447330016380-5734919.post@n5.nabble.com> Hello, I was wondering if there was a way to extract the transformation matrix of an actor and apply it to an other actor. The scenario would be something like that: I have an actor with a given orientation/position/scaling, that I would like to apply to an other actor so that it gets in the exact same orientation/position/scaling. This could be use for instance to swap two actors or to mirror on different applications the different actions made on one of the applications. So far I have tried to play with GetUserMatrix() and SetUserMatrix(), but the problem is that most of the time this matrix is NULL. So I have tried to use the GetMatrix() to get the matrix of the first actor but I was wondering how I could now apply it to an other one. I've tried to read the documentation but I was unsuccessful in finding the exact information I'm looking for. Have a nice day and thanks in advance for the help -- View this message in context: http://vtk.1045678.n5.nabble.com/Apply-one-transformation-matrix-to-an-other-actor-tp5734919.html Sent from the VTK - Users mailing list archive at Nabble.com. From DLRdave at aol.com Thu Nov 12 08:19:25 2015 From: DLRdave at aol.com (David Cole) Date: Thu, 12 Nov 2015 08:19:25 -0500 Subject: [vtkusers] Apply one transformation matrix to an other actor In-Reply-To: <1447330016380-5734919.post@n5.nabble.com> References: <1447330016380-5734919.post@n5.nabble.com> Message-ID: Try GetMatrix / SetUserMatrix. If the destination actor has any position, rotation or scaling directly, you'll have to reset those to 0 or 1 appropriately. If not, the destination actor should snap to the source actor after calling SetUserMatrix. On Thursday, November 12, 2015, Lonni Besan?on wrote: > Hello, > > I was wondering if there was a way to extract the transformation matrix of > an actor and apply it to an other actor. > The scenario would be something like that: I have an actor with a given > orientation/position/scaling, that I would like to apply to an other actor > so that it gets in the exact same orientation/position/scaling. This could > be use for instance to swap two actors or to mirror on different > applications the different actions made on one of the applications. > > So far I have tried to play with GetUserMatrix() and SetUserMatrix(), but > the problem is that most of the time this matrix is NULL. So I have tried > to > use the GetMatrix() to get the matrix of the first actor but I was > wondering > how I could now apply it to an other one. > > I've tried to read the documentation but I was unsuccessful in finding the > exact information I'm looking for. > > Have a nice day and thanks in advance for the help > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Apply-one-transformation-matrix-to-an-other-actor-tp5734919.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From xabivtk at gmail.com Thu Nov 12 08:33:52 2015 From: xabivtk at gmail.com (Xabi Riobe) Date: Thu, 12 Nov 2015 14:33:52 +0100 Subject: [vtkusers] vtkImageData::GetDimensions not setting member variable anymore Message-ID: Hi, I see in the code of vtkImageData::GetDimensions(int dims[3]) that the "Dimensions" member variable is not computed anymore since commit 4345f286e7fbffe0d8734ade60824556cb1b3d3d , for thread safe reasons. I can understand the reason for this change if it can not be done otherway, but i think the documentation of the method should be updated, since it is curently : "Dimensions are computed from Extents during this call." It is true for the int *GetDimensions() implementation but not this one anymore. Cheers, Xabi -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Nov 12 08:46:01 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 12 Nov 2015 08:46:01 -0500 Subject: [vtkusers] How to write .vtp files? In-Reply-To: <1447319552974-5734916.post@n5.nabble.com> References: <1447319552974-5734916.post@n5.nabble.com> Message-ID: .vtp files store polygonal mesh data. Do you mean you want to create a .vti file, which is used for storing image data, from your TIFF images? On Thu, Nov 12, 2015 at 4:12 AM, saravanakumar wrote: > Hi Everyone, > I am trying to create .vtp files. Is there any possible to create > .vtp > files from TIFF Images? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/How-to-write-vtp-files-tp5734916.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Nov 12 08:48:12 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 12 Nov 2015 08:48:12 -0500 Subject: [vtkusers] [vtk-developers] vtkImageData::GetDimensions not setting member variable anymore In-Reply-To: References: Message-ID: That sounds reasonable to me. On Thu, Nov 12, 2015 at 8:33 AM, Xabi Riobe wrote: > Hi, > > I see in the code of vtkImageData::GetDimensions(int dims[3]) that the > "Dimensions" member variable is not computed anymore since commit > 4345f286e7fbffe0d8734ade60824556cb1b3d3d > , > for thread safe reasons. > > I can understand the reason for this change if it can not be done > otherway, but i think the documentation of the method should be updated, > since it is curently : > "Dimensions are computed from Extents during this call." > > It is true for the int *GetDimensions() implementation but not this one > anymore. > > Cheers, > Xabi > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Thu Nov 12 08:55:16 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Thu, 12 Nov 2015 08:55:16 -0500 Subject: [vtkusers] About java in VTK 6.3 In-Reply-To: <000301d11d28$260a4680$721ed380$@163.com> References: <000301d11d28$260a4680$721ed380$@163.com> Message-ID: Apparently the Java examples have not been updated since the switch to the module system. Try replacing what you cite with static { System.loadLibrary("vtkCommonCoreJava"); System.loadLibrary("vtkFiltersSourcesJava"); System.loadLibrary("vtkInteractionStyleJava"); System.loadLibrary("vtkRenderingOpenGLJava"); } On Thu, Nov 12, 2015 at 3:57 AM, HongSongyang wrote: > Hi everyone, > About VTK usage in java, we have some examples in VTK. > E.g in . \Examples\Tutorial\Step5\Java\Cone5.java > There are following code: > > > static { > System.loadLibrary("vtkCommonJava"); > System.loadLibrary("vtkFilteringJava"); > System.loadLibrary("vtkIOJava"); > System.loadLibrary("vtkImagingJava"); > System.loadLibrary("vtkGraphicsJava"); > System.loadLibrary("vtkRenderingJava"); > } > > However, there is no these libraries in vtk 6.3 > Could anyone give me some advice? > > Thanks a lot. > HongSongyang > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Thu Nov 12 09:13:54 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Thu, 12 Nov 2015 07:13:54 -0700 (MST) Subject: [vtkusers] Apply one transformation matrix to an other actor In-Reply-To: References: <1447330016380-5734919.post@n5.nabble.com> Message-ID: <1447337634120-5734928.post@n5.nabble.com> I did try that also, but it doesn't work properly at all (i.e my actor in the other application is not visible anymore even though my actor in the first one is still visible). -- View this message in context: http://vtk.1045678.n5.nabble.com/Apply-one-transformation-matrix-to-an-other-actor-tp5734919p5734928.html Sent from the VTK - Users mailing list archive at Nabble.com. From lonni.besancon at gmail.com Thu Nov 12 11:09:24 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Thu, 12 Nov 2015 09:09:24 -0700 (MST) Subject: [vtkusers] Apply one transformation matrix to an other actor In-Reply-To: <1447337634120-5734928.post@n5.nabble.com> References: <1447330016380-5734919.post@n5.nabble.com> <1447337634120-5734928.post@n5.nabble.com> Message-ID: <1447344564188-5734929.post@n5.nabble.com> My bad works like a charm in the end. It was a problem on my side. Was wondering however what the difference was between the GetUserMatrix() and GetMatrix(), which brings in fact the question of the difference between UserMatrix and Matrix. -- View this message in context: http://vtk.1045678.n5.nabble.com/Apply-one-transformation-matrix-to-an-other-actor-tp5734919p5734929.html Sent from the VTK - Users mailing list archive at Nabble.com. From joachim.pouderoux at kitware.com Thu Nov 12 11:33:21 2015 From: joachim.pouderoux at kitware.com (Joachim Pouderoux) Date: Thu, 12 Nov 2015 17:33:21 +0100 Subject: [vtkusers] announce: Advanced VTK/ParaView Training - December 15 and 16, 2015, Lyon, France Message-ID: Kitware will be holding VTK and ParaView training courses respectively on December 15 and 16 in Lyon, France. Please visit our web site for more information and registration details at: VTK: http://training.kitware.fr/browse/92 ParaView: http://training.kitware.fr/browse/95 Note that the courses will be taught in English. If you have any question, please contact us at: formations at kitware.fr Thank you, *Joachim Pouderoux* *PhD, Technical Expert* *Kitware SAS * -------------- next part -------------- An HTML attachment was scrubbed... URL: From baoyun_li123 at yahoo.com Thu Nov 12 11:42:04 2015 From: baoyun_li123 at yahoo.com (baoyun) Date: Thu, 12 Nov 2015 09:42:04 -0700 (MST) Subject: [vtkusers] change active vtkImageActor Message-ID: <1447346524257-5734933.post@n5.nabble.com> All: I had two vtkImageActors to show two slices in same render window. When I press left button and move, I can only change the window level of later added image. How can I select to change window level of which image actor? Thanks baoyun. -- View this message in context: http://vtk.1045678.n5.nabble.com/change-active-vtkImageActor-tp5734933.html Sent from the VTK - Users mailing list archive at Nabble.com. From dave.demarle at kitware.com Thu Nov 12 11:47:27 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Thu, 12 Nov 2015 11:47:27 -0500 Subject: [vtkusers] heads up - vtk 7.0 branch is coming soon Message-ID: Hey everybody. We are getting ready to start the vtk 7 release cycle. The biggest new features in my mind are the switch over to the new OpenGL2 backend and the introduction of Python3 support. So, we are going to clean up the dashboards now and branch in about three weeks. If you are a developer who is striving to complete features that you need in the next release, please let us know on the vtkdev's list. If you are a user and some specific bug is bringing you down, please also let us know on the vtkusers's list. In either case if the feature is important and reachable we can hold of a week or two before branching. See you on the other side, David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Thu Nov 12 12:12:14 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Thu, 12 Nov 2015 18:12:14 +0100 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Hello Aashish, Sorry for the late reply, I was busy last week. Thanks for the update, and your work on this topic. Yes I have seen that your change have been merged concerning the ReductionFactor. Nevertheless, I am still getting a smaller frame rate with the new backend. To highlight this, please find attached a very simple application that loads a volume ( https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip) and does volume rendering while displaying the frame rate. This is pretty much what we show to the user in our application, and in this condition, on my machine the FPS are around 25 with the opengl1 backend , and 15 with the new backend , from this week VTK master It is very simple to test, just need change the VTK_DIR to an OpenGL1 or OpenGL2 build, and place the volume.mhd and raw in the execution path. Also you will find attached a small text file that summarizes the test that have been done here. I think the real reason why it appears slower with the OGL2 version is that we try to have control on the "MaximalImageSampleDistance". If I remove the line l_gpu_mapper->SetMaximumImageSampleDistance( 2. ); I get the same frame rate with each backend. BUT, the new backend does decimate a lot more the volume, leading to a very blurred image during rendering, and that's not what we want :/ Again, thanks for paying attention to this problem, I hope this little application and test case can help you to adjust the parameters... Simon PS : I did not get a chance to check the difference on Paraview, but I believe the result will be the same as the attached example is really simple. 2015-11-03 19:44 GMT+01:00 Aashish Chaudhary : > Hi Simon, > > the branch has been merged into VTK master. I am not sure when Paraview is > going to update the VTK, but you can do it manually if needed. We are also > going to run our bench marking again to be sure since recently lot many > changes went into the VTK / volume rendering. Please feel free to ping me > again if it does not solve your issue. > > Looking forward to your feedback. > > - Aashish > > On Mon, Nov 2, 2015 at 8:02 AM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> Hi Simon, >> >> I found the reason behind the appeared performance you were getting. We >> have this code in volume rendering that when you interact changes the >> sampling distance and in the newer code we were too conservative compare to >> the last version. That's why you were getting better quality when you move >> your mouse but lower frame rates. I pushed a branch in VTK to address the >> issue. Would it be possible for you to build Paraview with VTK master? It >> may take 3-4 days or longer for Paraview's VTK to get updated. >> >> Thanks, >> Aashish >> >> On Wed, Oct 28, 2015 at 11:59 AM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> Hi Simon, >>> >>> I am just finishing up a ParaView5 related parallel volume rendering bug >>> (pushing a branch today to VTK). This is next on my list. >>> >>> - Aashish >>> >>> On Wed, Oct 28, 2015 at 11:57 AM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> Hello Aashish >>>> >>>> Did you get a chance to try to load the dataset on Windows ? >>>> Can I do anything to help you investigate ? Should I feel a bug, that >>>> may act as a reminder ? >>>> Have a nice day >>>> Simon >>>> >>>> >>>> 2015-10-27 18:26 GMT+01:00 Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com>: >>>> >>>>> Thanks Simon. This is really strange since we are not seeing it on Mac >>>>> and Linux (but both has dedicated cards). >>>>> >>>>> I will look into it soon. >>>>> >>>>> - aashish >>>>> >>>>> On Tue, Oct 27, 2015 at 1:03 PM, Simon ESNEAULT < >>>>> simon.esneault at gmail.com> wrote: >>>>> >>>>>> Ok, thank you very much fort digging into this. >>>>>> I've done some test and I believe I can see a similar slowdown >>>>>> happening on OSX, with a MacBook pro retina 13" from 2013, Intel Iris 5100 >>>>>> graphics. >>>>>> Good luck in the investigation, I you need more details, do not >>>>>> hesitate to ask >>>>>> Simon >>>>>> >>>>>> 2015-10-27 17:37 GMT+01:00 Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com>: >>>>>> >>>>>>> Ah, thanks. I will get back to you on this since on Linux I don't >>>>>>> any issue so it has to be Windows specific thing. >>>>>>> >>>>>>> - Aashish >>>>>>> >>>>>>> On Tue, Oct 27, 2015 at 10:36 AM, Simon ESNEAULT < >>>>>>> simon.esneault at gmail.com> wrote: >>>>>>> >>>>>>>> I tried with that one from yesterday and today's version >>>>>>>> (4.4.0-209-gc399648) >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Simon >>>>>>>> >>>>>>>> 2015-10-27 15:19 GMT+01:00 Aashish Chaudhary < >>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>> >>>>>>>>> Thanks. >>>>>>>>> >>>>>>>>> And when did you download this version? >>>>>>>>> ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Aashish >>>>>>>>> >>>>>>>>> On Tue, Oct 27, 2015 at 10:17 AM, Simon ESNEAULT < >>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Yes, I tried with and without the shading. Without shading >>>>>>>>>> enabled, the new Opengl2 is also slower when zoomed in (in the described >>>>>>>>>> condition). With shading enabled, the difference in speed between the two >>>>>>>>>> version seems even bigger. >>>>>>>>>> I got the version from the nightly build download section of >>>>>>>>>> paraview website (it is still available). And I've just tried with that one >>>>>>>>>> labeled "ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe" with the same >>>>>>>>>> results. >>>>>>>>>> >>>>>>>>>> About the FPS, it is difficult to give an exact number, because >>>>>>>>>> it depends of the condition (zoomed or not etc...) but yes, this is the >>>>>>>>>> idea. >>>>>>>>>> In our software, I've exposed the frame rate using this example : >>>>>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/FrameRate >>>>>>>>>> And the frame rate is around 15/20 for the first backend, and >>>>>>>>>> around 6/8 for the new backend, on the same dataset (the one provided for >>>>>>>>>> example), with the same mapper parameters >>>>>>>>>> >>>>>>>>>> Thanks >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> 2015-10-27 14:48 GMT+01:00 Aashish Chaudhary < >>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>> >>>>>>>>>>> Hi Simon, >>>>>>>>>>> >>>>>>>>>>> This is helpful but just missing few more bits: >>>>>>>>>>> >>>>>>>>>>> 1) Did you try without the shading and see how the performance >>>>>>>>>>> compares? >>>>>>>>>>> >>>>>>>>>>> 2) ParaView 4.4.0-193-gec96423 --> Where did you get this one >>>>>>>>>>> from (ParaView download page or did you built yourself?) >>>>>>>>>>> >>>>>>>>>>> Also, so on your system the old mapper is running 30FPS and the >>>>>>>>>>> new one at 15-20 FPS as per your summary. >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> - Aashish >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT < >>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>> >>>>>>>>>>>> Sorry for the late answer, I was busy this morning. >>>>>>>>>>>> Thanks for testing with the DataSet. >>>>>>>>>>>> I agree the performance is still quite good with the new >>>>>>>>>>>> backend, and I also get something like 15/20 fps on windows on an HD >>>>>>>>>>>> screen. But when compared to the old one, and in some condition (when >>>>>>>>>>>> zoomed especially), it looks really slower to me >>>>>>>>>>>> The two tested version are : >>>>>>>>>>>> - ParaView 4.4.0 64 bits final version for the old backend >>>>>>>>>>>> - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 backend. >>>>>>>>>>>> on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and Nvidia >>>>>>>>>>>> Quadro K420 >>>>>>>>>>>> >>>>>>>>>>>> To highlight the difference, here is what I do : >>>>>>>>>>>> - Launch both version on the same computer at the same time >>>>>>>>>>>> - Load the above dataset on each >>>>>>>>>>>> - Select volume rendering >>>>>>>>>>>> - Adjust the transfer function data range to [100-750] (the >>>>>>>>>>>> default "Cool to Warm" is fine) >>>>>>>>>>>> - Set the view direction to +Y >>>>>>>>>>>> - Adjust the Y of the camera position to -300 >>>>>>>>>>>> >>>>>>>>>>>> And start interacting ... >>>>>>>>>>>> Dunno if there is an easy way to print out the Frame Rate in >>>>>>>>>>>> Paraview, but the new version seems really twice slower in these >>>>>>>>>>>> conditions... We can see it does not scale in the same way, the old backend >>>>>>>>>>>> seems more aggressive on the image sample reduction, hence the >>>>>>>>>>>> interactivity is better. >>>>>>>>>>>> Shading enable or not does not change much >>>>>>>>>>>> >>>>>>>>>>>> I'm aware of the DesiredUpdateRate thing, we use to play with >>>>>>>>>>>> this with the old backend to fine tune the interactivity, although what's >>>>>>>>>>>> really inside was never clear to me >>>>>>>>>>>> >>>>>>>>>>>> I hope that there is enough information for you to reproduce >>>>>>>>>>>> this, do not hesitate to ask for some more information. >>>>>>>>>>>> >>>>>>>>>>>> Thanks a lot for your help >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>> >>>>>>>>>>>>> Dear Simon, >>>>>>>>>>>>> >>>>>>>>>>>>> Checking again. Wondering if you can provide some more detail >>>>>>>>>>>>> on the binary you are using and whether or not without shading the >>>>>>>>>>>>> rendering performance comparable to older version. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks, >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I used your dataset on paraview master as of today on my >>>>>>>>>>>>>> Linux box running Ubuntu 14.04 and NVIDA Quadro card and I am getting about >>>>>>>>>>>>>> 15-20 FPS with shading on with 1920x1080 resolution. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Are you on the proper 4.4 or using RC1/RC2? I checked the >>>>>>>>>>>>>> shading performance fix was in 4.4 but not in RC's. I don't have access to >>>>>>>>>>>>>> Windows box right away but I will try there too. >>>>>>>>>>>>>> >>>>>>>>>>>>>> NOTE: You might get multiple emails because of the attachment >>>>>>>>>>>>>> size issue. Sorry about that. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks for the quick answer >>>>>>>>>>>>>>>> We are using a vtkImageData, 512x512x591 with short element >>>>>>>>>>>>>>>> (you can find the dataset here : >>>>>>>>>>>>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). So >>>>>>>>>>>>>>>> I think it's all about GPU volume raycast mapper. >>>>>>>>>>>>>>>> The new mapper does bring low resolution, but when compared >>>>>>>>>>>>>>>> to the old one, it seems less "low resolution" during interaction than the >>>>>>>>>>>>>>>> old one >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Right, so that's why its not a exact comparison. What >>>>>>>>>>>>>>> happens is that depending on what is interactive, (you can set the desired >>>>>>>>>>>>>>> update rate in VTK, not exposed in ParaView I believe), it will do >>>>>>>>>>>>>>> interactive but with higher resolution (smaller sample distance). If they >>>>>>>>>>>>>>> both have the same sample distance, then the new mapper should out perform >>>>>>>>>>>>>>> the old one, however, there is another thing we need to consider here which >>>>>>>>>>>>>>> is shading. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Shading is enabled, gradient opacity disabled >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Can you disable the shading and see if now they both >>>>>>>>>>>>>>> (opengl1 and 2) equally better? We already pushed a fix for it but not sure >>>>>>>>>>>>>>> if that you have in your build. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Don't know if you need a minimal example, but I believe the >>>>>>>>>>>>>>>> GPURenderDemo used with this dataset is enough to highlight the slow down. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Yes, I will use this dataset. Thanks. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Also, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Do you have shading enabled? We fixed a bug with shading >>>>>>>>>>>>>>>>> that was causing the slow performance a while back. I don't remember if >>>>>>>>>>>>>>>>> that was included in 4.4 or not ( I can check ). >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> What kind of dataset you are using? Depending on the data >>>>>>>>>>>>>>>>>> type you might be using >>>>>>>>>>>>>>>>>> the GPU one or the unstructured renderer. The performance >>>>>>>>>>>>>>>>>> we measured is related to the GPU ray cast mapper >>>>>>>>>>>>>>>>>> and will apply only to the vtkImageData inputs. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Also, helpful would be is if you can tell if the new >>>>>>>>>>>>>>>>>> mapper is bringing low resolution when you interact with the volume (and >>>>>>>>>>>>>>>>>> whether or not it happens with old mapper). >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> We are trying to make the switch to the new OpenGL2 >>>>>>>>>>>>>>>>>>> backend for our application, and although the switch was easy (thanks for >>>>>>>>>>>>>>>>>>> not breaking the API ;) ), we can see a significant slowdown on the GPU >>>>>>>>>>>>>>>>>>> volume rendering part, especially during interaction. Typically we dropped >>>>>>>>>>>>>>>>>>> from 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), >>>>>>>>>>>>>>>>>>> with the same code around. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> This slow down can be seen in ParaView, if you compare >>>>>>>>>>>>>>>>>>> the latest 4.4 OpenGL2 build with the classic 4.4 build while volume >>>>>>>>>>>>>>>>>>> rendering a big enough volume (512^3) >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> The blog post here >>>>>>>>>>>>>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>>>>>>>>>>>>> claims that the new GPU volume rendering implementation >>>>>>>>>>>>>>>>>>> should be faster than the old one, is there some more detailed explanation >>>>>>>>>>>>>>>>>>> somewhere ? Are there some important parameters that can make the >>>>>>>>>>>>>>>>>>> difference ? >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> PS : The polygonal rendering seems a lot faster with the >>>>>>>>>>>>>>>>>>> new backend ! >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>> * >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>> * >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>> Inc. * >>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>> * >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> Simon Esneault >>>>>>>>>>>> Rennes, France >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>> * >>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>> * >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> Simon Esneault >>>>>>>>>> Rennes, France >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>> * >>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>> * >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> Simon Esneault >>>>>>>> Rennes, France >>>>>>>> ------------------------------------------------------------------ >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- cmake_minimum_required( VERSION 2.8.5 FATAL_ERROR ) project( VolumeRenderingBenchmark ) find_package( VTK REQUIRED ) include( ${VTK_USE_FILE} ) if( VTK_RENDERING_BACKEND STREQUAL "OpenGL2" ) message( STATUS "Using new OpenGL2 backend" ) add_definitions( -DVTK_WAS_BUILT_WITH_OPENGL2 ) else() message( STATUS "Using old OpenGL1 backend" ) endif() add_executable( VolumeRenderingBenchmark MACOSX_BUNDLE VolumeRenderingBenchmark.cxx ) target_link_libraries( VolumeRenderingBenchmark ${VTK_LIBRARIES} ) -------------- next part -------------- #include "vtkCallbackCommand.h" #include "vtkCamera.h" #include "vtkColorTransferFunction.h" #include "vtkGPUVolumeRaycastMapper.h" #include "vtkImageData.h" #include "vtkImageResample.h" #include "vtkInteractorStyle.h" #include "vtkInteractorStyleTrackballCamera.h" #include "vtkMath.h" #include "vtkMetaImageReader.h" #include "vtkPiecewiseFunction.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" #include "vtkTextActor.h" #include "vtkTextProperty.h" #include "vtkVolume.h" #include "vtkVolumeProperty.h" #include #include // Helper class for the FPS callback class vtkFPSCallback : public vtkCommand{ protected: vtkTextActor* m_fps_text_actor; std::vector m_vec_fps; std::vector m_vec_total_fps; double m_fps; public: static vtkFPSCallback *New(){ return new vtkFPSCallback; } vtkFPSCallback() : m_fps( 0. ){} void SetTextActor( vtkTextActor* a_actor ){ m_fps_text_actor = a_actor; } void Execute( vtkObject* a_caller, unsigned long vtkNotUsed( a_event ), void *a_call_data ){ vtkRenderer* l_renderer = static_cast( a_caller ); double l_time = l_renderer->GetLastRenderTimeInSeconds(); double l_fps = static_cast( 1.0 / l_time ); m_vec_fps.push_back( l_fps ); m_vec_total_fps.push_back( l_fps ); if( m_vec_fps.size() == 10 ){ // compute mean m_fps = std::accumulate( m_vec_fps.begin(), m_vec_fps.end(), 0. ) / 10.; // manual round m_fps = (double)( (int)( m_fps*100. ) ) / 100.; m_vec_fps.clear(); } std::ostringstream l_oss; #ifdef VTK_WAS_BUILT_WITH_OPENGL2 l_oss << "OpenGL2 : "; #else l_oss << "OpenGL1 : "; #endif l_oss << m_fps; l_oss << " FPS"; m_fps_text_actor->SetInput( l_oss.str().c_str() ); } double getMeanFPS(){ return std::accumulate( m_vec_total_fps.begin(), m_vec_total_fps.end(), 0. ) / m_vec_total_fps.size(); } }; int main( int argc, char *argv[] ){ // Read volume vtkMetaImageReader* l_reader = vtkMetaImageReader::New(); l_reader->SetFileName( "volume.mhd" ); l_reader->Update(); // reduce to 80 Megavoxels double l_nb_voxels = l_reader->GetOutput()->GetNumberOfPoints(); double l_target = 80000000; double l_ratio = std::pow( l_target / l_nb_voxels, 1. / 3. ); vtkImageResample* l_resample = vtkImageResample::New(); l_resample->SetInputConnection( l_reader->GetOutputPort() ); l_resample->SetInterpolationModeToLinear(); for( int i = 0; i < 3; i++ ) l_resample->SetAxisMagnificationFactor( i, l_ratio ); // Setup rendering stuff vtkRenderer* l_renderer = vtkRenderer::New(); l_renderer->SetBackground( 0.3, 0.3, 0.3 ); vtkRenderWindow* l_render_windows = vtkRenderWindow::New(); l_render_windows->AddRenderer( l_renderer ); l_render_windows->SetSize( 900, 900 ); vtkInteractorStyleTrackballCamera* l_trackball = vtkInteractorStyleTrackballCamera::New(); vtkRenderWindowInteractor* l_iren = vtkRenderWindowInteractor::New(); l_iren->SetInteractorStyle( l_trackball ); l_iren->SetRenderWindow( l_render_windows ); l_iren->GetInteractorStyle()->SetDefaultRenderer( l_renderer ); l_iren->SetDesiredUpdateRate( 25 ); // Make sure we have an opengl context l_render_windows->Render(); // Setup GPU volume raycast mapper vtkGPUVolumeRayCastMapper* l_gpu_mapper = vtkGPUVolumeRayCastMapper::New(); l_gpu_mapper->SetMaxMemoryInBytes( std::pow( 1024, 3 ) ); l_gpu_mapper->SetMaximumImageSampleDistance( 2. ); l_gpu_mapper->SetInputConnection( l_resample->GetOutputPort() ); // Setup Volume property // Window/Level double wl = 260; double ww = 270; // Color function vtkColorTransferFunction* l_color = vtkColorTransferFunction::New(); l_color->SetColorSpaceToRGB(); l_color->AddRGBPoint( wl - ww / 2, 0, 0, 0 ); l_color->AddRGBPoint( wl - ww / 2 + 94 * ( ww / 255.0 ), 1., 21. / 255.0, 27. / 255.0 ); l_color->AddRGBPoint( wl - ww / 2 + 147 * ( ww / 255.0 ), 1., 176. / 255.0, 9. / 255.0 ); l_color->AddRGBPoint( wl - ww / 2 + 201 * ( ww / 255.0 ), 1., 241. / 255.0, 39. / 255.0 ); l_color->AddRGBPoint( wl - ww / 2 + 255 * ( ww / 255.0 ), 1, 1, 1. ); l_color->Build(); // Opacity function vtkPiecewiseFunction* l_opacity = vtkPiecewiseFunction::New(); l_opacity->AddPoint( wl - ww / 2, 0 ); l_opacity->AddPoint( wl + ww / 2, 1 ); // Volume property, light, shading vtkVolumeProperty* l_volume_property = vtkVolumeProperty::New(); l_volume_property->SetColor( l_color ); l_volume_property->SetScalarOpacity( l_opacity ); l_volume_property->SetInterpolationTypeToLinear(); l_volume_property->ShadeOn(); l_volume_property->SetAmbient( 0.15 ); l_volume_property->SetDiffuse( 0.8 ); l_volume_property->SetSpecular( 0.25 ); l_volume_property->SetSpecularPower( 40 ); // Put everything together vtkVolume* l_volume = vtkVolume::New(); l_volume->SetProperty( l_volume_property ); l_volume->SetMapper( l_gpu_mapper ); // setup text actor : vtkTextActor* l_text_actor = vtkTextActor::New(); l_text_actor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); l_text_actor->GetPositionCoordinate()->SetValue( 0.01, 0.99 ); l_text_actor->GetTextProperty()->SetJustificationToLeft(); l_text_actor->GetTextProperty()->SetVerticalJustificationToTop(); l_text_actor->GetTextProperty()->SetFontSize( 17 ); #ifdef VTK_WAS_BUILT_WITH_OPENGL2 l_text_actor->SetInput( "OpenGL2 : 0 FPS" ); #else l_text_actor->SetInput( "OpenGL1 : 0 FPS" ); #endif l_renderer->AddActor( l_text_actor ); // setup fps callback vtkFPSCallback* l_callback = vtkFPSCallback::New(); l_callback->SetTextActor( l_text_actor ); l_renderer->AddObserver( vtkCommand::EndEvent, l_callback ); l_renderer->AddVolume( l_volume ); // Adjust camera position l_renderer->GetActiveCamera()->SetParallelProjection( false ); l_renderer->GetActiveCamera()->SetViewUp( 0, 0, 1 ); double l_distance = 1000; double l_center[ 3 ], l_pos[3]; l_reader->GetOutput()->GetCenter( l_center ); l_reader->GetOutput()->GetCenter( l_pos ); l_pos[ 1 ] -= l_distance; double l_cam_angle = atan( ( l_center[ 2 ] * 2. ) / ( l_distance * 2. ) ) * 360.0 / vtkMath::Pi(); l_renderer->GetActiveCamera()->SetFocalPoint( l_center ); l_renderer->GetActiveCamera()->SetPosition( l_pos ); l_renderer->GetActiveCamera()->SetViewAngle( l_cam_angle + 1 ); l_renderer->GetActiveCamera()->SetClippingRange( 0.01, 10000 ); // Go rendering ! l_iren->Start(); std::cout << l_callback->getMeanFPS() << std::endl; // Memory cleanup l_reader->Delete(); l_resample->Delete(); l_renderer->Delete(); l_render_windows->Delete(); l_trackball->Delete(); l_iren->Delete(); l_gpu_mapper->Delete(); l_color->Delete(); l_opacity->Delete(); l_volume_property->Delete(); l_volume->Delete(); l_text_actor->Delete(); l_callback->Delete(); } -------------- next part -------------- Benchmark results with MaximumImageSample set to 2.0 Windows 7 | Xeon E3-1220 | 16GB RAM | Nvidia Quadro K420 - OGL1: 25.29 FPS - OGL2: 12.36 FPS Windows 7 | Xeon X5690 | 48GB RAM | NVidia Quadro K620 - OGL1: 26.46 FPS - OGL2: 29.50 FPS From aashish.chaudhary at kitware.com Thu Nov 12 12:31:05 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 12 Nov 2015 12:31:05 -0500 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: On Thu, Nov 12, 2015 at 12:12 PM, Simon ESNEAULT wrote: > Hello Aashish, > > Sorry for the late reply, I was busy last week. > > Thanks for the update, and your work on this topic. > Yes I have seen that your change have been merged concerning the > ReductionFactor. Nevertheless, I am still getting a smaller frame rate with > the new backend. To highlight this, please find attached a very simple > application that loads a volume ( > https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip) and does volume > rendering while displaying the frame rate. This is pretty much what we show > to the user in our application, and in this condition, on my machine the > FPS are around 25 with the opengl1 backend > , and 15 with the new > backend , from this > week VTK master > It is very simple to test, just need change the VTK_DIR to an OpenGL1 or > OpenGL2 build, and place the volume.mhd and raw in the execution path. > Also you will find attached a small text file that summarizes the test > that have been done here. > No problem, thanks for the update. Please see my comments below: > > I think the real reason why it appears slower with the OGL2 version is > that we try to have control on the "MaximalImageSampleDistance". If I > remove the line l_gpu_mapper->SetMaximumImageSampleDistance( 2. ); I get > the same frame rate with each backend. BUT, the new backend does decimate a > lot more the volume, leading to a very blurred image during rendering, and > that's not what we want :/ > Aha, this is very useful since this parameters does affecting the reduction factor. I will try your code; one quick question when the new backend decimates a lot (by removing the SetMaximumImageSampleDistance), does it get any faster than the old version? I am going to try it on my Mac and Linux laptop and report back (mostly tomorrow since I am away today). > > Again, thanks for paying attention to this problem, I hope this little > application and test case can help you to adjust the parameters... > Thanks for your help. I am glad you are testing my latest changes. - Best, Aashish > > > Simon > > PS : I did not get a chance to check the difference on Paraview, but I > believe the result will be the same as the attached example is really > simple. > > 2015-11-03 19:44 GMT+01:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Hi Simon, >> >> the branch has been merged into VTK master. I am not sure when Paraview >> is going to update the VTK, but you can do it manually if needed. We are >> also going to run our bench marking again to be sure since recently lot >> many changes went into the VTK / volume rendering. Please feel free to ping >> me again if it does not solve your issue. >> >> Looking forward to your feedback. >> >> - Aashish >> >> On Mon, Nov 2, 2015 at 8:02 AM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> Hi Simon, >>> >>> I found the reason behind the appeared performance you were getting. We >>> have this code in volume rendering that when you interact changes the >>> sampling distance and in the newer code we were too conservative compare to >>> the last version. That's why you were getting better quality when you move >>> your mouse but lower frame rates. I pushed a branch in VTK to address the >>> issue. Would it be possible for you to build Paraview with VTK master? It >>> may take 3-4 days or longer for Paraview's VTK to get updated. >>> >>> Thanks, >>> Aashish >>> >>> On Wed, Oct 28, 2015 at 11:59 AM, Aashish Chaudhary < >>> aashish.chaudhary at kitware.com> wrote: >>> >>>> Hi Simon, >>>> >>>> I am just finishing up a ParaView5 related parallel volume rendering >>>> bug (pushing a branch today to VTK). This is next on my list. >>>> >>>> - Aashish >>>> >>>> On Wed, Oct 28, 2015 at 11:57 AM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> Hello Aashish >>>>> >>>>> Did you get a chance to try to load the dataset on Windows ? >>>>> Can I do anything to help you investigate ? Should I feel a bug, that >>>>> may act as a reminder ? >>>>> Have a nice day >>>>> Simon >>>>> >>>>> >>>>> 2015-10-27 18:26 GMT+01:00 Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com>: >>>>> >>>>>> Thanks Simon. This is really strange since we are not seeing it on >>>>>> Mac and Linux (but both has dedicated cards). >>>>>> >>>>>> I will look into it soon. >>>>>> >>>>>> - aashish >>>>>> >>>>>> On Tue, Oct 27, 2015 at 1:03 PM, Simon ESNEAULT < >>>>>> simon.esneault at gmail.com> wrote: >>>>>> >>>>>>> Ok, thank you very much fort digging into this. >>>>>>> I've done some test and I believe I can see a similar slowdown >>>>>>> happening on OSX, with a MacBook pro retina 13" from 2013, Intel Iris 5100 >>>>>>> graphics. >>>>>>> Good luck in the investigation, I you need more details, do not >>>>>>> hesitate to ask >>>>>>> Simon >>>>>>> >>>>>>> 2015-10-27 17:37 GMT+01:00 Aashish Chaudhary < >>>>>>> aashish.chaudhary at kitware.com>: >>>>>>> >>>>>>>> Ah, thanks. I will get back to you on this since on Linux I don't >>>>>>>> any issue so it has to be Windows specific thing. >>>>>>>> >>>>>>>> - Aashish >>>>>>>> >>>>>>>> On Tue, Oct 27, 2015 at 10:36 AM, Simon ESNEAULT < >>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>> >>>>>>>>> I tried with that one from yesterday and today's version >>>>>>>>> (4.4.0-209-gc399648) >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Simon >>>>>>>>> >>>>>>>>> 2015-10-27 15:19 GMT+01:00 Aashish Chaudhary < >>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>> >>>>>>>>>> Thanks. >>>>>>>>>> >>>>>>>>>> And when did you download this version? >>>>>>>>>> ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> Aashish >>>>>>>>>> >>>>>>>>>> On Tue, Oct 27, 2015 at 10:17 AM, Simon ESNEAULT < >>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Yes, I tried with and without the shading. Without shading >>>>>>>>>>> enabled, the new Opengl2 is also slower when zoomed in (in the described >>>>>>>>>>> condition). With shading enabled, the difference in speed between the two >>>>>>>>>>> version seems even bigger. >>>>>>>>>>> I got the version from the nightly build download section of >>>>>>>>>>> paraview website (it is still available). And I've just tried with that one >>>>>>>>>>> labeled "ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe" with the same >>>>>>>>>>> results. >>>>>>>>>>> >>>>>>>>>>> About the FPS, it is difficult to give an exact number, because >>>>>>>>>>> it depends of the condition (zoomed or not etc...) but yes, this is the >>>>>>>>>>> idea. >>>>>>>>>>> In our software, I've exposed the frame rate using this example >>>>>>>>>>> : http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/FrameRate >>>>>>>>>>> And the frame rate is around 15/20 for the first backend, and >>>>>>>>>>> around 6/8 for the new backend, on the same dataset (the one provided for >>>>>>>>>>> example), with the same mapper parameters >>>>>>>>>>> >>>>>>>>>>> Thanks >>>>>>>>>>> Simon >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> 2015-10-27 14:48 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>> >>>>>>>>>>>> Hi Simon, >>>>>>>>>>>> >>>>>>>>>>>> This is helpful but just missing few more bits: >>>>>>>>>>>> >>>>>>>>>>>> 1) Did you try without the shading and see how the performance >>>>>>>>>>>> compares? >>>>>>>>>>>> >>>>>>>>>>>> 2) ParaView 4.4.0-193-gec96423 --> Where did you get this one >>>>>>>>>>>> from (ParaView download page or did you built yourself?) >>>>>>>>>>>> >>>>>>>>>>>> Also, so on your system the old mapper is running 30FPS and the >>>>>>>>>>>> new one at 15-20 FPS as per your summary. >>>>>>>>>>>> >>>>>>>>>>>> Thanks, >>>>>>>>>>>> - Aashish >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT < >>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>> >>>>>>>>>>>>> Sorry for the late answer, I was busy this morning. >>>>>>>>>>>>> Thanks for testing with the DataSet. >>>>>>>>>>>>> I agree the performance is still quite good with the new >>>>>>>>>>>>> backend, and I also get something like 15/20 fps on windows on an HD >>>>>>>>>>>>> screen. But when compared to the old one, and in some condition (when >>>>>>>>>>>>> zoomed especially), it looks really slower to me >>>>>>>>>>>>> The two tested version are : >>>>>>>>>>>>> - ParaView 4.4.0 64 bits final version for the old backend >>>>>>>>>>>>> - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 backend. >>>>>>>>>>>>> on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and Nvidia >>>>>>>>>>>>> Quadro K420 >>>>>>>>>>>>> >>>>>>>>>>>>> To highlight the difference, here is what I do : >>>>>>>>>>>>> - Launch both version on the same computer at the same time >>>>>>>>>>>>> - Load the above dataset on each >>>>>>>>>>>>> - Select volume rendering >>>>>>>>>>>>> - Adjust the transfer function data range to [100-750] (the >>>>>>>>>>>>> default "Cool to Warm" is fine) >>>>>>>>>>>>> - Set the view direction to +Y >>>>>>>>>>>>> - Adjust the Y of the camera position to -300 >>>>>>>>>>>>> >>>>>>>>>>>>> And start interacting ... >>>>>>>>>>>>> Dunno if there is an easy way to print out the Frame Rate in >>>>>>>>>>>>> Paraview, but the new version seems really twice slower in these >>>>>>>>>>>>> conditions... We can see it does not scale in the same way, the old backend >>>>>>>>>>>>> seems more aggressive on the image sample reduction, hence the >>>>>>>>>>>>> interactivity is better. >>>>>>>>>>>>> Shading enable or not does not change much >>>>>>>>>>>>> >>>>>>>>>>>>> I'm aware of the DesiredUpdateRate thing, we use to play with >>>>>>>>>>>>> this with the old backend to fine tune the interactivity, although what's >>>>>>>>>>>>> really inside was never clear to me >>>>>>>>>>>>> >>>>>>>>>>>>> I hope that there is enough information for you to reproduce >>>>>>>>>>>>> this, do not hesitate to ask for some more information. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks a lot for your help >>>>>>>>>>>>> Simon >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>> >>>>>>>>>>>>>> Dear Simon, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Checking again. Wondering if you can provide some more detail >>>>>>>>>>>>>> on the binary you are using and whether or not without shading the >>>>>>>>>>>>>> rendering performance comparable to older version. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I used your dataset on paraview master as of today on my >>>>>>>>>>>>>>> Linux box running Ubuntu 14.04 and NVIDA Quadro card and I am getting about >>>>>>>>>>>>>>> 15-20 FPS with shading on with 1920x1080 resolution. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Are you on the proper 4.4 or using RC1/RC2? I checked the >>>>>>>>>>>>>>> shading performance fix was in 4.4 but not in RC's. I don't have access to >>>>>>>>>>>>>>> Windows box right away but I will try there too. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> NOTE: You might get multiple emails because of the >>>>>>>>>>>>>>> attachment size issue. Sorry about that. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Thanks for the quick answer >>>>>>>>>>>>>>>>> We are using a vtkImageData, 512x512x591 with short >>>>>>>>>>>>>>>>> element (you can find the dataset here : >>>>>>>>>>>>>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). So >>>>>>>>>>>>>>>>> I think it's all about GPU volume raycast mapper. >>>>>>>>>>>>>>>>> The new mapper does bring low resolution, but when >>>>>>>>>>>>>>>>> compared to the old one, it seems less "low resolution" during interaction >>>>>>>>>>>>>>>>> than the old one >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Right, so that's why its not a exact comparison. What >>>>>>>>>>>>>>>> happens is that depending on what is interactive, (you can set the desired >>>>>>>>>>>>>>>> update rate in VTK, not exposed in ParaView I believe), it will do >>>>>>>>>>>>>>>> interactive but with higher resolution (smaller sample distance). If they >>>>>>>>>>>>>>>> both have the same sample distance, then the new mapper should out perform >>>>>>>>>>>>>>>> the old one, however, there is another thing we need to consider here which >>>>>>>>>>>>>>>> is shading. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Shading is enabled, gradient opacity disabled >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Can you disable the shading and see if now they both >>>>>>>>>>>>>>>> (opengl1 and 2) equally better? We already pushed a fix for it but not sure >>>>>>>>>>>>>>>> if that you have in your build. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Don't know if you need a minimal example, but I believe >>>>>>>>>>>>>>>>> the GPURenderDemo used with this dataset is enough to highlight the slow >>>>>>>>>>>>>>>>> down. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Yes, I will use this dataset. Thanks. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Also, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Do you have shading enabled? We fixed a bug with shading >>>>>>>>>>>>>>>>>> that was causing the slow performance a while back. I don't remember if >>>>>>>>>>>>>>>>>> that was included in 4.4 or not ( I can check ). >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> What kind of dataset you are using? Depending on the >>>>>>>>>>>>>>>>>>> data type you might be using >>>>>>>>>>>>>>>>>>> the GPU one or the unstructured renderer. The >>>>>>>>>>>>>>>>>>> performance we measured is related to the GPU ray cast mapper >>>>>>>>>>>>>>>>>>> and will apply only to the vtkImageData inputs. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Also, helpful would be is if you can tell if the new >>>>>>>>>>>>>>>>>>> mapper is bringing low resolution when you interact with the volume (and >>>>>>>>>>>>>>>>>>> whether or not it happens with old mapper). >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> We are trying to make the switch to the new OpenGL2 >>>>>>>>>>>>>>>>>>>> backend for our application, and although the switch was easy (thanks for >>>>>>>>>>>>>>>>>>>> not breaking the API ;) ), we can see a significant slowdown on the GPU >>>>>>>>>>>>>>>>>>>> volume rendering part, especially during interaction. Typically we dropped >>>>>>>>>>>>>>>>>>>> from 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), >>>>>>>>>>>>>>>>>>>> with the same code around. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> This slow down can be seen in ParaView, if you compare >>>>>>>>>>>>>>>>>>>> the latest 4.4 OpenGL2 build with the classic 4.4 build while volume >>>>>>>>>>>>>>>>>>>> rendering a big enough volume (512^3) >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> The blog post here >>>>>>>>>>>>>>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>>>>>>>>>>>>>> claims that the new GPU volume rendering implementation >>>>>>>>>>>>>>>>>>>> should be faster than the old one, is there some more detailed explanation >>>>>>>>>>>>>>>>>>>> somewhere ? Are there some important parameters that can make the >>>>>>>>>>>>>>>>>>>> difference ? >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> PS : The polygonal rendering seems a lot faster with >>>>>>>>>>>>>>>>>>>> the new backend ! >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>> * >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>> * >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>>> * >>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>> * >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>> Simon Esneault >>>>>>>>>>> Rennes, France >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>> * >>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>> * >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> Simon Esneault >>>>>>>>> Rennes, France >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>> * >>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>> * >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> ------------------------------------------------------------------ >>>>>>> Simon Esneault >>>>>>> Rennes, France >>>>>>> ------------------------------------------------------------------ >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Thu Nov 12 12:34:29 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 12 Nov 2015 12:34:29 -0500 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: On Thu, Nov 12, 2015 at 12:31 PM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > > > On Thu, Nov 12, 2015 at 12:12 PM, Simon ESNEAULT > wrote: > >> Hello Aashish, >> >> Sorry for the late reply, I was busy last week. >> >> Thanks for the update, and your work on this topic. >> Yes I have seen that your change have been merged concerning the >> ReductionFactor. Nevertheless, I am still getting a smaller frame rate with >> the new backend. To highlight this, please find attached a very simple >> application that loads a volume ( >> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip) and does volume >> rendering while displaying the frame rate. This is pretty much what we show >> to the user in our application, and in this condition, on my machine the >> FPS are around 25 with the opengl1 backend >> , and 15 with the >> new backend , from >> this week VTK master >> It is very simple to test, just need change the VTK_DIR to an OpenGL1 or >> OpenGL2 build, and place the volume.mhd and raw in the execution path. >> Also you will find attached a small text file that summarizes the test >> that have been done here. >> > > No problem, thanks for the update. Please see my comments below: > >> >> I think the real reason why it appears slower with the OGL2 version is >> that we try to have control on the "MaximalImageSampleDistance". If I >> remove the line l_gpu_mapper->SetMaximumImageSampleDistance( 2. ); I get >> the same frame rate with each backend. BUT, the new backend does decimate a >> lot more the volume, leading to a very blurred image during rendering, and >> that's not what we want :/ >> > > Aha, this is very useful since this parameters does affecting the > reduction factor. I will try your code; one quick question when the new > backend decimates a lot (by removing the SetMaximumImageSampleDistance), > does it get any faster than the old version? I am going to try it on my Mac > and Linux laptop and report back (mostly tomorrow since I am away today). > >> >> Never mind, I see that you have that in your result file. It seems it does get faster but more blurry. Would it be possible for you to do one more test? Can you set a fix sample distance (pick any) for new and the old mapper and set AutoAdjustSampleDistance to OFF and capture some performance numbers? In that way we know exactly if something more fundamental is causing the slowness. The whole reduction factor math is based on approximate stuff so that will vary between two mappers. - Aashish > Again, thanks for paying attention to this problem, I hope this little >> application and test case can help you to adjust the parameters... >> > > Thanks for your help. I am glad you are testing my latest changes. > > - Best, Aashish > >> >> >> Simon >> >> PS : I did not get a chance to check the difference on Paraview, but I >> believe the result will be the same as the attached example is really >> simple. >> >> 2015-11-03 19:44 GMT+01:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> >>> Hi Simon, >>> >>> the branch has been merged into VTK master. I am not sure when Paraview >>> is going to update the VTK, but you can do it manually if needed. We are >>> also going to run our bench marking again to be sure since recently lot >>> many changes went into the VTK / volume rendering. Please feel free to ping >>> me again if it does not solve your issue. >>> >>> Looking forward to your feedback. >>> >>> - Aashish >>> >>> On Mon, Nov 2, 2015 at 8:02 AM, Aashish Chaudhary < >>> aashish.chaudhary at kitware.com> wrote: >>> >>>> Hi Simon, >>>> >>>> I found the reason behind the appeared performance you were getting. We >>>> have this code in volume rendering that when you interact changes the >>>> sampling distance and in the newer code we were too conservative compare to >>>> the last version. That's why you were getting better quality when you move >>>> your mouse but lower frame rates. I pushed a branch in VTK to address the >>>> issue. Would it be possible for you to build Paraview with VTK master? It >>>> may take 3-4 days or longer for Paraview's VTK to get updated. >>>> >>>> Thanks, >>>> Aashish >>>> >>>> On Wed, Oct 28, 2015 at 11:59 AM, Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com> wrote: >>>> >>>>> Hi Simon, >>>>> >>>>> I am just finishing up a ParaView5 related parallel volume rendering >>>>> bug (pushing a branch today to VTK). This is next on my list. >>>>> >>>>> - Aashish >>>>> >>>>> On Wed, Oct 28, 2015 at 11:57 AM, Simon ESNEAULT < >>>>> simon.esneault at gmail.com> wrote: >>>>> >>>>>> Hello Aashish >>>>>> >>>>>> Did you get a chance to try to load the dataset on Windows ? >>>>>> Can I do anything to help you investigate ? Should I feel a bug, that >>>>>> may act as a reminder ? >>>>>> Have a nice day >>>>>> Simon >>>>>> >>>>>> >>>>>> 2015-10-27 18:26 GMT+01:00 Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com>: >>>>>> >>>>>>> Thanks Simon. This is really strange since we are not seeing it on >>>>>>> Mac and Linux (but both has dedicated cards). >>>>>>> >>>>>>> I will look into it soon. >>>>>>> >>>>>>> - aashish >>>>>>> >>>>>>> On Tue, Oct 27, 2015 at 1:03 PM, Simon ESNEAULT < >>>>>>> simon.esneault at gmail.com> wrote: >>>>>>> >>>>>>>> Ok, thank you very much fort digging into this. >>>>>>>> I've done some test and I believe I can see a similar slowdown >>>>>>>> happening on OSX, with a MacBook pro retina 13" from 2013, Intel Iris 5100 >>>>>>>> graphics. >>>>>>>> Good luck in the investigation, I you need more details, do not >>>>>>>> hesitate to ask >>>>>>>> Simon >>>>>>>> >>>>>>>> 2015-10-27 17:37 GMT+01:00 Aashish Chaudhary < >>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>> >>>>>>>>> Ah, thanks. I will get back to you on this since on Linux I don't >>>>>>>>> any issue so it has to be Windows specific thing. >>>>>>>>> >>>>>>>>> - Aashish >>>>>>>>> >>>>>>>>> On Tue, Oct 27, 2015 at 10:36 AM, Simon ESNEAULT < >>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> I tried with that one from yesterday and today's version >>>>>>>>>> (4.4.0-209-gc399648) >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> 2015-10-27 15:19 GMT+01:00 Aashish Chaudhary < >>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>> >>>>>>>>>>> Thanks. >>>>>>>>>>> >>>>>>>>>>> And when did you download this version? >>>>>>>>>>> ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> Aashish >>>>>>>>>>> >>>>>>>>>>> On Tue, Oct 27, 2015 at 10:17 AM, Simon ESNEAULT < >>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Yes, I tried with and without the shading. Without shading >>>>>>>>>>>> enabled, the new Opengl2 is also slower when zoomed in (in the described >>>>>>>>>>>> condition). With shading enabled, the difference in speed between the two >>>>>>>>>>>> version seems even bigger. >>>>>>>>>>>> I got the version from the nightly build download section of >>>>>>>>>>>> paraview website (it is still available). And I've just tried with that one >>>>>>>>>>>> labeled "ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe" with the same >>>>>>>>>>>> results. >>>>>>>>>>>> >>>>>>>>>>>> About the FPS, it is difficult to give an exact number, because >>>>>>>>>>>> it depends of the condition (zoomed or not etc...) but yes, this is the >>>>>>>>>>>> idea. >>>>>>>>>>>> In our software, I've exposed the frame rate using this example >>>>>>>>>>>> : http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/FrameRate >>>>>>>>>>>> And the frame rate is around 15/20 for the first backend, and >>>>>>>>>>>> around 6/8 for the new backend, on the same dataset (the one provided for >>>>>>>>>>>> example), with the same mapper parameters >>>>>>>>>>>> >>>>>>>>>>>> Thanks >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> 2015-10-27 14:48 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>> >>>>>>>>>>>>> Hi Simon, >>>>>>>>>>>>> >>>>>>>>>>>>> This is helpful but just missing few more bits: >>>>>>>>>>>>> >>>>>>>>>>>>> 1) Did you try without the shading and see how the performance >>>>>>>>>>>>> compares? >>>>>>>>>>>>> >>>>>>>>>>>>> 2) ParaView 4.4.0-193-gec96423 --> Where did you get this one >>>>>>>>>>>>> from (ParaView download page or did you built yourself?) >>>>>>>>>>>>> >>>>>>>>>>>>> Also, so on your system the old mapper is running 30FPS and >>>>>>>>>>>>> the new one at 15-20 FPS as per your summary. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks, >>>>>>>>>>>>> - Aashish >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT < >>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Sorry for the late answer, I was busy this morning. >>>>>>>>>>>>>> Thanks for testing with the DataSet. >>>>>>>>>>>>>> I agree the performance is still quite good with the new >>>>>>>>>>>>>> backend, and I also get something like 15/20 fps on windows on an HD >>>>>>>>>>>>>> screen. But when compared to the old one, and in some condition (when >>>>>>>>>>>>>> zoomed especially), it looks really slower to me >>>>>>>>>>>>>> The two tested version are : >>>>>>>>>>>>>> - ParaView 4.4.0 64 bits final version for the old backend >>>>>>>>>>>>>> - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 >>>>>>>>>>>>>> backend. >>>>>>>>>>>>>> on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and Nvidia >>>>>>>>>>>>>> Quadro K420 >>>>>>>>>>>>>> >>>>>>>>>>>>>> To highlight the difference, here is what I do : >>>>>>>>>>>>>> - Launch both version on the same computer at the same time >>>>>>>>>>>>>> - Load the above dataset on each >>>>>>>>>>>>>> - Select volume rendering >>>>>>>>>>>>>> - Adjust the transfer function data range to [100-750] (the >>>>>>>>>>>>>> default "Cool to Warm" is fine) >>>>>>>>>>>>>> - Set the view direction to +Y >>>>>>>>>>>>>> - Adjust the Y of the camera position to -300 >>>>>>>>>>>>>> >>>>>>>>>>>>>> And start interacting ... >>>>>>>>>>>>>> Dunno if there is an easy way to print out the Frame Rate in >>>>>>>>>>>>>> Paraview, but the new version seems really twice slower in these >>>>>>>>>>>>>> conditions... We can see it does not scale in the same way, the old backend >>>>>>>>>>>>>> seems more aggressive on the image sample reduction, hence the >>>>>>>>>>>>>> interactivity is better. >>>>>>>>>>>>>> Shading enable or not does not change much >>>>>>>>>>>>>> >>>>>>>>>>>>>> I'm aware of the DesiredUpdateRate thing, we use to play with >>>>>>>>>>>>>> this with the old backend to fine tune the interactivity, although what's >>>>>>>>>>>>>> really inside was never clear to me >>>>>>>>>>>>>> >>>>>>>>>>>>>> I hope that there is enough information for you to reproduce >>>>>>>>>>>>>> this, do not hesitate to ask for some more information. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks a lot for your help >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Dear Simon, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Checking again. Wondering if you can provide some more >>>>>>>>>>>>>>> detail on the binary you are using and whether or not without shading the >>>>>>>>>>>>>>> rendering performance comparable to older version. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I used your dataset on paraview master as of today on my >>>>>>>>>>>>>>>> Linux box running Ubuntu 14.04 and NVIDA Quadro card and I am getting about >>>>>>>>>>>>>>>> 15-20 FPS with shading on with 1920x1080 resolution. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Are you on the proper 4.4 or using RC1/RC2? I checked the >>>>>>>>>>>>>>>> shading performance fix was in 4.4 but not in RC's. I don't have access to >>>>>>>>>>>>>>>> Windows box right away but I will try there too. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> NOTE: You might get multiple emails because of the >>>>>>>>>>>>>>>> attachment size issue. Sorry about that. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanks for the quick answer >>>>>>>>>>>>>>>>>> We are using a vtkImageData, 512x512x591 with short >>>>>>>>>>>>>>>>>> element (you can find the dataset here : >>>>>>>>>>>>>>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). >>>>>>>>>>>>>>>>>> So I think it's all about GPU volume raycast mapper. >>>>>>>>>>>>>>>>>> The new mapper does bring low resolution, but when >>>>>>>>>>>>>>>>>> compared to the old one, it seems less "low resolution" during interaction >>>>>>>>>>>>>>>>>> than the old one >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Right, so that's why its not a exact comparison. What >>>>>>>>>>>>>>>>> happens is that depending on what is interactive, (you can set the desired >>>>>>>>>>>>>>>>> update rate in VTK, not exposed in ParaView I believe), it will do >>>>>>>>>>>>>>>>> interactive but with higher resolution (smaller sample distance). If they >>>>>>>>>>>>>>>>> both have the same sample distance, then the new mapper should out perform >>>>>>>>>>>>>>>>> the old one, however, there is another thing we need to consider here which >>>>>>>>>>>>>>>>> is shading. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Shading is enabled, gradient opacity disabled >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Can you disable the shading and see if now they both >>>>>>>>>>>>>>>>> (opengl1 and 2) equally better? We already pushed a fix for it but not sure >>>>>>>>>>>>>>>>> if that you have in your build. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Don't know if you need a minimal example, but I believe >>>>>>>>>>>>>>>>>> the GPURenderDemo used with this dataset is enough to highlight the slow >>>>>>>>>>>>>>>>>> down. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Yes, I will use this dataset. Thanks. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Also, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Do you have shading enabled? We fixed a bug with shading >>>>>>>>>>>>>>>>>>> that was causing the slow performance a while back. I don't remember if >>>>>>>>>>>>>>>>>>> that was included in 4.4 or not ( I can check ). >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> What kind of dataset you are using? Depending on the >>>>>>>>>>>>>>>>>>>> data type you might be using >>>>>>>>>>>>>>>>>>>> the GPU one or the unstructured renderer. The >>>>>>>>>>>>>>>>>>>> performance we measured is related to the GPU ray cast mapper >>>>>>>>>>>>>>>>>>>> and will apply only to the vtkImageData inputs. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Also, helpful would be is if you can tell if the new >>>>>>>>>>>>>>>>>>>> mapper is bringing low resolution when you interact with the volume (and >>>>>>>>>>>>>>>>>>>> whether or not it happens with old mapper). >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> We are trying to make the switch to the new OpenGL2 >>>>>>>>>>>>>>>>>>>>> backend for our application, and although the switch was easy (thanks for >>>>>>>>>>>>>>>>>>>>> not breaking the API ;) ), we can see a significant slowdown on the GPU >>>>>>>>>>>>>>>>>>>>> volume rendering part, especially during interaction. Typically we dropped >>>>>>>>>>>>>>>>>>>>> from 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), >>>>>>>>>>>>>>>>>>>>> with the same code around. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> This slow down can be seen in ParaView, if you compare >>>>>>>>>>>>>>>>>>>>> the latest 4.4 OpenGL2 build with the classic 4.4 build while volume >>>>>>>>>>>>>>>>>>>>> rendering a big enough volume (512^3) >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> The blog post here >>>>>>>>>>>>>>>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>>>>>>>>>>>>>>> claims that the new GPU volume rendering >>>>>>>>>>>>>>>>>>>>> implementation should be faster than the old one, is there some more >>>>>>>>>>>>>>>>>>>>> detailed explanation somewhere ? Are there some important parameters that >>>>>>>>>>>>>>>>>>>>> can make the difference ? >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> PS : The polygonal rendering seems a lot faster with >>>>>>>>>>>>>>>>>>>>> the new backend ! >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>> * >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>> Inc. * >>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>> * >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> Simon Esneault >>>>>>>>>>>> Rennes, France >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>> * >>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>> * >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> Simon Esneault >>>>>>>>>> Rennes, France >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>> * >>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>> * >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> Simon Esneault >>>>>>>> Rennes, France >>>>>>>> ------------------------------------------------------------------ >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From gael.lorieul at uclouvain.be Thu Nov 12 13:24:37 2015 From: gael.lorieul at uclouvain.be (lorieul) Date: Thu, 12 Nov 2015 19:24:37 +0100 Subject: [vtkusers] Saving custom array class instance to *.vti file with time information Message-ID: <1447352677.2990.28.camel@tachikoma-mint> Hello, I wanted to know the cleanest way to save a custom array class instance to a *.vti file with time information. I searched through the documentation and found some threads in the mailing list archives but could not find compelling answers (quite to my surprise? I'm sure the information must be there somewhere?). I am designing a C++ software that performs CFD (Computational Fluid Dynamics) simulations. I start from known initial conditions and iterate in time. After each iteration, I know the definition of each of the flow variables (e.g. I know the velocity field at each time step). I want to save this information into a *.vti file so that I can visualise it with paraview and (for instance) animate it. My code uses its own array class which I'll call DblArr. Hence when I want to save a field to a file, I need to use a vtkImageData object and copy all the data from the DblArr object into it. This means that for each DblArr array I want to save, I need a corresponding vtkImageData object (hence additional memory and computation costs). Is that the best way to do so ? Besides, how do I store the time information ? Should I call : myImgData->GetInformation()->Set( vtkDataObject::DATA_TIME_STEPS(), & currentTime, 1); Or is there a better way to do so ? (I found very little reference to DATA_TIME_STEPS() in the documentation) Gael Lorieul PhD student at Universit? catholique de Louvain Getting more into details : for each DblArr that I might want to save, I instanciate a Svr_vti object (which is another custom class). The purpose of this class is to perform the save operation to a *.vti file. It does three things : 1. allocating memory i.e. instanciation of vtkImageData object at the beginning of the simulation 2. handling the copying of data from the DblArr object to the vtkImageData object 3. writing the *.vti file. Once again, I have strong doubts that this is the best solution to my problem? Currently I have a class called Svr_vti which holds : (amongst other things) @ a constructor @ a save() member function @ a vtkImageData member object called _ImgData @ a vtkXMLImageDataWriter object called _Wrtr @ a reference to a DblArr called _Arr Constructor(DblArr & MyArr) performs : _ImgData = vtkSmartPointer::New() _Wrtr = vtkSmartPointer::New() _Arr = MyArr // _ImgData->SetDimensions(***,***,***); _ImgData->AllocateScalars( VTK_DOUBLE, * ); _ImgData->SetOrigin(***, ***, ***); _ImgData->SetSpacing(***, ***, ***) // _Wrtr->SetInputData( _ImgData ); save(DblArr &) member function performs : for each node (i,j,k) in domain : double * pxl = _ImgData->GetScalarPointer(i,j,k) for each component in vector : pxl[ind] = Arr(i,j,k, ind) } } // //The file name embeds the number of current time step //Hence the file name is different each time save() is called _Wrtr->SetFileName( *** ); _Wrtr->Write(); Note : this is pseudo-code, it might contain syntax errors and/or abreviations -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 863 bytes Desc: This is a digitally signed message part URL: From garyfallidis at gmail.com Thu Nov 12 17:32:50 2015 From: garyfallidis at gmail.com (Eleftherios Garyfallidis) Date: Thu, 12 Nov 2015 17:32:50 -0500 Subject: [vtkusers] In OSX vtk window does not get the focus Message-ID: Hello all, In OSX using vtk 6 or vtk 5 installed from anaconda the window does not get the focus. This should be trivial to test. You can just run the hello world example and see it by yourself. http://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder We observed the same issue both with osx 10.9 and 10.11 Best regards, Eleftherios -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Nov 12 17:58:03 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 12 Nov 2015 15:58:03 -0700 Subject: [vtkusers] In OSX vtk window does not get the focus In-Reply-To: References: Message-ID: Hi Eleftherios, On OS X the system python is properly set up to receive keyboard focus, but the anaconda python is not. In general, in order for a program to receive keyboard events, it must be part of an app bundle, though I'm sure there are exceptions. I remember that many, many years ago it was necessary to run "pythonw" to get a functional GUI app in python. If you create a bundle for your python program, you can get keyboard events regardless of whose python you use. - David On Thu, Nov 12, 2015 at 3:32 PM, Eleftherios Garyfallidis < garyfallidis at gmail.com> wrote: > Hello all, > > In OSX using vtk 6 or vtk 5 installed from anaconda the window does not > get the focus. > > This should be trivial to test. You can just run the hello world example > and see it by yourself. > http://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder > > We observed the same issue both with osx 10.9 and 10.11 > > Best regards, > Eleftherios > -------------- next part -------------- An HTML attachment was scrubbed... URL: From garyfallidis at gmail.com Thu Nov 12 18:56:37 2015 From: garyfallidis at gmail.com (Eleftherios Garyfallidis) Date: Thu, 12 Nov 2015 18:56:37 -0500 Subject: [vtkusers] In OSX vtk window does not get the focus In-Reply-To: References: Message-ID: Hi David, Thank you for your quick answer. Just to make something clear here. I am not talking about keyboard focus here. The window doesn't take the focus at all. So, what happens is that the window appears but it is hidden behind other windows and you need to press Command + Tab to try to find the VTK window. The same happens even when you use pythonw. After finding the window and click on it then you have the keyboard events working. As you understand this is frustrating for many of our users because they don't get any indication that the application is running. Also, I am not happy going into the direction of making an application bundle because I want to open vtk windows from inside ipython in a module like fashion as you do matlplotlib.show(). And all this works absolutely fine with VTK in Linux. We use vtk visualization from inside a python library called Dipy which is a module (a python library) rather than a standalone application. But perhaps there is something that I am missing here. Let me know what you think. Best regards, Eleftherios On Thu, Nov 12, 2015 at 5:58 PM, David Gobbi wrote: > Hi Eleftherios, > > On OS X the system python is properly set up to receive keyboard focus, > but the anaconda python is not. In general, in order for a program to > receive keyboard events, it must be part of an app bundle, though I'm > sure there are exceptions. I remember that many, many years ago it > was necessary to run "pythonw" to get a functional GUI app in python. > > If you create a bundle for your python program, you can get keyboard > events regardless of whose python you use. > > - David > > > > On Thu, Nov 12, 2015 at 3:32 PM, Eleftherios Garyfallidis < > garyfallidis at gmail.com> wrote: > >> Hello all, >> >> In OSX using vtk 6 or vtk 5 installed from anaconda the window does not >> get the focus. >> >> This should be trivial to test. You can just run the hello world example >> and see it by yourself. >> http://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder >> >> We observed the same issue both with osx 10.9 and 10.11 >> >> Best regards, >> Eleftherios >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Thu Nov 12 19:19:50 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Thu, 12 Nov 2015 17:19:50 -0700 Subject: [vtkusers] In OSX vtk window does not get the focus In-Reply-To: References: Message-ID: It works on Linux is because the focus policy of the window manager is usually set so that new windows automatically get the focus. On OS X, I imagine you'd need to get the handle for the NSApplication and then "activate" it. I doubt that VTK comes with a built-in way to do it. - David On Thu, Nov 12, 2015 at 4:56 PM, Eleftherios Garyfallidis < garyfallidis at gmail.com> wrote: > Hi David, > > Thank you for your quick answer. > > Just to make something clear here. I am not talking about keyboard focus > here. The window doesn't take the focus at all. So, what happens is that > the window appears but it is hidden behind other windows and you need to > press Command + Tab to try to find the VTK window. The same happens even > when you use pythonw. After finding the window and click on it then you > have the keyboard events working. > As you understand this is frustrating for many of our users because they > don't get any indication that the application is running. > > Also, I am not happy going into the direction of making an application > bundle because I want to open vtk windows from inside ipython in a module > like fashion as you do matlplotlib.show(). > And all this works absolutely fine with VTK in Linux. We use vtk > visualization from inside a python library called Dipy which is a module > (a python library) rather than a standalone application. But perhaps there > is something that I am missing here. Let me know what you think. > > Best regards, > Eleftherios > > > > > > On Thu, Nov 12, 2015 at 5:58 PM, David Gobbi > wrote: > >> Hi Eleftherios, >> >> On OS X the system python is properly set up to receive keyboard focus, >> but the anaconda python is not. In general, in order for a program to >> receive keyboard events, it must be part of an app bundle, though I'm >> sure there are exceptions. I remember that many, many years ago it >> was necessary to run "pythonw" to get a functional GUI app in python. >> >> If you create a bundle for your python program, you can get keyboard >> events regardless of whose python you use. >> >> - David >> >> >> >> On Thu, Nov 12, 2015 at 3:32 PM, Eleftherios Garyfallidis < >> garyfallidis at gmail.com> wrote: >> >>> Hello all, >>> >>> In OSX using vtk 6 or vtk 5 installed from anaconda the window does not >>> get the focus. >>> >>> This should be trivial to test. You can just run the hello world example >>> and see it by yourself. >>> http://www.vtk.org/Wiki/VTK/Examples/Python/Cylinder >>> >>> We observed the same issue both with osx 10.9 and 10.11 >>> >>> Best regards, >>> Eleftherios >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nico.schloemer at gmail.com Thu Nov 12 21:34:14 2015 From: nico.schloemer at gmail.com (=?UTF-8?Q?Nico_Schl=C3=B6mer?=) Date: Fri, 13 Nov 2015 02:34:14 +0000 Subject: [vtkusers] meshio Message-ID: Hi everyone, When playing with VTK, I created a little tool [1] for converting VTK files to various other formats (H5M, Msh, Exodus etc.) and also from those formats to VTK. It largely relies on VTK's extensive Python interface, so perhaps some of you find it useful. Cheers, Nico [1] https://pypi.python.org/pypi/meshio -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Fri Nov 13 09:57:05 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Fri, 13 Nov 2015 15:57:05 +0100 Subject: [vtkusers] Crash when reading LSDyna d3plot file Message-ID: Hello All, I'm getting a crash when trying to load a d3plot file coming from LSDyna R8, using the vtkLSDynaReader class. Attached is a very simple code that reproduces the problem (at least here on Windows 7, VTK 6.3). It is written to be used with these dataset : https://www.dropbox.com/s/2gzah0d8d2dpvlt/d3plot.zip?dl=0 It may come from our dataset it self, because when I change the line : l_reader->SetFileName( "./our.d3plot" ); by the line l_reader->SetFileName( "./hemi_draw.d3plot" ); The hemi_draw dataset loads just fine (it is coming from the VTKLargeData git repository) Or maybe the problem comes from my code, because ParaView is able to load the dataset ... Any clue ? Any d3plot expert around ? Thanks Simon -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- cmake_minimum_required( VERSION 2.8.5 FATAL_ERROR ) project( LSDynaReader ) find_package( VTK REQUIRED ) include( ${VTK_USE_FILE} ) add_executable( LSDynaReader MACOSX_BUNDLE LSDynaReader.cxx ) target_link_libraries( LSDynaReader ${VTK_LIBRARIES} ) -------------- next part -------------- #include "vtkActor.h" #include "vtkCompositeDataGeometryFilter.h" #include "vtkLSDynaReader.h" #include "vtkNew.h" #include "vtkPolyDataMapper.h" #include "vtkRenderer.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" int main( int argc, char *argv[] ){ vtkNew l_reader; l_reader->SetFileName( "./our.d3plot" ); //l_reader->SetFileName( "./hemi_draw.d3plot" ); l_reader->Update(); vtkNew l_composite_filter; l_composite_filter->SetInputConnection( l_reader->GetOutputPort() ); vtkNew l_mapper; l_mapper->SetInputConnection( l_composite_filter->GetOutputPort() ); vtkNew l_actor; l_actor->SetMapper( l_mapper.GetPointer() ); vtkNew l_render_window; vtkNew l_renderer; vtkNew l_iren; l_render_window->AddRenderer( l_renderer.GetPointer() ); l_iren->SetRenderWindow( l_render_window.GetPointer() ); l_renderer->AddActor( l_actor.GetPointer() ); l_iren->Start(); } From simon.esneault at gmail.com Fri Nov 13 10:43:38 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Fri, 13 Nov 2015 16:43:38 +0100 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper Message-ID: Hi All, All vtkTextActor are rendered blurred when using with vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the new rendering backend. Here are some snapshots : - OpenGL1 - OpenGL2 Attached some code that reproduces the problem, to be used with this volume. Visible on OSX and Windows to our knowledge, probably on more OS. The text is rendered properly when used with the old backend or when using a vtkGPUVolumeRayCastMapper instead of the vtkFixedPointVolumeRayCastMapper. Shall I feel a bug, is this a known issue ? Thanks, Simon -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "vtkCallbackCommand.h" #include "vtkCamera.h" #include "vtkColorTransferFunction.h" #include "vtkFixedPointVolumeRayCastMapper.h" #include "vtkImageData.h" #include "vtkImageResample.h" #include "vtkInteractorStyle.h" #include "vtkInteractorStyleTrackballCamera.h" #include "vtkMath.h" #include "vtkMetaImageReader.h" #include "vtkPiecewiseFunction.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" #include "vtkTextActor.h" #include "vtkTextProperty.h" #include "vtkVolume.h" #include "vtkVolumeProperty.h" int main( int argc, char *argv[] ){ // Read volume vtkMetaImageReader* l_reader = vtkMetaImageReader::New(); l_reader->SetFileName( "volume.mhd" ); l_reader->Update(); // reduce to 10 Megavoxels double l_ratio = std::pow( 10000000. / l_reader->GetOutput()->GetNumberOfPoints(), 1. / 3. ); vtkImageResample* l_resample = vtkImageResample::New(); l_resample->SetInputConnection( l_reader->GetOutputPort() ); l_resample->SetInterpolationModeToLinear(); for( int i = 0; i < 3; i++ ) l_resample->SetAxisMagnificationFactor( i, l_ratio ); // Setup rendering stuff vtkRenderer* l_renderer = vtkRenderer::New(); l_renderer->SetBackground( 0.3, 0.3, 0.3 ); vtkRenderWindow* l_render_windows = vtkRenderWindow::New(); l_render_windows->AddRenderer( l_renderer ); l_render_windows->SetSize( 900, 900 ); vtkInteractorStyleTrackballCamera* l_trackball = vtkInteractorStyleTrackballCamera::New(); vtkRenderWindowInteractor* l_iren = vtkRenderWindowInteractor::New(); l_iren->SetInteractorStyle( l_trackball ); l_iren->SetRenderWindow( l_render_windows ); l_iren->GetInteractorStyle()->SetDefaultRenderer( l_renderer ); // Make sure we have an opengl context l_render_windows->Render(); // Setup GPU volume raycast mapper vtkFixedPointVolumeRayCastMapper* l_gpu_mapper = vtkFixedPointVolumeRayCastMapper::New(); l_gpu_mapper->SetInputConnection( l_resample->GetOutputPort() ); // Setup Volume property double wl = 260; double ww = 270; // Color function vtkColorTransferFunction* l_color = vtkColorTransferFunction::New(); l_color->SetColorSpaceToRGB(); l_color->AddRGBPoint( wl - ww / 2, 0, 0, 0 ); l_color->AddRGBPoint( wl - ww / 2 + 94 * ( ww / 255.0 ), 1., 21. / 255.0, 27. / 255.0 ); l_color->AddRGBPoint( wl - ww / 2 + 147 * ( ww / 255.0 ), 1., 176. / 255.0, 9. / 255.0 ); l_color->AddRGBPoint( wl - ww / 2 + 201 * ( ww / 255.0 ), 1., 241. / 255.0, 39. / 255.0 ); l_color->AddRGBPoint( wl - ww / 2 + 255 * ( ww / 255.0 ), 1, 1, 1. ); l_color->Build(); // Opacity function vtkPiecewiseFunction* l_opacity = vtkPiecewiseFunction::New(); l_opacity->AddPoint( wl - ww / 2, 0 ); l_opacity->AddPoint( wl + ww / 2, 1 ); // Volume property, light, shading vtkVolumeProperty* l_volume_property = vtkVolumeProperty::New(); l_volume_property->SetColor( l_color ); l_volume_property->SetScalarOpacity( l_opacity ); l_volume_property->SetInterpolationTypeToLinear(); l_volume_property->ShadeOn(); l_volume_property->SetDiffuse( 0.8 ); // Put everything together vtkVolume* l_volume = vtkVolume::New(); l_volume->SetProperty( l_volume_property ); l_volume->SetMapper( l_gpu_mapper ); // setup text actor : vtkTextActor* l_text_actor = vtkTextActor::New(); l_text_actor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport(); l_text_actor->GetPositionCoordinate()->SetValue( 0.01, 0.99 ); l_text_actor->GetTextProperty()->SetJustificationToLeft(); l_text_actor->GetTextProperty()->SetVerticalJustificationToTop(); l_text_actor->GetTextProperty()->SetFontSize( 30 ); #ifdef VTK_WAS_BUILT_WITH_OPENGL2 l_text_actor->SetInput( "OpenGL2 !!!!" ); #else l_text_actor->SetInput( "OpenGL1 !!!!" ); #endif l_renderer->AddActor( l_text_actor ); l_renderer->AddVolume( l_volume ); // Adjust camera position l_renderer->GetActiveCamera()->SetViewUp( 0, 0, 1 ); double l_distance = 1000; double l_center[ 3 ], l_pos[ 3 ]; l_reader->GetOutput()->GetCenter( l_center ); l_reader->GetOutput()->GetCenter( l_pos ); l_pos[ 1 ] -= l_distance; double l_cam_angle = atan( ( l_center[ 2 ] * 2. ) / ( l_distance * 2. ) ) * 360.0 / vtkMath::Pi(); l_renderer->GetActiveCamera()->SetFocalPoint( l_center ); l_renderer->GetActiveCamera()->SetPosition( l_pos ); l_renderer->GetActiveCamera()->SetViewAngle( l_cam_angle + 1 ); l_renderer->GetActiveCamera()->SetClippingRange( 0.01, 10000 ); // Go rendering ! l_iren->Start(); // Memory cleanup l_reader->Delete(); l_resample->Delete(); l_renderer->Delete(); l_render_windows->Delete(); l_trackball->Delete(); l_iren->Delete(); l_gpu_mapper->Delete(); l_color->Delete(); l_opacity->Delete(); l_volume_property->Delete(); l_volume->Delete(); l_text_actor->Delete(); } -------------- next part -------------- cmake_minimum_required( VERSION 2.8.5 FATAL_ERROR ) project( BlurredText ) find_package( VTK REQUIRED ) include( ${VTK_USE_FILE} ) if( VTK_RENDERING_BACKEND STREQUAL "OpenGL2" ) message( STATUS "Using new OpenGL2 backend" ) add_definitions( -DVTK_WAS_BUILT_WITH_OPENGL2 ) else() message( STATUS "Using old OpenGL1 backend" ) endif() add_executable( BlurredText MACOSX_BUNDLE BlurredText.cxx ) target_link_libraries( BlurredText ${VTK_LIBRARIES} ) From simon.esneault at gmail.com Fri Nov 13 10:57:17 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Fri, 13 Nov 2015 16:57:17 +0100 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Hello Aashish, I've run some quick tests on my computer, and when disabling the automatic adjustment, both of the volume rendering technique seems to deliver the same performance, with some random Fixed sample distance. I will run some more test on the other computer that we've got here, just to be sure. And also on some mac. And report them to you :) Is there something else that I can do to help on this problem ? Simon 2015-11-12 18:34 GMT+01:00 Aashish Chaudhary : > > > On Thu, Nov 12, 2015 at 12:31 PM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> >> >> On Thu, Nov 12, 2015 at 12:12 PM, Simon ESNEAULT < >> simon.esneault at gmail.com> wrote: >> >>> Hello Aashish, >>> >>> Sorry for the late reply, I was busy last week. >>> >>> Thanks for the update, and your work on this topic. >>> Yes I have seen that your change have been merged concerning the >>> ReductionFactor. Nevertheless, I am still getting a smaller frame rate with >>> the new backend. To highlight this, please find attached a very simple >>> application that loads a volume ( >>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip) and does volume >>> rendering while displaying the frame rate. This is pretty much what we show >>> to the user in our application, and in this condition, on my machine the >>> FPS are around 25 with the opengl1 backend >>> , and 15 with the >>> new backend , from >>> this week VTK master >>> It is very simple to test, just need change the VTK_DIR to an OpenGL1 or >>> OpenGL2 build, and place the volume.mhd and raw in the execution path. >>> Also you will find attached a small text file that summarizes the test >>> that have been done here. >>> >> >> No problem, thanks for the update. Please see my comments below: >> >>> >>> I think the real reason why it appears slower with the OGL2 version is >>> that we try to have control on the "MaximalImageSampleDistance". If I >>> remove the line l_gpu_mapper->SetMaximumImageSampleDistance( 2. ); I get >>> the same frame rate with each backend. BUT, the new backend does decimate a >>> lot more the volume, leading to a very blurred image during rendering, and >>> that's not what we want :/ >>> >> >> Aha, this is very useful since this parameters does affecting the >> reduction factor. I will try your code; one quick question when the new >> backend decimates a lot (by removing the SetMaximumImageSampleDistance), >> does it get any faster than the old version? I am going to try it on my Mac >> and Linux laptop and report back (mostly tomorrow since I am away today). >> >>> >>> > Never mind, I see that you have that in your result file. It seems it does > get faster but more blurry. Would it be possible for you to do one more > test? Can you set a fix sample distance (pick any) for new and the old > mapper and set AutoAdjustSampleDistance to OFF and capture some performance > numbers? In that way we know exactly if something more fundamental is > causing the slowness. The whole reduction factor math is based on > approximate stuff so that will vary between two mappers. > > - Aashish > > >> Again, thanks for paying attention to this problem, I hope this little >>> application and test case can help you to adjust the parameters... >>> >> >> Thanks for your help. I am glad you are testing my latest changes. >> >> - Best, Aashish >> >>> >>> >>> Simon >>> >>> PS : I did not get a chance to check the difference on Paraview, but I >>> believe the result will be the same as the attached example is really >>> simple. >>> >>> 2015-11-03 19:44 GMT+01:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>>> Hi Simon, >>>> >>>> the branch has been merged into VTK master. I am not sure when Paraview >>>> is going to update the VTK, but you can do it manually if needed. We are >>>> also going to run our bench marking again to be sure since recently lot >>>> many changes went into the VTK / volume rendering. Please feel free to ping >>>> me again if it does not solve your issue. >>>> >>>> Looking forward to your feedback. >>>> >>>> - Aashish >>>> >>>> On Mon, Nov 2, 2015 at 8:02 AM, Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com> wrote: >>>> >>>>> Hi Simon, >>>>> >>>>> I found the reason behind the appeared performance you were getting. >>>>> We have this code in volume rendering that when you interact changes the >>>>> sampling distance and in the newer code we were too conservative compare to >>>>> the last version. That's why you were getting better quality when you move >>>>> your mouse but lower frame rates. I pushed a branch in VTK to address the >>>>> issue. Would it be possible for you to build Paraview with VTK master? It >>>>> may take 3-4 days or longer for Paraview's VTK to get updated. >>>>> >>>>> Thanks, >>>>> Aashish >>>>> >>>>> On Wed, Oct 28, 2015 at 11:59 AM, Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com> wrote: >>>>> >>>>>> Hi Simon, >>>>>> >>>>>> I am just finishing up a ParaView5 related parallel volume rendering >>>>>> bug (pushing a branch today to VTK). This is next on my list. >>>>>> >>>>>> - Aashish >>>>>> >>>>>> On Wed, Oct 28, 2015 at 11:57 AM, Simon ESNEAULT < >>>>>> simon.esneault at gmail.com> wrote: >>>>>> >>>>>>> Hello Aashish >>>>>>> >>>>>>> Did you get a chance to try to load the dataset on Windows ? >>>>>>> Can I do anything to help you investigate ? Should I feel a bug, >>>>>>> that may act as a reminder ? >>>>>>> Have a nice day >>>>>>> Simon >>>>>>> >>>>>>> >>>>>>> 2015-10-27 18:26 GMT+01:00 Aashish Chaudhary < >>>>>>> aashish.chaudhary at kitware.com>: >>>>>>> >>>>>>>> Thanks Simon. This is really strange since we are not seeing it on >>>>>>>> Mac and Linux (but both has dedicated cards). >>>>>>>> >>>>>>>> I will look into it soon. >>>>>>>> >>>>>>>> - aashish >>>>>>>> >>>>>>>> On Tue, Oct 27, 2015 at 1:03 PM, Simon ESNEAULT < >>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>> >>>>>>>>> Ok, thank you very much fort digging into this. >>>>>>>>> I've done some test and I believe I can see a similar slowdown >>>>>>>>> happening on OSX, with a MacBook pro retina 13" from 2013, Intel Iris 5100 >>>>>>>>> graphics. >>>>>>>>> Good luck in the investigation, I you need more details, do not >>>>>>>>> hesitate to ask >>>>>>>>> Simon >>>>>>>>> >>>>>>>>> 2015-10-27 17:37 GMT+01:00 Aashish Chaudhary < >>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>> >>>>>>>>>> Ah, thanks. I will get back to you on this since on Linux I don't >>>>>>>>>> any issue so it has to be Windows specific thing. >>>>>>>>>> >>>>>>>>>> - Aashish >>>>>>>>>> >>>>>>>>>> On Tue, Oct 27, 2015 at 10:36 AM, Simon ESNEAULT < >>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> I tried with that one from yesterday and today's version >>>>>>>>>>> (4.4.0-209-gc399648) >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> Simon >>>>>>>>>>> >>>>>>>>>>> 2015-10-27 15:19 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>> >>>>>>>>>>>> Thanks. >>>>>>>>>>>> >>>>>>>>>>>> And when did you download this version? >>>>>>>>>>>> ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe >>>>>>>>>>>> >>>>>>>>>>>> Thanks, >>>>>>>>>>>> Aashish >>>>>>>>>>>> >>>>>>>>>>>> On Tue, Oct 27, 2015 at 10:17 AM, Simon ESNEAULT < >>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Yes, I tried with and without the shading. Without shading >>>>>>>>>>>>> enabled, the new Opengl2 is also slower when zoomed in (in the described >>>>>>>>>>>>> condition). With shading enabled, the difference in speed between the two >>>>>>>>>>>>> version seems even bigger. >>>>>>>>>>>>> I got the version from the nightly build download section of >>>>>>>>>>>>> paraview website (it is still available). And I've just tried with that one >>>>>>>>>>>>> labeled "ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe" with the same >>>>>>>>>>>>> results. >>>>>>>>>>>>> >>>>>>>>>>>>> About the FPS, it is difficult to give an exact number, >>>>>>>>>>>>> because it depends of the condition (zoomed or not etc...) but yes, this is >>>>>>>>>>>>> the idea. >>>>>>>>>>>>> In our software, I've exposed the frame rate using this >>>>>>>>>>>>> example : >>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/FrameRate >>>>>>>>>>>>> And the frame rate is around 15/20 for the first backend, and >>>>>>>>>>>>> around 6/8 for the new backend, on the same dataset (the one provided for >>>>>>>>>>>>> example), with the same mapper parameters >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks >>>>>>>>>>>>> Simon >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> 2015-10-27 14:48 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi Simon, >>>>>>>>>>>>>> >>>>>>>>>>>>>> This is helpful but just missing few more bits: >>>>>>>>>>>>>> >>>>>>>>>>>>>> 1) Did you try without the shading and see how the >>>>>>>>>>>>>> performance compares? >>>>>>>>>>>>>> >>>>>>>>>>>>>> 2) ParaView 4.4.0-193-gec96423 --> Where did you get this >>>>>>>>>>>>>> one from (ParaView download page or did you built yourself?) >>>>>>>>>>>>>> >>>>>>>>>>>>>> Also, so on your system the old mapper is running 30FPS and >>>>>>>>>>>>>> the new one at 15-20 FPS as per your summary. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT < >>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Sorry for the late answer, I was busy this morning. >>>>>>>>>>>>>>> Thanks for testing with the DataSet. >>>>>>>>>>>>>>> I agree the performance is still quite good with the new >>>>>>>>>>>>>>> backend, and I also get something like 15/20 fps on windows on an HD >>>>>>>>>>>>>>> screen. But when compared to the old one, and in some condition (when >>>>>>>>>>>>>>> zoomed especially), it looks really slower to me >>>>>>>>>>>>>>> The two tested version are : >>>>>>>>>>>>>>> - ParaView 4.4.0 64 bits final version for the old backend >>>>>>>>>>>>>>> - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 >>>>>>>>>>>>>>> backend. >>>>>>>>>>>>>>> on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and Nvidia >>>>>>>>>>>>>>> Quadro K420 >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> To highlight the difference, here is what I do : >>>>>>>>>>>>>>> - Launch both version on the same computer at the same time >>>>>>>>>>>>>>> - Load the above dataset on each >>>>>>>>>>>>>>> - Select volume rendering >>>>>>>>>>>>>>> - Adjust the transfer function data range to [100-750] (the >>>>>>>>>>>>>>> default "Cool to Warm" is fine) >>>>>>>>>>>>>>> - Set the view direction to +Y >>>>>>>>>>>>>>> - Adjust the Y of the camera position to -300 >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> And start interacting ... >>>>>>>>>>>>>>> Dunno if there is an easy way to print out the Frame Rate in >>>>>>>>>>>>>>> Paraview, but the new version seems really twice slower in these >>>>>>>>>>>>>>> conditions... We can see it does not scale in the same way, the old backend >>>>>>>>>>>>>>> seems more aggressive on the image sample reduction, hence the >>>>>>>>>>>>>>> interactivity is better. >>>>>>>>>>>>>>> Shading enable or not does not change much >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I'm aware of the DesiredUpdateRate thing, we use to play >>>>>>>>>>>>>>> with this with the old backend to fine tune the interactivity, although >>>>>>>>>>>>>>> what's really inside was never clear to me >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I hope that there is enough information for you to reproduce >>>>>>>>>>>>>>> this, do not hesitate to ask for some more information. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks a lot for your help >>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dear Simon, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Checking again. Wondering if you can provide some more >>>>>>>>>>>>>>>> detail on the binary you are using and whether or not without shading the >>>>>>>>>>>>>>>> rendering performance comparable to older version. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> I used your dataset on paraview master as of today on my >>>>>>>>>>>>>>>>> Linux box running Ubuntu 14.04 and NVIDA Quadro card and I am getting about >>>>>>>>>>>>>>>>> 15-20 FPS with shading on with 1920x1080 resolution. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Are you on the proper 4.4 or using RC1/RC2? I checked the >>>>>>>>>>>>>>>>> shading performance fix was in 4.4 but not in RC's. I don't have access to >>>>>>>>>>>>>>>>> Windows box right away but I will try there too. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> NOTE: You might get multiple emails because of the >>>>>>>>>>>>>>>>> attachment size issue. Sorry about that. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Thanks for the quick answer >>>>>>>>>>>>>>>>>>> We are using a vtkImageData, 512x512x591 with short >>>>>>>>>>>>>>>>>>> element (you can find the dataset here : >>>>>>>>>>>>>>>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). >>>>>>>>>>>>>>>>>>> So I think it's all about GPU volume raycast mapper. >>>>>>>>>>>>>>>>>>> The new mapper does bring low resolution, but when >>>>>>>>>>>>>>>>>>> compared to the old one, it seems less "low resolution" during interaction >>>>>>>>>>>>>>>>>>> than the old one >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Right, so that's why its not a exact comparison. What >>>>>>>>>>>>>>>>>> happens is that depending on what is interactive, (you can set the desired >>>>>>>>>>>>>>>>>> update rate in VTK, not exposed in ParaView I believe), it will do >>>>>>>>>>>>>>>>>> interactive but with higher resolution (smaller sample distance). If they >>>>>>>>>>>>>>>>>> both have the same sample distance, then the new mapper should out perform >>>>>>>>>>>>>>>>>> the old one, however, there is another thing we need to consider here which >>>>>>>>>>>>>>>>>> is shading. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Shading is enabled, gradient opacity disabled >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Can you disable the shading and see if now they both >>>>>>>>>>>>>>>>>> (opengl1 and 2) equally better? We already pushed a fix for it but not sure >>>>>>>>>>>>>>>>>> if that you have in your build. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Don't know if you need a minimal example, but I believe >>>>>>>>>>>>>>>>>>> the GPURenderDemo used with this dataset is enough to highlight the slow >>>>>>>>>>>>>>>>>>> down. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Yes, I will use this dataset. Thanks. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Also, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Do you have shading enabled? We fixed a bug with >>>>>>>>>>>>>>>>>>>> shading that was causing the slow performance a while back. I don't >>>>>>>>>>>>>>>>>>>> remember if that was included in 4.4 or not ( I can check ). >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> What kind of dataset you are using? Depending on the >>>>>>>>>>>>>>>>>>>>> data type you might be using >>>>>>>>>>>>>>>>>>>>> the GPU one or the unstructured renderer. The >>>>>>>>>>>>>>>>>>>>> performance we measured is related to the GPU ray cast mapper >>>>>>>>>>>>>>>>>>>>> and will apply only to the vtkImageData inputs. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Also, helpful would be is if you can tell if the new >>>>>>>>>>>>>>>>>>>>> mapper is bringing low resolution when you interact with the volume (and >>>>>>>>>>>>>>>>>>>>> whether or not it happens with old mapper). >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> We are trying to make the switch to the new OpenGL2 >>>>>>>>>>>>>>>>>>>>>> backend for our application, and although the switch was easy (thanks for >>>>>>>>>>>>>>>>>>>>>> not breaking the API ;) ), we can see a significant slowdown on the GPU >>>>>>>>>>>>>>>>>>>>>> volume rendering part, especially during interaction. Typically we dropped >>>>>>>>>>>>>>>>>>>>>> from 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), >>>>>>>>>>>>>>>>>>>>>> with the same code around. >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> This slow down can be seen in ParaView, if you >>>>>>>>>>>>>>>>>>>>>> compare the latest 4.4 OpenGL2 build with the classic 4.4 build while >>>>>>>>>>>>>>>>>>>>>> volume rendering a big enough volume (512^3) >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> The blog post here >>>>>>>>>>>>>>>>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>>>>>>>>>>>>>>>> claims that the new GPU volume rendering >>>>>>>>>>>>>>>>>>>>>> implementation should be faster than the old one, is there some more >>>>>>>>>>>>>>>>>>>>>> detailed explanation somewhere ? Are there some important parameters that >>>>>>>>>>>>>>>>>>>>>> can make the difference ? >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> PS : The polygonal rendering seems a lot faster with >>>>>>>>>>>>>>>>>>>>>> the new backend ! >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>>>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>> * >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>>> * >>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>> * >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>> Simon Esneault >>>>>>>>>>> Rennes, France >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>> * >>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>> * >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> Simon Esneault >>>>>>>>> Rennes, France >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>> * >>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>> * >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> ------------------------------------------------------------------ >>>>>>> Simon Esneault >>>>>>> Rennes, France >>>>>>> ------------------------------------------------------------------ >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Nov 13 11:02:39 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 13 Nov 2015 11:02:39 -0500 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: On Fri, Nov 13, 2015 at 10:57 AM, Simon ESNEAULT wrote: > Hello Aashish, > > I've run some quick tests on my computer, and when disabling the automatic > adjustment, both of the volume rendering technique seems to deliver the > same performance, with some random Fixed sample distance. I will run some > more test on the other computer that we've got here, just to be sure. And > also on some mac. And report them to you :) > This is very helpful and sort of confirms my theory the the code in question is the reduction factor computation. The logic is changed between the old mapper and the new mapper. I will look again to make them consistent but it won't be exactly the same since the old mapper code to me was not making the the right choices and was broken for the new mapper. Actually, initially we had the exact same code and it was running into issues since the new mapper was faster and hence breaking some of the assumptions the old mapper was making. > > Is there something else that I can do to help on this problem ? > Not at the moment. You helped a lot, the code and the data is really helpful. I will report back early next week again and will request you to try again. Thanks for your patience. - Aashish > > > Simon > > > 2015-11-12 18:34 GMT+01:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> >> >> On Thu, Nov 12, 2015 at 12:31 PM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> >>> >>> On Thu, Nov 12, 2015 at 12:12 PM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> Hello Aashish, >>>> >>>> Sorry for the late reply, I was busy last week. >>>> >>>> Thanks for the update, and your work on this topic. >>>> Yes I have seen that your change have been merged concerning the >>>> ReductionFactor. Nevertheless, I am still getting a smaller frame rate with >>>> the new backend. To highlight this, please find attached a very simple >>>> application that loads a volume ( >>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip) and does volume >>>> rendering while displaying the frame rate. This is pretty much what we show >>>> to the user in our application, and in this condition, on my machine the >>>> FPS are around 25 with the opengl1 backend >>>> , and 15 with the >>>> new backend , from >>>> this week VTK master >>>> It is very simple to test, just need change the VTK_DIR to an OpenGL1 >>>> or OpenGL2 build, and place the volume.mhd and raw in the execution path. >>>> Also you will find attached a small text file that summarizes the test >>>> that have been done here. >>>> >>> >>> No problem, thanks for the update. Please see my comments below: >>> >>>> >>>> I think the real reason why it appears slower with the OGL2 version is >>>> that we try to have control on the "MaximalImageSampleDistance". If I >>>> remove the line l_gpu_mapper->SetMaximumImageSampleDistance( 2. ); I get >>>> the same frame rate with each backend. BUT, the new backend does decimate a >>>> lot more the volume, leading to a very blurred image during rendering, and >>>> that's not what we want :/ >>>> >>> >>> Aha, this is very useful since this parameters does affecting the >>> reduction factor. I will try your code; one quick question when the new >>> backend decimates a lot (by removing the SetMaximumImageSampleDistance), >>> does it get any faster than the old version? I am going to try it on my Mac >>> and Linux laptop and report back (mostly tomorrow since I am away today). >>> >>>> >>>> >> Never mind, I see that you have that in your result file. It seems it >> does get faster but more blurry. Would it be possible for you to do one >> more test? Can you set a fix sample distance (pick any) for new and the old >> mapper and set AutoAdjustSampleDistance to OFF and capture some performance >> numbers? In that way we know exactly if something more fundamental is >> causing the slowness. The whole reduction factor math is based on >> approximate stuff so that will vary between two mappers. >> >> - Aashish >> >> >>> Again, thanks for paying attention to this problem, I hope this little >>>> application and test case can help you to adjust the parameters... >>>> >>> >>> Thanks for your help. I am glad you are testing my latest changes. >>> >>> - Best, Aashish >>> >>>> >>>> >>>> Simon >>>> >>>> PS : I did not get a chance to check the difference on Paraview, but I >>>> believe the result will be the same as the attached example is really >>>> simple. >>>> >>>> 2015-11-03 19:44 GMT+01:00 Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com>: >>>> >>>>> Hi Simon, >>>>> >>>>> the branch has been merged into VTK master. I am not sure when >>>>> Paraview is going to update the VTK, but you can do it manually if needed. >>>>> We are also going to run our bench marking again to be sure since recently >>>>> lot many changes went into the VTK / volume rendering. Please feel free to >>>>> ping me again if it does not solve your issue. >>>>> >>>>> Looking forward to your feedback. >>>>> >>>>> - Aashish >>>>> >>>>> On Mon, Nov 2, 2015 at 8:02 AM, Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com> wrote: >>>>> >>>>>> Hi Simon, >>>>>> >>>>>> I found the reason behind the appeared performance you were getting. >>>>>> We have this code in volume rendering that when you interact changes the >>>>>> sampling distance and in the newer code we were too conservative compare to >>>>>> the last version. That's why you were getting better quality when you move >>>>>> your mouse but lower frame rates. I pushed a branch in VTK to address the >>>>>> issue. Would it be possible for you to build Paraview with VTK master? It >>>>>> may take 3-4 days or longer for Paraview's VTK to get updated. >>>>>> >>>>>> Thanks, >>>>>> Aashish >>>>>> >>>>>> On Wed, Oct 28, 2015 at 11:59 AM, Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>> >>>>>>> Hi Simon, >>>>>>> >>>>>>> I am just finishing up a ParaView5 related parallel volume rendering >>>>>>> bug (pushing a branch today to VTK). This is next on my list. >>>>>>> >>>>>>> - Aashish >>>>>>> >>>>>>> On Wed, Oct 28, 2015 at 11:57 AM, Simon ESNEAULT < >>>>>>> simon.esneault at gmail.com> wrote: >>>>>>> >>>>>>>> Hello Aashish >>>>>>>> >>>>>>>> Did you get a chance to try to load the dataset on Windows ? >>>>>>>> Can I do anything to help you investigate ? Should I feel a bug, >>>>>>>> that may act as a reminder ? >>>>>>>> Have a nice day >>>>>>>> Simon >>>>>>>> >>>>>>>> >>>>>>>> 2015-10-27 18:26 GMT+01:00 Aashish Chaudhary < >>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>> >>>>>>>>> Thanks Simon. This is really strange since we are not seeing it on >>>>>>>>> Mac and Linux (but both has dedicated cards). >>>>>>>>> >>>>>>>>> I will look into it soon. >>>>>>>>> >>>>>>>>> - aashish >>>>>>>>> >>>>>>>>> On Tue, Oct 27, 2015 at 1:03 PM, Simon ESNEAULT < >>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Ok, thank you very much fort digging into this. >>>>>>>>>> I've done some test and I believe I can see a similar slowdown >>>>>>>>>> happening on OSX, with a MacBook pro retina 13" from 2013, Intel Iris 5100 >>>>>>>>>> graphics. >>>>>>>>>> Good luck in the investigation, I you need more details, do not >>>>>>>>>> hesitate to ask >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> 2015-10-27 17:37 GMT+01:00 Aashish Chaudhary < >>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>> >>>>>>>>>>> Ah, thanks. I will get back to you on this since on Linux I >>>>>>>>>>> don't any issue so it has to be Windows specific thing. >>>>>>>>>>> >>>>>>>>>>> - Aashish >>>>>>>>>>> >>>>>>>>>>> On Tue, Oct 27, 2015 at 10:36 AM, Simon ESNEAULT < >>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> I tried with that one from yesterday and today's version >>>>>>>>>>>> (4.4.0-209-gc399648) >>>>>>>>>>>> >>>>>>>>>>>> Thanks, >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> 2015-10-27 15:19 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>> >>>>>>>>>>>>> Thanks. >>>>>>>>>>>>> >>>>>>>>>>>>> And when did you download this version? >>>>>>>>>>>>> ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks, >>>>>>>>>>>>> Aashish >>>>>>>>>>>>> >>>>>>>>>>>>> On Tue, Oct 27, 2015 at 10:17 AM, Simon ESNEAULT < >>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Yes, I tried with and without the shading. Without shading >>>>>>>>>>>>>> enabled, the new Opengl2 is also slower when zoomed in (in the described >>>>>>>>>>>>>> condition). With shading enabled, the difference in speed between the two >>>>>>>>>>>>>> version seems even bigger. >>>>>>>>>>>>>> I got the version from the nightly build download section of >>>>>>>>>>>>>> paraview website (it is still available). And I've just tried with that one >>>>>>>>>>>>>> labeled "ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe" with the same >>>>>>>>>>>>>> results. >>>>>>>>>>>>>> >>>>>>>>>>>>>> About the FPS, it is difficult to give an exact number, >>>>>>>>>>>>>> because it depends of the condition (zoomed or not etc...) but yes, this is >>>>>>>>>>>>>> the idea. >>>>>>>>>>>>>> In our software, I've exposed the frame rate using this >>>>>>>>>>>>>> example : >>>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/FrameRate >>>>>>>>>>>>>> And the frame rate is around 15/20 for the first backend, and >>>>>>>>>>>>>> around 6/8 for the new backend, on the same dataset (the one provided for >>>>>>>>>>>>>> example), with the same mapper parameters >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> 2015-10-27 14:48 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi Simon, >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> This is helpful but just missing few more bits: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> 1) Did you try without the shading and see how the >>>>>>>>>>>>>>> performance compares? >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> 2) ParaView 4.4.0-193-gec96423 --> Where did you get this >>>>>>>>>>>>>>> one from (ParaView download page or did you built yourself?) >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Also, so on your system the old mapper is running 30FPS and >>>>>>>>>>>>>>> the new one at 15-20 FPS as per your summary. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT < >>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Sorry for the late answer, I was busy this morning. >>>>>>>>>>>>>>>> Thanks for testing with the DataSet. >>>>>>>>>>>>>>>> I agree the performance is still quite good with the new >>>>>>>>>>>>>>>> backend, and I also get something like 15/20 fps on windows on an HD >>>>>>>>>>>>>>>> screen. But when compared to the old one, and in some condition (when >>>>>>>>>>>>>>>> zoomed especially), it looks really slower to me >>>>>>>>>>>>>>>> The two tested version are : >>>>>>>>>>>>>>>> - ParaView 4.4.0 64 bits final version for the old backend >>>>>>>>>>>>>>>> - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 >>>>>>>>>>>>>>>> backend. >>>>>>>>>>>>>>>> on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and >>>>>>>>>>>>>>>> Nvidia Quadro K420 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> To highlight the difference, here is what I do : >>>>>>>>>>>>>>>> - Launch both version on the same computer at the same time >>>>>>>>>>>>>>>> - Load the above dataset on each >>>>>>>>>>>>>>>> - Select volume rendering >>>>>>>>>>>>>>>> - Adjust the transfer function data range to [100-750] (the >>>>>>>>>>>>>>>> default "Cool to Warm" is fine) >>>>>>>>>>>>>>>> - Set the view direction to +Y >>>>>>>>>>>>>>>> - Adjust the Y of the camera position to -300 >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> And start interacting ... >>>>>>>>>>>>>>>> Dunno if there is an easy way to print out the Frame Rate >>>>>>>>>>>>>>>> in Paraview, but the new version seems really twice slower in these >>>>>>>>>>>>>>>> conditions... We can see it does not scale in the same way, the old backend >>>>>>>>>>>>>>>> seems more aggressive on the image sample reduction, hence the >>>>>>>>>>>>>>>> interactivity is better. >>>>>>>>>>>>>>>> Shading enable or not does not change much >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I'm aware of the DesiredUpdateRate thing, we use to play >>>>>>>>>>>>>>>> with this with the old backend to fine tune the interactivity, although >>>>>>>>>>>>>>>> what's really inside was never clear to me >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I hope that there is enough information for you to >>>>>>>>>>>>>>>> reproduce this, do not hesitate to ask for some more information. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks a lot for your help >>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Dear Simon, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Checking again. Wondering if you can provide some more >>>>>>>>>>>>>>>>> detail on the binary you are using and whether or not without shading the >>>>>>>>>>>>>>>>> rendering performance comparable to older version. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> I used your dataset on paraview master as of today on my >>>>>>>>>>>>>>>>>> Linux box running Ubuntu 14.04 and NVIDA Quadro card and I am getting about >>>>>>>>>>>>>>>>>> 15-20 FPS with shading on with 1920x1080 resolution. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Are you on the proper 4.4 or using RC1/RC2? I checked the >>>>>>>>>>>>>>>>>> shading performance fix was in 4.4 but not in RC's. I don't have access to >>>>>>>>>>>>>>>>>> Windows box right away but I will try there too. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> NOTE: You might get multiple emails because of the >>>>>>>>>>>>>>>>>> attachment size issue. Sorry about that. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Thanks for the quick answer >>>>>>>>>>>>>>>>>>>> We are using a vtkImageData, 512x512x591 with short >>>>>>>>>>>>>>>>>>>> element (you can find the dataset here : >>>>>>>>>>>>>>>>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). >>>>>>>>>>>>>>>>>>>> So I think it's all about GPU volume raycast mapper. >>>>>>>>>>>>>>>>>>>> The new mapper does bring low resolution, but when >>>>>>>>>>>>>>>>>>>> compared to the old one, it seems less "low resolution" during interaction >>>>>>>>>>>>>>>>>>>> than the old one >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Right, so that's why its not a exact comparison. What >>>>>>>>>>>>>>>>>>> happens is that depending on what is interactive, (you can set the desired >>>>>>>>>>>>>>>>>>> update rate in VTK, not exposed in ParaView I believe), it will do >>>>>>>>>>>>>>>>>>> interactive but with higher resolution (smaller sample distance). If they >>>>>>>>>>>>>>>>>>> both have the same sample distance, then the new mapper should out perform >>>>>>>>>>>>>>>>>>> the old one, however, there is another thing we need to consider here which >>>>>>>>>>>>>>>>>>> is shading. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Shading is enabled, gradient opacity disabled >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Can you disable the shading and see if now they both >>>>>>>>>>>>>>>>>>> (opengl1 and 2) equally better? We already pushed a fix for it but not sure >>>>>>>>>>>>>>>>>>> if that you have in your build. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Don't know if you need a minimal example, but I believe >>>>>>>>>>>>>>>>>>>> the GPURenderDemo used with this dataset is enough to highlight the slow >>>>>>>>>>>>>>>>>>>> down. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Yes, I will use this dataset. Thanks. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Also, >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Do you have shading enabled? We fixed a bug with >>>>>>>>>>>>>>>>>>>>> shading that was causing the slow performance a while back. I don't >>>>>>>>>>>>>>>>>>>>> remember if that was included in 4.4 or not ( I can check ). >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> What kind of dataset you are using? Depending on the >>>>>>>>>>>>>>>>>>>>>> data type you might be using >>>>>>>>>>>>>>>>>>>>>> the GPU one or the unstructured renderer. The >>>>>>>>>>>>>>>>>>>>>> performance we measured is related to the GPU ray cast mapper >>>>>>>>>>>>>>>>>>>>>> and will apply only to the vtkImageData inputs. >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Also, helpful would be is if you can tell if the new >>>>>>>>>>>>>>>>>>>>>> mapper is bringing low resolution when you interact with the volume (and >>>>>>>>>>>>>>>>>>>>>> whether or not it happens with old mapper). >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> We are trying to make the switch to the new OpenGL2 >>>>>>>>>>>>>>>>>>>>>>> backend for our application, and although the switch was easy (thanks for >>>>>>>>>>>>>>>>>>>>>>> not breaking the API ;) ), we can see a significant slowdown on the GPU >>>>>>>>>>>>>>>>>>>>>>> volume rendering part, especially during interaction. Typically we dropped >>>>>>>>>>>>>>>>>>>>>>> from 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia Quadro K420), >>>>>>>>>>>>>>>>>>>>>>> with the same code around. >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> This slow down can be seen in ParaView, if you >>>>>>>>>>>>>>>>>>>>>>> compare the latest 4.4 OpenGL2 build with the classic 4.4 build while >>>>>>>>>>>>>>>>>>>>>>> volume rendering a big enough volume (512^3) >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> The blog post here >>>>>>>>>>>>>>>>>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>>>>>>>>>>>>>>>>> claims that the new GPU volume rendering >>>>>>>>>>>>>>>>>>>>>>> implementation should be faster than the old one, is there some more >>>>>>>>>>>>>>>>>>>>>>> detailed explanation somewhere ? Are there some important parameters that >>>>>>>>>>>>>>>>>>>>>>> can make the difference ? >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> PS : The polygonal rendering seems a lot faster with >>>>>>>>>>>>>>>>>>>>>>> the new backend ! >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>>>>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>> * >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>> Inc. * >>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>> * >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> Simon Esneault >>>>>>>>>>>> Rennes, France >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>> * >>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>> * >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> Simon Esneault >>>>>>>>>> Rennes, France >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>> * >>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>> * >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> Simon Esneault >>>>>>>> Rennes, France >>>>>>>> ------------------------------------------------------------------ >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Fri Nov 13 11:18:34 2015 From: sean at rogue-research.com (Sean McBride) Date: Fri, 13 Nov 2015 11:18:34 -0500 Subject: [vtkusers] In OSX vtk window does not get the focus In-Reply-To: References: Message-ID: <20151113161834.484630440@mail.rogue-research.com> On Thu, 12 Nov 2015 17:32:50 -0500, Eleftherios Garyfallidis said: >In OSX using vtk 6 or vtk 5 installed from anaconda the window does not get >the focus. This reminds me of vtk bug #2025, which I keep meaning to take a crack at. Could you try this patch and see if it fixes your issue (I'm not sure it will): 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 davideugenewarren+vtk at gmail.com Fri Nov 13 11:32:01 2015 From: davideugenewarren+vtk at gmail.com (dewarren) Date: Fri, 13 Nov 2015 09:32:01 -0700 (MST) Subject: [vtkusers] Rendering multiple volumes In-Reply-To: References: <56324268.7080701@rhpcs.mcmaster.ca> <5632525C.6000600@rhpcs.mcmaster.ca> <5632585A.4000005@rhpcs.mcmaster.ca> Message-ID: <1447432321076-5734971.post@n5.nabble.com> I would also be very interested in having the ability to render multiple volumes, particularly for rendering structural and functional neuroimaging data that overlap in the same space. The general idea has been discussed on this list previously (http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tt4829710.html#a4830288), but it is not clear whether anyone has implemented the suggested approach in VTK. -- View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5734971.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.gobbi at gmail.com Fri Nov 13 11:47:31 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Fri, 13 Nov 2015 09:47:31 -0700 Subject: [vtkusers] In OSX vtk window does not get the focus In-Reply-To: <20151113161834.484630440@mail.rogue-research.com> References: <20151113161834.484630440@mail.rogue-research.com> Message-ID: On Fri, Nov 13, 2015 at 9:18 AM, Sean McBride wrote: > On Thu, 12 Nov 2015 17:32:50 -0500, Eleftherios Garyfallidis said: > > >In OSX using vtk 6 or vtk 5 installed from anaconda the window does not > get > >the focus. > > This reminds me of vtk bug #2025, which I keep meaning to take a crack > at. Could you try this patch and see if it fixes your issue (I'm not sure > it will): > > > I tried it. Looks like it fixes the key events, but not the window-to-front issue. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: From guanw at rhpcs.mcmaster.ca Fri Nov 13 11:55:52 2015 From: guanw at rhpcs.mcmaster.ca (Weiguang guan) Date: Fri, 13 Nov 2015 11:55:52 -0500 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <1447432321076-5734971.post@n5.nabble.com> References: <56324268.7080701@rhpcs.mcmaster.ca> <5632525C.6000600@rhpcs.mcmaster.ca> <5632585A.4000005@rhpcs.mcmaster.ca> <1447432321076-5734971.post@n5.nabble.com> Message-ID: <56461618.5090102@rhpcs.mcmaster.ca> This was discussed a few weeks ago. The solution is to set the rendering order for the culler of the renderer to be back-to-front. It works only when the multiple volumes do not overlap in 3D space. HTH. Best, Weiguang On 13/11/2015 11:32 AM, dewarren wrote: > I would also be very interested in having the ability to render multiple > volumes, particularly for rendering structural and functional neuroimaging > data that overlap in the same space. The general idea has been discussed on > this list previously > (http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tt4829710.html#a4830288), > but it is not clear whether anyone has implemented the suggested approach in > VTK. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5734971.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From hsriniv2 at ncsu.edu Fri Nov 13 14:19:15 2015 From: hsriniv2 at ncsu.edu (harshad1) Date: Fri, 13 Nov 2015 12:19:15 -0700 (MST) Subject: [vtkusers] QT 5.5.1 and VTK 6.3 - implementing VTK in a GUi In-Reply-To: <1447404314048-5734959.post@n5.nabble.com> References: <1447404314048-5734959.post@n5.nabble.com> Message-ID: <1447442355760-5734977.post@n5.nabble.com> AFAIK there are two ways: 1. Add it manually in the source (this is my preference) > QVTKWidget * qvtkwidget = new QVTKWidget(); > myLayout->insertWidget(0,display,2); 2. There is an environment variable that you can set to get the vtk plugin to work in QtCreator/Designer. I don't remember the details but it shouldn't be hard to find. [ Post it here if you do :) ] -- View this message in context: http://vtk.1045678.n5.nabble.com/QT-5-5-1-and-VTK-6-3-implementing-VTK-in-a-GUi-tp5734959p5734977.html Sent from the VTK - Users mailing list archive at Nabble.com. From wumengda at gmail.com Fri Nov 13 14:46:02 2015 From: wumengda at gmail.com (Mengda Wu) Date: Fri, 13 Nov 2015 14:46:02 -0500 Subject: [vtkusers] Stream the output of vtkrenderwindow to a HTML5 browser Message-ID: Hi vtkusers, I am thinking to stream the output of vtkrenderwindow to a HTML5 browser. I hope to do an offscreen rendering on the server and stream it to a HTML5 browser on the client. Is this possible? Thanks, Mengda -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Sat Nov 14 11:33:14 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Sat, 14 Nov 2015 09:33:14 -0700 Subject: [vtkusers] Stream the output of vtkrenderwindow to a HTML5 browser In-Reply-To: References: Message-ID: Hi Mengda, I guess it depend what kind of data you want to stream. VTK web is already doing that by sending images through Websockets. There is even an option that will send the scene geometry which will let you interact with the scene locally inside your browser. There is several example in the VTK repository that show how to setup a server with a basic VTK application. Seb On Fri, Nov 13, 2015 at 12:46 PM, Mengda Wu wrote: > Hi vtkusers, > > I am thinking to stream the output of vtkrenderwindow to a HTML5 > browser. I hope to do an offscreen rendering on the server and stream it > to a HTML5 browser on the client. Is this possible? > > Thanks, > Mengda > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wumengda at gmail.com Sun Nov 15 15:38:03 2015 From: wumengda at gmail.com (Mengda Wu) Date: Sun, 15 Nov 2015 15:38:03 -0500 Subject: [vtkusers] Stream the output of vtkrenderwindow to a HTML5 browser In-Reply-To: References: Message-ID: Hi Sebastien, Thanks a lot for your reply. I just tried vtk-web with the Cone application. But I got some errors when I tested. I used Python 2.7.7 and VTK 6.3.0. I am not sure what's wrong. C:\Library\VTK\VTK-6.3.0\Build\bin\Release>.\vtkpython.exe C:\Library\VTK\VTK-6. 3.0\Build\Wrapping\Python\vtk\web\vtk_web_cone.py --content C:\Library\VTK\VTK-6 .3.0\Build\www\ --port 3800 2015-11-15 15:35:00-0500 [-] Log opened. 2015-11-15 15:35:01-0500 [-] Site starting on 3800 2015-11-15 15:35:01-0500 [-] Starting factory 2015-11-15 15:35:09-0500 [HTTPChannel,0,127.0.0.1] Unhandled Error Traceback (most recent call last): File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\protocols \basic.py", line 571, in dataReceived why = self.lineReceived(line) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. py", line 1656, in lineReceived self.allContentReceived() File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. py", line 1731, in allContentReceived req.requestReceived(command, path, version) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. py", line 827, in requestReceived self.process() --- --- File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve r.py", line 189, in process self.render(resrc) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve r.py", line 238, in render body = resrc.render(self) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\resou rce.py", line 250, in render return m(request) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati c.py", line 631, in render_GET producer.start() File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati c.py", line 710, in start self.request.registerProducer(self, False) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. py", line 873, in registerProducer self.transport.registerProducer(producer, streaming) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\internet\ abstract.py", line 112, in registerProducer producer.resumeProducing() File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati c.py", line 720, in resumeProducing self.request.write(data) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve r.py", line 217, in write http.Request.write(self, data) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. py", line 1002, in write value = networkString('%s' % (value,)) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\python\co mpat.py", line 364, in networkString raise TypeError("Can only pass-through bytes on Python 2") exceptions.TypeError: Can only pass-through bytes on Python 2 2015-11-15 15:35:09-0500 [HTTPChannel,0,127.0.0.1] Unhandled Error Traceback (most recent call last): File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve r.py", line 321, in processingFailed % webutil.formatFailure(reason)) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\util. py", line 425, in formatFailure flattenString(None, FailureElement(myFailure)).addBoth(result.append ) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat ten.py", line 420, in flattenString d = flatten(request, root, io.write) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat ten.py", line 402, in flatten _writeFlattenedData(state, write, result) --- --- File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat ten.py", line 359, in _writeFlattenedData element = state.next() File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat ten.py", line 326, in _flattenTree raise FlattenerError(e, roots, extract_tb(exc_info()[2])) twisted.web.error.FlattenerError: Exception while flattening: File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat ten.py", line 317, in _flattenTree element = stack[-1].next() File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat ten.py", line 286, in _flattenElement result = root.render(request) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_elem ent.py", line 184, in render return loader.load() File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\templ ate.py", line 465, in load self._loadedTemplate = self._loadDoc() File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\templ ate.py", line 446, in _loadDoc f = self._path.open('r') File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\python\fi lepath.py", line 828, in open return open(self.path, mode + 'b') IOError: [Errno 2] No such file or directory: 'C:\\Library\\VTK\\VTK-6.3 .0\\Build\\Wrapping\\Python\\twisted\\web\\failure.xhtml' Thanks, Guanglei On Sat, Nov 14, 2015 at 11:33 AM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > Hi Mengda, > > I guess it depend what kind of data you want to stream. > VTK web is already doing that by sending images through Websockets. > There is even an option that will send the scene geometry which will let > you interact with the scene locally inside your browser. > > There is several example in the VTK repository that show how to setup a > server with a basic VTK application. > > Seb > > On Fri, Nov 13, 2015 at 12:46 PM, Mengda Wu wrote: > >> Hi vtkusers, >> >> I am thinking to stream the output of vtkrenderwindow to a HTML5 >> browser. I hope to do an offscreen rendering on the server and stream it >> to a HTML5 browser on the client. Is this possible? >> >> Thanks, >> Mengda >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Sun Nov 15 16:43:30 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Sun, 15 Nov 2015 15:43:30 -0600 Subject: [vtkusers] Stream the output of vtkrenderwindow to a HTML5 browser In-Reply-To: References: Message-ID: It seems that you have a twisted version installed inside your system Python that conflict with the one provided within VTK. On Sun, Nov 15, 2015 at 2:38 PM, Mengda Wu wrote: > Hi Sebastien, > > Thanks a lot for your reply. I just tried vtk-web with the Cone > application. But I got some errors when I tested. I used Python 2.7.7 and > VTK 6.3.0. I am not sure what's wrong. > > C:\Library\VTK\VTK-6.3.0\Build\bin\Release>.\vtkpython.exe > C:\Library\VTK\VTK-6. > 3.0\Build\Wrapping\Python\vtk\web\vtk_web_cone.py --content > C:\Library\VTK\VTK-6 > .3.0\Build\www\ --port 3800 > 2015-11-15 15:35:00-0500 [-] Log opened. > 2015-11-15 15:35:01-0500 [-] Site starting on 3800 > 2015-11-15 15:35:01-0500 [-] Starting factory instance > at 0x0000000003E47F48> > 2015-11-15 15:35:09-0500 [HTTPChannel,0,127.0.0.1] Unhandled Error > Traceback (most recent call last): > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\protocols > \basic.py", line 571, in dataReceived > why = self.lineReceived(line) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. > py", line 1656, in lineReceived > self.allContentReceived() > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. > py", line 1731, in allContentReceived > req.requestReceived(command, path, version) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. > py", line 827, in requestReceived > self.process() > --- --- > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve > r.py", line 189, in process > self.render(resrc) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve > r.py", line 238, in render > body = resrc.render(self) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\resou > rce.py", line 250, in render > return m(request) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati > c.py", line 631, in render_GET > producer.start() > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati > c.py", line 710, in start > self.request.registerProducer(self, False) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. > py", line 873, in registerProducer > self.transport.registerProducer(producer, streaming) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\internet\ > abstract.py", line 112, in registerProducer > producer.resumeProducing() > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati > c.py", line 720, in resumeProducing > self.request.write(data) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve > r.py", line 217, in write > http.Request.write(self, data) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. > py", line 1002, in write > value = networkString('%s' % (value,)) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\python\co > mpat.py", line 364, in networkString > raise TypeError("Can only pass-through bytes on Python 2") > exceptions.TypeError: Can only pass-through bytes on Python 2 > > 2015-11-15 15:35:09-0500 [HTTPChannel,0,127.0.0.1] Unhandled Error > Traceback (most recent call last): > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve > r.py", line 321, in processingFailed > % webutil.formatFailure(reason)) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\util. > py", line 425, in formatFailure > flattenString(None, > FailureElement(myFailure)).addBoth(result.append > ) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat > ten.py", line 420, in flattenString > d = flatten(request, root, io.write) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat > ten.py", line 402, in flatten > _writeFlattenedData(state, write, result) > --- --- > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat > ten.py", line 359, in _writeFlattenedData > element = state.next() > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat > ten.py", line 326, in _flattenTree > raise FlattenerError(e, roots, extract_tb(exc_info()[2])) > twisted.web.error.FlattenerError: Exception while flattening: > > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat > ten.py", line 317, in _flattenTree > element = stack[-1].next() > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat > ten.py", line 286, in _flattenElement > result = root.render(request) > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_elem > ent.py", line 184, in render > return loader.load() > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\templ > ate.py", line 465, in load > self._loadedTemplate = self._loadDoc() > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\templ > ate.py", line 446, in _loadDoc > f = self._path.open('r') > File > "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\python\fi > lepath.py", line 828, in open > return open(self.path, mode + 'b') > IOError: [Errno 2] No such file or directory: > 'C:\\Library\\VTK\\VTK-6.3 > .0\\Build\\Wrapping\\Python\\twisted\\web\\failure.xhtml' > > Thanks, > Guanglei > > On Sat, Nov 14, 2015 at 11:33 AM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> Hi Mengda, >> >> I guess it depend what kind of data you want to stream. >> VTK web is already doing that by sending images through Websockets. >> There is even an option that will send the scene geometry which will let >> you interact with the scene locally inside your browser. >> >> There is several example in the VTK repository that show how to setup a >> server with a basic VTK application. >> >> Seb >> >> On Fri, Nov 13, 2015 at 12:46 PM, Mengda Wu wrote: >> >>> Hi vtkusers, >>> >>> I am thinking to stream the output of vtkrenderwindow to a HTML5 >>> browser. I hope to do an offscreen rendering on the server and stream it >>> to a HTML5 browser on the client. Is this possible? >>> >>> Thanks, >>> Mengda >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Sun Nov 15 16:52:38 2015 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Sun, 15 Nov 2015 15:52:38 -0600 Subject: [vtkusers] Stream the output of vtkrenderwindow to a HTML5 browser In-Reply-To: References: Message-ID: Oops sorry miss read the issue. VTK-Web is actually disabled on Windows as Twisted require an external library (api32.dll, I think). It is possible to make it run on Windows but not really validated and tested. You will have to install that dependency on your system. Moreover, could you list the content of that directory? (I want to make sure Twisted get installed on your system) C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\ Seb On Sun, Nov 15, 2015 at 3:43 PM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > It seems that you have a twisted version installed inside your system > Python that conflict with the one provided within VTK. > > On Sun, Nov 15, 2015 at 2:38 PM, Mengda Wu wrote: > >> Hi Sebastien, >> >> Thanks a lot for your reply. I just tried vtk-web with the Cone >> application. But I got some errors when I tested. I used Python 2.7.7 and >> VTK 6.3.0. I am not sure what's wrong. >> >> C:\Library\VTK\VTK-6.3.0\Build\bin\Release>.\vtkpython.exe >> C:\Library\VTK\VTK-6. >> 3.0\Build\Wrapping\Python\vtk\web\vtk_web_cone.py --content >> C:\Library\VTK\VTK-6 >> .3.0\Build\www\ --port 3800 >> 2015-11-15 15:35:00-0500 [-] Log opened. >> 2015-11-15 15:35:01-0500 [-] Site starting on 3800 >> 2015-11-15 15:35:01-0500 [-] Starting factory > instance >> at 0x0000000003E47F48> >> 2015-11-15 15:35:09-0500 [HTTPChannel,0,127.0.0.1] Unhandled Error >> Traceback (most recent call last): >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\protocols >> \basic.py", line 571, in dataReceived >> why = self.lineReceived(line) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. >> py", line 1656, in lineReceived >> self.allContentReceived() >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. >> py", line 1731, in allContentReceived >> req.requestReceived(command, path, version) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. >> py", line 827, in requestReceived >> self.process() >> --- --- >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve >> r.py", line 189, in process >> self.render(resrc) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve >> r.py", line 238, in render >> body = resrc.render(self) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\resou >> rce.py", line 250, in render >> return m(request) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati >> c.py", line 631, in render_GET >> producer.start() >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati >> c.py", line 710, in start >> self.request.registerProducer(self, False) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. >> py", line 873, in registerProducer >> self.transport.registerProducer(producer, streaming) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\internet\ >> abstract.py", line 112, in registerProducer >> producer.resumeProducing() >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati >> c.py", line 720, in resumeProducing >> self.request.write(data) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve >> r.py", line 217, in write >> http.Request.write(self, data) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. >> py", line 1002, in write >> value = networkString('%s' % (value,)) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\python\co >> mpat.py", line 364, in networkString >> raise TypeError("Can only pass-through bytes on Python 2") >> exceptions.TypeError: Can only pass-through bytes on Python 2 >> >> 2015-11-15 15:35:09-0500 [HTTPChannel,0,127.0.0.1] Unhandled Error >> Traceback (most recent call last): >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve >> r.py", line 321, in processingFailed >> % webutil.formatFailure(reason)) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\util. >> py", line 425, in formatFailure >> flattenString(None, >> FailureElement(myFailure)).addBoth(result.append >> ) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >> ten.py", line 420, in flattenString >> d = flatten(request, root, io.write) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >> ten.py", line 402, in flatten >> _writeFlattenedData(state, write, result) >> --- --- >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >> ten.py", line 359, in _writeFlattenedData >> element = state.next() >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >> ten.py", line 326, in _flattenTree >> raise FlattenerError(e, roots, extract_tb(exc_info()[2])) >> twisted.web.error.FlattenerError: Exception while flattening: >> >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >> ten.py", line 317, in _flattenTree >> element = stack[-1].next() >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >> ten.py", line 286, in _flattenElement >> result = root.render(request) >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_elem >> ent.py", line 184, in render >> return loader.load() >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\templ >> ate.py", line 465, in load >> self._loadedTemplate = self._loadDoc() >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\templ >> ate.py", line 446, in _loadDoc >> f = self._path.open('r') >> File >> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\python\fi >> lepath.py", line 828, in open >> return open(self.path, mode + 'b') >> IOError: [Errno 2] No such file or directory: >> 'C:\\Library\\VTK\\VTK-6.3 >> .0\\Build\\Wrapping\\Python\\twisted\\web\\failure.xhtml' >> >> Thanks, >> Guanglei >> >> On Sat, Nov 14, 2015 at 11:33 AM, Sebastien Jourdain < >> sebastien.jourdain at kitware.com> wrote: >> >>> Hi Mengda, >>> >>> I guess it depend what kind of data you want to stream. >>> VTK web is already doing that by sending images through Websockets. >>> There is even an option that will send the scene geometry which will let >>> you interact with the scene locally inside your browser. >>> >>> There is several example in the VTK repository that show how to setup a >>> server with a basic VTK application. >>> >>> Seb >>> >>> On Fri, Nov 13, 2015 at 12:46 PM, Mengda Wu wrote: >>> >>>> Hi vtkusers, >>>> >>>> I am thinking to stream the output of vtkrenderwindow to a HTML5 >>>> browser. I hope to do an offscreen rendering on the server and stream it >>>> to a HTML5 browser on the client. Is this possible? >>>> >>>> Thanks, >>>> Mengda >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From davideugenewarren+vtk at gmail.com Sun Nov 15 18:08:27 2015 From: davideugenewarren+vtk at gmail.com (dewarren) Date: Sun, 15 Nov 2015 16:08:27 -0700 (MST) Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <56461618.5090102@rhpcs.mcmaster.ca> References: <56324268.7080701@rhpcs.mcmaster.ca> <5632525C.6000600@rhpcs.mcmaster.ca> <5632585A.4000005@rhpcs.mcmaster.ca> <1447432321076-5734971.post@n5.nabble.com> <56461618.5090102@rhpcs.mcmaster.ca> Message-ID: <1447628907554-5734986.post@n5.nabble.com> Weiguang, thanks for the tip ? that's interesting. It's possible such a solution could work for my needs. Unfortunately, my first attempt to implement it didn't work. I think that the answer may lie in VTK's definition of a volume. Briefly, the back-to-front rendering solution could work for me depending on what the following means: "multiple volumes do not overlap in 3D space". If that means that two "volumes" (I'm using the term loosely because of my ignorance) can be rendered correctly so long as they don't occupy any common voxels, I think it can work. If it instead means that two volumes can be rendered correctly only so long as their bounding boxes do not intersect, then it won't work. For example, if I have a brain template and a map of a brain lesion on that template, I could create two arrays that represent the intact and lesioned parts of the brain, and then apply unique transfer functions to each for display (coloring the intact brain in grayscale and the lesion in red, say). The intact and lesioned brain regions would not overlap in space, but they would be adjacent, have a complex boundary, and have overlapping bounding boxes. Would it be possible to render this scene with VTK currently? Many thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5734986.html Sent from the VTK - Users mailing list archive at Nabble.com. From wumengda at gmail.com Sun Nov 15 19:01:43 2015 From: wumengda at gmail.com (Mengda Wu) Date: Sun, 15 Nov 2015 19:01:43 -0500 Subject: [vtkusers] Stream the output of vtkrenderwindow to a HTML5 browser In-Reply-To: References: Message-ID: Hi Sebastien, Thanks a lot for your reply. I think it might be some simple errors: (1) File "C:\Library\VTK\VTK-6.3.0\ Build\Wrapping\Python\twisted\python\co mpat.py", line 364, in networkString raise TypeError("Can only pass-through bytes on Python 2") exceptions.TypeError: Can only pass-through bytes on Python 2 (2) File "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\python\fi lepath.py", line 828, in open return open(self.path, mode + 'b') IOError: [Errno 2] No such file or directory: 'C:\\Library\\VTK\\VTK-6.3 .0\\Build\\Wrapping\\Python\\twisted\\web\\failure.xhtml' Here are the files under VTK-6.3.0\Build\Wrapping\Python\twisted: C:\Library\VTK\VTK-6.3.0\Build\bin\Release>dir C:\Library\VTK\VTK-6.3.0\Build\Wr apping\Python\twisted Volume in drive C is OS Volume Serial Number is 2400-6FCB Directory of C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted 11/15/2015 03:05 PM . 11/15/2015 03:05 PM .. 11/15/2015 03:05 PM application 11/15/2015 03:05 PM conch 09/01/2015 04:44 PM 1,507 copyright.py 11/15/2015 03:05 PM 1,630 copyright.pyc 11/15/2015 03:05 PM 1,630 copyright.pyo 11/15/2015 03:05 PM cred 11/15/2015 03:05 PM enterprise 11/15/2015 03:05 PM internet 11/15/2015 03:05 PM lore 11/15/2015 03:05 PM mail 11/15/2015 03:05 PM manhole 11/15/2015 03:05 PM names 11/15/2015 03:05 PM news 11/15/2015 03:05 PM pair 11/15/2015 03:05 PM persisted 09/01/2015 04:44 PM 8,534 plugin.py 11/15/2015 03:05 PM 8,080 plugin.pyc 11/15/2015 03:05 PM 8,080 plugin.pyo 11/15/2015 03:05 PM plugins 11/15/2015 03:05 PM positioning 11/15/2015 03:05 PM protocols 11/15/2015 03:05 PM python 11/15/2015 03:05 PM runner 11/15/2015 03:05 PM scripts 11/15/2015 03:05 PM spread 11/15/2015 03:05 PM tap 11/15/2015 03:05 PM test 11/15/2015 03:05 PM topfiles 11/15/2015 03:05 PM trial 11/15/2015 03:05 PM web 11/15/2015 03:05 PM words 09/01/2015 04:44 PM 266 _version.py 11/15/2015 03:05 PM 352 _version.pyc 11/15/2015 03:05 PM 352 _version.pyo 09/01/2015 04:44 PM 2,152 __init__.py 11/15/2015 03:05 PM 2,018 __init__.pyc 11/15/2015 03:05 PM 2,018 __init__.pyo 12 File(s) 36,619 bytes 27 Dir(s) 60,059,516,928 bytes free On Sun, Nov 15, 2015 at 4:52 PM, Sebastien Jourdain < sebastien.jourdain at kitware.com> wrote: > Oops sorry miss read the issue. > > VTK-Web is actually disabled on Windows as Twisted require an external > library (api32.dll, I think). > It is possible to make it run on Windows but not really validated and > tested. > > You will have to install that dependency on your system. > > Moreover, could you list the content of that directory? (I want to make > sure Twisted get installed on your system) > > C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\ > > Seb > > > On Sun, Nov 15, 2015 at 3:43 PM, Sebastien Jourdain < > sebastien.jourdain at kitware.com> wrote: > >> It seems that you have a twisted version installed inside your system >> Python that conflict with the one provided within VTK. >> >> On Sun, Nov 15, 2015 at 2:38 PM, Mengda Wu wrote: >> >>> Hi Sebastien, >>> >>> Thanks a lot for your reply. I just tried vtk-web with the Cone >>> application. But I got some errors when I tested. I used Python 2.7.7 and >>> VTK 6.3.0. I am not sure what's wrong. >>> >>> C:\Library\VTK\VTK-6.3.0\Build\bin\Release>.\vtkpython.exe >>> C:\Library\VTK\VTK-6. >>> 3.0\Build\Wrapping\Python\vtk\web\vtk_web_cone.py --content >>> C:\Library\VTK\VTK-6 >>> .3.0\Build\www\ --port 3800 >>> 2015-11-15 15:35:00-0500 [-] Log opened. >>> 2015-11-15 15:35:01-0500 [-] Site starting on 3800 >>> 2015-11-15 15:35:01-0500 [-] Starting factory >> instance >>> at 0x0000000003E47F48> >>> 2015-11-15 15:35:09-0500 [HTTPChannel,0,127.0.0.1] Unhandled Error >>> Traceback (most recent call last): >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\protocols >>> \basic.py", line 571, in dataReceived >>> why = self.lineReceived(line) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. >>> py", line 1656, in lineReceived >>> self.allContentReceived() >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. >>> py", line 1731, in allContentReceived >>> req.requestReceived(command, path, version) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. >>> py", line 827, in requestReceived >>> self.process() >>> --- --- >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve >>> r.py", line 189, in process >>> self.render(resrc) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve >>> r.py", line 238, in render >>> body = resrc.render(self) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\resou >>> rce.py", line 250, in render >>> return m(request) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati >>> c.py", line 631, in render_GET >>> producer.start() >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati >>> c.py", line 710, in start >>> self.request.registerProducer(self, False) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. >>> py", line 873, in registerProducer >>> self.transport.registerProducer(producer, streaming) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\internet\ >>> abstract.py", line 112, in registerProducer >>> producer.resumeProducing() >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\stati >>> c.py", line 720, in resumeProducing >>> self.request.write(data) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve >>> r.py", line 217, in write >>> http.Request.write(self, data) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\http. >>> py", line 1002, in write >>> value = networkString('%s' % (value,)) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\python\co >>> mpat.py", line 364, in networkString >>> raise TypeError("Can only pass-through bytes on Python 2") >>> exceptions.TypeError: Can only pass-through bytes on Python 2 >>> >>> 2015-11-15 15:35:09-0500 [HTTPChannel,0,127.0.0.1] Unhandled Error >>> Traceback (most recent call last): >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\serve >>> r.py", line 321, in processingFailed >>> % webutil.formatFailure(reason)) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\util. >>> py", line 425, in formatFailure >>> flattenString(None, >>> FailureElement(myFailure)).addBoth(result.append >>> ) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >>> ten.py", line 420, in flattenString >>> d = flatten(request, root, io.write) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >>> ten.py", line 402, in flatten >>> _writeFlattenedData(state, write, result) >>> --- --- >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >>> ten.py", line 359, in _writeFlattenedData >>> element = state.next() >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >>> ten.py", line 326, in _flattenTree >>> raise FlattenerError(e, roots, extract_tb(exc_info()[2])) >>> twisted.web.error.FlattenerError: Exception while flattening: >>> >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >>> ten.py", line 317, in _flattenTree >>> element = stack[-1].next() >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_flat >>> ten.py", line 286, in _flattenElement >>> result = root.render(request) >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\_elem >>> ent.py", line 184, in render >>> return loader.load() >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\templ >>> ate.py", line 465, in load >>> self._loadedTemplate = self._loadDoc() >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\web\templ >>> ate.py", line 446, in _loadDoc >>> f = self._path.open('r') >>> File >>> "C:\Library\VTK\VTK-6.3.0\Build\Wrapping\Python\twisted\python\fi >>> lepath.py", line 828, in open >>> return open(self.path, mode + 'b') >>> IOError: [Errno 2] No such file or directory: >>> 'C:\\Library\\VTK\\VTK-6.3 >>> .0\\Build\\Wrapping\\Python\\twisted\\web\\failure.xhtml' >>> >>> Thanks, >>> Guanglei >>> >>> On Sat, Nov 14, 2015 at 11:33 AM, Sebastien Jourdain < >>> sebastien.jourdain at kitware.com> wrote: >>> >>>> Hi Mengda, >>>> >>>> I guess it depend what kind of data you want to stream. >>>> VTK web is already doing that by sending images through Websockets. >>>> There is even an option that will send the scene geometry which will >>>> let you interact with the scene locally inside your browser. >>>> >>>> There is several example in the VTK repository that show how to setup a >>>> server with a basic VTK application. >>>> >>>> Seb >>>> >>>> On Fri, Nov 13, 2015 at 12:46 PM, Mengda Wu wrote: >>>> >>>>> Hi vtkusers, >>>>> >>>>> I am thinking to stream the output of vtkrenderwindow to a HTML5 >>>>> browser. I hope to do an offscreen rendering on the server and stream it >>>>> to a HTML5 browser on the client. Is this possible? >>>>> >>>>> Thanks, >>>>> Mengda >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sun Nov 15 20:06:59 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Mon, 16 Nov 2015 01:06:59 +0000 Subject: [vtkusers] VTK 6.3 in Qt Creator Message-ID: I have been using VTK 5.10 with Qt on Windows for some time, and now, somewhat against my better judgment, I've decided to try using VTK 6.3. Since I build my program with Qt Creator, from a .pro file, the way I do it (the only way I know) is by adding a list of library files, like this: LIBS += -LC:/VTK-VS10/lib/vtk-5.10 -lQVTK -lvtkRendering -lvtkGraphics -lvtkImaging -lvtkIO -lvtkFiltering -lvtkCommon \ -lvtkpng -lvtktiff -lvtkjpeg -lvtkexpat -lvfw32 -lopengl32 \ -lwsock32 -lvtksys -lws2_32 -lvtkexoIIc -lvtkNetCDF \ -lvtklibxml2 -lvtkzlib -lvtkalglib \ -lgdi32 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 After making a couple of code changes and changing the LIBS line to this: LIBS += -LC:/VTK-6.3.0-VS10/lib -lvtkGUISupportQT-6.3 -lvtkRenderingCore-6.3 -lvtkImagingCore-6.3 -lvtkIOCore-6.3 -lvtkFiltersCore-6.3 -lvtkCommonCore-6.3 \ -lvtkpng-6.3 -lvtktiff-6.3 -lvtkjpeg-6.3 -lvtkexpat-6.3 -lvtksys-6.3 -lvtkexoIIc-6.3 -lvtkNetCDF-6.3 -lvtklibxml2-6.3 -lvtkzlib-6.3 -lvtkalglib-6.3 \ -lvtkRenderingQT-6.3 \ -lws2_32 -lwsock32 -lvfw32 -lopengl32 -lgdi32 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 I am almost successful - no compile errors and only 189 unresolved externals ;) There must be a better way. What is the recommended procedure for using Qt Creator to build a Qt program that uses VTK? If what I am doing is the only way, what am I missing? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsriniv2 at ncsu.edu Sun Nov 15 20:50:42 2015 From: hsriniv2 at ncsu.edu (harshad1) Date: Sun, 15 Nov 2015 18:50:42 -0700 (MST) Subject: [vtkusers] VTK 6.3 in Qt Creator In-Reply-To: References: Message-ID: <1447638642502-5734990.post@n5.nabble.com> For what it's worth, I gave up on this after an hour of trying and switched to cmake. Haven't looked back since... -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-6-3-in-Qt-Creator-tp5734989p5734990.html Sent from the VTK - Users mailing list archive at Nabble.com. From g.bogle at auckland.ac.nz Sun Nov 15 20:54:15 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Mon, 16 Nov 2015 01:54:15 +0000 Subject: [vtkusers] VTK 6.3 in Qt Creator In-Reply-To: <1447638642502-5734990.post@n5.nabble.com> References: , <1447638642502-5734990.post@n5.nabble.com> Message-ID: I use cmake everywhere except for building Qt programs, so I understand what you are saying. I really like Qt Creator, though. I have linked a lot more libraries, and now I'm down to only 3 unresolved externals: vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved external symbol "public: static class vtkExtractSelectedFrustum * __cdecl vtkExtractSelectedFrustum::New(void)" (?New at vtkExtractSelectedFrustum@@SAPAV1 at XZ) referenced in function "protected: __thiscall vtkAreaPicker::vtkAreaPicker(void)" (??0vtkAreaPicker@@IAE at XZ) vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved external symbol "public: void __thiscall vtkExtractSelectedFrustum::CreateFrustum(double * const)" (?CreateFrustum at vtkExtractSelectedFrustum@@QAEXQAN at Z) referenced in function "protected: void __thiscall vtkAreaPicker::DefineFrustum(double,double,double,double,class vtkRenderer *)" (?DefineFrustum at vtkAreaPicker@@IAEXNNNNPAVvtkRenderer@@@Z) vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved external symbol "public: int __thiscall vtkExtractSelectedFrustum::OverallBoundsTest(double *)" (?OverallBoundsTest at vtkExtractSelectedFrustum@@QAEHPAN at Z) referenced in function "protected: int __thiscall vtkAreaPicker::ABoxFrustumIsect(double * const,double &)" (?ABoxFrustumIsect at vtkAreaPicker@@IAEHQANAAN at Z) release\scell_GUI.exe : fatal error LNK1120: 3 unresolved externals I'm trying to track down the required library. ________________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of harshad1 [hsriniv2 at ncsu.edu] Sent: Monday, 16 November 2015 2:50 p.m. To: vtkusers at vtk.org Subject: Re: [vtkusers] VTK 6.3 in Qt Creator For what it's worth, I gave up on this after an hour of trying and switched to cmake. Haven't looked back since... -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-6-3-in-Qt-Creator-tp5734989p5734990.html Sent from the VTK - Users mailing list archive at Nabble.com. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From g.bogle at auckland.ac.nz Sun Nov 15 20:58:07 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Mon, 16 Nov 2015 01:58:07 +0000 Subject: [vtkusers] VTK 6.3 in Qt Creator In-Reply-To: References: , <1447638642502-5734990.post@n5.nabble.com>, Message-ID: Getting there ... the linking now completes without error. But when I run the program I get this: Generic Warning: In ..\..\..\VTK-6.3.0\Rendering\Core\vtkRenderer.cxx, line 46 Error: no override found for 'vtkRenderer'. Generic Warning: In ..\..\..\VTK-6.3.0\Rendering\Core\vtkRenderWindow.cxx, line 40 Error: no override found for 'vtkRenderWindow'. Can some kind soul explain what this means? Thanks Gib ________________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Gib Bogle [g.bogle at auckland.ac.nz] Sent: Monday, 16 November 2015 2:54 p.m. To: harshad1; vtkusers at vtk.org Subject: [FORGED] Re: [vtkusers] VTK 6.3 in Qt Creator I use cmake everywhere except for building Qt programs, so I understand what you are saying. I really like Qt Creator, though. I have linked a lot more libraries, and now I'm down to only 3 unresolved externals: vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved external symbol "public: static class vtkExtractSelectedFrustum * __cdecl vtkExtractSelectedFrustum::New(void)" (?New at vtkExtractSelectedFrustum@@SAPAV1 at XZ) referenced in function "protected: __thiscall vtkAreaPicker::vtkAreaPicker(void)" (??0vtkAreaPicker@@IAE at XZ) vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved external symbol "public: void __thiscall vtkExtractSelectedFrustum::CreateFrustum(double * const)" (?CreateFrustum at vtkExtractSelectedFrustum@@QAEXQAN at Z) referenced in function "protected: void __thiscall vtkAreaPicker::DefineFrustum(double,double,double,double,class vtkRenderer *)" (?DefineFrustum at vtkAreaPicker@@IAEXNNNNPAVvtkRenderer@@@Z) vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved external symbol "public: int __thiscall vtkExtractSelectedFrustum::OverallBoundsTest(double *)" (?OverallBoundsTest at vtkExtractSelectedFrustum@@QAEHPAN at Z) referenced in function "protected: int __thiscall vtkAreaPicker::ABoxFrustumIsect(double * const,double &)" (?ABoxFrustumIsect at vtkAreaPicker@@IAEHQANAAN at Z) release\scell_GUI.exe : fatal error LNK1120: 3 unresolved externals I'm trying to track down the required library. ________________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of harshad1 [hsriniv2 at ncsu.edu] Sent: Monday, 16 November 2015 2:50 p.m. To: vtkusers at vtk.org Subject: Re: [vtkusers] VTK 6.3 in Qt Creator For what it's worth, I gave up on this after an hour of trying and switched to cmake. Haven't looked back since... -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-6-3-in-Qt-Creator-tp5734989p5734990.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 _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From david.gobbi at gmail.com Sun Nov 15 21:10:58 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 15 Nov 2015 19:10:58 -0700 Subject: [vtkusers] VTK 6.3 in Qt Creator In-Reply-To: References: <1447638642502-5734990.post@n5.nabble.com> Message-ID: Hi Gib, The error might go away if you link to the vtkRenderingOpenGL library. For more info, see the following web page: http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines I set up one of the students here to use QtCreator with a cmake project, and it worked quite well (especially because it allowed the student to use the Qt graphical debugger). The cmake/QtCreator combination is not as straightforward as qmake/QtCreator, but it's probably a better solution for VTK apps. - David On Sun, Nov 15, 2015 at 6:58 PM, Gib Bogle wrote: > Getting there ... the linking now completes without error. But when I run > the program I get this: > > Generic Warning: In ..\..\..\VTK-6.3.0\Rendering\Core\vtkRenderer.cxx, > line 46 > Error: no override found for 'vtkRenderer'. > > Generic Warning: In ..\..\..\VTK-6.3.0\Rendering\Core\vtkRenderWindow.cxx, > line 40 > Error: no override found for 'vtkRenderWindow'. > > Can some kind soul explain what this means? > > Thanks > Gib > ________________________________________ > From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Gib Bogle [ > g.bogle at auckland.ac.nz] > Sent: Monday, 16 November 2015 2:54 p.m. > To: harshad1; vtkusers at vtk.org > Subject: [FORGED] Re: [vtkusers] VTK 6.3 in Qt Creator > > I use cmake everywhere except for building Qt programs, so I understand > what you are saying. I really like Qt Creator, though. > > I have linked a lot more libraries, and now I'm down to only 3 unresolved > externals: > > vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved > external symbol "public: static class vtkExtractSelectedFrustum * __cdecl > vtkExtractSelectedFrustum::New(void)" (?New at vtkExtractSelectedFrustum > @@SAPAV1 at XZ) referenced in function "protected: __thiscall > vtkAreaPicker::vtkAreaPicker(void)" (??0vtkAreaPicker@@IAE at XZ) > vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved > external symbol "public: void __thiscall > vtkExtractSelectedFrustum::CreateFrustum(double * const)" > (?CreateFrustum at vtkExtractSelectedFrustum@@QAEXQAN at Z) referenced in > function "protected: void __thiscall > vtkAreaPicker::DefineFrustum(double,double,double,double,class vtkRenderer > *)" (?DefineFrustum at vtkAreaPicker@@IAEXNNNNPAVvtkRenderer@@@Z) > vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved > external symbol "public: int __thiscall > vtkExtractSelectedFrustum::OverallBoundsTest(double *)" > (?OverallBoundsTest at vtkExtractSelectedFrustum@@QAEHPAN at Z) referenced in > function "protected: int __thiscall vtkAreaPicker::ABoxFrustumIsect(double > * const,double &)" (?ABoxFrustumIsect at vtkAreaPicker@@IAEHQANAAN at Z) > release\scell_GUI.exe : fatal error LNK1120: 3 unresolved externals > > I'm trying to track down the required library. > ________________________________________ > From: vtkusers [vtkusers-bounces at vtk.org] on behalf of harshad1 [ > hsriniv2 at ncsu.edu] > Sent: Monday, 16 November 2015 2:50 p.m. > To: vtkusers at vtk.org > Subject: Re: [vtkusers] VTK 6.3 in Qt Creator > > For what it's worth, I gave up on this after an hour of trying and switched > to cmake. Haven't looked back since... > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/VTK-6-3-in-Qt-Creator-tp5734989p5734990.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 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sun Nov 15 21:43:01 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Mon, 16 Nov 2015 02:43:01 +0000 Subject: [vtkusers] VTK 6.3 in Qt Creator In-Reply-To: References: <1447638642502-5734990.post@n5.nabble.com> , Message-ID: Hi David, On this page http://www.vtk.org/Wiki/VTK/Build_System_Migration#How_Implementation_Modules_Are_Initialized I found these lines #include VTK_MODULE_INIT(vtkRenderingOpenGL); VTK_MODULE_INIT(vtkInteractionStyle); which when added to the source file using VTK solved the problem. I confess it's beyond my level of C++ understanding, so this was just luck. I'll take it, though. Cheers Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Monday, 16 November 2015 3:10 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] VTK 6.3 in Qt Creator Hi Gib, The error might go away if you link to the vtkRenderingOpenGL library. For more info, see the following web page: http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines I set up one of the students here to use QtCreator with a cmake project, and it worked quite well (especially because it allowed the student to use the Qt graphical debugger). The cmake/QtCreator combination is not as straightforward as qmake/QtCreator, but it's probably a better solution for VTK apps. - David On Sun, Nov 15, 2015 at 6:58 PM, Gib Bogle > wrote: Getting there ... the linking now completes without error. But when I run the program I get this: Generic Warning: In ..\..\..\VTK-6.3.0\Rendering\Core\vtkRenderer.cxx, line 46 Error: no override found for 'vtkRenderer'. Generic Warning: In ..\..\..\VTK-6.3.0\Rendering\Core\vtkRenderWindow.cxx, line 40 Error: no override found for 'vtkRenderWindow'. Can some kind soul explain what this means? Thanks Gib ________________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Gib Bogle [g.bogle at auckland.ac.nz] Sent: Monday, 16 November 2015 2:54 p.m. To: harshad1; vtkusers at vtk.org Subject: [FORGED] Re: [vtkusers] VTK 6.3 in Qt Creator I use cmake everywhere except for building Qt programs, so I understand what you are saying. I really like Qt Creator, though. I have linked a lot more libraries, and now I'm down to only 3 unresolved externals: vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved external symbol "public: static class vtkExtractSelectedFrustum * __cdecl vtkExtractSelectedFrustum::New(void)" (?New at vtkExtractSelectedFrustum@@SAPAV1 at XZ) referenced in function "protected: __thiscall vtkAreaPicker::vtkAreaPicker(void)" (??0vtkAreaPicker@@IAE at XZ) vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved external symbol "public: void __thiscall vtkExtractSelectedFrustum::CreateFrustum(double * const)" (?CreateFrustum at vtkExtractSelectedFrustum@@QAEXQAN at Z) referenced in function "protected: void __thiscall vtkAreaPicker::DefineFrustum(double,double,double,double,class vtkRenderer *)" (?DefineFrustum at vtkAreaPicker@@IAEXNNNNPAVvtkRenderer@@@Z) vtkRenderingCore-6.3.lib(vtkAreaPicker.obj) : error LNK2019: unresolved external symbol "public: int __thiscall vtkExtractSelectedFrustum::OverallBoundsTest(double *)" (?OverallBoundsTest at vtkExtractSelectedFrustum@@QAEHPAN at Z) referenced in function "protected: int __thiscall vtkAreaPicker::ABoxFrustumIsect(double * const,double &)" (?ABoxFrustumIsect at vtkAreaPicker@@IAEHQANAAN at Z) release\scell_GUI.exe : fatal error LNK1120: 3 unresolved externals I'm trying to track down the required library. ________________________________________ From: vtkusers [vtkusers-bounces at vtk.org] on behalf of harshad1 [hsriniv2 at ncsu.edu] Sent: Monday, 16 November 2015 2:50 p.m. To: vtkusers at vtk.org Subject: Re: [vtkusers] VTK 6.3 in Qt Creator For what it's worth, I gave up on this after an hour of trying and switched to cmake. Haven't looked back since... -- View this message in context: http://vtk.1045678.n5.nabble.com/VTK-6-3-in-Qt-Creator-tp5734989p5734990.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 _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sun Nov 15 22:17:01 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Mon, 16 Nov 2015 03:17:01 +0000 Subject: [vtkusers] vtkImageData problem Message-ID: Having got my program to build and run with VTK-6.3, I am now encountering a problem with its behaviour. The 3D display of the scene is working fine, but code that captures the image (for creating a video) is failing. Previously I have been doing this with VTK-5.10: id = vtkImageData::New(); id = w2i->GetOutput(); w2i->Modified(); id->Update(); imwidth = id->GetDimensions()[0]; imheight = id->GetDimensions()[1]; if (imwidth == 0) { LOG_QMSG("ERROR: recorder: vtkImageData dimension = 0"); exit(1); } To get this to compile now I have to comment out the id->Update(). When the program executes it stops with the error that imwidth=0. Should I replace id->Update() with something else? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Sun Nov 15 22:24:11 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Sun, 15 Nov 2015 20:24:11 -0700 Subject: [vtkusers] vtkImageData problem In-Reply-To: References: Message-ID: In VTK 6 the data objects don't have an Update method. You have to call Update on the filter that generates the data. w2i->Modified(); w2i->Update(); id = w2i->GetOutput(); On an unrelated note, did you mean to do a DeepCopy here? id = vtkImageData::New(); id = w2i->GetOutput(); - David On Sun, Nov 15, 2015 at 8:17 PM, Gib Bogle wrote: > Having got my program to build and run with VTK-6.3, I am now encountering > a problem with its behaviour. The 3D display of the scene is working fine, > but code that captures the image (for creating a video) is failing. > > Previously I have been doing this with VTK-5.10: > > id = vtkImageData::New(); > > id = w2i->GetOutput(); > > w2i->Modified(); > > id->Update(); > > imwidth = id->GetDimensions()[0]; > > imheight = id->GetDimensions()[1]; > > if (imwidth == 0) { > > LOG_QMSG("ERROR: recorder: vtkImageData dimension = 0"); > > exit(1); > > } > > To get this to compile now I have to comment out the id->Update(). When the program executes it stops with the error that imwidth=0. > > Should I replace id->Update() with something else? > > Thanks > Gib > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sun Nov 15 22:31:16 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Mon, 16 Nov 2015 03:31:16 +0000 Subject: [vtkusers] vtkImageData problem In-Reply-To: References: , Message-ID: Thanks David, that works. As to whether I mean to do a DeepCopy - you tell me. I know just enough to be dangerous. What would you do? Cheers Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Monday, 16 November 2015 4:24 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkImageData problem In VTK 6 the data objects don't have an Update method. You have to call Update on the filter that generates the data. w2i->Modified(); w2i->Update(); id = w2i->GetOutput(); On an unrelated note, did you mean to do a DeepCopy here? id = vtkImageData::New(); id = w2i->GetOutput(); - David On Sun, Nov 15, 2015 at 8:17 PM, Gib Bogle > wrote: Having got my program to build and run with VTK-6.3, I am now encountering a problem with its behaviour. The 3D display of the scene is working fine, but code that captures the image (for creating a video) is failing. Previously I have been doing this with VTK-5.10: id = vtkImageData::New(); id = w2i->GetOutput(); w2i->Modified(); id->Update(); imwidth = id->GetDimensions()[0]; imheight = id->GetDimensions()[1]; if (imwidth == 0) { LOG_QMSG("ERROR: recorder: vtkImageData dimension = 0"); exit(1); } To get this to compile now I have to comment out the id->Update(). When the program executes it stops with the error that imwidth=0. Should I replace id->Update() with something else? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Sun Nov 15 22:44:57 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Mon, 16 Nov 2015 03:44:57 +0000 Subject: [vtkusers] vtkImageData problem In-Reply-To: References: , Message-ID: OK, it clicked. I realised that this line is not needed: id = vtkImageData::New(); I commented it out and it still works fine, and presumably a bit faster. Thanks Gib ________________________________ From: David Gobbi [david.gobbi at gmail.com] Sent: Monday, 16 November 2015 4:24 p.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] vtkImageData problem In VTK 6 the data objects don't have an Update method. You have to call Update on the filter that generates the data. w2i->Modified(); w2i->Update(); id = w2i->GetOutput(); On an unrelated note, did you mean to do a DeepCopy here? id = vtkImageData::New(); id = w2i->GetOutput(); - David On Sun, Nov 15, 2015 at 8:17 PM, Gib Bogle > wrote: Having got my program to build and run with VTK-6.3, I am now encountering a problem with its behaviour. The 3D display of the scene is working fine, but code that captures the image (for creating a video) is failing. Previously I have been doing this with VTK-5.10: id = vtkImageData::New(); id = w2i->GetOutput(); w2i->Modified(); id->Update(); imwidth = id->GetDimensions()[0]; imheight = id->GetDimensions()[1]; if (imwidth == 0) { LOG_QMSG("ERROR: recorder: vtkImageData dimension = 0"); exit(1); } To get this to compile now I have to comment out the id->Update(). When the program executes it stops with the error that imwidth=0. Should I replace id->Update() with something else? Thanks Gib -------------- next part -------------- An HTML attachment was scrubbed... URL: From nico.schloemer at gmail.com Mon Nov 16 04:19:05 2015 From: nico.schloemer at gmail.com (=?UTF-8?Q?Nico_Schl=C3=B6mer?=) Date: Mon, 16 Nov 2015 09:19:05 +0000 Subject: [vtkusers] build with all modules except XYZ Message-ID: Hi everyone, I'd like to build VTK with all modules except a specific one. What's the CMake configuration for this? I've tried ``` -DVTK_BUILD_ALL_MODULES=ON \ -DModule_vtkIOXdmf3=OFF \ ``` to no avail: ``` -- * vtkIOXdmf3, requested by VTK_BUILD_ALL_MODULES. ``` Cheers, Nico -------------- next part -------------- An HTML attachment was scrubbed... URL: From yassminabdallah at gmail.com Mon Nov 16 04:39:41 2015 From: yassminabdallah at gmail.com (YassminAbdallah) Date: Mon, 16 Nov 2015 02:39:41 -0700 (MST) Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: References: <1446574655186-5734785.post@n5.nabble.com> <1446575267247-5734789.post@n5.nabble.com> <1446576271014-5734792.post@n5.nabble.com> <4db65c0a9c2aa6eea5bb238e374cf65f@mail.gmail.com> <1446578514323-5734796.post@n5.nabble.com> Message-ID: <1447666781275-5735000.post@n5.nabble.com> Hello good day, I try the volume rendering example in both simulator and iPhone 6 and i still get those errors message, for the first 'if' in the example i got those two error, //////////////////////// ERROR: In /Users/desktop/VTKBin/vtk/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, line 850 vtkOpenGLPolyDataMapper2D (0x156517f20): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Unknown error ERROR: In /Users/desktop/VTKBin/vtk/Rendering/OpenGL2/vtkTextureObject.cxx, line 554 vtkTextureObject (0x174195950): failed at glBindTexture(0) 1 OpenGL errors detected 0 : (1286) Unknown error //////////////////////// and for the 'else' i just change the data format to DICOM image and i got those three errors, //////////////////////// ERROR: In /Users/desktop/VTKBin/vtk/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, line 850 vtkOpenGLPolyDataMapper2D (0x156d201d0): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Unknown error ERROR: In /Users/desktop/VTKBin/vtk/Rendering/OpenGL2/vtkTextureObject.cxx, line 1485 vtkTextureObject (0x170199f30): failed at glTexImage2D 1 OpenGL errors detected 0 : (1282) Invalid operation ERROR: In /Users/desktop/VTKBin/vtk/Rendering/OpenGL2/vtkTextureObject.cxx, line 554 vtkTextureObject (0x170199f30): failed at glBindTexture(0) 1 OpenGL errors detected 0 : (1286) Unknown error //////////////////////// any help please ? -- View this message in context: http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5735000.html Sent from the VTK - Users mailing list archive at Nabble.com. From hugues.digonnet at ec-nantes.fr Mon Nov 16 04:51:38 2015 From: hugues.digonnet at ec-nantes.fr (Hugues Digonnet) Date: Mon, 16 Nov 2015 10:51:38 +0100 Subject: [vtkusers] ghost cells in pvtu files Message-ID: <5649A72A.8030202@ec-nantes.fr> Hi all, I am using unstructured grid in parallel (basically using pvtu file). I look to ghost cells to suppress some visualization artifact at inter sub-domains boundaries (specially when using some some inside operator) But as far as I have searched, I don't see any cases using ghost cells with unstructured grid. I seem that you only define a level of ghost cell and VTK build it. (at least for rectangular grid). Is there a way for unstructured grid to define this level ? Or could it be possible to let the application writing vtu files including ghost cells and use a flag to determine if a cell is a real or ghost one ? This last way seems OK for me (user application point of view) but i wondering if this option is present into VTK and pvtu file format ? Any helps will be welcome. Best regards, Hugues Digonnet -- Hugues Digonnet ICI - ECN Ecole Centrale de Nantes 1 Rue de la No?, 44300 Nantes tel: +33 (0)2 40 37 15 99 From simon.esneault at gmail.com Mon Nov 16 06:08:44 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Mon, 16 Nov 2015 12:08:44 +0100 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: Hello, Trying to solve this problem, I found out that if one call "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a string with a vtkTextActor, the text is properly rendered with a yellow dot at the anchor point, and with a transparent gray background. - DebugTexturesOn : http://picpaste.com/pics/Blurred.1447668943.PNG - DebugTexturesOff : http://picpaste.com/pics/Not-Blurred.1447669009.PNG Now digging into the code in vtkFreeTypeTools.cxx, I suspect this is a blending problem. When we activate Texture Debugging, a gray background is first drawn, and after that in the method RenderCharacter( ... ) line 1887; we either blend the rendered text with the background or not. Attached is a diff file that solves the problem for me. I do not really understand why, so maybe a developer with more VTK's knowledge can integrate this properly :) Thanks, Simon 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT : > Hi All, > > All vtkTextActor are rendered blurred when using with > vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the > new rendering backend. > > Here are some snapshots : > - OpenGL1 > - OpenGL2 > > Attached some code that reproduces the problem, to be used with this > volume. Visible on > OSX and Windows to our knowledge, probably on more OS. > > The text is rendered properly when used with the old backend or when using > a vtkGPUVolumeRayCastMapper instead of the vtkFixedPointVolumeRayCastMapper. > > Shall I feel a bug, is this a known issue ? > > Thanks, > Simon > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- --- a/Rendering/FreeType/vtkFreeTypeTools.cxx Mon Nov 16 12:00:48 2015 +++ b/Rendering/FreeType/vtkFreeTypeTools.cxx Mon Nov 16 11:59:16 2015 @@ -1974,14 +1974,14 @@ } else { - *ptr = fgRGB[0]; - ++ptr; - *ptr = fgRGB[1]; - ++ptr; - *ptr = fgRGB[2]; - ++ptr; - *ptr = static_cast((*glyphPtr) * fgA); - ++ptr; + const float fg_blend = fgA * (*glyphPtr / 255.f); + + ptr[0] = static_cast(fg_blend * fgRGB[0]); + ptr[1] = static_cast(fg_blend * fgRGB[1]); + ptr[2] = static_cast(fg_blend * fgRGB[2]); + ptr[3] = static_cast(fg_blend * 255.f); + + ptr += 4; } ++glyphPtr; } From ken.martin at kitware.com Mon Nov 16 07:51:06 2015 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 16 Nov 2015 07:51:06 -0500 Subject: [vtkusers] Volume Rendering in iOS In-Reply-To: <1447666781275-5735000.post@n5.nabble.com> References: <1446574655186-5734785.post@n5.nabble.com> <1446575267247-5734789.post@n5.nabble.com> <1446576271014-5734792.post@n5.nabble.com> <4db65c0a9c2aa6eea5bb238e374cf65f@mail.gmail.com> <1446578514323-5734796.post@n5.nabble.com> <1447666781275-5735000.post@n5.nabble.com> Message-ID: OSX XCode comes with tools that will show specifically what OpenGL call is producing the error. They are under XCode menu/ "Open Developer Tool" / Instruments / OpenGL ES. Try working with that to nail down the specific OpenGL call that is producing the problem. Thanks Ken On Mon, Nov 16, 2015 at 4:39 AM, YassminAbdallah wrote: > Hello good day, > > > I try the volume rendering example in both simulator and iPhone 6 and i > still get those errors message, > > for the first 'if' in the example i got those two error, > > //////////////////////// > ERROR: In > /Users/desktop/VTKBin/vtk/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, > line 850 > vtkOpenGLPolyDataMapper2D (0x156517f20): failed after RenderOverlay 1 > OpenGL > errors detected > 0 : (1286) Unknown error > > > ERROR: In /Users/desktop/VTKBin/vtk/Rendering/OpenGL2/vtkTextureObject.cxx, > line 554 > vtkTextureObject (0x174195950): failed at glBindTexture(0) 1 OpenGL errors > detected > 0 : (1286) Unknown error > > > //////////////////////// > > > and for the 'else' i just change the data format to DICOM image and i got > those three errors, > > //////////////////////// > ERROR: In > /Users/desktop/VTKBin/vtk/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, > line 850 > vtkOpenGLPolyDataMapper2D (0x156d201d0): failed after RenderOverlay 1 > OpenGL > errors detected > 0 : (1286) Unknown error > > > ERROR: In /Users/desktop/VTKBin/vtk/Rendering/OpenGL2/vtkTextureObject.cxx, > line 1485 > vtkTextureObject (0x170199f30): failed at glTexImage2D 1 OpenGL errors > detected > 0 : (1282) Invalid operation > > > ERROR: In /Users/desktop/VTKBin/vtk/Rendering/OpenGL2/vtkTextureObject.cxx, > line 554 > vtkTextureObject (0x170199f30): failed at glBindTexture(0) 1 OpenGL errors > detected > 0 : (1286) Unknown error > //////////////////////// > > any help please ? > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Volume-Rendering-in-iOS-tp5734785p5735000.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 > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcinadamczyk at ortosoft.eu Mon Nov 16 09:24:53 2015 From: marcinadamczyk at ortosoft.eu (marcinadamczyk at ortosoft.eu) Date: Mon, 16 Nov 2015 15:24:53 +0100 Subject: [vtkusers] Bare OpenGL 2.1 support Message-ID: Hello, Our company develops an application which uses VTK. We recently upgraded to VTK 6.3 and wanted to use the new OpenGL2 renderer. We tried running it on a machine with OGL 2.1 support, but without EXT_gpu_shader4 extension (no hardware OGL3.x support) - and we (unsurprisingly) failed, as VTK's shader code has hard-coded requirement for that extension. Scenes rendered by our software use simple one-light lighting and transculency with depth peeling enabled. According to our understanding, it should be able to run on OpenGL 2.1 hardware (as it ran fine on VTK's OGL 1.1 renderer). We tried removing the "#extension GL_EXT_gpu_shader4 : require\n" line from 1.2 shader source. Shader compilation succedeed on test mashine after that, but shader linking failed with an following error: "Fragment shader uses varying gl_FrontFacing but vertex shader does not write to it.". I have the following questions related to our problems: Can the lack of OpenGL2 renderer support for pure 2.1 hardware be considered as a bug, or is it by design? Is OpenGL2 renderer support for OpenGL 2.1 hardware (without EXT_gpu_shader4 extension) planned for future VTK releases? If not, in the case we wanted to introduce slight modifications into VTK's code to run the aforementioned software built with OpenGL2 renderer and on 2.1 hardware, would it be possible? Best regards, Marcin Adamczyk From aashish.chaudhary at kitware.com Mon Nov 16 10:11:41 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 16 Nov 2015 10:11:41 -0500 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: Simon, Thanks for the report. I will follow up with other developers on this bug. - Aashish On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT wrote: > Hello, > > Trying to solve this problem, I found out that if one call > "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a > string with a vtkTextActor, the text is properly rendered with a yellow dot > at the anchor point, and with a transparent gray background. > - DebugTexturesOn : http://picpaste.com/pics/Blurred.1447668943.PNG > - DebugTexturesOff : http://picpaste.com/pics/Not-Blurred.1447669009.PNG > > Now digging into the code in vtkFreeTypeTools.cxx, I suspect this is a > blending problem. When we activate Texture Debugging, a gray background is > first drawn, and after that in the method RenderCharacter( ... ) line 1887; > we either blend the rendered text with the background or not. > > Attached is a diff file that solves the problem for me. I do not really > understand why, so maybe a developer with more VTK's knowledge can > integrate this properly :) > > Thanks, > Simon > > > > 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT : > >> Hi All, >> >> All vtkTextActor are rendered blurred when using with >> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >> new rendering backend. >> >> Here are some snapshots : >> - OpenGL1 >> - OpenGL2 >> >> Attached some code that reproduces the problem, to be used with this >> volume. Visible >> on OSX and Windows to our knowledge, probably on more OS. >> >> The text is rendered properly when used with the old backend or when >> using a vtkGPUVolumeRayCastMapper instead of >> the vtkFixedPointVolumeRayCastMapper. >> >> Shall I feel a bug, is this a known issue ? >> >> Thanks, >> Simon >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Mon Nov 16 10:18:39 2015 From: ken.martin at kitware.com (Ken Martin) Date: Mon, 16 Nov 2015 10:18:39 -0500 Subject: [vtkusers] Bare OpenGL 2.1 support In-Reply-To: References: Message-ID: I believe standard OpenGL 2.1 includes gl_FrontFacing so I'm not sure why your system failed to link on that, maybe a driver bug? Having OpenGL 2.1 without gpu_shader4 means a fair bit of the new rendering engine will not work. I have no plans to support OpenGL 2.1 without gpu_shader4 as that combination just lacks too many key features that have been introduced in the past nine years. I would like to drop 2.1 entirely as OpenGL 3.2 has been out for five or so years and there are features in 3.2 I would like to rely on. But I do understand that sometimes you do not have a choice and are stuck with an old driver or system so I am trying to keep an eye out for how often this happens. The old backend is still there and working so for old systems the old backend should work as one option. And yes, I am certainly open to any changes that enable better 2.1 support without adding much code complexity as that is a win-win for everyone. Thanks Ken Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 ken.martin at kitware.com 919 869-8871 (w) 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. -----Original Message----- From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of marcinadamczyk at ortosoft.eu Sent: Monday, November 16, 2015 9:25 AM To: vtkusers at vtk.org Subject: [vtkusers] Bare OpenGL 2.1 support Hello, Our company develops an application which uses VTK. We recently upgraded to VTK 6.3 and wanted to use the new OpenGL2 renderer. We tried running it on a machine with OGL 2.1 support, but without EXT_gpu_shader4 extension (no hardware OGL3.x support) - and we (unsurprisingly) failed, as VTK's shader code has hard-coded requirement for that extension. Scenes rendered by our software use simple one-light lighting and transculency with depth peeling enabled. According to our understanding, it should be able to run on OpenGL 2.1 hardware (as it ran fine on VTK's OGL 1.1 renderer). We tried removing the "#extension GL_EXT_gpu_shader4 : require\n" line from 1.2 shader source. Shader compilation succedeed on test mashine after that, but shader linking failed with an following error: "Fragment shader uses varying gl_FrontFacing but vertex shader does not write to it.". I have the following questions related to our problems: Can the lack of OpenGL2 renderer support for pure 2.1 hardware be considered as a bug, or is it by design? Is OpenGL2 renderer support for OpenGL 2.1 hardware (without EXT_gpu_shader4 extension) planned for future VTK releases? If not, in the case we wanted to introduce slight modifications into VTK's code to run the aforementioned software built with OpenGL2 renderer and on 2.1 hardware, would it be possible? Best regards, Marcin Adamczyk _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers From andrew.slaughter at inl.gov Mon Nov 16 10:29:44 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Mon, 16 Nov 2015 08:29:44 -0700 Subject: [vtkusers] In OSX vtk window does not get the focus In-Reply-To: References: <20151113161834.484630440@mail.rogue-research.com> Message-ID: The following patch was recently merged into the Conda recipe for building VTK: https://github.com/conda/conda-recipes/commit/1bb4cc9292002c2a36b3f7764d661b5b66f8922f . This flag was the recommend fix from here: http://www.vtk.org/Wiki/Cocoa_VTK#Use_Application_Bundles. I am not sure if the binary is available at this point, but I am hopeful that this will make VTK from Conda work better for OSX. On Fri, Nov 13, 2015 at 9:47 AM, David Gobbi wrote: > On Fri, Nov 13, 2015 at 9:18 AM, Sean McBride > wrote: > >> On Thu, 12 Nov 2015 17:32:50 -0500, Eleftherios Garyfallidis said: >> >> >In OSX using vtk 6 or vtk 5 installed from anaconda the window does not >> get >> >the focus. >> >> This reminds me of vtk bug #2025, which I keep meaning to take a crack >> at. Could you try this patch and see if it fixes your issue (I'm not sure >> it will): >> >> >> > > I tried it. Looks like it fixes the key events, but not the > window-to-front issue. > > - David > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Mon Nov 16 11:12:58 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Mon, 16 Nov 2015 17:12:58 +0100 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: Hello Aashish, Thanks ! After doing some test, I realized the patch I've just sent is not the correct fix at all, because the text is not rendered properly when we don't use a vtkFixedPointVolumeRayCastMapper anymore. I believe the problem is probably larger than this and probably has nothing to do with the freetype text generation, but more with the vtkTexturedActor2D rendering part used together with a vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the texture has some transparent pixel in it ... Attached there is a new example that demonstrate that a vtkTextActor AND a vtkTexturedButtonRepresentation2D are not correctly drawn in that case : - OpenGL1 backend : Transparent pixel in Texture are correctly drawn - OpenGL2 backend : Transparent pixel in Texture are not correctly drawn (clamped to white ?) The example is more simple than the previous one and does not need any additional data. Hope that helps ! -Simon 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary : > Simon, > > Thanks for the report. I will follow up with other developers on this bug. > > - Aashish > > > On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT > wrote: > >> Hello, >> >> Trying to solve this problem, I found out that if one call >> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >> string with a vtkTextActor, the text is properly rendered with a yellow dot >> at the anchor point, and with a transparent gray background. >> - DebugTexturesOn : http://picpaste.com/pics/Blurred.1447668943.PNG >> - DebugTexturesOff : http://picpaste.com/pics/Not-Blurred.1447669009.PNG >> >> Now digging into the code in vtkFreeTypeTools.cxx, I suspect this is a >> blending problem. When we activate Texture Debugging, a gray background is >> first drawn, and after that in the method RenderCharacter( ... ) line 1887; >> we either blend the rendered text with the background or not. >> >> Attached is a diff file that solves the problem for me. I do not really >> understand why, so maybe a developer with more VTK's knowledge can >> integrate this properly :) >> >> Thanks, >> Simon >> >> >> >> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT : >> >>> Hi All, >>> >>> All vtkTextActor are rendered blurred when using with >>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>> new rendering backend. >>> >>> Here are some snapshots : >>> - OpenGL1 >>> - OpenGL2 >>> >>> Attached some code that reproduces the problem, to be used with this >>> volume. Visible >>> on OSX and Windows to our knowledge, probably on more OS. >>> >>> The text is rendered properly when used with the old backend or when >>> using a vtkGPUVolumeRayCastMapper instead of >>> the vtkFixedPointVolumeRayCastMapper. >>> >>> Shall I feel a bug, is this a known issue ? >>> >>> Thanks, >>> Simon >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #include "vtkButtonWidget.h" #include "vtkFixedPointVolumeRayCastMapper.h" #include "vtkGPUVolumeRayCastMapper.h" #include "vtkImageCanvasSource2D.h" #include "vtkImageData.h" #include "vtkInteractorStyle.h" #include "vtkPNGReader.h" #include "vtkPNGReader.h" #include "vtkPolyDataMapper2D.h" #include "vtkRenderWindow.h" #include "vtkRenderWindowInteractor.h" #include "vtkRenderer.h" #include "vtkTextActor.h" #include "vtkTextProperty.h" #include "vtkTexture.h" #include "vtkTexturedActor2D.h" #include "vtkTexturedButtonRepresentation2D.h" #include "vtkVolume.h" int main( int argc, char *argv[] ){ // Generate an image data, filled with 0 value int l_image_size = 100; vtkImageData* l_image = vtkImageData::New(); l_image->SetExtent( 0, l_image_size - 1, 0, l_image_size - 1, 0, l_image_size - 1 ); l_image->AllocateScalars( VTK_SHORT, 1 ); memset( l_image->GetScalarPointer(), 0, pow( l_image_size, 3 ) ); // Setup a basic rendering pipeline vtkRenderer* l_renderer = vtkRenderer::New(); l_renderer->SetBackground( 0.3, 0.3, 0.3 ); int l_window_size = 300; vtkRenderWindow* l_render_windows = vtkRenderWindow::New(); l_render_windows->AddRenderer( l_renderer ); l_render_windows->SetSize( l_window_size, l_window_size ); vtkRenderWindowInteractor* l_iren = vtkRenderWindowInteractor::New(); l_iren->SetRenderWindow( l_render_windows ); l_iren->GetInteractorStyle()->SetDefaultRenderer( l_renderer ); // Setup a volume mapper //vtkGPUVolumeRayCastMapper* l_mapper = vtkGPUVolumeRayCastMapper::New(); vtkFixedPointVolumeRayCastMapper* l_mapper = vtkFixedPointVolumeRayCastMapper::New(); l_mapper->SetNumberOfThreads( 1 ); l_mapper->SetInputData( l_image ); // and a volume vtkVolume* l_volume = vtkVolume::New(); l_volume->SetMapper( l_mapper ); // setup a text actor : vtkTextActor* l_text_actor = vtkTextActor::New(); l_text_actor->GetTextProperty()->SetFontSize( 20 ); #ifdef VTK_WAS_BUILT_WITH_OPENGL2 l_text_actor->SetInput( "Some Text, OpenGL2 !??" ); #else l_text_actor->SetInput( "Some Text, OpenGL1 !??" ); #endif // Create a transparent image, with only a red circle int l_texture_size = 100; vtkImageCanvasSource2D* l_2d_image = vtkImageCanvasSource2D::New(); l_2d_image->SetScalarTypeToUnsignedChar(); l_2d_image->SetNumberOfScalarComponents( 4 ); l_2d_image->SetExtent( 0, l_texture_size, 0, l_texture_size, 0, 0 ); l_2d_image->SetDrawColor( 255, 255, 255, 0 ); // <- here with the new backend it does not respect the 0 alpha value, somewhat get clamp to something else l_2d_image->FillBox( 0, l_texture_size, 0, l_texture_size ); l_2d_image->SetDrawColor( 255, 0, 0, 255 ); l_2d_image->DrawCircle( l_texture_size / 2, l_texture_size / 2, l_texture_size / 2 - 3 ); l_2d_image->Update(); // Create the button widget and its representation vtkTexturedButtonRepresentation2D* l_button_rep = vtkTexturedButtonRepresentation2D::New(); l_button_rep->SetNumberOfStates( 2 ); l_button_rep->SetButtonTexture( 0, l_2d_image->GetOutput() ); l_button_rep->SetButtonTexture( 1, l_2d_image->GetOutput() ); vtkButtonWidget* l_button_widget = vtkButtonWidget::New(); l_button_widget->SetInteractor( l_render_windows->GetInteractor() ); l_button_widget->SetRepresentation( l_button_rep ); // place it on top right border, with a small margin double l_bounds[ 6 ]; l_bounds[ 0 ] = l_window_size - l_texture_size - 10; l_bounds[ 1 ] = l_window_size - 10; l_bounds[ 2 ] = l_window_size - l_texture_size - 10; l_bounds[ 3 ] = l_window_size - 10; l_bounds[ 4 ] = l_bounds[ 5 ] = 0.0; l_button_rep->SetPlaceFactor( 1 ); l_button_rep->PlaceWidget( l_bounds ); l_button_widget->On(); l_renderer->AddActor( l_text_actor ); l_renderer->AddVolume( l_volume ); // Render once ! l_render_windows->Render(); // Go rendering ! l_iren->Start(); // Memory cleanup l_image->Delete(); l_renderer->Delete(); l_render_windows->Delete(); l_iren->Delete(); l_mapper->Delete(); l_volume->Delete(); l_text_actor->Delete(); l_2d_image->Delete(); l_button_rep->Delete(); l_button_widget->Delete(); } -------------- next part -------------- cmake_minimum_required( VERSION 2.8.5 FATAL_ERROR ) project( BlurredText ) find_package( VTK REQUIRED ) include( ${VTK_USE_FILE} ) if( VTK_RENDERING_BACKEND STREQUAL "OpenGL2" ) message( STATUS "Using new OpenGL2 backend" ) add_definitions( -DVTK_WAS_BUILT_WITH_OPENGL2 ) else() message( STATUS "Using old OpenGL1 backend" ) endif() add_executable( BlurredText MACOSX_BUNDLE BlurredText.cxx ) target_link_libraries( BlurredText ${VTK_LIBRARIES} ) From aashish.chaudhary at kitware.com Mon Nov 16 11:49:10 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 16 Nov 2015 11:49:10 -0500 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: I see so its not just related to volume rendering and it seems to be a vtkTextActor2D problem? In that can probably Ken / David Lonie wants to take a look at it. Nonetheless, we will follow up on this bug. - Aashish On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT wrote: > Hello Aashish, > > Thanks ! > After doing some test, I realized the patch I've just sent is not the > correct fix at all, because the text is not rendered properly when we don't > use a vtkFixedPointVolumeRayCastMapper anymore. > > I believe the problem is probably larger than this and probably has > nothing to do with the freetype text generation, but more with the > vtkTexturedActor2D rendering part used together with a > vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the > texture has some transparent pixel in it ... > > Attached there is a new example that demonstrate that a vtkTextActor AND > a vtkTexturedButtonRepresentation2D are not correctly drawn in that case : > - OpenGL1 backend > : Transparent > pixel in Texture are correctly drawn > - OpenGL2 backend > : > Transparent pixel in Texture are not correctly drawn (clamped to white ?) > > The example is more simple than the previous one and does not need any > additional data. > > Hope that helps ! > -Simon > > 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> Simon, >> >> Thanks for the report. I will follow up with other developers on this >> bug. >> >> - Aashish >> >> >> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT > > wrote: >> >>> Hello, >>> >>> Trying to solve this problem, I found out that if one call >>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>> at the anchor point, and with a transparent gray background. >>> - DebugTexturesOn : http://picpaste.com/pics/Blurred.1447668943.PNG >>> - DebugTexturesOff : http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>> >>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect this is a >>> blending problem. When we activate Texture Debugging, a gray background is >>> first drawn, and after that in the method RenderCharacter( ... ) line 1887; >>> we either blend the rendered text with the background or not. >>> >>> Attached is a diff file that solves the problem for me. I do not really >>> understand why, so maybe a developer with more VTK's knowledge can >>> integrate this properly :) >>> >>> Thanks, >>> Simon >>> >>> >>> >>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT : >>> >>>> Hi All, >>>> >>>> All vtkTextActor are rendered blurred when using with >>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>> new rendering backend. >>>> >>>> Here are some snapshots : >>>> - OpenGL1 >>>> - OpenGL2 >>>> >>>> Attached some code that reproduces the problem, to be used with this >>>> volume. Visible >>>> on OSX and Windows to our knowledge, probably on more OS. >>>> >>>> The text is rendered properly when used with the old backend or when >>>> using a vtkGPUVolumeRayCastMapper instead of >>>> the vtkFixedPointVolumeRayCastMapper. >>>> >>>> Shall I feel a bug, is this a known issue ? >>>> >>>> Thanks, >>>> Simon >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Mon Nov 16 13:35:08 2015 From: DLRdave at aol.com (David Cole) Date: Mon, 16 Nov 2015 13:35:08 -0500 Subject: [vtkusers] Apply one transformation matrix to an other actor In-Reply-To: <1447344564188-5734929.post@n5.nabble.com> References: <1447330016380-5734919.post@n5.nabble.com> <1447337634120-5734928.post@n5.nabble.com> <1447344564188-5734929.post@n5.nabble.com> Message-ID: <8E4E90ED-BA34-48C0-ABE6-8A8FC6E2BA91@aol.com> UserMatrix is one you can assign yourself to an actor or a top-level composite assembly of actors. Matrix is computed automatically from any position, rotation or scale the actor may have, in addition to the UserMatrix. Calling GetMatrix should always give you the exact matrix applied to an actor to get it to from whatever its own "model space" is to VTK world space. UserMatrix is nullptr until you set it, or until the actor is added as part of an assembly, where the parent assembly may set user matrices directly for its constituent parts. You can't set the matrix directly, but you can set the UserMatrix directly. David > On Nov 12, 2015, at 11:09 AM, Lonni Besan?on wrote: > > My bad works like a charm in the end. It was a problem on my side. > Was wondering however what the difference was between the GetUserMatrix() > and GetMatrix(), which brings in fact the question of the difference between > UserMatrix and Matrix. > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Apply-one-transformation-matrix-to-an-other-actor-tp5734919p5734929.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers From g.bogle at auckland.ac.nz Mon Nov 16 16:17:27 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Mon, 16 Nov 2015 21:17:27 +0000 Subject: [vtkusers] Odd QVTKWidget behaviour Message-ID: I use QVTKWidget in several programs, and all works well. Now one program is exhibiting a different behaviour. In this program the repeated calls to iren->render() do not cause anything to appear on the display until there is an interactor mouse move event (I hold down a mouse button and move the mouse incrementally). After that the display is updated as usual, without any further mouse interaction. The only difference that I can see in the code is that in the misbehaving program I am setting the camera position and focal point the first time the scene is rendered: ren->GetActiveCamera()->SetPosition(0, 0, 0); ren->GetActiveCamera()->SetFocalPoint(x0, x0, x0); whereas in the program that always displays the scene I simply do ren->ResetCamera(); Presumably another command needs to be executed after changing the camera's position and focal point. ResetCamera restores the defaults, which is not what I want. Any suggestions? Thanks Gib From simon.esneault at gmail.com Tue Nov 17 03:27:56 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Tue, 17 Nov 2015 09:27:56 +0100 Subject: [vtkusers] VTK 6.3/OGL2/Qt5.3.2 : QVTKWidget regression, crash after "reparenting" a widget on OSX Message-ID: Hello, After the switch to the new rendering backend, we have a crash on our program after reparenting a QVTKWidget on OSX. The crash is in the method vtkShaderProgram::FindUniform() but we suspect it is about the OpenGL context not being ready on time for the next paintEvent with the new parent. Attached is a program that reproduce the problem, as well as a complete backtrace for this crash. This used to work fine with the previous backend. Hope this little test case helps Thanks Simon -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: QVTKWidgetText.zip Type: application/zip Size: 4515 bytes Desc: not available URL: From simon.esneault at gmail.com Tue Nov 17 03:36:09 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Tue, 17 Nov 2015 09:36:09 +0100 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: Dear Aashish, Yes the root cause is probably located in vtkTexturedActor2D, or in vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible class for loading the texture. Shall I fill a bug ? Thanks Simon 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary : > I see so its not just related to volume rendering and it seems to be a > vtkTextActor2D problem? In that can probably Ken / David Lonie wants to > take a look at it. Nonetheless, we will follow up on this bug. > > - Aashish > > On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT > wrote: > >> Hello Aashish, >> >> Thanks ! >> After doing some test, I realized the patch I've just sent is not the >> correct fix at all, because the text is not rendered properly when we don't >> use a vtkFixedPointVolumeRayCastMapper anymore. >> >> I believe the problem is probably larger than this and probably has >> nothing to do with the freetype text generation, but more with the >> vtkTexturedActor2D rendering part used together with a >> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the >> texture has some transparent pixel in it ... >> >> Attached there is a new example that demonstrate that a vtkTextActor AND >> a vtkTexturedButtonRepresentation2D are not correctly drawn in that case : >> - OpenGL1 backend >> : Transparent >> pixel in Texture are correctly drawn >> - OpenGL2 backend >> : >> Transparent pixel in Texture are not correctly drawn (clamped to white ?) >> >> The example is more simple than the previous one and does not need any >> additional data. >> >> Hope that helps ! >> -Simon >> >> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> >>> Simon, >>> >>> Thanks for the report. I will follow up with other developers on this >>> bug. >>> >>> - Aashish >>> >>> >>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> Hello, >>>> >>>> Trying to solve this problem, I found out that if one call >>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>>> at the anchor point, and with a transparent gray background. >>>> - DebugTexturesOn : http://picpaste.com/pics/Blurred.1447668943.PNG >>>> - DebugTexturesOff : >>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>>> >>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect this is a >>>> blending problem. When we activate Texture Debugging, a gray background is >>>> first drawn, and after that in the method RenderCharacter( ... ) line 1887; >>>> we either blend the rendered text with the background or not. >>>> >>>> Attached is a diff file that solves the problem for me. I do not really >>>> understand why, so maybe a developer with more VTK's knowledge can >>>> integrate this properly :) >>>> >>>> Thanks, >>>> Simon >>>> >>>> >>>> >>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT : >>>> >>>>> Hi All, >>>>> >>>>> All vtkTextActor are rendered blurred when using with >>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>>> new rendering backend. >>>>> >>>>> Here are some snapshots : >>>>> - OpenGL1 >>>>> - OpenGL2 >>>>> >>>>> Attached some code that reproduces the problem, to be used with this >>>>> volume. >>>>> Visible on OSX and Windows to our knowledge, probably on more OS. >>>>> >>>>> The text is rendered properly when used with the old backend or when >>>>> using a vtkGPUVolumeRayCastMapper instead of >>>>> the vtkFixedPointVolumeRayCastMapper. >>>>> >>>>> Shall I feel a bug, is this a known issue ? >>>>> >>>>> Thanks, >>>>> Simon >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Tue Nov 17 04:08:39 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Tue, 17 Nov 2015 02:08:39 -0700 (MST) Subject: [vtkusers] Apply one transformation matrix to an other actor In-Reply-To: <8E4E90ED-BA34-48C0-ABE6-8A8FC6E2BA91@aol.com> References: <1447330016380-5734919.post@n5.nabble.com> <1447337634120-5734928.post@n5.nabble.com> <1447344564188-5734929.post@n5.nabble.com> <8E4E90ED-BA34-48C0-ABE6-8A8FC6E2BA91@aol.com> Message-ID: <1447751319736-5735026.post@n5.nabble.com> Ok thanks a lot. -- View this message in context: http://vtk.1045678.n5.nabble.com/Apply-one-transformation-matrix-to-an-other-actor-tp5734919p5735026.html Sent from the VTK - Users mailing list archive at Nabble.com. From jackkykokoko at gmail.com Tue Nov 17 05:44:45 2015 From: jackkykokoko at gmail.com (Jacky Ko) Date: Tue, 17 Nov 2015 18:44:45 +0800 Subject: [vtkusers] about DICOM orientation and vtk orientation Message-ID: Hello, I am using vtkDICOMImageReader to read dicom series. I need to export the rendered surface in stl format for further analysis. However, I found that the exported surface 's orientation is different from the dicom one (e.g. loading both dicom series and STL surfaces in 3D slicer). But the case doesn't happen in Paraview. I noticed that there are two options for extracting scanning positions and orientations by GetImagePositionPatient() and GetImageOrientationPatient() under vtkDICOMImageReader class. I also read the code in vtk-dicom as an extension. However, some problem occurs when I am using the package (I am developing in python). I need to write my own transformation matrix and apply to the image volume to get a spatial corrected surfaces. The problem is , how to get the correct transformation matrix ? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Tue Nov 17 07:17:31 2015 From: david.gobbi at gmail.com (David Gobbi) Date: Tue, 17 Nov 2015 05:17:31 -0700 Subject: [vtkusers] about DICOM orientation and vtk orientation In-Reply-To: References: Message-ID: Hi Jacky, Can you attach the code that you use to read the image, to create the transform, and to apply the transform? Also note that, for vtk-dicom, there is a method vtkDICOMReader::SetMemoryRowOrderToFileNative() that will ensure that the layout of pixels in memory is identical to the layout of pixels in the file. And the class vtkDICOMToRAS allows conversion of the image to the NIfTI coordinate system, though I'm guessing that you want to work in DICOM coordinates. - David On Tue, Nov 17, 2015 at 3:44 AM, Jacky Ko wrote: > Hello, > > I am using vtkDICOMImageReader to read dicom series. I need to > export the rendered surface in stl format for further analysis. > However, I found that the exported surface 's orientation is > different from the dicom one (e.g. loading both dicom series and > STL surfaces in 3D slicer). But the case doesn't happen in Paraview. > > I noticed that there are two options for extracting scanning positions > and orientations by GetImagePositionPatient() and > GetImageOrientationPatient() under vtkDICOMImageReader class. > > I also read the code in vtk-dicom as an extension. However, some > problem occurs when I am using the package (I am developing in python). > I need to write my own transformation matrix and apply to the image > volume to get a spatial corrected surfaces. The problem is , how to get > the correct transformation matrix ? > > Thanks. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From xabivtk at gmail.com Tue Nov 17 07:37:28 2015 From: xabivtk at gmail.com (Xabi Riobe) Date: Tue, 17 Nov 2015 13:37:28 +0100 Subject: [vtkusers] Mix of TextMapper color and Actor2d color broken Message-ID: Hi, There is an issue when combining vtkTextMapper->GetTextProperty()->SetColor and vtkActor2D->GetProperty()->SetColor Before digging into what causes the issue, i would like to know what is the expected result? here are different behaviours when setting a vtkTextMapper to a vtkActor2D: with VTK 5.10 : TextProperty RED + ActorProperty WHITE => Text RED TextProperty WHITE + ActorProperty GREEN => Text WHITE TextProperty RED + ActorProperty GREEN => Text RED with VTK 6.3 and master, OpenGL 1&2: TextProperty RED + ActorProperty WHITE => Text RED TextProperty WHITE + ActorProperty GREEN => Text GREEN TextProperty RED + ActorProperty GREEN => Text BLACK with vtk 5.10, the vtkTextProperty has always priority, whereas with newer versions if only one color is set it is taken into acount, with an obvious issue when both of them are set. here is a simple test: #include #include #include #include #include #include #include #include int main ( int argc, char *argv[] ) { vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer renderWindow = vtkSmartPointer::New(); renderWindow->AddRenderer(renderer); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renderWindow); vtkSmartPointer textmap = vtkSmartPointer::New(); textmap->SetInput("TEST"); textmap->GetTextProperty()->SetColor(1, 0, 0); vtkSmartPointer actor2D = vtkSmartPointer::New(); actor2D->SetMapper(textmap); actor2D->GetProperty()->SetColor(0, 1, 0); renderer->AddActor2D(actor2D); renderWindow->Render(); renderWindowInteractor->Start(); return EXIT_SUCCESS; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.lonie at kitware.com Tue Nov 17 09:28:41 2015 From: david.lonie at kitware.com (David Lonie) Date: Tue, 17 Nov 2015 09:28:41 -0500 Subject: [vtkusers] [vtk-developers] Mix of TextMapper color and Actor2d color broken In-Reply-To: References: Message-ID: On Tue, Nov 17, 2015 at 7:37 AM, Xabi Riobe wrote: > Hi, > > There is an issue when > combining vtkTextMapper->GetTextProperty()->SetColor and > vtkActor2D->GetProperty()->SetColor > > Before digging into what causes the issue, i would like to know what is > the expected result? > > here are different behaviours when setting a vtkTextMapper to a vtkActor2D: > > with VTK 5.10 : > > TextProperty RED + ActorProperty WHITE => Text RED > TextProperty WHITE + ActorProperty GREEN => Text WHITE > TextProperty RED + ActorProperty GREEN => Text RED > > with VTK 6.3 and master, OpenGL 1&2: > > TextProperty RED + ActorProperty WHITE => Text RED > TextProperty WHITE + ActorProperty GREEN => Text GREEN > TextProperty RED + ActorProperty GREEN => Text BLACK > > with vtk 5.10, the vtkTextProperty has always priority, whereas with newer > versions if only one color is set it is taken into acount, with an obvious > issue when both of them are set. > I'm not sure this was ever well defined behavior, but someone can correct me if I'm wrong. I've typically followed the rule of always setting the color on the text property and leaving the actor color untouched. This should always yield the intended result of rendering the text property's color. I can't think of a usecase off the top of my head where setting both would have any meaningful utility. If there are any such usages, we should use those to determine what the "correct" behavior would be. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From xabivtk at gmail.com Tue Nov 17 09:56:29 2015 From: xabivtk at gmail.com (Xabi Riobe) Date: Tue, 17 Nov 2015 15:56:29 +0100 Subject: [vtkusers] [vtk-developers] Mix of TextMapper color and Actor2d color broken In-Reply-To: References: Message-ID: It's ok for me as i now also ensure to set the color only to the text property, but the red+green=black situation seems to be a bug somewhere in the vtk code. A usecase can be: first take a global preference for color text that you apply to the text property, then if the actor is "packaged" with other ones as a group and you change the color of the group, the color is set to all the actors properties without knowing if there are text related or not. In this scenario we can think that the actor property should have the priority, but i am sure we can think of another one that states the opposite. So in my opinion, if anything is to be modified, i would choose what makes more sense according to the implementation of the final coloring... Xabi 2015-11-17 15:28 GMT+01:00 David Lonie : > On Tue, Nov 17, 2015 at 7:37 AM, Xabi Riobe wrote: > >> Hi, >> >> There is an issue when >> combining vtkTextMapper->GetTextProperty()->SetColor and >> vtkActor2D->GetProperty()->SetColor >> >> Before digging into what causes the issue, i would like to know what is >> the expected result? >> >> here are different behaviours when setting a vtkTextMapper to a >> vtkActor2D: >> >> with VTK 5.10 : >> >> TextProperty RED + ActorProperty WHITE => Text RED >> TextProperty WHITE + ActorProperty GREEN => Text WHITE >> TextProperty RED + ActorProperty GREEN => Text RED >> >> with VTK 6.3 and master, OpenGL 1&2: >> >> TextProperty RED + ActorProperty WHITE => Text RED >> TextProperty WHITE + ActorProperty GREEN => Text GREEN >> TextProperty RED + ActorProperty GREEN => Text BLACK >> >> with vtk 5.10, the vtkTextProperty has always priority, whereas with >> newer versions if only one color is set it is taken into acount, with an >> obvious issue when both of them are set. >> > > I'm not sure this was ever well defined behavior, but someone can correct > me if I'm wrong. I've typically followed the rule of always setting the > color on the text property and leaving the actor color untouched. This > should always yield the intended result of rendering the text property's > color. > > I can't think of a usecase off the top of my head where setting both would > have any meaningful utility. If there are any such usages, we should use > those to determine what the "correct" behavior would be. > > Dave > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matimontg at gmail.com Tue Nov 17 10:29:07 2015 From: matimontg at gmail.com (Matias Montroull) Date: Tue, 17 Nov 2015 15:29:07 +0000 Subject: [vtkusers] 3D not displaying on a PC Message-ID: Hi, We've been using a software built with VTK in .NET for months and now we installed it on a doctor Laptop and for some reason the 3D is not displaying. We installed the latest DirectX drivers which I think includes the OpenGL and updated the video card drivers and still nothing. We tried different resolution levels and nothing. Is there documentation as of what are the software and hardware requirements for VTK to display 3D images? Thank you, Matias. -- Matias -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Tue Nov 17 10:50:58 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 17 Nov 2015 10:50:58 -0500 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT wrote: > Dear Aashish, > > Yes the root cause is probably located in vtkTexturedActor2D, or in > vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible > class for loading the texture. > Shall I fill a bug ? > Yes, please. - Aashish > Thanks > Simon > > 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> I see so its not just related to volume rendering and it seems to be a >> vtkTextActor2D problem? In that can probably Ken / David Lonie wants to >> take a look at it. Nonetheless, we will follow up on this bug. >> >> - Aashish >> >> On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT < >> simon.esneault at gmail.com> wrote: >> >>> Hello Aashish, >>> >>> Thanks ! >>> After doing some test, I realized the patch I've just sent is not the >>> correct fix at all, because the text is not rendered properly when we don't >>> use a vtkFixedPointVolumeRayCastMapper anymore. >>> >>> I believe the problem is probably larger than this and probably has >>> nothing to do with the freetype text generation, but more with the >>> vtkTexturedActor2D rendering part used together with a >>> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the >>> texture has some transparent pixel in it ... >>> >>> Attached there is a new example that demonstrate that a vtkTextActor AND >>> a vtkTexturedButtonRepresentation2D are not correctly drawn in that case : >>> - OpenGL1 backend >>> : Transparent >>> pixel in Texture are correctly drawn >>> - OpenGL2 backend >>> : >>> Transparent pixel in Texture are not correctly drawn (clamped to white ?) >>> >>> The example is more simple than the previous one and does not need any >>> additional data. >>> >>> Hope that helps ! >>> -Simon >>> >>> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>>> Simon, >>>> >>>> Thanks for the report. I will follow up with other developers on this >>>> bug. >>>> >>>> - Aashish >>>> >>>> >>>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> Hello, >>>>> >>>>> Trying to solve this problem, I found out that if one call >>>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>>>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>>>> at the anchor point, and with a transparent gray background. >>>>> - DebugTexturesOn : http://picpaste.com/pics/Blurred.1447668943.PNG >>>>> - DebugTexturesOff : >>>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>>>> >>>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect this is a >>>>> blending problem. When we activate Texture Debugging, a gray background is >>>>> first drawn, and after that in the method RenderCharacter( ... ) line 1887; >>>>> we either blend the rendered text with the background or not. >>>>> >>>>> Attached is a diff file that solves the problem for me. I do not >>>>> really understand why, so maybe a developer with more VTK's knowledge can >>>>> integrate this properly :) >>>>> >>>>> Thanks, >>>>> Simon >>>>> >>>>> >>>>> >>>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT : >>>>> >>>>>> Hi All, >>>>>> >>>>>> All vtkTextActor are rendered blurred when using with >>>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>>>> new rendering backend. >>>>>> >>>>>> Here are some snapshots : >>>>>> - OpenGL1 >>>>>> - OpenGL2 >>>>>> >>>>>> Attached some code that reproduces the problem, to be used with this >>>>>> volume. >>>>>> Visible on OSX and Windows to our knowledge, probably on more OS. >>>>>> >>>>>> The text is rendered properly when used with the old backend or when >>>>>> using a vtkGPUVolumeRayCastMapper instead of >>>>>> the vtkFixedPointVolumeRayCastMapper. >>>>>> >>>>>> Shall I feel a bug, is this a known issue ? >>>>>> >>>>>> Thanks, >>>>>> Simon >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Tue Nov 17 14:15:44 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Tue, 17 Nov 2015 19:15:44 +0000 Subject: [vtkusers] QVTKWidget camera problem Message-ID: I have now established conclusively that adjusting the camera setup with SetPosition and SetFocalPoint stops the scene from being displayed, while any movement of the mouse with a button down restores display. qvtkWidget = new QVTKWidget(page,QFlag(0)); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(qvtkWidget); page_VTK->setLayout(layout); ren = vtkRenderer::New(); renWin = qvtkWidget->GetRenderWindow(); renWin->AddRenderer(ren); ren->ResetCamera(); iren = qvtkWidget->GetInteractor(); vtkSmartPointer style = vtkSmartPointer::New(); iren->SetInteractorStyle( style ); iren->Initialize(); ren->GetActiveCamera()->SetPosition(0, 0, 0); ren->GetActiveCamera()->SetFocalPoint(x0, x0, x0); If I remove the last two lines the scene is centred OK, but not at the scale I want. I can play with Zoom(), but SetFocalPoint(x0,x0,x0) ensures that I get the desired scaling directly. Is this the expected behaviour? I'm wondering if it is the result of using the QVTKWidget "default" camera instead of creating a new one to use (please excuse deficiencies in my understanding). Is Zoom() the only way to achieve what I want? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Tue Nov 17 14:28:32 2015 From: ken.martin at kitware.com (Ken Martin) Date: Tue, 17 Nov 2015 14:28:32 -0500 Subject: [vtkusers] QVTKWidget camera problem In-Reply-To: References: Message-ID: renderer->ResetCameraClippingRange() maybe? That and camera->OrthogonalizeViewUp() are the two common things to try when manual camera changes do not work. Thanks Ken On Tue, Nov 17, 2015 at 2:15 PM, Gib Bogle wrote: > I have now established conclusively that adjusting the camera setup with > SetPosition and SetFocalPoint stops the scene from being displayed, while > any movement of the mouse with a button down restores display. > > qvtkWidget = new QVTKWidget(page,QFlag(0)); > > QVBoxLayout *layout = new QVBoxLayout; > layout->addWidget(qvtkWidget);page_VTK->setLayout(layout);ren = vtkRenderer::New(); > > renWin = qvtkWidget->GetRenderWindow(); > > renWin->AddRenderer(ren); > > ren->ResetCamera(); > iren = qvtkWidget->GetInteractor(); > > vtkSmartPointer style = vtkSmartPointer::New(); > > iren->SetInteractorStyle( style ); > > iren->Initialize(); > > ren->GetActiveCamera()->SetPosition(0, 0, 0);ren->GetActiveCamera()->SetFocalPoint(x0, x0, x0); > > > If I remove the last two lines the scene is centred OK, but not at the > scale I want. I can play with Zoom(), but SetFocalPoint(x0,x0,x0) ensures > that I get the desired scaling directly. > Is this the expected behaviour? I'm wondering if it is the result of > using the QVTKWidget "default" camera instead of creating a new one to use > (please excuse deficiencies in my understanding). Is Zoom() the only way > to achieve what I want? > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Tue Nov 17 15:03:49 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Tue, 17 Nov 2015 20:03:49 +0000 Subject: [vtkusers] QVTKWidget camera problem In-Reply-To: References: , Message-ID: Thanks for the suggestions, Ken. Neither had any effect, unfortunately. Cheers Gib ________________________________ From: Ken Martin [ken.martin at kitware.com] Sent: Wednesday, 18 November 2015 8:28 a.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] QVTKWidget camera problem renderer->ResetCameraClippingRange() maybe? That and camera->OrthogonalizeViewUp() are the two common things to try when manual camera changes do not work. Thanks Ken On Tue, Nov 17, 2015 at 2:15 PM, Gib Bogle > wrote: I have now established conclusively that adjusting the camera setup with SetPosition and SetFocalPoint stops the scene from being displayed, while any movement of the mouse with a button down restores display. qvtkWidget = new QVTKWidget(page,QFlag(0)); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(qvtkWidget); page_VTK->setLayout(layout); ren = vtkRenderer::New(); renWin = qvtkWidget->GetRenderWindow(); renWin->AddRenderer(ren); ren->ResetCamera(); iren = qvtkWidget->GetInteractor(); vtkSmartPointer style = vtkSmartPointer::New(); iren->SetInteractorStyle( style ); iren->Initialize(); ren->GetActiveCamera()->SetPosition(0, 0, 0); ren->GetActiveCamera()->SetFocalPoint(x0, x0, x0); If I remove the last two lines the scene is centred OK, but not at the scale I want. I can play with Zoom(), but SetFocalPoint(x0,x0,x0) ensures that I get the desired scaling directly. Is this the expected behaviour? I'm wondering if it is the result of using the QVTKWidget "default" camera instead of creating a new one to use (please excuse deficiencies in my understanding). Is Zoom() the only way to achieve what I want? _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From inglis.dl at gmail.com Tue Nov 17 15:10:33 2015 From: inglis.dl at gmail.com (DL I) Date: Tue, 17 Nov 2015 15:10:33 -0500 Subject: [vtkusers] QVTKWidget camera problem In-Reply-To: References: Message-ID: Hi Gib, maybe try removing iren->Initialize(); and calling ren->ResetCamera(); after you have added the actor(s)? - Dean On Tue, Nov 17, 2015 at 3:03 PM, Gib Bogle wrote: > Thanks for the suggestions, Ken. Neither had any effect, unfortunately. > > Cheers > Gib > ------------------------------ > *From:* Ken Martin [ken.martin at kitware.com] > *Sent:* Wednesday, 18 November 2015 8:28 a.m. > *To:* Gib Bogle > *Cc:* vtkusers at vtk.org > *Subject:* Re: [vtkusers] QVTKWidget camera problem > > renderer->ResetCameraClippingRange() maybe? That and > camera->OrthogonalizeViewUp() are the two common things to try when manual > camera changes do not work. > > Thanks > Ken > > On Tue, Nov 17, 2015 at 2:15 PM, Gib Bogle wrote: > >> I have now established conclusively that adjusting the camera setup with >> SetPosition and SetFocalPoint stops the scene from being displayed, while >> any movement of the mouse with a button down restores display. >> >> qvtkWidget = new QVTKWidget(page,QFlag(0)); >> >> QVBoxLayout *layout = new QVBoxLayout; >> layout->addWidget(qvtkWidget);page_VTK->setLayout(layout);ren = vtkRenderer::New(); >> >> renWin = qvtkWidget->GetRenderWindow(); >> >> renWin->AddRenderer(ren); >> >> ren->ResetCamera(); >> iren = qvtkWidget->GetInteractor(); >> >> vtkSmartPointer style = vtkSmartPointer::New(); >> >> iren->SetInteractorStyle( style ); >> >> iren->Initialize(); >> >> ren->GetActiveCamera()->SetPosition(0, 0, 0);ren->GetActiveCamera()->SetFocalPoint(x0, x0, x0); >> >> >> If I remove the last two lines the scene is centred OK, but not at the >> scale I want. I can play with Zoom(), but SetFocalPoint(x0,x0,x0) ensures >> that I get the desired scaling directly. >> Is this the expected behaviour? I'm wondering if it is the result of >> using the QVTKWidget "default" camera instead of creating a new one to use >> (please excuse deficiencies in my understanding). Is Zoom() the only way >> to achieve what I want? >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.bogle at auckland.ac.nz Tue Nov 17 15:16:01 2015 From: g.bogle at auckland.ac.nz (Gib Bogle) Date: Tue, 17 Nov 2015 20:16:01 +0000 Subject: [vtkusers] QVTKWidget camera problem In-Reply-To: References: , Message-ID: Hi Dean, I have tried ren->ResetCamera() after adding the actors, it displays OK but with the default scaling (i.e. camera position etc), just the same as if I do it initially and never change the camera. Cheers Gib ________________________________ From: DL I [inglis.dl at gmail.com] Sent: Wednesday, 18 November 2015 9:10 a.m. To: Gib Bogle Cc: Ken Martin; vtkusers at vtk.org Subject: Re: [vtkusers] QVTKWidget camera problem Hi Gib, maybe try removing iren->Initialize(); and calling ren->ResetCamera(); after you have added the actor(s)? - Dean On Tue, Nov 17, 2015 at 3:03 PM, Gib Bogle > wrote: Thanks for the suggestions, Ken. Neither had any effect, unfortunately. Cheers Gib ________________________________ From: Ken Martin [ken.martin at kitware.com] Sent: Wednesday, 18 November 2015 8:28 a.m. To: Gib Bogle Cc: vtkusers at vtk.org Subject: Re: [vtkusers] QVTKWidget camera problem renderer->ResetCameraClippingRange() maybe? That and camera->OrthogonalizeViewUp() are the two common things to try when manual camera changes do not work. Thanks Ken On Tue, Nov 17, 2015 at 2:15 PM, Gib Bogle > wrote: I have now established conclusively that adjusting the camera setup with SetPosition and SetFocalPoint stops the scene from being displayed, while any movement of the mouse with a button down restores display. qvtkWidget = new QVTKWidget(page,QFlag(0)); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(qvtkWidget); page_VTK->setLayout(layout); ren = vtkRenderer::New(); renWin = qvtkWidget->GetRenderWindow(); renWin->AddRenderer(ren); ren->ResetCamera(); iren = qvtkWidget->GetInteractor(); vtkSmartPointer style = vtkSmartPointer::New(); iren->SetInteractorStyle( style ); iren->Initialize(); ren->GetActiveCamera()->SetPosition(0, 0, 0); ren->GetActiveCamera()->SetFocalPoint(x0, x0, x0); If I remove the last two lines the scene is centred OK, but not at the scale I want. I can play with Zoom(), but SetFocalPoint(x0,x0,x0) ensures that I get the desired scaling directly. Is this the expected behaviour? I'm wondering if it is the result of using the QVTKWidget "default" camera instead of creating a new one to use (please excuse deficiencies in my understanding). Is Zoom() the only way to achieve what I want? _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsriniv2 at ncsu.edu Tue Nov 17 18:15:33 2015 From: hsriniv2 at ncsu.edu (harshad1) Date: Tue, 17 Nov 2015 16:15:33 -0700 (MST) Subject: [vtkusers] QT 5.5.1 and VTK 6.3 - implementing VTK in a GUi In-Reply-To: <1447782247450-5735041.post@n5.nabble.com> References: <1447404314048-5734959.post@n5.nabble.com> <1447442355760-5734977.post@n5.nabble.com> <1447782247450-5735041.post@n5.nabble.com> Message-ID: <1447802133778-5735049.post@n5.nabble.com> Yes, sorry > myLayout->insertWidget(0,qvtkwidget,2); The 0 and 2 are just layout parameters... -- View this message in context: http://vtk.1045678.n5.nabble.com/QT-5-5-1-and-VTK-6-3-implementing-VTK-in-a-GUi-tp5734959p5735049.html Sent from the VTK - Users mailing list archive at Nabble.com. From vincent.rivola at rtech-engineering.com Tue Nov 17 18:19:39 2015 From: vincent.rivola at rtech-engineering.com (Vincent Rivola) Date: Wed, 18 Nov 2015 00:19:39 +0100 Subject: [vtkusers] vtkImageShrink3D deleting input data arrays Message-ID: <75B37681-2AF0-4146-8E69-0DEB741B77AD@rtech-engineering.com> Dear All, This is my first subject on this mailing list. I am currently developing a tool using the JAVA wrapper for VTK. I am reading an image and creating a vtkImageData from this input file. Since the input image contains Z elevation data, I create three arrays that I add to the pointData of the vtkImageData: img.GetPointData().AddArray(z); img.GetPointData().AddArray(meanZ); img.GetPointData().AddArray(sigmaZ); So far, so good, if I write the file (or look in debug mode) I can see my three arrays in the Point Data of my img object. However I would like to use a vtkImageShrink3D filter on image, with the following lines: vtkImageShrink3D shrink = new vtkImageShrink3D(); shrink.SetShrinkFactors(shrinkFactor, shrinkFactor, 1); shrink.SetInputData(img); shrink.AveragingOff(); shrink.Update(); vtkImageData outputImg = shrink.GetOutput(); In the output of this filter I only get one array which is called ImageScalar ! My three initial arrays have been deleted by the filter. I would like to see my three arrays being passed through the filter like it is the case with other filters. Could someone help me to solve this issue? Regards, Vincent -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Tue Nov 17 18:33:50 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Tue, 17 Nov 2015 18:33:50 -0500 Subject: [vtkusers] about DICOM orientation and vtk orientation In-Reply-To: References: Message-ID: 3D Slicer uses RAS coordinate system, unlike DICOM which uses LPS. Thus x and y coordinates are inverted. Slicer takes care of this inversion for volume images, but not for polygonal meshes. In other words, you cannot have a mesh which appears correctly in both Slicer and ParaView. HTH On Tue, Nov 17, 2015 at 7:17 AM, David Gobbi wrote: > Hi Jacky, > > Can you attach the code that you use to read the image, to create the > transform, and to apply the transform? > > Also note that, for vtk-dicom, there is a method > vtkDICOMReader::SetMemoryRowOrderToFileNative() that will ensure that the > layout of pixels in memory is identical to the layout of pixels in the > file. And the class vtkDICOMToRAS allows conversion of the image to the > NIfTI coordinate system, though I'm guessing that you want to work in DICOM > coordinates. > > - David > > > On Tue, Nov 17, 2015 at 3:44 AM, Jacky Ko wrote: > >> Hello, >> >> I am using vtkDICOMImageReader to read dicom series. I need to >> export the rendered surface in stl format for further analysis. >> However, I found that the exported surface 's orientation is >> different from the dicom one (e.g. loading both dicom series and >> STL surfaces in 3D slicer). But the case doesn't happen in Paraview. >> >> I noticed that there are two options for extracting scanning positions >> and orientations by GetImagePositionPatient() and >> GetImageOrientationPatient() under vtkDICOMImageReader class. >> >> I also read the code in vtk-dicom as an extension. However, some >> problem occurs when I am using the package (I am developing in python). >> I need to write my own transformation matrix and apply to the image >> volume to get a spatial corrected surfaces. The problem is , how to get >> the correct transformation matrix ? >> >> Thanks. >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Wed Nov 18 03:38:07 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Wed, 18 Nov 2015 09:38:07 +0100 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: Morning ! http://www.vtk.org/Bug/view.php?id=15838 Let me know if there is anything I can do to solve this. Simon 2015-11-17 16:50 GMT+01:00 Aashish Chaudhary : > > > On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT > wrote: > >> Dear Aashish, >> >> Yes the root cause is probably located in vtkTexturedActor2D, or in >> vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible >> class for loading the texture. >> Shall I fill a bug ? >> > > Yes, please. > > - Aashish > > >> Thanks >> Simon >> >> 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> >>> I see so its not just related to volume rendering and it seems to be a >>> vtkTextActor2D problem? In that can probably Ken / David Lonie wants to >>> take a look at it. Nonetheless, we will follow up on this bug. >>> >>> - Aashish >>> >>> On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> Hello Aashish, >>>> >>>> Thanks ! >>>> After doing some test, I realized the patch I've just sent is not the >>>> correct fix at all, because the text is not rendered properly when we don't >>>> use a vtkFixedPointVolumeRayCastMapper anymore. >>>> >>>> I believe the problem is probably larger than this and probably has >>>> nothing to do with the freetype text generation, but more with the >>>> vtkTexturedActor2D rendering part used together with a >>>> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the >>>> texture has some transparent pixel in it ... >>>> >>>> Attached there is a new example that demonstrate that a vtkTextActor >>>> AND a vtkTexturedButtonRepresentation2D are not correctly drawn in that >>>> case : >>>> - OpenGL1 backend >>>> : Transparent >>>> pixel in Texture are correctly drawn >>>> - OpenGL2 backend >>>> : >>>> Transparent pixel in Texture are not correctly drawn (clamped to white ?) >>>> >>>> The example is more simple than the previous one and does not need any >>>> additional data. >>>> >>>> Hope that helps ! >>>> -Simon >>>> >>>> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com>: >>>> >>>>> Simon, >>>>> >>>>> Thanks for the report. I will follow up with other developers on this >>>>> bug. >>>>> >>>>> - Aashish >>>>> >>>>> >>>>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT < >>>>> simon.esneault at gmail.com> wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> Trying to solve this problem, I found out that if one call >>>>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>>>>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>>>>> at the anchor point, and with a transparent gray background. >>>>>> - DebugTexturesOn : http://picpaste.com/pics/Blurred.1447668943.PNG >>>>>> - DebugTexturesOff : >>>>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>>>>> >>>>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect this is >>>>>> a blending problem. When we activate Texture Debugging, a gray background >>>>>> is first drawn, and after that in the method RenderCharacter( ... ) line >>>>>> 1887; we either blend the rendered text with the background or not. >>>>>> >>>>>> Attached is a diff file that solves the problem for me. I do not >>>>>> really understand why, so maybe a developer with more VTK's knowledge can >>>>>> integrate this properly :) >>>>>> >>>>>> Thanks, >>>>>> Simon >>>>>> >>>>>> >>>>>> >>>>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT : >>>>>> >>>>>>> Hi All, >>>>>>> >>>>>>> All vtkTextActor are rendered blurred when using with >>>>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>>>>> new rendering backend. >>>>>>> >>>>>>> Here are some snapshots : >>>>>>> - OpenGL1 >>>>>>> >>>>>>> - OpenGL2 >>>>>>> >>>>>>> Attached some code that reproduces the problem, to be used with this >>>>>>> volume. >>>>>>> Visible on OSX and Windows to our knowledge, probably on more OS. >>>>>>> >>>>>>> The text is rendered properly when used with the old backend or when >>>>>>> using a vtkGPUVolumeRayCastMapper instead of >>>>>>> the vtkFixedPointVolumeRayCastMapper. >>>>>>> >>>>>>> Shall I feel a bug, is this a known issue ? >>>>>>> >>>>>>> Thanks, >>>>>>> Simon >>>>>>> >>>>>>> -- >>>>>>> ------------------------------------------------------------------ >>>>>>> Simon Esneault >>>>>>> Rennes, France >>>>>>> ------------------------------------------------------------------ >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>> >>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>> >>>>>> Follow this link to subscribe/unsubscribe: >>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From karrach.houssam at gmail.com Wed Nov 18 04:27:53 2015 From: karrach.houssam at gmail.com (Houssam Karrach) Date: Wed, 18 Nov 2015 10:27:53 +0100 Subject: [vtkusers] Fwd: Activiz .Net and SimpleITK In-Reply-To: References: Message-ID: Dear Aashish, My goal is to integrate Activiz and SimpleITK into the same application. I didn't find any of the glue classes. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Wed Nov 18 04:33:44 2015 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 18 Nov 2015 02:33:44 -0700 (MST) Subject: [vtkusers] vtkBooleanPolyDataFilter? Message-ID: <1447839224484-5735056.post@n5.nabble.com> Hi all, I want to create a volume, which is a margin around a previously existing volume. I had initially thought to use vtkBooleanPolyDataFilter, except for two sphere sources with matching centres but differing radii, SetOperationToDifference returns nothing, but I was hoping that it would return a spherical shell. Looking at the example, Examples/Cxx/PolyData/BooleanOperationPolyDataFilter, I get the impression that there needs to be intersection between the two polydata, so I guess this method won't work for concentric objects. Can anyone suggest a way to create a polydata shell? At the moment, I will settle for methods that only work for vtkSphereSource, but in the future, I'll need to be able to extend this to more generic shapes. Thanks in advance for the help. -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanPolyDataFilter-tp5735056.html Sent from the VTK - Users mailing list archive at Nabble.com. From lonni.besancon at gmail.com Wed Nov 18 06:01:46 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Wed, 18 Nov 2015 04:01:46 -0700 (MST) Subject: [vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY Message-ID: <1447844506521-5735057.post@n5.nabble.com> Hello, I am trying to write my own InteractorStyle for android. So far I was successful in changing what I wanted to change and creating it. Now I wanted to add a function that could handle a given rotation/translation given as a parameter. Here goes the function: /void myfunction(double* rotation, double* translation){ vtkProp3D* prop3D = actor ; // Actor is a variable of the class vtkTransform* t = vtkTransform::New(); t->Identity(); t->RotateX(rotation[0]); t->RotateY(rotation[1]); t->RotateZ(rotation[2]); prop3D->SetUserMatrix(t->GetMatrix()); vtkRenderWindowInteractor *rwi = this->Interactor; rwi->Render(); }/ My previous code was working just fine, but now when I call this function I get the following errors: / E/VTK ( 6271): ERROR: In /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1413 E/VTK ( 6271): vtkOpenGLPolyDataMapper (0x4b8e6e90): Error setting 'vertexMC' in shader VAO. E/VTK ( 6271): ERROR: In /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1421 E/VTK ( 6271): vtkOpenGLPolyDataMapper (0x4b8e6e90): Error setting 'normalMC' in shader VAO. E/VTK ( 6271): ERROR: In /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1413 E/VTK ( 6271): vtkOpenGLPolyDataMapper (0x4b8e6e90): Error setting 'vertexMC' in shader VAO. E/VTK ( 6271): ERROR: In /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1421 E/VTK ( 6271): vtkOpenGLPolyDataMapper (0x4b8e6e90): Error setting 'normalMC' in shader VAO. E/libEGL ( 6271): validate_display:254 error 3008 (EGL_BAD_DISPLAY) E/VTK ( 6271): ERROR: In /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1413 E/VTK ( 6271): vtkOpenGLPolyDataMapper (0x4b8e6e90): Error setting 'vertexMC' in shader VAO. E/VTK ( 6271): ERROR: In /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 142 / Note that the application does not crash and that my actor is rotated (by a fixed rotation even if I change the values) and that if I start a normal interaction with the actor again the application works just fine. I was therefore wondering what I am doing wrong here. I have created a post on StackOverflow for a more readable version of the code and the errors. StackOverflow Post -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057.html Sent from the VTK - Users mailing list archive at Nabble.com. From cory.quammen at kitware.com Wed Nov 18 07:52:27 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 18 Nov 2015 07:52:27 -0500 Subject: [vtkusers] vtkBooleanPolyDataFilter? In-Reply-To: <1447839224484-5735056.post@n5.nabble.com> References: <1447839224484-5735056.post@n5.nabble.com> Message-ID: You are correct in assuming that the filter requires overlap. It sounds like you want a method that computes Boolean operations on volume meshes. I'm not aware of a filter that does that. Cory On Nov 18, 2015 4:33 AM, "mbcx9rb9" wrote: > Hi all, > > I want to create a volume, which is a margin around a previously existing > volume. > > I had initially thought to use vtkBooleanPolyDataFilter, except for two > sphere sources with matching centres but differing radii, > SetOperationToDifference returns nothing, but I was hoping that it would > return a spherical shell. > > Looking at the example, > Examples/Cxx/PolyData/BooleanOperationPolyDataFilter, I get the impression > that there needs to be intersection between the two polydata, so I guess > this method won't work for concentric objects. > > Can anyone suggest a way to create a polydata shell? At the moment, I will > settle for methods that only work for vtkSphereSource, but in the future, > I'll need to be able to extend this to more generic shapes. > > Thanks in advance for the help. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/vtkBooleanPolyDataFilter-tp5735056.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed Nov 18 08:14:02 2015 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 18 Nov 2015 08:14:02 -0500 Subject: [vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY In-Reply-To: <1447844506521-5735057.post@n5.nabble.com> References: <1447844506521-5735057.post@n5.nabble.com> Message-ID: An error on setting an OpenGL attribute in VTK can be due to the attribute not being used by the shader program or I believe trying to set the attribute with no data. Maybe other reasons as well. Seeing the shader code at the time the error occurs is the first step. You can uncomment vtkOpenGL2PolyDataMapper.cxx in ReplaceShaderValues to print out the shaders. On Wed, Nov 18, 2015 at 6:01 AM, Lonni Besan?on wrote: > Hello, > > I am trying to write my own InteractorStyle for android. So far I was > successful in changing what I wanted to change and creating it. Now I > wanted > to add a function that could handle a given rotation/translation given as a > parameter. Here goes the function: > > > /void myfunction(double* rotation, double* translation){ > vtkProp3D* prop3D = actor ; // Actor is a variable of the class > vtkTransform* t = vtkTransform::New(); > t->Identity(); > t->RotateX(rotation[0]); > t->RotateY(rotation[1]); > t->RotateZ(rotation[2]); > > prop3D->SetUserMatrix(t->GetMatrix()); > > vtkRenderWindowInteractor *rwi = this->Interactor; > rwi->Render(); > }/ > > My previous code was working just fine, but now when I call this function I > get the following errors: > / > E/VTK ( 6271): ERROR: In > /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1413 > E/VTK ( 6271): vtkOpenGLPolyDataMapper (0x4b8e6e90): Error setting > 'vertexMC' in shader VAO. > E/VTK ( 6271): ERROR: In > /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1421 > E/VTK ( 6271): vtkOpenGLPolyDataMapper (0x4b8e6e90): Error setting > 'normalMC' in shader VAO. > E/VTK ( 6271): ERROR: In > /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1413 > E/VTK ( 6271): vtkOpenGLPolyDataMapper (0x4b8e6e90): Error setting > 'vertexMC' in shader VAO. > E/VTK ( 6271): ERROR: In > /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1421 > E/VTK ( 6271): vtkOpenGLPolyDataMapper (0x4b8e6e90): Error setting > 'normalMC' in shader VAO. > E/libEGL ( 6271): validate_display:254 error 3008 (EGL_BAD_DISPLAY) > E/VTK ( 6271): ERROR: In > /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1413 > E/VTK ( 6271): vtkOpenGLPolyDataMapper (0x4b8e6e90): Error setting > 'vertexMC' in shader VAO. > E/VTK ( 6271): ERROR: In > /Users/....../Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 142 > / > > Note that the application does not crash and that my actor is rotated (by a > fixed rotation even if I change the values) and that if I start a normal > interaction with the actor again the application works just fine. > > I was therefore wondering what I am doing wrong here. > > I have created a post on StackOverflow for a more readable version of the > code and the errors. > StackOverflow Post > < > http://stackoverflow.com/questions/33778197/vtk-error-setting-vertexmc-in-shader-vao-and-egl-bad-display > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057.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 > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Wed Nov 18 08:55:39 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Wed, 18 Nov 2015 14:55:39 +0100 Subject: [vtkusers] VTK 6.3/OGL2/Qt5.3.2 : QVTKWidget regression, crash after "reparenting" a widget on OSX In-Reply-To: References: Message-ID: Hello, I've created a bug in Mantis for this http://www.vtk.org/Bug/view.php?id=15840 Looking at the code in QVTKWidget.cxx, here is the part that may be causing the problem, because it handles the reparenting part... */*******************************************************************************/* *if(e->type() == QEvent::ParentAboutToChange)* * {* * this->markCachedImageAsDirty();* * if (this->mRenWin)* * {* * // Finalize the window to remove graphics resources associated with* * // this window* * if(this->mRenWin->GetMapped())* * {* * this->mRenWin->Finalize();* * }* * }* * }* * else if(e->type() == QEvent::ParentChange)* * {* * if(this->mRenWin)* * {* * x11_setup_window();* * // connect to new window* * this->mRenWin->SetWindowId( reinterpret_cast(this->winId()));* * // start up the window to create graphics resources for this window* * if(isVisible())* * {* * this->mRenWin->Start();* * }* * }* * }* */*******************************************************************************/* Were there any significant changes in the methods GetMapped() / Finalize() / Start() of vtkRenderWindow (or children implementation) during the development of the new rendering backend that may lead to such a crash : */*******************************************************************************/* *ERROR: In /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, line 354* *vtkShaderProgram (0x6000001809c0): 1: #version 120* *2: #define highp* *3: #define mediump* *4: #define lowp* *5: * *6: /*=========================================================================* *7: * *8: Program: Visualization Toolkit* *9: Module: vtkPolyDataVS.glsl* *10: * *11: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen* *12: All rights reserved.* *13: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.* *14: * *15: This software is distributed WITHOUT ANY WARRANTY; without even* *16: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR* *17: PURPOSE. See the above copyright notice for more information.* *18: * *19: =========================================================================*/* *20: * *21: attribute vec4 vertexMC;* *22: * *23: // frag position in VC* *24: varying vec4 vertexVCVSOutput;* *25: * *26: // optional normal declaration* *27: attribute vec3 normalMC;* *28: uniform mat3 normalMatrix;* *29: varying vec3 normalVCVSOutput;* *30: * *31: // extra lighting parameters* *32: //VTK::Light::Dec* *33: * *34: // Texture coordinates* *35: //VTK::TCoord::Dec* *36: * *37: // material property values* *38: //VTK::Color::Dec* *39: * *40: // clipping plane vars* *41: //VTK::Clip::Dec* *42: * *43: // camera and actor matrix values* *44: uniform mat4 MCDCMatrix;* *45: uniform mat4 MCVCMatrix;* *46: * *47: // Apple Bug* *48: //VTK::PrimID::Dec* *49: * *50: void main()* *51: {* *52: //VTK::Color::Impl* *53: * *54: normalVCVSOutput = normalMatrix * normalMC;* *55: * *56: //VTK::TCoord::Impl* *57: * *58: //VTK::Clip::Impl* *59: * *60: //VTK::PrimID::Impl* *61: * *62: vertexVCVSOutput = MCVCMatrix * vertexMC;* *63: gl_Position = MCDCMatrix * vertexMC;* *64: * *65: * *66: //VTK::Light::Impl* *67: }* *68: * *ERROR: In /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, line 355* *vtkShaderProgram (0x6000001809c0): ERROR: 0:1: '' : version '120' is not supported* *ERROR: 0:2: '' : #version required and missing.* *ERROR: 0:21: 'attribute' : syntax error: syntax error* *(lldb) bt* ** thread #1: tid = 0x600e30, 0x0000000100609f1f VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x60)* * * frame #0: 0x0000000100609f1f VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31* * frame #1: 0x00000001006074ab VtkReparentingProblem`vtkShaderProgram::SetUniformi(char const*, int) + 27* * frame #2: 0x00000001005b8c28 VtkReparentingProblem`vtkOpenGLPolyDataMapper::SetMapperShaderParameters(vtkOpenGLHelper&, vtkRenderer*, vtkActor*) + 72* * frame #3: 0x00000001005b8b1b VtkReparentingProblem`vtkOpenGLPolyDataMapper::UpdateShaders(vtkOpenGLHelper&, vtkRenderer*, vtkActor*) + 1211* * frame #4: 0x00000001005bb782 VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPieceDraw(vtkRenderer*, vtkActor*) + 818* * frame #5: 0x00000001005bbbe3 VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPiece(vtkRenderer*, vtkActor*) + 195* * frame #6: 0x00000001004ba1fe VtkReparentingProblem`vtkPolyDataMapper::Render(vtkRenderer*, vtkActor*) + 174* * frame #7: 0x0000000100561be0 VtkReparentingProblem`vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) + 144* * frame #8: 0x00000001004667c3 VtkReparentingProblem`vtkActor::RenderOpaqueGeometry(vtkViewport*) + 435* * frame #9: 0x00000001005caa87 VtkReparentingProblem`vtkOpenGLRenderer::UpdateGeometry() + 263* * frame #10: 0x00000001005ca945 VtkReparentingProblem`vtkOpenGLRenderer::DeviceRender() + 181* * frame #11: 0x00000001004cb96c VtkReparentingProblem`vtkRenderer::Render() + 604* * frame #12: 0x00000001004d08cc VtkReparentingProblem`vtkRendererCollection::Render() + 92* * frame #13: 0x00000001004c5d1a VtkReparentingProblem`vtkRenderWindow::DoStereoRender() + 138* * frame #14: 0x00000001004c5098 VtkReparentingProblem`vtkRenderWindow::Render() + 328* * frame #15: 0x00000001005c7816 VtkReparentingProblem`vtkOpenGLRenderWindow::Render() + 22* * frame #16: 0x00000001004c8f17 VtkReparentingProblem`vtkRenderWindowInteractor::Render() + 39* * frame #17: 0x00000001006831dd VtkReparentingProblem`QVTKWidget::paintEvent(QPaintEvent*) + 109* * frame #18: 0x0000000100bb73d6 QtWidgets`QWidget::event(QEvent*) + 1958* * frame #19: 0x0000000100683079 VtkReparentingProblem`QVTKWidget::event(QEvent*) + 281* * frame #20: 0x0000000100b7effc QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* * frame #21: 0x0000000100b81abb QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* * frame #22: 0x0000000101902932 QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* * frame #23: 0x0000000100bb2035 QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 2997* * frame #24: 0x0000000100b8aed0 QtWidgets`QWidgetPrivate::repaint_sys(QRegion const&) + 400* * frame #25: 0x0000000100bd4987 QtWidgets`QWidgetWindow::event(QEvent*) + 423* * frame #26: 0x0000000100b7effc QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* * frame #27: 0x0000000100b81abb QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* * frame #28: 0x0000000101902932 QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* * frame #29: 0x00000001011c4d7a QtGui`QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) + 314* * frame #30: 0x00000001011c08a7 QtGui`QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) + 951* * frame #31: 0x00000001011af1cb QtGui`QWindowSystemInterface::sendWindowSystemEvents(QFlags) + 315* * frame #32: 0x0000000104a39f0d libqcocoa.dylib`QCocoaEventDispatcherPrivate::processPostedEvents() + 317* * frame #33: 0x0000000104a3a8a8 libqcocoa.dylib`QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 40* * frame #34: 0x00007fff8f9e3a01 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17* * frame #35: 0x00007fff8f9d5b8d CoreFoundation`__CFRunLoopDoSources0 + 269* * frame #36: 0x00007fff8f9d51bf CoreFoundation`__CFRunLoopRun + 927* * frame #37: 0x00007fff8f9d4bd8 CoreFoundation`CFRunLoopRunSpecific + 296* * frame #38: 0x00007fff8b65f56f HIToolbox`RunCurrentEventLoopInMode + 235* * frame #39: 0x00007fff8b65f2ea HIToolbox`ReceiveNextEventCommon + 431* * frame #40: 0x00007fff8b65f12b HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71* * frame #41: 0x00007fff894cf8ab AppKit`_DPSNextEvent + 978* * frame #42: 0x00007fff894cee58 AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346* * frame #43: 0x00007fff894c4af3 AppKit`-[NSApplication run] + 594* * frame #44: 0x0000000104a395e4 libqcocoa.dylib`QCocoaEventDispatcher::processEvents(QFlags) + 2420* * frame #45: 0x00000001018ff9ad QtCore`QEventLoop::exec(QFlags) + 381* * frame #46: 0x0000000101902ee7 QtCore`QCoreApplication::exec() + 359* * frame #47: 0x0000000100005dab VtkReparentingProblem`main + 59* * frame #48: 0x0000000100005d64 VtkReparentingProblem`start + 52* */*******************************************************************************/* Any hints ? Regards, Simon 2015-11-17 9:27 GMT+01:00 Simon ESNEAULT : > Hello, > > After the switch to the new rendering backend, we have a crash on our > program after reparenting a QVTKWidget on OSX. The crash is in the > method vtkShaderProgram::FindUniform() but we suspect it is about the > OpenGL context not being ready on time for the next paintEvent with the new > parent. > > Attached is a program that reproduce the problem, as well as a complete > backtrace for this crash. This used to work fine with the previous backend. > > Hope this little test case helps > > Thanks > Simon > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Wed Nov 18 09:03:36 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Wed, 18 Nov 2015 07:03:36 -0700 (MST) Subject: [vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY In-Reply-To: References: <1447844506521-5735057.post@n5.nabble.com> Message-ID: <1447855416009-5735062.post@n5.nabble.com> Yup I know I'm leaking the vtkTransform in the above code, I just figured it was not relevant to the problem so I did not copy that part. What lines do you advise to uncomment exactly? Not sure I'm following you there. Also it does seem weird to me that this function gives me errors with the shaders while Prop3DTransform() (that is the same one as vtkInteractorStyleTrackballActor) does not -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735062.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Wed Nov 18 09:15:08 2015 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 18 Nov 2015 09:15:08 -0500 Subject: [vtkusers] VTK 6.3/OGL2/Qt5.3.2 : QVTKWidget regression, crash after "reparenting" a widget on OSX In-Reply-To: References: Message-ID: I know zippo about Qt, but the version 120 error means that VTK thinks it has an old OpenGL 2.1 context as opposed to a 3.2 context. There is a setting in vtkOpenGLRenderWindow to indicate that it has a 3.2 context On Wed, Nov 18, 2015 at 8:55 AM, Simon ESNEAULT wrote: > Hello, > > I've created a bug in Mantis for this > http://www.vtk.org/Bug/view.php?id=15840 > > Looking at the code in QVTKWidget.cxx, here is the part that may be > causing the problem, because it handles the reparenting part... > > > > */*******************************************************************************/* > *if(e->type() == QEvent::ParentAboutToChange)* > * {* > * this->markCachedImageAsDirty();* > * if (this->mRenWin)* > * {* > * // Finalize the window to remove graphics resources associated with* > * // this window* > * if(this->mRenWin->GetMapped())* > * {* > * this->mRenWin->Finalize();* > * }* > * }* > * }* > * else if(e->type() == QEvent::ParentChange)* > * {* > * if(this->mRenWin)* > * {* > * x11_setup_window();* > * // connect to new window* > * this->mRenWin->SetWindowId( > reinterpret_cast(this->winId()));* > > * // start up the window to create graphics resources for this window* > * if(isVisible())* > * {* > * this->mRenWin->Start();* > * }* > * }* > * }* > > */*******************************************************************************/* > > Were there any significant changes in the methods GetMapped() / Finalize() > / Start() of vtkRenderWindow (or children implementation) during the > development of the new rendering backend that may lead to such a crash : > > > > */*******************************************************************************/* > *ERROR: In > /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, > line 354* > *vtkShaderProgram (0x6000001809c0): 1: #version 120* > *2: #define highp* > *3: #define mediump* > *4: #define lowp* > *5: * > *6: > /*=========================================================================* > *7: * > *8: Program: Visualization Toolkit* > *9: Module: vtkPolyDataVS.glsl* > *10: * > *11: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen* > *12: All rights reserved.* > *13: See Copyright.txt or http://www.kitware.com/Copyright.htm > for details.* > *14: * > *15: This software is distributed WITHOUT ANY WARRANTY; without even* > *16: the implied warranty of MERCHANTABILITY or FITNESS FOR A > PARTICULAR* > *17: PURPOSE. See the above copyright notice for more information.* > *18: * > *19: > =========================================================================*/* > *20: * > *21: attribute vec4 vertexMC;* > *22: * > *23: // frag position in VC* > *24: varying vec4 vertexVCVSOutput;* > *25: * > *26: // optional normal declaration* > *27: attribute vec3 normalMC;* > *28: uniform mat3 normalMatrix;* > *29: varying vec3 normalVCVSOutput;* > *30: * > *31: // extra lighting parameters* > *32: //VTK::Light::Dec* > *33: * > *34: // Texture coordinates* > *35: //VTK::TCoord::Dec* > *36: * > *37: // material property values* > *38: //VTK::Color::Dec* > *39: * > *40: // clipping plane vars* > *41: //VTK::Clip::Dec* > *42: * > *43: // camera and actor matrix values* > *44: uniform mat4 MCDCMatrix;* > *45: uniform mat4 MCVCMatrix;* > *46: * > *47: // Apple Bug* > *48: //VTK::PrimID::Dec* > *49: * > *50: void main()* > *51: {* > *52: //VTK::Color::Impl* > *53: * > *54: normalVCVSOutput = normalMatrix * normalMC;* > *55: * > *56: //VTK::TCoord::Impl* > *57: * > *58: //VTK::Clip::Impl* > *59: * > *60: //VTK::PrimID::Impl* > *61: * > *62: vertexVCVSOutput = MCVCMatrix * vertexMC;* > *63: gl_Position = MCDCMatrix * vertexMC;* > *64: * > *65: * > *66: //VTK::Light::Impl* > *67: }* > *68: * > > > *ERROR: In > /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, > line 355* > *vtkShaderProgram (0x6000001809c0): ERROR: 0:1: '' : version '120' is not > supported* > *ERROR: 0:2: '' : #version required and missing.* > *ERROR: 0:21: 'attribute' : syntax error: syntax error* > > > *(lldb) bt* > ** thread #1: tid = 0x600e30, 0x0000000100609f1f > VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31, > queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, > address=0x60)* > * * frame #0: 0x0000000100609f1f > VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31* > * frame #1: 0x00000001006074ab > VtkReparentingProblem`vtkShaderProgram::SetUniformi(char const*, int) + 27* > * frame #2: 0x00000001005b8c28 > VtkReparentingProblem`vtkOpenGLPolyDataMapper::SetMapperShaderParameters(vtkOpenGLHelper&, > vtkRenderer*, vtkActor*) + 72* > * frame #3: 0x00000001005b8b1b > VtkReparentingProblem`vtkOpenGLPolyDataMapper::UpdateShaders(vtkOpenGLHelper&, > vtkRenderer*, vtkActor*) + 1211* > * frame #4: 0x00000001005bb782 > VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPieceDraw(vtkRenderer*, > vtkActor*) + 818* > * frame #5: 0x00000001005bbbe3 > VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPiece(vtkRenderer*, > vtkActor*) + 195* > * frame #6: 0x00000001004ba1fe > VtkReparentingProblem`vtkPolyDataMapper::Render(vtkRenderer*, vtkActor*) + > 174* > * frame #7: 0x0000000100561be0 > VtkReparentingProblem`vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) + > 144* > * frame #8: 0x00000001004667c3 > VtkReparentingProblem`vtkActor::RenderOpaqueGeometry(vtkViewport*) + 435* > * frame #9: 0x00000001005caa87 > VtkReparentingProblem`vtkOpenGLRenderer::UpdateGeometry() + 263* > * frame #10: 0x00000001005ca945 > VtkReparentingProblem`vtkOpenGLRenderer::DeviceRender() + 181* > * frame #11: 0x00000001004cb96c > VtkReparentingProblem`vtkRenderer::Render() + 604* > * frame #12: 0x00000001004d08cc > VtkReparentingProblem`vtkRendererCollection::Render() + 92* > * frame #13: 0x00000001004c5d1a > VtkReparentingProblem`vtkRenderWindow::DoStereoRender() + 138* > * frame #14: 0x00000001004c5098 > VtkReparentingProblem`vtkRenderWindow::Render() + 328* > * frame #15: 0x00000001005c7816 > VtkReparentingProblem`vtkOpenGLRenderWindow::Render() + 22* > * frame #16: 0x00000001004c8f17 > VtkReparentingProblem`vtkRenderWindowInteractor::Render() + 39* > * frame #17: 0x00000001006831dd > VtkReparentingProblem`QVTKWidget::paintEvent(QPaintEvent*) + 109* > * frame #18: 0x0000000100bb73d6 QtWidgets`QWidget::event(QEvent*) + > 1958* > * frame #19: 0x0000000100683079 > VtkReparentingProblem`QVTKWidget::event(QEvent*) + 281* > * frame #20: 0x0000000100b7effc > QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* > * frame #21: 0x0000000100b81abb > QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* > * frame #22: 0x0000000101902932 > QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* > * frame #23: 0x0000000100bb2035 > QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint > const&, int, QPainter*, QWidgetBackingStore*) + 2997* > * frame #24: 0x0000000100b8aed0 > QtWidgets`QWidgetPrivate::repaint_sys(QRegion const&) + 400* > * frame #25: 0x0000000100bd4987 QtWidgets`QWidgetWindow::event(QEvent*) > + 423* > * frame #26: 0x0000000100b7effc > QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* > * frame #27: 0x0000000100b81abb > QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* > * frame #28: 0x0000000101902932 > QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* > * frame #29: 0x00000001011c4d7a > QtGui`QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) > + 314* > * frame #30: 0x00000001011c08a7 > QtGui`QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) > + 951* > * frame #31: 0x00000001011af1cb > QtGui`QWindowSystemInterface::sendWindowSystemEvents(QFlags) > + 315* > * frame #32: 0x0000000104a39f0d > libqcocoa.dylib`QCocoaEventDispatcherPrivate::processPostedEvents() + 317* > * frame #33: 0x0000000104a3a8a8 > libqcocoa.dylib`QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) > + 40* > * frame #34: 0x00007fff8f9e3a01 > CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + > 17* > * frame #35: 0x00007fff8f9d5b8d CoreFoundation`__CFRunLoopDoSources0 + > 269* > * frame #36: 0x00007fff8f9d51bf CoreFoundation`__CFRunLoopRun + 927* > * frame #37: 0x00007fff8f9d4bd8 CoreFoundation`CFRunLoopRunSpecific + > 296* > * frame #38: 0x00007fff8b65f56f HIToolbox`RunCurrentEventLoopInMode + > 235* > * frame #39: 0x00007fff8b65f2ea HIToolbox`ReceiveNextEventCommon + 431* > * frame #40: 0x00007fff8b65f12b > HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71* > * frame #41: 0x00007fff894cf8ab AppKit`_DPSNextEvent + 978* > * frame #42: 0x00007fff894cee58 AppKit`-[NSApplication > nextEventMatchingMask:untilDate:inMode:dequeue:] + 346* > * frame #43: 0x00007fff894c4af3 AppKit`-[NSApplication run] + 594* > * frame #44: 0x0000000104a395e4 > libqcocoa.dylib`QCocoaEventDispatcher::processEvents(QFlags) > + 2420* > * frame #45: 0x00000001018ff9ad > QtCore`QEventLoop::exec(QFlags) + 381* > * frame #46: 0x0000000101902ee7 QtCore`QCoreApplication::exec() + 359* > * frame #47: 0x0000000100005dab VtkReparentingProblem`main + 59* > * frame #48: 0x0000000100005d64 VtkReparentingProblem`start + 52* > > > */*******************************************************************************/* > > Any hints ? > > Regards, > Simon > > 2015-11-17 9:27 GMT+01:00 Simon ESNEAULT : > >> Hello, >> >> After the switch to the new rendering backend, we have a crash on our >> program after reparenting a QVTKWidget on OSX. The crash is in the >> method vtkShaderProgram::FindUniform() but we suspect it is about the >> OpenGL context not being ready on time for the next paintEvent with the new >> parent. >> >> Attached is a program that reproduce the problem, as well as a complete >> backtrace for this crash. This used to work fine with the previous backend. >> >> Hope this little test case helps >> >> Thanks >> Simon >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed Nov 18 09:21:57 2015 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 18 Nov 2015 09:21:57 -0500 Subject: [vtkusers] VTK 6.3/OGL2/Qt5.3.2 : QVTKWidget regression, crash after "reparenting" a widget on OSX In-Reply-To: References: Message-ID: (sorry for the half written email, switching to the gmail web interface has me messing up) I know zippo about Qt, but the version 120 error means that VTK thinks it has an old OpenGL 2.1 context as opposed to a 3.2 context. There is a setting in vtkOpenGLRenderWindow to indicate that it has a 3.2 context // Description:: // Get if the context includes opengl core profile 3.2 support static bool GetContextSupportsOpenGL32(); void SetContextSupportsOpenGL32(bool val); it could be that the vtk Qt class is creating a 3.2 context but not setting the above methods to true? Or maybe somehow not calling void vtkOpenGLRenderWindow::OpenGLInitContext() Just a guess. Thanks Ken On Wed, Nov 18, 2015 at 9:15 AM, Ken Martin wrote: > I know zippo about Qt, but the version 120 error means that VTK thinks it > has an old OpenGL 2.1 context as opposed to a 3.2 context. There is a > setting in vtkOpenGLRenderWindow to indicate that it has a 3.2 context > > > On Wed, Nov 18, 2015 at 8:55 AM, Simon ESNEAULT > wrote: > >> Hello, >> >> I've created a bug in Mantis for this >> http://www.vtk.org/Bug/view.php?id=15840 >> >> Looking at the code in QVTKWidget.cxx, here is the part that may be >> causing the problem, because it handles the reparenting part... >> >> >> >> */*******************************************************************************/* >> *if(e->type() == QEvent::ParentAboutToChange)* >> * {* >> * this->markCachedImageAsDirty();* >> * if (this->mRenWin)* >> * {* >> * // Finalize the window to remove graphics resources associated >> with* >> * // this window* >> * if(this->mRenWin->GetMapped())* >> * {* >> * this->mRenWin->Finalize();* >> * }* >> * }* >> * }* >> * else if(e->type() == QEvent::ParentChange)* >> * {* >> * if(this->mRenWin)* >> * {* >> * x11_setup_window();* >> * // connect to new window* >> * this->mRenWin->SetWindowId( >> reinterpret_cast(this->winId()));* >> >> * // start up the window to create graphics resources for this >> window* >> * if(isVisible())* >> * {* >> * this->mRenWin->Start();* >> * }* >> * }* >> * }* >> >> */*******************************************************************************/* >> >> Were there any significant changes in the methods GetMapped() / >> Finalize() / Start() of vtkRenderWindow (or children implementation) during >> the development of the new rendering backend that may lead to such a crash >> : >> >> >> >> */*******************************************************************************/* >> *ERROR: In >> /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, >> line 354* >> *vtkShaderProgram (0x6000001809c0): 1: #version 120* >> *2: #define highp* >> *3: #define mediump* >> *4: #define lowp* >> *5: * >> *6: >> /*=========================================================================* >> *7: * >> *8: Program: Visualization Toolkit* >> *9: Module: vtkPolyDataVS.glsl* >> *10: * >> *11: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen* >> *12: All rights reserved.* >> *13: See Copyright.txt or http://www.kitware.com/Copyright.htm >> for details.* >> *14: * >> *15: This software is distributed WITHOUT ANY WARRANTY; without even* >> *16: the implied warranty of MERCHANTABILITY or FITNESS FOR A >> PARTICULAR* >> *17: PURPOSE. See the above copyright notice for more information.* >> *18: * >> *19: >> =========================================================================*/* >> *20: * >> *21: attribute vec4 vertexMC;* >> *22: * >> *23: // frag position in VC* >> *24: varying vec4 vertexVCVSOutput;* >> *25: * >> *26: // optional normal declaration* >> *27: attribute vec3 normalMC;* >> *28: uniform mat3 normalMatrix;* >> *29: varying vec3 normalVCVSOutput;* >> *30: * >> *31: // extra lighting parameters* >> *32: //VTK::Light::Dec* >> *33: * >> *34: // Texture coordinates* >> *35: //VTK::TCoord::Dec* >> *36: * >> *37: // material property values* >> *38: //VTK::Color::Dec* >> *39: * >> *40: // clipping plane vars* >> *41: //VTK::Clip::Dec* >> *42: * >> *43: // camera and actor matrix values* >> *44: uniform mat4 MCDCMatrix;* >> *45: uniform mat4 MCVCMatrix;* >> *46: * >> *47: // Apple Bug* >> *48: //VTK::PrimID::Dec* >> *49: * >> *50: void main()* >> *51: {* >> *52: //VTK::Color::Impl* >> *53: * >> *54: normalVCVSOutput = normalMatrix * normalMC;* >> *55: * >> *56: //VTK::TCoord::Impl* >> *57: * >> *58: //VTK::Clip::Impl* >> *59: * >> *60: //VTK::PrimID::Impl* >> *61: * >> *62: vertexVCVSOutput = MCVCMatrix * vertexMC;* >> *63: gl_Position = MCDCMatrix * vertexMC;* >> *64: * >> *65: * >> *66: //VTK::Light::Impl* >> *67: }* >> *68: * >> >> >> *ERROR: In >> /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, >> line 355* >> *vtkShaderProgram (0x6000001809c0): ERROR: 0:1: '' : version '120' is >> not supported* >> *ERROR: 0:2: '' : #version required and missing.* >> *ERROR: 0:21: 'attribute' : syntax error: syntax error* >> >> >> *(lldb) bt* >> ** thread #1: tid = 0x600e30, 0x0000000100609f1f >> VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31, >> queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, >> address=0x60)* >> * * frame #0: 0x0000000100609f1f >> VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31* >> * frame #1: 0x00000001006074ab >> VtkReparentingProblem`vtkShaderProgram::SetUniformi(char const*, int) + 27* >> * frame #2: 0x00000001005b8c28 >> VtkReparentingProblem`vtkOpenGLPolyDataMapper::SetMapperShaderParameters(vtkOpenGLHelper&, >> vtkRenderer*, vtkActor*) + 72* >> * frame #3: 0x00000001005b8b1b >> VtkReparentingProblem`vtkOpenGLPolyDataMapper::UpdateShaders(vtkOpenGLHelper&, >> vtkRenderer*, vtkActor*) + 1211* >> * frame #4: 0x00000001005bb782 >> VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPieceDraw(vtkRenderer*, >> vtkActor*) + 818* >> * frame #5: 0x00000001005bbbe3 >> VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPiece(vtkRenderer*, >> vtkActor*) + 195* >> * frame #6: 0x00000001004ba1fe >> VtkReparentingProblem`vtkPolyDataMapper::Render(vtkRenderer*, vtkActor*) + >> 174* >> * frame #7: 0x0000000100561be0 >> VtkReparentingProblem`vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) + >> 144* >> * frame #8: 0x00000001004667c3 >> VtkReparentingProblem`vtkActor::RenderOpaqueGeometry(vtkViewport*) + 435* >> * frame #9: 0x00000001005caa87 >> VtkReparentingProblem`vtkOpenGLRenderer::UpdateGeometry() + 263* >> * frame #10: 0x00000001005ca945 >> VtkReparentingProblem`vtkOpenGLRenderer::DeviceRender() + 181* >> * frame #11: 0x00000001004cb96c >> VtkReparentingProblem`vtkRenderer::Render() + 604* >> * frame #12: 0x00000001004d08cc >> VtkReparentingProblem`vtkRendererCollection::Render() + 92* >> * frame #13: 0x00000001004c5d1a >> VtkReparentingProblem`vtkRenderWindow::DoStereoRender() + 138* >> * frame #14: 0x00000001004c5098 >> VtkReparentingProblem`vtkRenderWindow::Render() + 328* >> * frame #15: 0x00000001005c7816 >> VtkReparentingProblem`vtkOpenGLRenderWindow::Render() + 22* >> * frame #16: 0x00000001004c8f17 >> VtkReparentingProblem`vtkRenderWindowInteractor::Render() + 39* >> * frame #17: 0x00000001006831dd >> VtkReparentingProblem`QVTKWidget::paintEvent(QPaintEvent*) + 109* >> * frame #18: 0x0000000100bb73d6 QtWidgets`QWidget::event(QEvent*) + >> 1958* >> * frame #19: 0x0000000100683079 >> VtkReparentingProblem`QVTKWidget::event(QEvent*) + 281* >> * frame #20: 0x0000000100b7effc >> QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* >> * frame #21: 0x0000000100b81abb >> QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* >> * frame #22: 0x0000000101902932 >> QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* >> * frame #23: 0x0000000100bb2035 >> QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint >> const&, int, QPainter*, QWidgetBackingStore*) + 2997* >> * frame #24: 0x0000000100b8aed0 >> QtWidgets`QWidgetPrivate::repaint_sys(QRegion const&) + 400* >> * frame #25: 0x0000000100bd4987 >> QtWidgets`QWidgetWindow::event(QEvent*) + 423* >> * frame #26: 0x0000000100b7effc >> QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* >> * frame #27: 0x0000000100b81abb >> QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* >> * frame #28: 0x0000000101902932 >> QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* >> * frame #29: 0x00000001011c4d7a >> QtGui`QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) >> + 314* >> * frame #30: 0x00000001011c08a7 >> QtGui`QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) >> + 951* >> * frame #31: 0x00000001011af1cb >> QtGui`QWindowSystemInterface::sendWindowSystemEvents(QFlags) >> + 315* >> * frame #32: 0x0000000104a39f0d >> libqcocoa.dylib`QCocoaEventDispatcherPrivate::processPostedEvents() + 317* >> * frame #33: 0x0000000104a3a8a8 >> libqcocoa.dylib`QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) >> + 40* >> * frame #34: 0x00007fff8f9e3a01 >> CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + >> 17* >> * frame #35: 0x00007fff8f9d5b8d CoreFoundation`__CFRunLoopDoSources0 + >> 269* >> * frame #36: 0x00007fff8f9d51bf CoreFoundation`__CFRunLoopRun + 927* >> * frame #37: 0x00007fff8f9d4bd8 CoreFoundation`CFRunLoopRunSpecific + >> 296* >> * frame #38: 0x00007fff8b65f56f HIToolbox`RunCurrentEventLoopInMode + >> 235* >> * frame #39: 0x00007fff8b65f2ea HIToolbox`ReceiveNextEventCommon + 431* >> * frame #40: 0x00007fff8b65f12b >> HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71* >> * frame #41: 0x00007fff894cf8ab AppKit`_DPSNextEvent + 978* >> * frame #42: 0x00007fff894cee58 AppKit`-[NSApplication >> nextEventMatchingMask:untilDate:inMode:dequeue:] + 346* >> * frame #43: 0x00007fff894c4af3 AppKit`-[NSApplication run] + 594* >> * frame #44: 0x0000000104a395e4 >> libqcocoa.dylib`QCocoaEventDispatcher::processEvents(QFlags) >> + 2420* >> * frame #45: 0x00000001018ff9ad >> QtCore`QEventLoop::exec(QFlags) + 381* >> * frame #46: 0x0000000101902ee7 QtCore`QCoreApplication::exec() + 359* >> * frame #47: 0x0000000100005dab VtkReparentingProblem`main + 59* >> * frame #48: 0x0000000100005d64 VtkReparentingProblem`start + 52* >> >> >> */*******************************************************************************/* >> >> Any hints ? >> >> Regards, >> Simon >> >> 2015-11-17 9:27 GMT+01:00 Simon ESNEAULT : >> >>> Hello, >>> >>> After the switch to the new rendering backend, we have a crash on our >>> program after reparenting a QVTKWidget on OSX. The crash is in the >>> method vtkShaderProgram::FindUniform() but we suspect it is about the >>> OpenGL context not being ready on time for the next paintEvent with the new >>> parent. >>> >>> Attached is a program that reproduce the problem, as well as a complete >>> backtrace for this crash. This used to work fine with the previous backend. >>> >>> Hope this little test case helps >>> >>> Thanks >>> Simon >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bakkari.abdelkhalek at gmail.com Wed Nov 18 09:28:04 2015 From: bakkari.abdelkhalek at gmail.com (Bakkari Abdelkhalek) Date: Wed, 18 Nov 2015 15:28:04 +0100 Subject: [vtkusers] =?utf-8?q?VTK_edge_Paint_Brush=E2=80=8F?= Message-ID: Dear VTK users, I am trying to include the VTK edge -Paint Brush- to my interface. Could you tell me the steps of using VTK edge like in the test 1 of the following link : http://vtkedge.sourcearchive.com/documentation/0.1.0-3/PaintbrushTest1_8cxx-source.html Best regards, -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Wed Nov 18 10:59:46 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 18 Nov 2015 10:59:46 -0500 Subject: [vtkusers] vtkBooleanPolyDataFilter? In-Reply-To: References: <1447839224484-5735056.post@n5.nabble.com> Message-ID: A possible workaround is to convert your 3D objects into volumetric image representation (example ) using the same voxel lattice (same spacing, extent and origin). You can then do voxel-by-voxel Boolean operations and convert resulting image back into the polygonal representation using marching cubes . In the choice of spacing, there is a trade-off between loss of quality on one side and memory requirements and processing time on the other. You can also implement your own filter for Boolean operations of non-intersecting meshes. In case the meshes do not intersect, the operations are somewhat trivial: - concentric objects, intersection: keep the inner object without modifications - concentric objects, difference: invert normals of the inner object and append it to the outer object (the case you described) - disjoint objects, intersection: empty set - disjoint objects, difference: keep one of the objects without modifications, discard the other The non-trivial part is detecting which case is it (intersecting, concentric or disjoint meshes). HTH On Wed, Nov 18, 2015 at 7:52 AM, Cory Quammen wrote: > You are correct in assuming that the filter requires overlap. It sounds > like you want a method that computes Boolean operations on volume meshes. > I'm not aware of a filter that does that. > > Cory > On Nov 18, 2015 4:33 AM, "mbcx9rb9" wrote: > >> Hi all, >> >> I want to create a volume, which is a margin around a previously existing >> volume. >> >> I had initially thought to use vtkBooleanPolyDataFilter, except for two >> sphere sources with matching centres but differing radii, >> SetOperationToDifference returns nothing, but I was hoping that it would >> return a spherical shell. >> >> Looking at the example, >> Examples/Cxx/PolyData/BooleanOperationPolyDataFilter, I get the impression >> that there needs to be intersection between the two polydata, so I guess >> this method won't work for concentric objects. >> >> Can anyone suggest a way to create a polydata shell? At the moment, I will >> settle for methods that only work for vtkSphereSource, but in the future, >> I'll need to be able to extend this to more generic shapes. >> >> Thanks in advance for the help. >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/vtkBooleanPolyDataFilter-tp5735056.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 >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Wed Nov 18 11:07:35 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 18 Nov 2015 11:07:35 -0500 Subject: [vtkusers] An Issue About Cmake and Building VTK 6.2 or 6.3 on VS2010 In-Reply-To: <000001d11d07$654f7de0$2fee79a0$@163.com> References: <69a02432.1226e.150f75a7597.Coremail.hongsongyang@163.com> <20151111185851.GB3519@megas.khq.kitware.com> <000001d11d07$654f7de0$2fee79a0$@163.com> Message-ID: <20151118160735.GB24519@megas.khq.kitware.com> On Thu, Nov 12, 2015 at 13:02:55 +0800, HongSongyang wrote: > Thank you for your reply. It seems this issue has been solved after I add -6.3 to the VTK_CUSTOM_LIBRARY_SUFFIX. > It's quite abnormal that why sometimes this prefix is same with VTK version but sometimes it is blank? > Do you know why? Not off hand, no. Digging through the CMakeCache might glean some information though. --Ben From dzenanz at gmail.com Wed Nov 18 11:13:01 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Wed, 18 Nov 2015 11:13:01 -0500 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <1447628907554-5734986.post@n5.nabble.com> References: <56324268.7080701@rhpcs.mcmaster.ca> <5632525C.6000600@rhpcs.mcmaster.ca> <5632585A.4000005@rhpcs.mcmaster.ca> <1447432321076-5734971.post@n5.nabble.com> <56461618.5090102@rhpcs.mcmaster.ca> <1447628907554-5734986.post@n5.nabble.com> Message-ID: Hi David, you could work around the issue by having one image, where low values represent normal brain tissue and high values represent a lesion. Then make a transfer function which assigns gray color to low values, and red color to high values. And please report back with the outcome and possibly some screenshots. Regards, D?enan On Sun, Nov 15, 2015 at 6:08 PM, dewarren wrote: > Weiguang, thanks for the tip ? that's interesting. It's possible such a > solution could work for my needs. Unfortunately, my first attempt to > implement it didn't work. I think that the answer may lie in VTK's > definition of a volume. > > Briefly, the back-to-front rendering solution could work for me depending > on > what the following means: "multiple volumes do not overlap in 3D space". > If > that means that two "volumes" (I'm using the term loosely because of my > ignorance) can be rendered correctly so long as they don't occupy any > common > voxels, I think it can work. If it instead means that two volumes can be > rendered correctly only so long as their bounding boxes do not intersect, > then it won't work. > > For example, if I have a brain template and a map of a brain lesion on that > template, I could create two arrays that represent the intact and lesioned > parts of the brain, and then apply unique transfer functions to each for > display (coloring the intact brain in grayscale and the lesion in red, > say). > The intact and lesioned brain regions would not overlap in space, but they > would be adjacent, have a complex boundary, and have overlapping bounding > boxes. Would it be possible to render this scene with VTK currently? > > Many thanks! > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5734986.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Wed Nov 18 11:21:55 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Wed, 18 Nov 2015 11:21:55 -0500 Subject: [vtkusers] build with all modules except XYZ In-Reply-To: References: Message-ID: <20151118162155.GD24519@megas.khq.kitware.com> On Mon, Nov 16, 2015 at 09:19:05 +0000, Nico Schl?mer wrote: > I'd like to build VTK with all modules except a specific one. What's the > CMake configuration for this? I've tried > ``` > -DVTK_BUILD_ALL_MODULES=ON \ > -DModule_vtkIOXdmf3=OFF \ > ``` > to no avail: > ``` > > -- * vtkIOXdmf3, requested by VTK_BUILD_ALL_MODULES. > > ``` There's no shorthand for this. You'll have to get the list of modules from CMake (or scraping module.cmake files, or using find/replace on the CMakeCache.txt) and turn all but that one. Lots belong to groups, so turning on the groups should reduce the number of explicit module flags you'll need to give. It'd be nice if the module flags were tristate: - ON: build the module - OFF: don't build the module - DEFAULT: build if required by another module and then error if an ON module requires an OFF module (and if testing is enabled, possibly turning of the test modules that require it if that's all there is). But that's not the way it currently is implemented :( . --Ben From richard.j.brown at live.co.uk Wed Nov 18 11:22:36 2015 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 18 Nov 2015 09:22:36 -0700 (MST) Subject: [vtkusers] vtkBooleanPolyDataFilter? In-Reply-To: References: <1447839224484-5735056.post@n5.nabble.com> Message-ID: <1447863756233-5735076.post@n5.nabble.com> In this case vtkReverseSense and vtkAppendPolyData were exactly what I was looking for. Thanks for the help both of you. Rich -- View this message in context: http://vtk.1045678.n5.nabble.com/vtkBooleanPolyDataFilter-tp5735056p5735076.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Wed Nov 18 11:34:19 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 18 Nov 2015 11:34:19 -0500 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: References: <56324268.7080701@rhpcs.mcmaster.ca> <5632525C.6000600@rhpcs.mcmaster.ca> <5632585A.4000005@rhpcs.mcmaster.ca> <1447432321076-5734971.post@n5.nabble.com> <56461618.5090102@rhpcs.mcmaster.ca> <1447628907554-5734986.post@n5.nabble.com> Message-ID: Yes, you could combine two one component data into one two component data and apply the transfer function appropriately. You can also chose to do independent or dependent components then. Have a look at these tests: https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastTwoComponentsDependent.cxx and here: https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/Volume/Testing/Cxx/TestGPURayCastThreeComponentsIndependent.cxx Thanks, On Wed, Nov 18, 2015 at 11:13 AM, D?enan Zuki? wrote: > Hi David, > > you could work around the issue by having one image, where low values > represent normal brain tissue and high values represent a lesion. Then make > a transfer function which assigns gray color to low values, and red color > to high values. And please report back with the outcome and possibly some > screenshots. > > Regards, > D?enan > > On Sun, Nov 15, 2015 at 6:08 PM, dewarren > wrote: > >> Weiguang, thanks for the tip ? that's interesting. It's possible such a >> solution could work for my needs. Unfortunately, my first attempt to >> implement it didn't work. I think that the answer may lie in VTK's >> definition of a volume. >> >> Briefly, the back-to-front rendering solution could work for me depending >> on >> what the following means: "multiple volumes do not overlap in 3D space". >> If >> that means that two "volumes" (I'm using the term loosely because of my >> ignorance) can be rendered correctly so long as they don't occupy any >> common >> voxels, I think it can work. If it instead means that two volumes can be >> rendered correctly only so long as their bounding boxes do not intersect, >> then it won't work. >> >> For example, if I have a brain template and a map of a brain lesion on >> that >> template, I could create two arrays that represent the intact and lesioned >> parts of the brain, and then apply unique transfer functions to each for >> display (coloring the intact brain in grayscale and the lesion in red, >> say). >> The intact and lesioned brain regions would not overlap in space, but they >> would be adjacent, have a complex boundary, and have overlapping bounding >> boxes. Would it be possible to render this scene with VTK currently? >> >> Many thanks! >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5734986.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 >> > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Wed Nov 18 11:36:50 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Wed, 18 Nov 2015 17:36:50 +0100 Subject: [vtkusers] VTK 6.3/OGL2/Qt5.3.2 : QVTKWidget regression, crash after "reparenting" a widget on OSX In-Reply-To: References: Message-ID: Hello Ken, A colleague has just found a solution that prevent the crash. Here is the patch: //---------------------------------------------------------------------------- --- VTK/Rendering/OpenGL2/vtkCocoaRenderWindow.mm Wed Nov 18 17:25:01 2015 +++ VTK/Rendering/OpenGL2/vtkCocoaRenderWindow.mm Wed Nov 18 17:29:12 2015 @@ -309,6 +309,7 @@ this->SetRootWindow(NULL); this->WindowCreated = 0; this->ViewCreated = 0; + this->ReleaseGraphicsResources(); } //---------------------------------------------------------------------------- It just add a call to this->ReleaseGraphicsResources() at the end of the DestroyWindow() method in vtkCocoaRenderWindow implementation, which is called by the Finalize() method. He found out this solution because this method is called in the Finalize() method on the WIN32 implementation, and there is no crash in Windows... Do you think it is the correct fix? Or can this cause some unwanted side effects ? Regards Simon 2015-11-18 15:21 GMT+01:00 Ken Martin : > (sorry for the half written email, switching to the gmail web interface > has me messing up) > > I know zippo about Qt, but the version 120 error means that VTK thinks it > has an old OpenGL 2.1 context as opposed to a 3.2 context. There is a > setting in vtkOpenGLRenderWindow to indicate that it has a 3.2 context > > > // Description:: > // Get if the context includes opengl core profile 3.2 support > static bool GetContextSupportsOpenGL32(); > void SetContextSupportsOpenGL32(bool val); > > it could be that the vtk Qt class is creating a 3.2 context but not > setting the above methods to true? Or maybe somehow not calling void > vtkOpenGLRenderWindow::OpenGLInitContext() > > Just a guess. > > Thanks > Ken > > > > On Wed, Nov 18, 2015 at 9:15 AM, Ken Martin > wrote: > >> I know zippo about Qt, but the version 120 error means that VTK thinks it >> has an old OpenGL 2.1 context as opposed to a 3.2 context. There is a >> setting in vtkOpenGLRenderWindow to indicate that it has a 3.2 context >> >> >> On Wed, Nov 18, 2015 at 8:55 AM, Simon ESNEAULT > > wrote: >> >>> Hello, >>> >>> I've created a bug in Mantis for this >>> http://www.vtk.org/Bug/view.php?id=15840 >>> >>> Looking at the code in QVTKWidget.cxx, here is the part that may be >>> causing the problem, because it handles the reparenting part... >>> >>> >>> >>> */*******************************************************************************/* >>> *if(e->type() == QEvent::ParentAboutToChange)* >>> * {* >>> * this->markCachedImageAsDirty();* >>> * if (this->mRenWin)* >>> * {* >>> * // Finalize the window to remove graphics resources associated >>> with* >>> * // this window* >>> * if(this->mRenWin->GetMapped())* >>> * {* >>> * this->mRenWin->Finalize();* >>> * }* >>> * }* >>> * }* >>> * else if(e->type() == QEvent::ParentChange)* >>> * {* >>> * if(this->mRenWin)* >>> * {* >>> * x11_setup_window();* >>> * // connect to new window* >>> * this->mRenWin->SetWindowId( >>> reinterpret_cast(this->winId()));* >>> >>> * // start up the window to create graphics resources for this >>> window* >>> * if(isVisible())* >>> * {* >>> * this->mRenWin->Start();* >>> * }* >>> * }* >>> * }* >>> >>> */*******************************************************************************/* >>> >>> Were there any significant changes in the methods GetMapped() / >>> Finalize() / Start() of vtkRenderWindow (or children implementation) during >>> the development of the new rendering backend that may lead to such a crash >>> : >>> >>> >>> >>> */*******************************************************************************/* >>> *ERROR: In >>> /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, >>> line 354* >>> *vtkShaderProgram (0x6000001809c0): 1: #version 120* >>> *2: #define highp* >>> *3: #define mediump* >>> *4: #define lowp* >>> *5: * >>> *6: >>> /*=========================================================================* >>> *7: * >>> *8: Program: Visualization Toolkit* >>> *9: Module: vtkPolyDataVS.glsl* >>> *10: * >>> *11: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen* >>> *12: All rights reserved.* >>> *13: See Copyright.txt or http://www.kitware.com/Copyright.htm >>> for details.* >>> *14: * >>> *15: This software is distributed WITHOUT ANY WARRANTY; without >>> even* >>> *16: the implied warranty of MERCHANTABILITY or FITNESS FOR A >>> PARTICULAR* >>> *17: PURPOSE. See the above copyright notice for more information.* >>> *18: * >>> *19: >>> =========================================================================*/* >>> *20: * >>> *21: attribute vec4 vertexMC;* >>> *22: * >>> *23: // frag position in VC* >>> *24: varying vec4 vertexVCVSOutput;* >>> *25: * >>> *26: // optional normal declaration* >>> *27: attribute vec3 normalMC;* >>> *28: uniform mat3 normalMatrix;* >>> *29: varying vec3 normalVCVSOutput;* >>> *30: * >>> *31: // extra lighting parameters* >>> *32: //VTK::Light::Dec* >>> *33: * >>> *34: // Texture coordinates* >>> *35: //VTK::TCoord::Dec* >>> *36: * >>> *37: // material property values* >>> *38: //VTK::Color::Dec* >>> *39: * >>> *40: // clipping plane vars* >>> *41: //VTK::Clip::Dec* >>> *42: * >>> *43: // camera and actor matrix values* >>> *44: uniform mat4 MCDCMatrix;* >>> *45: uniform mat4 MCVCMatrix;* >>> *46: * >>> *47: // Apple Bug* >>> *48: //VTK::PrimID::Dec* >>> *49: * >>> *50: void main()* >>> *51: {* >>> *52: //VTK::Color::Impl* >>> *53: * >>> *54: normalVCVSOutput = normalMatrix * normalMC;* >>> *55: * >>> *56: //VTK::TCoord::Impl* >>> *57: * >>> *58: //VTK::Clip::Impl* >>> *59: * >>> *60: //VTK::PrimID::Impl* >>> *61: * >>> *62: vertexVCVSOutput = MCVCMatrix * vertexMC;* >>> *63: gl_Position = MCDCMatrix * vertexMC;* >>> *64: * >>> *65: * >>> *66: //VTK::Light::Impl* >>> *67: }* >>> *68: * >>> >>> >>> *ERROR: In >>> /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, >>> line 355* >>> *vtkShaderProgram (0x6000001809c0): ERROR: 0:1: '' : version '120' is >>> not supported* >>> *ERROR: 0:2: '' : #version required and missing.* >>> *ERROR: 0:21: 'attribute' : syntax error: syntax error* >>> >>> >>> *(lldb) bt* >>> ** thread #1: tid = 0x600e30, 0x0000000100609f1f >>> VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31, >>> queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, >>> address=0x60)* >>> * * frame #0: 0x0000000100609f1f >>> VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31* >>> * frame #1: 0x00000001006074ab >>> VtkReparentingProblem`vtkShaderProgram::SetUniformi(char const*, int) + 27* >>> * frame #2: 0x00000001005b8c28 >>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::SetMapperShaderParameters(vtkOpenGLHelper&, >>> vtkRenderer*, vtkActor*) + 72* >>> * frame #3: 0x00000001005b8b1b >>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::UpdateShaders(vtkOpenGLHelper&, >>> vtkRenderer*, vtkActor*) + 1211* >>> * frame #4: 0x00000001005bb782 >>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPieceDraw(vtkRenderer*, >>> vtkActor*) + 818* >>> * frame #5: 0x00000001005bbbe3 >>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPiece(vtkRenderer*, >>> vtkActor*) + 195* >>> * frame #6: 0x00000001004ba1fe >>> VtkReparentingProblem`vtkPolyDataMapper::Render(vtkRenderer*, vtkActor*) + >>> 174* >>> * frame #7: 0x0000000100561be0 >>> VtkReparentingProblem`vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) + >>> 144* >>> * frame #8: 0x00000001004667c3 >>> VtkReparentingProblem`vtkActor::RenderOpaqueGeometry(vtkViewport*) + 435* >>> * frame #9: 0x00000001005caa87 >>> VtkReparentingProblem`vtkOpenGLRenderer::UpdateGeometry() + 263* >>> * frame #10: 0x00000001005ca945 >>> VtkReparentingProblem`vtkOpenGLRenderer::DeviceRender() + 181* >>> * frame #11: 0x00000001004cb96c >>> VtkReparentingProblem`vtkRenderer::Render() + 604* >>> * frame #12: 0x00000001004d08cc >>> VtkReparentingProblem`vtkRendererCollection::Render() + 92* >>> * frame #13: 0x00000001004c5d1a >>> VtkReparentingProblem`vtkRenderWindow::DoStereoRender() + 138* >>> * frame #14: 0x00000001004c5098 >>> VtkReparentingProblem`vtkRenderWindow::Render() + 328* >>> * frame #15: 0x00000001005c7816 >>> VtkReparentingProblem`vtkOpenGLRenderWindow::Render() + 22* >>> * frame #16: 0x00000001004c8f17 >>> VtkReparentingProblem`vtkRenderWindowInteractor::Render() + 39* >>> * frame #17: 0x00000001006831dd >>> VtkReparentingProblem`QVTKWidget::paintEvent(QPaintEvent*) + 109* >>> * frame #18: 0x0000000100bb73d6 QtWidgets`QWidget::event(QEvent*) + >>> 1958* >>> * frame #19: 0x0000000100683079 >>> VtkReparentingProblem`QVTKWidget::event(QEvent*) + 281* >>> * frame #20: 0x0000000100b7effc >>> QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* >>> * frame #21: 0x0000000100b81abb >>> QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* >>> * frame #22: 0x0000000101902932 >>> QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* >>> * frame #23: 0x0000000100bb2035 >>> QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint >>> const&, int, QPainter*, QWidgetBackingStore*) + 2997* >>> * frame #24: 0x0000000100b8aed0 >>> QtWidgets`QWidgetPrivate::repaint_sys(QRegion const&) + 400* >>> * frame #25: 0x0000000100bd4987 >>> QtWidgets`QWidgetWindow::event(QEvent*) + 423* >>> * frame #26: 0x0000000100b7effc >>> QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* >>> * frame #27: 0x0000000100b81abb >>> QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* >>> * frame #28: 0x0000000101902932 >>> QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* >>> * frame #29: 0x00000001011c4d7a >>> QtGui`QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) >>> + 314* >>> * frame #30: 0x00000001011c08a7 >>> QtGui`QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) >>> + 951* >>> * frame #31: 0x00000001011af1cb >>> QtGui`QWindowSystemInterface::sendWindowSystemEvents(QFlags) >>> + 315* >>> * frame #32: 0x0000000104a39f0d >>> libqcocoa.dylib`QCocoaEventDispatcherPrivate::processPostedEvents() + 317* >>> * frame #33: 0x0000000104a3a8a8 >>> libqcocoa.dylib`QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) >>> + 40* >>> * frame #34: 0x00007fff8f9e3a01 >>> CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + >>> 17* >>> * frame #35: 0x00007fff8f9d5b8d CoreFoundation`__CFRunLoopDoSources0 >>> + 269* >>> * frame #36: 0x00007fff8f9d51bf CoreFoundation`__CFRunLoopRun + 927* >>> * frame #37: 0x00007fff8f9d4bd8 CoreFoundation`CFRunLoopRunSpecific + >>> 296* >>> * frame #38: 0x00007fff8b65f56f HIToolbox`RunCurrentEventLoopInMode + >>> 235* >>> * frame #39: 0x00007fff8b65f2ea HIToolbox`ReceiveNextEventCommon + >>> 431* >>> * frame #40: 0x00007fff8b65f12b >>> HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71* >>> * frame #41: 0x00007fff894cf8ab AppKit`_DPSNextEvent + 978* >>> * frame #42: 0x00007fff894cee58 AppKit`-[NSApplication >>> nextEventMatchingMask:untilDate:inMode:dequeue:] + 346* >>> * frame #43: 0x00007fff894c4af3 AppKit`-[NSApplication run] + 594* >>> * frame #44: 0x0000000104a395e4 >>> libqcocoa.dylib`QCocoaEventDispatcher::processEvents(QFlags) >>> + 2420* >>> * frame #45: 0x00000001018ff9ad >>> QtCore`QEventLoop::exec(QFlags) + 381* >>> * frame #46: 0x0000000101902ee7 QtCore`QCoreApplication::exec() + 359* >>> * frame #47: 0x0000000100005dab VtkReparentingProblem`main + 59* >>> * frame #48: 0x0000000100005d64 VtkReparentingProblem`start + 52* >>> >>> >>> */*******************************************************************************/* >>> >>> Any hints ? >>> >>> Regards, >>> Simon >>> >>> 2015-11-17 9:27 GMT+01:00 Simon ESNEAULT : >>> >>>> Hello, >>>> >>>> After the switch to the new rendering backend, we have a crash on our >>>> program after reparenting a QVTKWidget on OSX. The crash is in the >>>> method vtkShaderProgram::FindUniform() but we suspect it is about the >>>> OpenGL context not being ready on time for the next paintEvent with the new >>>> parent. >>>> >>>> Attached is a program that reproduce the problem, as well as a complete >>>> backtrace for this crash. This used to work fine with the previous backend. >>>> >>>> Hope this little test case helps >>>> >>>> Thanks >>>> Simon >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Ken Martin PhD >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed Nov 18 11:42:27 2015 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 18 Nov 2015 11:42:27 -0500 Subject: [vtkusers] VTK 6.3/OGL2/Qt5.3.2 : QVTKWidget regression, crash after "reparenting" a widget on OSX In-Reply-To: References: Message-ID: Yes, if some process is causing the opengl context to be destroyed then we need to release the graphics resources tied to the old context. Sounds like that is the case here and the cocoa window was missing it. On Wed, Nov 18, 2015 at 11:36 AM, Simon ESNEAULT wrote: > Hello Ken, > > A colleague has just found a solution that prevent the crash. Here is the > patch: > > > //---------------------------------------------------------------------------- > > --- VTK/Rendering/OpenGL2/vtkCocoaRenderWindow.mm Wed Nov 18 17:25:01 2015 > +++ VTK/Rendering/OpenGL2/vtkCocoaRenderWindow.mm Wed Nov 18 17:29:12 2015 > @@ -309,6 +309,7 @@ > this->SetRootWindow(NULL); > this->WindowCreated = 0; > this->ViewCreated = 0; > + this->ReleaseGraphicsResources(); > } > > > //---------------------------------------------------------------------------- > > It just add a call to this->ReleaseGraphicsResources() at the end of the > DestroyWindow() method in vtkCocoaRenderWindow implementation, which is > called by the Finalize() method. > > He found out this solution because this method is called in the Finalize() > method on the WIN32 implementation, and there is no crash in Windows... > > Do you think it is the correct fix? Or can this cause some unwanted side > effects ? > > Regards > Simon > > > 2015-11-18 15:21 GMT+01:00 Ken Martin : > >> (sorry for the half written email, switching to the gmail web interface >> has me messing up) >> >> I know zippo about Qt, but the version 120 error means that VTK thinks it >> has an old OpenGL 2.1 context as opposed to a 3.2 context. There is a >> setting in vtkOpenGLRenderWindow to indicate that it has a 3.2 context >> >> >> // Description:: >> // Get if the context includes opengl core profile 3.2 support >> static bool GetContextSupportsOpenGL32(); >> void SetContextSupportsOpenGL32(bool val); >> >> it could be that the vtk Qt class is creating a 3.2 context but not >> setting the above methods to true? Or maybe somehow not calling void >> vtkOpenGLRenderWindow::OpenGLInitContext() >> >> Just a guess. >> >> Thanks >> Ken >> >> >> >> On Wed, Nov 18, 2015 at 9:15 AM, Ken Martin >> wrote: >> >>> I know zippo about Qt, but the version 120 error means that VTK thinks >>> it has an old OpenGL 2.1 context as opposed to a 3.2 context. There is a >>> setting in vtkOpenGLRenderWindow to indicate that it has a 3.2 context >>> >>> >>> On Wed, Nov 18, 2015 at 8:55 AM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> Hello, >>>> >>>> I've created a bug in Mantis for this >>>> http://www.vtk.org/Bug/view.php?id=15840 >>>> >>>> Looking at the code in QVTKWidget.cxx, here is the part that may be >>>> causing the problem, because it handles the reparenting part... >>>> >>>> >>>> >>>> */*******************************************************************************/* >>>> *if(e->type() == QEvent::ParentAboutToChange)* >>>> * {* >>>> * this->markCachedImageAsDirty();* >>>> * if (this->mRenWin)* >>>> * {* >>>> * // Finalize the window to remove graphics resources associated >>>> with* >>>> * // this window* >>>> * if(this->mRenWin->GetMapped())* >>>> * {* >>>> * this->mRenWin->Finalize();* >>>> * }* >>>> * }* >>>> * }* >>>> * else if(e->type() == QEvent::ParentChange)* >>>> * {* >>>> * if(this->mRenWin)* >>>> * {* >>>> * x11_setup_window();* >>>> * // connect to new window* >>>> * this->mRenWin->SetWindowId( >>>> reinterpret_cast(this->winId()));* >>>> >>>> * // start up the window to create graphics resources for this >>>> window* >>>> * if(isVisible())* >>>> * {* >>>> * this->mRenWin->Start();* >>>> * }* >>>> * }* >>>> * }* >>>> >>>> */*******************************************************************************/* >>>> >>>> Were there any significant changes in the methods GetMapped() / >>>> Finalize() / Start() of vtkRenderWindow (or children implementation) during >>>> the development of the new rendering backend that may lead to such a crash >>>> : >>>> >>>> >>>> >>>> */*******************************************************************************/* >>>> *ERROR: In >>>> /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, >>>> line 354* >>>> *vtkShaderProgram (0x6000001809c0): 1: #version 120* >>>> *2: #define highp* >>>> *3: #define mediump* >>>> *4: #define lowp* >>>> *5: * >>>> *6: >>>> /*=========================================================================* >>>> *7: * >>>> *8: Program: Visualization Toolkit* >>>> *9: Module: vtkPolyDataVS.glsl* >>>> *10: * >>>> *11: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen* >>>> *12: All rights reserved.* >>>> *13: See Copyright.txt or http://www.kitware.com/Copyright.htm >>>> for details.* >>>> *14: * >>>> *15: This software is distributed WITHOUT ANY WARRANTY; without >>>> even* >>>> *16: the implied warranty of MERCHANTABILITY or FITNESS FOR A >>>> PARTICULAR* >>>> *17: PURPOSE. See the above copyright notice for more >>>> information.* >>>> *18: * >>>> *19: >>>> =========================================================================*/* >>>> *20: * >>>> *21: attribute vec4 vertexMC;* >>>> *22: * >>>> *23: // frag position in VC* >>>> *24: varying vec4 vertexVCVSOutput;* >>>> *25: * >>>> *26: // optional normal declaration* >>>> *27: attribute vec3 normalMC;* >>>> *28: uniform mat3 normalMatrix;* >>>> *29: varying vec3 normalVCVSOutput;* >>>> *30: * >>>> *31: // extra lighting parameters* >>>> *32: //VTK::Light::Dec* >>>> *33: * >>>> *34: // Texture coordinates* >>>> *35: //VTK::TCoord::Dec* >>>> *36: * >>>> *37: // material property values* >>>> *38: //VTK::Color::Dec* >>>> *39: * >>>> *40: // clipping plane vars* >>>> *41: //VTK::Clip::Dec* >>>> *42: * >>>> *43: // camera and actor matrix values* >>>> *44: uniform mat4 MCDCMatrix;* >>>> *45: uniform mat4 MCVCMatrix;* >>>> *46: * >>>> *47: // Apple Bug* >>>> *48: //VTK::PrimID::Dec* >>>> *49: * >>>> *50: void main()* >>>> *51: {* >>>> *52: //VTK::Color::Impl* >>>> *53: * >>>> *54: normalVCVSOutput = normalMatrix * normalMC;* >>>> *55: * >>>> *56: //VTK::TCoord::Impl* >>>> *57: * >>>> *58: //VTK::Clip::Impl* >>>> *59: * >>>> *60: //VTK::PrimID::Impl* >>>> *61: * >>>> *62: vertexVCVSOutput = MCVCMatrix * vertexMC;* >>>> *63: gl_Position = MCDCMatrix * vertexMC;* >>>> *64: * >>>> *65: * >>>> *66: //VTK::Light::Impl* >>>> *67: }* >>>> *68: * >>>> >>>> >>>> *ERROR: In >>>> /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, >>>> line 355* >>>> *vtkShaderProgram (0x6000001809c0): ERROR: 0:1: '' : version '120' is >>>> not supported* >>>> *ERROR: 0:2: '' : #version required and missing.* >>>> *ERROR: 0:21: 'attribute' : syntax error: syntax error* >>>> >>>> >>>> *(lldb) bt* >>>> ** thread #1: tid = 0x600e30, 0x0000000100609f1f >>>> VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31, >>>> queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, >>>> address=0x60)* >>>> * * frame #0: 0x0000000100609f1f >>>> VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31* >>>> * frame #1: 0x00000001006074ab >>>> VtkReparentingProblem`vtkShaderProgram::SetUniformi(char const*, int) + 27* >>>> * frame #2: 0x00000001005b8c28 >>>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::SetMapperShaderParameters(vtkOpenGLHelper&, >>>> vtkRenderer*, vtkActor*) + 72* >>>> * frame #3: 0x00000001005b8b1b >>>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::UpdateShaders(vtkOpenGLHelper&, >>>> vtkRenderer*, vtkActor*) + 1211* >>>> * frame #4: 0x00000001005bb782 >>>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPieceDraw(vtkRenderer*, >>>> vtkActor*) + 818* >>>> * frame #5: 0x00000001005bbbe3 >>>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPiece(vtkRenderer*, >>>> vtkActor*) + 195* >>>> * frame #6: 0x00000001004ba1fe >>>> VtkReparentingProblem`vtkPolyDataMapper::Render(vtkRenderer*, vtkActor*) + >>>> 174* >>>> * frame #7: 0x0000000100561be0 >>>> VtkReparentingProblem`vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) + >>>> 144* >>>> * frame #8: 0x00000001004667c3 >>>> VtkReparentingProblem`vtkActor::RenderOpaqueGeometry(vtkViewport*) + 435* >>>> * frame #9: 0x00000001005caa87 >>>> VtkReparentingProblem`vtkOpenGLRenderer::UpdateGeometry() + 263* >>>> * frame #10: 0x00000001005ca945 >>>> VtkReparentingProblem`vtkOpenGLRenderer::DeviceRender() + 181* >>>> * frame #11: 0x00000001004cb96c >>>> VtkReparentingProblem`vtkRenderer::Render() + 604* >>>> * frame #12: 0x00000001004d08cc >>>> VtkReparentingProblem`vtkRendererCollection::Render() + 92* >>>> * frame #13: 0x00000001004c5d1a >>>> VtkReparentingProblem`vtkRenderWindow::DoStereoRender() + 138* >>>> * frame #14: 0x00000001004c5098 >>>> VtkReparentingProblem`vtkRenderWindow::Render() + 328* >>>> * frame #15: 0x00000001005c7816 >>>> VtkReparentingProblem`vtkOpenGLRenderWindow::Render() + 22* >>>> * frame #16: 0x00000001004c8f17 >>>> VtkReparentingProblem`vtkRenderWindowInteractor::Render() + 39* >>>> * frame #17: 0x00000001006831dd >>>> VtkReparentingProblem`QVTKWidget::paintEvent(QPaintEvent*) + 109* >>>> * frame #18: 0x0000000100bb73d6 QtWidgets`QWidget::event(QEvent*) + >>>> 1958* >>>> * frame #19: 0x0000000100683079 >>>> VtkReparentingProblem`QVTKWidget::event(QEvent*) + 281* >>>> * frame #20: 0x0000000100b7effc >>>> QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* >>>> * frame #21: 0x0000000100b81abb >>>> QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* >>>> * frame #22: 0x0000000101902932 >>>> QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* >>>> * frame #23: 0x0000000100bb2035 >>>> QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint >>>> const&, int, QPainter*, QWidgetBackingStore*) + 2997* >>>> * frame #24: 0x0000000100b8aed0 >>>> QtWidgets`QWidgetPrivate::repaint_sys(QRegion const&) + 400* >>>> * frame #25: 0x0000000100bd4987 >>>> QtWidgets`QWidgetWindow::event(QEvent*) + 423* >>>> * frame #26: 0x0000000100b7effc >>>> QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* >>>> * frame #27: 0x0000000100b81abb >>>> QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* >>>> * frame #28: 0x0000000101902932 >>>> QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* >>>> * frame #29: 0x00000001011c4d7a >>>> QtGui`QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) >>>> + 314* >>>> * frame #30: 0x00000001011c08a7 >>>> QtGui`QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) >>>> + 951* >>>> * frame #31: 0x00000001011af1cb >>>> QtGui`QWindowSystemInterface::sendWindowSystemEvents(QFlags) >>>> + 315* >>>> * frame #32: 0x0000000104a39f0d >>>> libqcocoa.dylib`QCocoaEventDispatcherPrivate::processPostedEvents() + 317* >>>> * frame #33: 0x0000000104a3a8a8 >>>> libqcocoa.dylib`QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) >>>> + 40* >>>> * frame #34: 0x00007fff8f9e3a01 >>>> CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + >>>> 17* >>>> * frame #35: 0x00007fff8f9d5b8d CoreFoundation`__CFRunLoopDoSources0 >>>> + 269* >>>> * frame #36: 0x00007fff8f9d51bf CoreFoundation`__CFRunLoopRun + 927* >>>> * frame #37: 0x00007fff8f9d4bd8 CoreFoundation`CFRunLoopRunSpecific >>>> + 296* >>>> * frame #38: 0x00007fff8b65f56f HIToolbox`RunCurrentEventLoopInMode >>>> + 235* >>>> * frame #39: 0x00007fff8b65f2ea HIToolbox`ReceiveNextEventCommon + >>>> 431* >>>> * frame #40: 0x00007fff8b65f12b >>>> HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71* >>>> * frame #41: 0x00007fff894cf8ab AppKit`_DPSNextEvent + 978* >>>> * frame #42: 0x00007fff894cee58 AppKit`-[NSApplication >>>> nextEventMatchingMask:untilDate:inMode:dequeue:] + 346* >>>> * frame #43: 0x00007fff894c4af3 AppKit`-[NSApplication run] + 594* >>>> * frame #44: 0x0000000104a395e4 >>>> libqcocoa.dylib`QCocoaEventDispatcher::processEvents(QFlags) >>>> + 2420* >>>> * frame #45: 0x00000001018ff9ad >>>> QtCore`QEventLoop::exec(QFlags) + 381* >>>> * frame #46: 0x0000000101902ee7 QtCore`QCoreApplication::exec() + >>>> 359* >>>> * frame #47: 0x0000000100005dab VtkReparentingProblem`main + 59* >>>> * frame #48: 0x0000000100005d64 VtkReparentingProblem`start + 52* >>>> >>>> >>>> */*******************************************************************************/* >>>> >>>> Any hints ? >>>> >>>> Regards, >>>> Simon >>>> >>>> 2015-11-17 9:27 GMT+01:00 Simon ESNEAULT : >>>> >>>>> Hello, >>>>> >>>>> After the switch to the new rendering backend, we have a crash on our >>>>> program after reparenting a QVTKWidget on OSX. The crash is in the >>>>> method vtkShaderProgram::FindUniform() but we suspect it is about the >>>>> OpenGL context not being ready on time for the next paintEvent with the new >>>>> parent. >>>>> >>>>> Attached is a program that reproduce the problem, as well as a >>>>> complete backtrace for this crash. This used to work fine with the previous >>>>> backend. >>>>> >>>>> Hope this little test case helps >>>>> >>>>> Thanks >>>>> Simon >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> Ken Martin PhD >>> Chairman & CFO >>> Kitware Inc. >>> 28 Corporate Drive >>> Clifton Park NY 12065 >>> 518 371 3971 >>> >>> This communication, including all attachments, contains confidential and >>> legally privileged information, and it is intended only for the use of the >>> addressee. Access to this email by anyone else is unauthorized. If you are >>> not the intended recipient, any disclosure, copying, distribution or any >>> action taken in reliance on it is prohibited and may be unlawful. If you >>> received this communication in error please notify us immediately and >>> destroy the original message. Thank you. >>> >> >> >> >> -- >> Ken Martin PhD >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzfowen at qq.com Wed Nov 18 12:03:51 2015 From: dzfowen at qq.com (=?gb18030?B?tcvXv7fy?=) Date: Thu, 19 Nov 2015 01:03:51 +0800 Subject: [vtkusers] About the example--vtk for iOS VolumeRender Message-ID: Hi developers, I try to build the latest vtk for iOS example VolumeRender, compiling is ok. However when I run the project with the data file CT-chest.nrrd which is downloaded from 3D slicer web and converted into 8 unsigned char and 256*256*130 format, the Xcode came out 2 errors: ERROR: In /Users/dzf/Desktop/VTK/IO/Image/vtkNrrdReader.cxx, line 337 vtkNrrdReader (0x7f9e8b821370): CT-chest.nrrd is not a nrrd file. ERROR: In /Users/dzf/Desktop/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784 vtkCompositeDataPipeline (0x7f9e8b821e50): Algorithm vtkNrrdReader(0x7f9e8b821370) returned failure for request: vtkInformation (0x7f9e8b823530) Debug: Off Modified Time: 8501 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 1 error: why Xcode assumed that the file is not nrrd file, it is strange maybe I had mistakes to convert the original nrrd file into proper one with 3d Slicer? 2 error:I can not understand. Thanks for your reply! Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Wed Nov 18 13:06:59 2015 From: cory.quammen at kitware.com (Cory Quammen) Date: Wed, 18 Nov 2015 13:06:59 -0500 Subject: [vtkusers] About the example--vtk for iOS VolumeRender In-Reply-To: References: Message-ID: The VTK Nrrd reader may not be able to read compressed NRRD files. Try to convert it to a non-compressed NRRD file by opening it in Slicer and then saving it with the compression option turned off. - Cory On Wed, Nov 18, 2015 at 12:03 PM, ??? wrote: > Hi developers, > > I try to build the latest vtk for iOS example VolumeRender, compiling > is ok. However when I run the project with the data file CT-chest.nrrd > which is downloaded from 3D slicer web and converted into 8 unsigned char > and 256*256*130 format, the Xcode came out 2 errors: > > *ERROR: In /Users/dzf/Desktop/VTK/IO/Image/vtkNrrdReader.cxx, line > 337* > > *vtkNrrdReader (0x7f9e8b821370): CT-chest.nrrd is not a nrrd file.* > > > * ERROR: In > /Users/dzf/Desktop/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784* > > *vtkCompositeDataPipeline (0x7f9e8b821e50): Algorithm > vtkNrrdReader(0x7f9e8b821370) returned failure for request: vtkInformation > (0x7f9e8b823530)* > > * Debug: Off* > > * Modified Time: 8501* > > * Reference Count: 1* > > * Registered Events: (none)* > > * Request: REQUEST_INFORMATION* > > * FORWARD_DIRECTION: 0* > > * ALGORITHM_AFTER_FORWARD: 1* > > > 1 error: why Xcode assumed that the file is not nrrd file, it is strange > maybe I had mistakes to convert the original nrrd file into proper one with > 3d Slicer? > > > 2 error:I can not understand. > > > Thanks for your reply! > > > Bob > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Cory Quammen R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Nov 18 13:57:23 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 18 Nov 2015 13:57:23 -0500 Subject: [vtkusers] About the example--vtk for iOS VolumeRender In-Reply-To: References: Message-ID: You can ignore the second error that just resulted from the fact that reader failed to load the file. If you follow Cory's suggestion, hopefully it will work for you. Thanks, On Wed, Nov 18, 2015 at 1:06 PM, Cory Quammen wrote: > The VTK Nrrd reader may not be able to read compressed NRRD files. Try to > convert it to a non-compressed NRRD file by opening it in Slicer and then > saving it with the compression option turned off. > > - Cory > > On Wed, Nov 18, 2015 at 12:03 PM, ??? wrote: > >> Hi developers, >> >> I try to build the latest vtk for iOS example VolumeRender, compiling >> is ok. However when I run the project with the data file CT-chest.nrrd >> which is downloaded from 3D slicer web and converted into 8 unsigned char >> and 256*256*130 format, the Xcode came out 2 errors: >> >> *ERROR: In /Users/dzf/Desktop/VTK/IO/Image/vtkNrrdReader.cxx, >> line 337* >> >> *vtkNrrdReader (0x7f9e8b821370): CT-chest.nrrd is not a nrrd file.* >> >> >> * ERROR: In >> /Users/dzf/Desktop/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784* >> >> *vtkCompositeDataPipeline (0x7f9e8b821e50): Algorithm >> vtkNrrdReader(0x7f9e8b821370) returned failure for request: vtkInformation >> (0x7f9e8b823530)* >> >> * Debug: Off* >> >> * Modified Time: 8501* >> >> * Reference Count: 1* >> >> * Registered Events: (none)* >> >> * Request: REQUEST_INFORMATION* >> >> * FORWARD_DIRECTION: 0* >> >> * ALGORITHM_AFTER_FORWARD: 1* >> >> >> 1 error: why Xcode assumed that the file is not nrrd file, it is strange >> maybe I had mistakes to convert the original nrrd file into proper one with >> 3d Slicer? >> >> >> 2 error:I can not understand. >> >> >> Thanks for your reply! >> >> >> Bob >> >> >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> >> > > > -- > Cory Quammen > R&D Engineer > Kitware, Inc. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.kvitnevskiy+vtk at intellijointsurgical.com Wed Nov 18 14:25:17 2015 From: l.kvitnevskiy+vtk at intellijointsurgical.com (Larry) Date: Wed, 18 Nov 2015 12:25:17 -0700 (MST) Subject: [vtkusers] SimpleCocoaVTK linker issues Message-ID: <1447874717212-5735086.post@n5.nabble.com> Hello, I am trying to compile the SimpleCocoaVTK project, and I am running into this linker issue: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_vtkCocoaGLView", referenced from: _OBJC_CLASS_$_BasicVTKView in BasicVTKView.o "_OBJC_METACLASS_$_vtkCocoaGLView", referenced from: _OBJC_METACLASS_$_BasicVTKView in BasicVTKView.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) What I did so far: -build VTK, following this http://www.vtk.org/Wiki/Cocoa_VTK (I also specified the install path prefix to be /usr/local/vtk) -opened the Examples/GUI/Cocoa/SimpleCocoaVTK.xcodeproj and set the Source Trees as specified in the instructions -made sure all of the files are found (i.e. not red) My setup: -Mac OS X 10.10 -Xcode 6.4 -cmake 3.1.1 -clang 6.1.0 -VTK 6.3 I used ?otool? and ?nm? to verify that libvtkRenderingOpenGL-6.3.a does contain the definition for these symbols. How can I fix this? Thanks, Larry -- View this message in context: http://vtk.1045678.n5.nabble.com/SimpleCocoaVTK-linker-issues-tp5735086.html Sent from the VTK - Users mailing list archive at Nabble.com. From richard.j.brown at live.co.uk Wed Nov 18 15:15:11 2015 From: richard.j.brown at live.co.uk (mbcx9rb9) Date: Wed, 18 Nov 2015 13:15:11 -0700 (MST) Subject: [vtkusers] speedy vtkImageData addition Message-ID: <1447877711465-5735087.post@n5.nabble.com> Hi all, I have a large vtkImageData (imgData) and I wish to add a smaller vtkImageData (kernel) multiple times to it. Is there a quicker way than adding each component separately? At the moment I have something below, which is repeated for each kernel: // indices to add kernel int x = 10; int y = 10; int z = 10; int *kerExt = kernel->GetExtent(); // all kernel elements for (int i= kernel->GetExtent()[0]; i<= kernel->GetExtent()[1]; i++) { for (int j= kernel->GetExtent()[2]; j<= kernel->GetExtent()[3]; j++) { for (int k= kernel->GetExtent()[4]; k<= kernel->GetExtent()[5]; k++) { // check that the point is inside the surface if (x+i >= imgData->GetExtent()[0] && x+i <= imgData->GetExtent()[1] && y+j >= imgData->GetExtent()[2] && y+j <= imgData->GetExtent()[3] && z+k >= imgData->GetExtent()[4] && z+k <= imgData->GetExtent()[5]) { static_cast(imgData->GetScalarPointer(i+x,j+y,k+z))[0] += static_cast(kernel->GetScalarPointer(i,j,k))[0]; } } } } -- View this message in context: http://vtk.1045678.n5.nabble.com/speedy-vtkImageData-addition-tp5735087.html Sent from the VTK - Users mailing list archive at Nabble.com. From DLRdave at aol.com Wed Nov 18 16:20:19 2015 From: DLRdave at aol.com (David Cole) Date: Wed, 18 Nov 2015 16:20:19 -0500 Subject: [vtkusers] vtkCamera and OffAxisProjection stereo rendering Message-ID: Hi, The documentation on the OffAxisProjection related methods is pretty sparse. I'm working on an app that uses off axis projection, and the user is able to toggle it on and off dynamically while running the app. I have the following problems while trying to get this working... - The lighting seems wrong when using the off axis projection. It appears properly when I align the view to look down on the world Z axis, as if the light is always coming from there. Why doesn't the camera light adjust properly so that it points from the camera to the scene when using off axis projection? Is it just a bug? - The view changes drastically when I toggle back and forth between using off axis projection and the normal perspective projection. Why isn't the view just the same (except taking the eye into consideration instead of the on-axis camera...)?? Seems like I should see the same stuff from the same angle when I turn on OffAxisProjection, but it **appears** to change the camera's position, focal point and viewup vectors without those values **actually** changing. I guess these two are actually the same question: why does the scene change when I specify the Screen parameters and EyePosition in world coordinates? It seems like I must have something set incorrectly. Do the ScreenBottomLeft and related Screen* parameters refer to the physical screen being used to display the app's window? Or to the window itself within the app? And, since this modifies the projection transform, are the vtkRenderer methods ViewToWorld and WorldToView still expected to work properly when off axis projection is being used? Thanks for any advice, hints, help, and/or doc updates, David C. From sean at rogue-research.com Wed Nov 18 17:19:17 2015 From: sean at rogue-research.com (Sean McBride) Date: Wed, 18 Nov 2015 17:19:17 -0500 Subject: [vtkusers] SimpleCocoaVTK linker issues In-Reply-To: <1447874717212-5735086.post@n5.nabble.com> References: <1447874717212-5735086.post@n5.nabble.com> Message-ID: <20151118221917.511270519@mail.rogue-research.com> On Wed, 18 Nov 2015 12:25:17 -0700, Larry said: >I am trying to compile the SimpleCocoaVTK project, and I am running into >this linker issue: > >Undefined symbols for architecture x86_64: > "_OBJC_CLASS_$_vtkCocoaGLView", referenced from: > _OBJC_CLASS_$_BasicVTKView in BasicVTKView.o If you open the project in Xcode, and in the 'project navigator' navigate to the folder containing all the VTK .a libraries, are they shown in red text? If so, it means Xcode doesn't know where the files are and perhaps you didn't set the source tree correctly. Also, Xcode sometimes needs a relaunch and clean after changing source tree settings. 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 dzfowen at qq.com Wed Nov 18 22:57:52 2015 From: dzfowen at qq.com (=?gb18030?B?tcvXv7fy?=) Date: Thu, 19 Nov 2015 11:57:52 +0800 Subject: [vtkusers] =?gb18030?b?u9i4tKO6ICBBYm91dCB0aGUgZXhhbXBsZS0tdnRr?= =?gb18030?q?_for_iOS_VolumeRender?= In-Reply-To: References: Message-ID: Hello developers, Following your instructions, the VolumeRender can read the nrrd file, but when I run the program it came out 2 errors: ERROR: In /Users/dzf/Desktop/VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, line 850 vtkOpenGLPolyDataMapper2D (0x7fe288f404a0): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Unknown error ERROR: In /Users/dzf/Desktop/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 554 vtkTextureObject (0x7fe28988f530): failed at glBindTexture(0) 1 OpenGL errors detected 0 : (1286) Unknown error Wait maybe 20 seconds, the app can run and the model can display but interaction has almost no reaction, especially the 3d image quality is very low, all of these are not accepted and dislike the demo vedio on the web. So why the result is very bad and there are two errors. I did not modify the original code, some difference is I only convert the nrrd file into unsigned char type not modify the resolution as I did not know how to use 3d slicer very well. Thank you for your helps! Bob ------------------ ???? ------------------ ???: "Aashish Chaudhary";; ????: 2015?11?19?(???) ??2:57 ???: "Cory Quammen"; ??: "???"; "vtkusers"; ??: Re: [vtkusers] About the example--vtk for iOS VolumeRender You can ignore the second error that just resulted from the fact that reader failed to load the file. If you follow Cory's suggestion, hopefully it will work for you. Thanks, On Wed, Nov 18, 2015 at 1:06 PM, Cory Quammen wrote: The VTK Nrrd reader may not be able to read compressed NRRD files. Try to convert it to a non-compressed NRRD file by opening it in Slicer and then saving it with the compression option turned off. - Cory On Wed, Nov 18, 2015 at 12:03 PM, ??? wrote: Hi developers, I try to build the latest vtk for iOS example VolumeRender, compiling is ok. However when I run the project with the data file CT-chest.nrrd which is downloaded from 3D slicer web and converted into 8 unsigned char and 256*256*130 format, the Xcode came out 2 errors: ERROR: In /Users/dzf/Desktop/VTK/IO/Image/vtkNrrdReader.cxx, line 337 vtkNrrdReader (0x7f9e8b821370): CT-chest.nrrd is not a nrrd file. ERROR: In /Users/dzf/Desktop/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784 vtkCompositeDataPipeline (0x7f9e8b821e50): Algorithm vtkNrrdReader(0x7f9e8b821370) returned failure for request: vtkInformation (0x7f9e8b823530) Debug: Off Modified Time: 8501 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 1 error: why Xcode assumed that the file is not nrrd file, it is strange maybe I had mistakes to convert the original nrrd file into proper one with 3d Slicer? 2 error:I can not understand. Thanks for your reply! Bob _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen R&D Engineer Kitware, Inc. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 -- | Aashish Chaudhary | Technical Leader | Kitware Inc. | http://www.kitware.com/company/team/chaudhary.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Nov 18 23:09:05 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 18 Nov 2015 23:09:05 -0500 Subject: [vtkusers] About the example--vtk for iOS VolumeRender In-Reply-To: References: Message-ID: Hi can you send me your data and your changes may be? - Aashish On Wed, Nov 18, 2015 at 10:57 PM, ??? wrote: > Hello developers, > > Following your instructions, the VolumeRender can read the nrrd > file, but when I run the program it came out 2 errors: > > *ERROR: In > /Users/dzf/Desktop/VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, > line 850* > > *vtkOpenGLPolyDataMapper2D (0x7fe288f404a0): failed after RenderOverlay 1 > OpenGL errors detected* > > * 0 : (1286) Unknown error* > > > > *ERROR: In /Users/dzf/Desktop/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, > line 554* > > *vtkTextureObject (0x7fe28988f530): failed at glBindTexture(0) 1 OpenGL > errors detected* > > * 0 : (1286) Unknown error* > > Wait maybe 20 seconds, the app can run and the model can display but > interaction has almost no reaction, especially the 3d image quality is very > low, all of these are not accepted and dislike the demo vedio on the web. > So why the result is very bad and there are two errors. I did not modify > the original code, some difference is I only convert the nrrd file into > unsigned char type not modify the resolution as I did not know how to use > 3d slicer very well. > > Thank you for your helps! > > Bob > ------------------ ???? ------------------ > *???:* "Aashish Chaudhary";; > *????:* 2015?11?19?(???) ??2:57 > *???:* "Cory Quammen"; > *??:* "???"; "vtkusers"; > *??:* Re: [vtkusers] About the example--vtk for iOS VolumeRender > > You can ignore the second error that just resulted from the fact that > reader failed to load the file. If you follow Cory's suggestion, hopefully > it will work for you. > > Thanks, > > > On Wed, Nov 18, 2015 at 1:06 PM, Cory Quammen > wrote: > >> The VTK Nrrd reader may not be able to read compressed NRRD files. Try to >> convert it to a non-compressed NRRD file by opening it in Slicer and then >> saving it with the compression option turned off. >> >> - Cory >> >> On Wed, Nov 18, 2015 at 12:03 PM, ??? wrote: >> >>> Hi developers, >>> >>> I try to build the latest vtk for iOS example VolumeRender, >>> compiling is ok. However when I run the project with the data >>> file CT-chest.nrrd which is downloaded from 3D slicer web and converted >>> into 8 unsigned char and 256*256*130 format, the Xcode came out 2 errors: >>> >>> *ERROR: In /Users/dzf/Desktop/VTK/IO/Image/vtkNrrdReader.cxx, >>> line 337* >>> >>> *vtkNrrdReader (0x7f9e8b821370): CT-chest.nrrd is not a nrrd file.* >>> >>> >>> * ERROR: In >>> /Users/dzf/Desktop/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784* >>> >>> *vtkCompositeDataPipeline (0x7f9e8b821e50): Algorithm >>> vtkNrrdReader(0x7f9e8b821370) returned failure for request: vtkInformation >>> (0x7f9e8b823530)* >>> >>> * Debug: Off* >>> >>> * Modified Time: 8501* >>> >>> * Reference Count: 1* >>> >>> * Registered Events: (none)* >>> >>> * Request: REQUEST_INFORMATION* >>> >>> * FORWARD_DIRECTION: 0* >>> >>> * ALGORITHM_AFTER_FORWARD: 1* >>> >>> >>> 1 error: why Xcode assumed that the file is not nrrd file, it is strange >>> maybe I had mistakes to convert the original nrrd file into proper one with >>> 3d Slicer? >>> >>> >>> 2 error:I can not understand. >>> >>> >>> Thanks for your reply! >>> >>> >>> Bob >>> >>> >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >> >> >> -- >> Cory Quammen >> R&D Engineer >> Kitware, Inc. >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From jackkykokoko at gmail.com Wed Nov 18 23:12:47 2015 From: jackkykokoko at gmail.com (Jacky Ko) Date: Thu, 19 Nov 2015 12:12:47 +0800 Subject: [vtkusers] VTK python wrapping build Message-ID: Hello, I am trying to build VTK 6.3.0 under Windows environment, but some library linkage error occurs during the compile. Both MSVC 2015 and Mingw gcc 4.7 with GNU make 3.81 are used, same error occur for python27.lib MSVC error message: fatal error LNK1104: cannot open file 'python27.lib' cmake setting: VTK_WRAP_PYTHON: enabled BUILD_PYTHON_WRAPPERS: enabled Module_vtkWrappingPythonCore: enabled PYTHON_EXECUTABLE: C:/Anaconda/python.exe PYTHON_INCLUDE_DIR: C:/Anaconda/include PYTHON_LIBRARY: C:/Anaconda/libs/libpython27.a VTK_INSTALL_PYTHON_MODULE_DIR: C:/Anaconda/Lib/site-packages I am quite sure that the interpreter of Anaconda is the same as pure Python 2.7 one, as I meet same error for the two different distributions. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jackkykokoko at gmail.com Thu Nov 19 00:59:13 2015 From: jackkykokoko at gmail.com (Jacky Ko) Date: Thu, 19 Nov 2015 13:59:13 +0800 Subject: [vtkusers] VTK and PyQt Message-ID: This a reply for the thread VTK and PyQt http://public.kitware.com/pipermail/vtkusers/2015-November/092811.html Unlike C++ , PyQt has a special way for VTK embedding Please follow the instruction to create a custom defined Qt widget: 1. Create a widget object in Qt Designer 2. In the top right Object Inspector panel, right click and select "Promote to..." 3. a. Base class name: QWidget, b. Promoted class name: vtkWidget, c. Header file: vtkWidget, click "add" In this step, the promoted class name and header file need not to be the same, but for convention I usually set them to be in same name. 4. Save the UI design in the folder where your project is in, I use main.ui for example 5. In the python project, create the vtkWidget.py header file with following code: import vtk from PyQt4 import QtGui from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor from PyQt4.QtGui import QLabel class vtkWidget(QtGui.QWidget): def __init__(self, parent = None): QtGui.QWidget.__init__(self, parent) self.vbl = QtGui.QVBoxLayout() self.vtkWidget = QVTKRenderWindowInteractor(self) self.vbl.addWidget(self.vtkWidget) self.ren = vtk.vtkRenderer() self.vtkWidget.GetRenderWindow().AddRenderer(self.ren) self.iren = self.vtkWidget.GetRenderWindow().GetInteractor() self.renWin = self.vtkWidget.GetRenderWindow() self.vtkWidget.show() self.iren.Initialize() self.setLayout(self.vbl) 6. In the python project, create a main.py file with following code: from PyQt4 import QtCore, QtGui, uic import vtk import sys form_class = uic.loadUiType("main.ui")[0] class Ui_MainWindow(QtGui.QMainWindow, form_class): def __init__(self, parent=None): QtGui.QMainWindow.__init__(self, parent) self.setupUi(self) # setting renderer of 3D widget, object name of the vtkWidget in .ui file is called widget3D self.ren3D = vtk.vtkRenderer() self.widget3D.vtkWidget.GetRenderWindow().AddRenderer(self.ren3D) # render window interactor property self.iren = self.widget3D.vtkWidget.GetRenderWindow().GetInteractor() self.iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) def Exit(self): sys.exit(app.exec_()) app = QtGui.QApplication(sys.argv) Ui_MainWindow = Ui_MainWindow(None) Ui_MainWindow.show() app.exec_() 7. Follow vtk pipeline to create an vtkActor class , you can throw the actor into the vtkWidget by self.ren3D.AddActor() function. Execute main.py and see if the widget worked fine. With the uic load function, the UI can dynamically design with Qt Designer instead of pre-compilation. Remember to save .ui file everytime after modification . -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzfowen at qq.com Thu Nov 19 02:48:12 2015 From: dzfowen at qq.com (=?gb18030?B?tcvXv7fy?=) Date: Thu, 19 Nov 2015 15:48:12 +0800 Subject: [vtkusers] =?gb18030?b?u9i4tKO6ICBBYm91dCB0aGUgZXhhbXBsZS0tdnRr?= =?gb18030?q?_for_iOS_VolumeRender?= Message-ID: Hi, The attachment is the data: 1)download from slicer web 2)decompress the nrrd file 3)convert into unsigned char type Also, I ran the iOS VolumeRender example changing if with 1 to execute codes ahead vtkNew wavelet but it has some problems. The 3d image can display but very poor and almost no interactions, and two errors came out: ERROR: In /Users/dzf/Desktop/VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, line 850 vtkOpenGLPolyDataMapper2D (0x7feda5132c00): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Unknown error ERROR: In /Users/dzf/Desktop/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 554 vtkTextureObject (0x7feda5133100): failed at glBindTexture(0) 1 OpenGL errors detected 0 : (1286) Unknown error I am so strange that the basic example can not work well maybe not the nrrd file's fault? Thanks a lot! Bob ------------------ ???? ------------------ ???: "Aashish Chaudhary";; ????: 2015?11?19?(???) ??12:09 ???: "???"; ??: "Cory Quammen"; "vtkusers"; ??: Re: [vtkusers] About the example--vtk for iOS VolumeRender Hi can you send me your data and your changes may be? - Aashish On Wed, Nov 18, 2015 at 10:57 PM, ??? wrote: Hello developers, Following your instructions, the VolumeRender can read the nrrd file, but when I run the program it came out 2 errors: ERROR: In /Users/dzf/Desktop/VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, line 850 vtkOpenGLPolyDataMapper2D (0x7fe288f404a0): failed after RenderOverlay 1 OpenGL errors detected 0 : (1286) Unknown error ERROR: In /Users/dzf/Desktop/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, line 554 vtkTextureObject (0x7fe28988f530): failed at glBindTexture(0) 1 OpenGL errors detected 0 : (1286) Unknown error Wait maybe 20 seconds, the app can run and the model can display but interaction has almost no reaction, especially the 3d image quality is very low, all of these are not accepted and dislike the demo vedio on the web. So why the result is very bad and there are two errors. I did not modify the original code, some difference is I only convert the nrrd file into unsigned char type not modify the resolution as I did not know how to use 3d slicer very well. Thank you for your helps! Bob ------------------ ???? ------------------ ???: "Aashish Chaudhary";; ????: 2015?11?19?(???) ??2:57 ???: "Cory Quammen"; ??: "???"; "vtkusers"; ??: Re: [vtkusers] About the example--vtk for iOS VolumeRender You can ignore the second error that just resulted from the fact that reader failed to load the file. If you follow Cory's suggestion, hopefully it will work for you. Thanks, On Wed, Nov 18, 2015 at 1:06 PM, Cory Quammen wrote: The VTK Nrrd reader may not be able to read compressed NRRD files. Try to convert it to a non-compressed NRRD file by opening it in Slicer and then saving it with the compression option turned off. - Cory On Wed, Nov 18, 2015 at 12:03 PM, ??? wrote: Hi developers, I try to build the latest vtk for iOS example VolumeRender, compiling is ok. However when I run the project with the data file CT-chest.nrrd which is downloaded from 3D slicer web and converted into 8 unsigned char and 256*256*130 format, the Xcode came out 2 errors: ERROR: In /Users/dzf/Desktop/VTK/IO/Image/vtkNrrdReader.cxx, line 337 vtkNrrdReader (0x7f9e8b821370): CT-chest.nrrd is not a nrrd file. ERROR: In /Users/dzf/Desktop/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784 vtkCompositeDataPipeline (0x7f9e8b821e50): Algorithm vtkNrrdReader(0x7f9e8b821370) returned failure for request: vtkInformation (0x7f9e8b823530) Debug: Off Modified Time: 8501 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 1 error: why Xcode assumed that the file is not nrrd file, it is strange maybe I had mistakes to convert the original nrrd file into proper one with 3d Slicer? 2 error:I can not understand. Thanks for your reply! Bob _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/vtkusers -- Cory Quammen R&D Engineer Kitware, Inc. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: 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 -- | Aashish Chaudhary | Technical Leader | Kitware Inc. | http://www.kitware.com/company/team/chaudhary.html -- | Aashish Chaudhary | Technical Leader | Kitware Inc. | http://www.kitware.com/company/team/chaudhary.html ?QQ????????? CT-chest.nrrd (34.75M, 2015?12?19? 16:32 ??)???????http://mail.qq.com/cgi-bin/ftnExs_download?t=exs_ftn_download&k=7a653966e298e6c9369a04674466071b5e555803575e565715545b02504b0104005c140456030d190b045a56535705550d5c0957626b35776c485a0e0715411a56174b02625b&code=8e9fbf54 -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Thu Nov 19 04:12:53 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Thu, 19 Nov 2015 10:12:53 +0100 Subject: [vtkusers] VTK 6.3/OGL2/Qt5.3.2 : QVTKWidget regression, crash after "reparenting" a widget on OSX In-Reply-To: References: Message-ID: Hello Ken, I've created a merge request here : https://gitlab.kitware.com/vtk/vtk/merge_requests/925 Can you review it and eventually allow it to master if it is the correct fix ? I've also added Sean McBride as a reviewer. Thanks Simon 2015-11-18 17:42 GMT+01:00 Ken Martin : > Yes, if some process is causing the opengl context to be destroyed then we > need to release the graphics resources tied to the old context. Sounds like > that is the case here and the cocoa window was missing it. > > On Wed, Nov 18, 2015 at 11:36 AM, Simon ESNEAULT > wrote: > >> Hello Ken, >> >> A colleague has just found a solution that prevent the crash. Here is the >> patch: >> >> >> //---------------------------------------------------------------------------- >> >> --- VTK/Rendering/OpenGL2/vtkCocoaRenderWindow.mm Wed Nov 18 17:25:01 >> 2015 >> +++ VTK/Rendering/OpenGL2/vtkCocoaRenderWindow.mm Wed Nov 18 17:29:12 >> 2015 >> @@ -309,6 +309,7 @@ >> this->SetRootWindow(NULL); >> this->WindowCreated = 0; >> this->ViewCreated = 0; >> + this->ReleaseGraphicsResources(); >> } >> >> >> //---------------------------------------------------------------------------- >> >> It just add a call to this->ReleaseGraphicsResources() at the end of the >> DestroyWindow() method in vtkCocoaRenderWindow implementation, which is >> called by the Finalize() method. >> >> He found out this solution because this method is called in the >> Finalize() method on the WIN32 implementation, and there is no crash in >> Windows... >> >> Do you think it is the correct fix? Or can this cause some unwanted side >> effects ? >> >> Regards >> Simon >> >> >> 2015-11-18 15:21 GMT+01:00 Ken Martin : >> >>> (sorry for the half written email, switching to the gmail web interface >>> has me messing up) >>> >>> I know zippo about Qt, but the version 120 error means that VTK thinks >>> it has an old OpenGL 2.1 context as opposed to a 3.2 context. There is a >>> setting in vtkOpenGLRenderWindow to indicate that it has a 3.2 context >>> >>> >>> // Description:: >>> // Get if the context includes opengl core profile 3.2 support >>> static bool GetContextSupportsOpenGL32(); >>> void SetContextSupportsOpenGL32(bool val); >>> >>> it could be that the vtk Qt class is creating a 3.2 context but not >>> setting the above methods to true? Or maybe somehow not calling void >>> vtkOpenGLRenderWindow::OpenGLInitContext() >>> >>> Just a guess. >>> >>> Thanks >>> Ken >>> >>> >>> >>> On Wed, Nov 18, 2015 at 9:15 AM, Ken Martin >>> wrote: >>> >>>> I know zippo about Qt, but the version 120 error means that VTK thinks >>>> it has an old OpenGL 2.1 context as opposed to a 3.2 context. There is a >>>> setting in vtkOpenGLRenderWindow to indicate that it has a 3.2 context >>>> >>>> >>>> On Wed, Nov 18, 2015 at 8:55 AM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> Hello, >>>>> >>>>> I've created a bug in Mantis for this >>>>> http://www.vtk.org/Bug/view.php?id=15840 >>>>> >>>>> Looking at the code in QVTKWidget.cxx, here is the part that may be >>>>> causing the problem, because it handles the reparenting part... >>>>> >>>>> >>>>> >>>>> */*******************************************************************************/* >>>>> *if(e->type() == QEvent::ParentAboutToChange)* >>>>> * {* >>>>> * this->markCachedImageAsDirty();* >>>>> * if (this->mRenWin)* >>>>> * {* >>>>> * // Finalize the window to remove graphics resources associated >>>>> with* >>>>> * // this window* >>>>> * if(this->mRenWin->GetMapped())* >>>>> * {* >>>>> * this->mRenWin->Finalize();* >>>>> * }* >>>>> * }* >>>>> * }* >>>>> * else if(e->type() == QEvent::ParentChange)* >>>>> * {* >>>>> * if(this->mRenWin)* >>>>> * {* >>>>> * x11_setup_window();* >>>>> * // connect to new window* >>>>> * this->mRenWin->SetWindowId( >>>>> reinterpret_cast(this->winId()));* >>>>> >>>>> * // start up the window to create graphics resources for this >>>>> window* >>>>> * if(isVisible())* >>>>> * {* >>>>> * this->mRenWin->Start();* >>>>> * }* >>>>> * }* >>>>> * }* >>>>> >>>>> */*******************************************************************************/* >>>>> >>>>> Were there any significant changes in the methods GetMapped() / >>>>> Finalize() / Start() of vtkRenderWindow (or children implementation) during >>>>> the development of the new rendering backend that may lead to such a crash >>>>> : >>>>> >>>>> >>>>> >>>>> */*******************************************************************************/* >>>>> *ERROR: In >>>>> /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, >>>>> line 354* >>>>> *vtkShaderProgram (0x6000001809c0): 1: #version 120* >>>>> *2: #define highp* >>>>> *3: #define mediump* >>>>> *4: #define lowp* >>>>> *5: * >>>>> *6: >>>>> /*=========================================================================* >>>>> *7: * >>>>> *8: Program: Visualization Toolkit* >>>>> *9: Module: vtkPolyDataVS.glsl* >>>>> *10: * >>>>> *11: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen* >>>>> *12: All rights reserved.* >>>>> *13: See Copyright.txt or http://www.kitware.com/Copyright.htm >>>>> for details.* >>>>> *14: * >>>>> *15: This software is distributed WITHOUT ANY WARRANTY; without >>>>> even* >>>>> *16: the implied warranty of MERCHANTABILITY or FITNESS FOR A >>>>> PARTICULAR* >>>>> *17: PURPOSE. See the above copyright notice for more >>>>> information.* >>>>> *18: * >>>>> *19: >>>>> =========================================================================*/* >>>>> *20: * >>>>> *21: attribute vec4 vertexMC;* >>>>> *22: * >>>>> *23: // frag position in VC* >>>>> *24: varying vec4 vertexVCVSOutput;* >>>>> *25: * >>>>> *26: // optional normal declaration* >>>>> *27: attribute vec3 normalMC;* >>>>> *28: uniform mat3 normalMatrix;* >>>>> *29: varying vec3 normalVCVSOutput;* >>>>> *30: * >>>>> *31: // extra lighting parameters* >>>>> *32: //VTK::Light::Dec* >>>>> *33: * >>>>> *34: // Texture coordinates* >>>>> *35: //VTK::TCoord::Dec* >>>>> *36: * >>>>> *37: // material property values* >>>>> *38: //VTK::Color::Dec* >>>>> *39: * >>>>> *40: // clipping plane vars* >>>>> *41: //VTK::Clip::Dec* >>>>> *42: * >>>>> *43: // camera and actor matrix values* >>>>> *44: uniform mat4 MCDCMatrix;* >>>>> *45: uniform mat4 MCVCMatrix;* >>>>> *46: * >>>>> *47: // Apple Bug* >>>>> *48: //VTK::PrimID::Dec* >>>>> *49: * >>>>> *50: void main()* >>>>> *51: {* >>>>> *52: //VTK::Color::Impl* >>>>> *53: * >>>>> *54: normalVCVSOutput = normalMatrix * normalMC;* >>>>> *55: * >>>>> *56: //VTK::TCoord::Impl* >>>>> *57: * >>>>> *58: //VTK::Clip::Impl* >>>>> *59: * >>>>> *60: //VTK::PrimID::Impl* >>>>> *61: * >>>>> *62: vertexVCVSOutput = MCVCMatrix * vertexMC;* >>>>> *63: gl_Position = MCDCMatrix * vertexMC;* >>>>> *64: * >>>>> *65: * >>>>> *66: //VTK::Light::Impl* >>>>> *67: }* >>>>> *68: * >>>>> >>>>> >>>>> *ERROR: In >>>>> /Users/th-dev/EndoSize_OGL2/cmake-externals/VTK/src/Rendering/OpenGL2/vtkShaderProgram.cxx, >>>>> line 355* >>>>> *vtkShaderProgram (0x6000001809c0): ERROR: 0:1: '' : version '120' is >>>>> not supported* >>>>> *ERROR: 0:2: '' : #version required and missing.* >>>>> *ERROR: 0:21: 'attribute' : syntax error: syntax error* >>>>> >>>>> >>>>> *(lldb) bt* >>>>> ** thread #1: tid = 0x600e30, 0x0000000100609f1f >>>>> VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31, >>>>> queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, >>>>> address=0x60)* >>>>> * * frame #0: 0x0000000100609f1f >>>>> VtkReparentingProblem`vtkShaderProgram::FindUniform(char const*) + 31* >>>>> * frame #1: 0x00000001006074ab >>>>> VtkReparentingProblem`vtkShaderProgram::SetUniformi(char const*, int) + 27* >>>>> * frame #2: 0x00000001005b8c28 >>>>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::SetMapperShaderParameters(vtkOpenGLHelper&, >>>>> vtkRenderer*, vtkActor*) + 72* >>>>> * frame #3: 0x00000001005b8b1b >>>>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::UpdateShaders(vtkOpenGLHelper&, >>>>> vtkRenderer*, vtkActor*) + 1211* >>>>> * frame #4: 0x00000001005bb782 >>>>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPieceDraw(vtkRenderer*, >>>>> vtkActor*) + 818* >>>>> * frame #5: 0x00000001005bbbe3 >>>>> VtkReparentingProblem`vtkOpenGLPolyDataMapper::RenderPiece(vtkRenderer*, >>>>> vtkActor*) + 195* >>>>> * frame #6: 0x00000001004ba1fe >>>>> VtkReparentingProblem`vtkPolyDataMapper::Render(vtkRenderer*, vtkActor*) + >>>>> 174* >>>>> * frame #7: 0x0000000100561be0 >>>>> VtkReparentingProblem`vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*) + >>>>> 144* >>>>> * frame #8: 0x00000001004667c3 >>>>> VtkReparentingProblem`vtkActor::RenderOpaqueGeometry(vtkViewport*) + 435* >>>>> * frame #9: 0x00000001005caa87 >>>>> VtkReparentingProblem`vtkOpenGLRenderer::UpdateGeometry() + 263* >>>>> * frame #10: 0x00000001005ca945 >>>>> VtkReparentingProblem`vtkOpenGLRenderer::DeviceRender() + 181* >>>>> * frame #11: 0x00000001004cb96c >>>>> VtkReparentingProblem`vtkRenderer::Render() + 604* >>>>> * frame #12: 0x00000001004d08cc >>>>> VtkReparentingProblem`vtkRendererCollection::Render() + 92* >>>>> * frame #13: 0x00000001004c5d1a >>>>> VtkReparentingProblem`vtkRenderWindow::DoStereoRender() + 138* >>>>> * frame #14: 0x00000001004c5098 >>>>> VtkReparentingProblem`vtkRenderWindow::Render() + 328* >>>>> * frame #15: 0x00000001005c7816 >>>>> VtkReparentingProblem`vtkOpenGLRenderWindow::Render() + 22* >>>>> * frame #16: 0x00000001004c8f17 >>>>> VtkReparentingProblem`vtkRenderWindowInteractor::Render() + 39* >>>>> * frame #17: 0x00000001006831dd >>>>> VtkReparentingProblem`QVTKWidget::paintEvent(QPaintEvent*) + 109* >>>>> * frame #18: 0x0000000100bb73d6 QtWidgets`QWidget::event(QEvent*) + >>>>> 1958* >>>>> * frame #19: 0x0000000100683079 >>>>> VtkReparentingProblem`QVTKWidget::event(QEvent*) + 281* >>>>> * frame #20: 0x0000000100b7effc >>>>> QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* >>>>> * frame #21: 0x0000000100b81abb >>>>> QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* >>>>> * frame #22: 0x0000000101902932 >>>>> QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* >>>>> * frame #23: 0x0000000100bb2035 >>>>> QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint >>>>> const&, int, QPainter*, QWidgetBackingStore*) + 2997* >>>>> * frame #24: 0x0000000100b8aed0 >>>>> QtWidgets`QWidgetPrivate::repaint_sys(QRegion const&) + 400* >>>>> * frame #25: 0x0000000100bd4987 >>>>> QtWidgets`QWidgetWindow::event(QEvent*) + 423* >>>>> * frame #26: 0x0000000100b7effc >>>>> QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 300* >>>>> * frame #27: 0x0000000100b81abb >>>>> QtWidgets`QApplication::notify(QObject*, QEvent*) + 6187* >>>>> * frame #28: 0x0000000101902932 >>>>> QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 114* >>>>> * frame #29: 0x00000001011c4d7a >>>>> QtGui`QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) >>>>> + 314* >>>>> * frame #30: 0x00000001011c08a7 >>>>> QtGui`QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) >>>>> + 951* >>>>> * frame #31: 0x00000001011af1cb >>>>> QtGui`QWindowSystemInterface::sendWindowSystemEvents(QFlags) >>>>> + 315* >>>>> * frame #32: 0x0000000104a39f0d >>>>> libqcocoa.dylib`QCocoaEventDispatcherPrivate::processPostedEvents() + 317* >>>>> * frame #33: 0x0000000104a3a8a8 >>>>> libqcocoa.dylib`QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) >>>>> + 40* >>>>> * frame #34: 0x00007fff8f9e3a01 >>>>> CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + >>>>> 17* >>>>> * frame #35: 0x00007fff8f9d5b8d >>>>> CoreFoundation`__CFRunLoopDoSources0 + 269* >>>>> * frame #36: 0x00007fff8f9d51bf CoreFoundation`__CFRunLoopRun + 927* >>>>> * frame #37: 0x00007fff8f9d4bd8 CoreFoundation`CFRunLoopRunSpecific >>>>> + 296* >>>>> * frame #38: 0x00007fff8b65f56f HIToolbox`RunCurrentEventLoopInMode >>>>> + 235* >>>>> * frame #39: 0x00007fff8b65f2ea HIToolbox`ReceiveNextEventCommon + >>>>> 431* >>>>> * frame #40: 0x00007fff8b65f12b >>>>> HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71* >>>>> * frame #41: 0x00007fff894cf8ab AppKit`_DPSNextEvent + 978* >>>>> * frame #42: 0x00007fff894cee58 AppKit`-[NSApplication >>>>> nextEventMatchingMask:untilDate:inMode:dequeue:] + 346* >>>>> * frame #43: 0x00007fff894c4af3 AppKit`-[NSApplication run] + 594* >>>>> * frame #44: 0x0000000104a395e4 >>>>> libqcocoa.dylib`QCocoaEventDispatcher::processEvents(QFlags) >>>>> + 2420* >>>>> * frame #45: 0x00000001018ff9ad >>>>> QtCore`QEventLoop::exec(QFlags) + 381* >>>>> * frame #46: 0x0000000101902ee7 QtCore`QCoreApplication::exec() + >>>>> 359* >>>>> * frame #47: 0x0000000100005dab VtkReparentingProblem`main + 59* >>>>> * frame #48: 0x0000000100005d64 VtkReparentingProblem`start + 52* >>>>> >>>>> >>>>> */*******************************************************************************/* >>>>> >>>>> Any hints ? >>>>> >>>>> Regards, >>>>> Simon >>>>> >>>>> 2015-11-17 9:27 GMT+01:00 Simon ESNEAULT : >>>>> >>>>>> Hello, >>>>>> >>>>>> After the switch to the new rendering backend, we have a crash on our >>>>>> program after reparenting a QVTKWidget on OSX. The crash is in the >>>>>> method vtkShaderProgram::FindUniform() but we suspect it is about the >>>>>> OpenGL context not being ready on time for the next paintEvent with the new >>>>>> parent. >>>>>> >>>>>> Attached is a program that reproduce the problem, as well as a >>>>>> complete backtrace for this crash. This used to work fine with the previous >>>>>> backend. >>>>>> >>>>>> Hope this little test case helps >>>>>> >>>>>> Thanks >>>>>> Simon >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>>> >>>> >>>> >>>> -- >>>> Ken Martin PhD >>>> Chairman & CFO >>>> Kitware Inc. >>>> 28 Corporate Drive >>>> Clifton Park NY 12065 >>>> 518 371 3971 >>>> >>>> This communication, including all attachments, contains confidential >>>> and legally privileged information, and it is intended only for the use of >>>> the addressee. Access to this email by anyone else is unauthorized. If you >>>> are not the intended recipient, any disclosure, copying, distribution or >>>> any action taken in reliance on it is prohibited and may be unlawful. If >>>> you received this communication in error please notify us immediately and >>>> destroy the original message. Thank you. >>>> >>> >>> >>> >>> -- >>> Ken Martin PhD >>> Chairman & CFO >>> Kitware Inc. >>> 28 Corporate Drive >>> Clifton Park NY 12065 >>> 518 371 3971 >>> >>> This communication, including all attachments, contains confidential and >>> legally privileged information, and it is intended only for the use of the >>> addressee. Access to this email by anyone else is unauthorized. If you are >>> not the intended recipient, any disclosure, copying, distribution or any >>> action taken in reliance on it is prohibited and may be unlawful. If you >>> received this communication in error please notify us immediately and >>> destroy the original message. Thank you. >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Thu Nov 19 07:57:45 2015 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 19 Nov 2015 07:57:45 -0500 Subject: [vtkusers] About the example--vtk for iOS VolumeRender In-Reply-To: References: Message-ID: We also adjusted the range of the data when we converted it to make the best use of the unsigned char range. We did something like take a look at the min max data range before converting and then map that into 0 to 255. Thanks Ken On Wed, Nov 18, 2015 at 11:09 PM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Hi can you send me your data and your changes may be? > > - Aashish > > On Wed, Nov 18, 2015 at 10:57 PM, ??? wrote: > >> Hello developers, >> >> Following your instructions, the VolumeRender can read the nrrd >> file, but when I run the program it came out 2 errors: >> >> *ERROR: In >> /Users/dzf/Desktop/VTK/Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx, >> line 850* >> >> *vtkOpenGLPolyDataMapper2D (0x7fe288f404a0): failed after RenderOverlay 1 >> OpenGL errors detected* >> >> * 0 : (1286) Unknown error* >> >> >> >> *ERROR: In /Users/dzf/Desktop/VTK/Rendering/OpenGL2/vtkTextureObject.cxx, >> line 554* >> >> *vtkTextureObject (0x7fe28988f530): failed at glBindTexture(0) 1 OpenGL >> errors detected* >> >> * 0 : (1286) Unknown error* >> >> Wait maybe 20 seconds, the app can run and the model can display but >> interaction has almost no reaction, especially the 3d image quality is very >> low, all of these are not accepted and dislike the demo vedio on the web. >> So why the result is very bad and there are two errors. I did not modify >> the original code, some difference is I only convert the nrrd file into >> unsigned char type not modify the resolution as I did not know how to use >> 3d slicer very well. >> >> Thank you for your helps! >> >> Bob >> ------------------ ???? ------------------ >> *???:* "Aashish Chaudhary";; >> *????:* 2015?11?19?(???) ??2:57 >> *???:* "Cory Quammen"; >> *??:* "???"; "vtkusers"; >> *??:* Re: [vtkusers] About the example--vtk for iOS VolumeRender >> >> You can ignore the second error that just resulted from the fact that >> reader failed to load the file. If you follow Cory's suggestion, hopefully >> it will work for you. >> >> Thanks, >> >> >> On Wed, Nov 18, 2015 at 1:06 PM, Cory Quammen >> wrote: >> >>> The VTK Nrrd reader may not be able to read compressed NRRD files. Try >>> to convert it to a non-compressed NRRD file by opening it in Slicer and >>> then saving it with the compression option turned off. >>> >>> - Cory >>> >>> On Wed, Nov 18, 2015 at 12:03 PM, ??? wrote: >>> >>>> Hi developers, >>>> >>>> I try to build the latest vtk for iOS example VolumeRender, >>>> compiling is ok. However when I run the project with the data >>>> file CT-chest.nrrd which is downloaded from 3D slicer web and converted >>>> into 8 unsigned char and 256*256*130 format, the Xcode came out 2 errors: >>>> >>>> *ERROR: In /Users/dzf/Desktop/VTK/IO/Image/vtkNrrdReader.cxx, >>>> line 337* >>>> >>>> *vtkNrrdReader (0x7f9e8b821370): CT-chest.nrrd is not a nrrd file.* >>>> >>>> >>>> * ERROR: In >>>> /Users/dzf/Desktop/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784* >>>> >>>> *vtkCompositeDataPipeline (0x7f9e8b821e50): Algorithm >>>> vtkNrrdReader(0x7f9e8b821370) returned failure for request: vtkInformation >>>> (0x7f9e8b823530)* >>>> >>>> * Debug: Off* >>>> >>>> * Modified Time: 8501* >>>> >>>> * Reference Count: 1* >>>> >>>> * Registered Events: (none)* >>>> >>>> * Request: REQUEST_INFORMATION* >>>> >>>> * FORWARD_DIRECTION: 0* >>>> >>>> * ALGORITHM_AFTER_FORWARD: 1* >>>> >>>> >>>> 1 error: why Xcode assumed that the file is not nrrd file, it is >>>> strange maybe I had mistakes to convert the original nrrd file into proper >>>> one with 3d Slicer? >>>> >>>> >>>> 2 error:I can not understand. >>>> >>>> >>>> Thanks for your reply! >>>> >>>> >>>> Bob >>>> >>>> >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>> >>>> >>> >>> >>> -- >>> Cory Quammen >>> R&D Engineer >>> Kitware, Inc. >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> 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 >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.kvitnevskiy+vtk at intellijointsurgical.com Thu Nov 19 09:12:06 2015 From: l.kvitnevskiy+vtk at intellijointsurgical.com (Larry) Date: Thu, 19 Nov 2015 07:12:06 -0700 (MST) Subject: [vtkusers] SimpleCocoaVTK linker issues In-Reply-To: <20151118221917.511270519@mail.rogue-research.com> References: <1447874717212-5735086.post@n5.nabble.com> <20151118221917.511270519@mail.rogue-research.com> Message-ID: <1447942326486-5735108.post@n5.nabble.com> None of the files in the xcode project are red. I have also tried restarting xcode, cleaning, and building again. Nothing works. If I exclude 'libvtkRenderingOpenGL-6.3.a' (the library that should contain the symbols), from the build phase, I get the following errors: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_vtkCocoaGLView", referenced from: _OBJC_CLASS_$_BasicVTKView in BasicVTKView.o "_OBJC_METACLASS_$_vtkCocoaGLView", referenced from: _OBJC_METACLASS_$_BasicVTKView in BasicVTKView.o "vtkRenderingOpenGL_AutoInit_Destruct()", referenced from: vtkRenderingCore_AutoInit::~vtkRenderingCore_AutoInit() in MyDocument.o vtkRenderingCore_AutoInit::~vtkRenderingCore_AutoInit() in BasicVTKView.o "vtkRenderingOpenGL_AutoInit_Construct()", referenced from: __GLOBAL__sub_I_MyDocument.mm in MyDocument.o __GLOBAL__sub_I_BasicVTKView.mm in BasicVTKView.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) This shows that normally it does link to 'libvtkRenderingOpenGL-6.3.a' and finds some of the symbols there. Anything else I can try? -- View this message in context: http://vtk.1045678.n5.nabble.com/SimpleCocoaVTK-linker-issues-tp5735086p5735108.html Sent from the VTK - Users mailing list archive at Nabble.com. From shawn.waldon at kitware.com Thu Nov 19 09:44:24 2015 From: shawn.waldon at kitware.com (Shawn Waldon) Date: Thu, 19 Nov 2015 09:44:24 -0500 Subject: [vtkusers] VTK python wrapping build In-Reply-To: References: Message-ID: Hi Jacky, I'm pretty sure that on Windows PYTHON_LIBRARY should point to a file with a .lib extension. Other than that I don't see anything obviously wrong with your settings. HTH, Shawn On Wed, Nov 18, 2015 at 11:12 PM, Jacky Ko wrote: > Hello, > > I am trying to build VTK 6.3.0 under Windows environment, but some > library linkage error occurs during the compile. Both MSVC 2015 and > Mingw gcc 4.7 with GNU make 3.81 are used, same error occur for > python27.lib > > MSVC error message: > fatal error LNK1104: cannot open file 'python27.lib' > > cmake setting: > VTK_WRAP_PYTHON: enabled > BUILD_PYTHON_WRAPPERS: enabled > Module_vtkWrappingPythonCore: enabled > PYTHON_EXECUTABLE: C:/Anaconda/python.exe > PYTHON_INCLUDE_DIR: C:/Anaconda/include > PYTHON_LIBRARY: C:/Anaconda/libs/libpython27.a > VTK_INSTALL_PYTHON_MODULE_DIR: C:/Anaconda/Lib/site-packages > > I am quite sure that the interpreter of Anaconda is the same as > pure Python 2.7 one, as I meet same error for the two different > distributions. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Thu Nov 19 10:05:45 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Thu, 19 Nov 2015 10:05:45 -0500 Subject: [vtkusers] VTK python wrapping build In-Reply-To: References: Message-ID: <20151119150545.GA21250@megas.khq.kitware.com> On Thu, Nov 19, 2015 at 09:44:24 -0500, Shawn Waldon wrote: > I'm pretty sure that on Windows PYTHON_LIBRARY should point to a file with > a .lib extension. Other than that I don't see anything obviously wrong > with your settings. With MSVC, yes. IIRC, MinGW uses .dll.a though, but with VS 2015, the .lib is the right one. --Ben From aashish.chaudhary at kitware.com Thu Nov 19 13:14:27 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 19 Nov 2015 13:14:27 -0500 Subject: [vtkusers] [vtk-developers] [vtk-users] OpenGL2 - GPU Volume Rendering performance In-Reply-To: References: Message-ID: Dear Simon, I looked the code carefully and evaluated on mac and Linux (I don't think its a system specific issue). I also looked into your code and here what I found: * In your example code the desired update rate is set to 25 which is actually on a higher side given the data * But the max sampling distance factor is set to 2. 1) These parameters results in some interesting computation. Old mapper would not use your max sampling distance unless some computation it does cross a threshold. 2) The new mapper always uses the max sampling distance for clamping and actually if you look at the documentation it should do that. Given these two situations, the new mapper use higher sampling distance even when you set it to 2 and therefore runs faster as it tries to match your desired update rate. The new mapper tries to match as well but then it get clamped to maximum of 2 which is not enough to keep up with the desired update rate. Now when you take out this constraint, both of these mappers can go as low as 10 times the sampling distance initially chosen as the desired update rate is bit too high for the rendering. I believe that new mapper is doing the right thing vs the old mapper but I am open for suggestions. What I suggest you try these parameters: Max sampling distance factor : 4 Desired update rate: 15 or 20 Thanks On Tue, Nov 17, 2015 at 1:15 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Dear Simon, > > Thanks for your example code and data. I used exactly the same code, got > master of VTK from today, compiled OpenGL1 and OpenGL2 backends on Ubuntu > 14.01 box then for me, the OpenGL2 backend was running much faster and > higher resolution than compare to OpenGL1 backend (20 FPS vs 13 FPS). > Please look at the screenshots attached. I am referring to the number you > are displaying in the program. > > Next, I am going to run the same code on Mac and Windows and see if can > reproduce your issue. May be it is windows/driver specific issue. > > On Fri, Nov 13, 2015 at 11:02 AM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> On Fri, Nov 13, 2015 at 10:57 AM, Simon ESNEAULT < >> simon.esneault at gmail.com> wrote: >> >>> Hello Aashish, >>> >>> I've run some quick tests on my computer, and when disabling the >>> automatic adjustment, both of the volume rendering technique seems to >>> deliver the same performance, with some random Fixed sample distance. I >>> will run some more test on the other computer that we've got here, just to >>> be sure. And also on some mac. And report them to you :) >>> >> >> This is very helpful and sort of confirms my theory the the code in >> question is the reduction factor computation. The logic is changed between >> the old mapper and the new mapper. I will look again to make them >> consistent but it won't be exactly the same since the old mapper code to me >> was not making the the right choices and was broken for the new mapper. >> Actually, initially we had the exact same code and it was running into >> issues since the new mapper was faster and hence breaking some of the >> assumptions the old mapper was making. >> >>> >>> Is there something else that I can do to help on this problem ? >>> >> >> Not at the moment. You helped a lot, the code and the data is really >> helpful. I will report back early next week again and will request you to >> try again. Thanks for your patience. >> >> - Aashish >> >>> >>> >>> Simon >>> >>> >>> 2015-11-12 18:34 GMT+01:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>>> >>>> >>>> On Thu, Nov 12, 2015 at 12:31 PM, Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com> wrote: >>>> >>>>> >>>>> >>>>> On Thu, Nov 12, 2015 at 12:12 PM, Simon ESNEAULT < >>>>> simon.esneault at gmail.com> wrote: >>>>> >>>>>> Hello Aashish, >>>>>> >>>>>> Sorry for the late reply, I was busy last week. >>>>>> >>>>>> Thanks for the update, and your work on this topic. >>>>>> Yes I have seen that your change have been merged concerning the >>>>>> ReductionFactor. Nevertheless, I am still getting a smaller frame rate with >>>>>> the new backend. To highlight this, please find attached a very simple >>>>>> application that loads a volume ( >>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip) and does >>>>>> volume rendering while displaying the frame rate. This is pretty much what >>>>>> we show to the user in our application, and in this condition, on my >>>>>> machine the FPS are around 25 with the opengl1 backend >>>>>> , and 15 with >>>>>> the new backend , >>>>>> from this week VTK master >>>>>> It is very simple to test, just need change the VTK_DIR to an OpenGL1 >>>>>> or OpenGL2 build, and place the volume.mhd and raw in the execution path. >>>>>> Also you will find attached a small text file that summarizes the >>>>>> test that have been done here. >>>>>> >>>>> >>>>> No problem, thanks for the update. Please see my comments below: >>>>> >>>>>> >>>>>> I think the real reason why it appears slower with the OGL2 version >>>>>> is that we try to have control on the "MaximalImageSampleDistance". If I >>>>>> remove the line l_gpu_mapper->SetMaximumImageSampleDistance( 2. ); I get >>>>>> the same frame rate with each backend. BUT, the new backend does decimate a >>>>>> lot more the volume, leading to a very blurred image during rendering, and >>>>>> that's not what we want :/ >>>>>> >>>>> >>>>> Aha, this is very useful since this parameters does affecting the >>>>> reduction factor. I will try your code; one quick question when the new >>>>> backend decimates a lot (by removing the SetMaximumImageSampleDistance), >>>>> does it get any faster than the old version? I am going to try it on my Mac >>>>> and Linux laptop and report back (mostly tomorrow since I am away today). >>>>> >>>>>> >>>>>> >>>> Never mind, I see that you have that in your result file. It seems it >>>> does get faster but more blurry. Would it be possible for you to do one >>>> more test? Can you set a fix sample distance (pick any) for new and the old >>>> mapper and set AutoAdjustSampleDistance to OFF and capture some performance >>>> numbers? In that way we know exactly if something more fundamental is >>>> causing the slowness. The whole reduction factor math is based on >>>> approximate stuff so that will vary between two mappers. >>>> >>>> - Aashish >>>> >>>> >>>>> Again, thanks for paying attention to this problem, I hope this little >>>>>> application and test case can help you to adjust the parameters... >>>>>> >>>>> >>>>> Thanks for your help. I am glad you are testing my latest changes. >>>>> >>>>> - Best, Aashish >>>>> >>>>>> >>>>>> >>>>>> Simon >>>>>> >>>>>> PS : I did not get a chance to check the difference on Paraview, but >>>>>> I believe the result will be the same as the attached example is really >>>>>> simple. >>>>>> >>>>>> 2015-11-03 19:44 GMT+01:00 Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com>: >>>>>> >>>>>>> Hi Simon, >>>>>>> >>>>>>> the branch has been merged into VTK master. I am not sure when >>>>>>> Paraview is going to update the VTK, but you can do it manually if needed. >>>>>>> We are also going to run our bench marking again to be sure since recently >>>>>>> lot many changes went into the VTK / volume rendering. Please feel free to >>>>>>> ping me again if it does not solve your issue. >>>>>>> >>>>>>> Looking forward to your feedback. >>>>>>> >>>>>>> - Aashish >>>>>>> >>>>>>> On Mon, Nov 2, 2015 at 8:02 AM, Aashish Chaudhary < >>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>> >>>>>>>> Hi Simon, >>>>>>>> >>>>>>>> I found the reason behind the appeared performance you were >>>>>>>> getting. We have this code in volume rendering that when you interact >>>>>>>> changes the sampling distance and in the newer code we were too >>>>>>>> conservative compare to the last version. That's why you were getting >>>>>>>> better quality when you move your mouse but lower frame rates. I pushed a >>>>>>>> branch in VTK to address the issue. Would it be possible for you to build >>>>>>>> Paraview with VTK master? It may take 3-4 days or longer for Paraview's >>>>>>>> VTK to get updated. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Aashish >>>>>>>> >>>>>>>> On Wed, Oct 28, 2015 at 11:59 AM, Aashish Chaudhary < >>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>> >>>>>>>>> Hi Simon, >>>>>>>>> >>>>>>>>> I am just finishing up a ParaView5 related parallel volume >>>>>>>>> rendering bug (pushing a branch today to VTK). This is next on my list. >>>>>>>>> >>>>>>>>> - Aashish >>>>>>>>> >>>>>>>>> On Wed, Oct 28, 2015 at 11:57 AM, Simon ESNEAULT < >>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Hello Aashish >>>>>>>>>> >>>>>>>>>> Did you get a chance to try to load the dataset on Windows ? >>>>>>>>>> Can I do anything to help you investigate ? Should I feel a bug, >>>>>>>>>> that may act as a reminder ? >>>>>>>>>> Have a nice day >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> 2015-10-27 18:26 GMT+01:00 Aashish Chaudhary < >>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>> >>>>>>>>>>> Thanks Simon. This is really strange since we are not seeing it >>>>>>>>>>> on Mac and Linux (but both has dedicated cards). >>>>>>>>>>> >>>>>>>>>>> I will look into it soon. >>>>>>>>>>> >>>>>>>>>>> - aashish >>>>>>>>>>> >>>>>>>>>>> On Tue, Oct 27, 2015 at 1:03 PM, Simon ESNEAULT < >>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Ok, thank you very much fort digging into this. >>>>>>>>>>>> I've done some test and I believe I can see a similar slowdown >>>>>>>>>>>> happening on OSX, with a MacBook pro retina 13" from 2013, Intel Iris 5100 >>>>>>>>>>>> graphics. >>>>>>>>>>>> Good luck in the investigation, I you need more details, do not >>>>>>>>>>>> hesitate to ask >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> 2015-10-27 17:37 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>> >>>>>>>>>>>>> Ah, thanks. I will get back to you on this since on Linux I >>>>>>>>>>>>> don't any issue so it has to be Windows specific thing. >>>>>>>>>>>>> >>>>>>>>>>>>> - Aashish >>>>>>>>>>>>> >>>>>>>>>>>>> On Tue, Oct 27, 2015 at 10:36 AM, Simon ESNEAULT < >>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> I tried with that one from yesterday and today's version >>>>>>>>>>>>>> (4.4.0-209-gc399648) >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>> Simon >>>>>>>>>>>>>> >>>>>>>>>>>>>> 2015-10-27 15:19 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> And when did you download this version? >>>>>>>>>>>>>>> ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>> Aashish >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Tue, Oct 27, 2015 at 10:17 AM, Simon ESNEAULT < >>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Yes, I tried with and without the shading. Without shading >>>>>>>>>>>>>>>> enabled, the new Opengl2 is also slower when zoomed in (in the described >>>>>>>>>>>>>>>> condition). With shading enabled, the difference in speed between the two >>>>>>>>>>>>>>>> version seems even bigger. >>>>>>>>>>>>>>>> I got the version from the nightly build download section >>>>>>>>>>>>>>>> of paraview website (it is still available). And I've just tried with that >>>>>>>>>>>>>>>> one labeled "ParaView-latest-Qt4-OpenGL2-Windows-64bit.exe" with the same >>>>>>>>>>>>>>>> results. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> About the FPS, it is difficult to give an exact number, >>>>>>>>>>>>>>>> because it depends of the condition (zoomed or not etc...) but yes, this is >>>>>>>>>>>>>>>> the idea. >>>>>>>>>>>>>>>> In our software, I've exposed the frame rate using this >>>>>>>>>>>>>>>> example : >>>>>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/FrameRate >>>>>>>>>>>>>>>> And the frame rate is around 15/20 for the first backend, >>>>>>>>>>>>>>>> and around 6/8 for the new backend, on the same dataset (the one provided >>>>>>>>>>>>>>>> for example), with the same mapper parameters >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> 2015-10-27 14:48 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Hi Simon, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> This is helpful but just missing few more bits: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> 1) Did you try without the shading and see how the >>>>>>>>>>>>>>>>> performance compares? >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> 2) ParaView 4.4.0-193-gec96423 --> Where did you get this >>>>>>>>>>>>>>>>> one from (ParaView download page or did you built yourself?) >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Also, so on your system the old mapper is running 30FPS >>>>>>>>>>>>>>>>> and the new one at 15-20 FPS as per your summary. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Tue, Oct 27, 2015 at 9:43 AM, Simon ESNEAULT < >>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Sorry for the late answer, I was busy this morning. >>>>>>>>>>>>>>>>>> Thanks for testing with the DataSet. >>>>>>>>>>>>>>>>>> I agree the performance is still quite good with the new >>>>>>>>>>>>>>>>>> backend, and I also get something like 15/20 fps on windows on an HD >>>>>>>>>>>>>>>>>> screen. But when compared to the old one, and in some condition (when >>>>>>>>>>>>>>>>>> zoomed especially), it looks really slower to me >>>>>>>>>>>>>>>>>> The two tested version are : >>>>>>>>>>>>>>>>>> - ParaView 4.4.0 64 bits final version for the old backend >>>>>>>>>>>>>>>>>> - ParaView 4.4.0-193-gec96423 64 bits, for the OpenGL2 >>>>>>>>>>>>>>>>>> backend. >>>>>>>>>>>>>>>>>> on a windows 7 box, Xeon E3-1220 v3 CPU, 16GB ram and >>>>>>>>>>>>>>>>>> Nvidia Quadro K420 >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> To highlight the difference, here is what I do : >>>>>>>>>>>>>>>>>> - Launch both version on the same computer at the same >>>>>>>>>>>>>>>>>> time >>>>>>>>>>>>>>>>>> - Load the above dataset on each >>>>>>>>>>>>>>>>>> - Select volume rendering >>>>>>>>>>>>>>>>>> - Adjust the transfer function data range to [100-750] >>>>>>>>>>>>>>>>>> (the default "Cool to Warm" is fine) >>>>>>>>>>>>>>>>>> - Set the view direction to +Y >>>>>>>>>>>>>>>>>> - Adjust the Y of the camera position to -300 >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> And start interacting ... >>>>>>>>>>>>>>>>>> Dunno if there is an easy way to print out the Frame Rate >>>>>>>>>>>>>>>>>> in Paraview, but the new version seems really twice slower in these >>>>>>>>>>>>>>>>>> conditions... We can see it does not scale in the same way, the old backend >>>>>>>>>>>>>>>>>> seems more aggressive on the image sample reduction, hence the >>>>>>>>>>>>>>>>>> interactivity is better. >>>>>>>>>>>>>>>>>> Shading enable or not does not change much >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> I'm aware of the DesiredUpdateRate thing, we use to play >>>>>>>>>>>>>>>>>> with this with the old backend to fine tune the interactivity, although >>>>>>>>>>>>>>>>>> what's really inside was never clear to me >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> I hope that there is enough information for you to >>>>>>>>>>>>>>>>>> reproduce this, do not hesitate to ask for some more information. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanks a lot for your help >>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> 2015-10-27 14:10 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Dear Simon, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Checking again. Wondering if you can provide some more >>>>>>>>>>>>>>>>>>> detail on the binary you are using and whether or not without shading the >>>>>>>>>>>>>>>>>>> rendering performance comparable to older version. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 3:12 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> I used your dataset on paraview master as of today on >>>>>>>>>>>>>>>>>>>> my Linux box running Ubuntu 14.04 and NVIDA Quadro card and I am getting >>>>>>>>>>>>>>>>>>>> about 15-20 FPS with shading on with 1920x1080 resolution. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Are you on the proper 4.4 or using RC1/RC2? I checked >>>>>>>>>>>>>>>>>>>> the shading performance fix was in 4.4 but not in RC's. I don't have access >>>>>>>>>>>>>>>>>>>> to Windows box right away but I will try there too. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> NOTE: You might get multiple emails because of the >>>>>>>>>>>>>>>>>>>> attachment size issue. Sorry about that. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:45 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 2:13 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Hello Aashish, >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Thanks for the quick answer >>>>>>>>>>>>>>>>>>>>>> We are using a vtkImageData, 512x512x591 with short >>>>>>>>>>>>>>>>>>>>>> element (you can find the dataset here : >>>>>>>>>>>>>>>>>>>>>> https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip). >>>>>>>>>>>>>>>>>>>>>> So I think it's all about GPU volume raycast mapper. >>>>>>>>>>>>>>>>>>>>>> The new mapper does bring low resolution, but when >>>>>>>>>>>>>>>>>>>>>> compared to the old one, it seems less "low resolution" during interaction >>>>>>>>>>>>>>>>>>>>>> than the old one >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Right, so that's why its not a exact comparison. What >>>>>>>>>>>>>>>>>>>>> happens is that depending on what is interactive, (you can set the desired >>>>>>>>>>>>>>>>>>>>> update rate in VTK, not exposed in ParaView I believe), it will do >>>>>>>>>>>>>>>>>>>>> interactive but with higher resolution (smaller sample distance). If they >>>>>>>>>>>>>>>>>>>>> both have the same sample distance, then the new mapper should out perform >>>>>>>>>>>>>>>>>>>>> the old one, however, there is another thing we need to consider here which >>>>>>>>>>>>>>>>>>>>> is shading. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Shading is enabled, gradient opacity disabled >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Can you disable the shading and see if now they both >>>>>>>>>>>>>>>>>>>>> (opengl1 and 2) equally better? We already pushed a fix for it but not sure >>>>>>>>>>>>>>>>>>>>> if that you have in your build. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Don't know if you need a minimal example, but I >>>>>>>>>>>>>>>>>>>>>> believe the GPURenderDemo used with this dataset is enough to highlight the >>>>>>>>>>>>>>>>>>>>>> slow down. >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Yes, I will use this dataset. Thanks. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Thanks >>>>>>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> 2015-10-26 18:57 GMT+01:00 Aashish Chaudhary < >>>>>>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Also, >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Do you have shading enabled? We fixed a bug with >>>>>>>>>>>>>>>>>>>>>>> shading that was causing the slow performance a while back. I don't >>>>>>>>>>>>>>>>>>>>>>> remember if that was included in 4.4 or not ( I can check ). >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> - Aashish >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:53 PM, Aashish Chaudhary < >>>>>>>>>>>>>>>>>>>>>>> aashish.chaudhary at kitware.com> wrote: >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> Simon, >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> What kind of dataset you are using? Depending on >>>>>>>>>>>>>>>>>>>>>>>> the data type you might be using >>>>>>>>>>>>>>>>>>>>>>>> the GPU one or the unstructured renderer. The >>>>>>>>>>>>>>>>>>>>>>>> performance we measured is related to the GPU ray cast mapper >>>>>>>>>>>>>>>>>>>>>>>> and will apply only to the vtkImageData inputs. >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> Also, helpful would be is if you can tell if the >>>>>>>>>>>>>>>>>>>>>>>> new mapper is bringing low resolution when you interact with the volume >>>>>>>>>>>>>>>>>>>>>>>> (and whether or not it happens with old mapper). >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> On Mon, Oct 26, 2015 at 1:47 PM, Simon ESNEAULT < >>>>>>>>>>>>>>>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> Hi All, >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> We are trying to make the switch to the new >>>>>>>>>>>>>>>>>>>>>>>>> OpenGL2 backend for our application, and although the switch was easy >>>>>>>>>>>>>>>>>>>>>>>>> (thanks for not breaking the API ;) ), we can see a significant slowdown on >>>>>>>>>>>>>>>>>>>>>>>>> the GPU volume rendering part, especially during interaction. Typically we >>>>>>>>>>>>>>>>>>>>>>>>> dropped from 15/20 fps to 7/8 fps, on the same machine (Win32, Nvidia >>>>>>>>>>>>>>>>>>>>>>>>> Quadro K420), with the same code around. >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> This slow down can be seen in ParaView, if you >>>>>>>>>>>>>>>>>>>>>>>>> compare the latest 4.4 OpenGL2 build with the classic 4.4 build while >>>>>>>>>>>>>>>>>>>>>>>>> volume rendering a big enough volume (512^3) >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> The blog post here >>>>>>>>>>>>>>>>>>>>>>>>> http://www.kitware.com/blog/home/post/976 >>>>>>>>>>>>>>>>>>>>>>>>> claims that the new GPU volume rendering >>>>>>>>>>>>>>>>>>>>>>>>> implementation should be faster than the old one, is there some more >>>>>>>>>>>>>>>>>>>>>>>>> detailed explanation somewhere ? Are there some important parameters that >>>>>>>>>>>>>>>>>>>>>>>>> can make the difference ? >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> Thanks, >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> Simon >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> PS : The polygonal rendering seems a lot faster >>>>>>>>>>>>>>>>>>>>>>>>> with the new backend ! >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>>>>>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>>>>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>>>>>>>>>>>>>>> http://markmail.org/search/?q=vtk-developers >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | >>>>>>>>>>>>>>>>>>> Kitware Inc. * >>>>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>>>> * >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>>>> Inc. * >>>>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>>>> * >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware >>>>>>>>>>>>> Inc. * >>>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>>>> * >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> Simon Esneault >>>>>>>>>>>> Rennes, France >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>> * >>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>> * >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> Simon Esneault >>>>>>>>>> Rennes, France >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>> * >>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>> * >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>> * >>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>> * >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From davideugenewarren+vtk at gmail.com Thu Nov 19 13:50:10 2015 From: davideugenewarren+vtk at gmail.com (dewarren) Date: Thu, 19 Nov 2015 11:50:10 -0700 (MST) Subject: [vtkusers] Rendering multiple volumes In-Reply-To: References: <5632525C.6000600@rhpcs.mcmaster.ca> <5632585A.4000005@rhpcs.mcmaster.ca> <1447432321076-5734971.post@n5.nabble.com> <56461618.5090102@rhpcs.mcmaster.ca> <1447628907554-5734986.post@n5.nabble.com> Message-ID: <1447959010029-5735115.post@n5.nabble.com> Hi all, Many thanks for the suggestions! Although my project is still very much a work-in-progress, I've gotten some promising results. I've posted two sample images on Imgur at http://imgur.com/a/KFFt. These were created using two different approaches. 1) The lesion-extent image (red on grayscale) was created using two volumes loaded from NIFTI files: one containing the template brain; and the other containing a labelmap indicating healthy tissue vs. lesioned tissue. Assigning different color transfer functions according to labelmap values allowed me to get the effect that I wanted. I created the labelmap using numpy and nibabel because I'm still more comfortable with those tools than with native VTK solutions. 2) The variable-intensity overlap image (black-to-yellow on grayscale) was created using four volumes from NIFTI files, one each for the RGBA channels of a non-independent-components volume. This one took a bit more work in Numpy because I had to implement labelmasks and a color transfer function myself instead of defining one in the VTK part of the script. Essentially, the grayscale portions of the image are from the template brain volume, the colored portions of the image are from a volume-occupying brain map of varying intensity, and relevant values from each were combined in a non-overlapping portions of a composite volume. I think that the second approach (non-independent 4-component RGBA volumes) will probably be general enough to fulfill all my needs. Doing things this way feels like a bit of a kludge, and I'm sure that much more could probably be accomplished using native VTK functions if I was a more knowledgeable VTK user. However, I'm not going to complain too much because VTK's volume rendering results look great and it's all scriptable through Python! Any thoughts or comments would be very welcome. I hope to have a more thorough demonstration repository and/or blog post available relatively soon. Best, Dave -- View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5735115.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Thu Nov 19 13:51:45 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Thu, 19 Nov 2015 13:51:45 -0500 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <1447959010029-5735115.post@n5.nabble.com> References: <5632525C.6000600@rhpcs.mcmaster.ca> <5632585A.4000005@rhpcs.mcmaster.ca> <1447432321076-5734971.post@n5.nabble.com> <56461618.5090102@rhpcs.mcmaster.ca> <1447628907554-5734986.post@n5.nabble.com> <1447959010029-5735115.post@n5.nabble.com> Message-ID: HI Dave, Looks like the link you posted is wrong. Can you send us the right link? Thanks, On Thu, Nov 19, 2015 at 1:50 PM, dewarren wrote: > Hi all, > > Many thanks for the suggestions! Although my project is still very > much a work-in-progress, I've gotten some promising results. I've posted > two sample images on Imgur at http://imgur.com/a/KFFt. These were created > using two different approaches. > > 1) The lesion-extent image (red on grayscale) was created using two volumes > loaded from NIFTI files: one containing the template brain; and the other > containing a labelmap indicating healthy tissue vs. lesioned tissue. > Assigning different color transfer functions according to labelmap values > allowed me to get the effect that I wanted. I created the labelmap using > numpy and nibabel because I'm still more comfortable with those tools than > with native VTK solutions. > 2) The variable-intensity overlap image (black-to-yellow on grayscale) was > created using four volumes from NIFTI files, one each for the RGBA channels > of a non-independent-components volume. This one took a bit more work in > Numpy because I had to implement labelmasks and a color transfer function > myself instead of defining one in the VTK part of the script. Essentially, > the grayscale portions of the image are from the template brain volume, the > colored portions of the image are from a volume-occupying brain map of > varying intensity, and relevant values from each were combined in a > non-overlapping portions of a composite volume. > > I think that the second approach (non-independent 4-component RGBA > volumes) will probably be general enough to fulfill all my needs. Doing > things this way feels like a bit of a kludge, and I'm sure that much more > could probably be accomplished using native VTK functions if I was a more > knowledgeable VTK user. However, I'm not going to complain too much > because > VTK's volume rendering results look great and it's all scriptable through > Python! > > Any thoughts or comments would be very welcome. I hope to have a more > thorough demonstration repository and/or blog post available relatively > soon. Best, > > Dave > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5735115.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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From davideugenewarren+vtk at gmail.com Thu Nov 19 13:53:10 2015 From: davideugenewarren+vtk at gmail.com (dewarren) Date: Thu, 19 Nov 2015 11:53:10 -0700 (MST) Subject: [vtkusers] Rendering multiple volumes In-Reply-To: References: <5632585A.4000005@rhpcs.mcmaster.ca> <1447432321076-5734971.post@n5.nabble.com> <56461618.5090102@rhpcs.mcmaster.ca> <1447628907554-5734986.post@n5.nabble.com> <1447959010029-5735115.post@n5.nabble.com> Message-ID: <1447959190783-5735117.post@n5.nabble.com> Whoops, should be http://imgur.com/a/KFFtW. -- View this message in context: http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5735117.html Sent from the VTK - Users mailing list archive at Nabble.com. From l.kvitnevskiy+vtk at intellijointsurgical.com Thu Nov 19 14:55:14 2015 From: l.kvitnevskiy+vtk at intellijointsurgical.com (Larry) Date: Thu, 19 Nov 2015 12:55:14 -0700 (MST) Subject: [vtkusers] SimpleCocoaVTK linker issues In-Reply-To: <1447942326486-5735108.post@n5.nabble.com> References: <1447874717212-5735086.post@n5.nabble.com> <20151118221917.511270519@mail.rogue-research.com> <1447942326486-5735108.post@n5.nabble.com> Message-ID: <1447962914010-5735119.post@n5.nabble.com> I figured out a fix. Remove all of the vtk .dylibs The linker looks for the dynamic libraries first when linking, so you either have to manually put in the /path/to/vtklibrary.a or, you remove the dylibs so it will not link to them. Don't know why linking to the dynamic libraries don't work, but static does... -- View this message in context: http://vtk.1045678.n5.nabble.com/SimpleCocoaVTK-linker-issues-tp5735086p5735119.html Sent from the VTK - Users mailing list archive at Nabble.com. From dzenanz at gmail.com Thu Nov 19 17:03:10 2015 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Thu, 19 Nov 2015 17:03:10 -0500 Subject: [vtkusers] speedy vtkImageData addition In-Reply-To: <1447877711465-5735087.post@n5.nabble.com> References: <1447877711465-5735087.post@n5.nabble.com> Message-ID: There is a convolution class, I don't know whether you can make it work for your case: http://www.vtk.org/doc/nightly/html/classvtkImageConvolve.html HTH On Wed, Nov 18, 2015 at 3:15 PM, mbcx9rb9 wrote: > Hi all, > > I have a large vtkImageData (imgData) and I wish to add a smaller > vtkImageData (kernel) multiple times to it. > > Is there a quicker way than adding each component separately? > > At the moment I have something below, which is repeated for each kernel: > > > // indices to add kernel > int x = 10; > int y = 10; > int z = 10; > > int *kerExt = kernel->GetExtent(); > > // all kernel elements > for (int i= kernel->GetExtent()[0]; i<= kernel->GetExtent()[1]; i++) > { > for (int j= kernel->GetExtent()[2]; j<= kernel->GetExtent()[3]; j++) > { > for (int k= kernel->GetExtent()[4]; k<= kernel->GetExtent()[5]; > k++) > { > > // check that the point is inside the surface > if (x+i >= imgData->GetExtent()[0] && > x+i <= imgData->GetExtent()[1] && > y+j >= imgData->GetExtent()[2] && > y+j <= imgData->GetExtent()[3] && > z+k >= imgData->GetExtent()[4] && > z+k <= imgData->GetExtent()[5]) > { > > static_cast(imgData->GetScalarPointer(i+x,j+y,k+z))[0] += > static_cast(kernel->GetScalarPointer(i,j,k))[0]; > } > } > } > } > > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/speedy-vtkImageData-addition-tp5735087.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From victor.lamoine at gmail.com Thu Nov 19 17:10:30 2015 From: victor.lamoine at gmail.com (VictorLamoine) Date: Thu, 19 Nov 2015 15:10:30 -0700 (MST) Subject: [vtkusers] Migrating from OpenGL to OpenGL2 Message-ID: <1447971030630-5735123.post@n5.nabble.com> Hello, The library I'm using (Point Cloud Library) cannot be compiled as is against a VTK version with OpenGL2 back end. (I'm using VTK trunk) There are some missing includes etc. Error examples: > In file included from > /home/victor/libraries/pcl/src/visualization/src/vtk/vtkVertexBufferObject.cxx:15:0: > /home/victor/libraries/pcl/src/visualization/include/pcl/visualization/vtk/vtkVertexBufferObject.h:35:62: > fatal error: vtkgl.h: No such file or directory > #include "vtkgl.h" // Needed for gl data types exposed in API > ^ > compilation terminated. > [ 50%] Built target pcl_poisson_reconstruction > In file included from > /home/victor/libraries/pcl/src/visualization/src/vtk/vtkVertexBufferObjectMapper.cxx:18:0: > /home/victor/libraries/pcl/src/visualization/include/pcl/visualization/vtk/vtkVertexBufferObject.h:35:62: > fatal error: vtkgl.h: No such file or directory > #include "vtkgl.h" // Needed for gl data types exposed in API > ^ > compilation terminated. > > /home/victor/libraries/pcl/src/visualization/src/pcl_visualizer.cpp:87:38: > fatal error: vtkOpenGLHardwareSupport.h: No such file or directory > #include > > ^ > compilation terminated. Is there a migration guide helping users getting their code working with OpenGL2 back end? if not, how do I make the association between old/new includes? (and maybe there are some differences in the classes ?) Bye -- View this message in context: http://vtk.1045678.n5.nabble.com/Migrating-from-OpenGL-to-OpenGL2-tp5735123.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Thu Nov 19 17:23:12 2015 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 19 Nov 2015 17:23:12 -0500 Subject: [vtkusers] Migrating from OpenGL to OpenGL2 In-Reply-To: <1447971030630-5735123.post@n5.nabble.com> References: <1447971030630-5735123.post@n5.nabble.com> Message-ID: If you are using the generic Rendering API (vtkActor/vtkCamera/etc) then code should mostly work unchanged. If you are directly working with the OpenGL implementation then the conversion really depends on what you were doing as the implementation is fairly different. In terms of the two specific issues you mentioned vtkgl.h can probably be replaced with vtk_glew.h, I do not recall what vtkOpenGLHardwareSupport does but there is no match for that class in the new backend. Given that you have a class named vtkVertexBufferObject I am guessing you are getting into very specific implementation details so the conversion may not be trivial. On the plus side the new back end includes classes such as vtkOpenGLVertexBufferObject so ... If you have further questions/roadblocks let me know and I'll try to point you in the right direction. P.S. vtkOpenGLPointGaussianMapper in the new backend may be worth a look too as it renders both points and splats etc. Thanks Ken On Thu, Nov 19, 2015 at 5:10 PM, VictorLamoine wrote: > Hello, > > The library I'm using (Point Cloud Library) cannot be compiled as is > against > a VTK version with OpenGL2 back end. (I'm using VTK trunk) > There are some missing includes etc. > > Error examples: > > > In file included from > > > /home/victor/libraries/pcl/src/visualization/src/vtk/vtkVertexBufferObject.cxx:15:0: > > > /home/victor/libraries/pcl/src/visualization/include/pcl/visualization/vtk/vtkVertexBufferObject.h:35:62: > > fatal error: vtkgl.h: No such file or directory > > #include "vtkgl.h" // Needed for gl data types exposed in API > > ^ > > compilation terminated. > > [ 50%] Built target pcl_poisson_reconstruction > > In file included from > > > /home/victor/libraries/pcl/src/visualization/src/vtk/vtkVertexBufferObjectMapper.cxx:18:0: > > > /home/victor/libraries/pcl/src/visualization/include/pcl/visualization/vtk/vtkVertexBufferObject.h:35:62: > > fatal error: vtkgl.h: No such file or directory > > #include "vtkgl.h" // Needed for gl data types exposed in API > > ^ > > compilation terminated. > > > > > /home/victor/libraries/pcl/src/visualization/src/pcl_visualizer.cpp:87:38: > > fatal error: vtkOpenGLHardwareSupport.h: No such file or directory > > #include > > > > ^ > > compilation terminated. > > Is there a migration guide helping users getting their code working with > OpenGL2 back end? > if not, how do I make the association between old/new includes? (and maybe > there are some differences in the classes ?) > > Bye > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Migrating-from-OpenGL-to-OpenGL2-tp5735123.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 > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.verted at gmail.com Thu Nov 19 19:11:21 2015 From: n.verted at gmail.com (Tee Be) Date: Thu, 19 Nov 2015 17:11:21 -0700 Subject: [vtkusers] Getting File Name of Current DICOM Slice with VTK Message-ID: Hello, I'm working off of the ReadDICOMSeries example shown here: http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadDICOMSeries and was able to get it working. I was wondering if there was a way I could get the filename of the current slice being viewed using this example. I've looked through the documentation for vtkDICOMImageReader and some of the others but was unable to get the file name only things like it's current directory or file extension. I suppose I could work off of the slice number and directory information and manually figure out the file I'm looking at but even then I would prefer to have a way to work with that file individually. Any suggestions? -------------- next part -------------- An HTML attachment was scrubbed... URL: From hongsongyang at 163.com Fri Nov 20 03:07:08 2015 From: hongsongyang at 163.com (HongSongyang) Date: Fri, 20 Nov 2015 16:07:08 +0800 Subject: [vtkusers] Why I could NOT build the Android Example in VTK 6.3 Message-ID: <02e201d1236a$73edb9c0$5bc92d40$@163.com> Hi all, I have follow the step in the following blog guidance. https://github.com/Kitware/VTK/blob/master/Examples/Android/ReadMe.txt But there is no any android example generated in my Ubuntu + Android environment. The library files could generated correctly. Is there any one who could give me some advice that how to use vtk in android? Thanks a lot. HongSongyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.esneault at gmail.com Fri Nov 20 08:26:33 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Fri, 20 Nov 2015 14:26:33 +0100 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: Hello, I've created a merge request for this bug : https://gitlab.kitware.com/vtk/vtk/merge_requests/932 The class vtkOpenGLRayCastImageDisplayHelper is changing OpenGL blend state, but never restores the state as it was before, resulting in some incorrect blend later. I don't know if it's the correct fix, but it certainly look like the reason for this bug, and it solve the bug here. Can someone review this merge ? Regards Simon 2015-11-18 9:38 GMT+01:00 Simon ESNEAULT : > Morning ! > > http://www.vtk.org/Bug/view.php?id=15838 > > Let me know if there is anything I can do to solve this. > > Simon > > 2015-11-17 16:50 GMT+01:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com>: > >> >> >> On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT > > wrote: >> >>> Dear Aashish, >>> >>> Yes the root cause is probably located in vtkTexturedActor2D, or in >>> vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible >>> class for loading the texture. >>> Shall I fill a bug ? >>> >> >> Yes, please. >> >> - Aashish >> >> >>> Thanks >>> Simon >>> >>> 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>>> I see so its not just related to volume rendering and it seems to be a >>>> vtkTextActor2D problem? In that can probably Ken / David Lonie wants to >>>> take a look at it. Nonetheless, we will follow up on this bug. >>>> >>>> - Aashish >>>> >>>> On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> Hello Aashish, >>>>> >>>>> Thanks ! >>>>> After doing some test, I realized the patch I've just sent is not the >>>>> correct fix at all, because the text is not rendered properly when we don't >>>>> use a vtkFixedPointVolumeRayCastMapper anymore. >>>>> >>>>> I believe the problem is probably larger than this and probably has >>>>> nothing to do with the freetype text generation, but more with the >>>>> vtkTexturedActor2D rendering part used together with a >>>>> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the >>>>> texture has some transparent pixel in it ... >>>>> >>>>> Attached there is a new example that demonstrate that a vtkTextActor >>>>> AND a vtkTexturedButtonRepresentation2D are not correctly drawn in that >>>>> case : >>>>> - OpenGL1 backend >>>>> : Transparent >>>>> pixel in Texture are correctly drawn >>>>> - OpenGL2 backend >>>>> : >>>>> Transparent pixel in Texture are not correctly drawn (clamped to white ?) >>>>> >>>>> The example is more simple than the previous one and does not need any >>>>> additional data. >>>>> >>>>> Hope that helps ! >>>>> -Simon >>>>> >>>>> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com>: >>>>> >>>>>> Simon, >>>>>> >>>>>> Thanks for the report. I will follow up with other developers on this >>>>>> bug. >>>>>> >>>>>> - Aashish >>>>>> >>>>>> >>>>>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT < >>>>>> simon.esneault at gmail.com> wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> Trying to solve this problem, I found out that if one call >>>>>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>>>>>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>>>>>> at the anchor point, and with a transparent gray background. >>>>>>> - DebugTexturesOn : http://picpaste.com/pics/Blurred.1447668943.PNG >>>>>>> - DebugTexturesOff : >>>>>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>>>>>> >>>>>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect this is >>>>>>> a blending problem. When we activate Texture Debugging, a gray background >>>>>>> is first drawn, and after that in the method RenderCharacter( ... ) line >>>>>>> 1887; we either blend the rendered text with the background or not. >>>>>>> >>>>>>> Attached is a diff file that solves the problem for me. I do not >>>>>>> really understand why, so maybe a developer with more VTK's knowledge can >>>>>>> integrate this properly :) >>>>>>> >>>>>>> Thanks, >>>>>>> Simon >>>>>>> >>>>>>> >>>>>>> >>>>>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT >>>>>>> : >>>>>>> >>>>>>>> Hi All, >>>>>>>> >>>>>>>> All vtkTextActor are rendered blurred when using with >>>>>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>>>>>> new rendering backend. >>>>>>>> >>>>>>>> Here are some snapshots : >>>>>>>> - OpenGL1 >>>>>>>> >>>>>>>> - OpenGL2 >>>>>>>> >>>>>>>> Attached some code that reproduces the problem, to be used with >>>>>>>> this >>>>>>>> volume. Visible on OSX and Windows to our knowledge, probably on more OS. >>>>>>>> >>>>>>>> The text is rendered properly when used with the old backend or >>>>>>>> when using a vtkGPUVolumeRayCastMapper instead of >>>>>>>> the vtkFixedPointVolumeRayCastMapper. >>>>>>>> >>>>>>>> Shall I feel a bug, is this a known issue ? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Simon >>>>>>>> >>>>>>>> -- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> Simon Esneault >>>>>>>> Rennes, France >>>>>>>> ------------------------------------------------------------------ >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> ------------------------------------------------------------------ >>>>>>> Simon Esneault >>>>>>> Rennes, France >>>>>>> ------------------------------------------------------------------ >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Powered by www.kitware.com >>>>>>> >>>>>>> Visit other Kitware open-source projects at >>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>> >>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>> >>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>> >>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Nov 20 08:32:35 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 20 Nov 2015 08:32:35 -0500 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: Hi Simon, Thanks! I am okay with merging this change but in general restoring to previous state is tricky as for that you need to know the previous state. I think restoring to a default state (which you did) makes more sense. Although in VTK we don't have clear guideline on this. I am reviewing your changes.. On Fri, Nov 20, 2015 at 8:26 AM, Simon ESNEAULT wrote: > Hello, > > I've created a merge request for this bug : > https://gitlab.kitware.com/vtk/vtk/merge_requests/932 > > The class vtkOpenGLRayCastImageDisplayHelper is changing OpenGL blend > state, but never restores the state as it was before, resulting in some > incorrect blend later. > I don't know if it's the correct fix, but it certainly look like the > reason for this bug, and it solve the bug here. > Can someone review this merge ? > > Regards > Simon > > > 2015-11-18 9:38 GMT+01:00 Simon ESNEAULT : > >> Morning ! >> >> http://www.vtk.org/Bug/view.php?id=15838 >> >> Let me know if there is anything I can do to solve this. >> >> Simon >> >> 2015-11-17 16:50 GMT+01:00 Aashish Chaudhary < >> aashish.chaudhary at kitware.com>: >> >>> >>> >>> On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> Dear Aashish, >>>> >>>> Yes the root cause is probably located in vtkTexturedActor2D, or in >>>> vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible >>>> class for loading the texture. >>>> Shall I fill a bug ? >>>> >>> >>> Yes, please. >>> >>> - Aashish >>> >>> >>>> Thanks >>>> Simon >>>> >>>> 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com>: >>>> >>>>> I see so its not just related to volume rendering and it seems to be a >>>>> vtkTextActor2D problem? In that can probably Ken / David Lonie wants to >>>>> take a look at it. Nonetheless, we will follow up on this bug. >>>>> >>>>> - Aashish >>>>> >>>>> On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT < >>>>> simon.esneault at gmail.com> wrote: >>>>> >>>>>> Hello Aashish, >>>>>> >>>>>> Thanks ! >>>>>> After doing some test, I realized the patch I've just sent is not the >>>>>> correct fix at all, because the text is not rendered properly when we don't >>>>>> use a vtkFixedPointVolumeRayCastMapper anymore. >>>>>> >>>>>> I believe the problem is probably larger than this and probably has >>>>>> nothing to do with the freetype text generation, but more with the >>>>>> vtkTexturedActor2D rendering part used together with a >>>>>> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the >>>>>> texture has some transparent pixel in it ... >>>>>> >>>>>> Attached there is a new example that demonstrate that a vtkTextActor >>>>>> AND a vtkTexturedButtonRepresentation2D are not correctly drawn in that >>>>>> case : >>>>>> - OpenGL1 backend >>>>>> : Transparent >>>>>> pixel in Texture are correctly drawn >>>>>> - OpenGL2 backend >>>>>> : >>>>>> Transparent pixel in Texture are not correctly drawn (clamped to white ?) >>>>>> >>>>>> The example is more simple than the previous one and does not need >>>>>> any additional data. >>>>>> >>>>>> Hope that helps ! >>>>>> -Simon >>>>>> >>>>>> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com>: >>>>>> >>>>>>> Simon, >>>>>>> >>>>>>> Thanks for the report. I will follow up with other developers on >>>>>>> this bug. >>>>>>> >>>>>>> - Aashish >>>>>>> >>>>>>> >>>>>>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT < >>>>>>> simon.esneault at gmail.com> wrote: >>>>>>> >>>>>>>> Hello, >>>>>>>> >>>>>>>> Trying to solve this problem, I found out that if one call >>>>>>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>>>>>>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>>>>>>> at the anchor point, and with a transparent gray background. >>>>>>>> - DebugTexturesOn : http://picpaste.com/pics/Blurred.1447668943.PNG >>>>>>>> - DebugTexturesOff : >>>>>>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>>>>>>> >>>>>>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect this >>>>>>>> is a blending problem. When we activate Texture Debugging, a gray >>>>>>>> background is first drawn, and after that in the method RenderCharacter( >>>>>>>> ... ) line 1887; we either blend the rendered text with the background or >>>>>>>> not. >>>>>>>> >>>>>>>> Attached is a diff file that solves the problem for me. I do not >>>>>>>> really understand why, so maybe a developer with more VTK's knowledge can >>>>>>>> integrate this properly :) >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Simon >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT >>>>>>> >: >>>>>>>> >>>>>>>>> Hi All, >>>>>>>>> >>>>>>>>> All vtkTextActor are rendered blurred when using with >>>>>>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>>>>>>> new rendering backend. >>>>>>>>> >>>>>>>>> Here are some snapshots : >>>>>>>>> - OpenGL1 >>>>>>>>> >>>>>>>>> - OpenGL2 >>>>>>>>> >>>>>>>>> Attached some code that reproduces the problem, to be used with >>>>>>>>> this >>>>>>>>> volume. Visible on OSX and Windows to our knowledge, probably on more OS. >>>>>>>>> >>>>>>>>> The text is rendered properly when used with the old backend or >>>>>>>>> when using a vtkGPUVolumeRayCastMapper instead of >>>>>>>>> the vtkFixedPointVolumeRayCastMapper. >>>>>>>>> >>>>>>>>> Shall I feel a bug, is this a known issue ? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Simon >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> Simon Esneault >>>>>>>>> Rennes, France >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> Simon Esneault >>>>>>>> Rennes, France >>>>>>>> ------------------------------------------------------------------ >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Powered by www.kitware.com >>>>>>>> >>>>>>>> Visit other Kitware open-source projects at >>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>> >>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>> >>>>>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>>>>> >>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Fri Nov 20 08:35:15 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 20 Nov 2015 08:35:15 -0500 Subject: [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: Simon, Just reviewed it. The changes looks good to me, I see that you are actually querying the states and hence previous state. I am going to run the tests and if all looks good, I am going to merge it. - Aashish On Fri, Nov 20, 2015 at 8:32 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Hi Simon, > > Thanks! I am okay with merging this change but in general restoring to > previous state is tricky as for that you need to know the previous state. I > think restoring to a default state (which you did) makes more sense. > Although in VTK we don't have clear guideline on this. I am reviewing your > changes.. > > > On Fri, Nov 20, 2015 at 8:26 AM, Simon ESNEAULT > wrote: > >> Hello, >> >> I've created a merge request for this bug : >> https://gitlab.kitware.com/vtk/vtk/merge_requests/932 >> >> The class vtkOpenGLRayCastImageDisplayHelper is changing OpenGL blend >> state, but never restores the state as it was before, resulting in some >> incorrect blend later. >> I don't know if it's the correct fix, but it certainly look like the >> reason for this bug, and it solve the bug here. >> Can someone review this merge ? >> >> Regards >> Simon >> >> >> 2015-11-18 9:38 GMT+01:00 Simon ESNEAULT : >> >>> Morning ! >>> >>> http://www.vtk.org/Bug/view.php?id=15838 >>> >>> Let me know if there is anything I can do to solve this. >>> >>> Simon >>> >>> 2015-11-17 16:50 GMT+01:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>>> >>>> >>>> On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> Dear Aashish, >>>>> >>>>> Yes the root cause is probably located in vtkTexturedActor2D, or in >>>>> vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible >>>>> class for loading the texture. >>>>> Shall I fill a bug ? >>>>> >>>> >>>> Yes, please. >>>> >>>> - Aashish >>>> >>>> >>>>> Thanks >>>>> Simon >>>>> >>>>> 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com>: >>>>> >>>>>> I see so its not just related to volume rendering and it seems to be >>>>>> a vtkTextActor2D problem? In that can probably Ken / David Lonie wants to >>>>>> take a look at it. Nonetheless, we will follow up on this bug. >>>>>> >>>>>> - Aashish >>>>>> >>>>>> On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT < >>>>>> simon.esneault at gmail.com> wrote: >>>>>> >>>>>>> Hello Aashish, >>>>>>> >>>>>>> Thanks ! >>>>>>> After doing some test, I realized the patch I've just sent is not >>>>>>> the correct fix at all, because the text is not rendered properly when we >>>>>>> don't use a vtkFixedPointVolumeRayCastMapper anymore. >>>>>>> >>>>>>> I believe the problem is probably larger than this and probably has >>>>>>> nothing to do with the freetype text generation, but more with the >>>>>>> vtkTexturedActor2D rendering part used together with a >>>>>>> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the >>>>>>> texture has some transparent pixel in it ... >>>>>>> >>>>>>> Attached there is a new example that demonstrate that a vtkTextActor >>>>>>> AND a vtkTexturedButtonRepresentation2D are not correctly drawn in that >>>>>>> case : >>>>>>> - OpenGL1 backend >>>>>>> : Transparent >>>>>>> pixel in Texture are correctly drawn >>>>>>> - OpenGL2 backend >>>>>>> : >>>>>>> Transparent pixel in Texture are not correctly drawn (clamped to white ?) >>>>>>> >>>>>>> The example is more simple than the previous one and does not need >>>>>>> any additional data. >>>>>>> >>>>>>> Hope that helps ! >>>>>>> -Simon >>>>>>> >>>>>>> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < >>>>>>> aashish.chaudhary at kitware.com>: >>>>>>> >>>>>>>> Simon, >>>>>>>> >>>>>>>> Thanks for the report. I will follow up with other developers on >>>>>>>> this bug. >>>>>>>> >>>>>>>> - Aashish >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT < >>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>> >>>>>>>>> Hello, >>>>>>>>> >>>>>>>>> Trying to solve this problem, I found out that if one call >>>>>>>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>>>>>>>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>>>>>>>> at the anchor point, and with a transparent gray background. >>>>>>>>> - DebugTexturesOn : >>>>>>>>> http://picpaste.com/pics/Blurred.1447668943.PNG >>>>>>>>> - DebugTexturesOff : >>>>>>>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>>>>>>>> >>>>>>>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect this >>>>>>>>> is a blending problem. When we activate Texture Debugging, a gray >>>>>>>>> background is first drawn, and after that in the method RenderCharacter( >>>>>>>>> ... ) line 1887; we either blend the rendered text with the background or >>>>>>>>> not. >>>>>>>>> >>>>>>>>> Attached is a diff file that solves the problem for me. I do not >>>>>>>>> really understand why, so maybe a developer with more VTK's knowledge can >>>>>>>>> integrate this properly :) >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Simon >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT < >>>>>>>>> simon.esneault at gmail.com>: >>>>>>>>> >>>>>>>>>> Hi All, >>>>>>>>>> >>>>>>>>>> All vtkTextActor are rendered blurred when using with >>>>>>>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>>>>>>>> new rendering backend. >>>>>>>>>> >>>>>>>>>> Here are some snapshots : >>>>>>>>>> - OpenGL1 >>>>>>>>>> >>>>>>>>>> - OpenGL2 >>>>>>>>>> >>>>>>>>>> Attached some code that reproduces the problem, to be used with >>>>>>>>>> this >>>>>>>>>> volume. Visible on OSX and Windows to our knowledge, probably on more OS. >>>>>>>>>> >>>>>>>>>> The text is rendered properly when used with the old backend or >>>>>>>>>> when using a vtkGPUVolumeRayCastMapper instead of >>>>>>>>>> the vtkFixedPointVolumeRayCastMapper. >>>>>>>>>> >>>>>>>>>> Shall I feel a bug, is this a known issue ? >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> Simon Esneault >>>>>>>>>> Rennes, France >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> Simon Esneault >>>>>>>>> Rennes, France >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>> * >>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>> * >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> ------------------------------------------------------------------ >>>>>>> Simon Esneault >>>>>>> Rennes, France >>>>>>> ------------------------------------------------------------------ >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Nov 20 09:37:34 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 20 Nov 2015 09:37:34 -0500 Subject: [vtkusers] [vtk-developers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: That is the standard blend save/restore code so I think that should do the trick. Thanks for digging into it. On Fri, Nov 20, 2015 at 8:32 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Hi Simon, > > Thanks! I am okay with merging this change but in general restoring to > previous state is tricky as for that you need to know the previous state. I > think restoring to a default state (which you did) makes more sense. > Although in VTK we don't have clear guideline on this. I am reviewing your > changes.. > > > On Fri, Nov 20, 2015 at 8:26 AM, Simon ESNEAULT > wrote: > >> Hello, >> >> I've created a merge request for this bug : >> https://gitlab.kitware.com/vtk/vtk/merge_requests/932 >> >> The class vtkOpenGLRayCastImageDisplayHelper is changing OpenGL blend >> state, but never restores the state as it was before, resulting in some >> incorrect blend later. >> I don't know if it's the correct fix, but it certainly look like the >> reason for this bug, and it solve the bug here. >> Can someone review this merge ? >> >> Regards >> Simon >> >> >> 2015-11-18 9:38 GMT+01:00 Simon ESNEAULT : >> >>> Morning ! >>> >>> http://www.vtk.org/Bug/view.php?id=15838 >>> >>> Let me know if there is anything I can do to solve this. >>> >>> Simon >>> >>> 2015-11-17 16:50 GMT+01:00 Aashish Chaudhary < >>> aashish.chaudhary at kitware.com>: >>> >>>> >>>> >>>> On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> Dear Aashish, >>>>> >>>>> Yes the root cause is probably located in vtkTexturedActor2D, or in >>>>> vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible >>>>> class for loading the texture. >>>>> Shall I fill a bug ? >>>>> >>>> >>>> Yes, please. >>>> >>>> - Aashish >>>> >>>> >>>>> Thanks >>>>> Simon >>>>> >>>>> 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com>: >>>>> >>>>>> I see so its not just related to volume rendering and it seems to be >>>>>> a vtkTextActor2D problem? In that can probably Ken / David Lonie wants to >>>>>> take a look at it. Nonetheless, we will follow up on this bug. >>>>>> >>>>>> - Aashish >>>>>> >>>>>> On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT < >>>>>> simon.esneault at gmail.com> wrote: >>>>>> >>>>>>> Hello Aashish, >>>>>>> >>>>>>> Thanks ! >>>>>>> After doing some test, I realized the patch I've just sent is not >>>>>>> the correct fix at all, because the text is not rendered properly when we >>>>>>> don't use a vtkFixedPointVolumeRayCastMapper anymore. >>>>>>> >>>>>>> I believe the problem is probably larger than this and probably has >>>>>>> nothing to do with the freetype text generation, but more with the >>>>>>> vtkTexturedActor2D rendering part used together with a >>>>>>> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the >>>>>>> texture has some transparent pixel in it ... >>>>>>> >>>>>>> Attached there is a new example that demonstrate that a vtkTextActor >>>>>>> AND a vtkTexturedButtonRepresentation2D are not correctly drawn in that >>>>>>> case : >>>>>>> - OpenGL1 backend >>>>>>> : Transparent >>>>>>> pixel in Texture are correctly drawn >>>>>>> - OpenGL2 backend >>>>>>> : >>>>>>> Transparent pixel in Texture are not correctly drawn (clamped to white ?) >>>>>>> >>>>>>> The example is more simple than the previous one and does not need >>>>>>> any additional data. >>>>>>> >>>>>>> Hope that helps ! >>>>>>> -Simon >>>>>>> >>>>>>> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < >>>>>>> aashish.chaudhary at kitware.com>: >>>>>>> >>>>>>>> Simon, >>>>>>>> >>>>>>>> Thanks for the report. I will follow up with other developers on >>>>>>>> this bug. >>>>>>>> >>>>>>>> - Aashish >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT < >>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>> >>>>>>>>> Hello, >>>>>>>>> >>>>>>>>> Trying to solve this problem, I found out that if one call >>>>>>>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>>>>>>>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>>>>>>>> at the anchor point, and with a transparent gray background. >>>>>>>>> - DebugTexturesOn : >>>>>>>>> http://picpaste.com/pics/Blurred.1447668943.PNG >>>>>>>>> - DebugTexturesOff : >>>>>>>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>>>>>>>> >>>>>>>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect this >>>>>>>>> is a blending problem. When we activate Texture Debugging, a gray >>>>>>>>> background is first drawn, and after that in the method RenderCharacter( >>>>>>>>> ... ) line 1887; we either blend the rendered text with the background or >>>>>>>>> not. >>>>>>>>> >>>>>>>>> Attached is a diff file that solves the problem for me. I do not >>>>>>>>> really understand why, so maybe a developer with more VTK's knowledge can >>>>>>>>> integrate this properly :) >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Simon >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT < >>>>>>>>> simon.esneault at gmail.com>: >>>>>>>>> >>>>>>>>>> Hi All, >>>>>>>>>> >>>>>>>>>> All vtkTextActor are rendered blurred when using with >>>>>>>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>>>>>>>> new rendering backend. >>>>>>>>>> >>>>>>>>>> Here are some snapshots : >>>>>>>>>> - OpenGL1 >>>>>>>>>> >>>>>>>>>> - OpenGL2 >>>>>>>>>> >>>>>>>>>> Attached some code that reproduces the problem, to be used with >>>>>>>>>> this >>>>>>>>>> volume. Visible on OSX and Windows to our knowledge, probably on more OS. >>>>>>>>>> >>>>>>>>>> The text is rendered properly when used with the old backend or >>>>>>>>>> when using a vtkGPUVolumeRayCastMapper instead of >>>>>>>>>> the vtkFixedPointVolumeRayCastMapper. >>>>>>>>>> >>>>>>>>>> Shall I feel a bug, is this a known issue ? >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> Simon Esneault >>>>>>>>>> Rennes, France >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> Simon Esneault >>>>>>>>> Rennes, France >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Powered by www.kitware.com >>>>>>>>> >>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>> >>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>> >>>>>>>>> Search the list archives at: >>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>> >>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>> * >>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>> * >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> ------------------------------------------------------------------ >>>>>>> Simon Esneault >>>>>>> Rennes, France >>>>>>> ------------------------------------------------------------------ >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> ------------------------------------------------------------------ >> Simon Esneault >> Rennes, France >> ------------------------------------------------------------------ >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtk-developers > > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From richard.j.brown at live.co.uk Fri Nov 20 09:43:42 2015 From: richard.j.brown at live.co.uk (Richard Brown) Date: Fri, 20 Nov 2015 15:43:42 +0100 Subject: [vtkusers] speedy vtkImageData addition In-Reply-To: References: <1447877711465-5735087.post@n5.nabble.com> Message-ID: Dzenan, Thanks for the reply but I think this was what I was looking for: http://vtk.1045678.n5.nabble.com/vtkImageData-GetScalarPointer-is-slow-inside-the-loop-td5724517.html The static cast each time was really slowing the process down. Regards, Rich > On 19 Nov 2015, at 23:03, D?enan Zuki? wrote: > > There is a convolution class, I don't know whether you can make it work for your case: > http://www.vtk.org/doc/nightly/html/classvtkImageConvolve.html > > HTH > > On Wed, Nov 18, 2015 at 3:15 PM, mbcx9rb9 > wrote: > Hi all, > > I have a large vtkImageData (imgData) and I wish to add a smaller > vtkImageData (kernel) multiple times to it. > > Is there a quicker way than adding each component separately? > > At the moment I have something below, which is repeated for each kernel: > > > // indices to add kernel > int x = 10; > int y = 10; > int z = 10; > > int *kerExt = kernel->GetExtent(); > > // all kernel elements > for (int i= kernel->GetExtent()[0]; i<= kernel->GetExtent()[1]; i++) > { > for (int j= kernel->GetExtent()[2]; j<= kernel->GetExtent()[3]; j++) > { > for (int k= kernel->GetExtent()[4]; k<= kernel->GetExtent()[5]; k++) > { > > // check that the point is inside the surface > if (x+i >= imgData->GetExtent()[0] && > x+i <= imgData->GetExtent()[1] && > y+j >= imgData->GetExtent()[2] && > y+j <= imgData->GetExtent()[3] && > z+k >= imgData->GetExtent()[4] && > z+k <= imgData->GetExtent()[5]) > { > > static_cast(imgData->GetScalarPointer(i+x,j+y,k+z))[0] += > static_cast(kernel->GetScalarPointer(i,j,k))[0]; > } > } > } > } > > > > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/speedy-vtkImageData-addition-tp5735087.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sean at rogue-research.com Fri Nov 20 11:24:58 2015 From: sean at rogue-research.com (Sean McBride) Date: Fri, 20 Nov 2015 11:24:58 -0500 Subject: [vtkusers] SimpleCocoaVTK linker issues In-Reply-To: <1447962914010-5735119.post@n5.nabble.com> References: <1447874717212-5735086.post@n5.nabble.com> <20151118221917.511270519@mail.rogue-research.com> <1447942326486-5735108.post@n5.nabble.com> <1447962914010-5735119.post@n5.nabble.com> Message-ID: <20151120162458.1757466614@mail.rogue-research.com> On Thu, 19 Nov 2015 12:55:14 -0700, Larry said: >I figured out a fix. Remove all of the vtk .dylibs Remove all which dylibs? The SimpleCocoaVTK has no dylibs, only static libs (.a). >The linker looks for the dynamic libraries first when linking, so you either >have to manually put in the /path/to/vtklibrary.a or, you remove the dylibs >so it will not link to them. > >Don't know why linking to the dynamic libraries don't work, but static >does... As per the example's read me, it was meant to be used with static libs. I'm confused as to how you got any dylibs in there. I could improve the read me based on your feedback... 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 l.kvitnevskiy+vtk at intellijointsurgical.com Fri Nov 20 12:11:57 2015 From: l.kvitnevskiy+vtk at intellijointsurgical.com (Larry) Date: Fri, 20 Nov 2015 10:11:57 -0700 (MST) Subject: [vtkusers] SimpleCocoaVTK linker issues In-Reply-To: <20151120162458.1757466614@mail.rogue-research.com> References: <1447874717212-5735086.post@n5.nabble.com> <20151118221917.511270519@mail.rogue-research.com> <1447942326486-5735108.post@n5.nabble.com> <1447962914010-5735119.post@n5.nabble.com> <20151120162458.1757466614@mail.rogue-research.com> Message-ID: <1448039517195-5735141.post@n5.nabble.com> Remove the dylibs from the install directory. For me that was /usr/local/vkt (I specified this as a ccmake option when compiling). Even though the Xcode project includes the static libs, Xcode generates -L/path/ -llib for the linker options. This will look for a dynamic library first, and if it can't find it, then it will look for a static library. Thus it was trying to include the .dylibs, which for some reason failed. Another option is to manually set the linker parameter to be /path/to/vtklib.a, but that seemed like more work. Another possible thing is to add -static option, but that might break something else. -- View this message in context: http://vtk.1045678.n5.nabble.com/SimpleCocoaVTK-linker-issues-tp5735086p5735141.html Sent from the VTK - Users mailing list archive at Nabble.com. From yassminabdallah at gmail.com Fri Nov 20 12:19:03 2015 From: yassminabdallah at gmail.com (YassminAbdallah) Date: Fri, 20 Nov 2015 10:19:03 -0700 (MST) Subject: [vtkusers] Segmentation and filtering in VTK Message-ID: <1448039943178-5735142.post@n5.nabble.com> Hello, i'm trying to apply segmentation and filtering techniques for medical image data on iOS , i know i should use ITK but i fail to compile it for iPhone. So please if there are filtering or segmentation techniques available in VTK could you please support me with reference? one more question please the medical image will be transferred to 3D object should i use filtering and segmentation on the 2D or the 3D image?? Thanks a lot, Yassmin -- View this message in context: http://vtk.1045678.n5.nabble.com/Segmentation-and-filtering-in-VTK-tp5735142.html Sent from the VTK - Users mailing list archive at Nabble.com. From lonni.besancon at gmail.com Fri Nov 20 12:42:27 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Fri, 20 Nov 2015 10:42:27 -0700 (MST) Subject: [vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY In-Reply-To: <1447855416009-5735062.post@n5.nabble.com> References: <1447844506521-5735057.post@n5.nabble.com> <1447855416009-5735062.post@n5.nabble.com> Message-ID: <1448041347199-5735143.post@n5.nabble.com> Hi Ken, I still haven't figured this out. Could you give me some more detailed explanations? -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735143.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Fri Nov 20 13:52:35 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 20 Nov 2015 13:52:35 -0500 Subject: [vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY In-Reply-To: <1448041347199-5735143.post@n5.nabble.com> References: <1447844506521-5735057.post@n5.nabble.com> <1447855416009-5735062.post@n5.nabble.com> <1448041347199-5735143.post@n5.nabble.com> Message-ID: Not without seeing the shader code, no. Get that to me like I requested and I can at least look at it when I get a chance. Thanks Ken On Fri, Nov 20, 2015 at 12:42 PM, Lonni Besan?on wrote: > Hi Ken, > > I still haven't figured this out. Could you give me some more detailed > explanations? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735143.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 > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Fri Nov 20 14:21:04 2015 From: ken.martin at kitware.com (Ken Martin) Date: Fri, 20 Nov 2015 14:21:04 -0500 Subject: [vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY In-Reply-To: <1448041347199-5735143.post@n5.nabble.com> References: <1447844506521-5735057.post@n5.nabble.com> <1447855416009-5735062.post@n5.nabble.com> <1448041347199-5735143.post@n5.nabble.com> Message-ID: The shader code is stored in a string. In vtkOpenGLPolyDataMapper.cxx there are some commented out lines that I usually uncomment that print the shaders to cout (or you could vtkErrorMacro) them. You would need to uncomment those lines in the ReplaceShaderValues code as I mentioned on SO. Rebuild your VTK and app. Then run it and watch for the output in the android device monitor. The lines will look like //cout << "VS: " << shaders[vtkShader::Vertex]->GetSource() << endl; //cout << "GS: " << shaders[vtkShader::Geometry]->GetSource() << endl; //cout << "FS: " << shaders[vtkShader::Fragment]->GetSource() << endl; Thanks Ken On Fri, Nov 20, 2015 at 12:42 PM, Lonni Besan?on wrote: > Hi Ken, > > I still haven't figured this out. Could you give me some more detailed > explanations? > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735143.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 > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.boeckel at kitware.com Fri Nov 20 15:03:15 2015 From: ben.boeckel at kitware.com (Ben Boeckel) Date: Fri, 20 Nov 2015 15:03:15 -0500 Subject: [vtkusers] Cmake Error Could not find Qt4 In-Reply-To: References: Message-ID: <20151120200315.GA26085@megas.khq.kitware.com> On Thu, Nov 05, 2015 at 15:39:51 -0200, Lays Rodrigues wrote: > Hi folks! > I'm trying to compile Vtk 6.2/6.3 on Fedora and the cmake returns a error: > > CMake Error at > /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message): > Could NOT find Qt4 (missing: QT_QTWEBKIT_INCLUDE_DIR QT_QTWEBKIT_LIBRARY) > (found version "4.8.6") > Call Stack (most recent call first): > /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 > (_FPHSA_FAILURE_MESSAGE) > /usr/share/cmake/Modules/FindQt4.cmake:1333 > (FIND_PACKAGE_HANDLE_STANDARD_ARGS) > GUISupport/QtWebkit/CMakeLists.txt:22 (find_package) > > Fedora dont have qt4 on repository and i have some libraries installed on > qt4: /usr/lib/qt4 /usr/lib64/qt4 /usr/share/qt4 > What should i do? You're missing the WebKit module from Qt. The thing is that the webkit-using module is turned on by VTK_Group_Qt. Instead, you can turn that off and then turn on the other Qt-related modules manually. As for Fedora, it does have Qt4 in the repos: % rpm -q qt qt-4.8.7-3.fc23.x86_64 --Ben From hongsongyang at 163.com Fri Nov 20 20:16:25 2015 From: hongsongyang at 163.com (HongSongyang) Date: Sat, 21 Nov 2015 09:16:25 +0800 Subject: [vtkusers] Could VTK set an image as background? Message-ID: <002d01d123fa$3e8f4d30$bbade790$@163.com> Hi All, We could set background color of vtk render. Could we set an image as the background? Thanks a lot. Hong songyang From aashish.chaudhary at kitware.com Fri Nov 20 20:39:10 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 20 Nov 2015 20:39:10 -0500 Subject: [vtkusers] [vtk-developers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: Simon, You branch has been merged: https://gitlab.kitware.com/vtk/vtk/merge_requests/932. Thank for the patch. - Aashish On Fri, Nov 20, 2015 at 9:37 AM, Ken Martin wrote: > That is the standard blend save/restore code so I think that should do the > trick. Thanks for digging into it. > > On Fri, Nov 20, 2015 at 8:32 AM, Aashish Chaudhary < > aashish.chaudhary at kitware.com> wrote: > >> Hi Simon, >> >> Thanks! I am okay with merging this change but in general restoring to >> previous state is tricky as for that you need to know the previous state. I >> think restoring to a default state (which you did) makes more sense. >> Although in VTK we don't have clear guideline on this. I am reviewing your >> changes.. >> >> >> On Fri, Nov 20, 2015 at 8:26 AM, Simon ESNEAULT > > wrote: >> >>> Hello, >>> >>> I've created a merge request for this bug : >>> https://gitlab.kitware.com/vtk/vtk/merge_requests/932 >>> >>> The class vtkOpenGLRayCastImageDisplayHelper is changing OpenGL blend >>> state, but never restores the state as it was before, resulting in some >>> incorrect blend later. >>> I don't know if it's the correct fix, but it certainly look like the >>> reason for this bug, and it solve the bug here. >>> Can someone review this merge ? >>> >>> Regards >>> Simon >>> >>> >>> 2015-11-18 9:38 GMT+01:00 Simon ESNEAULT : >>> >>>> Morning ! >>>> >>>> http://www.vtk.org/Bug/view.php?id=15838 >>>> >>>> Let me know if there is anything I can do to solve this. >>>> >>>> Simon >>>> >>>> 2015-11-17 16:50 GMT+01:00 Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com>: >>>> >>>>> >>>>> >>>>> On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT < >>>>> simon.esneault at gmail.com> wrote: >>>>> >>>>>> Dear Aashish, >>>>>> >>>>>> Yes the root cause is probably located in vtkTexturedActor2D, or in >>>>>> vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible >>>>>> class for loading the texture. >>>>>> Shall I fill a bug ? >>>>>> >>>>> >>>>> Yes, please. >>>>> >>>>> - Aashish >>>>> >>>>> >>>>>> Thanks >>>>>> Simon >>>>>> >>>>>> 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com>: >>>>>> >>>>>>> I see so its not just related to volume rendering and it seems to be >>>>>>> a vtkTextActor2D problem? In that can probably Ken / David Lonie wants to >>>>>>> take a look at it. Nonetheless, we will follow up on this bug. >>>>>>> >>>>>>> - Aashish >>>>>>> >>>>>>> On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT < >>>>>>> simon.esneault at gmail.com> wrote: >>>>>>> >>>>>>>> Hello Aashish, >>>>>>>> >>>>>>>> Thanks ! >>>>>>>> After doing some test, I realized the patch I've just sent is not >>>>>>>> the correct fix at all, because the text is not rendered properly when we >>>>>>>> don't use a vtkFixedPointVolumeRayCastMapper anymore. >>>>>>>> >>>>>>>> I believe the problem is probably larger than this and probably has >>>>>>>> nothing to do with the freetype text generation, but more with the >>>>>>>> vtkTexturedActor2D rendering part used together with a >>>>>>>> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the >>>>>>>> texture has some transparent pixel in it ... >>>>>>>> >>>>>>>> Attached there is a new example that demonstrate that a >>>>>>>> vtkTextActor AND a vtkTexturedButtonRepresentation2D are not correctly >>>>>>>> drawn in that case : >>>>>>>> - OpenGL1 backend >>>>>>>> : Transparent >>>>>>>> pixel in Texture are correctly drawn >>>>>>>> - OpenGL2 backend >>>>>>>> : >>>>>>>> Transparent pixel in Texture are not correctly drawn (clamped to white ?) >>>>>>>> >>>>>>>> The example is more simple than the previous one and does not need >>>>>>>> any additional data. >>>>>>>> >>>>>>>> Hope that helps ! >>>>>>>> -Simon >>>>>>>> >>>>>>>> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < >>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>> >>>>>>>>> Simon, >>>>>>>>> >>>>>>>>> Thanks for the report. I will follow up with other developers on >>>>>>>>> this bug. >>>>>>>>> >>>>>>>>> - Aashish >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT < >>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Hello, >>>>>>>>>> >>>>>>>>>> Trying to solve this problem, I found out that if one call >>>>>>>>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>>>>>>>>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>>>>>>>>> at the anchor point, and with a transparent gray background. >>>>>>>>>> - DebugTexturesOn : >>>>>>>>>> http://picpaste.com/pics/Blurred.1447668943.PNG >>>>>>>>>> - DebugTexturesOff : >>>>>>>>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>>>>>>>>> >>>>>>>>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect this >>>>>>>>>> is a blending problem. When we activate Texture Debugging, a gray >>>>>>>>>> background is first drawn, and after that in the method RenderCharacter( >>>>>>>>>> ... ) line 1887; we either blend the rendered text with the background or >>>>>>>>>> not. >>>>>>>>>> >>>>>>>>>> Attached is a diff file that solves the problem for me. I do not >>>>>>>>>> really understand why, so maybe a developer with more VTK's knowledge can >>>>>>>>>> integrate this properly :) >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> Simon >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT < >>>>>>>>>> simon.esneault at gmail.com>: >>>>>>>>>> >>>>>>>>>>> Hi All, >>>>>>>>>>> >>>>>>>>>>> All vtkTextActor are rendered blurred when using with >>>>>>>>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>>>>>>>>> new rendering backend. >>>>>>>>>>> >>>>>>>>>>> Here are some snapshots : >>>>>>>>>>> - OpenGL1 >>>>>>>>>>> >>>>>>>>>>> - OpenGL2 >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Attached some code that reproduces the problem, to be used with >>>>>>>>>>> this >>>>>>>>>>> volume. Visible on OSX and Windows to our knowledge, probably on more OS. >>>>>>>>>>> >>>>>>>>>>> The text is rendered properly when used with the old backend or >>>>>>>>>>> when using a vtkGPUVolumeRayCastMapper instead of >>>>>>>>>>> the vtkFixedPointVolumeRayCastMapper. >>>>>>>>>>> >>>>>>>>>>> Shall I feel a bug, is this a known issue ? >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> Simon >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>> Simon Esneault >>>>>>>>>>> Rennes, France >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> Simon Esneault >>>>>>>>>> Rennes, France >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Powered by www.kitware.com >>>>>>>>>> >>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>> >>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>> >>>>>>>>>> Search the list archives at: >>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>> >>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>> * >>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>> * >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> Simon Esneault >>>>>>>> Rennes, France >>>>>>>> ------------------------------------------------------------------ >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Simon Esneault >>> Rennes, France >>> ------------------------------------------------------------------ >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtk-developers >> >> >> > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From csaravanakumar2010 at gmail.com Sat Nov 21 00:07:15 2015 From: csaravanakumar2010 at gmail.com (saravanakumar) Date: Fri, 20 Nov 2015 22:07:15 -0700 (MST) Subject: [vtkusers] labeling in GenerateModelsFromLabels.cxx Message-ID: <1448082435110-5735151.post@n5.nabble.com> Hi all, I am trying to create vtp file from meta images. I got the example program in VTK. The link is http://www.vtk.org/Wiki/VTK/Examples/Cxx/Medical/GenerateModelsFromLabels In this example, they used startLabel and endLabel. what is startlabel and endlabel here? Which value needed to this? Please give me the solution for this. -- View this message in context: http://vtk.1045678.n5.nabble.com/labeling-in-GenerateModelsFromLabels-cxx-tp5735151.html Sent from the VTK - Users mailing list archive at Nabble.com. From nico.schloemer at gmail.com Sat Nov 21 08:11:13 2015 From: nico.schloemer at gmail.com (=?UTF-8?Q?Nico_Schl=C3=B6mer?=) Date: Sat, 21 Nov 2015 14:11:13 +0100 Subject: [vtkusers] libvtkFiltersVerdict-6.3.so.1 vs. libvtkFiltersVerdict.so.6.3 Message-ID: On a standard VTK build, I see that the installed libraries are, e.g., ``` libvtkFiltersVerdict-6.3.so libvtkFiltersVerdict-6.3.so.1 ``` (The first being a symlink to the second.) This looks really odd; I would have expected ``` libvtkFiltersVerdict.so libvtkFiltersVerdict.so.6 libvtkFiltersVerdict.so.6.3 ``` as is intended by CMake's VERSION and SOVERSION properties. Any insight here? Cheers, Nico From simon.esneault at gmail.com Mon Nov 23 04:32:45 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Mon, 23 Nov 2015 10:32:45 +0100 Subject: [vtkusers] [vtk-developers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: Hello, Thanks for merging this. As a side note, I believe the same is true for the old backend, because the function vtkOpenGLRayCastImageDisplayHelper::RenderTextureInternal( ... ) does also modify the blend state without restoring it. But somehow, the 2D texture are correctly drawn with the old backend ... Mantis bugs : http://www.vtk.org/Bug/view.php?id=15838 and http://www.vtk.org/Bug/view.php?id=15812 can now be closed :) Thanks Simon 2015-11-21 2:39 GMT+01:00 Aashish Chaudhary : > Simon, > > You branch has been merged: > https://gitlab.kitware.com/vtk/vtk/merge_requests/932. Thank for the > patch. > > - Aashish > > On Fri, Nov 20, 2015 at 9:37 AM, Ken Martin > wrote: > >> That is the standard blend save/restore code so I think that should do >> the trick. Thanks for digging into it. >> >> On Fri, Nov 20, 2015 at 8:32 AM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> Hi Simon, >>> >>> Thanks! I am okay with merging this change but in general restoring to >>> previous state is tricky as for that you need to know the previous state. I >>> think restoring to a default state (which you did) makes more sense. >>> Although in VTK we don't have clear guideline on this. I am reviewing your >>> changes.. >>> >>> >>> On Fri, Nov 20, 2015 at 8:26 AM, Simon ESNEAULT < >>> simon.esneault at gmail.com> wrote: >>> >>>> Hello, >>>> >>>> I've created a merge request for this bug : >>>> https://gitlab.kitware.com/vtk/vtk/merge_requests/932 >>>> >>>> The class vtkOpenGLRayCastImageDisplayHelper is changing OpenGL blend >>>> state, but never restores the state as it was before, resulting in some >>>> incorrect blend later. >>>> I don't know if it's the correct fix, but it certainly look like the >>>> reason for this bug, and it solve the bug here. >>>> Can someone review this merge ? >>>> >>>> Regards >>>> Simon >>>> >>>> >>>> 2015-11-18 9:38 GMT+01:00 Simon ESNEAULT : >>>> >>>>> Morning ! >>>>> >>>>> http://www.vtk.org/Bug/view.php?id=15838 >>>>> >>>>> Let me know if there is anything I can do to solve this. >>>>> >>>>> Simon >>>>> >>>>> 2015-11-17 16:50 GMT+01:00 Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com>: >>>>> >>>>>> >>>>>> >>>>>> On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT < >>>>>> simon.esneault at gmail.com> wrote: >>>>>> >>>>>>> Dear Aashish, >>>>>>> >>>>>>> Yes the root cause is probably located in vtkTexturedActor2D, or in >>>>>>> vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible >>>>>>> class for loading the texture. >>>>>>> Shall I fill a bug ? >>>>>>> >>>>>> >>>>>> Yes, please. >>>>>> >>>>>> - Aashish >>>>>> >>>>>> >>>>>>> Thanks >>>>>>> Simon >>>>>>> >>>>>>> 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary < >>>>>>> aashish.chaudhary at kitware.com>: >>>>>>> >>>>>>>> I see so its not just related to volume rendering and it seems to >>>>>>>> be a vtkTextActor2D problem? In that can probably Ken / David Lonie wants >>>>>>>> to take a look at it. Nonetheless, we will follow up on this bug. >>>>>>>> >>>>>>>> - Aashish >>>>>>>> >>>>>>>> On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT < >>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>> >>>>>>>>> Hello Aashish, >>>>>>>>> >>>>>>>>> Thanks ! >>>>>>>>> After doing some test, I realized the patch I've just sent is not >>>>>>>>> the correct fix at all, because the text is not rendered properly when we >>>>>>>>> don't use a vtkFixedPointVolumeRayCastMapper anymore. >>>>>>>>> >>>>>>>>> I believe the problem is probably larger than this and probably >>>>>>>>> has nothing to do with the freetype text generation, but more with the >>>>>>>>> vtkTexturedActor2D rendering part used together with a >>>>>>>>> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the >>>>>>>>> texture has some transparent pixel in it ... >>>>>>>>> >>>>>>>>> Attached there is a new example that demonstrate that a >>>>>>>>> vtkTextActor AND a vtkTexturedButtonRepresentation2D are not correctly >>>>>>>>> drawn in that case : >>>>>>>>> - OpenGL1 backend >>>>>>>>> : Transparent >>>>>>>>> pixel in Texture are correctly drawn >>>>>>>>> - OpenGL2 backend >>>>>>>>> : >>>>>>>>> Transparent pixel in Texture are not correctly drawn (clamped to white ?) >>>>>>>>> >>>>>>>>> The example is more simple than the previous one and does not need >>>>>>>>> any additional data. >>>>>>>>> >>>>>>>>> Hope that helps ! >>>>>>>>> -Simon >>>>>>>>> >>>>>>>>> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < >>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>> >>>>>>>>>> Simon, >>>>>>>>>> >>>>>>>>>> Thanks for the report. I will follow up with other developers on >>>>>>>>>> this bug. >>>>>>>>>> >>>>>>>>>> - Aashish >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT < >>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> Hello, >>>>>>>>>>> >>>>>>>>>>> Trying to solve this problem, I found out that if one call >>>>>>>>>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>>>>>>>>>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>>>>>>>>>> at the anchor point, and with a transparent gray background. >>>>>>>>>>> - DebugTexturesOn : >>>>>>>>>>> http://picpaste.com/pics/Blurred.1447668943.PNG >>>>>>>>>>> - DebugTexturesOff : >>>>>>>>>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>>>>>>>>>> >>>>>>>>>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect >>>>>>>>>>> this is a blending problem. When we activate Texture Debugging, a gray >>>>>>>>>>> background is first drawn, and after that in the method RenderCharacter( >>>>>>>>>>> ... ) line 1887; we either blend the rendered text with the background or >>>>>>>>>>> not. >>>>>>>>>>> >>>>>>>>>>> Attached is a diff file that solves the problem for me. I do not >>>>>>>>>>> really understand why, so maybe a developer with more VTK's knowledge can >>>>>>>>>>> integrate this properly :) >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> Simon >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT < >>>>>>>>>>> simon.esneault at gmail.com>: >>>>>>>>>>> >>>>>>>>>>>> Hi All, >>>>>>>>>>>> >>>>>>>>>>>> All vtkTextActor are rendered blurred when using with >>>>>>>>>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>>>>>>>>>> new rendering backend. >>>>>>>>>>>> >>>>>>>>>>>> Here are some snapshots : >>>>>>>>>>>> - OpenGL1 >>>>>>>>>>>> >>>>>>>>>>>> - OpenGL2 >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Attached some code that reproduces the problem, to be used with >>>>>>>>>>>> this >>>>>>>>>>>> volume. Visible on OSX and Windows to our knowledge, probably on more OS. >>>>>>>>>>>> >>>>>>>>>>>> The text is rendered properly when used with the old backend or >>>>>>>>>>>> when using a vtkGPUVolumeRayCastMapper instead of >>>>>>>>>>>> the vtkFixedPointVolumeRayCastMapper. >>>>>>>>>>>> >>>>>>>>>>>> Shall I feel a bug, is this a known issue ? >>>>>>>>>>>> >>>>>>>>>>>> Thanks, >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> Simon Esneault >>>>>>>>>>>> Rennes, France >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>> Simon Esneault >>>>>>>>>>> Rennes, France >>>>>>>>>>> >>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>> >>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>> >>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>> >>>>>>>>>>> Search the list archives at: >>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>> >>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>> * >>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>> * >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> Simon Esneault >>>>>>>>> Rennes, France >>>>>>>>> ------------------------------------------------------------------ >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>> * >>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>> * >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> ------------------------------------------------------------------ >>>>>>> Simon Esneault >>>>>>> Rennes, France >>>>>>> ------------------------------------------------------------------ >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> ------------------------------------------------------------------ >>>> Simon Esneault >>>> Rennes, France >>>> ------------------------------------------------------------------ >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Search the list archives at: >>> http://markmail.org/search/?q=vtk-developers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtk-developers >>> >>> >>> >> >> >> -- >> Ken Martin PhD >> Chairman & CFO >> Kitware Inc. >> 28 Corporate Drive >> Clifton Park NY 12065 >> 518 371 3971 >> >> This communication, including all attachments, contains confidential and >> legally privileged information, and it is intended only for the use of the >> addressee. Access to this email by anyone else is unauthorized. If you are >> not the intended recipient, any disclosure, copying, distribution or any >> action taken in reliance on it is prohibited and may be unlawful. If you >> received this communication in error please notify us immediately and >> destroy the original message. Thank you. >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From daviddoria at gmail.com Mon Nov 23 07:48:54 2015 From: daviddoria at gmail.com (David Doria) Date: Mon, 23 Nov 2015 06:48:54 -0600 Subject: [vtkusers] Could VTK set an image as background? In-Reply-To: <002d01d123fa$3e8f4d30$bbade790$@163.com> References: <002d01d123fa$3e8f4d30$bbade790$@163.com> Message-ID: On Fri, Nov 20, 2015 at 7:16 PM, HongSongyang wrote: > Hi All, > We could set background color of vtk render. > Could we set an image as the background? > Thanks a lot. > > Hong songyang > Here if how you can set the background color: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/BackgroundColor and a background image: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/BackgroundImage David -------------- next part -------------- An HTML attachment was scrubbed... URL: From myk321 at gmail.com Mon Nov 23 07:54:46 2015 From: myk321 at gmail.com (Myk) Date: Mon, 23 Nov 2015 05:54:46 -0700 (MST) Subject: [vtkusers] Cmake Error on VTK In-Reply-To: References: Message-ID: <1448283286390-5735156.post@n5.nabble.com> Hi Lays, I has a similar problem to this where the cmake build of my application failed trying to find QVTKWidget.h. I solved it using a 2 step process: Step 1: in the directory in which I built VTK, I ran the command: sudo make install The effect of this was the creation of a directory called /usr/local/include/vtk-6.3, which contains QVTKwidget.h, along with lots of other VTK headers. Step 2: in my application itself (in my case in my .h file, but it could be in your .cpp file), I modified the #include to read: #include I believe that the reason that this works, is that cmake searches /usr/local/include, but not the folders underneath it, so by including vtk-6.3 in the #include effectively points out the local of the QVTKWidget2.h header file. Kind regards, Michael -- View this message in context: http://vtk.1045678.n5.nabble.com/Cmake-Error-on-VTK-tp5734739p5735156.html Sent from the VTK - Users mailing list archive at Nabble.com. From xabivtk at gmail.com Mon Nov 23 08:45:29 2015 From: xabivtk at gmail.com (Xabi Riobe) Date: Mon, 23 Nov 2015 14:45:29 +0100 Subject: [vtkusers] Volume + surface transparency with OpenGL2 Message-ID: Hi, I would like to know if with OpenGL2 it is now possible (and how) to have transparent polygonal surface mixed with volumetric rendering? And if not, is it scheduled to implement it in a future release? It doesn't seem to be the case, but i wanted to be sure. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankhesh.jhaveri at kitware.com Mon Nov 23 11:14:02 2015 From: sankhesh.jhaveri at kitware.com (Sankhesh Jhaveri) Date: Mon, 23 Nov 2015 11:14:02 -0500 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <1447959190783-5735117.post@n5.nabble.com> References: <5632585A.4000005@rhpcs.mcmaster.ca> <1447432321076-5734971.post@n5.nabble.com> <56461618.5090102@rhpcs.mcmaster.ca> <1447628907554-5734986.post@n5.nabble.com> <1447959010029-5735115.post@n5.nabble.com> <1447959190783-5735117.post@n5.nabble.com> Message-ID: Thanks Dave. Those are interesting images. Looking forward to the demonstration repository and blog post. ?Sankhesh On Thu, Nov 19, 2015 at 1:53 PM, dewarren wrote: > Whoops, should be http://imgur.com/a/KFFtW. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5735117.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Nov 23 11:52:14 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 23 Nov 2015 11:52:14 -0500 Subject: [vtkusers] Rendering multiple volumes In-Reply-To: <1447959190783-5735117.post@n5.nabble.com> References: <5632585A.4000005@rhpcs.mcmaster.ca> <1447432321076-5734971.post@n5.nabble.com> <56461618.5090102@rhpcs.mcmaster.ca> <1447628907554-5734986.post@n5.nabble.com> <1447959010029-5735115.post@n5.nabble.com> <1447959190783-5735117.post@n5.nabble.com> Message-ID: Dave, I think the second approach to me provides you much greater flexibility, yes its more work but hopefully once you have it set hopefully you can use your workflow again on a newer similar dataset. One idea that we have is to also enable users to inject custom shader code in case some more flexibility is needed when dealing with transfer functions or any other computation. Thanks for posting the image, looks great. Let us know if you need help in the future. Best, On Thu, Nov 19, 2015 at 1:53 PM, dewarren wrote: > Whoops, should be http://imgur.com/a/KFFtW. > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Rendering-multiple-volumes-tp5734685p5735117.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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From lonni.besancon at gmail.com Mon Nov 23 11:59:24 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Mon, 23 Nov 2015 09:59:24 -0700 (MST) Subject: [vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY In-Reply-To: References: <1447844506521-5735057.post@n5.nabble.com> <1447855416009-5735062.post@n5.nabble.com> <1448041347199-5735143.post@n5.nabble.com> Message-ID: <1448297964515-5735161.post@n5.nabble.com> Sorry for the time I took to answer. I will update the post on SO. So here is the code I got from the error macro: /W/NativeVTK( 7871): rotation = 0.000000 ;;; 0.000000 ;;; 0.583755 E/VTK ( 7871): ERROR: In /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1237 E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): VS: //VTK::System::Dec E/VTK ( 7871): /*========================================================================= E/VTK ( 7871): Program: Visualization Toolkit E/VTK ( 7871): Module: vtkPolyDataVS.glsl E/VTK ( 7871): Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen E/VTK ( 7871): All rights reserved. E/VTK ( 7871): See Copyright.txt or http://www.kitware.com/Copyright.htm for details. E/VTK ( 7871): This software is distributed WITHOUT ANY WARRANTY; without even E/VTK ( 7871): the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR E/VTK ( 7871): PURPOSE. See the above copyright notice for more information. E/VTK ( 7871): =========================================================================*/ E/VTK ( 7871): attribute vec4 vertexMC; E/VTK ( 7871): // frag position in VC E/VTK ( 7871): varying vec4 vertexVCVSOutput; E/VTK ( 7871): // optional normal declaration E/VTK ( 7871): attribute vec3 normalMC; E/VTK ( 7871): uniform mat3 normalMatrix; E/VTK ( 7871): varying vec3 normalVCVSOutput; E/VTK ( 7871): // extra lighting parameters E/VTK ( 7871): //VTK::Light::Dec E/VTK ( 7871): // Texture coordinates E/VTK ( 7871): //VTK::TCoord::Dec E/VTK ( 7871): // material property values E/VTK ( 7871): //VTK::Color::Dec E/VTK ( 7871): // clipping plane vars E/VTK ( 7871): //VTK::Clip::Dec E/VTK ( 7871): // camera and actor matrix values E/VTK ( 7871): uniform mat4 MCDCMatrix; E/VTK ( 7871): uniform mat4 MCVCMatrix; E/VTK ( 7871): // Apple Bug E/VTK ( 7871): //VTK::PrimID::Dec E/VTK ( 7871): void main() E/VTK ( 7871): { E/VTK ( 7871): //VTK::Color::Impl E/VTK ( 7871): normalVCVSOutput = normalMatrix * normalMC; E/VTK ( 7871): //VTK::TCoord::Impl E/VTK ( 7871): //VTK::Clip::Impl E/VTK ( 7871): //VTK::PrimID::Impl E/VTK ( 7871): vertexVCVSOutput = MCVCMatrix * vertexMC; E/VTK ( 7871): gl_Position = MCDCMatrix * vertexMC; E/VTK ( 7871): //VTK::Light::Impl E/VTK ( 7871): } E/VTK ( 7871): ERROR: In /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1238 E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): GS: E/VTK ( 7871): ERROR: In /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1239 E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): FS: //VTK::System::Dec E/VTK ( 7871): /*========================================================================= E/VTK ( 7871): Program: Visualization Toolkit E/VTK ( 7871): Module: vtkPolyDataFS.glsl E/VTK ( 7871): Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen E/VTK ( 7871): All rights reserved. E/VTK ( 7871): See Copyright.txt or http://www.kitware.com/Copyright.htm for details. E/VTK ( 7871): This software is distributed WITHOUT ANY WARRANTY; without even E/VTK ( 7871): the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR E/VTK ( 7871): PURPOSE. See the above copyright notice for more information. E/VTK ( 7871): =========================================================================*/ E/VTK ( 7871): // Template for the polydata mappers fragment shader E/VTK ( 7871): uniform int PrimitiveIDOffset; E/VTK ( 7871): // VC position of this fragment E/VTK ( 7871): varying vec4 vertexVCVSOutput; I/tango ( 186): vio-fault-detector.cc:74 IMU and camera data quality are qualified for VIO recovery. W/tango ( 186): vio-status-monitor.cc:208 VIO is ready for reset. Current timestamp 20626.498361783 W/tango ( 186): vio-status-monitor.cc:93 VIO receives reasonable visual and inertial data, try to reset now. I/tango ( 186): vio-status-monitor.cc:97 Resetting with last good frame. E/VTK ( 7871): // optional color passed in from the vertex shader, vertexColor E/VTK ( 7871): uniform float opacityUniform; // the fragment opacity E/VTK ( 7871): uniform vec3 ambientColorUniform; // intensity weighted color E/VTK ( 7871): uniform vec3 diffuseColorUniform; // intensity weighted color E/VTK ( 7871): uniform vec3 specularColorUniform; // intensity weighted color E/VTK ( 7871): uniform float specularPowerUniform; E/VTK ( 7871): // optional surface normal declaration E/VTK ( 7871): varying vec3 normalVCVSOutput; E/VTK ( 7871): // extra lighting parameters E/VTK ( 7871): //VTK::Light::Dec E/VTK ( 7871): // Texture coordinates E/VTK ( 7871): //VTK::TCoord::Dec E/VTK ( 7871): // picking support E/VTK ( 7871): //VTK::Picking::Dec E/VTK ( 7871): // Depth Peeling Support E/VTK ( 7871): //VTK::DepthPeeling::Dec E/VTK ( 7871): // clipping plane vars E/VTK ( 7871): //VTK::Clip::Dec E/VTK ( 7871): // the output of this shader E/VTK ( 7871): //VTK::Output::Dec E/VTK ( 7871): // Apple Bug E/VTK ( 7871): //VTK::PrimID::Dec E/VTK ( 7871): void main() E/VTK ( 7871): { E/VTK ( 7871): // Apple Bug E/VTK ( 7871): //VTK::PrimID::Impl E/VTK ( 7871): //VTK::Clip::Impl E/VTK ( 7871): vec3 ambientColor; E/VTK ( 7871): vec3 diffuseColor; E/VTK ( 7871): float opacity; E/VTK ( 7871): vec3 specularColor; E/VTK ( 7871): float specularPower; E/VTK ( 7871): ambientColor = ambientColorUniform; E/VTK ( 7871): diffuseColor = diffuseColorUniform; E/VTK ( 7871): opacity = opacityUniform; E/VTK ( 7871): specularColor = specularColorUniform; E/VTK ( 7871): specularPower = specularPowerUniform; E/VTK ( 7871): // VC position of this fragment E/VTK ( 7871): vec4 vertexVC = vertexVCVSOutput; E/VTK ( 7871): // Generate the normal if we are not passed in one E/VTK ( 7871): vec3 normalVCVSOutput = normalize(normalVCVSOutput); E/VTK ( 7871): if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; } E/VTK ( 7871): float df = max(0.0, normalVCVSOutput.z); E/VTK ( 7871): float sf = pow(df, specularPower); E/VTK ( 7871): vec3 diffuse = df * diffuseColor; E/VTK ( 7871): vec3 specular = sf * specularColor; E/VTK ( 7871): gl_FragData[0] = vec4(ambientColor + diffuse + specular, opacity); E/VTK ( 7871): //VTK::Light::Impl E/VTK ( 7871): //VTK::TCoord::Impl E/VTK ( 7871): if (gl_FragData[0].a <= 0.0) E/VTK ( 7871): { E/VTK ( 7871): discard; E/VTK ( 7871): } E/VTK ( 7871): //VTK::DepthPeeling::Impl E/VTK ( 7871): //VTK::Picking::Impl E/VTK ( 7871): } E/VTK ( 7871): ERROR: In /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1421 E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting 'vertexMC' in shader VAO. E/VTK ( 7871): ERROR: In /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1429 E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting 'normalMC' in shader VAO. E/VTK ( 7871): ERROR: In /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, line 1237 / Did I provide enough information? Please let me know if something is missing. Have a nice day and thanks again -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735161.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Mon Nov 23 12:11:10 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 23 Nov 2015 12:11:10 -0500 Subject: [vtkusers] Volume + surface transparency with OpenGL2 In-Reply-To: References: Message-ID: Hi Xabi, Can you explain the expected behavior you want to see when rendering in such case? Thanks, On Mon, Nov 23, 2015 at 8:45 AM, Xabi Riobe wrote: > Hi, > > I would like to know if with OpenGL2 it is now possible (and how) to have > transparent polygonal surface mixed with volumetric rendering? > And if not, is it scheduled to implement it in a future release? > > It doesn't seem to be the case, but i wanted to be sure. > > Thanks! > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Mon Nov 23 12:13:25 2015 From: dave.demarle at kitware.com (David E DeMarle) Date: Mon, 23 Nov 2015 12:13:25 -0500 Subject: [vtkusers] meshio In-Reply-To: References: Message-ID: Nice! Thanks David E DeMarle Kitware, Inc. R&D Engineer 21 Corporate Drive Clifton Park, NY 12065-8662 Phone: 518-881-4909 On Thu, Nov 12, 2015 at 9:34 PM, Nico Schl?mer wrote: > Hi everyone, > > When playing with VTK, I created a little tool [1] for converting VTK > files to various other formats (H5M, Msh, Exodus etc.) and also from those > formats to VTK. It largely relies on VTK's extensive Python interface, so > perhaps some of you find it useful. > > Cheers, > Nico > > > [1] https://pypi.python.org/pypi/meshio > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Nov 23 12:16:16 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 23 Nov 2015 12:16:16 -0500 Subject: [vtkusers] [vtk-developers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper In-Reply-To: References: Message-ID: I believe that might be because of push and pop attributes in older GL. I updated the the mantis (I hope I did it right -:)). Thanks Simon. On Mon, Nov 23, 2015 at 4:32 AM, Simon ESNEAULT wrote: > Hello, > > Thanks for merging this. > > As a side note, I believe the same is true for the old backend, because > the function vtkOpenGLRayCastImageDisplayHelper::RenderTextureInternal( > ... ) does also modify the blend state without restoring it. But somehow, > the 2D texture are correctly drawn with the old backend ... > > Mantis bugs : > http://www.vtk.org/Bug/view.php?id=15838 > and > http://www.vtk.org/Bug/view.php?id=15812 > > can now be closed :) > > Thanks > Simon > > 2015-11-21 2:39 GMT+01:00 Aashish Chaudhary >: > >> Simon, >> >> You branch has been merged: >> https://gitlab.kitware.com/vtk/vtk/merge_requests/932. Thank for the >> patch. >> >> - Aashish >> >> On Fri, Nov 20, 2015 at 9:37 AM, Ken Martin >> wrote: >> >>> That is the standard blend save/restore code so I think that should do >>> the trick. Thanks for digging into it. >>> >>> On Fri, Nov 20, 2015 at 8:32 AM, Aashish Chaudhary < >>> aashish.chaudhary at kitware.com> wrote: >>> >>>> Hi Simon, >>>> >>>> Thanks! I am okay with merging this change but in general restoring to >>>> previous state is tricky as for that you need to know the previous state. I >>>> think restoring to a default state (which you did) makes more sense. >>>> Although in VTK we don't have clear guideline on this. I am reviewing your >>>> changes.. >>>> >>>> >>>> On Fri, Nov 20, 2015 at 8:26 AM, Simon ESNEAULT < >>>> simon.esneault at gmail.com> wrote: >>>> >>>>> Hello, >>>>> >>>>> I've created a merge request for this bug : >>>>> https://gitlab.kitware.com/vtk/vtk/merge_requests/932 >>>>> >>>>> The class vtkOpenGLRayCastImageDisplayHelper is changing OpenGL blend >>>>> state, but never restores the state as it was before, resulting in some >>>>> incorrect blend later. >>>>> I don't know if it's the correct fix, but it certainly look like the >>>>> reason for this bug, and it solve the bug here. >>>>> Can someone review this merge ? >>>>> >>>>> Regards >>>>> Simon >>>>> >>>>> >>>>> 2015-11-18 9:38 GMT+01:00 Simon ESNEAULT : >>>>> >>>>>> Morning ! >>>>>> >>>>>> http://www.vtk.org/Bug/view.php?id=15838 >>>>>> >>>>>> Let me know if there is anything I can do to solve this. >>>>>> >>>>>> Simon >>>>>> >>>>>> 2015-11-17 16:50 GMT+01:00 Aashish Chaudhary < >>>>>> aashish.chaudhary at kitware.com>: >>>>>> >>>>>>> >>>>>>> >>>>>>> On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT < >>>>>>> simon.esneault at gmail.com> wrote: >>>>>>> >>>>>>>> Dear Aashish, >>>>>>>> >>>>>>>> Yes the root cause is probably located in vtkTexturedActor2D, or in >>>>>>>> vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible >>>>>>>> class for loading the texture. >>>>>>>> Shall I fill a bug ? >>>>>>>> >>>>>>> >>>>>>> Yes, please. >>>>>>> >>>>>>> - Aashish >>>>>>> >>>>>>> >>>>>>>> Thanks >>>>>>>> Simon >>>>>>>> >>>>>>>> 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary < >>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>> >>>>>>>>> I see so its not just related to volume rendering and it seems to >>>>>>>>> be a vtkTextActor2D problem? In that can probably Ken / David Lonie wants >>>>>>>>> to take a look at it. Nonetheless, we will follow up on this bug. >>>>>>>>> >>>>>>>>> - Aashish >>>>>>>>> >>>>>>>>> On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT < >>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Hello Aashish, >>>>>>>>>> >>>>>>>>>> Thanks ! >>>>>>>>>> After doing some test, I realized the patch I've just sent is not >>>>>>>>>> the correct fix at all, because the text is not rendered properly when we >>>>>>>>>> don't use a vtkFixedPointVolumeRayCastMapper anymore. >>>>>>>>>> >>>>>>>>>> I believe the problem is probably larger than this and probably >>>>>>>>>> has nothing to do with the freetype text generation, but more with the >>>>>>>>>> vtkTexturedActor2D rendering part used together with a >>>>>>>>>> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the >>>>>>>>>> texture has some transparent pixel in it ... >>>>>>>>>> >>>>>>>>>> Attached there is a new example that demonstrate that a >>>>>>>>>> vtkTextActor AND a vtkTexturedButtonRepresentation2D are not correctly >>>>>>>>>> drawn in that case : >>>>>>>>>> - OpenGL1 backend >>>>>>>>>> : Transparent >>>>>>>>>> pixel in Texture are correctly drawn >>>>>>>>>> - OpenGL2 backend >>>>>>>>>> >>>>>>>>>> : Transparent pixel in Texture are not correctly drawn (clamped to white ?) >>>>>>>>>> >>>>>>>>>> The example is more simple than the previous one and does not >>>>>>>>>> need any additional data. >>>>>>>>>> >>>>>>>>>> Hope that helps ! >>>>>>>>>> -Simon >>>>>>>>>> >>>>>>>>>> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary < >>>>>>>>>> aashish.chaudhary at kitware.com>: >>>>>>>>>> >>>>>>>>>>> Simon, >>>>>>>>>>> >>>>>>>>>>> Thanks for the report. I will follow up with other developers on >>>>>>>>>>> this bug. >>>>>>>>>>> >>>>>>>>>>> - Aashish >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT < >>>>>>>>>>> simon.esneault at gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hello, >>>>>>>>>>>> >>>>>>>>>>>> Trying to solve this problem, I found out that if one call >>>>>>>>>>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a >>>>>>>>>>>> string with a vtkTextActor, the text is properly rendered with a yellow dot >>>>>>>>>>>> at the anchor point, and with a transparent gray background. >>>>>>>>>>>> - DebugTexturesOn : >>>>>>>>>>>> http://picpaste.com/pics/Blurred.1447668943.PNG >>>>>>>>>>>> - DebugTexturesOff : >>>>>>>>>>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG >>>>>>>>>>>> >>>>>>>>>>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect >>>>>>>>>>>> this is a blending problem. When we activate Texture Debugging, a gray >>>>>>>>>>>> background is first drawn, and after that in the method RenderCharacter( >>>>>>>>>>>> ... ) line 1887; we either blend the rendered text with the background or >>>>>>>>>>>> not. >>>>>>>>>>>> >>>>>>>>>>>> Attached is a diff file that solves the problem for me. I do >>>>>>>>>>>> not really understand why, so maybe a developer with more VTK's knowledge >>>>>>>>>>>> can integrate this properly :) >>>>>>>>>>>> >>>>>>>>>>>> Thanks, >>>>>>>>>>>> Simon >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT < >>>>>>>>>>>> simon.esneault at gmail.com>: >>>>>>>>>>>> >>>>>>>>>>>>> Hi All, >>>>>>>>>>>>> >>>>>>>>>>>>> All vtkTextActor are rendered blurred when using with >>>>>>>>>>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the >>>>>>>>>>>>> new rendering backend. >>>>>>>>>>>>> >>>>>>>>>>>>> Here are some snapshots : >>>>>>>>>>>>> - OpenGL1 >>>>>>>>>>>>> >>>>>>>>>>>>> - OpenGL2 >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Attached some code that reproduces the problem, to be used >>>>>>>>>>>>> with this >>>>>>>>>>>>> >>>>>>>>>>>>> volume. Visible on OSX and Windows to our knowledge, probably on more OS. >>>>>>>>>>>>> >>>>>>>>>>>>> The text is rendered properly when used with the old backend >>>>>>>>>>>>> or when using a vtkGPUVolumeRayCastMapper instead of >>>>>>>>>>>>> the vtkFixedPointVolumeRayCastMapper. >>>>>>>>>>>>> >>>>>>>>>>>>> Shall I feel a bug, is this a known issue ? >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks, >>>>>>>>>>>>> Simon >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>> Simon Esneault >>>>>>>>>>>>> Rennes, France >>>>>>>>>>>>> >>>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> Simon Esneault >>>>>>>>>>>> Rennes, France >>>>>>>>>>>> >>>>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>>>> >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> Powered by www.kitware.com >>>>>>>>>>>> >>>>>>>>>>>> Visit other Kitware open-source projects at >>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html >>>>>>>>>>>> >>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>>>>>>>>> >>>>>>>>>>>> Search the list archives at: >>>>>>>>>>>> http://markmail.org/search/?q=vtkusers >>>>>>>>>>>> >>>>>>>>>>>> Follow this link to subscribe/unsubscribe: >>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>>>> * >>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>>>> * >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> Simon Esneault >>>>>>>>>> Rennes, France >>>>>>>>>> ------------------------------------------------------------------ >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>>>> * >>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>>>> * >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> Simon Esneault >>>>>>>> Rennes, France >>>>>>>> ------------------------------------------------------------------ >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> >>>>>>> >>>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>>> * >>>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>>> * >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> ------------------------------------------------------------------ >>>>>> Simon Esneault >>>>>> Rennes, France >>>>>> ------------------------------------------------------------------ >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Simon Esneault >>>>> Rennes, France >>>>> ------------------------------------------------------------------ >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Search the list archives at: >>>> http://markmail.org/search/?q=vtk-developers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtk-developers >>>> >>>> >>>> >>> >>> >>> -- >>> Ken Martin PhD >>> Chairman & CFO >>> Kitware Inc. >>> 28 Corporate Drive >>> Clifton Park NY 12065 >>> 518 371 3971 >>> >>> This communication, including all attachments, contains confidential and >>> legally privileged information, and it is intended only for the use of the >>> addressee. Access to this email by anyone else is unauthorized. If you are >>> not the intended recipient, any disclosure, copying, distribution or any >>> action taken in reliance on it is prohibited and may be unlawful. If you >>> received this communication in error please notify us immediately and >>> destroy the original message. Thank you. >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From xabivtk at gmail.com Mon Nov 23 15:14:55 2015 From: xabivtk at gmail.com (Xabi Riobe) Date: Mon, 23 Nov 2015 21:14:55 +0100 Subject: [vtkusers] Volume + surface transparency with OpenGL2 In-Reply-To: References: Message-ID: Hi Aashish, For example, if you render a volume with vtkGPUVolumeRayCastMapper, or vtkFixedPointVolumeRayCastMapper, and you put inside a sphere rendered with vtkPolyDataMapper, as soon as you change the sphere actor opacity the depth notion is lost, with the sphere appearing behind the volume. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Nov 23 15:40:38 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 23 Nov 2015 15:40:38 -0500 Subject: [vtkusers] Volume + surface transparency with OpenGL2 In-Reply-To: References: Message-ID: On Mon, Nov 23, 2015 at 3:14 PM, Xabi Riobe wrote: > Hi Aashish, > > For example, if you render a volume with vtkGPUVolumeRayCastMapper, > or vtkFixedPointVolumeRayCastMapper, and you put inside a sphere rendered > with vtkPolyDataMapper, as soon as you change the sphere actor opacity the > depth notion is lost, with the sphere appearing behind the volume. > Thanks for clarification. Yes, this is not currently supported (I am not aware and we don't handle this in the mapper). This is a interesting use case. I will add it to the feature request and will get back to you. Just curious, what would be a real world example use-case you have for this feature? Can you share bit more domain information (medical / scientific etc.). - Aashish -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From xabivtk at gmail.com Mon Nov 23 16:51:45 2015 From: xabivtk at gmail.com (Xabi Riobe) Date: Mon, 23 Nov 2015 22:51:45 +0100 Subject: [vtkusers] Volume + surface transparency with OpenGL2 In-Reply-To: References: Message-ID: Here are at least 2 examples: - medical data : the body is voxelized and you have the segmentation of organs/bones/vessels - material : cement, rock structure voxelized, with segmentation of the different layers, components in both cases you may want to superimpose the surfaces and play with transparency to highlight an entity but still seeing the inside of it, or you can have tools with polygonal surface that you will insert in an easier way into the volume if they are transparent, or just a clipping plane that you want to be transparent to place it with precision inside the volume before doing the clip... I'm glad to hear it may fit in a todo list :) Let me know if someone starts working on this, i may give any kind of help ! Thanks 2015-11-23 21:40 GMT+01:00 Aashish Chaudhary : > On Mon, Nov 23, 2015 at 3:14 PM, Xabi Riobe wrote: > >> Hi Aashish, >> >> For example, if you render a volume with vtkGPUVolumeRayCastMapper, >> or vtkFixedPointVolumeRayCastMapper, and you put inside a sphere rendered >> with vtkPolyDataMapper, as soon as you change the sphere actor opacity the >> depth notion is lost, with the sphere appearing behind the volume. >> > > Thanks for clarification. Yes, this is not currently supported (I am not > aware and we don't handle this in the mapper). This is a interesting use > case. I will add it to the feature request and will get back to you. Just > curious, what would be a real world example use-case you have for this > feature? Can you share bit more domain information (medical / scientific > etc.). > > - Aashish > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Mon Nov 23 19:05:28 2015 From: DLRdave at aol.com (David Cole) Date: Mon, 23 Nov 2015 19:05:28 -0500 Subject: [vtkusers] Volume + surface transparency with OpenGL2 In-Reply-To: References: Message-ID: Me too. We want to visualize structures (natural and artificial) inside of volume renderings of CT scans, mostly of people. Works great without using translucent polydata. As soon as you make any of it translucent, it just sort of disappears all the way... Very confusing when you first encounter it. So... +1. And let me know what I can do to test/help out... David C. On Monday, November 23, 2015, Xabi Riobe wrote: > Here are at least 2 examples: > > - medical data : the body is voxelized and you have the segmentation of > organs/bones/vessels > - material : cement, rock structure voxelized, with segmentation of the > different layers, components > > in both cases you may want to superimpose the surfaces and play with > transparency to highlight an entity but still seeing the inside of it, > or you can have tools with polygonal surface that you will insert in an > easier way into the volume if they are transparent, or just a clipping > plane that you want to be transparent to place it with precision inside the > volume before doing the clip... > > I'm glad to hear it may fit in a todo list :) > Let me know if someone starts working on this, i may give any kind of help > ! > > Thanks > > > 2015-11-23 21:40 GMT+01:00 Aashish Chaudhary < > aashish.chaudhary at kitware.com > >: > >> On Mon, Nov 23, 2015 at 3:14 PM, Xabi Riobe > > wrote: >> >>> Hi Aashish, >>> >>> For example, if you render a volume with vtkGPUVolumeRayCastMapper, >>> or vtkFixedPointVolumeRayCastMapper, and you put inside a sphere rendered >>> with vtkPolyDataMapper, as soon as you change the sphere actor opacity the >>> depth notion is lost, with the sphere appearing behind the volume. >>> >> >> Thanks for clarification. Yes, this is not currently supported (I am not >> aware and we don't handle this in the mapper). This is a interesting use >> case. I will add it to the feature request and will get back to you. Just >> curious, what would be a real world example use-case you have for this >> feature? Can you share bit more domain information (medical / scientific >> etc.). >> >> - Aashish >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcus.hanwell at kitware.com Mon Nov 23 20:52:35 2015 From: marcus.hanwell at kitware.com (Marcus D. Hanwell) Date: Mon, 23 Nov 2015 20:52:35 -0500 Subject: [vtkusers] Volume + surface transparency with OpenGL2 In-Reply-To: References: Message-ID: We have also had a number of tomviz users ask if this is possible, and they have similar requirements to those stated above. We often have the overall structure rendered as a volume, and are looking at distinct isosurfaces, or in future segmented features, where the ideal would be to offer a translucent surface within the volume. On Mon, Nov 23, 2015 at 7:05 PM, David Cole via vtkusers wrote: > Me too. > > We want to visualize structures (natural and artificial) inside of volume > renderings of CT scans, mostly of people. > > Works great without using translucent polydata. As soon as you make any of > it translucent, it just sort of disappears all the way... Very confusing > when you first encounter it. > > So... +1. And let me know what I can do to test/help out... > > > David C. > > > > On Monday, November 23, 2015, Xabi Riobe wrote: >> >> Here are at least 2 examples: >> >> - medical data : the body is voxelized and you have the segmentation of >> organs/bones/vessels >> - material : cement, rock structure voxelized, with segmentation of the >> different layers, components >> >> in both cases you may want to superimpose the surfaces and play with >> transparency to highlight an entity but still seeing the inside of it, >> or you can have tools with polygonal surface that you will insert in an >> easier way into the volume if they are transparent, or just a clipping plane >> that you want to be transparent to place it with precision inside the volume >> before doing the clip... >> >> I'm glad to hear it may fit in a todo list :) >> Let me know if someone starts working on this, i may give any kind of help >> ! >> >> Thanks >> >> >> 2015-11-23 21:40 GMT+01:00 Aashish Chaudhary >> : >>> >>> On Mon, Nov 23, 2015 at 3:14 PM, Xabi Riobe wrote: >>>> >>>> Hi Aashish, >>>> >>>> For example, if you render a volume with vtkGPUVolumeRayCastMapper, or >>>> vtkFixedPointVolumeRayCastMapper, and you put inside a sphere rendered with >>>> vtkPolyDataMapper, as soon as you change the sphere actor opacity the depth >>>> notion is lost, with the sphere appearing behind the volume. >>> >>> >>> Thanks for clarification. Yes, this is not currently supported (I am not >>> aware and we don't handle this in the mapper). This is a interesting use >>> case. I will add it to the feature request and will get back to you. Just >>> curious, what would be a real world example use-case you have for this >>> feature? Can you share bit more domain information (medical / scientific >>> etc.). >>> >>> - Aashish >>> >>> >>> >>> -- >>> | Aashish Chaudhary >>> | Technical Leader >>> | Kitware Inc. >>> | http://www.kitware.com/company/team/chaudhary.html >> >> > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > From nico.schloemer at gmail.com Tue Nov 24 04:20:08 2015 From: nico.schloemer at gmail.com (=?UTF-8?Q?Nico_Schl=C3=B6mer?=) Date: Tue, 24 Nov 2015 09:20:08 +0000 Subject: [vtkusers] SetCells for multiple cell types Message-ID: Hi everyone, I'd like to set cells with different cells types in Python VTK. I see the signature ``` SetCells(cellType, vtkIdArray) ``` can be used to set an IdArray with equal cellType. Is it possible to adapt this for different cell types too? Cheers, Nico -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfavre at cscs.ch Tue Nov 24 06:12:32 2015 From: jfavre at cscs.ch (Favre Jean) Date: Tue, 24 Nov 2015 11:12:32 +0000 Subject: [vtkusers] SetCells for multiple cell types In-Reply-To: References: Message-ID: <0EB9B6375711A04B820E6B6F5CCA9F6843527A82@MBX111.d.ethz.ch> Yes, it is possible. Here is an example, adapted from a bigger test case I have. ----------------- Jean/CSCS -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkUntructuredGrid1.py Type: text/x-python Size: 2441 bytes Desc: vtkUntructuredGrid1.py URL: From grothausmann.roman at mh-hannover.de Tue Nov 24 08:26:43 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Tue, 24 Nov 2015 14:26:43 +0100 Subject: [vtkusers] wrong sub-extent processed by vtkImageConstantPad if combined with vtkDiscreteMarchingCubes and MPI Message-ID: <56546593.2070600@mh-hannover.de> Dear mailing list members, Trying to cap the output of vtkDiscreteMarchingCubes by applying vtkImageConstantPad on the input before does not work if running vtkStreamingDemandDrivenPipeline by e.g. a vtkMPIController. If I run this program with the parameter for capping, i.e. employing vtkImageConstantPad: https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/discrete_marching-cubes_MPI.cxx#L90 I get an error such as: vtkImageData (0x1868190): GetScalarPointer: Pixel (0, 0, 341) not in memory. Current extent= (249, 499, 0, 479, 0, 429) It seems that vtkImageConstantPad processes the wrong sub-extent. Would that be a filter internal problem or of my code? Could the problem be related to the fact that I try to combine structured extent (Index (IJK) based, not using ghost levels) with piece-based extent that uses ghost levels? The problem even occurs when the extent is not extended at all. The program works as expected if vtkImageConstantPad is avoided. Any help or hints are very much appreciated Roman -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From nico.schloemer at gmail.com Tue Nov 24 19:29:35 2015 From: nico.schloemer at gmail.com (=?UTF-8?Q?Nico_Schl=C3=B6mer?=) Date: Wed, 25 Nov 2015 00:29:35 +0000 Subject: [vtkusers] SetCells for multiple cell types In-Reply-To: <0EB9B6375711A04B820E6B6F5CCA9F6843527A82@MBX111.d.ethz.ch> References: <0EB9B6375711A04B820E6B6F5CCA9F6843527A82@MBX111.d.ethz.ch> Message-ID: Thanks for the suggestion! I actually ended up implementing it without the `UnstructuredGridSource` and just a plain old `vtkUnstructuredGrid`: ``` mesh.SetCells( numpy_support.numpy_to_vtk( cell_types, deep=1, array_type=vtk.vtkUnsignedCharArray().GetDataType() ), numpy_support.numpy_to_vtk( cell_offsets, deep=1, array_type=vtk.vtkIdTypeArray().GetDataType() ), cell_array ) ``` Cheers, Nico On Tue, Nov 24, 2015 at 12:12 PM Favre Jean wrote: > Yes, it is possible. Here is an example, adapted from a bigger test case I > have. > > ----------------- > Jean/CSCS > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sin-chia.vincent-tan at vitrox.com Wed Nov 25 04:38:20 2015 From: sin-chia.vincent-tan at vitrox.com (vincentTan) Date: Wed, 25 Nov 2015 02:38:20 -0700 (MST) Subject: [vtkusers] Add multiple vtkVolume in vtkAssembly Message-ID: <1448444300373-5735182.post@n5.nabble.com> Hi all, Is there any way that i can add multiple vtkVolume into one vtkAssembly?? This is because i have seen most of the examples are not related to what i need. Thus, i would like to have some guide if possible regarding this issue. FYI, i think i have successfully add in multiple volumes using addPart() in vtkAssembly, yet, there is nothing when i try to render it. Thanks a lot. -- View this message in context: http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182.html Sent from the VTK - Users mailing list archive at Nabble.com. From david.edmunds at icr.ac.uk Wed Nov 25 05:17:43 2015 From: david.edmunds at icr.ac.uk (Dave Edmunds) Date: Wed, 25 Nov 2015 03:17:43 -0700 (MST) Subject: [vtkusers] Updating actor colors without manual call to Render() Message-ID: <1448446663790-5735183.post@n5.nabble.com> Hi all, Currently I have a long list of actors, and I periodically update the color of a particular actor using double rgb[3] = ... actors[i]->GetProperty()->SetColor(rgb) The only way I have found so far to actually display this new color in the render window is to manually call renderWindow->Render() after each color change. However, this redraws the entire scene, not just the actor I am updating, and causes my app to become quite sluggish since the colors can be changed interactively by the user at a fast pace. Is there a better/more efficient way to do this? Kind regards, Dave -- View this message in context: http://vtk.1045678.n5.nabble.com/Updating-actor-colors-without-manual-call-to-Render-tp5735183.html Sent from the VTK - Users mailing list archive at Nabble.com. From simon.esneault at gmail.com Wed Nov 25 05:21:57 2015 From: simon.esneault at gmail.com (Simon ESNEAULT) Date: Wed, 25 Nov 2015 11:21:57 +0100 Subject: [vtkusers] Volume + surface transparency with OpenGL2 In-Reply-To: References: Message-ID: Hello, We also have a need for such a feature, in order to display a virtual prosthesis within the patient anatomy. We ended up proposing two solutions for our customers : - Render a full opaque surface within the volume rendering ( http://picpaste.com/pics/solution1.1448446727.png) - Render a translucent surface on top of the volume rendering using a layer system with 2 renderers on the same viewport ( http://picpaste.com/pics/solution2.1448446818.png) But neither of the solution are completely satisfying as we would also like to blend a translucent mesh in the middle of the volume. I can provide some data if it can help to develop this feature. Have a good day, Simon 2015-11-24 2:52 GMT+01:00 Marcus D. Hanwell : > We have also had a number of tomviz users ask if this is possible, and > they have similar requirements to those stated above. We often have > the overall structure rendered as a volume, and are looking at > distinct isosurfaces, or in future segmented features, where the ideal > would be to offer a translucent surface within the volume. > > On Mon, Nov 23, 2015 at 7:05 PM, David Cole via vtkusers > wrote: > > Me too. > > > > We want to visualize structures (natural and artificial) inside of volume > > renderings of CT scans, mostly of people. > > > > Works great without using translucent polydata. As soon as you make any > of > > it translucent, it just sort of disappears all the way... Very confusing > > when you first encounter it. > > > > So... +1. And let me know what I can do to test/help out... > > > > > > David C. > > > > > > > > On Monday, November 23, 2015, Xabi Riobe wrote: > >> > >> Here are at least 2 examples: > >> > >> - medical data : the body is voxelized and you have the segmentation of > >> organs/bones/vessels > >> - material : cement, rock structure voxelized, with segmentation of the > >> different layers, components > >> > >> in both cases you may want to superimpose the surfaces and play with > >> transparency to highlight an entity but still seeing the inside of it, > >> or you can have tools with polygonal surface that you will insert in an > >> easier way into the volume if they are transparent, or just a clipping > plane > >> that you want to be transparent to place it with precision inside the > volume > >> before doing the clip... > >> > >> I'm glad to hear it may fit in a todo list :) > >> Let me know if someone starts working on this, i may give any kind of > help > >> ! > >> > >> Thanks > >> > >> > >> 2015-11-23 21:40 GMT+01:00 Aashish Chaudhary > >> : > >>> > >>> On Mon, Nov 23, 2015 at 3:14 PM, Xabi Riobe wrote: > >>>> > >>>> Hi Aashish, > >>>> > >>>> For example, if you render a volume with vtkGPUVolumeRayCastMapper, or > >>>> vtkFixedPointVolumeRayCastMapper, and you put inside a sphere > rendered with > >>>> vtkPolyDataMapper, as soon as you change the sphere actor opacity the > depth > >>>> notion is lost, with the sphere appearing behind the volume. > >>> > >>> > >>> Thanks for clarification. Yes, this is not currently supported (I am > not > >>> aware and we don't handle this in the mapper). This is a interesting > use > >>> case. I will add it to the feature request and will get back to you. > Just > >>> curious, what would be a real world example use-case you have for this > >>> feature? Can you share bit more domain information (medical / > scientific > >>> etc.). > >>> > >>> - Aashish > >>> > >>> > >>> > >>> -- > >>> | Aashish Chaudhary > >>> | Technical Leader > >>> | Kitware Inc. > >>> | http://www.kitware.com/company/team/chaudhary.html > >> > >> > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the VTK FAQ at: > > http://www.vtk.org/Wiki/VTK_FAQ > > > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > > > Follow this link to subscribe/unsubscribe: > > http://public.kitware.com/mailman/listinfo/vtkusers > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -- ------------------------------------------------------------------ Simon Esneault Rennes, France ------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From 707919138 at qq.com Wed Nov 25 06:00:54 2015 From: 707919138 at qq.com (=?gb18030?B?6dzPwsz90ak=?=) Date: Wed, 25 Nov 2015 19:00:54 +0800 Subject: [vtkusers] vtk Renderer don't Refresh when I add a new actor into it VTK6.1 Message-ID: Dear: I'm a new learner in vtk and I have a question in this days. I want to make a mark line with vtk on the renderwindow. The task I want to do is that when I press my Letfbutton, I begin to draw the line ,and when I release leftbutton, it is end. I use class qvtkWidget to show it, a callback class which inherit class vtkCommand. I got the mouse current postion by vtkRenderWindowInteractor, use it to creat vtkPoints and vtkLine, and add them into vtkcellarray to create vtkpolydata. when a new point add in , i create a new line add into the array, and I create a new actor to add into the renderer. But when i press left button, the mark line is not be drawn, and i release the button , the mark line can show finally.I use the same sentences in the callback function for the even press and mousemove, the function in press works well , but another was bad. So I want to know why ,and how can i solve it. Thank you! Yao -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Wed Nov 25 09:04:47 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Wed, 25 Nov 2015 15:04:47 +0100 Subject: [vtkusers] vtkDiscreteMarchingCubes and vtkMarchingCubes do not handle sub-extents correctly In-Reply-To: <56546593.2070600@mh-hannover.de> References: <56546593.2070600@mh-hannover.de> Message-ID: <5655BFFF.4080009@mh-hannover.de> I just noticed that vtkDiscreteMarchingCubes and also vtkMarchingCubes do not handle sub-extents correctly. It seems both filters do not handle the translation of each sub-extent. If the result is saved in a PVTP-file and opened in ParaView, the content of each VTP-file is placed over the others. In contrast vtkContourFilter does handle the translation of each sub-extent correctly, the content of each VTP-file is positioned correctly, see e.g. https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/marching-cubes_MPI.cxx On 24/11/15 14:26, Grothausmann, Roman Dr. wrote: > Dear mailing list members, > > > Trying to cap the output of vtkDiscreteMarchingCubes by applying > vtkImageConstantPad on the input before does not work if running > vtkStreamingDemandDrivenPipeline by e.g. a vtkMPIController. > > If I run this program with the parameter for capping, i.e. employing > vtkImageConstantPad: > https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/discrete_marching-cubes_MPI.cxx#L90 > > > I get an error such as: > vtkImageData (0x1868190): GetScalarPointer: Pixel (0, 0, 341) not in memory. > Current extent= (249, 499, 0, 479, 0, 429) > > It seems that vtkImageConstantPad processes the wrong sub-extent. Would that be > a filter internal problem or of my code? > > Could the problem be related to the fact that I try to combine structured extent > (Index (IJK) based, not using ghost levels) with piece-based extent that uses > ghost levels? > > The problem even occurs when the extent is not extended at all. > The program works as expected if vtkImageConstantPad is avoided. > > Any help or hints are very much appreciated > Roman > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From grothausmann.roman at mh-hannover.de Wed Nov 25 09:08:48 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Wed, 25 Nov 2015 15:08:48 +0100 Subject: [vtkusers] wrong sub-extent processed by vtkImageConstantPad if combined with vtkDiscreteMarchingCubes and MPI In-Reply-To: <5655BFFF.4080009@mh-hannover.de> References: <56546593.2070600@mh-hannover.de> <5655BFFF.4080009@mh-hannover.de> Message-ID: <5655C0F0.7050204@mh-hannover.de> Still, the problem of vtkImageConstantPad persists when combining it with vtkContourFilter, same error reported when executing e.g. https://github.com/romangrothausmann/VTK-CLIs/commit/c426432d7d73b5cf78a5bfff5ee33a75298926d6 On 25/11/15 15:04, Grothausmann, Roman Dr. wrote: > I just noticed that vtkDiscreteMarchingCubes and also vtkMarchingCubes do not > handle sub-extents correctly. It seems both filters do not handle the > translation of each sub-extent. If the result is saved in a PVTP-file and opened > in ParaView, the content of each VTP-file is placed over the others. > In contrast vtkContourFilter does handle the translation of each sub-extent > correctly, the content of each VTP-file is positioned correctly, see e.g. > https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/marching-cubes_MPI.cxx > > > On 24/11/15 14:26, Grothausmann, Roman Dr. wrote: >> Dear mailing list members, >> >> >> Trying to cap the output of vtkDiscreteMarchingCubes by applying >> vtkImageConstantPad on the input before does not work if running >> vtkStreamingDemandDrivenPipeline by e.g. a vtkMPIController. >> >> If I run this program with the parameter for capping, i.e. employing >> vtkImageConstantPad: >> https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/discrete_marching-cubes_MPI.cxx#L90 >> >> >> >> I get an error such as: >> vtkImageData (0x1868190): GetScalarPointer: Pixel (0, 0, 341) not in memory. >> Current extent= (249, 499, 0, 479, 0, 429) >> >> It seems that vtkImageConstantPad processes the wrong sub-extent. Would that be >> a filter internal problem or of my code? >> >> Could the problem be related to the fact that I try to combine structured extent >> (Index (IJK) based, not using ghost levels) with piece-based extent that uses >> ghost levels? >> >> The problem even occurs when the extent is not extended at all. >> The program works as expected if vtkImageConstantPad is avoided. >> >> Any help or hints are very much appreciated >> Roman >> > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From arnaudgelas at gmail.com Wed Nov 25 09:42:39 2015 From: arnaudgelas at gmail.com (Arnaud Gelas) Date: Wed, 25 Nov 2015 15:42:39 +0100 Subject: [vtkusers] Computer Graphics Engineer position at Sensefly Ltd, Switzerland Message-ID: <5655C8DF.1000209@gmail.com> Hi all, Sensefly R&D team is looking for a driven and talented Computer Graphics Engineer to design next generation flight planning and monitoring software. Here are the details: http://www.jobup.ch/en/jobs/company/13662/sensefly/#1/1179028 Best, Arnaud From bill.lorensen at gmail.com Wed Nov 25 11:27:43 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 25 Nov 2015 11:27:43 -0500 Subject: [vtkusers] vtkDiscreteMarchingCubes and vtkMarchingCubes do not handle sub-extents correctly In-Reply-To: <5655BFFF.4080009@mh-hannover.de> References: <56546593.2070600@mh-hannover.de> <5655BFFF.4080009@mh-hannover.de> Message-ID: Looks like a bug. I'll take a look. On Wed, Nov 25, 2015 at 9:04 AM, Grothausmann, Roman Dr. wrote: > I just noticed that vtkDiscreteMarchingCubes and also vtkMarchingCubes do > not handle sub-extents correctly. It seems both filters do not handle the > translation of each sub-extent. If the result is saved in a PVTP-file and > opened in ParaView, the content of each VTP-file is placed over the others. > In contrast vtkContourFilter does handle the translation of each sub-extent > correctly, the content of each VTP-file is positioned correctly, see e.g. > https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/marching-cubes_MPI.cxx > > On 24/11/15 14:26, Grothausmann, Roman Dr. wrote: >> >> Dear mailing list members, >> >> >> Trying to cap the output of vtkDiscreteMarchingCubes by applying >> vtkImageConstantPad on the input before does not work if running >> vtkStreamingDemandDrivenPipeline by e.g. a vtkMPIController. >> >> If I run this program with the parameter for capping, i.e. employing >> vtkImageConstantPad: >> >> https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/discrete_marching-cubes_MPI.cxx#L90 >> >> >> I get an error such as: >> vtkImageData (0x1868190): GetScalarPointer: Pixel (0, 0, 341) not in >> memory. >> Current extent= (249, 499, 0, 479, 0, 429) >> >> It seems that vtkImageConstantPad processes the wrong sub-extent. Would >> that be >> a filter internal problem or of my code? >> >> Could the problem be related to the fact that I try to combine structured >> extent >> (Index (IJK) based, not using ghost levels) with piece-based extent that >> uses >> ghost levels? >> >> The problem even occurs when the extent is not extended at all. >> The program works as expected if vtkImageConstantPad is avoided. >> >> Any help or hints are very much appreciated >> Roman >> > > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-2900 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -- Unpaid intern in BillsBasement at noware dot com From bill.lorensen at gmail.com Wed Nov 25 13:53:17 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 25 Nov 2015 13:53:17 -0500 Subject: [vtkusers] vtkDiscreteMarchingCubes and vtkMarchingCubes do not handle sub-extents correctly In-Reply-To: References: <56546593.2070600@mh-hannover.de> <5655BFFF.4080009@mh-hannover.de> Message-ID: Roman, With your sample programs and my data, I can reproduce the bad results for Marching and DiscreteCubes. (without ImagePad - that is another issue). Now to find the bugs.... Bill On Wed, Nov 25, 2015 at 11:27 AM, Bill Lorensen wrote: > Looks like a bug. I'll take a look. > > > On Wed, Nov 25, 2015 at 9:04 AM, Grothausmann, Roman Dr. > wrote: >> I just noticed that vtkDiscreteMarchingCubes and also vtkMarchingCubes do >> not handle sub-extents correctly. It seems both filters do not handle the >> translation of each sub-extent. If the result is saved in a PVTP-file and >> opened in ParaView, the content of each VTP-file is placed over the others. >> In contrast vtkContourFilter does handle the translation of each sub-extent >> correctly, the content of each VTP-file is positioned correctly, see e.g. >> https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/marching-cubes_MPI.cxx >> >> On 24/11/15 14:26, Grothausmann, Roman Dr. wrote: >>> >>> Dear mailing list members, >>> >>> >>> Trying to cap the output of vtkDiscreteMarchingCubes by applying >>> vtkImageConstantPad on the input before does not work if running >>> vtkStreamingDemandDrivenPipeline by e.g. a vtkMPIController. >>> >>> If I run this program with the parameter for capping, i.e. employing >>> vtkImageConstantPad: >>> >>> https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/discrete_marching-cubes_MPI.cxx#L90 >>> >>> >>> I get an error such as: >>> vtkImageData (0x1868190): GetScalarPointer: Pixel (0, 0, 341) not in >>> memory. >>> Current extent= (249, 499, 0, 479, 0, 429) >>> >>> It seems that vtkImageConstantPad processes the wrong sub-extent. Would >>> that be >>> a filter internal problem or of my code? >>> >>> Could the problem be related to the fact that I try to combine structured >>> extent >>> (Index (IJK) based, not using ghost levels) with piece-based extent that >>> uses >>> ghost levels? >>> >>> The problem even occurs when the extent is not extended at all. >>> The program works as expected if vtkImageConstantPad is avoided. >>> >>> Any help or hints are very much appreciated >>> Roman >>> >> >> -- >> Dr. Roman Grothausmann >> >> Tomographie und Digitale Bildverarbeitung >> Tomography and Digital Image Analysis >> >> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >> Medizinische Hochschule Hannover >> Carl-Neuberg-Str. 1 >> D-30625 Hannover >> >> Tel. +49 511 532-2900 >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From joaorobertojr88 at gmail.com Wed Nov 25 14:31:30 2015 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Wed, 25 Nov 2015 12:31:30 -0700 (MST) Subject: [vtkusers] Get vtkCubeAxesActor exponent Message-ID: <1448479890658-5735194.post@n5.nabble.com> Hello VTK Users, I would like to know how to get the exponent of a vtkCubeAxesActor. I've attached an image to facilitate the understanding. So I want to get the exponent 3. Thanks, Jo?o. -- View this message in context: http://vtk.1045678.n5.nabble.com/Get-vtkCubeAxesActor-exponent-tp5735194.html Sent from the VTK - Users mailing list archive at Nabble.com. From bill.lorensen at gmail.com Wed Nov 25 15:58:10 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Wed, 25 Nov 2015 15:58:10 -0500 Subject: [vtkusers] vtkDiscreteMarchingCubes and vtkMarchingCubes do not handle sub-extents correctly In-Reply-To: References: <56546593.2070600@mh-hannover.de> <5655BFFF.4080009@mh-hannover.de> Message-ID: Roman, I think that only algorithms that implement ThreadedExecute() will properly work in your situation. vtkMarchingCubes and vtkDiscreteMarchingCubes do not implement that method. I suggest using vtkContourFilter instead of vtkMarchingCubes. There is no equivalent for vtkDiscreteMarchingCubes. Perhaps in the future I can look at DiscreteMarchingCubes. Bill On Wed, Nov 25, 2015 at 1:53 PM, Bill Lorensen wrote: > Roman, > > With your sample programs and my data, I can reproduce the bad results > for Marching and DiscreteCubes. (without ImagePad - that is another > issue). > > Now to find the bugs.... > > Bill > > On Wed, Nov 25, 2015 at 11:27 AM, Bill Lorensen wrote: >> Looks like a bug. I'll take a look. >> >> >> On Wed, Nov 25, 2015 at 9:04 AM, Grothausmann, Roman Dr. >> wrote: >>> I just noticed that vtkDiscreteMarchingCubes and also vtkMarchingCubes do >>> not handle sub-extents correctly. It seems both filters do not handle the >>> translation of each sub-extent. If the result is saved in a PVTP-file and >>> opened in ParaView, the content of each VTP-file is placed over the others. >>> In contrast vtkContourFilter does handle the translation of each sub-extent >>> correctly, the content of each VTP-file is positioned correctly, see e.g. >>> https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/marching-cubes_MPI.cxx >>> >>> On 24/11/15 14:26, Grothausmann, Roman Dr. wrote: >>>> >>>> Dear mailing list members, >>>> >>>> >>>> Trying to cap the output of vtkDiscreteMarchingCubes by applying >>>> vtkImageConstantPad on the input before does not work if running >>>> vtkStreamingDemandDrivenPipeline by e.g. a vtkMPIController. >>>> >>>> If I run this program with the parameter for capping, i.e. employing >>>> vtkImageConstantPad: >>>> >>>> https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/discrete_marching-cubes_MPI.cxx#L90 >>>> >>>> >>>> I get an error such as: >>>> vtkImageData (0x1868190): GetScalarPointer: Pixel (0, 0, 341) not in >>>> memory. >>>> Current extent= (249, 499, 0, 479, 0, 429) >>>> >>>> It seems that vtkImageConstantPad processes the wrong sub-extent. Would >>>> that be >>>> a filter internal problem or of my code? >>>> >>>> Could the problem be related to the fact that I try to combine structured >>>> extent >>>> (Index (IJK) based, not using ghost levels) with piece-based extent that >>>> uses >>>> ghost levels? >>>> >>>> The problem even occurs when the extent is not extended at all. >>>> The program works as expected if vtkImageConstantPad is avoided. >>>> >>>> Any help or hints are very much appreciated >>>> Roman >>>> >>> >>> -- >>> Dr. Roman Grothausmann >>> >>> Tomographie und Digitale Bildverarbeitung >>> Tomography and Digital Image Analysis >>> >>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>> Medizinische Hochschule Hannover >>> Carl-Neuberg-Str. 1 >>> D-30625 Hannover >>> >>> Tel. +49 511 532-2900 >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/vtkusers >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > > -- > Unpaid intern in BillsBasement at noware dot com -- Unpaid intern in BillsBasement at noware dot com From andrew.slaughter at inl.gov Wed Nov 25 17:00:44 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Wed, 25 Nov 2015 15:00:44 -0700 Subject: [vtkusers] Select active renderer for interaction In-Reply-To: References: Message-ID: FYI, I was able to solve this by calling: window.GetInteractor().GetInteractorStyle().SetDefaultRenderer(renderer) where window = vtkRenderWindow and renderer is the vtkRenderer object that you desire to be interactive. On Thu, Nov 5, 2015 at 2:48 PM, Slaughter, Andrew E < andrew.slaughter at inl.gov> wrote: > I have a scenario where I have two vtkRenderer objects that occupy the > entire viewport, one on layer 0 and another on layer 1. What is the correct > method to select which renderer is active in the interactor? I would like > to make a keyboard event to switch between which rendered object may be > manipulated via the mouse, is this sort of thing possible? > > Thanks, > Andrew > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.martin at kitware.com Wed Nov 25 17:30:07 2015 From: ken.martin at kitware.com (Ken Martin) Date: Wed, 25 Nov 2015 17:30:07 -0500 Subject: [vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY In-Reply-To: <1448297964515-5735161.post@n5.nabble.com> References: <1447844506521-5735057.post@n5.nabble.com> <1447855416009-5735062.post@n5.nabble.com> <1448041347199-5735143.post@n5.nabble.com> <1448297964515-5735161.post@n5.nabble.com> Message-ID: Thanks Lonni, The shaders look fine so I suspect what is happening is that somehow a render is getting called when there is no data for the mapper. The "error setting attribute" type problems stem from either the shader not actually using the passed attribute or attempting to set the attribute with no data. Looking at the shader the attributes are definitely being used which means the error is maybe due to somehow setting the attribute with no data. Maybe somehow the mapper is not setup yet when your new method is getting called? I'm out for Thanksgiving the rest of the week but if you are still stuck next week let me know and I can look a bit deeper. Thanks Ken On Mon, Nov 23, 2015 at 11:59 AM, Lonni Besan?on wrote: > Sorry for the time I took to answer. I will update the post on SO. > > So here is the code I got from the error macro: > /W/NativeVTK( 7871): rotation = 0.000000 ;;; 0.000000 ;;; 0.583755 > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1237 > E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): VS: > //VTK::System::Dec > E/VTK ( 7871): > /*========================================================================= > E/VTK ( 7871): Program: Visualization Toolkit > E/VTK ( 7871): Module: vtkPolyDataVS.glsl > E/VTK ( 7871): Copyright (c) Ken Martin, Will Schroeder, Bill > Lorensen > E/VTK ( 7871): All rights reserved. > E/VTK ( 7871): See Copyright.txt or > http://www.kitware.com/Copyright.htm for details. > E/VTK ( 7871): This software is distributed WITHOUT ANY WARRANTY; > without even > E/VTK ( 7871): the implied warranty of MERCHANTABILITY or FITNESS > FOR A PARTICULAR > E/VTK ( 7871): PURPOSE. See the above copyright notice for more > information. > E/VTK ( 7871): > =========================================================================*/ > E/VTK ( 7871): attribute vec4 vertexMC; > E/VTK ( 7871): // frag position in VC > E/VTK ( 7871): varying vec4 vertexVCVSOutput; > E/VTK ( 7871): // optional normal declaration > E/VTK ( 7871): attribute vec3 normalMC; > E/VTK ( 7871): uniform mat3 normalMatrix; > E/VTK ( 7871): varying vec3 normalVCVSOutput; > E/VTK ( 7871): // extra lighting parameters > E/VTK ( 7871): //VTK::Light::Dec > E/VTK ( 7871): // Texture coordinates > E/VTK ( 7871): //VTK::TCoord::Dec > E/VTK ( 7871): // material property values > E/VTK ( 7871): //VTK::Color::Dec > E/VTK ( 7871): // clipping plane vars > E/VTK ( 7871): //VTK::Clip::Dec > E/VTK ( 7871): // camera and actor matrix values > E/VTK ( 7871): uniform mat4 MCDCMatrix; > E/VTK ( 7871): uniform mat4 MCVCMatrix; > E/VTK ( 7871): // Apple Bug > E/VTK ( 7871): //VTK::PrimID::Dec > E/VTK ( 7871): void main() > E/VTK ( 7871): { > E/VTK ( 7871): //VTK::Color::Impl > E/VTK ( 7871): normalVCVSOutput = normalMatrix * normalMC; > E/VTK ( 7871): //VTK::TCoord::Impl > E/VTK ( 7871): //VTK::Clip::Impl > E/VTK ( 7871): //VTK::PrimID::Impl > E/VTK ( 7871): vertexVCVSOutput = MCVCMatrix * vertexMC; > E/VTK ( 7871): gl_Position = MCDCMatrix * vertexMC; > E/VTK ( 7871): //VTK::Light::Impl > E/VTK ( 7871): } > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1238 > E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): GS: > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1239 > E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): FS: > //VTK::System::Dec > E/VTK ( 7871): > /*========================================================================= > E/VTK ( 7871): Program: Visualization Toolkit > E/VTK ( 7871): Module: vtkPolyDataFS.glsl > E/VTK ( 7871): Copyright (c) Ken Martin, Will Schroeder, Bill > Lorensen > E/VTK ( 7871): All rights reserved. > E/VTK ( 7871): See Copyright.txt or > http://www.kitware.com/Copyright.htm for details. > E/VTK ( 7871): This software is distributed WITHOUT ANY WARRANTY; > without even > E/VTK ( 7871): the implied warranty of MERCHANTABILITY or FITNESS > FOR A PARTICULAR > E/VTK ( 7871): PURPOSE. See the above copyright notice for more > information. > E/VTK ( 7871): > =========================================================================*/ > E/VTK ( 7871): // Template for the polydata mappers fragment shader > E/VTK ( 7871): uniform int PrimitiveIDOffset; > E/VTK ( 7871): // VC position of this fragment > E/VTK ( 7871): varying vec4 vertexVCVSOutput; > I/tango ( 186): vio-fault-detector.cc:74 IMU and camera data quality are > qualified for VIO recovery. > W/tango ( 186): vio-status-monitor.cc:208 VIO is ready for reset. > Current > timestamp 20626.498361783 > W/tango ( 186): vio-status-monitor.cc:93 VIO receives reasonable visual > and inertial data, try to reset now. > I/tango ( 186): vio-status-monitor.cc:97 Resetting with last good frame. > E/VTK ( 7871): // optional color passed in from the vertex shader, > vertexColor > E/VTK ( 7871): uniform float opacityUniform; // the fragment opacity > E/VTK ( 7871): uniform vec3 ambientColorUniform; // intensity weighted > color > E/VTK ( 7871): uniform vec3 diffuseColorUniform; // intensity weighted > color > E/VTK ( 7871): uniform vec3 specularColorUniform; // intensity weighted > color > E/VTK ( 7871): uniform float specularPowerUniform; > E/VTK ( 7871): // optional surface normal declaration > E/VTK ( 7871): varying vec3 normalVCVSOutput; > E/VTK ( 7871): // extra lighting parameters > E/VTK ( 7871): //VTK::Light::Dec > E/VTK ( 7871): // Texture coordinates > E/VTK ( 7871): //VTK::TCoord::Dec > E/VTK ( 7871): // picking support > E/VTK ( 7871): //VTK::Picking::Dec > E/VTK ( 7871): // Depth Peeling Support > E/VTK ( 7871): //VTK::DepthPeeling::Dec > E/VTK ( 7871): // clipping plane vars > E/VTK ( 7871): //VTK::Clip::Dec > E/VTK ( 7871): // the output of this shader > E/VTK ( 7871): //VTK::Output::Dec > E/VTK ( 7871): // Apple Bug > E/VTK ( 7871): //VTK::PrimID::Dec > E/VTK ( 7871): void main() > E/VTK ( 7871): { > E/VTK ( 7871): // Apple Bug > E/VTK ( 7871): //VTK::PrimID::Impl > E/VTK ( 7871): //VTK::Clip::Impl > E/VTK ( 7871): vec3 ambientColor; > E/VTK ( 7871): vec3 diffuseColor; > E/VTK ( 7871): float opacity; > E/VTK ( 7871): vec3 specularColor; > E/VTK ( 7871): float specularPower; > E/VTK ( 7871): ambientColor = ambientColorUniform; > E/VTK ( 7871): diffuseColor = diffuseColorUniform; > E/VTK ( 7871): opacity = opacityUniform; > E/VTK ( 7871): specularColor = specularColorUniform; > E/VTK ( 7871): specularPower = specularPowerUniform; > E/VTK ( 7871): // VC position of this fragment > E/VTK ( 7871): vec4 vertexVC = vertexVCVSOutput; > E/VTK ( 7871): // Generate the normal if we are not passed in one > E/VTK ( 7871): vec3 normalVCVSOutput = normalize(normalVCVSOutput); > E/VTK ( 7871): if (gl_FrontFacing == false) { normalVCVSOutput = > -normalVCVSOutput; } > E/VTK ( 7871): float df = max(0.0, normalVCVSOutput.z); > E/VTK ( 7871): float sf = pow(df, specularPower); > E/VTK ( 7871): vec3 diffuse = df * diffuseColor; > E/VTK ( 7871): vec3 specular = sf * specularColor; > E/VTK ( 7871): gl_FragData[0] = vec4(ambientColor + diffuse + > specular, opacity); > E/VTK ( 7871): //VTK::Light::Impl > E/VTK ( 7871): //VTK::TCoord::Impl > E/VTK ( 7871): if (gl_FragData[0].a <= 0.0) > E/VTK ( 7871): { > E/VTK ( 7871): discard; > E/VTK ( 7871): } > E/VTK ( 7871): //VTK::DepthPeeling::Impl > E/VTK ( 7871): //VTK::Picking::Impl > E/VTK ( 7871): } > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1421 > E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting > 'vertexMC' in shader VAO. > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1429 > E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting > 'normalMC' in shader VAO. > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1237 > / > > Did I provide enough information? Please let me know if something is > missing. > > Have a nice day and thanks again > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735161.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 > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Nov 25 18:26:34 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 25 Nov 2015 18:26:34 -0500 Subject: [vtkusers] Add multiple vtkVolume in vtkAssembly In-Reply-To: <1448444300373-5735182.post@n5.nabble.com> References: <1448444300373-5735182.post@n5.nabble.com> Message-ID: HI Vincent, On Wed, Nov 25, 2015 at 4:38 AM, vincentTan wrote: > Hi all, > > Is there any way that i can add multiple vtkVolume into one vtkAssembly?? > This is because i have seen most of the examples are not related to what i > need. > I haven't used vtkAssembly recently but I am curious why you need to use vtkAssuembly for volume rendering? Are you trying to render multiple volumes? If you can provide more detail on this topic, possibly I could help. Thanks, Aashish > Thus, i would like to have some guide if possible regarding this issue. > FYI, i think i have successfully add in multiple volumes using addPart() in > vtkAssembly, yet, there is nothing when i try to render it. > > Thanks a lot. > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182.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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Nov 25 18:30:00 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 25 Nov 2015 18:30:00 -0500 Subject: [vtkusers] Volume + surface transparency with OpenGL2 In-Reply-To: References: Message-ID: Thanks all for the feedback and use-cases. I have added this to the list of features and will discuss this with the team members on possible solutions. Thanks, Aashish On Wed, Nov 25, 2015 at 5:21 AM, Simon ESNEAULT wrote: > Hello, > > We also have a need for such a feature, in order to display a virtual > prosthesis within the patient anatomy. > We ended up proposing two solutions for our customers : > - Render a full opaque surface within the volume rendering ( > http://picpaste.com/pics/solution1.1448446727.png) > - Render a translucent surface on top of the volume rendering using a > layer system with 2 renderers on the same viewport ( > http://picpaste.com/pics/solution2.1448446818.png) > > But neither of the solution are completely satisfying as we would also > like to blend a translucent mesh in the middle of the volume. > > I can provide some data if it can help to develop this feature. > > Have a good day, > Simon > > 2015-11-24 2:52 GMT+01:00 Marcus D. Hanwell : > >> We have also had a number of tomviz users ask if this is possible, and >> they have similar requirements to those stated above. We often have >> the overall structure rendered as a volume, and are looking at >> distinct isosurfaces, or in future segmented features, where the ideal >> would be to offer a translucent surface within the volume. >> >> On Mon, Nov 23, 2015 at 7:05 PM, David Cole via vtkusers >> wrote: >> > Me too. >> > >> > We want to visualize structures (natural and artificial) inside of >> volume >> > renderings of CT scans, mostly of people. >> > >> > Works great without using translucent polydata. As soon as you make any >> of >> > it translucent, it just sort of disappears all the way... Very confusing >> > when you first encounter it. >> > >> > So... +1. And let me know what I can do to test/help out... >> > >> > >> > David C. >> > >> > >> > >> > On Monday, November 23, 2015, Xabi Riobe wrote: >> >> >> >> Here are at least 2 examples: >> >> >> >> - medical data : the body is voxelized and you have the segmentation of >> >> organs/bones/vessels >> >> - material : cement, rock structure voxelized, with segmentation of the >> >> different layers, components >> >> >> >> in both cases you may want to superimpose the surfaces and play with >> >> transparency to highlight an entity but still seeing the inside of it, >> >> or you can have tools with polygonal surface that you will insert in an >> >> easier way into the volume if they are transparent, or just a clipping >> plane >> >> that you want to be transparent to place it with precision inside the >> volume >> >> before doing the clip... >> >> >> >> I'm glad to hear it may fit in a todo list :) >> >> Let me know if someone starts working on this, i may give any kind of >> help >> >> ! >> >> >> >> Thanks >> >> >> >> >> >> 2015-11-23 21:40 GMT+01:00 Aashish Chaudhary >> >> : >> >>> >> >>> On Mon, Nov 23, 2015 at 3:14 PM, Xabi Riobe >> wrote: >> >>>> >> >>>> Hi Aashish, >> >>>> >> >>>> For example, if you render a volume with vtkGPUVolumeRayCastMapper, >> or >> >>>> vtkFixedPointVolumeRayCastMapper, and you put inside a sphere >> rendered with >> >>>> vtkPolyDataMapper, as soon as you change the sphere actor opacity >> the depth >> >>>> notion is lost, with the sphere appearing behind the volume. >> >>> >> >>> >> >>> Thanks for clarification. Yes, this is not currently supported (I am >> not >> >>> aware and we don't handle this in the mapper). This is a interesting >> use >> >>> case. I will add it to the feature request and will get back to you. >> Just >> >>> curious, what would be a real world example use-case you have for this >> >>> feature? Can you share bit more domain information (medical / >> scientific >> >>> etc.). >> >>> >> >>> - Aashish >> >>> >> >>> >> >>> >> >>> -- >> >>> | Aashish Chaudhary >> >>> | Technical Leader >> >>> | Kitware Inc. >> >>> | http://www.kitware.com/company/team/chaudhary.html >> >> >> >> >> > >> > _______________________________________________ >> > Powered by www.kitware.com >> > >> > Visit other Kitware open-source projects at >> > http://www.kitware.com/opensource/opensource.html >> > >> > Please keep messages on-topic and check the VTK FAQ at: >> > http://www.vtk.org/Wiki/VTK_FAQ >> > >> > Search the list archives at: http://markmail.org/search/?q=vtkusers >> > >> > Follow this link to subscribe/unsubscribe: >> > http://public.kitware.com/mailman/listinfo/vtkusers >> > >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/vtkusers >> > > > > -- > ------------------------------------------------------------------ > Simon Esneault > Rennes, France > ------------------------------------------------------------------ > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From sin-chia.vincent-tan at vitrox.com Wed Nov 25 18:50:00 2015 From: sin-chia.vincent-tan at vitrox.com (vincentTan) Date: Wed, 25 Nov 2015 16:50:00 -0700 (MST) Subject: [vtkusers] Add multiple vtkVolume in vtkAssembly In-Reply-To: References: <1448444300373-5735182.post@n5.nabble.com> Message-ID: <1448495400772-5735201.post@n5.nabble.com> Hi Aashish, Thanks a lot for your reply. Ya, i am trying to render multiple volumes in one go. In my case, i would like to have two or possibly more vtkVolume in a vtkAssembly so that a global transformation on them would be applied as to treat those volumes as one unit. Besides, I have one class designed to keep track of each individual volume with its vtkImageData, vtkVolumeMapper as well as vtkVolumeProperty. In addition, as for vtkAssembly, i just simply add the volumes using assembly->addPart(subvol.getVolume()) but nothing comes out. Thanks a lot. Vincent -- View this message in context: http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735201.html Sent from the VTK - Users mailing list archive at Nabble.com. From aashish.chaudhary at kitware.com Wed Nov 25 19:50:19 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 25 Nov 2015 19:50:19 -0500 Subject: [vtkusers] Add multiple vtkVolume in vtkAssembly In-Reply-To: <1448495400772-5735201.post@n5.nabble.com> References: <1448444300373-5735182.post@n5.nabble.com> <1448495400772-5735201.post@n5.nabble.com> Message-ID: Hi Vincent, I modified one of the test (attached) and tried vtkAssembly and it worked for me on Ubuntu 14.* using OpenGL2 backend. Can you try this test and see if it works for you as well? If you using OpenGL1 backend, I would hope it should work as well since I believe vtkAssembly code has not changed as much. Thanks, On Wed, Nov 25, 2015 at 6:50 PM, vincentTan wrote: > Hi Aashish, > > Thanks a lot for your reply. > Ya, i am trying to render multiple volumes in one go. In my case, i would > like to have two or possibly more vtkVolume in a vtkAssembly so that a > global transformation on them would be applied as to treat those volumes as > one unit. > > Besides, I have one class designed to keep track of each individual volume > with its vtkImageData, vtkVolumeMapper as well as vtkVolumeProperty. In > addition, as for vtkAssembly, i just simply add the volumes using > assembly->addPart(subvol.getVolume()) but nothing comes out. > > Thanks a lot. > Vincent > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735201.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 > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TestGPUVolumeRayCastMapper.cxx Type: text/x-c++src Size: 2931 bytes Desc: not available URL: From sin-chia.vincent-tan at vitrox.com Wed Nov 25 20:34:14 2015 From: sin-chia.vincent-tan at vitrox.com (vincentTan) Date: Wed, 25 Nov 2015 18:34:14 -0700 (MST) Subject: [vtkusers] Add multiple vtkVolume in vtkAssembly In-Reply-To: References: <1448444300373-5735182.post@n5.nabble.com> <1448495400772-5735201.post@n5.nabble.com> Message-ID: Hi Aashish, Thanks a lot for your help. Will get back to you once i tested it out. Thanks a lot. Vincent On Thu, Nov 26, 2015 at 8:51 AM, Aashish Chaudhary-2 [via VTK] < ml-node+s1045678n5735203h2 at n5.nabble.com> wrote: > Hi Vincent, > > I modified one of the test (attached) and tried vtkAssembly and it worked > for me on Ubuntu 14.* using OpenGL2 backend. Can you try this test and see > if it works for you as well? If you using OpenGL1 backend, I would hope it > should work as well since I believe vtkAssembly code has not changed as > much. > > Thanks, > > > On Wed, Nov 25, 2015 at 6:50 PM, vincentTan <[hidden email] > > wrote: > >> Hi Aashish, >> >> Thanks a lot for your reply. >> Ya, i am trying to render multiple volumes in one go. In my case, i would >> like to have two or possibly more vtkVolume in a vtkAssembly so that a >> global transformation on them would be applied as to treat those volumes >> as >> one unit. >> >> Besides, I have one class designed to keep track of each individual volume >> with its vtkImageData, vtkVolumeMapper as well as vtkVolumeProperty. In >> addition, as for vtkAssembly, i just simply add the volumes using >> assembly->addPart(subvol.getVolume()) but nothing comes out. >> >> Thanks a lot. >> Vincent >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735201.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 >> > > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 > > *TestGPUVolumeRayCastMapper.cxx* (3K) Download Attachment > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735203.html > To unsubscribe from Add multiple vtkVolume in vtkAssembly, click here > > . > NAML > > -- View this message in context: http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735204.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sin-chia.vincent-tan at vitrox.com Wed Nov 25 21:56:18 2015 From: sin-chia.vincent-tan at vitrox.com (vincentTan) Date: Wed, 25 Nov 2015 19:56:18 -0700 (MST) Subject: [vtkusers] Add multiple vtkVolume in vtkAssembly In-Reply-To: References: <1448444300373-5735182.post@n5.nabble.com> <1448495400772-5735201.post@n5.nabble.com> Message-ID: Hi Aashish, Thanks a lot for your helps. It works but if possible, is there any solution for the see through effect below: [image: Inline image 2] FYI, i have added another vtkVolumeMapper and vtkVolume using the same source in your code. However, as you have seen it in the image, at certain angle where both of the objects are overlapped, you could see that the object located behind could be seen through. In addition, the object in front is the second vtkVolume that is created and added into vtkAssembly. Thanks a lot. Appreciate your great helps. Vincent On Thu, Nov 26, 2015 at 9:34 AM, Vincent Tan Sin Chia < sin-chia.vincent-tan at vitrox.com> wrote: > Hi Aashish, > > Thanks a lot for your help. > Will get back to you once i tested it out. > > Thanks a lot. > Vincent > > On Thu, Nov 26, 2015 at 8:51 AM, Aashish Chaudhary-2 [via VTK] < > ml-node+s1045678n5735203h2 at n5.nabble.com> wrote: > >> Hi Vincent, >> >> I modified one of the test (attached) and tried vtkAssembly and it worked >> for me on Ubuntu 14.* using OpenGL2 backend. Can you try this test and see >> if it works for you as well? If you using OpenGL1 backend, I would hope it >> should work as well since I believe vtkAssembly code has not changed as >> much. >> >> Thanks, >> >> >> On Wed, Nov 25, 2015 at 6:50 PM, vincentTan <[hidden email] >> > wrote: >> >>> Hi Aashish, >>> >>> Thanks a lot for your reply. >>> Ya, i am trying to render multiple volumes in one go. In my case, i would >>> like to have two or possibly more vtkVolume in a vtkAssembly so that a >>> global transformation on them would be applied as to treat those volumes >>> as >>> one unit. >>> >>> Besides, I have one class designed to keep track of each individual >>> volume >>> with its vtkImageData, vtkVolumeMapper as well as vtkVolumeProperty. In >>> addition, as for vtkAssembly, i just simply add the volumes using >>> assembly->addPart(subvol.getVolume()) but nothing comes out. >>> >>> Thanks a lot. >>> Vincent >>> >>> >>> >>> -- >>> View this message in context: >>> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735201.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 >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 >> >> *TestGPUVolumeRayCastMapper.cxx* (3K) Download Attachment >> >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735203.html >> To unsubscribe from Add multiple vtkVolume in vtkAssembly, click here >> >> . >> NAML >> >> > > See Through.PNG (415K) -- View this message in context: http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735205.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Nov 25 22:40:59 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 25 Nov 2015 22:40:59 -0500 Subject: [vtkusers] Add multiple vtkVolume in vtkAssembly In-Reply-To: References: <1448444300373-5735182.post@n5.nabble.com> <1448495400772-5735201.post@n5.nabble.com> Message-ID: Hi Vincent, Thanks for the feedback. If they are not overlapping in physical space then you can do something like this (basically turn on the SortingStyle to BackToFront) ren1->GetCullers()->InitTraversal(); vtkCuller *culler=ren1->GetCullers()->GetNextItem(); vtkFrustumCoverageCuller *fc=vtkFrustumCoverageCuller::SafeDownCast(culler); if(fc!=0) { fc->SetSortingStyleToBackToFront(); } else { cout<<"culler is not a vtkFrustumCoverageCuller"< wrote: > Hi Aashish, > > Thanks a lot for your helps. It works but if possible, is there any > solution for the see through effect below: > [image: Inline image 2] > > FYI, i have added another vtkVolumeMapper and vtkVolume using the same > source in your code. However, as you have seen it in the image, at certain > angle where both of the objects are overlapped, you could see that the > object located behind could be seen through. In addition, the object in > front is the second vtkVolume that is created and added into vtkAssembly. > > Thanks a lot. Appreciate your great helps. > Vincent > > On Thu, Nov 26, 2015 at 9:34 AM, Vincent Tan Sin Chia <[hidden email] > > wrote: > >> Hi Aashish, >> >> Thanks a lot for your help. >> Will get back to you once i tested it out. >> >> Thanks a lot. >> Vincent >> >> On Thu, Nov 26, 2015 at 8:51 AM, Aashish Chaudhary-2 [via VTK] <[hidden >> email] > wrote: >> >>> Hi Vincent, >>> >>> I modified one of the test (attached) and tried vtkAssembly and it >>> worked for me on Ubuntu 14.* using OpenGL2 backend. Can you try this test >>> and see if it works for you as well? If you using OpenGL1 backend, I would >>> hope it should work as well since I believe vtkAssembly code has not >>> changed as much. >>> >>> Thanks, >>> >>> >>> On Wed, Nov 25, 2015 at 6:50 PM, vincentTan <[hidden email] >>> > wrote: >>> >>>> Hi Aashish, >>>> >>>> Thanks a lot for your reply. >>>> Ya, i am trying to render multiple volumes in one go. In my case, i >>>> would >>>> like to have two or possibly more vtkVolume in a vtkAssembly so that a >>>> global transformation on them would be applied as to treat those >>>> volumes as >>>> one unit. >>>> >>>> Besides, I have one class designed to keep track of each individual >>>> volume >>>> with its vtkImageData, vtkVolumeMapper as well as vtkVolumeProperty. In >>>> addition, as for vtkAssembly, i just simply add the volumes using >>>> assembly->addPart(subvol.getVolume()) but nothing comes out. >>>> >>>> Thanks a lot. >>>> Vincent >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735201.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 >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> 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 >>> >>> *TestGPUVolumeRayCastMapper.cxx* (3K) Download Attachment >>> >>> >>> >>> ------------------------------ >>> If you reply to this email, your message will be added to the discussion >>> below: >>> >>> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735203.html >>> To unsubscribe from Add multiple vtkVolume in vtkAssembly, click here. >>> NAML >>> >>> >> >> > > ------------------------------ > View this message in context: Re: Add multiple vtkVolume in vtkAssembly > > 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 > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From sin-chia.vincent-tan at vitrox.com Wed Nov 25 22:58:03 2015 From: sin-chia.vincent-tan at vitrox.com (vincentTan) Date: Wed, 25 Nov 2015 20:58:03 -0700 (MST) Subject: [vtkusers] Add multiple vtkVolume in vtkAssembly In-Reply-To: References: <1448444300373-5735182.post@n5.nabble.com> <1448495400772-5735201.post@n5.nabble.com> Message-ID: Hi Aashish, Thanks a lot for your help. I have added in the code snippet that you have provided but yet the problem still persists. Any idea how?? Thanks a lot for your much needed helps. Vincent On Thu, Nov 26, 2015 at 11:41 AM, Aashish Chaudhary-2 [via VTK] < ml-node+s1045678n5735207h26 at n5.nabble.com> wrote: > Hi Vincent, > > Thanks for the feedback. If they are not overlapping in physical space > then you can do something like this (basically turn on the SortingStyle to > BackToFront) > > ren1->GetCullers()->InitTraversal(); > vtkCuller *culler=ren1->GetCullers()->GetNextItem(); > > vtkFrustumCoverageCuller > *fc=vtkFrustumCoverageCuller::SafeDownCast(culler); > if(fc!=0) > { > fc->SetSortingStyleToBackToFront(); > } > else > { > cout<<"culler is not a vtkFrustumCoverageCuller"< } > > > > > On Wed, Nov 25, 2015 at 9:56 PM, vincentTan <[hidden email] > > wrote: > >> Hi Aashish, >> >> Thanks a lot for your helps. It works but if possible, is there any >> solution for the see through effect below: >> [image: Inline image 2] >> >> FYI, i have added another vtkVolumeMapper and vtkVolume using the same >> source in your code. However, as you have seen it in the image, at certain >> angle where both of the objects are overlapped, you could see that the >> object located behind could be seen through. In addition, the object in >> front is the second vtkVolume that is created and added into vtkAssembly. >> >> Thanks a lot. Appreciate your great helps. >> Vincent >> >> On Thu, Nov 26, 2015 at 9:34 AM, Vincent Tan Sin Chia <[hidden email] >> > wrote: >> >>> Hi Aashish, >>> >>> Thanks a lot for your help. >>> Will get back to you once i tested it out. >>> >>> Thanks a lot. >>> Vincent >>> >>> On Thu, Nov 26, 2015 at 8:51 AM, Aashish Chaudhary-2 [via VTK] <[hidden >>> email] > wrote: >>> >>>> Hi Vincent, >>>> >>>> I modified one of the test (attached) and tried vtkAssembly and it >>>> worked for me on Ubuntu 14.* using OpenGL2 backend. Can you try this test >>>> and see if it works for you as well? If you using OpenGL1 backend, I would >>>> hope it should work as well since I believe vtkAssembly code has not >>>> changed as much. >>>> >>>> Thanks, >>>> >>>> >>>> On Wed, Nov 25, 2015 at 6:50 PM, vincentTan <[hidden email] >>>> > wrote: >>>> >>>>> Hi Aashish, >>>>> >>>>> Thanks a lot for your reply. >>>>> Ya, i am trying to render multiple volumes in one go. In my case, i >>>>> would >>>>> like to have two or possibly more vtkVolume in a vtkAssembly so that a >>>>> global transformation on them would be applied as to treat those >>>>> volumes as >>>>> one unit. >>>>> >>>>> Besides, I have one class designed to keep track of each individual >>>>> volume >>>>> with its vtkImageData, vtkVolumeMapper as well as vtkVolumeProperty. In >>>>> addition, as for vtkAssembly, i just simply add the volumes using >>>>> assembly->addPart(subvol.getVolume()) but nothing comes out. >>>>> >>>>> Thanks a lot. >>>>> Vincent >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735201.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 >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> 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 >>>> >>>> *TestGPUVolumeRayCastMapper.cxx* (3K) Download Attachment >>>> >>>> >>>> >>>> ------------------------------ >>>> If you reply to this email, your message will be added to the >>>> discussion below: >>>> >>>> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735203.html >>>> To unsubscribe from Add multiple vtkVolume in vtkAssembly, click here. >>>> NAML >>>> >>>> >>> >>> >> >> ------------------------------ >> View this message in context: Re: Add multiple vtkVolume in vtkAssembly >> >> 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 >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735207.html > To unsubscribe from Add multiple vtkVolume in vtkAssembly, click here > > . > NAML > > Source1.cpp (5K) -- View this message in context: http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735208.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Wed Nov 25 23:25:01 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Wed, 25 Nov 2015 23:25:01 -0500 Subject: [vtkusers] Add multiple vtkVolume in vtkAssembly In-Reply-To: References: <1448444300373-5735182.post@n5.nabble.com> <1448495400772-5735201.post@n5.nabble.com> Message-ID: Hi Vincent, I am seeing some other issue but not the issue you are talking about using the source code you attached. Can you share some more sceenshots? You can send them directly to my email address. Thanks, On Wed, Nov 25, 2015 at 10:58 PM, vincentTan < sin-chia.vincent-tan at vitrox.com> wrote: > Hi Aashish, > > Thanks a lot for your help. > > I have added in the code snippet that you have provided but yet the > problem still persists. > Any idea how?? > > Thanks a lot for your much needed helps. > Vincent > > On Thu, Nov 26, 2015 at 11:41 AM, Aashish Chaudhary-2 [via VTK] <[hidden > email] > wrote: > >> Hi Vincent, >> >> Thanks for the feedback. If they are not overlapping in physical space >> then you can do something like this (basically turn on the SortingStyle to >> BackToFront) >> >> ren1->GetCullers()->InitTraversal(); >> vtkCuller *culler=ren1->GetCullers()->GetNextItem(); >> >> vtkFrustumCoverageCuller >> *fc=vtkFrustumCoverageCuller::SafeDownCast(culler); >> if(fc!=0) >> { >> fc->SetSortingStyleToBackToFront(); >> } >> else >> { >> cout<<"culler is not a vtkFrustumCoverageCuller"<> } >> >> >> >> >> On Wed, Nov 25, 2015 at 9:56 PM, vincentTan <[hidden email] >> > wrote: >> >>> Hi Aashish, >>> >>> Thanks a lot for your helps. It works but if possible, is there any >>> solution for the see through effect below: >>> [image: Inline image 2] >>> >>> FYI, i have added another vtkVolumeMapper and vtkVolume using the same >>> source in your code. However, as you have seen it in the image, at certain >>> angle where both of the objects are overlapped, you could see that the >>> object located behind could be seen through. In addition, the object in >>> front is the second vtkVolume that is created and added into vtkAssembly. >>> >>> Thanks a lot. Appreciate your great helps. >>> Vincent >>> >>> On Thu, Nov 26, 2015 at 9:34 AM, Vincent Tan Sin Chia <[hidden email] >>> > wrote: >>> >>>> Hi Aashish, >>>> >>>> Thanks a lot for your help. >>>> Will get back to you once i tested it out. >>>> >>>> Thanks a lot. >>>> Vincent >>>> >>>> On Thu, Nov 26, 2015 at 8:51 AM, Aashish Chaudhary-2 [via VTK] <[hidden >>>> email] > wrote: >>>> >>>>> Hi Vincent, >>>>> >>>>> I modified one of the test (attached) and tried vtkAssembly and it >>>>> worked for me on Ubuntu 14.* using OpenGL2 backend. Can you try this test >>>>> and see if it works for you as well? If you using OpenGL1 backend, I would >>>>> hope it should work as well since I believe vtkAssembly code has not >>>>> changed as much. >>>>> >>>>> Thanks, >>>>> >>>>> >>>>> On Wed, Nov 25, 2015 at 6:50 PM, vincentTan <[hidden email] >>>>> > wrote: >>>>> >>>>>> Hi Aashish, >>>>>> >>>>>> Thanks a lot for your reply. >>>>>> Ya, i am trying to render multiple volumes in one go. In my case, i >>>>>> would >>>>>> like to have two or possibly more vtkVolume in a vtkAssembly so that a >>>>>> global transformation on them would be applied as to treat those >>>>>> volumes as >>>>>> one unit. >>>>>> >>>>>> Besides, I have one class designed to keep track of each individual >>>>>> volume >>>>>> with its vtkImageData, vtkVolumeMapper as well as vtkVolumeProperty. >>>>>> In >>>>>> addition, as for vtkAssembly, i just simply add the volumes using >>>>>> assembly->addPart(subvol.getVolume()) but nothing comes out. >>>>>> >>>>>> Thanks a lot. >>>>>> Vincent >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735201.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 >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> 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 >>>>> >>>>> *TestGPUVolumeRayCastMapper.cxx* (3K) Download Attachment >>>>> >>>>> >>>>> >>>>> ------------------------------ >>>>> If you reply to this email, your message will be added to the >>>>> discussion below: >>>>> >>>>> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735203.html >>>>> To unsubscribe from Add multiple vtkVolume in vtkAssembly, click here. >>>>> NAML >>>>> >>>>> >>>> >>>> >>> >>> ------------------------------ >>> View this message in context: Re: Add multiple vtkVolume in vtkAssembly >>> >>> 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 >>> >>> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> 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 >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735207.html >> To unsubscribe from Add multiple vtkVolume in vtkAssembly, click here. >> NAML >> >> > > > *Source1.cpp* (5K) Download Attachment > > > ------------------------------ > View this message in context: Re: Add multiple vtkVolume in vtkAssembly > > 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 > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Thu Nov 26 04:01:06 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Thu, 26 Nov 2015 10:01:06 +0100 Subject: [vtkusers] vtkDiscreteMarchingCubes and vtkMarchingCubes do not handle sub-extents correctly In-Reply-To: References: <56546593.2070600@mh-hannover.de> <5655BFFF.4080009@mh-hannover.de> Message-ID: <5656CA52.2090304@mh-hannover.de> Many thanks Bill for looking into this. I had a look at the code of vtkContourFilter and vtk(Discrete)MarchingCubes. My guess was that vtk(Discrete)MarchingCubes lacks an implementation of RequestUpdateExtent. However, I'm not sufficiently familiar with VTK's streaming to create an appropriate method, especially the changes for vtk-6.3 still confuse me. I've been wondering what is the difference between vtkMarchingCubes and vtkContourFilter run on an image. So far I've thought that vtkContourFilter runs vtkMarchingCubes when the input is an image, however the code of vtkContourFilter does not refer to vtkMarchingCubes at all. Still, for a binary image as input the results seem to be the same, aren't they? Again, many thanks for looking into this. Roman On 25/11/15 21:58, Bill Lorensen wrote: > Roman, > > I think that only algorithms that implement ThreadedExecute() will > properly work in your situation. vtkMarchingCubes and > vtkDiscreteMarchingCubes do not implement that method. > > I suggest using vtkContourFilter instead of vtkMarchingCubes. There is > no equivalent for vtkDiscreteMarchingCubes. > > Perhaps in the future I can look at DiscreteMarchingCubes. > > Bill > > On Wed, Nov 25, 2015 at 1:53 PM, Bill Lorensen wrote: >> Roman, >> >> With your sample programs and my data, I can reproduce the bad results >> for Marching and DiscreteCubes. (without ImagePad - that is another >> issue). >> >> Now to find the bugs.... >> >> Bill >> >> On Wed, Nov 25, 2015 at 11:27 AM, Bill Lorensen wrote: >>> Looks like a bug. I'll take a look. >>> >>> >>> On Wed, Nov 25, 2015 at 9:04 AM, Grothausmann, Roman Dr. >>> wrote: >>>> I just noticed that vtkDiscreteMarchingCubes and also vtkMarchingCubes do >>>> not handle sub-extents correctly. It seems both filters do not handle the >>>> translation of each sub-extent. If the result is saved in a PVTP-file and >>>> opened in ParaView, the content of each VTP-file is placed over the others. >>>> In contrast vtkContourFilter does handle the translation of each sub-extent >>>> correctly, the content of each VTP-file is positioned correctly, see e.g. >>>> https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/marching-cubes_MPI.cxx >>>> >>>> On 24/11/15 14:26, Grothausmann, Roman Dr. wrote: >>>>> >>>>> Dear mailing list members, >>>>> >>>>> >>>>> Trying to cap the output of vtkDiscreteMarchingCubes by applying >>>>> vtkImageConstantPad on the input before does not work if running >>>>> vtkStreamingDemandDrivenPipeline by e.g. a vtkMPIController. >>>>> >>>>> If I run this program with the parameter for capping, i.e. employing >>>>> vtkImageConstantPad: >>>>> >>>>> https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/discrete_marching-cubes_MPI.cxx#L90 >>>>> >>>>> >>>>> I get an error such as: >>>>> vtkImageData (0x1868190): GetScalarPointer: Pixel (0, 0, 341) not in >>>>> memory. >>>>> Current extent= (249, 499, 0, 479, 0, 429) >>>>> >>>>> It seems that vtkImageConstantPad processes the wrong sub-extent. Would >>>>> that be >>>>> a filter internal problem or of my code? >>>>> >>>>> Could the problem be related to the fact that I try to combine structured >>>>> extent >>>>> (Index (IJK) based, not using ghost levels) with piece-based extent that >>>>> uses >>>>> ghost levels? >>>>> >>>>> The problem even occurs when the extent is not extended at all. >>>>> The program works as expected if vtkImageConstantPad is avoided. >>>>> >>>>> Any help or hints are very much appreciated >>>>> Roman >>>>> >>>> >>>> -- >>>> Dr. Roman Grothausmann >>>> >>>> Tomographie und Digitale Bildverarbeitung >>>> Tomography and Digital Image Analysis >>>> >>>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>>> Medizinische Hochschule Hannover >>>> Carl-Neuberg-Str. 1 >>>> D-30625 Hannover >>>> >>>> Tel. +49 511 532-2900 >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the VTK FAQ at: >>>> http://www.vtk.org/Wiki/VTK_FAQ >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/vtkusers >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >> >> >> >> -- >> Unpaid intern in BillsBasement at noware dot com > > > -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From rakesh.p at tataelxsi.co.in Thu Nov 26 03:36:06 2015 From: rakesh.p at tataelxsi.co.in (Rakesh Patil) Date: Thu, 26 Nov 2015 08:36:06 +0000 Subject: [vtkusers] Append suffix 'd' for libraries compiled in debug mode Message-ID: Hello, I compile VTK using CMAKE on a windows system. I am able to successfully compile VTK. What I need is that the build file should be able to generate the libraries with suffix 'd' appended at the end of each library. This should happen only when VTK is compiled in debug mode. For example, Release mode library is vtkCommonCore-6.3.lib(dll), Debug mode should generatge vtkCommonCored-6.3.lib(dll) or vtkCommonCore-6.3d.lib(dll) Is there any approach to get such outputs instead of renaming all the dlls later? Best Regard Rakesh Patil Consultant Tata Elxsi Hoody, ITPB Road, Whitefield, Bangalore 560048 -------------- next part -------------- An HTML attachment was scrubbed... URL: From grothausmann.roman at mh-hannover.de Thu Nov 26 06:19:56 2015 From: grothausmann.roman at mh-hannover.de (Grothausmann, Roman Dr.) Date: Thu, 26 Nov 2015 12:19:56 +0100 Subject: [vtkusers] can vtkXMLPolyDataReader not stream "manually"? Message-ID: <5656EADC.7050609@mh-hannover.de> Dear mailing list members, Due to apparent index limitations for arrays I'm in the need to process a vtkPolyData in chunks. However, my streaming approach reads and processes all data not just sub-extents. Therefore, I tried to write a minimal example of streamed reading using vtkXMLPolyDataReader which is supposed to support streaming according to the docs. However this simple example seems not to stream: https://github.com/romangrothausmann/VTK-CLIs/blob/master/read_SDP.cxx I've only found unanswered similar questions on the mailing list and all other use of vtkStreamingDemandDrivenPipeline seems to be within a filter not outside. Still, on page 14 of 4_VTK-ParallelCompositeAndTime.pdf the same exemplary use of vtkStreamingDemandDrivenPipeline is given for "manual" updates. Am I missing something in my example or can vtkXMLPolyDataReader not stream? Any help or hints are very much appreciated Roman -- Dr. Roman Grothausmann Tomographie und Digitale Bildverarbeitung Tomography and Digital Image Analysis Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 Medizinische Hochschule Hannover Carl-Neuberg-Str. 1 D-30625 Hannover Tel. +49 511 532-2900 From lonni.besancon at gmail.com Thu Nov 26 07:00:18 2015 From: lonni.besancon at gmail.com (=?UTF-8?Q?Lonni_Besan=C3=A7on?=) Date: Thu, 26 Nov 2015 05:00:18 -0700 (MST) Subject: [vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY In-Reply-To: References: <1447844506521-5735057.post@n5.nabble.com> <1447855416009-5735062.post@n5.nabble.com> <1448041347199-5735143.post@n5.nabble.com> <1448297964515-5735161.post@n5.nabble.com> Message-ID: <58BF9B19-C5A4-4329-8EB8-F94BC2D28AA6@gmail.com> Thanks again for your answer and the help you have provided once again. I?m afraid it cannot be a problem with the mapper as it is set before this function is called ( I can check that easily because I use an other function that does exactly what I want to do in terms of rotating and translating an actor before I call this one ). One of the weird things is that the matrix is apparently modified because I have tried to send it through UDP to an other machine to check if that was working and apparently it is working (the matrix I receive is modified it?s just that the rendering cannot be done for some unknown reason). Again, thanks for the help you have provided me so far, you have been more than helpful. Contact me when you?re back and I could send you the whole project if you?d like to take a better look at it (however be aware that I?m still playing with vtk for android, so the code is not optimised at all but that is not the point for the time being). Have a very nice holiday with your family (wish we had the equivalent of Thanksgiving in France). Best / Cordialement, Lonni Besan?on PhD Student with the AVIZ team at Inria and with the HAPCO team at Limsi/CNRS Teaching Assistant at Polytech Paris Sud and Universit? Paris Sud Address: University Paris-Saclay, Bat 660 (Digiteo) ? Office 1041 Email: lonni.besancon at gmail.com Phone: +33689902815 WebPage: http://lonni.besancon.pagesperso-orange.fr LinkedIn: fr.linkedin.com/pub/lonni-besan?on/77/552/a38/en > On 25 Nov 2015, at 23:30, Ken Martin [via VTK] wrote: > > Thanks Lonni, > > The shaders look fine so I suspect what is happening is that somehow a render is getting called when there is no data for the mapper. The "error setting attribute" type problems stem from either the shader not actually using the passed attribute or attempting to set the attribute with no data. Looking at the shader the attributes are definitely being used which means the error is maybe due to somehow setting the attribute with no data. Maybe somehow the mapper is not setup yet when your new method is getting called? I'm out for Thanksgiving the rest of the week but if you are still stuck next week let me know and I can look a bit deeper. > > Thanks > Ken > > > On Mon, Nov 23, 2015 at 11:59 AM, Lonni Besan?on <[hidden email] > wrote: > Sorry for the time I took to answer. I will update the post on SO. > > So here is the code I got from the error macro: > /W/NativeVTK( 7871): rotation = 0.000000 ;;; 0.000000 ;;; 0.583755 > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1237 > E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): VS: > //VTK::System::Dec > E/VTK ( 7871): > /*========================================================================= > E/VTK ( 7871): Program: Visualization Toolkit > E/VTK ( 7871): Module: vtkPolyDataVS.glsl > E/VTK ( 7871): Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen > E/VTK ( 7871): All rights reserved. > E/VTK ( 7871): See Copyright.txt or > http://www.kitware.com/Copyright.htm for details. > E/VTK ( 7871): This software is distributed WITHOUT ANY WARRANTY; > without even > E/VTK ( 7871): the implied warranty of MERCHANTABILITY or FITNESS > FOR A PARTICULAR > E/VTK ( 7871): PURPOSE. See the above copyright notice for more > information. > E/VTK ( 7871): > =========================================================================*/ > E/VTK ( 7871): attribute vec4 vertexMC; > E/VTK ( 7871): // frag position in VC > E/VTK ( 7871): varying vec4 vertexVCVSOutput; > E/VTK ( 7871): // optional normal declaration > E/VTK ( 7871): attribute vec3 normalMC; > E/VTK ( 7871): uniform mat3 normalMatrix; > E/VTK ( 7871): varying vec3 normalVCVSOutput; > E/VTK ( 7871): // extra lighting parameters > E/VTK ( 7871): //VTK::Light::Dec > E/VTK ( 7871): // Texture coordinates > E/VTK ( 7871): //VTK::TCoord::Dec > E/VTK ( 7871): // material property values > E/VTK ( 7871): //VTK::Color::Dec > E/VTK ( 7871): // clipping plane vars > E/VTK ( 7871): //VTK::Clip::Dec > E/VTK ( 7871): // camera and actor matrix values > E/VTK ( 7871): uniform mat4 MCDCMatrix; > E/VTK ( 7871): uniform mat4 MCVCMatrix; > E/VTK ( 7871): // Apple Bug > E/VTK ( 7871): //VTK::PrimID::Dec > E/VTK ( 7871): void main() > E/VTK ( 7871): { > E/VTK ( 7871): //VTK::Color::Impl > E/VTK ( 7871): normalVCVSOutput = normalMatrix * normalMC; > E/VTK ( 7871): //VTK::TCoord::Impl > E/VTK ( 7871): //VTK::Clip::Impl > E/VTK ( 7871): //VTK::PrimID::Impl > E/VTK ( 7871): vertexVCVSOutput = MCVCMatrix * vertexMC; > E/VTK ( 7871): gl_Position = MCDCMatrix * vertexMC; > E/VTK ( 7871): //VTK::Light::Impl > E/VTK ( 7871): } > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1238 > E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): GS: > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1239 > E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): FS: > //VTK::System::Dec > E/VTK ( 7871): > /*========================================================================= > E/VTK ( 7871): Program: Visualization Toolkit > E/VTK ( 7871): Module: vtkPolyDataFS.glsl > E/VTK ( 7871): Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen > E/VTK ( 7871): All rights reserved. > E/VTK ( 7871): See Copyright.txt or > http://www.kitware.com/Copyright.htm for details. > E/VTK ( 7871): This software is distributed WITHOUT ANY WARRANTY; > without even > E/VTK ( 7871): the implied warranty of MERCHANTABILITY or FITNESS > FOR A PARTICULAR > E/VTK ( 7871): PURPOSE. See the above copyright notice for more > information. > E/VTK ( 7871): > =========================================================================*/ > E/VTK ( 7871): // Template for the polydata mappers fragment shader > E/VTK ( 7871): uniform int PrimitiveIDOffset; > E/VTK ( 7871): // VC position of this fragment > E/VTK ( 7871): varying vec4 vertexVCVSOutput; > I/tango ( 186): vio-fault-detector.cc:74 IMU and camera data quality are > qualified for VIO recovery. > W/tango ( 186): vio-status-monitor.cc:208 VIO is ready for reset. Current > timestamp 20626.498361783 > W/tango ( 186): vio-status-monitor.cc:93 VIO receives reasonable visual > and inertial data, try to reset now. > I/tango ( 186): vio-status-monitor.cc:97 Resetting with last good frame. > E/VTK ( 7871): // optional color passed in from the vertex shader, > vertexColor > E/VTK ( 7871): uniform float opacityUniform; // the fragment opacity > E/VTK ( 7871): uniform vec3 ambientColorUniform; // intensity weighted > color > E/VTK ( 7871): uniform vec3 diffuseColorUniform; // intensity weighted > color > E/VTK ( 7871): uniform vec3 specularColorUniform; // intensity weighted > color > E/VTK ( 7871): uniform float specularPowerUniform; > E/VTK ( 7871): // optional surface normal declaration > E/VTK ( 7871): varying vec3 normalVCVSOutput; > E/VTK ( 7871): // extra lighting parameters > E/VTK ( 7871): //VTK::Light::Dec > E/VTK ( 7871): // Texture coordinates > E/VTK ( 7871): //VTK::TCoord::Dec > E/VTK ( 7871): // picking support > E/VTK ( 7871): //VTK::Picking::Dec > E/VTK ( 7871): // Depth Peeling Support > E/VTK ( 7871): //VTK::DepthPeeling::Dec > E/VTK ( 7871): // clipping plane vars > E/VTK ( 7871): //VTK::Clip::Dec > E/VTK ( 7871): // the output of this shader > E/VTK ( 7871): //VTK::Output::Dec > E/VTK ( 7871): // Apple Bug > E/VTK ( 7871): //VTK::PrimID::Dec > E/VTK ( 7871): void main() > E/VTK ( 7871): { > E/VTK ( 7871): // Apple Bug > E/VTK ( 7871): //VTK::PrimID::Impl > E/VTK ( 7871): //VTK::Clip::Impl > E/VTK ( 7871): vec3 ambientColor; > E/VTK ( 7871): vec3 diffuseColor; > E/VTK ( 7871): float opacity; > E/VTK ( 7871): vec3 specularColor; > E/VTK ( 7871): float specularPower; > E/VTK ( 7871): ambientColor = ambientColorUniform; > E/VTK ( 7871): diffuseColor = diffuseColorUniform; > E/VTK ( 7871): opacity = opacityUniform; > E/VTK ( 7871): specularColor = specularColorUniform; > E/VTK ( 7871): specularPower = specularPowerUniform; > E/VTK ( 7871): // VC position of this fragment > E/VTK ( 7871): vec4 vertexVC = vertexVCVSOutput; > E/VTK ( 7871): // Generate the normal if we are not passed in one > E/VTK ( 7871): vec3 normalVCVSOutput = normalize(normalVCVSOutput); > E/VTK ( 7871): if (gl_FrontFacing == false) { normalVCVSOutput = > -normalVCVSOutput; } > E/VTK ( 7871): float df = max(0.0, normalVCVSOutput.z); > E/VTK ( 7871): float sf = pow(df, specularPower); > E/VTK ( 7871): vec3 diffuse = df * diffuseColor; > E/VTK ( 7871): vec3 specular = sf * specularColor; > E/VTK ( 7871): gl_FragData[0] = vec4(ambientColor + diffuse + > specular, opacity); > E/VTK ( 7871): //VTK::Light::Impl > E/VTK ( 7871): //VTK::TCoord::Impl > E/VTK ( 7871): if (gl_FragData[0].a <= 0.0) > E/VTK ( 7871): { > E/VTK ( 7871): discard; > E/VTK ( 7871): } > E/VTK ( 7871): //VTK::DepthPeeling::Impl > E/VTK ( 7871): //VTK::Picking::Impl > E/VTK ( 7871): } > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1421 > E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting > 'vertexMC' in shader VAO. > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1429 > E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting > 'normalMC' in shader VAO. > E/VTK ( 7871): ERROR: In > /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, > line 1237 > / > > Did I provide enough information? Please let me know if something is > missing. > > Have a nice day and thanks again > > > > -- > View this message in context: http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735161.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 > > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > If you reply to this email, your message will be added to the discussion below: > http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735198.html > To unsubscribe from Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY, click here . > NAML -- View this message in context: http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735213.html Sent from the VTK - Users mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bill.lorensen at gmail.com Thu Nov 26 07:59:21 2015 From: bill.lorensen at gmail.com (Bill Lorensen) Date: Thu, 26 Nov 2015 07:59:21 -0500 Subject: [vtkusers] vtkDiscreteMarchingCubes and vtkMarchingCubes do not handle sub-extents correctly In-Reply-To: <5656CA52.2090304@mh-hannover.de> References: <56546593.2070600@mh-hannover.de> <5655BFFF.4080009@mh-hannover.de> <5656CA52.2090304@mh-hannover.de> Message-ID: Contour filter uses SynchronizedTemplates. On Nov 26, 2015 4:01 AM, "Grothausmann, Roman Dr." < grothausmann.roman at mh-hannover.de> wrote: > Many thanks Bill for looking into this. I had a look at the code of > vtkContourFilter and vtk(Discrete)MarchingCubes. My guess was that > vtk(Discrete)MarchingCubes lacks an implementation of RequestUpdateExtent. > However, I'm not sufficiently familiar with VTK's streaming to create an > appropriate method, especially the changes for vtk-6.3 still confuse me. > > I've been wondering what is the difference between vtkMarchingCubes and > vtkContourFilter run on an image. So far I've thought that vtkContourFilter > runs vtkMarchingCubes when the input is an image, however the code of > vtkContourFilter does not refer to vtkMarchingCubes at all. Still, for a > binary image as input the results seem to be the same, aren't they? > > Again, many thanks for looking into this. > Roman > > On 25/11/15 21:58, Bill Lorensen wrote: > >> Roman, >> >> I think that only algorithms that implement ThreadedExecute() will >> properly work in your situation. vtkMarchingCubes and >> vtkDiscreteMarchingCubes do not implement that method. >> >> I suggest using vtkContourFilter instead of vtkMarchingCubes. There is >> no equivalent for vtkDiscreteMarchingCubes. >> >> Perhaps in the future I can look at DiscreteMarchingCubes. >> >> Bill >> >> On Wed, Nov 25, 2015 at 1:53 PM, Bill Lorensen >> wrote: >> >>> Roman, >>> >>> With your sample programs and my data, I can reproduce the bad results >>> for Marching and DiscreteCubes. (without ImagePad - that is another >>> issue). >>> >>> Now to find the bugs.... >>> >>> Bill >>> >>> On Wed, Nov 25, 2015 at 11:27 AM, Bill Lorensen >>> wrote: >>> >>>> Looks like a bug. I'll take a look. >>>> >>>> >>>> On Wed, Nov 25, 2015 at 9:04 AM, Grothausmann, Roman Dr. >>>> wrote: >>>> >>>>> I just noticed that vtkDiscreteMarchingCubes and also vtkMarchingCubes >>>>> do >>>>> not handle sub-extents correctly. It seems both filters do not handle >>>>> the >>>>> translation of each sub-extent. If the result is saved in a PVTP-file >>>>> and >>>>> opened in ParaView, the content of each VTP-file is placed over the >>>>> others. >>>>> In contrast vtkContourFilter does handle the translation of each >>>>> sub-extent >>>>> correctly, the content of each VTP-file is positioned correctly, see >>>>> e.g. >>>>> >>>>> https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/marching-cubes_MPI.cxx >>>>> >>>>> On 24/11/15 14:26, Grothausmann, Roman Dr. wrote: >>>>> >>>>>> >>>>>> Dear mailing list members, >>>>>> >>>>>> >>>>>> Trying to cap the output of vtkDiscreteMarchingCubes by applying >>>>>> vtkImageConstantPad on the input before does not work if running >>>>>> vtkStreamingDemandDrivenPipeline by e.g. a vtkMPIController. >>>>>> >>>>>> If I run this program with the parameter for capping, i.e. employing >>>>>> vtkImageConstantPad: >>>>>> >>>>>> >>>>>> https://github.com/romangrothausmann/VTK-CLIs/blob/9eac8644101360d18f2ff70928d457aabddbbbf0/discrete_marching-cubes_MPI.cxx#L90 >>>>>> >>>>>> >>>>>> I get an error such as: >>>>>> vtkImageData (0x1868190): GetScalarPointer: Pixel (0, 0, 341) not in >>>>>> memory. >>>>>> Current extent= (249, 499, 0, 479, 0, 429) >>>>>> >>>>>> It seems that vtkImageConstantPad processes the wrong sub-extent. >>>>>> Would >>>>>> that be >>>>>> a filter internal problem or of my code? >>>>>> >>>>>> Could the problem be related to the fact that I try to combine >>>>>> structured >>>>>> extent >>>>>> (Index (IJK) based, not using ghost levels) with piece-based extent >>>>>> that >>>>>> uses >>>>>> ghost levels? >>>>>> >>>>>> The problem even occurs when the extent is not extended at all. >>>>>> The program works as expected if vtkImageConstantPad is avoided. >>>>>> >>>>>> Any help or hints are very much appreciated >>>>>> Roman >>>>>> >>>>>> >>>>> -- >>>>> Dr. Roman Grothausmann >>>>> >>>>> Tomographie und Digitale Bildverarbeitung >>>>> Tomography and Digital Image Analysis >>>>> >>>>> Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 >>>>> Medizinische Hochschule Hannover >>>>> Carl-Neuberg-Str. 1 >>>>> D-30625 Hannover >>>>> >>>>> Tel. +49 511 532-2900 >>>>> _______________________________________________ >>>>> Powered by www.kitware.com >>>>> >>>>> Visit other Kitware open-source projects at >>>>> http://www.kitware.com/opensource/opensource.html >>>>> >>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>> http://www.vtk.org/Wiki/VTK_FAQ >>>>> >>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>>>> >>>>> Follow this link to subscribe/unsubscribe: >>>>> http://public.kitware.com/mailman/listinfo/vtkusers >>>>> >>>> >>>> >>>> >>>> -- >>>> Unpaid intern in BillsBasement at noware dot com >>>> >>> >>> >>> >>> -- >>> Unpaid intern in BillsBasement at noware dot com >>> >> >> >> >> > -- > Dr. Roman Grothausmann > > Tomographie und Digitale Bildverarbeitung > Tomography and Digital Image Analysis > > Institut f?r Funktionelle und Angewandte Anatomie, OE 4120 > Medizinische Hochschule Hannover > Carl-Neuberg-Str. 1 > D-30625 Hannover > > Tel. +49 511 532-2900 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joaorobertojr88 at gmail.com Thu Nov 26 10:33:42 2015 From: joaorobertojr88 at gmail.com (joaoroberto88) Date: Thu, 26 Nov 2015 08:33:42 -0700 (MST) Subject: [vtkusers] Get vtkCubeAxesActor exponent In-Reply-To: <1448479890658-5735194.post@n5.nabble.com> References: <1448479890658-5735194.post@n5.nabble.com> Message-ID: <1448552022000-5735216.post@n5.nabble.com> I tried to use method GetXLabelFormat() but it returns %.1 -- View this message in context: http://vtk.1045678.n5.nabble.com/Get-vtkCubeAxesActor-exponent-tp5735194p5735216.html Sent from the VTK - Users mailing list archive at Nabble.com. From ken.martin at kitware.com Thu Nov 26 13:00:26 2015 From: ken.martin at kitware.com (Ken Martin) Date: Thu, 26 Nov 2015 13:00:26 -0500 Subject: [vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY In-Reply-To: <58BF9B19-C5A4-4329-8EB8-F94BC2D28AA6@gmail.com> References: <1447844506521-5735057.post@n5.nabble.com> <1447855416009-5735062.post@n5.nabble.com> <1448041347199-5735143.post@n5.nabble.com> <1448297964515-5735161.post@n5.nabble.com> <58BF9B19-C5A4-4329-8EB8-F94BC2D28AA6@gmail.com> Message-ID: One other quick thought that came to me, android uses multiple threads/jobs by default and if I recall correctly we do something special in the java example (I forget if you are using java or pure native) to make sure the rendering happens in the right thread. Maybe your function is not calling render in the right thread? Might be worth a shot. I believe the code we use is something like the following in https://gitlab.kitware.com/vtk/vtk/blob/master/Examples/Android/JavaVTK/src/com/kitware/JavaVTK/JavaVTKView.java // forward events to rendering thread for it to handle public boolean onKeyUp(int keyCode, KeyEvent event) { final KeyEvent keyEvent = event; queueEvent(new Runnable() { public void run() { myRenderer.onKeyEvent(false, keyEvent); } }); return true; } THanks Ken On Thu, Nov 26, 2015 at 7:00 AM, Lonni Besan?on wrote: > Thanks again for your answer and the help you have provided once again. > > I?m afraid it cannot be a problem with the mapper as it is set before this > function is called ( I can check that easily because I use an other > function that does exactly what I want to do in terms of rotating and > translating an actor before I call this one ). > > One of the weird things is that the matrix is apparently modified because > I have tried to send it through UDP to an other machine to check if that > was working and apparently it is working (the matrix I receive is modified > it?s just that the rendering cannot be done for some unknown reason). > > Again, thanks for the help you have provided me so far, you have been more > than helpful. > > Contact me when you?re back and I could send you the whole project if > you?d like to take a better look at it (however be aware that I?m still > playing with vtk for android, so the code is not optimised at all but that > is not the point for the time being). > > Have a very nice holiday with your family (wish we had the equivalent of > Thanksgiving in France). > > > > *Best / Cordialement,* > > > *Lonni Besan?on* > *PhD Student with the *AVIZ * team at Inria and with > the *HAPCO > * team at Limsi/CNRS* > *Teaching Assistant at Polytech Paris Sud and Universit? Paris Sud* > *Address: University Paris-Saclay, Bat 660 (Digiteo) ? Office 1041* > > *Email: [hidden email] > * > > *Phone: target="_blank" style="color: rgb(17, 85, 204);" class="">+33689902815 > <%2B33689902815>* > WebPage: http://lonni.besancon.pagesperso-orange.fr > *LinkedIn: *fr.linkedin.com/pub/lonni-besan?on/77/552/a38/en > > > > > > > > > On 25 Nov 2015, at 23:30, Ken Martin [via VTK] <[hidden email] > > wrote: > > Thanks Lonni, > > The shaders look fine so I suspect what is happening is that somehow a > render is getting called when there is no data for the mapper. The "error > setting attribute" type problems stem from either the shader not actually > using the passed attribute or attempting to set the attribute with no data. > Looking at the shader the attributes are definitely being used which means > the error is maybe due to somehow setting the attribute with no data. Maybe > somehow the mapper is not setup yet when your new method is getting > called? I'm out for Thanksgiving the rest of the week but if you are still > stuck next week let me know and I can look a bit deeper. > > Thanks > Ken > > > On Mon, Nov 23, 2015 at 11:59 AM, Lonni Besan?on < href="x-msg://15/user/SendEmail.jtp?type=node&node=5735198&i=0" > target="_top" rel="nofollow" link="external" class="">[hidden email]> > wrote: > >> Sorry for the time I took to answer. I will update the post on SO. >> >> So here is the code I got from the error macro: >> /W/NativeVTK( 7871): rotation = 0.000000 ;;; 0.000000 ;;; 0.583755 >> E/VTK ( 7871): ERROR: In >> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, >> line 1237 >> E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): VS: >> //VTK::System::Dec >> E/VTK ( 7871): >> >> /*========================================================================= >> E/VTK ( 7871): Program: Visualization Toolkit >> E/VTK ( 7871): Module: vtkPolyDataVS.glsl >> E/VTK ( 7871): Copyright (c) Ken Martin, Will Schroeder, Bill >> Lorensen >> E/VTK ( 7871): All rights reserved. >> E/VTK ( 7871): See Copyright.txt or >> http://www.kitware.com/Copyright.htm for details. >> E/VTK ( 7871): This software is distributed WITHOUT ANY WARRANTY; >> without even >> E/VTK ( 7871): the implied warranty of MERCHANTABILITY or FITNESS >> FOR A PARTICULAR >> E/VTK ( 7871): PURPOSE. See the above copyright notice for more >> information. >> E/VTK ( 7871): >> >> =========================================================================*/ >> E/VTK ( 7871): attribute vec4 vertexMC; >> E/VTK ( 7871): // frag position in VC >> E/VTK ( 7871): varying vec4 vertexVCVSOutput; >> E/VTK ( 7871): // optional normal declaration >> E/VTK ( 7871): attribute vec3 normalMC; >> E/VTK ( 7871): uniform mat3 normalMatrix; >> E/VTK ( 7871): varying vec3 normalVCVSOutput; >> E/VTK ( 7871): // extra lighting parameters >> E/VTK ( 7871): //VTK::Light::Dec >> E/VTK ( 7871): // Texture coordinates >> E/VTK ( 7871): //VTK::TCoord::Dec >> E/VTK ( 7871): // material property values >> E/VTK ( 7871): //VTK::Color::Dec >> E/VTK ( 7871): // clipping plane vars >> E/VTK ( 7871): //VTK::Clip::Dec >> E/VTK ( 7871): // camera and actor matrix values >> E/VTK ( 7871): uniform mat4 MCDCMatrix; >> E/VTK ( 7871): uniform mat4 MCVCMatrix; >> E/VTK ( 7871): // Apple Bug >> E/VTK ( 7871): //VTK::PrimID::Dec >> E/VTK ( 7871): void main() >> E/VTK ( 7871): { >> E/VTK ( 7871): //VTK::Color::Impl >> E/VTK ( 7871): normalVCVSOutput = normalMatrix * normalMC; >> E/VTK ( 7871): //VTK::TCoord::Impl >> E/VTK ( 7871): //VTK::Clip::Impl >> E/VTK ( 7871): //VTK::PrimID::Impl >> E/VTK ( 7871): vertexVCVSOutput = MCVCMatrix * vertexMC; >> E/VTK ( 7871): gl_Position = MCDCMatrix * vertexMC; >> E/VTK ( 7871): //VTK::Light::Impl >> E/VTK ( 7871): } >> E/VTK ( 7871): ERROR: In >> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, >> line 1238 >> E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): GS: >> E/VTK ( 7871): ERROR: In >> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, >> line 1239 >> E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): FS: >> //VTK::System::Dec >> E/VTK ( 7871): >> >> /*========================================================================= >> E/VTK ( 7871): Program: Visualization Toolkit >> E/VTK ( 7871): Module: vtkPolyDataFS.glsl >> E/VTK ( 7871): Copyright (c) Ken Martin, Will Schroeder, Bill >> Lorensen >> E/VTK ( 7871): All rights reserved. >> E/VTK ( 7871): See Copyright.txt or >> http://www.kitware.com/Copyright.htm for details. >> E/VTK ( 7871): This software is distributed WITHOUT ANY WARRANTY; >> without even >> E/VTK ( 7871): the implied warranty of MERCHANTABILITY or FITNESS >> FOR A PARTICULAR >> E/VTK ( 7871): PURPOSE. See the above copyright notice for more >> information. >> E/VTK ( 7871): >> >> =========================================================================*/ >> E/VTK ( 7871): // Template for the polydata mappers fragment shader >> E/VTK ( 7871): uniform int PrimitiveIDOffset; >> E/VTK ( 7871): // VC position of this fragment >> E/VTK ( 7871): varying vec4 vertexVCVSOutput; >> I/tango ( 186): vio-fault-detector.cc:74 IMU and camera data quality >> are >> qualified for VIO recovery. >> W/tango ( 186): vio-status-monitor.cc:208 VIO is ready for reset. >> Current >> timestamp 20626.498361783 >> W/tango ( 186): vio-status-monitor.cc:93 VIO receives reasonable >> visual >> and inertial data, try to reset now. >> I/tango ( 186): vio-status-monitor.cc:97 Resetting with last good >> frame. >> E/VTK ( 7871): // optional color passed in from the vertex shader, >> vertexColor >> E/VTK ( 7871): uniform float opacityUniform; // the fragment opacity >> E/VTK ( 7871): uniform vec3 ambientColorUniform; // intensity weighted >> color >> E/VTK ( 7871): uniform vec3 diffuseColorUniform; // intensity weighted >> color >> E/VTK ( 7871): uniform vec3 specularColorUniform; // intensity >> weighted >> color >> E/VTK ( 7871): uniform float specularPowerUniform; >> E/VTK ( 7871): // optional surface normal declaration >> E/VTK ( 7871): varying vec3 normalVCVSOutput; >> E/VTK ( 7871): // extra lighting parameters >> E/VTK ( 7871): //VTK::Light::Dec >> E/VTK ( 7871): // Texture coordinates >> E/VTK ( 7871): //VTK::TCoord::Dec >> E/VTK ( 7871): // picking support >> E/VTK ( 7871): //VTK::Picking::Dec >> E/VTK ( 7871): // Depth Peeling Support >> E/VTK ( 7871): //VTK::DepthPeeling::Dec >> E/VTK ( 7871): // clipping plane vars >> E/VTK ( 7871): //VTK::Clip::Dec >> E/VTK ( 7871): // the output of this shader >> E/VTK ( 7871): //VTK::Output::Dec >> E/VTK ( 7871): // Apple Bug >> E/VTK ( 7871): //VTK::PrimID::Dec >> E/VTK ( 7871): void main() >> E/VTK ( 7871): { >> E/VTK ( 7871): // Apple Bug >> E/VTK ( 7871): //VTK::PrimID::Impl >> E/VTK ( 7871): //VTK::Clip::Impl >> E/VTK ( 7871): vec3 ambientColor; >> E/VTK ( 7871): vec3 diffuseColor; >> E/VTK ( 7871): float opacity; >> E/VTK ( 7871): vec3 specularColor; >> E/VTK ( 7871): float specularPower; >> E/VTK ( 7871): ambientColor = ambientColorUniform; >> E/VTK ( 7871): diffuseColor = diffuseColorUniform; >> E/VTK ( 7871): opacity = opacityUniform; >> E/VTK ( 7871): specularColor = specularColorUniform; >> E/VTK ( 7871): specularPower = specularPowerUniform; >> E/VTK ( 7871): // VC position of this fragment >> E/VTK ( 7871): vec4 vertexVC = vertexVCVSOutput; >> E/VTK ( 7871): // Generate the normal if we are not passed in one >> E/VTK ( 7871): vec3 normalVCVSOutput = normalize(normalVCVSOutput); >> E/VTK ( 7871): if (gl_FrontFacing == false) { normalVCVSOutput = >> -normalVCVSOutput; } >> E/VTK ( 7871): float df = max(0.0, normalVCVSOutput.z); >> E/VTK ( 7871): float sf = pow(df, specularPower); >> E/VTK ( 7871): vec3 diffuse = df * diffuseColor; >> E/VTK ( 7871): vec3 specular = sf * specularColor; >> E/VTK ( 7871): gl_FragData[0] = vec4(ambientColor + diffuse + >> specular, opacity); >> E/VTK ( 7871): //VTK::Light::Impl >> E/VTK ( 7871): //VTK::TCoord::Impl >> E/VTK ( 7871): if (gl_FragData[0].a <= 0.0) >> E/VTK ( 7871): { >> E/VTK ( 7871): discard; >> E/VTK ( 7871): } >> E/VTK ( 7871): //VTK::DepthPeeling::Impl >> E/VTK ( 7871): //VTK::Picking::Impl >> E/VTK ( 7871): } >> E/VTK ( 7871): ERROR: In >> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, >> line 1421 >> E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting >> 'vertexMC' in shader VAO. >> E/VTK ( 7871): ERROR: In >> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, >> line 1429 >> E/VTK ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting >> 'normalMC' in shader VAO. >> E/VTK ( 7871): ERROR: In >> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx, >> line 1237 >> / >> >> Did I provide enough information? Please let me know if something is >> missing. >> >> Have a nice day and thanks again >> >> >> >> -- >> View this message in context: >> http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735161.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 >> > > > > -- > Ken Martin PhD > Chairman & CFO > Kitware Inc. > 28 Corporate Drive > Clifton Park NY 12065 > 518 371 3971 > > This communication, including all attachments, contains confidential and > legally privileged information, and it is intended only for the use of the > addressee. Access to this email by anyone else is unauthorized. If you are > not the intended recipient, any disclosure, copying, distribution or any > action taken in reliance on it is prohibited and may be unlawful. If you > received this communication in error please notify us immediately and > destroy the original message. Thank you. > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735198.html > To unsubscribe from Error setting 'vertexMC' in shader VAO and > EGL_BAD_DISPLAY, click here. > NAML > > > > > ------------------------------ > View this message in context: Re: Error setting 'vertexMC' in shader VAO > and EGL_BAD_DISPLAY > > 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 > > -- Ken Martin PhD Chairman & CFO Kitware Inc. 28 Corporate Drive Clifton Park NY 12065 518 371 3971 This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ns451 at srcf.net Thu Nov 26 18:44:05 2015 From: ns451 at srcf.net (ns451 at srcf.net) Date: Thu, 26 Nov 2015 23:44:05 -0000 Subject: [vtkusers] Update extent outside whole extent Message-ID: Hello, I recently came across the above error, so wrote a toy script to narrow it down: https://gist.github.com/55e045ab8fea8960749a.git The error message when I run that script (with the 'bad' input) is: "ERROR: In ...\Common\ExecutionModel\vtkStreamingDemandDrivenPipeline.cxx, line 857 vtkCompositeDataPipeline (...): The update extent specified in the information for output port 0 on algorithm vtkStructuredGrid(...) is 0 69 0 4 0 2, which is outside the whole extent 0 27 0 23 0 16." I think that vtkProbeFilter::RequestUpdateExtent should set the update extent of the source to the source's whole extent, because it has nothing to do with the update extent of the input or output. The following patch to vtkProbeFilter.cxx fixes the error from the toy script, but I'm not sure whether it should go elsewhere in the function. 700,702d699 < sourceInfo->Set( < vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), < sourceInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT()), 6); Cheers, Nishad. From laysrodriguessilva at gmail.com Thu Nov 26 20:41:33 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Thu, 26 Nov 2015 23:41:33 -0200 Subject: [vtkusers] Draw objects inside a cube Message-ID: Hi guys, I would like to know, how is the better way to make with VTK a 3D enviroment like the image bellow: http://airwolf3d.com/wp-content/uploads/2013/08/3d-printer-repetier7.jpg Inside this cube i will load STL and Gcode files. Inside my qtApp i'm already capable to load this files, but now i need to make this cube and set some configs on lightning, camera and other stuff. Any tips will help. Thanks -- __ *Lays Rodrigues* *Front-End Developer at Br-Print3D Project(KDE)* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From nico.schloemer at gmail.com Thu Nov 26 20:45:49 2015 From: nico.schloemer at gmail.com (=?UTF-8?Q?Nico_Schl=C3=B6mer?=) Date: Fri, 27 Nov 2015 01:45:49 +0000 Subject: [vtkusers] import vtkXdmf? Message-ID: Hi everyone, I'd like to use the Xdmf{Reader,Writer} from within Python. Which VTK version do I need, what do I need to `import`? Cheers, Nico [1] http://www.vtk.org/doc/nightly/html/classvtkXdmfWriter.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From laysrodriguessilva at gmail.com Thu Nov 26 23:12:57 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Fri, 27 Nov 2015 02:12:57 -0200 Subject: [vtkusers] Review Request Message-ID: Hi folks! I woul like to request a review in the code that i made today. Working with two actors. The code is on this link: http://pastebin.com/1DGDmn9D Questions: - Is there a better way to do this drawCube function? - When i remove a actor, i need to delete the mapper to? - I'm using the QVTKWidget class, and i know that this class is deprecated, but i dont find tutorials on how to pass this code to use QVTKWidget2, any help on that? -Inside my QtApp, the 3DView have a slow that i dont understand. When i click to rotate the object, the view have delays. Any tips about this problem? Sorry about my english, i'm still learning how to write... Thanks for the help! -- __ *Lays Rodrigues* *Front-End Developer at Br-Print3D Project(KDE)* *Student of Computer Science at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Fri Nov 27 04:37:49 2015 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Fri, 27 Nov 2015 02:37:49 -0700 (MST) Subject: [vtkusers] If ID not exist by using polydata.GetCellPoints(id, idList) Message-ID: <1448617069545-5735223.post@n5.nabble.com> Hi, If the *ID* does not exist in polydata.GetCellPoints(*id*, idList), there is a way to trap it? -- View this message in context: http://vtk.1045678.n5.nabble.com/If-ID-not-exist-by-using-polydata-GetCellPoints-id-idList-tp5735223.html Sent from the VTK - Users mailing list archive at Nabble.com. From fepegar at gmail.com Fri Nov 27 06:15:55 2015 From: fepegar at gmail.com (=?UTF-8?B?RmVybmFuZG8gUMOpcmV6LUdhcmPDrWE=?=) Date: Fri, 27 Nov 2015 12:15:55 +0100 Subject: [vtkusers] vtkSmoothPolyDataFilter doesn't smooth much Message-ID: Dear VTK experts, This is my first post here. I'm trying to smooth a mesh created from a mask. I've tried different parameters but I don't get the result I want, some vertices don't move at all! I attach ?snaps from the original ? mesh? , the poor result I get from VTK and the one that's looks good, which I got using the Laplacian filter in MeshLab. This is my code: reader = vtk.vtkPolyDataReader() reader.SetFileName(meshInputPath) reader.Update() mesh = reader.GetOutput() smoothFilter = vtk.vtkSmoothPolyDataFilter() smoothFilter.SetNumberOfIterations(500) smoothFilter.SetInput(mesh) smoothFilter.Update() writer = vtk.vtkPolyDataWriter() writer.SetInput(smoothFilter.GetOutput()) writer.SetFileName(meshOutputPath) writer.Write() Do you know what I'm doing wrong? Thank you, Fernando -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: meshLabResult.png Type: image/png Size: 72953 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: original.png Type: image/png Size: 32530 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: vtkResult.png Type: image/png Size: 70053 bytes Desc: not available URL: From DLRdave at aol.com Fri Nov 27 09:09:10 2015 From: DLRdave at aol.com (David Cole) Date: Fri, 27 Nov 2015 09:09:10 -0500 Subject: [vtkusers] vtkSmoothPolyDataFilter doesn't smooth much In-Reply-To: References: Message-ID: Try applying a vtkPolyDataNormals filter after smoothing, as demonstrated in this example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SmoothPolyDataFilter This was a months-long frustration for my team, before we finally realized it simply needed recomputed normals to render properly. Hope this helps, David C. On Friday, November 27, 2015, Fernando P?rez-Garc?a wrote: > Dear VTK experts, > > This is my first post here. I'm trying to smooth a mesh created from a > mask. I've tried different parameters but I don't get the result I want, > some vertices don't move at all! > > I attach > ?snaps from the > original > ? mesh? > , the poor result I get from VTK and the one that's looks good, which I > got using the Laplacian filter in MeshLab. > > > This is my code: > > reader = vtk.vtkPolyDataReader() > > reader.SetFileName(meshInputPath) > > reader.Update() > > > mesh = reader.GetOutput() > > > smoothFilter = vtk.vtkSmoothPolyDataFilter() > > smoothFilter.SetNumberOfIterations(500) > > smoothFilter.SetInput(mesh) > > smoothFilter.Update() > > > writer = vtk.vtkPolyDataWriter() > > writer.SetInput(smoothFilter.GetOutput()) > > writer.SetFileName(meshOutputPath) > > writer.Write() > > > Do you know what I'm doing wrong? > > > Thank you, > > Fernando > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From DLRdave at aol.com Fri Nov 27 09:13:56 2015 From: DLRdave at aol.com (David Cole) Date: Fri, 27 Nov 2015 09:13:56 -0500 Subject: [vtkusers] If ID not exist by using polydata.GetCellPoints(id, idList) In-Reply-To: <1448617069545-5735223.post@n5.nabble.com> References: <1448617069545-5735223.post@n5.nabble.com> Message-ID: Is the ID >= 0 and < GetNumberOfCells()? http://www.vtk.org/doc/nightly/html/classvtkPolyData.html#afde12e866490602e0c55daccfd5fb6e0 If so, then it should be a valid existing ID... HTH, David C. On Friday, November 27, 2015, -Daniel- wrote: > Hi, > > If the *ID* does not exist in polydata.GetCellPoints(*id*, idList), there > is > a way to trap it? > > > > > > -- > View this message in context: > http://vtk.1045678.n5.nabble.com/If-ID-not-exist-by-using-polydata-GetCellPoints-id-idList-tp5735223.html > Sent from the VTK - Users mailing list archive at Nabble.com. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fepegar at gmail.com Fri Nov 27 09:54:45 2015 From: fepegar at gmail.com (=?UTF-8?B?RmVybmFuZG8gUMOpcmV6LUdhcmPDrWE=?=) Date: Fri, 27 Nov 2015 15:54:45 +0100 Subject: [vtkusers] vtkSmoothPolyDataFilter doesn't smooth much In-Reply-To: References: Message-ID: Hi David, Thanks for your response. I just tried that and I got the same result. Any other ideas? Fernando 2015-11-27 15:09 GMT+01:00 David Cole : > Try applying a vtkPolyDataNormals filter after smoothing, as demonstrated > in this example: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SmoothPolyDataFilter > > This was a months-long frustration for my team, before we finally realized > it simply needed recomputed normals to render properly. > > > Hope this helps, > David C. > > > On Friday, November 27, 2015, Fernando P?rez-Garc?a > wrote: > >> Dear VTK experts, >> >> This is my first post here. I'm trying to smooth a mesh created from a >> mask. I've tried different parameters but I don't get the result I want, >> some vertices don't move at all! >> >> I attach >> ?snaps from the >> original >> ? mesh? >> , the poor result I get from VTK and the one that's looks good, which I >> got using the Laplacian filter in MeshLab. >> >> >> This is my code: >> >> reader = vtk.vtkPolyDataReader() >> >> reader.SetFileName(meshInputPath) >> >> reader.Update() >> >> >> mesh = reader.GetOutput() >> >> >> smoothFilter = vtk.vtkSmoothPolyDataFilter() >> >> smoothFilter.SetNumberOfIterations(500) >> >> smoothFilter.SetInput(mesh) >> >> smoothFilter.Update() >> >> >> writer = vtk.vtkPolyDataWriter() >> >> writer.SetInput(smoothFilter.GetOutput()) >> >> writer.SetFileName(meshOutputPath) >> >> writer.Write() >> >> >> Do you know what I'm doing wrong? >> >> >> Thank you, >> >> Fernando >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From kavyabellur.4 at gmail.com Fri Nov 27 12:52:11 2015 From: kavyabellur.4 at gmail.com (Kavya Bellur Padmesh) Date: Fri, 27 Nov 2015 10:52:11 -0700 Subject: [vtkusers] Set Frustum for movement of actors Message-ID: Hello David, I really need to find a way how to set frustum of VTK. My problem is, currently trying to interface Haptic device(OpenHaptics) with VTK6.2 with Qt5.5.0. I am able to get position of haptics and move the actor(matchstick shaped) inside the VTK. But I am not able to restrict the movement of actor(Haptic device pointer) within small view volume. Is this scaling need to be done on VTKrenderwindow interactor ? Or any additional VTK cursor must be attached? I have set projection view, model view and viewport for the application. Still not able to scale the movement of haptic cursor? Kindly let me know if you need further description. Regards, Kavya -------------- next part -------------- An HTML attachment was scrubbed... URL: From dkxls23 at gmail.com Fri Nov 27 17:57:46 2015 From: dkxls23 at gmail.com (Armin Wehrfritz) Date: Sat, 28 Nov 2015 00:57:46 +0200 Subject: [vtkusers] import vtkXdmf? In-Reply-To: References: Message-ID: <5658DFEA.5050006@gmail.com> Hi Nico, I posted some time ago a script on the ParaView mailing-list that shows you how to use the XDMF reader from python. Here the link to the conversation (the link to the script is at the bottom of that page): http://public.kitware.com/pipermail/paraview/2015-March/033718.html At the time I was using VTK 6.2 and the "old" XDMF reader (i.e. xdmf2 in the VTK naming scheme), but this should also work with VTK 6.3 the same way. Cheers, Armin On 11/27/2015 03:45 AM, Nico Schl?mer wrote: > Hi everyone, > > I'd like to use the Xdmf{Reader,Writer} from within Python. Which VTK > version do I need, what do I need to `import`? > > Cheers, Nico > > > [1] http://www.vtk.org/doc/nightly/html/classvtkXdmfWriter.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: > http://public.kitware.com/mailman/listinfo/vtkusers > From pedropaulobmjr at hotmail.com Sat Nov 28 03:06:17 2015 From: pedropaulobmjr at hotmail.com (Pedro Paulo) Date: Sat, 28 Nov 2015 08:06:17 +0000 Subject: [vtkusers] vtkPNGWriter Message-ID: Hi, how can I save a image to a specific directory using vtkPNGWriter? Because using Write(), it saves in the same directory.Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ich_daniel at habmalnefrage.de Sat Nov 28 04:48:22 2015 From: ich_daniel at habmalnefrage.de (-Daniel-) Date: Sat, 28 Nov 2015 02:48:22 -0700 (MST) Subject: [vtkusers] If ID not exist by using polydata.GetCellPoints(id, idList) In-Reply-To: References: <1448617069545-5735223.post@n5.nabble.com> Message-ID: <1448704102617-5735233.post@n5.nabble.com> Oh of course, sometimes you can't see the wood for the trees. :) Thanks! -- View this message in context: http://vtk.1045678.n5.nabble.com/If-ID-not-exist-by-using-polydata-GetCellPoints-id-idList-tp5735223p5735233.html Sent from the VTK - Users mailing list archive at Nabble.com. From goretzki.imre at gmail.com Sat Nov 28 09:42:26 2015 From: goretzki.imre at gmail.com (Imre Goretzki) Date: Sat, 28 Nov 2015 15:42:26 +0100 Subject: [vtkusers] Using ImagePlaneWidget to display 3D Images Message-ID: <5659BD52.8010107@gmail.com> Hey guys I have some trouble displaying a 3D Image (multipaged tif) via VTK. My Setup: grayscale image (520x520x47) Single slice (1 to 47) is an image (520x520) reading via ITK works great, I even can display 2D images using the ImageToVTKImageFilter Now the problem: I tried to connect the ITK image with VTK to visualize the image. I use the ImageToVTKImageFilter to connect ITK with VTK. Displaying 2D images (a single slice of the whole image) works, but i dont know how to display the 3D volume. For reference, I tried to change these examples to work with the connector type: http://itk.org/Wiki/ITK/Examples/ImageProcessing/MinimumMaximumImageCalculator http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/ImagePlaneWidget My code: void MainWindow::displayOriginalImage(PointerImage3D img) { typedef itk::ImageToVTKImageFilter TemplatedConnectorType; TemplatedConnectorType::Pointer con = TemplatedConnectorType::New(); con->SetInput(img); cout << "1" << endl; // vtkSmartPointer mapper = vtkSmartPointer::New(); cout << "2" << endl; vtkSmartPointer actor = vtkSmartPointer::New(); try { con->Update(); } catch (itk::ExceptionObject &e) { cerr << e << endl; } actor->GetMapper()->SetInputData(con->GetOutput()); cout << "3" << endl; // mapper->SetInputConnection(con->GetOutputPort()); cout << "4" << endl; // actor->SetMapper(mapper); vtkSmartPointer renderer = vtkSmartPointer::New(); vtkSmartPointer wnd = vtkSmartPointer::New(); wnd->AddRenderer(renderer); renderer->AddActor(actor); vtkSmartPointer wndInteractor = vtkSmartPointer::New(); wndInteractor->SetRenderWindow(wnd); vtkSmartPointer styler = vtkSmartPointer::New(); wndInteractor->SetInteractorStyle(styler); vtkSmartPointer planeWidget = vtkSmartPointer::New(); cout << "5" << endl; planeWidget->SetInputData(con->GetOutput()); cout << "6" << endl; planeWidget->SetInteractor(wndInteractor); double origin[3] = {0,1,0}; planeWidget->SetOrigin(origin); planeWidget->UpdatePlacement(); // renderer->ResetCamera(); wnd->Render(); wndInteractor->Initialize(); wnd->Render(); cout << "7" << endl; planeWidget->On(); cout << "8" << endl; wndInteractor->Start(); } If I do this, all I get is a white image. May to tell me, what I'm doing wrong? In case that you wonder, why I print out the numbers: Between 1 and 2: If I enable this, the compiler says that the line between 3 and 4 is a invalid use of the mapper. Between 7 and 8: I have to set the input data or connection (between 5 and 6) in order to make the planeWidget->On() work (the widget tries to access indices that do not exist, because there is no connection or data, that is what I guess) Thank you, Imre From DLRdave at aol.com Sat Nov 28 10:19:31 2015 From: DLRdave at aol.com (David Cole) Date: Sat, 28 Nov 2015 10:19:31 -0500 Subject: [vtkusers] vtkPNGWriter In-Reply-To: References: Message-ID: Can you call SetFileName with the full path to the file before calling Write? On Saturday, November 28, 2015, Pedro Paulo wrote: > Hi, how can I save a image to a specific directory using vtkPNGWriter? > Because using Write(), it saves in the same directory. > Thanks. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From laysrodriguessilva at gmail.com Sat Nov 28 17:14:08 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Sat, 28 Nov 2015 20:14:08 -0200 Subject: [vtkusers] Lightning and Shadows Message-ID: Hi guys, Good night! How to change the lightning when the camera moves? I dont know if i'm very clear. In a few words, i want turn this: http://pt-br.tinypic.com/r/iw7j3t/9 To something like that: http://pt-br.tinypic.com/r/o8h4kh/9 I want to improve the renderization of the objects. I want more quality. And it seems to me, that i need to start in setting the right lightning. Thanks -- __ *Lays Rodrigues* *Front-End Developer at Br-Print3D Project(KDE)* *Computer Science Student at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d www.brprint3d.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nico.schloemer at gmail.com Sun Nov 29 08:02:25 2015 From: nico.schloemer at gmail.com (=?UTF-8?Q?Nico_Schl=C3=B6mer?=) Date: Sun, 29 Nov 2015 13:02:25 +0000 Subject: [vtkusers] ImportError: No module named vtkIOXdmf3Python Message-ID: Hi everyone, I'm setting up nightly VTK builds on launchpad [1] for everyone to consume, but I'm still running into issues with Xdmf3 in Python: ``` >> import vtk.vtkIOXdmf3 --------------------------------------------------------------------------- ImportError Traceback (most recent call last) in () ----> 1 import vtk.vtkIOXdmf3 /usr/lib/python2.7/dist-packages/vtk/__init__.py in () 133 from .vtkIOVideo import * 134 from .vtkIOXdmf2 import * --> 135 from .vtkIOXdmf3 import * 136 from .vtkImagingMath import * 137 from .vtkImagingMorphological import * /usr/lib/python2.7/dist-packages/vtk/vtkIOXdmf3.py in () 7 # during build and testing, the modules will be elsewhere, 8 # e.g. in lib directory or Release/Debug config directories ----> 9 from vtkIOXdmf3Python import * ImportError: No module named vtkIOXdmf3Python ``` The build goes through cleanly [2], but I might be missing something. Any hints? Cheers, Nico [1] https://launchpad.net/~nschloe/+archive/ubuntu/vtk-nightly/+packages [2] https://launchpadlibrarian.net/227884889/buildlog_ubuntu-wily-amd64.vtk6_6.3.0~20151129002859-wily1_BUILDING.txt.gz -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at cascadeacoustic.com Sun Nov 29 08:29:53 2015 From: mark at cascadeacoustic.com (Mark DeArman) Date: Sun, 29 Nov 2015 07:29:53 -0600 Subject: [vtkusers] VTK ActiViz 6.2 Native WPF Render Window Message-ID: <9e28fab91c6e461e9cf716929013365c@cascadeacoustic.com> If anyone else has been following my recent work with ActiViz, I thought I would share my native WPF RenderWindow host. This also borrows some work done by the guys with Gemini Project which can be found on NuGet. I have marked the appropriate files with their copyright marks. The idea behind this HelloWorld program was to segment ActiViz to fit with the normal WPF MVVM datamodel. ClippingHwndHost can be used in XAML markup to place the Render window in the object tree. The Content property on the ClippingHwndHost can be databound to the VtkRenderWindowControl. VtkRenderWindowControl can be placed in the viewmodel and has access to the underlying vtkRenderWindow. This is just a starting place, but most of the hard work is done. Just hook up the services you need by overriding the appropriate methods. It is a little more elegant than other methods I've seen online and doesn't suffer from clipping issues when hosted inside a MDI docking window environment. It might also make more sense to rearrange things a bit to keep the actual render Window on the View side and only bind data objects, have fun. Download link is bellow. https://onedrive.live.com/redir?resid=C21891647818579A!179950&authkey=!AL0zh L3z_VE6EWg&ithint=file%2czip Mark DeArman Cascade Acoustic Research http://www.cascadeacoustic.com (253) 200-5353 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sam24666806 at gmail.com Mon Nov 30 02:59:27 2015 From: sam24666806 at gmail.com (LaChen) Date: Mon, 30 Nov 2015 00:59:27 -0700 (MST) Subject: [vtkusers] DICOM Reader Problem Message-ID: <1448870367513-5735239.post@n5.nabble.com> Hi, all. I have some questions about vtk dicom reader. i. Can I get header of one of slices reading by dicom reader? I need to get precise position of slice. ii. Is overlay function supporting by the dicom reader? I maybe encounter it in future. Thanks. -- View this message in context: http://vtk.1045678.n5.nabble.com/DICOM-Reader-Problem-tp5735239.html Sent from the VTK - Users mailing list archive at Nabble.com. From sam24666806 at gmail.com Mon Nov 30 03:06:37 2015 From: sam24666806 at gmail.com (LaChen) Date: Mon, 30 Nov 2015 01:06:37 -0700 (MST) Subject: [vtkusers] Review Request In-Reply-To: References: Message-ID: <1448870797603-5735240.post@n5.nabble.com> Lays Rodrigues wrote > Hi folks! > I woul like to request a review in the code that i made today. Working > with > two actors. > > The code is on this link: http://pastebin.com/1DGDmn9D > > Questions: > - Is there a better way to do this drawCube function? > - When i remove a actor, i need to delete the mapper to? > - I'm using the QVTKWidget class, and i know that this class is > deprecated, > but i dont find tutorials on how to pass this code to use QVTKWidget2, any > help on that? > -Inside my QtApp, the 3DView have a slow that i dont understand. When i > click to rotate the object, the view have delays. Any tips about this > problem? > > Sorry about my english, i'm still learning how to write... > Thanks for the help! > > -- > __ > *Lays Rodrigues* > *Front-End Developer at Br-Print3D Project(KDE)* > *Student of Computer Science at UFF/PURO* > Organizadora da Semana da Computa??o UFF-PURO > www.facebook.com/semanacomputacaopuro > www.facebook.com/brprint3d > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > 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 Hi, I had been trace the codes about QVTKWidget and QVTKWidget2. I remember the difference between them is OnPaint function. So, you can use QVTKWidget2 just like QVTKWidget. You can try to promote your QTWidget to QVTKWidget2 on QT Designer. I remember it's work. But please note that, you can't use QVTKWidget and QOpenGLWidget(Qt5.5) at same UI. It will crash. B.R. LaChen. -- View this message in context: http://vtk.1045678.n5.nabble.com/Review-Request-tp5735221p5735240.html Sent from the VTK - Users mailing list archive at Nabble.com. From adufour at pasteur.fr Mon Nov 30 05:33:14 2015 From: adufour at pasteur.fr (Alexandre Dufour) Date: Mon, 30 Nov 2015 11:33:14 +0100 Subject: [vtkusers] vtkSmoothPolyDataFilter doesn't smooth much In-Reply-To: References: Message-ID: Hi, I actually had the same impression myself, but noticed that the normals are also ok. What changed things *dramatically* were the options on the smoother, notably these 3: smoothFilter->SetRelaxationFactor(0.1); smoothFilter->FeatureEdgeSmoothingOff(); smoothFilter->BoundarySmoothingOn(); Now, only a dozen iterations are enough where I needed a few hundreds! This could be something to check? Alexandre On 27 Nov 2015, at 15:54, Fernando P?rez-Garc?a wrote: > Hi David, > > Thanks for your response. I just tried that and I got the same result. Any other ideas? > > > Fernando > > 2015-11-27 15:09 GMT+01:00 David Cole : > Try applying a vtkPolyDataNormals filter after smoothing, as demonstrated in this example: > > http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/SmoothPolyDataFilter > > This was a months-long frustration for my team, before we finally realized it simply needed recomputed normals to render properly. > > > Hope this helps, > David C. > > > On Friday, November 27, 2015, Fernando P?rez-Garc?a wrote: > Dear VTK experts, > > This is my first post here. I'm trying to smooth a mesh created from a mask. I've tried different parameters but I don't get the result I want, some vertices don't move at all! > > I attach ?snaps from the original? mesh?, the poor result I get from VTK and the one that's looks good, which I got using the Laplacian filter in MeshLab. > > > This is my code: > > reader = vtk.vtkPolyDataReader() > reader.SetFileName(meshInputPath) > reader.Update() > > mesh = reader.GetOutput() > > smoothFilter = vtk.vtkSmoothPolyDataFilter() > smoothFilter.SetNumberOfIterations(500) > smoothFilter.SetInput(mesh) > smoothFilter.Update() > > writer = vtk.vtkPolyDataWriter() > writer.SetInput(smoothFilter.GetOutput()) > writer.SetFileName(meshOutputPath) > writer.Write() > > > Do you know what I'm doing wrong? > > > Thank you, > > Fernando > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Mon Nov 30 10:14:22 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Mon, 30 Nov 2015 10:14:22 -0500 Subject: [vtkusers] Add multiple vtkVolume in vtkAssembly In-Reply-To: References: <1448444300373-5735182.post@n5.nabble.com> <1448495400772-5735201.post@n5.nabble.com> Message-ID: Closing this thread as the problem is solved now (please see below). Thanks to Vincent for trying the code and switching to OpenGL2 backend. ---- Hi Aashish, Thanks a lot and sorry for my late reply. I have rebuilt the vtk 6.2.0 with OpenGL2 backend. I am running VTK on Windows 8.1 with Nvidia Geforce 830m using the latest version of driver (Version 359.00). However, considering that you might be using vtk 6.3.0, i have rebuilt the library and applied OpenGL2 as backend and now it works. I definitely owe you a lot in making it works. Much thanks for your helps. Best regards, Vincent On Wed, Nov 25, 2015 at 11:25 PM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Hi Vincent, > > I am seeing some other issue but not the issue you are talking about using > the source code you attached. Can you share some more sceenshots? You can > send them directly to my email address. > > Thanks, > > > > > On Wed, Nov 25, 2015 at 10:58 PM, vincentTan < > sin-chia.vincent-tan at vitrox.com> wrote: > >> Hi Aashish, >> >> Thanks a lot for your help. >> >> I have added in the code snippet that you have provided but yet the >> problem still persists. >> Any idea how?? >> >> Thanks a lot for your much needed helps. >> Vincent >> >> On Thu, Nov 26, 2015 at 11:41 AM, Aashish Chaudhary-2 [via VTK] <[hidden >> email] > wrote: >> >>> Hi Vincent, >>> >>> Thanks for the feedback. If they are not overlapping in physical space >>> then you can do something like this (basically turn on the SortingStyle to >>> BackToFront) >>> >>> ren1->GetCullers()->InitTraversal(); >>> vtkCuller *culler=ren1->GetCullers()->GetNextItem(); >>> >>> vtkFrustumCoverageCuller >>> *fc=vtkFrustumCoverageCuller::SafeDownCast(culler); >>> if(fc!=0) >>> { >>> fc->SetSortingStyleToBackToFront(); >>> } >>> else >>> { >>> cout<<"culler is not a vtkFrustumCoverageCuller"<>> } >>> >>> >>> >>> >>> On Wed, Nov 25, 2015 at 9:56 PM, vincentTan <[hidden email] >>> > wrote: >>> >>>> Hi Aashish, >>>> >>>> Thanks a lot for your helps. It works but if possible, is there any >>>> solution for the see through effect below: >>>> [image: Inline image 2] >>>> >>>> FYI, i have added another vtkVolumeMapper and vtkVolume using the same >>>> source in your code. However, as you have seen it in the image, at certain >>>> angle where both of the objects are overlapped, you could see that the >>>> object located behind could be seen through. In addition, the object in >>>> front is the second vtkVolume that is created and added into vtkAssembly. >>>> >>>> Thanks a lot. Appreciate your great helps. >>>> Vincent >>>> >>>> On Thu, Nov 26, 2015 at 9:34 AM, Vincent Tan Sin Chia <[hidden email] >>>> > wrote: >>>> >>>>> Hi Aashish, >>>>> >>>>> Thanks a lot for your help. >>>>> Will get back to you once i tested it out. >>>>> >>>>> Thanks a lot. >>>>> Vincent >>>>> >>>>> On Thu, Nov 26, 2015 at 8:51 AM, Aashish Chaudhary-2 [via VTK] <[hidden >>>>> email] > wrote: >>>>> >>>>>> Hi Vincent, >>>>>> >>>>>> I modified one of the test (attached) and tried vtkAssembly and it >>>>>> worked for me on Ubuntu 14.* using OpenGL2 backend. Can you try this test >>>>>> and see if it works for you as well? If you using OpenGL1 backend, I would >>>>>> hope it should work as well since I believe vtkAssembly code has not >>>>>> changed as much. >>>>>> >>>>>> Thanks, >>>>>> >>>>>> >>>>>> On Wed, Nov 25, 2015 at 6:50 PM, vincentTan <[hidden email] >>>>>> > wrote: >>>>>> >>>>>>> Hi Aashish, >>>>>>> >>>>>>> Thanks a lot for your reply. >>>>>>> Ya, i am trying to render multiple volumes in one go. In my case, i >>>>>>> would >>>>>>> like to have two or possibly more vtkVolume in a vtkAssembly so that >>>>>>> a >>>>>>> global transformation on them would be applied as to treat those >>>>>>> volumes as >>>>>>> one unit. >>>>>>> >>>>>>> Besides, I have one class designed to keep track of each individual >>>>>>> volume >>>>>>> with its vtkImageData, vtkVolumeMapper as well as vtkVolumeProperty. >>>>>>> In >>>>>>> addition, as for vtkAssembly, i just simply add the volumes using >>>>>>> assembly->addPart(subvol.getVolume()) but nothing comes out. >>>>>>> >>>>>>> Thanks a lot. >>>>>>> Vincent >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> View this message in context: >>>>>>> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735201.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 >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>>> _______________________________________________ >>>>>> Powered by www.kitware.com >>>>>> >>>>>> Visit other Kitware open-source projects at >>>>>> http://www.kitware.com/opensource/opensource.html >>>>>> >>>>>> Please keep messages on-topic and check the VTK FAQ at: >>>>>> 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 >>>>>> >>>>>> *TestGPUVolumeRayCastMapper.cxx* (3K) Download Attachment >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------ >>>>>> If you reply to this email, your message will be added to the >>>>>> discussion below: >>>>>> >>>>>> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735203.html >>>>>> To unsubscribe from Add multiple vtkVolume in vtkAssembly, click here >>>>>> . >>>>>> NAML >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> ------------------------------ >>>> View this message in context: Re: Add multiple vtkVolume in vtkAssembly >>>> >>>> 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 >>>> >>>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> 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 >>> >>> >>> ------------------------------ >>> If you reply to this email, your message will be added to the discussion >>> below: >>> >>> http://vtk.1045678.n5.nabble.com/Add-multiple-vtkVolume-in-vtkAssembly-tp5735182p5735207.html >>> To unsubscribe from Add multiple vtkVolume in vtkAssembly, click here. >>> NAML >>> >>> >> >> >> *Source1.cpp* (5K) Download Attachment >> >> >> ------------------------------ >> View this message in context: Re: Add multiple vtkVolume in vtkAssembly >> >> 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 >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.slaughter at inl.gov Mon Nov 30 14:22:19 2015 From: andrew.slaughter at inl.gov (Slaughter, Andrew E) Date: Mon, 30 Nov 2015 12:22:19 -0700 Subject: [vtkusers] Contour of 3D Exodus Data Message-ID: I am unable to have contours of 3D data show up using Python bindings (VTK 6.3) on OSX. I attached an example exodus file and script and would appreciate any help to get contours working. I also include a screenshot from Paraview of what I am expecting the output of my script to resemble. Thanks, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cube_out.e Type: application/octet-stream Size: 111456 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: contour.png Type: image/png Size: 23363 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: contour.py Type: text/x-python-script Size: 1631 bytes Desc: not available URL: From peter.raback at csc.fi Mon Nov 30 17:07:28 2015 From: peter.raback at csc.fi (=?iso-8859-1?Q?Peter_R=E5back?=) Date: Tue, 1 Dec 2015 00:07:28 +0200 (EET) Subject: [vtkusers] Naming of different pieces in VTU format In-Reply-To: <443ad840.000013c4.0000000f@RABACK-X230.windows.csc.fi> References: <443ad840.000013c4.0000000f@RABACK-X230.windows.csc.fi> Message-ID: <4d204c9d.000013c4.00000019@RABACK-X230.windows.csc.fi> Hi, I'm writing a VTU (unstructured XML format) writer for a finite element software (Elmer) in Fortran. This works otherwise great but I would like to write different parts of the mesh as different pieces, and hopefully also name the pieces. The idea is that the piece could be selected in visualization (with Paraview, ViSit etc.). I attach at the end a working example of the current output. The data is appended in binary format (if not saved in ascii). Now ideally the Piece field could take a name, e.g. ... ... Am I hoping too much? The documentation didn't mention the Piece having the possibility to name it. Our current approach is to use CellData "GeometryIds" which gives a number for each different body and boundary condition. Then one can use the "Threshhold" filter in Paraview to pick data just related to certain entity. However, this is rather cumbersome particularly if the interesting entities do not have indexes following each other. Another motivation for saving data piece by piece is that it will be easier to introduce discontinuities in the mesh. Then within each piece the data can be saved as continuous while jumps only appear where the material changes. If one assumes discontinuity over all elements the amount of data quickly explodes as the nodes can be shared by tens of elements. Could the pieces strategy work, or is there a better way? Any suggestions are welcome! -Peter From laysrodriguessilva at gmail.com Mon Nov 30 18:31:17 2015 From: laysrodriguessilva at gmail.com (Lays Rodrigues) Date: Mon, 30 Nov 2015 21:31:17 -0200 Subject: [vtkusers] Light and Camera with Qt Message-ID: Hi guys, I would like a little help with change the default values on the lights and cameras set on QVTKWidget. Because, the objects that i render, dont look with a good quality. And this tutorials dont clarify what i need to do... http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/MoveCamera http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CameraActor http://www.vtk.org/Wiki/VTK/Examples/Cxx/Lighting/Light ?Because, all above examples use a RenderWindowInteractor, and isnt my case, since i'm using a promote widget inside my MainWindow to render the VTK widget.? The source code of my vtk Class: https://paste.kde.org/peat7yy59/u8vr7d ?Thanks.? -- __ *Lays Rodrigues* *Front-End Developer at Br-Print3D Project(KDE)* *Computer Science Student at UFF/PURO* Organizadora da Semana da Computa??o UFF-PURO www.facebook.com/semanacomputacaopuro www.facebook.com/brprint3d www.brprint3d.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From normand.robert at sri.utoronto.ca Mon Nov 30 22:07:00 2015 From: normand.robert at sri.utoronto.ca (Normand Robert) Date: Mon, 30 Nov 2015 22:07:00 -0500 Subject: [vtkusers] Deep copy of vtk Object vtkModifiedBSPTree Message-ID: <565D0ED4.4090902@sri.utoronto.ca> Hi I wish to use vtkModifiedBSPTree with OpenMP by making copies of vtkModifiedBSPTree instances local to each thread but there does not seem to be any methods to copy this object. I naively thought that all vtk objects would have ShallowCopy() or DeepCopy(). I have to do this because using IntersectWithLine() in different threads for the same object instance causes crashes. Is there a solution to this? Regards Normand Robert PhD Sunnybrook Research Institute University of Toronto