From will.schroeder at kitware.com Fri Mar 1 07:08:53 2019 From: will.schroeder at kitware.com (Will Schroeder) Date: Fri, 1 Mar 2019 07:08:53 -0500 Subject: [vtkusers] [vtk-developers] Fwd: VTK Discourse forum is now available In-Reply-To: References: Message-ID: Bill brings up many good points. In particular references to the old mailing lists and such. I am a big fan of making information available through multiple access vectors so it can be found and accessed through different means. On Thu, Feb 28, 2019 at 6:54 PM Bill Lorensen wrote: > I'm not sure retiring id a good idea. > > For example stack overflow mirrors the lists. > > The lists are mentioned in many web pages. > > Also, I use LastPass for password manager and its a PIA to login just to > give a dimple answer. Especially on my phone. > > What is the harm in keeping the lists? > > On Thu, Feb 28, 2019, 1:13 PM Cory Quammen via vtk-developers < > vtk-developers at vtk.org> wrote: > >> Hi folks, >> >> Just a reminder that the mailing lists vtkusers at vtk.org and >> vtk-developers at vtk.org will be retired at some point this year. Please >> post new questions and topics on https://discourse.vtk.org >> >> Details are available in the forwarded message below. >> >> Thank you, >> Cory >> >> ---------- Forwarded message --------- >> From: Cory Quammen >> Date: Mon, Jan 21, 2019 at 10:22 AM >> Subject: VTK Discourse forum is now available >> To: vtkusers , VTK Developers >> >> >> Hello VTK community, >> >> Following up on our previous discussion about transitioning the VTK >> mailing lists to Discourse [1], we now have a Discourse forum ready to >> use to discuss all things VTK. You can find it at >> >> https://discourse.vtk.org/ >> >> You can sign up for the web site using your Google or GitHub accounts >> if you prefer, otherwise you can register with a user name and >> password. >> >> Please try it out and leave any feedback you might have under the >> "Site Feedback" category (https://discourse.vtk.org/c/site-feedback) >> on the site. >> >> To set up Discourse in mailing list mode, please see: >> >> https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ >> >> While we expect the bulk of VTK-related discussion to transition to >> Discourse fairly rapidly in the near term, the current >> vtkusers at vtk.org and vtk-developers at vtk.org mailing lists will remain >> active until at least the middle of 2019, and the archives from these >> lists will remain available after that. >> >> See you on discourse.vtk.org! >> >> Thanks, >> Cory >> >> [1] https://markmail.org/thread/2dricthoo3ugw7jv >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtk-developers >> >> _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtk-developers > > -- William J. Schroeder, PhD Kitware, Inc. - Building the World's Technical Computing Software 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave.demarle at kitware.com Fri Mar 1 09:40:17 2019 From: dave.demarle at kitware.com (David E DeMarle) Date: Fri, 1 Mar 2019 09:40:17 -0500 Subject: [vtkusers] [vtk-developers] Fwd: VTK Discourse forum is now available In-Reply-To: References: Message-ID: The harm of keeping the list open is in splitting the attention of the community. Note that when we close the mailing list, we really mean "turn off the ability to post anything new to it". I think with some sort of response that directs people who try to discourse. The archives will still be available forever. David E DeMarle Kitware, Inc. Principal Engineer On Fri, Mar 1, 2019 at 7:09 AM Will Schroeder via vtkusers wrote: > Bill brings up many good points. In particular references to the old > mailing lists and such. I am a big fan of making information available > through multiple access vectors so it can be found and accessed through > different means. > > On Thu, Feb 28, 2019 at 6:54 PM Bill Lorensen > wrote: > >> I'm not sure retiring id a good idea. >> >> For example stack overflow mirrors the lists. >> >> The lists are mentioned in many web pages. >> >> Also, I use LastPass for password manager and its a PIA to login just to >> give a dimple answer. Especially on my phone. >> >> What is the harm in keeping the lists? >> >> On Thu, Feb 28, 2019, 1:13 PM Cory Quammen via vtk-developers < >> vtk-developers at vtk.org> wrote: >> >>> Hi folks, >>> >>> Just a reminder that the mailing lists vtkusers at vtk.org and >>> vtk-developers at vtk.org will be retired at some point this year. Please >>> post new questions and topics on https://discourse.vtk.org >>> >>> Details are available in the forwarded message below. >>> >>> Thank you, >>> Cory >>> >>> ---------- Forwarded message --------- >>> From: Cory Quammen >>> Date: Mon, Jan 21, 2019 at 10:22 AM >>> Subject: VTK Discourse forum is now available >>> To: vtkusers , VTK Developers >>> >>> >>> Hello VTK community, >>> >>> Following up on our previous discussion about transitioning the VTK >>> mailing lists to Discourse [1], we now have a Discourse forum ready to >>> use to discuss all things VTK. You can find it at >>> >>> https://discourse.vtk.org/ >>> >>> You can sign up for the web site using your Google or GitHub accounts >>> if you prefer, otherwise you can register with a user name and >>> password. >>> >>> Please try it out and leave any feedback you might have under the >>> "Site Feedback" category (https://discourse.vtk.org/c/site-feedback) >>> on the site. >>> >>> To set up Discourse in mailing list mode, please see: >>> >>> https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ >>> >>> While we expect the bulk of VTK-related discussion to transition to >>> Discourse fairly rapidly in the near term, the current >>> vtkusers at vtk.org and vtk-developers at vtk.org mailing lists will remain >>> active until at least the middle of 2019, and the archives from these >>> lists will remain available after that. >>> >>> See you on discourse.vtk.org! >>> >>> Thanks, >>> Cory >>> >>> [1] https://markmail.org/thread/2dricthoo3ugw7jv >>> >>> -- >>> Cory Quammen >>> Staff R&D Engineer >>> Kitware, Inc. >>> >>> >>> -- >>> Cory Quammen >>> Staff R&D Engineer >>> Kitware, Inc. >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Search the list archives at: >>> http://markmail.org/search/?q=vtk-developers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtk-developers >>> >>> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtk-developers >> >> > > -- > William J. Schroeder, PhD > Kitware, Inc. - Building the World's Technical Computing Software > 28 Corporate Drive > Clifton Park, NY 12065 > will.schroeder at kitware.com > http://www.kitware.com > (518) 881-4902 > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elvis.stansvik at orexplore.com Fri Mar 1 09:54:28 2019 From: elvis.stansvik at orexplore.com (Elvis Stansvik) Date: Fri, 1 Mar 2019 15:54:28 +0100 Subject: [vtkusers] [vtk-developers] Fwd: VTK Discourse forum is now available In-Reply-To: References: Message-ID: Den fre 1 mars 2019 kl 15:40 skrev David E DeMarle via vtkusers : > > The harm of keeping the list open is in splitting the attention of the community. > > Note that when we close the mailing list, we really mean "turn off the ability to post anything new to it". I think with some sort of response that directs people who try to discourse. The archives will still be available forever. +1 (In Qt they recently had a debacle where they accidentally regenererated their ML archives, creating broken links all over the place (forums, commit messages, bug reports et.c.) and had to back out and restore it.) Elvis > > David E DeMarle > Kitware, Inc. > Principal Engineer > > > On Fri, Mar 1, 2019 at 7:09 AM Will Schroeder via vtkusers wrote: >> >> Bill brings up many good points. In particular references to the old mailing lists and such. I am a big fan of making information available through multiple access vectors so it can be found and accessed through different means. >> >> On Thu, Feb 28, 2019 at 6:54 PM Bill Lorensen wrote: >>> >>> I'm not sure retiring id a good idea. >>> >>> For example stack overflow mirrors the lists. >>> >>> The lists are mentioned in many web pages. >>> >>> Also, I use LastPass for password manager and its a PIA to login just to give a dimple answer. Especially on my phone. >>> >>> What is the harm in keeping the lists? >>> >>> On Thu, Feb 28, 2019, 1:13 PM Cory Quammen via vtk-developers wrote: >>>> >>>> Hi folks, >>>> >>>> Just a reminder that the mailing lists vtkusers at vtk.org and vtk-developers at vtk.org will be retired at some point this year. Please post new questions and topics on https://discourse.vtk.org >>>> >>>> Details are available in the forwarded message below. >>>> >>>> Thank you, >>>> Cory >>>> >>>> ---------- Forwarded message --------- >>>> From: Cory Quammen >>>> Date: Mon, Jan 21, 2019 at 10:22 AM >>>> Subject: VTK Discourse forum is now available >>>> To: vtkusers , VTK Developers >>>> >>>> >>>> Hello VTK community, >>>> >>>> Following up on our previous discussion about transitioning the VTK >>>> mailing lists to Discourse [1], we now have a Discourse forum ready to >>>> use to discuss all things VTK. You can find it at >>>> >>>> https://discourse.vtk.org/ >>>> >>>> You can sign up for the web site using your Google or GitHub accounts >>>> if you prefer, otherwise you can register with a user name and >>>> password. >>>> >>>> Please try it out and leave any feedback you might have under the >>>> "Site Feedback" category (https://discourse.vtk.org/c/site-feedback) >>>> on the site. >>>> >>>> To set up Discourse in mailing list mode, please see: >>>> >>>> https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ >>>> >>>> While we expect the bulk of VTK-related discussion to transition to >>>> Discourse fairly rapidly in the near term, the current >>>> vtkusers at vtk.org and vtk-developers at vtk.org mailing lists will remain >>>> active until at least the middle of 2019, and the archives from these >>>> lists will remain available after that. >>>> >>>> See you on discourse.vtk.org! >>>> >>>> Thanks, >>>> Cory >>>> >>>> [1] https://markmail.org/thread/2dricthoo3ugw7jv >>>> >>>> -- >>>> Cory Quammen >>>> Staff R&D Engineer >>>> Kitware, Inc. >>>> >>>> >>>> -- >>>> Cory Quammen >>>> Staff R&D Engineer >>>> Kitware, Inc. >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>>> >>>> Search the list archives at: http://markmail.org/search/?q=vtk-developers >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> https://vtk.org/mailman/listinfo/vtk-developers >>>> >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >>> >>> Search the list archives at: http://markmail.org/search/?q=vtk-developers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtk-developers >>> >> >> >> -- >> William J. Schroeder, PhD >> Kitware, Inc. - Building the World's Technical Computing Software >> 28 Corporate Drive >> Clifton Park, NY 12065 >> will.schroeder at kitware.com >> http://www.kitware.com >> (518) 881-4902 >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers From cory.quammen at kitware.com Fri Mar 1 10:08:56 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Fri, 1 Mar 2019 10:08:56 -0500 Subject: [vtkusers] [vtk-developers] Fwd: VTK Discourse forum is now available In-Reply-To: References: Message-ID: On Thu, Feb 28, 2019 at 6:54 PM Bill Lorensen wrote: > I'm not sure retiring id a good idea. > > For example stack overflow mirrors the lists. > I think you mean MarkMail? I don't think Stack Overflow mirrors mailing lists. > The lists are mentioned in many web pages. > vtk.org/mailing-lists now redirects to vtk.org/community-support, taking care of those links. For other links, we can add text to the email list signup pages (e.g. https://vtk.org/mailman/listinfo/vtkusers) directing people to Discourse. > Also, I use LastPass for password manager and its a PIA to login just to > give a dimple answer. Especially on my phone. > You should be able to reply to emails and it will post on Discourse, no login required. > What is the harm in keeping the lists? > Having more VTK support sites diffuses VTK knowledge and splits the community. Having more sites/lists makes it harder for people with questions to search for answers in previous posts. I realize that is also an argument for not having started the VTK Discourse at all, but I think the advantages of Discourse (which we can and have debated) are greater than that of the mailing list. Cory > > On Thu, Feb 28, 2019, 1:13 PM Cory Quammen via vtk-developers < > vtk-developers at vtk.org> wrote: > >> Hi folks, >> >> Just a reminder that the mailing lists vtkusers at vtk.org and >> vtk-developers at vtk.org will be retired at some point this year. Please >> post new questions and topics on https://discourse.vtk.org >> >> Details are available in the forwarded message below. >> >> Thank you, >> Cory >> >> ---------- Forwarded message --------- >> From: Cory Quammen >> Date: Mon, Jan 21, 2019 at 10:22 AM >> Subject: VTK Discourse forum is now available >> To: vtkusers , VTK Developers >> >> >> Hello VTK community, >> >> Following up on our previous discussion about transitioning the VTK >> mailing lists to Discourse [1], we now have a Discourse forum ready to >> use to discuss all things VTK. You can find it at >> >> https://discourse.vtk.org/ >> >> You can sign up for the web site using your Google or GitHub accounts >> if you prefer, otherwise you can register with a user name and >> password. >> >> Please try it out and leave any feedback you might have under the >> "Site Feedback" category (https://discourse.vtk.org/c/site-feedback) >> on the site. >> >> To set up Discourse in mailing list mode, please see: >> >> https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ >> >> While we expect the bulk of VTK-related discussion to transition to >> Discourse fairly rapidly in the near term, the current >> vtkusers at vtk.org and vtk-developers at vtk.org mailing lists will remain >> active until at least the middle of 2019, and the archives from these >> lists will remain available after that. >> >> See you on discourse.vtk.org! >> >> Thanks, >> Cory >> >> [1] https://markmail.org/thread/2dricthoo3ugw7jv >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. >> >> >> -- >> Cory Quammen >> Staff R&D Engineer >> Kitware, Inc. >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Search the list archives at: http://markmail.org/search/?q=vtk-developers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtk-developers >> >> -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From will.schroeder at kitware.com Fri Mar 1 10:32:40 2019 From: will.schroeder at kitware.com (Will Schroeder) Date: Fri, 1 Mar 2019 10:32:40 -0500 Subject: [vtkusers] [vtk-developers] Fwd: VTK Discourse forum is now available In-Reply-To: References: Message-ID: I think my biggest concern is references to the old lists, including places in mailman where you can sign up. For me, a search of "vtk mailing lists" brings up the mailman user signup list #2 in the rankings: vtkusers Info Page and #3 in the rankings: vtk.org Mailing Lists with links to the user, developer, and vtkm lists. (Fortunately the #1 ranking is the Community Support | VTK page which links to the forums which is great.) Also I suspect that there are external courses, presentations, notes, etc. out there which refer to the mailman list(s). So I suggest that these mailman-related sign up sites etc are modified with with an informative redirect to VTK resources especially the forums. Right now you can sign up and it initially acts like expected..... this might generate some frustration in an unsuspecting user. On Fri, Mar 1, 2019 at 10:09 AM Cory Quammen via vtk-developers < vtk-developers at vtk.org> wrote: > On Thu, Feb 28, 2019 at 6:54 PM Bill Lorensen > wrote: > >> I'm not sure retiring id a good idea. >> >> For example stack overflow mirrors the lists. >> > > I think you mean MarkMail? I don't think Stack Overflow mirrors mailing > lists. > > >> The lists are mentioned in many web pages. >> > > vtk.org/mailing-lists now redirects to vtk.org/community-support, taking > care of those links. For other links, we can add text to the email list > signup pages (e.g. https://vtk.org/mailman/listinfo/vtkusers) directing > people to Discourse. > > >> Also, I use LastPass for password manager and its a PIA to login just to >> give a dimple answer. Especially on my phone. >> > > You should be able to reply to emails and it will post on Discourse, no > login required. > > >> What is the harm in keeping the lists? >> > > Having more VTK support sites diffuses VTK knowledge and splits the > community. Having more sites/lists makes it harder for people with > questions to search for answers in previous posts. I realize that is also > an argument for not having started the VTK Discourse at all, but I think > the advantages of Discourse (which we can and have debated) are greater > than that of the mailing list. > > Cory > > >> >> On Thu, Feb 28, 2019, 1:13 PM Cory Quammen via vtk-developers < >> vtk-developers at vtk.org> wrote: >> >>> Hi folks, >>> >>> Just a reminder that the mailing lists vtkusers at vtk.org and >>> vtk-developers at vtk.org will be retired at some point this year. Please >>> post new questions and topics on https://discourse.vtk.org >>> >>> Details are available in the forwarded message below. >>> >>> Thank you, >>> Cory >>> >>> ---------- Forwarded message --------- >>> From: Cory Quammen >>> Date: Mon, Jan 21, 2019 at 10:22 AM >>> Subject: VTK Discourse forum is now available >>> To: vtkusers , VTK Developers >>> >>> >>> Hello VTK community, >>> >>> Following up on our previous discussion about transitioning the VTK >>> mailing lists to Discourse [1], we now have a Discourse forum ready to >>> use to discuss all things VTK. You can find it at >>> >>> https://discourse.vtk.org/ >>> >>> You can sign up for the web site using your Google or GitHub accounts >>> if you prefer, otherwise you can register with a user name and >>> password. >>> >>> Please try it out and leave any feedback you might have under the >>> "Site Feedback" category (https://discourse.vtk.org/c/site-feedback) >>> on the site. >>> >>> To set up Discourse in mailing list mode, please see: >>> >>> https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ >>> >>> While we expect the bulk of VTK-related discussion to transition to >>> Discourse fairly rapidly in the near term, the current >>> vtkusers at vtk.org and vtk-developers at vtk.org mailing lists will remain >>> active until at least the middle of 2019, and the archives from these >>> lists will remain available after that. >>> >>> See you on discourse.vtk.org! >>> >>> Thanks, >>> Cory >>> >>> [1] https://markmail.org/thread/2dricthoo3ugw7jv >>> >>> -- >>> Cory Quammen >>> Staff R&D Engineer >>> Kitware, Inc. >>> >>> >>> -- >>> Cory Quammen >>> Staff R&D Engineer >>> Kitware, Inc. >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Search the list archives at: >>> http://markmail.org/search/?q=vtk-developers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtk-developers >>> >>> > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Search the list archives at: http://markmail.org/search/?q=vtk-developers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtk-developers > > -- William J. Schroeder, PhD Kitware, Inc. - Building the World's Technical Computing Software 28 Corporate Drive Clifton Park, NY 12065 will.schroeder at kitware.com http://www.kitware.com (518) 881-4902 -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.jacquenot at gmail.com Fri Mar 1 17:59:39 2019 From: guillaume.jacquenot at gmail.com (Guillaume Jacquenot) Date: Fri, 1 Mar 2019 23:59:39 +0100 Subject: [vtkusers] Feature edges extraction with associated dihedral angle Message-ID: Dear VTK users, I am working with a vtkPolyData made of triangles. I would like to identify the feature edges WITH: - the two associated triangle indices to store their normals - the corresponding dihedral angle. These results could be respectively CellData vectors and scalar of vtkFeatureEdge output, for example. 1) Using vtkFeatureEdge returns a new vtkPolyData with no link with original triangles. Do I have to iterate over points of the generated vtkFeatureEdge to find the closest triangle on vtkPolyData. But it does not seem smart at all. 2) Rewrite vtkFeatureEdge class with only FeatureEdges=1 seems possible. But is there a smarter solution? 3) Can vtkPolyDataNormals brings a smarter answer? Thanks you for reading and your future answer! Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: From davood_paknejad at ut.ac.ir Sat Mar 2 02:51:27 2019 From: davood_paknejad at ut.ac.ir (davood paknejad) Date: Sat, 2 Mar 2019 00:51:27 -0700 (MST) Subject: [vtkusers] closed curface Message-ID: <1551513087450-0.post@n5.nabble.com> hello friends i have a 3D.mha file i will display this image as closed image ( in the attach image, converted above image to bellow image) https://ufile.io/n3cjh ( link of 3D.mha) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco12nar at hotmail.it Sat Mar 2 10:21:55 2019 From: marco12nar at hotmail.it (marco festugato) Date: Sat, 2 Mar 2019 08:21:55 -0700 (MST) Subject: [vtkusers] how to install vtk 8.2 Message-ID: <1551540115024-0.post@n5.nabble.com> Hi guys! I'm very new to vtk and i can't manage to understand how to properly install the vtk 8.2 on my win10 pc...any help? I couldnt find anything on the internet so far that could help me...any help would be much appreciated! :D -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From briend at cyceron.fr Sat Mar 2 13:04:15 2019 From: briend at cyceron.fr (briend) Date: Sat, 2 Mar 2019 12:04:15 -0600 Subject: [vtkusers] closed curface In-Reply-To: <1551513087450-0.post@n5.nabble.com> References: <1551513087450-0.post@n5.nabble.com> Message-ID: <68644d54-eacb-ef8e-59dd-51cb36fdf050@cyceron.fr> Hi, You could easily make that by the module "segment editor " (smoothing option) of 3D slicer , or by command (in 3dslicer): |segmentEditorWidget.setActiveEffectByName("Smoothing") effect = segmentEditorWidget.activeEffect() effect.setParameter("SmoothingMethod", "MEDIAN") effect.setParameter("KernelSizeMm", 6) effect.self().onApply() HTH, Frederic | On 3/2/2019 1:51 AM, davood paknejad wrote: > hello friends i have a 3D.mha file i will display this image as closed > image ( in the attach image, converted above image to bellow image) > https://ufile.io/n3cjh ( link of 3D.mha) > ------------------------------------------------------------------------ > 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: > https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From tj.corona at kitware.com Sat Mar 2 13:16:50 2019 From: tj.corona at kitware.com (T.J. Corona) Date: Sat, 2 Mar 2019 13:16:50 -0500 Subject: [vtkusers] how to install vtk 8.2 In-Reply-To: <1551540115024-0.post@n5.nabble.com> References: <1551540115024-0.post@n5.nabble.com> Message-ID: <94358480-B9E1-4EC1-9270-3BA4562E9DDD@kitware.com> Hi Marco, Have you tried following the steps outlined on https://vtk.org/Wiki/VTK/Configure_and_Build#On_Windows_4 ? If so, what problems have you encountered specifically? Sincerely, T.J. > On Mar 2, 2019, at 10:21 AM, marco festugato wrote: > > Hi guys! I'm very new to vtk and i can't manage to understand how to properly > install the vtk 8.2 on my win10 pc...any help? I couldnt find anything on > the internet so far that could help me...any help would be much appreciated! > :D > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From tj.corona at kitware.com Sat Mar 2 22:46:46 2019 From: tj.corona at kitware.com (T.J. Corona) Date: Sat, 2 Mar 2019 22:46:46 -0500 Subject: [vtkusers] R: how to install vtk 8.2 In-Reply-To: References: <1551540115024-0.post@n5.nabble.com> <94358480-B9E1-4EC1-9270-3BA4562E9DDD@kitware.com> Message-ID: Hi Marco, A good introduction to using CMake to build projects can be found here: https://cmake.org/runningcmake/ . The source directory contains VTK?s source code and the build directory is an empty directory in which VTK?s binaries will be built. Sincerely, T.J. > On Mar 2, 2019, at 4:54 PM, marco festugato wrote: > > I mean, the 'source' is the folder in which i extracted the vtk8.2 (using for example winrar?)? > Da: marco festugato > Inviato: sabato 2 marzo 2019 22:46 > A: T.J. Corona > Oggetto: R: [vtkusers] how to install vtk 8.2 > > Hi T.J. and thank u for your answer! I don't understand what are my 'source' and 'build' directory ?..i think the source is the folder after extracting the vtk 8.2? > Sorry, i'm very new to vtk! > Da: T.J. Corona > Inviato: sabato 2 marzo 2019 19:16 > A: marco festugato > Cc: vtkusers at vtk.org > Oggetto: Re: [vtkusers] how to install vtk 8.2 > > Hi Marco, > > Have you tried following the steps outlined on https://vtk.org/Wiki/VTK/Configure_and_Build#On_Windows_4 ? If so, what problems have you encountered specifically? > > Sincerely, > T.J. > > On Mar 2, 2019, at 10:21 AM, marco festugato wrote: > >> Hi guys! I'm very new to vtk and i can't manage to understand how to properly >> install the vtk 8.2 on my win10 pc...any help? I couldnt find anything on >> the internet so far that could help me...any help would be much appreciated! >> :D >> >> >> >> -- >> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From davood_paknejad at ut.ac.ir Sun Mar 3 00:11:30 2019 From: davood_paknejad at ut.ac.ir (davood paknejad) Date: Sat, 2 Mar 2019 22:11:30 -0700 (MST) Subject: [vtkusers] closed curface In-Reply-To: <68644d54-eacb-ef8e-59dd-51cb36fdf050@cyceron.fr> References: <1551513087450-0.post@n5.nabble.com> <68644d54-eacb-ef8e-59dd-51cb36fdf050@cyceron.fr> Message-ID: <1551589890908-0.post@n5.nabble.com> Hi I do this in 3d slicer, but i need to do this with vtk in Visual studio c++ I write a program ( c++ VS2015 ), and i need to do this operation in my program -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From massinissa.bandou at gmail.com Sun Mar 3 14:00:19 2019 From: massinissa.bandou at gmail.com (massinissa bandou) Date: Sun, 3 Mar 2019 12:00:19 -0700 (MST) Subject: [vtkusers] Linker building VTK Qt issue using VS2017 Message-ID: <1551639619419-0.post@n5.nabble.com> Good day VTK users, I'm trying to use VTK within a QT application on VS2017. I managed to build VTK6.3 and Qt on VS 64x but when I drag and drop QVTKWidget on my ui and build, I get the following: 1>MainWindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QVTKWidget::QVTKWidget(class QWidget *,class QFlags)" (__imp_??0QVTKWidget@@QEAA at PEAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z) referenced in function "public: void __cdecl Ui_MainWindowClass::setupUi(class QMainWindow *)" (?setupUi at Ui_MainWindowClass@@QEAAXPEAVQMainWindow@@@Z) 1>MainWindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl QVTKWidget::~QVTKWidget(void)" (__imp_??1QVTKWidget@@UEAA at XZ) referenced in function "public: virtual void * __cdecl QVTKWidget::`scalar deleting destructor'(unsigned int)" (??_GQVTKWidget@@UEAAPEAXI at Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual class QVTKInteractor * __cdecl QVTKWidget::GetInteractor(void)" (?GetInteractor at QVTKWidget@@UEAAPEAVQVTKInteractor@@XZ) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual class vtkRenderWindow * __cdecl QVTKWidget::GetRenderWindow(void)" (?GetRenderWindow at QVTKWidget@@UEAAPEAVvtkRenderWindow@@XZ) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl QVTKWidget::SetRenderWindow(class vtkRenderWindow *)" (?SetRenderWindow at QVTKWidget@@UEAAXPEAVvtkRenderWindow@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual class vtkImageData * __cdecl QVTKWidget::cachedImage(void)" (?cachedImage at QVTKWidget@@UEAAPEAVvtkImageData@@XZ) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::contextMenuEvent(class QContextMenuEvent *)" (?contextMenuEvent at QVTKWidget@@MEAAXPEAVQContextMenuEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::dragEnterEvent(class QDragEnterEvent *)" (?dragEnterEvent at QVTKWidget@@MEAAXPEAVQDragEnterEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::dragLeaveEvent(class QDragLeaveEvent *)" (?dragLeaveEvent at QVTKWidget@@MEAAXPEAVQDragLeaveEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::dragMoveEvent(class QDragMoveEvent *)" (?dragMoveEvent at QVTKWidget@@MEAAXPEAVQDragMoveEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::dropEvent(class QDropEvent *)" (?dropEvent at QVTKWidget@@MEAAXPEAVQDropEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::enterEvent(class QEvent *)" (?enterEvent at QVTKWidget@@MEAAXPEAVQEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl QVTKWidget::event(class QEvent *)" (?event at QVTKWidget@@MEAA_NPEAVQEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::focusInEvent(class QFocusEvent *)" (?focusInEvent at QVTKWidget@@MEAAXPEAVQFocusEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::focusOutEvent(class QFocusEvent *)" (?focusOutEvent at QVTKWidget@@MEAAXPEAVQFocusEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl QVTKWidget::isAutomaticImageCacheEnabled(void)const " (?isAutomaticImageCacheEnabled at QVTKWidget@@UEBA_NXZ) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::keyPressEvent(class QKeyEvent *)" (?keyPressEvent at QVTKWidget@@MEAAXPEAVQKeyEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::keyReleaseEvent(class QKeyEvent *)" (?keyReleaseEvent at QVTKWidget@@MEAAXPEAVQKeyEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::leaveEvent(class QEvent *)" (?leaveEvent at QVTKWidget@@MEAAXPEAVQEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual double __cdecl QVTKWidget::maxRenderRateForImageCache(void)const " (?maxRenderRateForImageCache at QVTKWidget@@UEBANXZ) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __cdecl QVTKWidget::metaObject(void)const " (?metaObject at QVTKWidget@@UEBAPEBUQMetaObject@@XZ) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent at QVTKWidget@@MEAAXPEAVQMouseEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::mousePressEvent(class QMouseEvent *)" (?mousePressEvent at QVTKWidget@@MEAAXPEAVQMouseEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent at QVTKWidget@@MEAAXPEAVQMouseEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::moveEvent(class QMoveEvent *)" (?moveEvent at QVTKWidget@@MEAAXPEAVQMoveEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl QVTKWidget::nativeEvent(class QByteArray const &,void *,long *)" (?nativeEvent at QVTKWidget@@MEAA_NAEBVQByteArray@@PEAXPEAJ at Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl QVTKWidget::paintCachedImage(void)" (?paintCachedImage at QVTKWidget@@MEAA_NXZ) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual class QPaintEngine * __cdecl QVTKWidget::paintEngine(void)const " (?paintEngine at QVTKWidget@@UEBAPEAVQPaintEngine@@XZ) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::paintEvent(class QPaintEvent *)" (?paintEvent at QVTKWidget@@MEAAXPEAVQPaintEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl QVTKWidget::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall at QVTKWidget@@UEAAHW4Call at QMetaObject@@HPEAPEAX at Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual void * __cdecl QVTKWidget::qt_metacast(char const *)" (?qt_metacast at QVTKWidget@@UEAAPEAXPEBD at Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::resizeEvent(class QResizeEvent *)" (?resizeEvent at QVTKWidget@@MEAAXPEAVQResizeEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl QVTKWidget::setAutomaticImageCacheEnabled(bool)" (?setAutomaticImageCacheEnabled at QVTKWidget@@UEAAX_N at Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl QVTKWidget::setMaxRenderRateForImageCache(double)" (?setMaxRenderRateForImageCache at QVTKWidget@@UEAAXN at Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl QVTKWidget::showEvent(class QShowEvent *)" (?showEvent at QVTKWidget@@UEAAXPEAVQShowEvent@@@Z) 1>MainWindow.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl QVTKWidget::wheelEvent(class QWheelEvent *)" (?wheelEvent at QVTKWidget@@MEAAXPEAVQWheelEvent@@@Z) 1>C:\Users\massi\OneDrive\Desktop\ImgAnalyzer\ImageAnalyzer\x64\Release\\ImageAnalyzer.exe : fatal error LNK1120: 36 unresolved externals 1>Done building project "ImageAnalyzer.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I think I have linked properly the libraries and header files to my project. Can you help me how to fix that? Thanks! Massi ----- Software Design Engineer -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From massinissa.bandou at gmail.com Sun Mar 3 15:21:00 2019 From: massinissa.bandou at gmail.com (massinissa bandou) Date: Sun, 3 Mar 2019 13:21:00 -0700 (MST) Subject: [vtkusers] Linker building VTK Qt issue using VS2017 In-Reply-To: <1551639619419-0.post@n5.nabble.com> References: <1551639619419-0.post@n5.nabble.com> Message-ID: <1551644460036-0.post@n5.nabble.com> Here is my CMakelis CMakeLists.txt t.txt ----- Software Design Engineer -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From lucaslovercio at gmail.com Sun Mar 3 18:07:31 2019 From: lucaslovercio at gmail.com (lucaslovercio) Date: Sun, 3 Mar 2019 16:07:31 -0700 (MST) Subject: [vtkusers] Reslice a volume using the transformation of the rendering Message-ID: <1551654451787-0.post@n5.nabble.com> Hi! I want to apply the rotation that the user does in the rendering, to the volume. Thus, I want to store it in the position that the user wants. However, when I apply the transformation and render it, the volume is not oriented as in the orientation seen in the first window. Can you help? Any suggestion? Here is my code vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName("volume.tif"); // Multi slice TIFF reader->Update(); vtkSmartPointer image = reader->GetOutput(); // Color transfer functions vtkSmartPointer volumeMapper = vtkSmartPointer::New(); volumeMapper->SetInputConnection(reader->GetOutputPort()); vtkSmartPointer volume = vtkSmartPointer::New(); volume->SetMapper(volumeMapper); // (To the best of my knowledge) I define this Interactor to rotate the volume, not the view or camera vtkSmartPointer style = vtkSmartPointer::New(); vtkSmartPointer ren1 = vtkSmartPointer::New(); vtkSmartPointer renWin = vtkSmartPointer::New(); renWin->AddRenderer(ren1); vtkSmartPointer renderWindowInteractor = vtkSmartPointer::New(); renderWindowInteractor->SetRenderWindow(renWin); renderWindowInteractor->SetInteractorStyle( style ); ren1->AddViewProp(volume); //Or AddVolume? ren1->SetBackground(0,0,0); ren1->ResetCamera(); renWin->SetSize(800, 800); renWin->Render(); renderWindowInteractor->Start(); //After the user close the window, I want to apply the transformation to the original volume //Probably, my problem is in this section of code vtkSmartPointer matrixRot = vtkSmartPointer::New(); volume->GetMatrix(matrixRot); vtkSmartPointer reslice = vtkSmartPointer::New(); reslice->SetInputConnection(reader->GetOutputPort()); // Rotate about the center of the image? vtkSmartPointer transform = vtkSmartPointer::New(); transform->SetMatrix(matrixRot); reslice->SetOutputOrigin( reader->GetOutput()->GetOrigin()[0], reader->GetOutput()->GetOrigin()[1], reader->GetOutput()->GetOrigin()[2]); reslice->SetResliceTransform(transform); reslice->SetInterpolationModeToCubic(); reslice->SetOutputSpacing( reader>GetOutput()->GetSpacing()[0], reader->GetOutput()->GetSpacing()[1], reader->GetOutput()->GetSpacing()[2]); reslice->SetOutputExtent(reader->GetOutput()->GetExtent()); reslice->Update(); Thanks in advance. Lucas -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Sun Mar 3 21:17:57 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Sun, 3 Mar 2019 21:17:57 -0500 Subject: [vtkusers] Feature edges extraction with associated dihedral angle In-Reply-To: References: Message-ID: Hi Guillaume, I do not know of a smarter way to get what you want than to do one of the solutions you have described. You could modify vtkFeatureEdges to produce the output you want and submit it in a merge request on GitLab [1] and make the feature available to future users of the class. By the way, we are transitioning from the mailing list to https://discourse.vtk.org/. Please post future questions there. Thanks, Cory [1] https://gitlab.kitware.com/vtk/vtk/blob/master/CONTRIBUTING.md On Fri, Mar 1, 2019 at 5:59 PM Guillaume Jacquenot < guillaume.jacquenot at gmail.com> wrote: > Dear VTK users, > > I am working with a vtkPolyData made of triangles. > > I would like to identify the feature edges WITH: > > - the two associated triangle indices to store their normals > - the corresponding dihedral angle. > > These results could be respectively CellData vectors and scalar of > vtkFeatureEdge output, for example. > > > 1) Using vtkFeatureEdge returns a new vtkPolyData with no link with > original triangles. Do I have to iterate over points of the generated > vtkFeatureEdge to find the closest triangle on vtkPolyData. But it does not > seem smart at all. > > 2) Rewrite vtkFeatureEdge class with only FeatureEdges=1 seems possible. > But is there a smarter solution? > > 3) Can vtkPolyDataNormals brings a smarter answer? > > Thanks you for reading and your future answer! > > Guillaume > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Sun Mar 3 21:36:42 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Sun, 3 Mar 2019 21:36:42 -0500 Subject: [vtkusers] Linker building VTK Qt issue using VS2017 In-Reply-To: <1551644460036-0.post@n5.nabble.com> References: <1551639619419-0.post@n5.nabble.com> <1551644460036-0.post@n5.nabble.com> Message-ID: Hi, you may want to post on https://discourse.vtk.org. That's where community support is moving for VTK. Cory On Sun, Mar 3, 2019 at 3:26 PM massinissa bandou < massinissa.bandou at gmail.com> wrote: > Here is my CMakelis CMakeLists.txt > t.txt > > > > ----- > Software Design Engineer > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From davood_paknejad at ut.ac.ir Mon Mar 4 04:07:51 2019 From: davood_paknejad at ut.ac.ir (davood paknejad) Date: Mon, 4 Mar 2019 02:07:51 -0700 (MST) Subject: [vtkusers] display Message-ID: <1551690471562-0.post@n5.nabble.com> Hi my input is 3D.mha (https://ufile.io/n3cjh) i will display in 3D mode my rendering output is image1 but i will display as image2 how to i do it ?? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From davood_paknejad at ut.ac.ir Mon Mar 4 04:09:57 2019 From: davood_paknejad at ut.ac.ir (davood paknejad) Date: Mon, 4 Mar 2019 02:09:57 -0700 (MST) Subject: [vtkusers] display In-Reply-To: <1551690471562-0.post@n5.nabble.com> References: <1551690471562-0.post@n5.nabble.com> Message-ID: <1551690597881-0.post@n5.nabble.com> -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From davood_paknejad at ut.ac.ir Mon Mar 4 04:11:37 2019 From: davood_paknejad at ut.ac.ir (davood paknejad) Date: Mon, 4 Mar 2019 02:11:37 -0700 (MST) Subject: [vtkusers] display Message-ID: <1551690697082-0.post@n5.nabble.com> Hi my input is 3D.mha (https://ufile.io/n3cjh) i will display in 3D mode my rendering output is image1 but i will display as image2 how to i do it ?? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Mon Mar 4 08:47:05 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 4 Mar 2019 08:47:05 -0500 Subject: [vtkusers] display In-Reply-To: <1551690471562-0.post@n5.nabble.com> References: <1551690471562-0.post@n5.nabble.com> Message-ID: Hi, We are transitioning from this mailing list to https://discourse.vtk.org. You may have better luck asking your question over there. Thanks, Cory On Mon, Mar 4, 2019 at 4:13 AM davood paknejad wrote: > Hi > my input is 3D.mha (https://ufile.io/n3cjh) > i will display in 3D mode > my rendering output is image1 > but i will display as image2 > how to i do it ?? > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmax.red at gmail.com Mon Mar 4 09:02:28 2019 From: jmax.red at gmail.com (Jean-Max Redonnet) Date: Mon, 4 Mar 2019 15:02:28 +0100 Subject: [vtkusers] Java multi-thread and model Observer In-Reply-To: References: Message-ID: Hi S?bastien, Thanks for your response. Actually, I don't understand why I still have the use of a Timer, neither. But the point is that if I put the panel3d.resetCamera() command outside the Timer, it doesn't work :-(. Hope I can figure out why soon and any hint on this purpose will be really appreciated. Anyway thanks again for your time. jMax Le ven. 22 f?vr. 2019 ? 19:09, Sebastien Jourdain < sebastien.jourdain at kitware.com> a ?crit : > Hi Jean-Max, > > I'm not sure to follow all the details of your implementation or why you > still have the use of a Timer. > The only things that you need to worry about is that any rendering action > (addActor/removeActor, update when actor connected, render) MUST BE in the > EDT. > > HTH, > > Seb > > On Thu, Feb 21, 2019 at 2:19 AM Jean-Max Redonnet > wrote: > >> Hello everyone ! >> >> I'm using vtk throught its java wrapper and I'm setting up a versatile >> viewer that can display an existing model and update display when this >> model is updated (and it will be continously updated). >> >> My Model is built around few classes: VtkObject that is the ancestor of >> many other classes like VtkSurface, VtkCurve, etc... and VtkModel that >> basically contains a list of VtkObjects and maintain Listeners. All these >> classes are of my own (please note uppercase "V" on VtkObject) >> >> >> public class VtkObject{ >> protected final PropertyChangeSupport pcs = new >> PropertyChangeSupport(this); >> protected List actors = new ArrayList(); >> ... >> } >> >> public class VtkSurface extends VtkObject { >> private vtkActor surfActor; >> ... >> } >> >> public class VtkModel implements PropertyChangeListener{ >> protected List objects; >> protected PropertyChangeSupport support; >> ... >> } >> >> For the viewer itself I wrote a VtkPanel that is mostly inspired by the >> example provided by S?bastien Jourdain ( >> https://github.com/Kitware/VTK/blob/master/Wrapping/Java/vtk/sample/Demo.java >> ) >> >> I just make this panel model-aware implementing PropertyChangeListener: >> >> @Override >> public void propertyChange(PropertyChangeEvent evt) { >> if (evt.getPropertyName() == "AddedObject") { >> System.out.println("Added Object"); >> VtkObject o = (VtkObject) evt.getNewValue(); >> if(o.getActors().size()>0) >> exec.submit(new PipelineBuilder(o)); >> } >> if (evt.getPropertyName() == "UpdatedObject") { >> System.out.println("Updated Object"); >> VtkObject o = (VtkObject) evt.getNewValue(); >> if(o.getActors().size()>0) >> exec.submit(new PipelineBuilder(o)); >> } >> } >> >> and slithly modify PipelineBuilder to make it able to manage VtkObjects >> that may contain several vtkActors >> >> public class PipelineBuilder implements Callable { >> private int counter; >> private List actors; >> >> public PipelineBuilder(VtkObject o) { >> actors = o.getActors(); >> counter = 0; >> } >> >> @Override >> public vtkActor call() throws Exception { >> counter++; >> if (counter < actors.size() + 1) >> return actors.get(counter - 1); >> return null; >> } >> } >> >> Also, workers are setup to continously search for new actors: >> >> private void setupWorkers() { >> // Add actor thread: Consume the working queue and add the actor >> into >> // the render inside the EDT thread >> final AddActorRunnable adderRunnable = new AddActorRunnable(); >> adderRunnable.setRenderer(panel3d); >> new Thread() { >> public void run() { >> while (true) { >> try { >> adderRunnable.setActor(exec.take().get()); >> SwingUtilities.invokeAndWait(adderRunnable); >> panel3d.repaint(); >> } catch (InterruptedException e) { >> return; >> } catch (ExecutionException e) { >> e.printStackTrace(); >> } catch (InvocationTargetException e) { >> e.printStackTrace(); >> } >> } >> }; >> }.start(); >> } >> >> >> Here is the test class I use: >> >> public class TestVtkPanel { >> public VtkModel model; >> >> public TestVtkPanel() { >> SwingUtilities.invokeLater(new Runnable() { >> public void run() { >> model = getModel(); >> VtkPanel panel = new VtkPanel(); >> model.addPropertyChangeListener(panel); >> >> JButton exitBtn = new JButton("Quitter"); >> exitBtn.addActionListener(new ActionListener() { >> >> public void actionPerformed(ActionEvent e) { >> System.exit(0); >> } >> }); >> JFrame f = new JFrame("Vtk Viewer"); >> f.getContentPane().setLayout(new BorderLayout()); >> f.getContentPane().add(panel, BorderLayout.CENTER); >> f.getContentPane().add(exitBtn, BorderLayout.SOUTH); >> >> f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); >> f.setSize(800, 600); >> f.setVisible(true); >> f.validate(); >> >> panel.startWorking(model); >> >> new Thread(new Runnable() { >> public void run() { >> updateModel(); >> } >> }).start(); >> >> } >> }); >> >> } >> >> >> ... >> } >> >> >> >> All this stuff works fine, but few questions remains. >> >> Is this way to do thing is the best for what I'm trying to achieve ? If a >> vtk guru can give a look to my code, it would be gratefully appreciated. >> Furthermore inside the VtkPanel constructor I tried to put the vtkPanel >> panel3d outside of the Timer but that do not work. >> >> new Timer(1000, new ActionListener() { >> >> public void actionPerformed(ActionEvent e) { >> if (nbSeconds++ < 1) { >> panel3d.resetCamera(); >> } >> // Run GC in local thread (EDT) >> ... >> } >> >> I can't figure out why. Any hint on this point may help me to understand >> multithreading. >> >> Thanks for your help. >> >> jMax >> _______________________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Please keep messages on-topic and check the VTK FAQ at: >> http://www.vtk.org/Wiki/VTK_FAQ >> >> Search the list archives at: http://markmail.org/search/?q=vtkusers >> >> Follow this link to subscribe/unsubscribe: >> https://vtk.org/mailman/listinfo/vtkusers >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastien.jourdain at kitware.com Mon Mar 4 11:15:34 2019 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Mon, 4 Mar 2019 09:15:34 -0700 Subject: [vtkusers] Java multi-thread and model Observer In-Reply-To: References: Message-ID: You can do it via an invokeLater or anything that will schedule the execution in the EDT. On Mon, Mar 4, 2019 at 7:02 AM Jean-Max Redonnet wrote: > Hi S?bastien, > > Thanks for your response. > > Actually, I don't understand why I still have the use of a Timer, neither. > But the point is that if I put the panel3d.resetCamera() command outside > the Timer, it doesn't work :-(. > > Hope I can figure out why soon and any hint on this purpose will be really > appreciated. > > Anyway thanks again for your time. > > jMax > > > > > Le ven. 22 f?vr. 2019 ? 19:09, Sebastien Jourdain < > sebastien.jourdain at kitware.com> a ?crit : > >> Hi Jean-Max, >> >> I'm not sure to follow all the details of your implementation or why you >> still have the use of a Timer. >> The only things that you need to worry about is that any rendering action >> (addActor/removeActor, update when actor connected, render) MUST BE in the >> EDT. >> >> HTH, >> >> Seb >> >> On Thu, Feb 21, 2019 at 2:19 AM Jean-Max Redonnet >> wrote: >> >>> Hello everyone ! >>> >>> I'm using vtk throught its java wrapper and I'm setting up a versatile >>> viewer that can display an existing model and update display when this >>> model is updated (and it will be continously updated). >>> >>> My Model is built around few classes: VtkObject that is the ancestor of >>> many other classes like VtkSurface, VtkCurve, etc... and VtkModel that >>> basically contains a list of VtkObjects and maintain Listeners. All these >>> classes are of my own (please note uppercase "V" on VtkObject) >>> >>> >>> public class VtkObject{ >>> protected final PropertyChangeSupport pcs = new >>> PropertyChangeSupport(this); >>> protected List actors = new ArrayList(); >>> ... >>> } >>> >>> public class VtkSurface extends VtkObject { >>> private vtkActor surfActor; >>> ... >>> } >>> >>> public class VtkModel implements PropertyChangeListener{ >>> protected List objects; >>> protected PropertyChangeSupport support; >>> ... >>> } >>> >>> For the viewer itself I wrote a VtkPanel that is mostly inspired by the >>> example provided by S?bastien Jourdain ( >>> https://github.com/Kitware/VTK/blob/master/Wrapping/Java/vtk/sample/Demo.java >>> ) >>> >>> I just make this panel model-aware implementing PropertyChangeListener: >>> >>> @Override >>> public void propertyChange(PropertyChangeEvent evt) { >>> if (evt.getPropertyName() == "AddedObject") { >>> System.out.println("Added Object"); >>> VtkObject o = (VtkObject) evt.getNewValue(); >>> if(o.getActors().size()>0) >>> exec.submit(new PipelineBuilder(o)); >>> } >>> if (evt.getPropertyName() == "UpdatedObject") { >>> System.out.println("Updated Object"); >>> VtkObject o = (VtkObject) evt.getNewValue(); >>> if(o.getActors().size()>0) >>> exec.submit(new PipelineBuilder(o)); >>> } >>> } >>> >>> and slithly modify PipelineBuilder to make it able to manage VtkObjects >>> that may contain several vtkActors >>> >>> public class PipelineBuilder implements Callable { >>> private int counter; >>> private List actors; >>> >>> public PipelineBuilder(VtkObject o) { >>> actors = o.getActors(); >>> counter = 0; >>> } >>> >>> @Override >>> public vtkActor call() throws Exception { >>> counter++; >>> if (counter < actors.size() + 1) >>> return actors.get(counter - 1); >>> return null; >>> } >>> } >>> >>> Also, workers are setup to continously search for new actors: >>> >>> private void setupWorkers() { >>> // Add actor thread: Consume the working queue and add the actor >>> into >>> // the render inside the EDT thread >>> final AddActorRunnable adderRunnable = new AddActorRunnable(); >>> adderRunnable.setRenderer(panel3d); >>> new Thread() { >>> public void run() { >>> while (true) { >>> try { >>> adderRunnable.setActor(exec.take().get()); >>> SwingUtilities.invokeAndWait(adderRunnable); >>> panel3d.repaint(); >>> } catch (InterruptedException e) { >>> return; >>> } catch (ExecutionException e) { >>> e.printStackTrace(); >>> } catch (InvocationTargetException e) { >>> e.printStackTrace(); >>> } >>> } >>> }; >>> }.start(); >>> } >>> >>> >>> Here is the test class I use: >>> >>> public class TestVtkPanel { >>> public VtkModel model; >>> >>> public TestVtkPanel() { >>> SwingUtilities.invokeLater(new Runnable() { >>> public void run() { >>> model = getModel(); >>> VtkPanel panel = new VtkPanel(); >>> model.addPropertyChangeListener(panel); >>> >>> JButton exitBtn = new JButton("Quitter"); >>> exitBtn.addActionListener(new ActionListener() { >>> >>> public void actionPerformed(ActionEvent e) { >>> System.exit(0); >>> } >>> }); >>> JFrame f = new JFrame("Vtk Viewer"); >>> f.getContentPane().setLayout(new BorderLayout()); >>> f.getContentPane().add(panel, BorderLayout.CENTER); >>> f.getContentPane().add(exitBtn, BorderLayout.SOUTH); >>> >>> f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); >>> f.setSize(800, 600); >>> f.setVisible(true); >>> f.validate(); >>> >>> panel.startWorking(model); >>> >>> new Thread(new Runnable() { >>> public void run() { >>> updateModel(); >>> } >>> }).start(); >>> >>> } >>> }); >>> >>> } >>> >>> >>> ... >>> } >>> >>> >>> >>> All this stuff works fine, but few questions remains. >>> >>> Is this way to do thing is the best for what I'm trying to achieve ? If >>> a vtk guru can give a look to my code, it would be gratefully appreciated. >>> Furthermore inside the VtkPanel constructor I tried to put the vtkPanel >>> panel3d outside of the Timer but that do not work. >>> >>> new Timer(1000, new ActionListener() { >>> >>> public void actionPerformed(ActionEvent e) { >>> if (nbSeconds++ < 1) { >>> panel3d.resetCamera(); >>> } >>> // Run GC in local thread (EDT) >>> ... >>> } >>> >>> I can't figure out why. Any hint on this point may help me to understand >>> multithreading. >>> >>> Thanks for your help. >>> >>> jMax >>> _______________________________________________ >>> Powered by www.kitware.com >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Please keep messages on-topic and check the VTK FAQ at: >>> http://www.vtk.org/Wiki/VTK_FAQ >>> >>> Search the list archives at: http://markmail.org/search/?q=vtkusers >>> >>> Follow this link to subscribe/unsubscribe: >>> https://vtk.org/mailman/listinfo/vtkusers >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From xiaojun.wu at lunghealth.com.cn Mon Mar 4 22:29:03 2019 From: xiaojun.wu at lunghealth.com.cn (xiaojun) Date: Mon, 4 Mar 2019 20:29:03 -0700 (MST) Subject: [vtkusers] mummy build issue Message-ID: <1551756543454-0.post@n5.nabble.com> Hi there, I tried to build ActiViz following the guide https://vtk.org/Wiki/VTK/CSharp/ActiViz/Build and blocked when building Mummy. The CMake error is /CableSwig could not be checked out or updated. Check it out or copy it manually to ...../. Could you please help to solve this problem or give me some hints? Thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Zoltan.Kovacs at esi-group.com Tue Mar 5 05:52:08 2019 From: Zoltan.Kovacs at esi-group.com (Zoltan Kovacs) Date: Tue, 5 Mar 2019 10:52:08 +0000 Subject: [vtkusers] Extracting boundary points from an unstructured grid Message-ID: Dear all, I try to extract the boundary nodes of an unstructured grids. Based on the example https://vtk.org/Wiki/VTK/Examples/Cxx/Meshes/BoundaryEdges I used the following code: vtkSmartPointer grid = vtkSmartPointer::New(); vtkSmartPointer filter = vtkSmartPointer::New(); vtkSmartPointer edges = vtkSmartPointer::New(); /* load mesh into grid */ ... /* extract the boundary points */ filter->SetInputData(grid); filter->Update(); edges->SetInputData(filter->GetOutput()); edges->BoundaryEdgesOn(); edges->FeatureEdgesOff(); edges->NonManifoldEdgesOff(); edges->ManifoldEdgesOff(); edges->Update(); vtkSmartPointer polyData = edges->GetOutput(); When I print out the number of the points in polydata (polydata->GetNumberOfPoints()) I obtain 0, i.e. polydata is empty. When I comment out the lines edges->NonManifoldEdgesOff(); edges->ManifoldEdgesOff() then I get some subset of points in polydata extrated from the grid but when I visualize these points I see that some boundary points are missing and there are some inner nodes in polydata. Thus polydata does not contain the exact set of the boundary points of the grid. Now I am not sure if this is the correct way to extract the boundary points from an unstructured grid and I would like to ask if there is any. Thank you very much for your help! Kind regards, Zoltan -------------- next part -------------- An HTML attachment was scrubbed... URL: From cory.quammen at kitware.com Tue Mar 5 08:47:31 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 5 Mar 2019 08:47:31 -0500 Subject: [vtkusers] Extracting boundary points from an unstructured grid In-Reply-To: References: Message-ID: Hi Zoltan, Would you mind posting your question to https://discourse.vtk.org? Community support for VTK is transitioning to that forum, so you may be more likely to get an answer there. Thanks, Cory On Tue, Mar 5, 2019 at 5:52 AM Zoltan Kovacs wrote: > Dear all, > > > > I try to extract the boundary nodes of an unstructured grids. Based on the > example > > https://vtk.org/Wiki/VTK/Examples/Cxx/Meshes/BoundaryEdges > > I used the following code: > > > > vtkSmartPointer grid = > vtkSmartPointer::New(); > > vtkSmartPointer filter = > vtkSmartPointer::New(); > > vtkSmartPointer edges = > vtkSmartPointer::New(); > > > > /* load mesh into grid */ > > ... > > > > /* extract the boundary points */ > > > > filter->SetInputData(grid); > > filter->Update(); > > edges->SetInputData(filter->GetOutput()); > > edges->BoundaryEdgesOn(); > > edges->FeatureEdgesOff(); > > edges->NonManifoldEdgesOff(); > > edges->ManifoldEdgesOff(); > > edges->Update(); > > > > vtkSmartPointer polyData = edges->GetOutput(); > > > > > > When I print out the number of the points in polydata > (polydata->GetNumberOfPoints()) I obtain 0, i.e. > > polydata is empty. When I comment out the lines > > > > edges->NonManifoldEdgesOff(); > > edges->ManifoldEdgesOff() > > > > then I get some subset of points in polydata extrated from the grid but > when I visualize these points I see that some boundary points are missing > and there are some inner nodes in polydata. Thus > > polydata does not contain the exact set of the boundary points of the > grid. > > Now I am not sure if this is the correct way to extract the boundary > points from an unstructured grid > > and I would like to ask if there is any. Thank you very much for your help! > > > > Kind regards, > > Zoltan > > > > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From newcfd at yahoo.com Tue Mar 5 15:02:00 2019 From: newcfd at yahoo.com (newcfd) Date: Tue, 5 Mar 2019 13:02:00 -0700 (MST) Subject: [vtkusers] can not disable vtkOutputWindow with VS2017 on Windows 10 Message-ID: <1551816120945-0.post@n5.nabble.com> I have the following code in my main() to disable vtk warnings output. vtkObject::GlobalWarningDisplayOff(); However, vtkOutputWindow still pops useless warnings up. What is wrong? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From newcfd at yahoo.com Tue Mar 5 15:25:28 2019 From: newcfd at yahoo.com (newcfd) Date: Tue, 5 Mar 2019 13:25:28 -0700 (MST) Subject: [vtkusers] can not disable vtkOutputWindow with VS2017 on Windows 10 In-Reply-To: <1551816120945-0.post@n5.nabble.com> References: <1551816120945-0.post@n5.nabble.com> Message-ID: <1551817528402-0.post@n5.nabble.com> I am using the latest vtk build. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chung at navatekltd.com Tue Mar 5 15:37:31 2019 From: chung at navatekltd.com (chung) Date: Tue, 5 Mar 2019 13:37:31 -0700 (MST) Subject: [vtkusers] SSAA and FXAA Message-ID: <1551818251098-0.post@n5.nabble.com> Hi experts, I'm using vtk 8.1 and am having a little bit of a trouble getting anti-aliasing working. When using the FXAA approach, the graphic remains the same regardless of the FXAA options I pass to the renderer. vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->SetUseFXAA ( true ); auto options = renderer->GetFXAAOptions(); options->SetSubpixelBlendLimit ( 0.75 ); options->SetHardContrastThreshold ( 0.045 ); options->SetRelativeContrastThreshold ( 0.125 ); options->SetEndpointSearchIterations ( 12 ); options->SetSubpixelContrastThreshold ( 0.25 ); options->SetUseHighQualityEndpoints ( true ); When using the SSAA render pass approach I have depth buffer issue where the surfaces of a primitive cube get rendered in an incorrect order. I came across this depth peeling fix but it didn't work for me unfortunately. http://vtk.1045678.n5.nabble.com/vtk-developers-QVTKOpenGLWidget-SSAA-pass-breaks-depth-peeling-td5746428.html vtkSmartPointer renderer = vtkSmartPointer::New(); renderer->SetBackground ( 0.615f, 0.639f, 0.666f ); vtkNew basicPasses; vtkNew ssaa; vtkSmartPointer depthPeel = vtkSmartPointer < vtkDepthPeelingPass > ::New(); vtkSmartPointer translucent = vtkSmartPointer < vtkTranslucentPass > ::New(); depthPeel->SetMaximumNumberOfPeels ( 0 ); depthPeel->SetTranslucentPass ( translucent ); basicPasses->SetTranslucentPass ( depthPeel ); ssaa->SetDelegatePass ( basicPasses ); renderer->SetPass ( ssaa ); renderer->SetUseDepthPeeling ( true ); renderer->SetMaximumNumberOfPeels ( 0 ); I'm not sure what I'm missing and I would greatly appreciate if anyone can help me spot it. Thanks, Chuan -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From hosam.alsofi at gmail.com Wed Mar 6 09:44:51 2019 From: hosam.alsofi at gmail.com (hfs) Date: Wed, 6 Mar 2019 07:44:51 -0700 (MST) Subject: [vtkusers] INTERPOLATE ON STL: Plotting scalar field on 50 points on An 70000-points STL surface Message-ID: <1551883491980-0.post@n5.nabble.com> Hello, I have an STL surface file. The data were sampled on 50 selected points only (wind tunnel test). I want to visualize the field as a contour on the STL file. I know basic stuff on how to use VTK python library. But this task I want it involves: - interpolating the field inside the probes-area - extrapolating outside the probes-area - then creating the final VTK file. - maybe triangulation is also needed.. OR, there might be a crazy filter in paraview that can do the whole thing! Any help would be appreciated.. HFS -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From allison.vacanti at kitware.com Wed Mar 6 10:37:05 2019 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Wed, 6 Mar 2019 10:37:05 -0500 Subject: [vtkusers] SSAA and FXAA In-Reply-To: <1551818251098-0.post@n5.nabble.com> References: <1551818251098-0.post@n5.nabble.com> Message-ID: I'm not sure what's causing this, enabling FXAA should work out of the box for all data rendered in the opaque/translucent passes. Have you tried with the default options? They shouldn't need to be tweaked unless you're having serious performance / quality issues. For SSAA, I'm curious why you're setting the maximum number of peels to 0? That effectively disables peeling and would result in the improper blending that you're seeing. HTH, -Allie On Tue, Mar 5, 2019 at 3:43 PM chung wrote: > Hi experts, > > I'm using vtk 8.1 and am having a little bit of a trouble getting > anti-aliasing working. > > When using the FXAA approach, the graphic remains the same regardless of > the > FXAA options I pass to the renderer. > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > renderer->SetUseFXAA ( true ); > auto options = renderer->GetFXAAOptions(); > options->SetSubpixelBlendLimit ( 0.75 ); > options->SetHardContrastThreshold ( 0.045 ); > options->SetRelativeContrastThreshold ( 0.125 ); > options->SetEndpointSearchIterations ( 12 ); > options->SetSubpixelContrastThreshold ( 0.25 ); > options->SetUseHighQualityEndpoints ( true ); > > > > > When using the SSAA render pass approach I have depth buffer issue where > the > surfaces of a primitive cube get rendered in an incorrect order. I came > across this depth peeling fix but it didn't work for me unfortunately. > > > http://vtk.1045678.n5.nabble.com/vtk-developers-QVTKOpenGLWidget-SSAA-pass-breaks-depth-peeling-td5746428.html > > > vtkSmartPointer renderer = > vtkSmartPointer::New(); > renderer->SetBackground ( 0.615f, 0.639f, 0.666f ); > > vtkNew basicPasses; > vtkNew ssaa; > > vtkSmartPointer depthPeel = vtkSmartPointer < > vtkDepthPeelingPass > ::New(); > vtkSmartPointer translucent = vtkSmartPointer < > vtkTranslucentPass > ::New(); > depthPeel->SetMaximumNumberOfPeels ( 0 ); > depthPeel->SetTranslucentPass ( translucent ); > basicPasses->SetTranslucentPass ( depthPeel ); > > > ssaa->SetDelegatePass ( basicPasses ); > renderer->SetPass ( ssaa ); > renderer->SetUseDepthPeeling ( true ); > renderer->SetMaximumNumberOfPeels ( 0 ); > > > > > I'm not sure what I'm missing and I would greatly appreciate if anyone can > help me spot it. > > Thanks, > Chuan > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chung at navatekltd.com Wed Mar 6 14:18:42 2019 From: chung at navatekltd.com (chung) Date: Wed, 6 Mar 2019 12:18:42 -0700 (MST) Subject: [vtkusers] SSAA and FXAA In-Reply-To: References: <1551818251098-0.post@n5.nabble.com> Message-ID: <1551899922392-0.post@n5.nabble.com> Thanks for the response Allie. I tried the default options prior to tweaking the numbers and I also verified the code execution of FXAAFilter inside vtkOpenGLRender::UpdateGeometry() by stepping through code. The documentation indicated that a max peel of 0 means no maximum number of peeling layers. Again I only changed it to zero because the default setting did not work for me. //@{ /** * In case of depth peeling, define the maximum number of peeling layers. * Initial value is 4. A special value of 0 means no maximum limit. * It has to be a positive value. */ Sincerely, Chuan -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From newcfd at yahoo.com Wed Mar 6 21:25:12 2019 From: newcfd at yahoo.com (newcfd) Date: Wed, 6 Mar 2019 19:25:12 -0700 (MST) Subject: [vtkusers] can not disable vtkOutputWindow with VS2017 on Windows 10 In-Reply-To: <1551817528402-0.post@n5.nabble.com> References: <1551816120945-0.post@n5.nabble.com> <1551817528402-0.post@n5.nabble.com> Message-ID: <1551925512806-0.post@n5.nabble.com> solved. The location of the setting is wrong. Now it is working. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From allison.vacanti at kitware.com Thu Mar 7 03:57:42 2019 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Thu, 7 Mar 2019 03:57:42 -0500 Subject: [vtkusers] SSAA and FXAA In-Reply-To: <1551899922392-0.post@n5.nabble.com> References: <1551818251098-0.post@n5.nabble.com> <1551899922392-0.post@n5.nabble.com> Message-ID: On Wed, Mar 6, 2019 at 2:24 PM chung wrote: > Thanks for the response Allie. I tried the default options prior to > tweaking > the numbers Ok, just wanted to make sure :) > The documentation indicated that a max peel of 0 means no maximum number of > peeling layers. Again I only changed it to zero because the default setting > did not work for me. Ah, yes, you are correct -- I forgot about that. > I also verified the code execution of FXAAFilter inside > vtkOpenGLRender::UpdateGeometry() by stepping through code. This is very strange. While stepping through the rendering code, was anything rendered during the opaque/translucent passes on the renderer that called FXAA? You can step through vtkOpenGLRenderer::UpdateGeometry() to check this. If your data is volumetric or rendered in the overlay pass, FXAA is applied before those passes and won't affect them. It doesn't look like your scene is set up that way in your attached image, but it's something to check. If you're building your own VTK, you can also try running the FXAA test interactively and see if it's being applied there. Enable testing in CMake and run bin/vtkRenderingOpenGL2CxxTests TestFXAAFilter -I from the build directory. This renders the same scene twice, side-by-side. One side has FXAA applied, the other does not. Is there a noticeable difference? -------------- next part -------------- An HTML attachment was scrubbed... URL: From marciniak.andrzej.zg at gmail.com Thu Mar 7 16:21:21 2019 From: marciniak.andrzej.zg at gmail.com (Andrzej Marciniak) Date: Thu, 7 Mar 2019 14:21:21 -0700 (MST) Subject: [vtkusers] Problem with webpack configuration on CentOS Message-ID: <1551993681513-0.post@n5.nabble.com> Hi, We have application with VTK viewer working properly on Windows, MacOS and Ubuntu, but when I migrated it to CentOS 7.3, the viewer does not work. When shaders are compiled, the code of Shader is prefixed with: "module.exports = ", eg. "module.exports = "#version 300 es?#define attribute ...etc. etc. What can be wrong? We use the following dependencies: "babel-cli": "^7.0.0-0", "babel-core": "^7.0.0-0", "babel-loader": "^7.1.2", "babel-polyfill": "^7.0.0-0", "babel-preset-env": "^1.6.1", "babel-preset-es2015": "^7.0.0-0", "babel-preset-react": "^7.0.0-0", "babel-register": "^7.0.0-0", "babelify": "^8.0.0",..., "vtk.js": "^8.3.2", "webpack": "^3.8.1", "webpack-cli": "^2.0.14", "webpack-dev-server": "^2.9.4", "worker-loader": "^1.1.1" dev-dep: "devDependencies": { "@babel/preset-stage-3": "^7.0.0", "css-loader": "^0.28.7", "file-loader": "^1.1.5", "jest": "^23.6.0", "kw-web-suite": "^8.0.0", "node-sass": "^4.6.0", "nyc": "^13.0.1", "sass-loader": "^6.0.6", "style-loader": "^0.19.0", "supertest": "^3.3.0", "url-loader": "^0.6.2", "webpack-cli": "^2.0.14", "webpack-dev-server": "^2.9.4", "worker-loader": "^1.1.1" webpack conf: module: { rules: [ { test: /\.glsl$/i, include: /node_modules(\/|\\)vtk\.js(\/|\\)/, loader: 'shader-loader', }, { test: /\.worker\.js$/, include: /node_modules(\/|\\)vtk\.js(\/|\\)/, use: [ { loader: 'worker-loader', options: { inline: true, fallback: false }, }, ], }, { test: /\.(js|jsx)$/, exclude: /node_modules/, use:['babel-loader'] }, { test:/\.(s*)css$/, use:['style-loader','css-loader', 'sass-loader'] }, { test: /.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot|ico)$/, loader: 'url-loader?limit=10000' } ].concat(vtkRules), babelrc: { "presets": [ "es2015", "react" ] } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chung at navatekltd.com Thu Mar 7 17:01:46 2019 From: chung at navatekltd.com (chung) Date: Thu, 7 Mar 2019 15:01:46 -0700 (MST) Subject: [vtkusers] SSAA and FXAA In-Reply-To: References: <1551818251098-0.post@n5.nabble.com> <1551899922392-0.post@n5.nabble.com> Message-ID: <1551996106166-0.post@n5.nabble.com> Yes I do see a noticeable difference in the FXAAFilter test as well as in my own test widget. I can see that the FXAA algorithm is affecting the grid lines at certain angles but they aren't as smooth as I'd like them to be. I stepped through the code and the grid was rendered in the opaque pass as vtkRenderer::UpdateOpaquePolygonalGeometry returns 1. Thanks again Allie for looking into this. Sincerely, Chuan -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sebastien.jourdain at kitware.com Thu Mar 7 17:25:14 2019 From: sebastien.jourdain at kitware.com (Sebastien Jourdain) Date: Thu, 7 Mar 2019 15:25:14 -0700 Subject: [vtkusers] Problem with webpack configuration on CentOS In-Reply-To: <1551993681513-0.post@n5.nabble.com> References: <1551993681513-0.post@n5.nabble.com> Message-ID: Do you need to build the app on CentOS or is it just for client usage? On Thu, Mar 7, 2019 at 2:27 PM Andrzej Marciniak < marciniak.andrzej.zg at gmail.com> wrote: > Hi, > > We have application with VTK viewer working properly on Windows, MacOS and > Ubuntu, but when I migrated it to CentOS 7.3, the viewer does not work. > When > shaders are compiled, the code of Shader is prefixed with: > "module.exports = ", > eg. > "module.exports = "#version 300 es?#define attribute ...etc. etc. > > What can be wrong? > We use the following dependencies: > "babel-cli": "^7.0.0-0", > "babel-core": "^7.0.0-0", > "babel-loader": "^7.1.2", > "babel-polyfill": "^7.0.0-0", > "babel-preset-env": "^1.6.1", > "babel-preset-es2015": "^7.0.0-0", > "babel-preset-react": "^7.0.0-0", > "babel-register": "^7.0.0-0", > "babelify": "^8.0.0",..., > > "vtk.js": "^8.3.2", > "webpack": "^3.8.1", > "webpack-cli": "^2.0.14", > "webpack-dev-server": "^2.9.4", > "worker-loader": "^1.1.1" > > dev-dep: > "devDependencies": { > "@babel/preset-stage-3": "^7.0.0", > "css-loader": "^0.28.7", > "file-loader": "^1.1.5", > "jest": "^23.6.0", > "kw-web-suite": "^8.0.0", > "node-sass": "^4.6.0", > "nyc": "^13.0.1", > "sass-loader": "^6.0.6", > "style-loader": "^0.19.0", > "supertest": "^3.3.0", > "url-loader": "^0.6.2", > "webpack-cli": "^2.0.14", > "webpack-dev-server": "^2.9.4", > "worker-loader": "^1.1.1" > > webpack conf: > module: { > rules: [ > { > test: /\.glsl$/i, > include: /node_modules(\/|\\)vtk\.js(\/|\\)/, > loader: 'shader-loader', > }, > { > test: /\.worker\.js$/, > include: /node_modules(\/|\\)vtk\.js(\/|\\)/, > use: [ > { > loader: 'worker-loader', > options: { inline: true, fallback: false }, > }, > ], > }, > { > test: /\.(js|jsx)$/, > exclude: /node_modules/, > use:['babel-loader'] > }, > { > test:/\.(s*)css$/, > use:['style-loader','css-loader', 'sass-loader'] > }, > { > test: /.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot|ico)$/, > loader: 'url-loader?limit=10000' > } > ].concat(vtkRules), > > babelrc: > { > "presets": [ > "es2015", > "react" > ] > } > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From allison.vacanti at kitware.com Fri Mar 8 09:32:33 2019 From: allison.vacanti at kitware.com (Allie Vacanti) Date: Fri, 8 Mar 2019 09:32:33 -0500 Subject: [vtkusers] SSAA and FXAA In-Reply-To: <1551996106166-0.post@n5.nabble.com> References: <1551818251098-0.post@n5.nabble.com> <1551899922392-0.post@n5.nabble.com> <1551996106166-0.post@n5.nabble.com> Message-ID: Ah, ok, so FXAA *is* working then, and not broken. FXAA (Fast approXimate Anti-Aliasing) is an approximate anti-aliasing technique that is applied as a post-processing step. Since it is approximate and operates in screen space, there are some scenes that it works well on, and others that it doesn't. It sounds like you've found one that it doesn't handle -- those thin, clustered lines just look like random noise and not edges to a screen-space algorithm, so it doesn't know what to do with them. If you want higher quality anti-aliasing, you'll want MSAA (vtkRenderer::SetMultiSamples) or SSAA. MSAA is generally preferred and better tested. On Thu, Mar 7, 2019 at 5:07 PM chung wrote: > Yes I do see a noticeable difference in the FXAAFilter test as well as in > my > own test widget. > > > > > > > I can see that the FXAA algorithm is affecting the grid lines at certain > angles but they aren't as smooth as I'd like them to be. > > > I stepped through the code and the grid was rendered in the opaque pass as > vtkRenderer::UpdateOpaquePolygonalGeometry returns 1. > > > Thanks again Allie for looking into this. > > Sincerely, > Chuan > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From loiseau_nicolas at hotmail.fr Fri Mar 8 09:51:18 2019 From: loiseau_nicolas at hotmail.fr (Nicolas) Date: Fri, 8 Mar 2019 07:51:18 -0700 (MST) Subject: [vtkusers] VtkImageData 3D setScalar and save to nifti not work Message-ID: <1552056678007-0.post@n5.nabble.com> Hello everyone, sorry for my english i'm a french user. I have a problem with SetScalarComponentFromDouble in vtkImageData, when I save a vtlImage in png file with dimensions x,y,0 that work nice, imageData->SetScalarComponentFromDouble(x,y,0,0, 128) give me a gray png. But when I want to add a z dimension and it to nifti file there is no color, only black on .nii file. imageData->SetScalarComponentFromDouble(x,y,z,0, 128);//R I put my code here : #include #include #include #include #include #include #include int main(int, char *[]) { // Create an image data vtkSmartPointer imageData = vtkSmartPointer::New(); // Specify the size of the image data imageData->SetDimensions(120,121,122); imageData->AllocateScalars(VTK_UNSIGNED_CHAR,1); int* dims = imageData->GetDimensions(); std::cout << "Dims: " << " x: " << dims[0] << " y: " << dims[1] << " z: " << dims[2] << std::endl; for (int x = 0; x < dims[0]; x++) { for (int y = 0; y < dims[1]; y++) { for (int z = 0; z < dims[2]; z++) { // double* pixel = static_cast(imageData->GetScalarPointer(x,y,0)); // std::cout << pixel[0] << " "; // pixel[0] = 128; // pixel[1] = 0; imageData->SetScalarComponentFromDouble(x,y,z,0, 128);//R } } } vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName("label_7235_test.nii.gz"); writer->SetInputData(imageData); writer->Write(); // This should also work: // min = vtkImageData->GetOutput()->GetScalarRange()[0] and max = GetScalarRange()[1]. return EXIT_SUCCESS; } -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chung at navatekltd.com Fri Mar 8 13:00:28 2019 From: chung at navatekltd.com (chung) Date: Fri, 8 Mar 2019 11:00:28 -0700 (MST) Subject: [vtkusers] SSAA and FXAA In-Reply-To: References: <1551818251098-0.post@n5.nabble.com> <1551899922392-0.post@n5.nabble.com> <1551996106166-0.post@n5.nabble.com> Message-ID: <1552068028503-0.post@n5.nabble.com> Hi Allie, I couldn't find vtkRenderer::SetMultiSamples in the doc. However I've tried vtkOpenGLRenderWindow::SetMultiSamples and vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples without having any luck. Are there other setup required besides setting the multi-sample size? Thanks, Chuan -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From chung at navatekltd.com Fri Mar 8 14:20:50 2019 From: chung at navatekltd.com (chung) Date: Fri, 8 Mar 2019 12:20:50 -0700 (MST) Subject: [vtkusers] SSAA and FXAA In-Reply-To: <1552068028503-0.post@n5.nabble.com> References: <1551818251098-0.post@n5.nabble.com> <1551899922392-0.post@n5.nabble.com> <1551996106166-0.post@n5.nabble.com> <1552068028503-0.post@n5.nabble.com> Message-ID: <1552072850178-0.post@n5.nabble.com> Ah I figured out why MSAA didn't work for me. I needed to call SetGlobalMaximumNumberOfMultiSamples before setting the QSurfaceFormat since QVTKOpenGLWidget::defaultFormat() is dependent on that global max multiple sample value. //----------------------------------------------------------------------------- QSurfaceFormat QVTKOpenGLWidget::defaultFormat() { QSurfaceFormat fmt; fmt.setRenderableType(QSurfaceFormat::OpenGL); fmt.setVersion(3, 2); fmt.setProfile(QSurfaceFormat::CoreProfile); fmt.setSwapBehavior(QSurfaceFormat::DoubleBuffer); fmt.setRedBufferSize(1); fmt.setGreenBufferSize(1); fmt.setBlueBufferSize(1); fmt.setDepthBufferSize(1); fmt.setStencilBufferSize(0); fmt.setAlphaBufferSize(1); fmt.setStereo(false); * fmt.setSamples(vtkOpenGLRenderWindow::GetGlobalMaximumNumberOfMultiSamples());* #ifdef DEBUG_QVTKOPENGL_WIDGET fmt.setOption(QSurfaceFormat::DebugContext); #endif return fmt; } // MSAA is fixed by adding these two lines before creating any QVTKOpenGLWidget vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples ( 8 ); QSurfaceFormat::setDefaultFormat ( QVTKOpenGLWidget::defaultFormat() ); Thanks Allie, Chuan -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From spiess.benjamin at yahoo.de Sun Mar 10 10:00:56 2019 From: spiess.benjamin at yahoo.de (BennyS) Date: Sun, 10 Mar 2019 07:00:56 -0700 (MST) Subject: [vtkusers] VTK for visualizing 3D Networks Message-ID: <1552226456737-0.post@n5.nabble.com> Hi all! I am relatively new to VTK but still surprised by the opportunities provided by the visualization tool kit. For this reason, I am currently trying to visualize a network using VTK. I saw some youtube videos concerning this objective, but I was not able to achieve this objective and struggled hard the last month.. What I did so far: -I used networkx (python) to calculate the 3D positions of the node -Python VTK to plot spheres which represent the nodes and tubes which represent the edges. What I am not able to do: -I have information about the nodes which I would like to use to define the importance (=size?) of the nodes. Furthermore, this information is used to calculate the edge weigths. -Regarding the edge weights, it would be great to use this information for defining the tube color/diameter. I already found some threads directing to the MutableUndirectedGraph class for example. However, it seems to me that there is not clear way of doing it in a 3D manner. Maybe someone of you has some experience regarding this and could give me a helping hand? I would be really grateful! Thanks and cheers Benny -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From esmeralda.ruiz at alma3d.com Mon Mar 11 09:42:18 2019 From: esmeralda.ruiz at alma3d.com (zandarina) Date: Mon, 11 Mar 2019 06:42:18 -0700 (MST) Subject: [vtkusers] world coordinates do not give the correct dicom coordinate Message-ID: <1552311738686-0.post@n5.nabble.com> Dear all, I want to do segmentation with itk and i would like to select a seed using vtk with the mouse. I get the coordinates in world coordinates int x = this->Interactor->GetEventPosition()[0]; int y = this->Interactor->GetEventPosition()[1]; std::cout << "(x,y) = (" << x << "," << y << ")" << std::endl; seeds[0] = x; seeds[1] = y; but when i want to use it as a seed for itk i see it is the wrong place. I tried the transformphysicalpointoindex but the result is even worst bool isInside = extractFilter->GetOutput()->TransformPhysicalPointToIndex(coordinate_vtk, coordinate_itk); if (isInside) { ImageType::PixelType pixelValue = extractFilter->GetOutput()->GetPixel(coordinate_itk); } Any help about the coordinates in vtk? Thanks -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Mon Mar 11 11:12:17 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Mon, 11 Mar 2019 11:12:17 -0400 Subject: [vtkusers] world coordinates do not give the correct dicom coordinate In-Reply-To: <1552311738686-0.post@n5.nabble.com> References: <1552311738686-0.post@n5.nabble.com> Message-ID: Hello, Would you mind posting your question to https://discourse.vtk.org? Community support for VTK is transitioning to that forum, and you are more likely to get an answer there. Thanks, Cory On Mon, Mar 11, 2019 at 9:48 AM zandarina wrote: > Dear all, > > I want to do segmentation with itk and i would like to select a seed using > vtk with the mouse. I get the coordinates in world coordinates > > int x = this->Interactor->GetEventPosition()[0]; > int y = this->Interactor->GetEventPosition()[1]; > std::cout << "(x,y) = (" << x << "," << y << ")" > << std::endl; > > seeds[0] = x; > seeds[1] = y; > > but when i want to use it as a seed for itk i see it is the wrong place. I > tried the transformphysicalpointoindex but the result is even worst > > bool isInside = > > extractFilter->GetOutput()->TransformPhysicalPointToIndex(coordinate_vtk, > coordinate_itk); > if (isInside) { > > > ImageType::PixelType pixelValue = > extractFilter->GetOutput()->GetPixel(coordinate_itk); > } > > Any help about the coordinates in vtk? > > Thanks > > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From xiaojun.wu at lunghealth.com.cn Mon Mar 11 23:00:43 2019 From: xiaojun.wu at lunghealth.com.cn (xiaojun) Date: Mon, 11 Mar 2019 20:00:43 -0700 (MST) Subject: [vtkusers] mummy build issue with CableSwig error In-Reply-To: <1551756543454-0.post@n5.nabble.com> References: <1551756543454-0.post@n5.nabble.com> Message-ID: <1552359643472-0.post@n5.nabble.com> Any suggestions? Thanks a lot! BTW, CMake version is 2.8.8. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From marco12nar at hotmail.it Tue Mar 12 10:51:28 2019 From: marco12nar at hotmail.it (marco festugato) Date: Tue, 12 Mar 2019 07:51:28 -0700 (MST) Subject: [vtkusers] SetDataExtend and SetDataSpacing Message-ID: <1552402288875-0.post@n5.nabble.com> Hi guys! Im new to vtk...i have 199 dicom images that i rendered in 3D. Now i have to 'cut' this volume along the axial, sagittal and coronal plane...i think i should use these 2 functions SetDataExtend SetDataSpacing bui i dont know how they work! My images are 512x512 but how can i get this information from the images so that if i use images with different sizes i wont have problems? SetDataSpacing wants the space between each slice in pixels?? Thank u for your answers! :D -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From richardander at yahoo.com Tue Mar 12 15:22:20 2019 From: richardander at yahoo.com (richard anderson) Date: Tue, 12 Mar 2019 12:22:20 -0700 (MST) Subject: [vtkusers] How to create resliceAxes from two points in a curve? Message-ID: <1552418540207-0.post@n5.nabble.com> I would like to use vtkImageReslice to get the cross section of a curve at a point P0. To compute the reslixeAxes, I would like to use P0 and its neighboring point P1 to decisde the direction. As you know, resliceAxes is a vtkMatrix4x4. I think it should be somehting as: A, B, C, P0.x D, E, F, P0.y G, H, I, P0.z 0, 0, 0, 1 Can anyone let me know how to compute the value of {A, B, ... I} based on P0 and P1? Thank you! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From s.turner17 at imperial.ac.uk Tue Mar 12 16:04:10 2019 From: s.turner17 at imperial.ac.uk (Turner, Shruti) Date: Tue, 12 Mar 2019 20:04:10 +0000 Subject: [vtkusers] Remote rendering connection failure Message-ID: Hi, I?m having some issues getting my remote rendering working. It all works perfectly fine with the the default cone from vtk (code from here: https://github.com/dmreagan/vtk-remote-render ), but when I adapt the code to use my own model with interpolation, I get the error: "WebSocket connection to 'ws://localhost:1234/ws' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED? I can see the serve side has rendered, but the client side is blank. My code is below, any help would be much appreciated! Many thanks, Shruti r""" This module is a VTK Web server application. The following command line illustrates how to use it:: $ vtkpython .../vtk_server.py Any VTK Web executable script comes with a set of standard arguments that can be overriden if need be:: --host localhost Interface on which the HTTP server will listen. --port 8080 Port number on which the HTTP server will listen. --content /path-to-web-content/ Directory that you want to serve as static web content. By default, this variable is empty which means that we rely on another server to deliver the static content and the current process only focuses on the WebSocket connectivity of clients. --authKey wslink-secret Secret key that should be provided by the client to allow it to make any WebSocket communication. The client will assume if none is given that the server expects "wslink-secret" as the secret key. """ # import to process args import sys import os # import maths modules import numpy as np from scipy.interpolate import interp1d from scipy import interpolate from scipy import ndimage from ReadCSV import readcsv # from Interpolation import * # import vtk modules. import vtk from vtk.web import protocols from vtk.web import wslink as vtk_wslink from wslink import server # import utility modules import csv import time try: import argparse except ImportError: # since Python 2.6 and earlier don't have argparse, we simply provide # the source for the same as _argparse and we use it instead. from vtk.util import _argparse as argparse # ============================================================================= # Create custom ServerProtocol class to handle clients requests # ============================================================================= class _WebCone(vtk_wslink.ServerProtocol): try: # Application configuration view = None authKey = "wslink-secret" sensor_locations = [21035, 20577, 19625, 19121, 18110, 17567, 16501, 16495, 15942, 15347, 15314, 14658, 20506, 20027, 19544, 19044, 18546, 18031, 16957, 16416, 15851, 14574, 13733, 3424, 20501, 19525, 19025, 18527, 18013, 17488, 16962, 16427, 15233, 14578, 13746, 21726, 19982, 18981, 18478, 17427, 16902, 16361, 15793, 15188, 14536, 13691, 3370, 4899, 19446, 18434, 17382, 16856, 16310, 15122, 14465, 13599, 13609, 3291, 4957, 67, 19904, 19910, 18905, 18393, 17877, 17353, 16816, 15694, 15078, 14423, 13547, 3188, 19856, 19363, 18864, 17826, 17297, 17304, 16763, 16218, 15645, 15036, 13503, 3106, 19811, 18812, 18816, 17780, 17249, 16714, 16169, 15595, 14974, 14314, 13405, 21809, 19780, 19282, 18260, 17742, 16671, 15547, 14924, 14254, 2786, 2128, 975, 364, 19732, 18732, 18214, 17161, 16617, 16069, 14873, 13299, 2749, 925, 320, 866, 20624, 20151, 19660, 18656, 17626, 16571, 16015, 15436, 14153, 13250, 2675, 2009, 20658, 20162, 19178, 18174, 17650, 16577, 15458, 14822, 13236, 2678, 2652, 2634] sensor_pressures = readcsv("S003_norm_walk.csv") min_pressure = 0 # Standard scale - min pressure reading max_pressure = 1 # Standard scale - max pressure reading stl_filename = "newpivot.stl" visualisationIndex = 0 allPressures = [] def initialize(self): global renderer, renderWindow, renderWindowInteractor, cone, mapper, actor # Bring used components self.registerVtkWebProtocol(protocols.vtkWebMouseHandler()) self.registerVtkWebProtocol(protocols.vtkWebViewPort()) self.registerVtkWebProtocol(protocols.vtkWebViewPortImageDelivery()) self.registerVtkWebProtocol(protocols.vtkWebViewPortGeometryDelivery()) # Update authentication key to use self.updateSecret(_WebCone.authKey) # Create default pipeline (Only once for all the session) if not _WebCone.view: # VTK specific code reader = vtk.vtkSTLReader() reader.SetFileName(_WebCone.stl_filename) reader.Update() # This is necessary to have the data ready to read. obj = reader.GetOutputDataObject(0) lut = vtk.vtkLookupTable() lut.SetTableRange(_WebCone.min_pressure, _WebCone.max_pressure) lut.SetHueRange(0.0, 0.9) lut.SetSaturationRange(0.5, 1) lut.SetValueRange(0.7, 1) lut.Build() renderer = vtk.vtkRenderer() renderer.SetBackground(.1, .2, .4) renderWindow = vtk.vtkRenderWindow() renderWindow.AddRenderer(renderer) renderWindowInteractor = vtk.vtkRenderWindowInteractor() renderWindowInteractor.SetRenderWindow(renderWindow) renderWindowInteractor.GetInteractorStyle().SetCurrentStyleToTrackballCamera() obj = _WebCone.interpolate(self, obj) mapper = vtk.vtkPolyDataMapper() mapper.SetInputDataObject(obj) mapper.SetScalarRange(_WebCone.min_pressure, _WebCone.max_pressure) mapper.SetLookupTable(lut) actor = vtk.vtkActor() actor.SetMapper(mapper) # create the scalar_bar scalar_bar = vtk.vtkScalarBarActor() scalar_bar.SetOrientationToHorizontal() scalar_bar.SetLookupTable(lut) scalar_bar.SetTitle("Scale") scalar_bar.SetNumberOfLabels(8) scalar_bar.GetTitleTextProperty().SetFontSize(15) scalar_bar.GetLabelTextProperty().SetFontSize(10) # create the scalar_bar_widget scalar_bar_widget = vtk.vtkScalarBarWidget() scalar_bar_widget.SetInteractor(renderWindowInteractor) scalar_bar_widget.SetScalarBarActor(scalar_bar) scalar_bar_widget.On() renderer.AddActor(actor) renderer.ResetCamera() renderWindow.Render() # VTK Web application specific _WebCone.view = renderWindow self.getApplication().GetObjectIdMap().SetActiveObject("VIEW", renderWindow) for index in range(1000): _WebCone.visualisationIndex = index obj = _WebCone.interpolate(self, obj) renderWindow.Render() time.sleep(1) def interpolate(self, obj): filename = "Points with coordinates.csv" file = open(filename, "r") reader = csv.reader(file, delimiter=";") rownum = 0 values = [] for row in reader: if rownum == 0: rownum += 1 else: strrow = row new = strrow[0].split(',') values.append(new) rownum += 1 file.close() xi = [] yi = [] zi = [] for value in values: xi.append(value[1]) yi.append(value[2]) zi.append(value[3]) xfixed = [] yfixed = [] zfixed = [] for value in xi: xfixed.append(float(value)) for value in yi: yfixed.append(float(value)) for value in zi: zfixed.append(float(value)) xpressures = [] ypressures = [] zpressures = [] for sensor in _WebCone.sensor_locations: xpressures.append(xfixed[sensor]) ypressures.append(yfixed[sensor]) zpressures.append(zfixed[sensor]) if len(_WebCone.allPressures) == 0: file = open("S003_norm_walk.csv", 'r') reader = csv.reader(file, delimiter=';') for row in reader: _WebCone.allPressures.append(row) file.close() values = [] new = _WebCone.allPressures[_WebCone.visualisationIndex][0].split(',') values.append(new) pressures_new = values[0] pressures = [] for item in pressures_new[1:145]: pressures.append(float(item)) # Build vertex_pressures via interpolation #GetNumberOfPoints gets the points that VTK has assigned to the map #array of vz-vy-vz triplets #what does line 45 return.... vertex_pressures = np.zeros(obj.GetNumberOfPoints()) # for i in range(0, len(sensor_locations)): # p = pressures[i] # vertex_pressures[sensor_locations[i]] = pressures[i] #coord = np.array((xpressures,ypressures)).T newcoord = np.array((xfixed,yfixed)).T xpressures= np.array(xpressures) ypressures= np.array(ypressures) zpressures= np.array(zpressures) xfixed =np.array(xfixed) yfixed = np.array(yfixed) zfixed = np.array(zfixed) pressures = np.array(pressures) # RBF shiv interpolation f = interpolate.Rbf(xpressures,ypressures,zpressures,pressures,function='cubic') vertex_pressures = f(xfixed,yfixed,zfixed) # This is an array that I am creating to store the heights of the points. I # will use this as a scalar field on the 'obj' so that the lookup table can be # used to color it. You could obviously make the array anything you wanted, # such as x or y or squared distance from some other point, for instance. pressures = vtk.vtkDoubleArray() pressures.SetName("Pressures") # Loop through the points in the vtkPolyData and record the height in the # 'heights' array. for i in range(obj.GetNumberOfPoints()): p = vertex_pressures[i] pressures.InsertNextValue(p) # Add this array to the point data as a scalar. obj.GetPointData().SetScalars(pressures) return obj except: print("Fuck, it's wrong!") # ============================================================================= # Main: Parse args and start server # ============================================================================= if __name__ == "__main__": # Create argument parser parser = argparse.ArgumentParser(description="VTK/Web Cone web-application") # Add default arguments server.add_arguments(parser) # Extract arguments args = parser.parse_args() # Configure our current application _WebCone.authKey = args.authKey # Start server server.start_webserver(options=args, protocol=_WebCone) # class vtkTimerCallback(): # def __init__(self, sensors_values, sensor_locations, obj): # self.timer_count = 0 # self.changed = False # self.sensors_values = sensors_values # self.sensor_locations = sensor_locations # self.obj = obj # def execute(self, obj, x): # self.changed = False # filename = "Points with coordinates.csv" # file = open(filename, "r") # reader = csv.reader(file, delimiter=";") # rownum = 0 # values = [] # for row in reader: # if rownum == 0: # rownum += 1 # else: # strrow = row # new = strrow[0].split(',') # values.append(new) # rownum += 1 # file.close() # xi = [] # yi = [] # zi = [] # for value in values: # xi.append(value[1]) # yi.append(value[2]) # zi.append(value[3]) # xfixed = [] # yfixed = [] # zfixed = [] # for value in xi: # xfixed.append(float(value)) # for value in yi: # yfixed.append(float(value)) # for value in zi: # zfixed.append(float(value)) # xpressures = [] # ypressures = [] # zpressures = [] # for sensor in _WebCone.sensor_locations: # xpressures.append(xfixed[sensor]) # ypressures.append(yfixed[sensor]) # zpressures.append(zfixed[sensor]) # if len(_WebCone.allPressures) == 0: # file = open("S003_norm_walk.csv", 'r') # reader = csv.reader(file, delimiter=';') # for row in reader: # _WebCone.allPressures.append(row) # file.close() # values = [] # new = _WebCone.allPressures[_WebCone.visualisationIndex][0].split(',') # values.append(new) # pressures_new = values[0] # pressures = [] # for item in pressures_new[1:145]: # pressures.append(float(item)) # # Build vertex_pressures via interpolation # #GetNumberOfPoints gets the points that VTK has assigned to the map # #array of vz-vy-vz triplets # #what does line 45 return.... # vertex_pressures = np.zeros(obj.GetNumberOfPoints()) # # for i in range(0, len(sensor_locations)): # # p = pressures[i] # # vertex_pressures[sensor_locations[i]] = pressures[i] # coord = np.array((xpressures,ypressures)).T # newcoord = np.array((xfixed,yfixed)).T # xpressures= np.array(xpressures) # ypressures= np.array(ypressures) # zpressures= np.array(zpressures) # xfixed =np.array(xfixed) # yfixed = np.array(yfixed) # zfixed = np.array(zfixed) # pressures = np.array(pressures) # # RBF shiv interpolation # f = interpolate.Rbf(xpressures,ypressures,zpressures,pressures,function='cubic') # vertex_pressures = f(xfixed,yfixed,zfixed) # # This is an array that I am creating to store the heights of the points. I # # will use this as a scalar field on the 'obj' so that the lookup table can be # # used to color it. You could obviously make the array anything you wanted, # # such as x or y or squared distance from some other point, for instance. # pressures = vtk.vtkDoubleArray() # pressures.SetName("Pressures") # # Loop through the points in the vtkPolyData and record the height in the # # 'heights' array. # for i in range(obj.GetNumberOfPoints()): # p = vertex_pressures[i] # pressures.InsertNextValue(p) # # Add this array to the point data as a scalar. # obj.GetPointData().SetScalars(pressures) # # Visualization stuff ... you need to tell the mapper about the scalar field # # and the lookup table. The rest of this is pretty standard stuff. # mapper = vtk.vtkPolyDataMapper() # mapper.SetInputDataObject(self.obj) # iren = obj # iren.GetRenderWindow().Render() # self.timer_count += 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marciniak.andrzej.zg at gmail.com Tue Mar 12 21:10:33 2019 From: marciniak.andrzej.zg at gmail.com (Andrzej Marciniak) Date: Tue, 12 Mar 2019 18:10:33 -0700 (MST) Subject: [vtkusers] Positioning camera perpendicular to image slice in rotated volumes Message-ID: <1552439433854-0.post@n5.nabble.com> I have MRI scans which are strongly rotated (direction of ImageData is not identity matrix). How to set initial position and viewUp of camera, so it can be perfectly perpendicular to imageSlice in vtk.js? My idea is to: - get coords of point in the middle of volume and set it as focal point - calculate position camera so that direction of projection is perpendicular to image slice plane - orthogonalizeViewUp in camera. However, I don't want to reinvent the wheel - if there is ready solution in API I'd be very thankful for any help. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aron.helser at kitware.com Wed Mar 13 14:04:17 2019 From: aron.helser at kitware.com (Aron Helser) Date: Wed, 13 Mar 2019 14:04:17 -0400 Subject: [vtkusers] VTK for visualizing 3D Networks In-Reply-To: <1552226456737-0.post@n5.nabble.com> References: <1552226456737-0.post@n5.nabble.com> Message-ID: Hi Benny, Have you seen this? https://www.westgrid.ca/events/westgrid_online_workshop_3d_graphs_networkx_vtk_and_paraview It certainly shows that what you want is possible.... I'd also advise looking at more of the VTK examples - I think there's a Glyph Mapper which will change the size/color of the spheres based on a data value for you. HTH, Aron On Sun, Mar 10, 2019 at 10:07 AM BennyS via vtkusers wrote: > Hi all! > I am relatively new to VTK but still surprised by the opportunities > provided > by the visualization tool kit. For this reason, I am currently trying to > visualize a network using VTK. I saw some youtube videos concerning this > objective, but I was not able to achieve this objective and struggled hard > the last month.. > > What I did so far: > -I used networkx (python) to calculate the 3D positions of the node > -Python VTK to plot spheres which represent the nodes and tubes which > represent the edges. > > What I am not able to do: > -I have information about the nodes which I would like to use to define the > importance (=size?) of the nodes. Furthermore, this information is used to > calculate the edge weigths. > -Regarding the edge weights, it would be great to use this information for > defining the tube color/diameter. > > I already found some threads directing to the MutableUndirectedGraph class > for example. However, it seems to me that there is not clear way of doing > it > in a 3D manner. > > Maybe someone of you has some experience regarding this and could give me a > helping hand? > I would be really grateful! > > Thanks and cheers > Benny > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lihouxing0710 at gmail.com Thu Mar 14 03:28:47 2019 From: lihouxing0710 at gmail.com (Xing Li) Date: Thu, 14 Mar 2019 15:28:47 +0800 Subject: [vtkusers] How to create resliceAxes from two points in a curve? In-Reply-To: <1552418540207-0.post@n5.nabble.com> References: <1552418540207-0.post@n5.nabble.com> Message-ID: You can use vtkMath::Perpendiculars(A,B,C,0) to generate the other two directions, where A is p0-p1 or p1-p0 richard anderson via vtkusers ?2019?3?13??? ??3:28??? > I would like to use vtkImageReslice to get the cross section of a curve at > a > point P0. > > To compute the reslixeAxes, I would like to use P0 and its neighboring > point > P1 to decisde the direction. > > As you know, resliceAxes is a vtkMatrix4x4. I think it should be somehting > as: > > A, B, C, P0.x > D, E, F, P0.y > G, H, I, P0.z > 0, 0, 0, 1 > > Can anyone let me know how to compute the value of {A, B, ... I} based on > P0 and P1? > > Thank you! > > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.j.lahnstein at t-online.de Thu Mar 14 09:50:25 2019 From: j.j.lahnstein at t-online.de (johnnyjo) Date: Thu, 14 Mar 2019 06:50:25 -0700 (MST) Subject: [vtkusers] Rotate vector around center, python Message-ID: <1552571425672-0.post@n5.nabble.com> I am using VTK and Python for a project related to my studies. I am given the following point centerOfRotation and the orientation degrees, as well as the vector [1, 0, 0]. Now I want to rotate the vector so it "points" in the direction specified by degrres and then translate it to the point p. centerOfRotation = [314.848717879, 283.085686693, 423.900139245] degrees = [-7.93947167694, -0, 171.098864823] vector = [1, 0, 0] transform = vtk.vtkTransform() transform.Identity() transform.PreMultiply() transform.Translate(centerOfRotation) transform.RotateZ(degrees[2]) transform.RotateX(degrees[0]) transform.RotateY(degrees[1]) transform.Translate(-centerOfRotation[0], -centerOfRotation[1], -centerOfRotation[2]) newPos = [0]*3 transform.TransformPoint(vector, newPos) The centerOfRotation and degrees are extracted from another program, in the other program the second point(newPos) should be beneath the first point(centerOfRotation). But with the code given above, the second point is located above the center of rotation. I hope someone can point me in the right direction. Thanks a lot ! BTW: I am given another information by the other program: YSymmetry=1. I am not really sure what that means though. Note: I am neither a math nor computer student and my math skills are somewhat rusty. Right now I dont have the time to study the math, so if you could point me in the right "coding" direction I would appreciate it :D -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From richardander at yahoo.com Thu Mar 14 20:32:47 2019 From: richardander at yahoo.com (Richard Anderson) Date: Fri, 15 Mar 2019 00:32:47 +0000 (UTC) Subject: [vtkusers] How to create resliceAxes from two points in a curve? In-Reply-To: References: <1552418540207-0.post@n5.nabble.com> Message-ID: <726161967.4757822.1552609967405@mail.yahoo.com> Thank you very much for the help!? After reslice, the output is an 2D image, is there anyway to know the coordinate of point? P0 in the 2D image?? or is there any way to make P0 at the center of output 2D image? Thanks again! On Thursday, March 14, 2019, 12:29:04 AM PDT, Xing Li wrote: You can use?vtkMath::Perpendiculars(A,B,C,0)?to generate the other two directions, where A is p0-p1 or p1-p0 richard anderson via vtkusers ?2019?3?13??? ??3:28??? I would like to use vtkImageReslice to get the cross section of a curve at a point P0. To compute the reslixeAxes, I would like to use P0 and its neighboring point P1 to decisde the direction. As you know, resliceAxes is a vtkMatrix4x4. I think it should be somehting as: A, B, C, P0.x D, E, F,? P0.y G, H, I,? P0.z 0,? 0, 0,? ?1 Can anyone let me know how to compute the value of {A, B, ... I}? based on P0 and P1? Thank you! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.weatherly at gmail.com Thu Mar 14 20:53:24 2019 From: k.weatherly at gmail.com (Keith) Date: Thu, 14 Mar 2019 17:53:24 -0700 (MST) Subject: [vtkusers] Strange rendering artifacts Message-ID: <1552611204329-0.post@n5.nabble.com> Hi, Trying to work out what could be causing these strange rendering artifacts. The screen shot here shows the same model rendered on the left with custom OpenGL and on the right using Vtk 8.1. As you can see there are what look like small pin holes in the polygon rendering on the Vtk view. Any thoughts on what to try to remedy this issue appreciated. Thanks. -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From k.weatherly at gmail.com Thu Mar 14 21:54:25 2019 From: k.weatherly at gmail.com (Keith) Date: Thu, 14 Mar 2019 18:54:25 -0700 (MST) Subject: [vtkusers] Strange rendering artifacts In-Reply-To: <1552611204329-0.post@n5.nabble.com> References: <1552611204329-0.post@n5.nabble.com> Message-ID: <1552614865594-0.post@n5.nabble.com> Interestly if i remove the vtkCleanPolyData (which i'm setting up with the code below) i don't see the issue with the dots anymore, but the shading now looks flat shaded so i lost the smooth shading effect. vtkSmartPointer cleanPolyData = vtkSmartPointer::New(); cleanPolyData->SetInputData ( polyData ); cleanPolyData->Update(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From marco12nar at hotmail.it Fri Mar 15 08:59:09 2019 From: marco12nar at hotmail.it (marco festugato) Date: Fri, 15 Mar 2019 05:59:09 -0700 (MST) Subject: [vtkusers] visualize 3D dicom file Message-ID: <1552654749788-0.post@n5.nabble.com> Hi guys! I've read 200 dicom files in ITK (using the example "Reading a 2D DICOM Series and Writing a Volume" from the itk User Guide) and saved the volume in a .dcm file in order to open it with VTK. When I use my code in VTK (reader = vtkDICOMImageReader , mapper = vtkFixedPointVolumeRayCastMapper) i only see a black window, like my reader couldnt actually load the volume! I used the same code in VTK changing SetFileName with SetDirectoryName (in the dicomReader) and gave the folder of my 200 images and i was able to see the volume (so the VTK code seems to be good...)...what could be my problem? I was careful to follow the steps in the itk user guide when i wrote the volume in a .dcm file.... Thank u for your help! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From aashish.chaudhary at kitware.com Fri Mar 15 09:09:23 2019 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Fri, 15 Mar 2019 09:09:23 -0400 Subject: [vtkusers] visualize 3D dicom file In-Reply-To: <1552654749788-0.post@n5.nabble.com> References: <1552654749788-0.post@n5.nabble.com> Message-ID: can you try the GPU Volume RayCast mapper to confirm if the data is loading correctly using the DICOM volume? On Fri, Mar 15, 2019 at 8:59 AM marco festugato wrote: > Hi guys! I've read 200 dicom files in ITK (using the example "Reading a 2D > DICOM Series and Writing a Volume" from the itk User Guide) and saved the > volume in a .dcm file in order to open it with VTK. > When I use my code in VTK (reader = vtkDICOMImageReader , mapper = > vtkFixedPointVolumeRayCastMapper) i only see a black window, like my reader > couldnt actually load the volume! > > I used the same code in VTK changing SetFileName with SetDirectoryName (in > the dicomReader) and gave the folder of my 200 images and i was able to see > the volume (so the VTK code seems to be good...)...what could be my > problem? > I was careful to follow the steps in the itk user guide when i wrote the > volume in a .dcm file.... > Thank u for your help! > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzenanz at gmail.com Fri Mar 15 12:58:22 2019 From: dzenanz at gmail.com (=?UTF-8?B?RMW+ZW5hbiBadWtpxIc=?=) Date: Fri, 15 Mar 2019 12:58:22 -0400 Subject: [vtkusers] [ITK-users] Reading DICOM series and visualize the volume with VTK In-Reply-To: References: Message-ID: Hi Marco, that is more of a VTK question than ITK one, best directed at vtkusers at vtk.org. Also, ITK has migrated to a new forum . Please post further ITK-related questions there instead of this mailing list. Regards, D?enan On Fri, Mar 15, 2019 at 12:54 PM Marco Festugato wrote: > Hi Dzenan and thank u for your answer ? I've tried to do as u suggested, > but i receive an error telling me that my mapper doesnt accept ''scalar > cells''...maybe this connector doesnt work with my mapper? i've tried to > simply add the 'connector' to my pipeline: > > reader -> connector -> mapper -> volume -> renderer -> window > > Here's my code if u want to check it (it still needs a bit of > cleaning)...i would appreciate it a lot!! I need this to work for my > project :'( > > // VTK includes > #include "vtkDICOMImageReader.h" > #include "vtkImageData.h" > #include "vtkRenderer.h" > #include "vtkRenderWindow.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkVolume.h" > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include "vtkVersion.h" > #include "vtkImageViewer.h" > #include "vtkImageMapper3D.h" > #include "vtkRenderWindowInteractor.h" > #include "vtkSmartPointer.h" > #include "vtkImageActor.h" > #include "vtkInteractorStyleImage.h" > #include "vtkRenderer.h" > #include "itkImage.h" > #include "itkGDCMImageIO.h" > #include "itkGDCMSeriesFileNames.h" > #include "itkImageSeriesReader.h" > #include "itkImageFileWriter.h" > > int main(int argc, char *argv[]) > { > // Verify the number of parameters in the command line > if( argc < 2) > { > std::cerr << "Usage: " << std::endl; > std::cerr << argv[0] << " DICOMimagesDirectory " << std::endl; > return EXIT_FAILURE; > } > // Software Guide : BeginCodeSnippet > typedef signed short PixelType; > const unsigned int Dimension = 3; > typedef itk::Image< PixelType, Dimension > ImageType; > typedef itk::ImageToVTKImageFilter ConnectorType; > > ConnectorType::Pointer connector = ConnectorType::New(); > > // We use the image type for instantiating the type of the series reader > and > // for constructing one object of its type. > > typedef itk::ImageSeriesReader< ImageType > ReaderType; > ReaderType::Pointer reader = ReaderType::New(); > > // A GDCMImageIO object is created and connected to the reader. This > object is > // the one that is aware of the internal intricacies of the DICOM format. > // > > typedef itk::GDCMImageIO ImageIOType; > ImageIOType::Pointer dicomIO = ImageIOType::New(); > > reader->SetImageIO( dicomIO ); > > using NamesGeneratorType = itk::GDCMSeriesFileNames; > NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New(); > > nameGenerator->SetUseSeriesDetails( true ); > nameGenerator->SetDirectory( argv[1] ); > > try > { > std::cout << std::endl << "The directory: " << std::endl; > std::cout << std::endl << argv[1] << std::endl << std::endl; > std::cout << "Contains the following DICOM Series: "; > std::cout << std::endl << std::endl; > > > // Software Guide : BeginLatex > // > // The GDCMSeriesFileNames object first identifies the list of DICOM series > // present in the given directory. We receive that list in a reference > // to a container of strings and then we can do things like print out all > // the series identifiers that the generator had found. Since the process > of > // finding the series identifiers can potentially throw exceptions, it is > // wise to put this code inside a \code{try/catch} block. > // > > > typedef std::vector< std::string > SeriesIdContainer; > > const SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs(); > > // Given that it is common to find multiple DICOM series in the same > directory, > // we must tell the GDCM classes what specific series we want to read. In > // this example we do this by checking first if the user has provided a > series > // identifier in the command line arguments. If no series identifier has > been > // passed, then we simply use the first series found during the > exploration of > // the directory. > > > std::string seriesIdentifier; > > seriesIdentifier = seriesUID.begin()->c_str(); > > std::cout << std::endl << std::endl; > std::cout << "Now reading series: " << std::endl << std::endl; > std::cout << seriesIdentifier << std::endl; > std::cout << std::endl << std::endl; > > > // We pass the series identifier to the name generator and ask for all the > // filenames associated to that series. This list is returned in a > container of > // strings by the \code{GetFileNames()} method. > > > typedef std::vector< std::string > FileNamesContainer; > FileNamesContainer fileNames; > > fileNames = nameGenerator->GetFileNames( seriesIdentifier ); > > // > // The list of filenames can now be passed to the > \doxygen{ImageSeriesReader} > // using the \code{SetFileNames()} method. > > > reader->SetFileNames( fileNames ); > > // Finally we can trigger the reading process by invoking the > \code{Update()} > // method in the reader. This call as usual is placed inside a > \code{try/catch} > // block. > > try > { > reader->Update(); > } > catch (itk::ExceptionObject &ex) > { > std::cout << ex << std::endl; > return EXIT_FAILURE; > } > } > catch (itk::ExceptionObject &ex) > { > std::cout << ex << std::endl; > return EXIT_FAILURE; > } > > // Visualization pipeline > > // Create the renderer, render window and interactor > vtkRenderer *renderer = vtkRenderer::New(); > vtkRenderWindow *renWin = vtkRenderWindow::New(); > renWin->AddRenderer(renderer); > > vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); > iren->SetRenderWindow(renWin); > > // Read the data > vtkImageData *input = nullptr; > > /* vtkDICOMImageReader *reader = vtkDICOMImageReader::New(); > // vtkTIFFReader *reader = vtkTIFFReader::New(); > reader->SetFileName(argv[1]); */ > // reader->Update(); // read data > > > connector->SetInput(reader->GetOutput()); > > // Create our volume and mapper > vtkVolume *volume = vtkVolume::New(); > vtkFixedPointVolumeRayCastMapper *mapper = > vtkFixedPointVolumeRayCastMapper::New(); > // vtkVolumeRayCastCompositeFunction *compositeFunction = > vtkVolumeRayCastCompositeFunction::New(); > vtkInteractorStyleTrackballCamera *styleCamera = > vtkInteractorStyleTrackballCamera::New(); > > // connect up the volume to the property and the mapper > mapper -> SetInputData( connector -> GetOutput() ); > mapper -> SetSampleDistance( 0.1 ); > > vtkSmartPointer volumeProperty = > vtkSmartPointer::New(); > > > volumeProperty->SetInterpolationTypeToLinear(); // better image quality > but computation's longer > > > vtkSmartPointer scalarOpacity = > vtkSmartPointer::New(); > vtkSmartPointer gradientOpacity = > vtkSmartPointer::New(); > > scalarOpacity->AddPoint(0, 0.00); > scalarOpacity->AddPoint(500, 0.15); > scalarOpacity->AddPoint(1000, 0.15); > scalarOpacity->AddPoint(1150, 0.85); > > > gradientOpacity->AddPoint(0, 0.0); > gradientOpacity->AddPoint(90, 0.5); > gradientOpacity->AddPoint(100, 1.0); > > > //set the transfer functions to the property > volumeProperty->SetScalarOpacity(scalarOpacity); > volumeProperty->SetGradientOpacity(gradientOpacity); > > //set the property to the volume > > volume->SetProperty(volumeProperty); > > volume->SetMapper( mapper ); > iren -> SetInteractorStyle(styleCamera); > // Set the default window size > renWin->SetSize(600,600); > > // Add the volume to the scene > renderer->AddVolume( volume ); > > // interact with data > renWin->Render(); > iren -> Start(); > > > return EXIT_SUCCESS; > } > > > > Inviato da Outlook > ------------------------------ > *Da:* D?enan Zuki? > *Inviato:* venerd? 15 marzo 2019 17:19 > *A:* Marco Festugato > *Cc:* insight-users at itk.org > *Oggetto:* Re: [ITK-users] Reading DICOM series and visualize the volume > with VTK > > Hi Marco, > > you could combine that example with VTK VolumeRendering > example > and connect them using ITKVTKGlue > > . > > Regards, > D?enan > > On Fri, Mar 15, 2019 at 7:00 AM Marco Festugato < > marco.festugato at outlook.it> wrote: > > Hi guys! I'm very new to ITK-VTK...what i have to do is reading 199 dicom > images using ITK and visualize the volume using VTK. > Using the example "DicomSeriesReadImageWrite2" im able to read the series > and create a 3D volume but i dont know how to visualize it with VTK! > Any help? :) > Thank u for your time! > > Inviato da Outlook > The ITK community is transitioning from this mailing list to > discourse.itk.org. Please join us there! > ________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > https://itk.org/mailman/listinfo/insight-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jon.haitz.legarreta at gmail.com Fri Mar 15 13:52:11 2019 From: jon.haitz.legarreta at gmail.com (=?UTF-8?Q?Jon_Haitz_Legarreta_Gorro=C3=B1o?=) Date: Fri, 15 Mar 2019 13:52:11 -0400 Subject: [vtkusers] [ITK-users] Reading DICOM series and visualize the volume with VTK In-Reply-To: References: Message-ID: In fact, VTK also transitioned to discourse a few weeks ago: https://discourse.vtk.org So for a better experience and to increase your chances of getting an answer, you'd better post your question at discourse rather than to the mailing lists. HTH, JON HAITZ On Fri, Mar 15, 2019 at 12:58 PM D?enan Zuki? wrote: > > Hi Marco, > > that is more of a VTK question than ITK one, best directed at vtkusers at vtk.org. Also, ITK has migrated to a new forum. Please post further ITK-related questions there instead of this mailing list. > > Regards, > D?enan > > On Fri, Mar 15, 2019 at 12:54 PM Marco Festugato wrote: >> >> Hi Dzenan and thank u for your answer I've tried to do as u suggested, but i receive an error telling me that my mapper doesnt accept ''scalar cells''...maybe this connector doesnt work with my mapper? i've tried to simply add the 'connector' to my pipeline: >> >> reader -> connector -> mapper -> volume -> renderer -> window >> >> Here's my code if u want to check it (it still needs a bit of cleaning)...i would appreciate it a lot!! I need this to work for my project :'( >> >> // VTK includes >> #include "vtkDICOMImageReader.h" >> #include "vtkImageData.h" >> #include "vtkRenderer.h" >> #include "vtkRenderWindow.h" >> #include "vtkRenderWindowInteractor.h" >> #include "vtkVolume.h" >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include >> #include "vtkVersion.h" >> #include "vtkImageViewer.h" >> #include "vtkImageMapper3D.h" >> #include "vtkRenderWindowInteractor.h" >> #include "vtkSmartPointer.h" >> #include "vtkImageActor.h" >> #include "vtkInteractorStyleImage.h" >> #include "vtkRenderer.h" >> #include "itkImage.h" >> #include "itkGDCMImageIO.h" >> #include "itkGDCMSeriesFileNames.h" >> #include "itkImageSeriesReader.h" >> #include "itkImageFileWriter.h" >> >> int main(int argc, char *argv[]) >> { >> // Verify the number of parameters in the command line >> if( argc < 2) >> { >> std::cerr << "Usage: " << std::endl; >> std::cerr << argv[0] << " DICOMimagesDirectory " << std::endl; >> return EXIT_FAILURE; >> } >> // Software Guide : BeginCodeSnippet >> typedef signed short PixelType; >> const unsigned int Dimension = 3; >> typedef itk::Image< PixelType, Dimension > ImageType; >> typedef itk::ImageToVTKImageFilter ConnectorType; >> >> ConnectorType::Pointer connector = ConnectorType::New(); >> >> // We use the image type for instantiating the type of the series reader and >> // for constructing one object of its type. >> >> typedef itk::ImageSeriesReader< ImageType > ReaderType; >> ReaderType::Pointer reader = ReaderType::New(); >> >> // A GDCMImageIO object is created and connected to the reader. This object is >> // the one that is aware of the internal intricacies of the DICOM format. >> // >> >> typedef itk::GDCMImageIO ImageIOType; >> ImageIOType::Pointer dicomIO = ImageIOType::New(); >> >> reader->SetImageIO( dicomIO ); >> >> using NamesGeneratorType = itk::GDCMSeriesFileNames; >> NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New(); >> >> nameGenerator->SetUseSeriesDetails( true ); >> nameGenerator->SetDirectory( argv[1] ); >> >> try >> { >> std::cout << std::endl << "The directory: " << std::endl; >> std::cout << std::endl << argv[1] << std::endl << std::endl; >> std::cout << "Contains the following DICOM Series: "; >> std::cout << std::endl << std::endl; >> >> >> // Software Guide : BeginLatex >> // >> // The GDCMSeriesFileNames object first identifies the list of DICOM series >> // present in the given directory. We receive that list in a reference >> // to a container of strings and then we can do things like print out all >> // the series identifiers that the generator had found. Since the process of >> // finding the series identifiers can potentially throw exceptions, it is >> // wise to put this code inside a \code{try/catch} block. >> // >> >> >> typedef std::vector< std::string > SeriesIdContainer; >> >> const SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs(); >> >> // Given that it is common to find multiple DICOM series in the same directory, >> // we must tell the GDCM classes what specific series we want to read. In >> // this example we do this by checking first if the user has provided a series >> // identifier in the command line arguments. If no series identifier has been >> // passed, then we simply use the first series found during the exploration of >> // the directory. >> >> >> std::string seriesIdentifier; >> >> seriesIdentifier = seriesUID.begin()->c_str(); >> >> std::cout << std::endl << std::endl; >> std::cout << "Now reading series: " << std::endl << std::endl; >> std::cout << seriesIdentifier << std::endl; >> std::cout << std::endl << std::endl; >> >> >> // We pass the series identifier to the name generator and ask for all the >> // filenames associated to that series. This list is returned in a container of >> // strings by the \code{GetFileNames()} method. >> >> >> typedef std::vector< std::string > FileNamesContainer; >> FileNamesContainer fileNames; >> >> fileNames = nameGenerator->GetFileNames( seriesIdentifier ); >> >> // >> // The list of filenames can now be passed to the \doxygen{ImageSeriesReader} >> // using the \code{SetFileNames()} method. >> >> >> reader->SetFileNames( fileNames ); >> >> // Finally we can trigger the reading process by invoking the \code{Update()} >> // method in the reader. This call as usual is placed inside a \code{try/catch} >> // block. >> >> try >> { >> reader->Update(); >> } >> catch (itk::ExceptionObject &ex) >> { >> std::cout << ex << std::endl; >> return EXIT_FAILURE; >> } >> } >> catch (itk::ExceptionObject &ex) >> { >> std::cout << ex << std::endl; >> return EXIT_FAILURE; >> } >> >> // Visualization pipeline >> >> // Create the renderer, render window and interactor >> vtkRenderer *renderer = vtkRenderer::New(); >> vtkRenderWindow *renWin = vtkRenderWindow::New(); >> renWin->AddRenderer(renderer); >> >> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New(); >> iren->SetRenderWindow(renWin); >> >> // Read the data >> vtkImageData *input = nullptr; >> >> /* vtkDICOMImageReader *reader = vtkDICOMImageReader::New(); >> // vtkTIFFReader *reader = vtkTIFFReader::New(); >> reader->SetFileName(argv[1]); */ >> // reader->Update(); // read data >> >> >> connector->SetInput(reader->GetOutput()); >> >> // Create our volume and mapper >> vtkVolume *volume = vtkVolume::New(); >> vtkFixedPointVolumeRayCastMapper *mapper = vtkFixedPointVolumeRayCastMapper::New(); >> // vtkVolumeRayCastCompositeFunction *compositeFunction = vtkVolumeRayCastCompositeFunction::New(); >> vtkInteractorStyleTrackballCamera *styleCamera = vtkInteractorStyleTrackballCamera::New(); >> >> // connect up the volume to the property and the mapper >> mapper -> SetInputData( connector -> GetOutput() ); >> mapper -> SetSampleDistance( 0.1 ); >> >> vtkSmartPointer volumeProperty = vtkSmartPointer::New(); >> >> >> volumeProperty->SetInterpolationTypeToLinear(); // better image quality but computation's longer >> >> >> vtkSmartPointer scalarOpacity = vtkSmartPointer::New(); >> vtkSmartPointer gradientOpacity = vtkSmartPointer::New(); >> >> scalarOpacity->AddPoint(0, 0.00); >> scalarOpacity->AddPoint(500, 0.15); >> scalarOpacity->AddPoint(1000, 0.15); >> scalarOpacity->AddPoint(1150, 0.85); >> >> >> gradientOpacity->AddPoint(0, 0.0); >> gradientOpacity->AddPoint(90, 0.5); >> gradientOpacity->AddPoint(100, 1.0); >> >> >> //set the transfer functions to the property >> volumeProperty->SetScalarOpacity(scalarOpacity); >> volumeProperty->SetGradientOpacity(gradientOpacity); >> >> //set the property to the volume >> >> volume->SetProperty(volumeProperty); >> >> volume->SetMapper( mapper ); >> iren -> SetInteractorStyle(styleCamera); >> // Set the default window size >> renWin->SetSize(600,600); >> >> // Add the volume to the scene >> renderer->AddVolume( volume ); >> >> // interact with data >> renWin->Render(); >> iren -> Start(); >> >> >> return EXIT_SUCCESS; >> } >> >> >> >> Inviato da Outlook >> ________________________________ >> Da: D?enan Zuki? >> Inviato: venerd? 15 marzo 2019 17:19 >> A: Marco Festugato >> Cc: insight-users at itk.org >> Oggetto: Re: [ITK-users] Reading DICOM series and visualize the volume with VTK >> >> Hi Marco, >> >> you could combine that example with VTK VolumeRendering example and connect them using ITKVTKGlue. >> >> Regards, >> D?enan >> >> On Fri, Mar 15, 2019 at 7:00 AM Marco Festugato wrote: >> >> Hi guys! I'm very new to ITK-VTK...what i have to do is reading 199 dicom >> images using ITK and visualize the volume using VTK. >> Using the example "DicomSeriesReadImageWrite2" im able to read the series >> and create a 3D volume but i dont know how to visualize it with VTK! >> Any help? :) >> Thank u for your time! >> >> Inviato da Outlook >> The ITK community is transitioning from this mailing list to discourse.itk.org. Please join us there! >> ________________________________ >> Powered by www.kitware.com >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Kitware offers ITK Training Courses, for more information visit: >> http://www.kitware.com/products/protraining.php >> >> Please keep messages on-topic and check the ITK FAQ at: >> http://www.itk.org/Wiki/ITK_FAQ >> >> Follow this link to subscribe/unsubscribe: >> https://itk.org/mailman/listinfo/insight-users > > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers From spiess.benjamin at yahoo.de Fri Mar 15 16:55:57 2019 From: spiess.benjamin at yahoo.de (BennyS) Date: Fri, 15 Mar 2019 13:55:57 -0700 (MST) Subject: [vtkusers] VTK for visualizing 3D Networks In-Reply-To: References: <1552226456737-0.post@n5.nabble.com> Message-ID: <1552683357223-0.post@n5.nabble.com> VTK - Users mailing list wrote > Hi Benny, > Have you seen this? > https://www.westgrid.ca/events/westgrid_online_workshop_3d_graphs_networkx_vtk_and_paraview > It certainly shows that what you want is possible.... > I'd also advise looking at more of the VTK examples - I think there's a > Glyph Mapper which will change the size/color of the spheres based on a > data value for you. > HTH, > Aron Hi Aron, thanks for your response! Yes, I've already came across this youtube tutorial/Powerpoint slides. Unfortunately, most of the magic is part of his "writeObjects" functions, which he does not show neither in his slides nor in his video. Afterwards, he using the data and working on it using paraview. My approach was (or still is) to do all work required in Python (.py). -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From spiess.benjamin at yahoo.de Sat Mar 16 11:20:43 2019 From: spiess.benjamin at yahoo.de (BennyS) Date: Sat, 16 Mar 2019 08:20:43 -0700 (MST) Subject: [vtkusers] VTK for visualizing 3D Networks In-Reply-To: <1552683357223-0.post@n5.nabble.com> References: <1552226456737-0.post@n5.nabble.com> <1552683357223-0.post@n5.nabble.com> Message-ID: <1552749643365-0.post@n5.nabble.com> I am not sure if I can edit my post here, so I am adding a second reply I found a way to do it but I am struggling at converting scalar values to RGB values for my tubes: For the spheres I used / inputData = vtk.vtkPolyData() inputData.SetPoints(nodePoints) inputData.GetPointData().SetScalars(scalararray) [...] glyphPoints = vtk.vtkGlyph3D() glyphPoints.SetInputData(inputData) glyphPoints.SetSourceConnection(sphere.GetOutputPort()) glyphPoints.ClampingOff() glyphPoints.SetColorModeToColorByScalar() glyphPoints.SetScaleFactor(0.05) / and for the tubes I currently use: / edgeData.SetPoints(points) edgeData.SetLines(lines) edgeData.GetPointData().SetScalars(scalarvalues) / However, I am still struggling at converting my scalar tube values to an RGB array which I can use for the mapper with the command / profileMapper.SetScalarModeToUsePointFieldData() profileMapper.SelectColorArray("Colors") / I found the class vtkScalarsToColors which seems pretty useful in my case, but I think I am too stupid to understand how it is working after crawling through the class library and some posts/threads. Can somebody support me at converting a scalar value to an RGB color for the tubes? Thanks! -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From s.turner17 at imperial.ac.uk Mon Mar 18 12:56:50 2019 From: s.turner17 at imperial.ac.uk (Turner, Shruti) Date: Mon, 18 Mar 2019 16:56:50 +0000 Subject: [vtkusers] Python Remote Rendering Issues when Updating Model Message-ID: <67F41FC4-4EF8-4719-BAD3-C8ACF178B51F@ic.ac.uk> Hi all, I am trying to get vtk remote rendering working for a web application and I feel like I?m almost there, but missing something minor. When running my remote rendering code, I can see my model updating and it works perfectly on the view of the server side model. However, vtk never opens the web socket link and I am, therefore, unable to view this in a browser window. It appears to be a result of the vtk callback function which is used to update the model, but I?m not sure how to solve this problem. Any pointers would be greatly appreciated! Thanks, Shruti Here is my server side code: vtk_server.py # import to process args import sys import os # import maths modules import numpy as np from scipy.interpolate import interp1d from scipy import interpolate from scipy import ndimage from ReadCSV import readcsv # from Interpolation import * # import vtk modules. import vtk from vtk.web import protocols from vtk.web import wslink as vtk_wslink from wslink import server from vtkTimerCallback import vtkTimerCallback # import utility modules import csv import time import argparse # ============================================================================= # Create custom ServerProtocol class to handle clients requests # ============================================================================= class _WebCone(vtk_wslink.ServerProtocol): # Application configuration view = None authKey = "wslink-secret" sensor_locations = [21035, 20577, 19625, 19121, 18110, 17567, 16501, 16495, 15942, 15347, 15314, 14658, 20506, 20027, 19544, 19044, 18546, 18031, 16957, 16416, 15851, 14574, 13733, 3424, 20501, 19525, 19025, 18527, 18013, 17488, 16962, 16427, 15233, 14578, 13746, 21726, 19982, 18981, 18478, 17427, 16902, 16361, 15793, 15188, 14536, 13691, 3370, 4899, 19446, 18434, 17382, 16856, 16310, 15122, 14465, 13599, 13609, 3291, 4957, 67, 19904, 19910, 18905, 18393, 17877, 17353, 16816, 15694, 15078, 14423, 13547, 3188, 19856, 19363, 18864, 17826, 17297, 17304, 16763, 16218, 15645, 15036, 13503, 3106, 19811, 18812, 18816, 17780, 17249, 16714, 16169, 15595, 14974, 14314, 13405, 21809, 19780, 19282, 18260, 17742, 16671, 15547, 14924, 14254, 2786, 2128, 975, 364, 19732, 18732, 18214, 17161, 16617, 16069, 14873, 13299, 2749, 925, 320, 866, 20624, 20151, 19660, 18656, 17626, 16571, 16015, 15436, 14153, 13250, 2675, 2009, 20658, 20162, 19178, 18174, 17650, 16577, 15458, 14822, 13236, 2678, 2652, 2634] sensor_pressures = readcsv("S003_norm_walk.csv") min_pressure = 0 # Standard scale - min pressure reading max_pressure = 1 # Standard scale - max pressure reading stl_filename = "newpivot.stl" visualisationIndex = 0 allPressures = [] def initialize(self): global renderer, renderWindow, renderWindowInteractor, cone, mapper, actor # Bring used components self.registerVtkWebProtocol(protocols.vtkWebMouseHandler()) self.registerVtkWebProtocol(protocols.vtkWebViewPort()) self.registerVtkWebProtocol(protocols.vtkWebViewPortImageDelivery()) self.registerVtkWebProtocol(protocols.vtkWebViewPortGeometryDelivery()) # Update authentication key to use self.updateSecret(_WebCone.authKey) # Create default pipeline (Only once for all the session) if not _WebCone.view: # VTK specific code reader = vtk.vtkSTLReader() reader.SetFileName(_WebCone.stl_filename) reader.Update() # This is necessary to have the data ready to read. obj = reader.GetOutputDataObject(0) lut = vtk.vtkLookupTable() lut.SetTableRange(_WebCone.min_pressure, _WebCone.max_pressure) lut.SetHueRange(0.0, 0.9) lut.SetSaturationRange(0.5, 1) lut.SetValueRange(0.7, 1) lut.Build() renderer = vtk.vtkRenderer() renderer.SetBackground(.1, .2, .4) renderWindow = vtk.vtkRenderWindow() renderWindow.AddRenderer(renderer) renderWindowInteractor = vtk.vtkRenderWindowInteractor() renderWindowInteractor.SetRenderWindow(renderWindow) renderWindowInteractor.GetInteractorStyle().SetCurrentStyleToTrackballCamera() obj = _WebCone.interpolate(self, obj) mapper = vtk.vtkPolyDataMapper() mapper.SetInputDataObject(obj) mapper.SetScalarRange(_WebCone.min_pressure, _WebCone.max_pressure) mapper.SetLookupTable(lut) actor = vtk.vtkActor() actor.SetMapper(mapper) # create the scalar_bar scalar_bar = vtk.vtkScalarBarActor() scalar_bar.SetOrientationToHorizontal() scalar_bar.SetLookupTable(lut) scalar_bar.SetTitle("Scale") scalar_bar.SetNumberOfLabels(8) scalar_bar.GetTitleTextProperty().SetFontSize(15) scalar_bar.GetLabelTextProperty().SetFontSize(10) # create the scalar_bar_widget scalar_bar_widget = vtk.vtkScalarBarWidget() scalar_bar_widget.SetInteractor(renderWindowInteractor) scalar_bar_widget.SetScalarBarActor(scalar_bar) scalar_bar_widget.On() renderer.AddActor(actor) renderer.ResetCamera() renderWindow.Render() # CALL BACK STUFF cb = vtkTimerCallback(self.sensor_pressures, self.sensor_locations, obj, self.allPressures, self.visualisationIndex, obj.GetNumberOfPoints()) cb.actor = actor renderWindowInteractor.AddObserver('TimerEvent', cb.execute) timerID = renderWindowInteractor.CreateRepeatingTimer(20) renderWindowInteractor.Start() # VTK Web application specific _WebCone.view = renderWindowInteractor self.getApplication().GetObjectIdMap().SetActiveObject("VIEW", renderWindowInteractor) def interpolate(self, obj): filename = "Points with coordinates.csv" file = open(filename, "r") reader = csv.reader(file, delimiter=";") rownum = 0 values = [] for row in reader: if rownum == 0: rownum += 1 else: strrow = row new = strrow[0].split(',') values.append(new) rownum += 1 file.close() xi = [] yi = [] zi = [] for value in values: xi.append(value[1]) yi.append(value[2]) zi.append(value[3]) xfixed = [] yfixed = [] zfixed = [] for value in xi: xfixed.append(float(value)) for value in yi: yfixed.append(float(value)) for value in zi: zfixed.append(float(value)) xpressures = [] ypressures = [] zpressures = [] for sensor in _WebCone.sensor_locations: xpressures.append(xfixed[sensor]) ypressures.append(yfixed[sensor]) zpressures.append(zfixed[sensor]) if len(_WebCone.allPressures) == 0: file = open("S003_norm_walk.csv", 'r') reader = csv.reader(file, delimiter=';') for row in reader: _WebCone.allPressures.append(row) file.close() values = [] new = _WebCone.allPressures[_WebCone.visualisationIndex][0].split(',') values.append(new) pressures_new = values[0] pressures = [] for item in pressures_new[1:145]: pressures.append(float(item)) vertex_pressures = np.zeros(obj.GetNumberOfPoints()) xpressures= np.array(xpressures) ypressures= np.array(ypressures) zpressures= np.array(zpressures) xfixed =np.array(xfixed) yfixed = np.array(yfixed) zfixed = np.array(zfixed) pressures = np.array(pressures) # RBF shiv interpolation f = interpolate.Rbf(xpressures,ypressures,zpressures,pressures,function='cubic') vertex_pressures = f(xfixed,yfixed,zfixed) pressures = vtk.vtkDoubleArray() pressures.SetName("Pressures") # Loop through the points in the vtkPolyData and record the height in the # 'heights' array. for i in range(obj.GetNumberOfPoints()): p = vertex_pressures[i] pressures.InsertNextValue(p) # Add this array to the point data as a scalar. obj.GetPointData().SetScalars(pressures) return obj # ============================================================================= # Main: Parse args and start server # ============================================================================= if __name__ == "__main__": # Create argument parser parser = argparse.ArgumentParser(description="VTK/Web Cone web-application") # Add default arguments server.add_arguments(parser) # Extract arguments args = parser.parse_args() # Configure our current application _WebCone.authKey = args.authKey # Start server server.start_webserver(options=args, protocol=_WebCone) vtktimercallback.py # import to process args import sys import os # import maths modules import numpy as np from scipy.interpolate import interp1d from scipy import interpolate from scipy import ndimage from ReadCSV import readcsv # from Interpolation import * # import vtk modules. import vtk from vtk.web import protocols from vtk.web import wslink as vtk_wslink from wslink import server # import utility modules import csv import time class vtkTimerCallback(): def __init__(self, sensors_values, sensor_locations, obj, all_pressures, visualisationIndex, number_of_points): self.timer_count = 0 self.changed = False self.sensors_values = sensors_values self.sensor_locations = sensor_locations self.obj = obj self.all_pressures = all_pressures self.visualisationIndex = visualisationIndex self.number_of_points = number_of_points def execute(self, obj, x): self.changed = False filename = "Points with coordinates.csv" file = open(filename, "r") reader = csv.reader(file, delimiter=";") rownum = 0 values = [] for row in reader: if rownum == 0: rownum += 1 else: strrow = row new = strrow[0].split(',') values.append(new) rownum += 1 file.close() if (self.timer_count + 500) < rownum: xi = [] yi = [] zi = [] for value in values: xi.append(value[1]) yi.append(value[2]) zi.append(value[3]) xfixed = [] yfixed = [] zfixed = [] for value in xi: xfixed.append(float(value)) for value in yi: yfixed.append(float(value)) for value in zi: zfixed.append(float(value)) xpressures = [] ypressures = [] zpressures = [] for sensor in self.sensor_locations: xpressures.append(xfixed[sensor]) ypressures.append(yfixed[sensor]) zpressures.append(zfixed[sensor]) if len(self.all_pressures) == 0: file = open("S003_norm_walk.csv", 'r') reader = csv.reader(file, delimiter=';') for row in reader: self.all_pressures.append(row) file.close() values = [] new = self.all_pressures[self.timer_count][0].split(',') values.append(new) pressures_new = values[0] pressures = [] for item in pressures_new[1:145]: pressures.append(float(item)) # Build vertex_pressures via interpolation #GetNumberOfPoints gets the points that VTK has assigned to the map #array of vz-vy-vz triplets #what does line 45 return.... vertex_pressures = np.zeros(self.number_of_points) # for i in range(0, len(sensor_locations)): # p = pressures[i] # vertex_pressures[sensor_locations[i]] = pressures[i] # coord = np.array((xpressures,ypressures)).T # newcoord = np.array((xfixed,yfixed)).T xpressures= np.array(xpressures) ypressures= np.array(ypressures) zpressures= np.array(zpressures) xfixed =np.array(xfixed) yfixed = np.array(yfixed) zfixed = np.array(zfixed) pressures = np.array(pressures) # RBF shiv interpolation f = interpolate.Rbf(xpressures,ypressures,zpressures,pressures,function='cubic') vertex_pressures = f(xfixed,yfixed,zfixed) # This is an array that I am creating to store the heights of the points. I # will use this as a scalar field on the 'obj' so that the lookup table can be # used to color it. You could obviously make the array anything you wanted, # such as x or y or squared distance from some other point, for instance. pressures = vtk.vtkDoubleArray() pressures.SetName("Pressures") # Loop through the points in the vtkPolyData and record the height in the # 'heights' array. for i in range(self.number_of_points): p = vertex_pressures[i] pressures.InsertNextValue(p) # Add this array to the point data as a scalar. self.obj.GetPointData().SetScalars(pressures) # Visualization stuff ... you need to tell the mapper about the scalar field # and the lookup table. The rest of this is pretty standard stuff. mapper = vtk.vtkPolyDataMapper() mapper.SetInputDataObject(self.obj) iren = obj iren.GetRenderWindow().Render() self.timer_count += 500 -------------- next part -------------- An HTML attachment was scrubbed... URL: From esmeralda.ruiz at alma3d.com Tue Mar 19 07:27:50 2019 From: esmeralda.ruiz at alma3d.com (zandarina) Date: Tue, 19 Mar 2019 04:27:50 -0700 (MST) Subject: [vtkusers] Wrong coordinates from 2d slices into 3d volume to 2d Message-ID: <1552994870414-0.post@n5.nabble.com> dear all I get the volume [0..80,0.80,0,80] and i cut it into slices and i get the points in vtk coordinates but when i want to draw the points over the volume i see the volume is smaller than the 2d slices. Should i multiply each x* size of the volume_x / size_x in the 2d slices ? And the same for y and z? Thank you -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From b.almatrouk at outlook.com Tue Mar 19 09:01:50 2019 From: b.almatrouk at outlook.com (German26) Date: Tue, 19 Mar 2019 06:01:50 -0700 (MST) Subject: [vtkusers] Picking point clouds inside vtkBoxWidget Message-ID: <1553000510121-0.post@n5.nabble.com> Hello, I have just started experimenting with VTK library. So far in my project, I have created the following cube structure: struct Cube { Cube(){ type="unknown"; this->detail.center_x=this->detail.center_y=this->detail.center_z=0; this->detail.yaw=2; this->detail.length=this->detail.width=this->detail.height=1; } Cube(const double p1[3],const double p2[3],string type_="unknown"){ type=type_; this->detail.center_x=(p1[0]+p2[0])/2; this->detail.center_y=(p1[1]+p2[1])/2; this->detail.center_z=(p1[2]+p2[2])/2; this->detail.yaw=0; this->detail.length=p2[0]-p1[0]; this->detail.width=p2[1]-p1[1]; this->detail.height=p2[2]-p1[2]; } string type; union{ double data[7]; struct{ double center_x; double center_y; double center_z; double length; double width; double height; double yaw; } detail; }; string toString(){ char buffer [200]; sprintf(buffer,"%s %f %f %f %f %f %f %f", type.c_str(),data[0],data[1],data[2],data[3],data[4],data[5],data[6]); return std::string(buffer);; } }; When the cube is selected, its vtkBoxWidget gets activated as follow: boxWidget = vtkSmartPointer::New(); boxWidgetCallback0 = vtkSmartPointer::New(); boxWidgetCallback0->setAnno(this); boxWidget->SetInteractor(interactor); double bounds[6]={-1,1,-1,1,-1,1}; boxWidget->PlaceWidget(bounds); vtkSmartPointer t=vtkSmartPointer::New(); t->DeepCopy(actor->GetUserTransform()); boxWidget->SetTransform(t); boxWidget->SetHandleSize(0.01); boxWidget->GetOutlineProperty()->SetAmbientColor(1.0,0.0,0.0); boxWidget->AddObserver( vtkCommand::InteractionEvent, boxWidgetCallback0 ); boxWidget->On(); In my program I open a point cloud file, where the point clouds can be viewed in the visalizer and I can add as many cubes on the point clouds as I can. My question is, is there a possible way to pick all the point clouds inside the selected vtkBoxWidget so I can then remove these points inside the box, would getPolyData work for this purpose? Any help is appreciated :) -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From msmerps at gmail.com Tue Mar 19 11:27:02 2019 From: msmerps at gmail.com (The Merper) Date: Tue, 19 Mar 2019 11:27:02 -0400 Subject: [vtkusers] raycasting initially renders at low resolution Message-ID: Hi VTK-experts, I'm working on an app for viewing CT scans in 3D or 2D. When I initially render the CT scan in 3D, the raycast rendering looks great (see the attached normalResolution.png). However, when I switch from a 2D view (performed via a vtkImageViewer2) back to the 3D raycast rendering, the resolution is low (see the attached lowResolution.png). As soon as I interact with the 3D rendering, the resolution returns to normal. Can anyone tell me how to fix this? I have AutoAdjustSampleDistance set to "off" on the vtkFixedPointVolumeRayCastMapper that I'm using for the raycasting. I would have thought that this would keep the resolution of the raycasting constant. thank you in advance, -Merps -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: lowResolution.png Type: image/png Size: 77735 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: normalResolution.png Type: image/png Size: 76644 bytes Desc: not available URL: From cory.quammen at kitware.com Tue Mar 19 11:43:54 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 19 Mar 2019 11:43:54 -0400 Subject: [vtkusers] raycasting initially renders at low resolution In-Reply-To: References: Message-ID: Hello, Would you mind posting your question to https://discourse.vtk.org? Community support for VTK is transitioning to that forum, and you are more likely to get an answer there. Thanks, Cory On Tue, Mar 19, 2019 at 11:27 AM The Merper wrote: > Hi VTK-experts, > I'm working on an app for viewing CT scans in 3D or 2D. When I > initially render the CT scan in 3D, the raycast rendering looks great (see > the attached normalResolution.png). However, when I switch from a 2D view > (performed via a vtkImageViewer2) back to the 3D raycast rendering, the > resolution is low (see the attached lowResolution.png). As soon as I > interact with the 3D rendering, the resolution returns to normal. > Can anyone tell me how to fix this? I have AutoAdjustSampleDistance set > to "off" on the vtkFixedPointVolumeRayCastMapper that I'm using for the > raycasting. I would have thought that this would keep the resolution of the > raycasting constant. > thank you in advance, > -Merps > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From geoff.woodcock at velo3d.com Tue Mar 19 15:59:42 2019 From: geoff.woodcock at velo3d.com (Geoff Woodcock) Date: Tue, 19 Mar 2019 19:59:42 +0000 Subject: [vtkusers] Issues with QVTKOpenGLWidget and VTK8.2 Message-ID: Hi, We have an application based on Qt and Vtk. It runs well on VTK8.1 However, after upgrading to VTK8.2, we experience problems when we first call vtkRenderer::Render(). This call ultimately ends up calling vtkOpenGLState::CheckState, and this fuction emits a lot of error messages which are listed below. I understand that the vtkOpenGLState is not initialized properly, but I can't seem to figure out what the proper order of initialization is supposed to be. I am calling QSurfaceFormat::setDefaultFormat() before creating my QApplication object. The render window initialization is pretty straightforward: _vtkWidget = new QVTKOpenGLWidget((QWidget *)nullptr); _vtkWidget->setEnableHiDPI(true); // VTK Renderer _renderer = vtkSmartPointer::New(); _renderer->SetLayer(0); _rendererOverlay = vtkSmartPointer::New(); _rendererOverlay->SetLayer(1); // VTK/Qt wedded vtkNew renderWindow; _qvtkWidget>SetRenderWindow(renderWindow); renderWindow->SetNumberOfLayers(2); renderWindow->AddRenderer(_renderer); renderWindow->AddRenderer(_rendererOverlay); The vtkOpenGLState::Initialize function is never called I have tried switching from QVTKOpenGLWidget to QVTKOpenGLNativeWidget, which fixes the state initialization problems (but I am unable to use it, since it causes problems with line drawing as documented here: https://gitlab.kitware.com/vtk/vtk/issues/17154). So the code works with 8.1 and also works with QVTKOpenGLNativeWidget. Can someone help me understand what I am doing wrong with the initialization? Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 95 Error in cache state for GL_DEPTH_WRITEMASK Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 106 Error in cache state for GL_COLOR_WRITEMASK Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 124 Error in cache state for GL_CULL_FACE Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 131 Error in cache state for GL_MULTISAMPLE Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 144 Error in cache state for GL_STENCIL_TEST Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 162 Error in cache state for GL_VIEWPORT Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 173 Error in cache state for GL_SCISSOR_BOX Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 179 Error in cache state for GL_CULL_FACE_MODE Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 185 Error in cache state for GL_DEPTH_FUNC Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 191 Error in cache state for GL_BLEND_SRC_RGB Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 197 Error in cache state for GL_BLEND_SRC_ALPHA Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 203 Error in cache state for GL_BLEND_DST_RGB Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 209 Error in cache state for GL_BLEND_DST_ALPHA Generic Warning: In d:\projects\flow-2\tools\conan\thirdparty\build\libvtk\rendering\opengl2\vtkopenglstate.cxx, line 222 Error in cache state for GL_COLOR_CLEAR_VALUE CONFIDENTIALITY NOTICE:This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited -------------- next part -------------- An HTML attachment was scrubbed... URL: From esmeralda.ruiz at alma3d.com Wed Mar 20 08:55:19 2019 From: esmeralda.ruiz at alma3d.com (Esmeralda Ruiz) Date: Wed, 20 Mar 2019 13:55:19 +0100 Subject: [vtkusers] mouse coordinates from a 3d volume with wrong y Message-ID: Dear all, I want to get the positions of a volume using the mouse for segmentation. But the y coordinate is wrong. I only get the x and z fine but the depth (y) is not correct. I use this code to get the position. Is there any way to obtain the slice (y position) thanks // Get the location of the click (in window coordinates) int* pos = this->GetInteractor()->GetEventPosition(); vtkSmartPointer picker = vtkSmartPointer::New(); picker->SetTolerance(0.0005); //this->GetDefaultRenderer()->Clear(); // Pick from this location. picker->Pick(pos[0], pos[1], 0, global_renderer); double* worldPosition = picker->GetPickPosition(); std::cout << "Cell id is: " << picker->GetCellId() << std::endl; if (picker->GetCellId() != -1) { std::cout << "Pick position is: " << worldPosition[0] << " " << worldPosition[1] << " " << worldPosition[2] << endl; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From lasso at queensu.ca Wed Mar 20 09:25:15 2019 From: lasso at queensu.ca (Andras Lasso) Date: Wed, 20 Mar 2019 13:25:15 +0000 Subject: [vtkusers] mouse coordinates from a 3d volume with wrong y In-Reply-To: References: Message-ID: Would you mind posting your question to https://discourse.vtk.org? Community support for VTK is transitioning to that forum, and you are more likely to get an answer there. Thanks, Andras From: vtkusers On Behalf Of Esmeralda Ruiz Sent: Wednesday, March 20, 2019 8:55 AM To: vtkusers at vtk.org Subject: [vtkusers] mouse coordinates from a 3d volume with wrong y Dear all, I want to get the positions of a volume using the mouse for segmentation. But the y coordinate is wrong. I only get the x and z fine but the depth (y) is not correct. I use this code to get the position. Is there any way to obtain the slice (y position) thanks // Get the location of the click (in window coordinates) int* pos = this->GetInteractor()->GetEventPosition(); vtkSmartPointer picker = vtkSmartPointer::New(); picker->SetTolerance(0.0005); //this->GetDefaultRenderer()->Clear(); // Pick from this location. picker->Pick(pos[0], pos[1], 0, global_renderer); double* worldPosition = picker->GetPickPosition(); std::cout << "Cell id is: " << picker->GetCellId() << std::endl; if (picker->GetCellId() != -1) { std::cout << "Pick position is: " << worldPosition[0] << " " << worldPosition[1] << " " << worldPosition[2] << endl; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoppes at mbfbioscience.com Wed Mar 20 10:49:33 2019 From: dhoppes at mbfbioscience.com (Doug Hoppes) Date: Wed, 20 Mar 2019 14:49:33 +0000 Subject: [vtkusers] vtkchartxy in MFC Message-ID: Does anyone have an example of a vtk chart showing in an MFC dialog? My code compiles but doesn't show anything. I tried setting the background color of a blank chart but the control area is just white. Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From dougbrennan60 at gmail.com Wed Mar 20 11:30:05 2019 From: dougbrennan60 at gmail.com (scotsman60) Date: Wed, 20 Mar 2019 08:30:05 -0700 (MST) Subject: [vtkusers] How to retrieve cells by Type from a vtkUnstructuredGrid? Message-ID: <1553095805272-0.post@n5.nabble.com> Hello, I have a vtkUnstructuredGrid comprising multiple cell types - hexas, tetras, trias, quads etc. I need to process the cells by type so I'm looking for a way to extract the cells by type. I looked at the vtkThresholdFilter but it seems like I first need to have a cell scalar array to identify the cell types I'm pursuing the idea of getting an array of cell types either from the vtkUnstructuredGrid or from a vtkCellArray - but I can't find the API's I need to accomplish this. Any/all ideas will be gratefully received. Thanks, Doug -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From mjordan at live.at Mon Mar 25 10:18:39 2019 From: mjordan at live.at (M. Jordan) Date: Mon, 25 Mar 2019 14:18:39 +0000 Subject: [vtkusers] Get voxel values from vtkNIFTIImageReader Message-ID: Hi, I am using the vtkNIFTIImageReader to use Nifti files within VTK (e.g. for creating surfaces using marching cubes). Now I want to simply get the intensity of a certain voxel (e.g. 4 / 17 / 52). Nevertheless, I always get a value of zero. vtkSmartPointer readerVol = vtkSmartPointer::New(); readerVol->SetFileName(image.toStdString().c_str()); readerVol->Update(); vtkSmartPointer volume = vtkSmartPointer:: New(); volume->DeepCopy(readerVol->GetOutput()); float value = volume->GetScalarComponentAsFloat(4, 17, 52, 0); I also tried to do it like this: https://vtk.org/Wiki/VTK/Examples/Cxx/ImageData/IterateImageData, but it is the same. When I load the image into an external Nifti viewer, the viewer shows the expected voxel intensity for the given voxel. What I am doing wrong? Thank you very much! Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.gobbi at gmail.com Mon Mar 25 10:39:16 2019 From: david.gobbi at gmail.com (David Gobbi) Date: Mon, 25 Mar 2019 08:39:16 -0600 Subject: [vtkusers] Get voxel values from vtkNIFTIImageReader In-Reply-To: References: Message-ID: Hi M., It doesn't look like you are doing anything wrong, so the first thing to do is make sure the reader actually read the image. You can ask the reader to print the NIfTI header: readerVol->Update(); readerVol->GetNIFTIHeader()->Print(std::cout); Likewise, you can print info about the image to make sure the Extent is correct: readerVol->GetOutput()->Print(std::cout); And you can get the range of values stored in the image to check whether they're all zero: double range[2]; readerVol->GetOutput()->GetPointData()->GetScalars()->GetRange(range); std::cout << range[0] << ", " << range[1] << std::endl; Hope this helps, David On Mon, Mar 25, 2019 at 8:18 AM M. Jordan wrote: > Hi, > > I am using the vtkNIFTIImageReader to use Nifti files within VTK (e.g. for > creating surfaces using marching cubes). > Now I want to simply get the intensity of a certain voxel (e.g. 4 / 17 / > 52). Nevertheless, I always get a value of zero. > > vtkSmartPointer readerVol = > vtkSmartPointer::New(); > readerVol->SetFileName(image.toStdString().c_str()); > readerVol->Update(); > > vtkSmartPointer volume = vtkSmartPointer:: > New(); > volume->DeepCopy(readerVol->GetOutput()); > > float value = volume->GetScalarComponentAsFloat(4, 17, 52, 0); > > I also tried to do it like this: > https://vtk.org/Wiki/VTK/Examples/Cxx/ImageData/IterateImageData, but it > is the same. > > When I load the image into an external Nifti viewer, the viewer shows the > expected voxel intensity for the given voxel. > > What I am doing wrong? > > Thank you very much! > Regards > -------------- next part -------------- An HTML attachment was scrubbed... URL: From esmeralda.ruiz at alma3d.com Mon Mar 25 15:08:19 2019 From: esmeralda.ruiz at alma3d.com (zandarina) Date: Mon, 25 Mar 2019 12:08:19 -0700 (MST) Subject: [vtkusers] reslice using an arbitrary orientation Message-ID: <1553540899712-0.post@n5.nabble.com> Dear all I want to reslice a 3d volume computing the perpendicular between two points x and y. I compute the perpendicular berween point 1, point2 in x and y (z is the same for all points as the poins are obtained of one slice) And then i compute the perpendicular of x and y And i compute the rotation. And i get a blank image. I would like to cut the slice cutting through the perpendicular of those two points. I attach the code. Is there something wrong Any help? Thanks in advance double vt[3]; vt[0] = pts2[0] - pts1[0]; vt[1] = pts2[1] - pts1[1]; vt[2] = pts2[2] - pts1[2]; // it will be 0 as z is the same in all points double perpendicular[3] = { -vt[1],vt[0],0 }; double startPoint[3], endPoint[3]; startPoint[0] = tar_cen[0]; startPoint[1] = tar_cen[1]; startPoint[2] = tar_cen[2]; endPoint[0] = startPoint[0] + perpendicular[0]; endPoint[1] = startPoint[1] + perpendicular[1]; endPoint[2] = startPoint[2] + perpendicular[2]; // Compute a basis double normalizedX[3]; double normalizedY[3]; double normalizedZ[3]; // The X axis is a vector from start to end vtkMath::Subtract(endPoint, startPoint, normalizedX); //double length = vtkMath::Norm(normalizedX); vtkMath::Normalize(normalizedX); // The Z axis is an arbitrary vector cross X double arbitrary[3]; arbitrary[0] = vtkMath::Random(-10, 10); arbitrary[1] = vtkMath::Random(-10, 10); arbitrary[2] = vtkMath::Random(-10, 10); vtkMath::Cross(normalizedX, arbitrary, normalizedZ); vtkMath::Normalize(normalizedZ); // The Y axis is Z cross X vtkMath::Cross(normalizedZ, normalizedX, normalizedY); vtkSmartPointer matrix = vtkSmartPointer::New(); // Create the direction cosine matrix matrix->Identity(); for (unsigned int i = 0; i < 3; i++) { matrix->SetElement(i, 0, normalizedX[i]); matrix->SetElement(i, 1, normalizedY[i]); matrix->SetElement(i, 2, normalizedZ[i]); } // Apply the transforms vtkSmartPointer transform = vtkSmartPointer::New(); transform->Translate(startPoint); transform->Concatenate(matrix); reslice->SetResliceTransform(transform); //Step 3: done reslice->Update(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From Aude.CHENET-ext at galderma.com Mon Mar 25 17:46:56 2019 From: Aude.CHENET-ext at galderma.com (CHENET Aude (External)) Date: Mon, 25 Mar 2019 14:46:56 -0700 Subject: [vtkusers] February Invoice INV-G8264 from CHENET Aude (External) Message-ID: <20190325214703.8500D54D95@smtppromoda2.serv.net.mx> Good Afternoon, Here's your invoice. Thanks for using CHENET Aude (External)! CHENET Aude (External) T 436.114.0690 | O 884.294.0645 EMAIL:Aude.CHENET-ext at galderma.com - Sent from my Samsung device -------------- next part -------------- A non-text attachment was scrubbed... Name: ACC_G8264.doc Type: application/msword Size: 146560 bytes Desc: not available URL: From esmeralda.ruiz at alma3d.com Mon Mar 25 19:27:29 2019 From: esmeralda.ruiz at alma3d.com (Esmeralda Ruiz) Date: Tue, 26 Mar 2019 00:27:29 +0100 Subject: [vtkusers] reslice using an arbitrary orientation In-Reply-To: <1553540899712-0.post@n5.nabble.com> References: <1553540899712-0.post@n5.nabble.com> Message-ID: Dear all i update the question i wrote wrong the perpendicular making changes double perpendicular[3] = { vt[0],0,vt[1] }; but i see that even i compute the perpendicular what it gives it is not what i want. What i want is the slice that intersects in this orientation not to create a new coordinate using this orientation. Any idea? thanks El lun., 25 mar. 2019 a las 20:08, zandarina () escribi?: > Dear all > > I want to reslice a 3d volume computing the perpendicular > between two points x and y. I compute the > perpendicular berween point 1, point2 in x and y (z is the same for all > points as the > poins are obtained of one slice) > > And then i compute the perpendicular of x and y > And i compute the rotation. And i get a blank image. I would like to > cut the slice cutting through the perpendicular of those two points. > > I attach the code. Is there something wrong > > Any help? > > Thanks in advance > > > double vt[3]; > vt[0] = pts2[0] - pts1[0]; > vt[1] = pts2[1] - pts1[1]; > vt[2] = pts2[2] - pts1[2]; // it will be 0 as z is the same in all > points > double perpendicular[3] = { -vt[1],vt[0],0 }; > > double startPoint[3], endPoint[3]; > startPoint[0] = tar_cen[0]; > startPoint[1] = tar_cen[1]; > startPoint[2] = tar_cen[2]; > endPoint[0] = startPoint[0] + perpendicular[0]; > endPoint[1] = startPoint[1] + perpendicular[1]; > endPoint[2] = startPoint[2] + perpendicular[2]; > > // Compute a basis > double normalizedX[3]; > double normalizedY[3]; > double normalizedZ[3]; > > // The X axis is a vector from start to end > vtkMath::Subtract(endPoint, startPoint, normalizedX); > //double length = vtkMath::Norm(normalizedX); > vtkMath::Normalize(normalizedX); > > // The Z axis is an arbitrary vector cross X > double arbitrary[3]; > arbitrary[0] = vtkMath::Random(-10, 10); > arbitrary[1] = vtkMath::Random(-10, 10); > arbitrary[2] = vtkMath::Random(-10, 10); > vtkMath::Cross(normalizedX, arbitrary, normalizedZ); > vtkMath::Normalize(normalizedZ); > > // The Y axis is Z cross X > vtkMath::Cross(normalizedZ, normalizedX, normalizedY); > vtkSmartPointer matrix = > vtkSmartPointer::New(); > > // Create the direction cosine matrix > matrix->Identity(); > for (unsigned int i = 0; i < 3; i++) > { > matrix->SetElement(i, 0, normalizedX[i]); > matrix->SetElement(i, 1, normalizedY[i]); > matrix->SetElement(i, 2, normalizedZ[i]); > } > > // Apply the transforms > vtkSmartPointer transform = > vtkSmartPointer::New(); > transform->Translate(startPoint); > transform->Concatenate(matrix); > > > > > reslice->SetResliceTransform(transform); > > > //Step 3: done > reslice->Update(); > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From esmeralda.ruiz at alma3d.com Tue Mar 26 11:06:41 2019 From: esmeralda.ruiz at alma3d.com (zandarina) Date: Tue, 26 Mar 2019 08:06:41 -0700 (MST) Subject: [vtkusers] vtkImageData only shows one slice in vtkResliceImageViewer Message-ID: <1553612801926-0.post@n5.nabble.com> Dear all, I have a question. I want to show using vtkResliceImageViewer the slices i have got from the reslicer filter. So i append in z the output and i call a fuction to show me the vtkImageData withh all the slices extracted from the reslicer filter. But my surprise is that only show one slice. But if i use the same vtkResliceImageViewer with the whole volume it works propertly. What can i do to show the slices obtained form the reslicer in the viewer. Thanks vtkImageAppend* append1 = vtkImageAppend::New(); //Define Stack in Z append1->SetAppendAxis(2); ... // done reslice->Update(); //Append the slices into an image append1->AddInputData(reslice->GetOutput()); append1->Update(); image_paraxial = append1->GetOutput(); vtkNew image_viewer_; vtkNew renderWindow; SetRenderWindow(renderWindow); image_viewer_->SetRenderWindow(renderWindow); image_viewer_->SetupInteractor(renderWindow->GetInteractor()); //vtkSmartPointer image_data = vtkImageData::SafeDownCast( //scene.get_volume()->GetMapper()->GetInputDataObject(0, 0)); image_viewer_->SetInputData(image_data); image_viewer_->SetSliceOrientationToXY(); image_viewer_->SetSlice(1); image_viewer_->SetResliceModeToAxisAligned(); -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From esmeralda.ruiz at alma3d.com Tue Mar 26 11:52:20 2019 From: esmeralda.ruiz at alma3d.com (Esmeralda Ruiz) Date: Tue, 26 Mar 2019 16:52:20 +0100 Subject: [vtkusers] vtkImageData only shows one slice in vtkResliceImageViewer In-Reply-To: <1553612801926-0.post@n5.nabble.com> References: <1553612801926-0.post@n5.nabble.com> Message-ID: I cheked the extent and it is correct in z from 0..11. Why can,t i scroll the vtkimagedata in the viewer? Thanks El mar., 26 mar. 2019 a las 16:06, zandarina () escribi?: > Dear all, > > I have a question. I want to show using vtkResliceImageViewer the > slices i > have got from the reslicer > filter. So i append in z the output and i call a fuction to show me the > vtkImageData withh all the slices extracted from the reslicer filter. But > my > surprise is that only show one slice. But if i use the same > vtkResliceImageViewer with the whole volume it works propertly. What can i > do to show the slices obtained form the reslicer in the viewer. > > Thanks > > > vtkImageAppend* append1 = vtkImageAppend::New(); > //Define Stack in Z > append1->SetAppendAxis(2); > > ... > > // done > reslice->Update(); > > > //Append the slices into an image > append1->AddInputData(reslice->GetOutput()); > append1->Update(); > > image_paraxial = append1->GetOutput(); > > vtkNew image_viewer_; > > vtkNew renderWindow; > SetRenderWindow(renderWindow); > > image_viewer_->SetRenderWindow(renderWindow); > > image_viewer_->SetupInteractor(renderWindow->GetInteractor()); > > //vtkSmartPointer image_data = > vtkImageData::SafeDownCast( > > //scene.get_volume()->GetMapper()->GetInputDataObject(0, 0)); > > image_viewer_->SetInputData(image_data); > image_viewer_->SetSliceOrientationToXY(); > image_viewer_->SetSlice(1); > image_viewer_->SetResliceModeToAxisAligned(); > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marciniak.andrzej.zg at gmail.com Tue Mar 26 12:40:06 2019 From: marciniak.andrzej.zg at gmail.com (Andrzej Marciniak) Date: Tue, 26 Mar 2019 09:40:06 -0700 (MST) Subject: [vtkusers] Why rendering of Paint Filter labelmap is different from rendering of background image with ImageSlice? Message-ID: <1553618406836-0.post@n5.nabble.com> Hello, I have adapted PaintWidget example for creating labelmap to original image. When I have interpolation set on off, I can see that the label map created with paint widget is rendered in a different way than original image. It looks like origins are different. Why is that? Is it possible to have overlay "aligned" to background image? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From cory.quammen at kitware.com Tue Mar 26 13:08:27 2019 From: cory.quammen at kitware.com (Cory Quammen) Date: Tue, 26 Mar 2019 13:08:27 -0400 Subject: [vtkusers] Reminder: VTK community support is now provided on discourse.vtk.org Message-ID: Hello VTK community, This is a reminder that the mailing lists vtkusers at vtk.org and vtk-developers at vtk.org will be closed to new posts in the near future. Please post new questions and topics on https://discourse.vtk.org. You can sign up for the web site using your Google or GitHub accounts if you prefer, otherwise you can register with a user name and password. To set up Discourse in mailing list mode, please see: https://discourse.vtk.org/t/using-discourse-as-a-mailing-list/ The current vtkusers at vtk.org and vtk-developers at vtk.org mailing lists will accept new posts until the middle of 2019, and the archives from these lists will remain available after that. However, the bulk of VTK discussion and community support is now happening on https://discourse.vtk.org/. See you on discourse.vtk.org! Thanks, Cory -- Cory Quammen Staff R&D Engineer Kitware, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From srbn.ghosh99 at gmail.com Fri Mar 29 15:30:44 2019 From: srbn.ghosh99 at gmail.com (Shrabani Ghosh) Date: Fri, 29 Mar 2019 12:30:44 -0700 (MST) Subject: [vtkusers] Any way to use GPU to make faster performance? Message-ID: <1553887844749-0.post@n5.nabble.com> Hi, I am using VTK for simplex. When I am using a large data set, I am getting a runtime error. Is it possible to use GPU to make it faster? -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html From sur.chiranjib at gmail.com Sun Mar 31 15:46:07 2019 From: sur.chiranjib at gmail.com (Chiranjib Sur) Date: Mon, 1 Apr 2019 01:16:07 +0530 Subject: [vtkusers] Any way to use GPU to make faster performance? In-Reply-To: <1553887844749-0.post@n5.nabble.com> References: <1553887844749-0.post@n5.nabble.com> Message-ID: Please post the full error and the log with more details. Thanks and regards, Chiranjib On Sat, Mar 30, 2019 at 1:00 AM Shrabani Ghosh wrote: > Hi, > > I am using VTK for simplex. When I am using a large data set, I am getting > a > runtime error. Is it possible to use GPU to make it faster? > > > > -- > Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the VTK FAQ at: > http://www.vtk.org/Wiki/VTK_FAQ > > Search the list archives at: http://markmail.org/search/?q=vtkusers > > Follow this link to subscribe/unsubscribe: > https://vtk.org/mailman/listinfo/vtkusers > -------------- next part -------------- An HTML attachment was scrubbed... URL: